@das-fed/utils 7.0.7-hot.13 → 7.0.7-hot.15
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/api-services/index.js +908 -890
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +743 -725
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +623 -627
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +725 -743
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +984 -1002
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +744 -726
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +725 -743
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +725 -743
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +743 -725
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +752 -734
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +725 -743
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +725 -743
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +727 -745
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +727 -745
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +743 -725
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +725 -743
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +717 -699
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/set-personal-info/index.d.ts +1 -1
- package/common-info/set-personal-info/index.js +10 -10
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/create-api-service/sso/index.js +177 -178
- package/create-api-service/sso/index.js.gz +0 -0
- package/package.json +4 -4
- package/process-engine-info/index.js +8 -7
- package/token-tools/index.js +80 -8
- package/token-tools/index.js.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { unref as Dt, getCurrentScope as vt, onScopeDispose as It, ref as
|
|
1
|
+
import { unref as Dt, getCurrentScope as vt, onScopeDispose as It, ref as te, watch as Ae } from "vue";
|
|
2
2
|
import { encryption as Bt } from "@das-fed/utils/atob";
|
|
3
3
|
import { getConfig as _e } from "@das-fed/utils/config";
|
|
4
|
-
import { getAccessToken as
|
|
4
|
+
import { getAccessToken as H, removeAccessToken as jt, setAccessToken as qt, getAccessTokenInfo as fe } from "@das-fed/utils/token-tools";
|
|
5
5
|
import { appendQueryParams as nt } from "@das-fed/utils/common-tools";
|
|
6
6
|
import { removeProcessEngineToken as Mt, setProcessEngineToken as Ht } from "@das-fed/utils/process-engine-info";
|
|
7
7
|
import { setPersonalInfo as rt } from "@das-fed/utils/common-info/set-personal-info";
|
|
@@ -10,45 +10,45 @@ function ot(e, t) {
|
|
|
10
10
|
return e.apply(t, arguments);
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
const { toString: $t } = Object.prototype, { getPrototypeOf: xe } = Object, { iterator:
|
|
13
|
+
const { toString: $t } = Object.prototype, { getPrototypeOf: xe } = Object, { iterator: oe, toStringTag: st } = Symbol, se = /* @__PURE__ */ ((e) => (t) => {
|
|
14
14
|
const n = $t.call(t);
|
|
15
15
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
16
|
-
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) =>
|
|
17
|
-
function
|
|
18
|
-
return e !== null &&
|
|
16
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => se(t) === e), ie = (e) => (t) => typeof t === e, { isArray: v } = Array, $ = ie("undefined");
|
|
17
|
+
function J(e) {
|
|
18
|
+
return e !== null && !$(e) && e.constructor !== null && !$(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
19
19
|
}
|
|
20
20
|
const it = x("ArrayBuffer");
|
|
21
21
|
function zt(e) {
|
|
22
22
|
let t;
|
|
23
23
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && it(e.buffer), t;
|
|
24
24
|
}
|
|
25
|
-
const Jt =
|
|
26
|
-
if (
|
|
25
|
+
const Jt = ie("string"), A = ie("function"), at = ie("number"), V = (e) => e !== null && typeof e == "object", Vt = (e) => e === !0 || e === !1, Z = (e) => {
|
|
26
|
+
if (se(e) !== "object")
|
|
27
27
|
return !1;
|
|
28
28
|
const t = xe(e);
|
|
29
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(st in e) && !(
|
|
29
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(st in e) && !(oe in e);
|
|
30
30
|
}, Wt = (e) => {
|
|
31
|
-
if (!
|
|
31
|
+
if (!V(e) || J(e))
|
|
32
32
|
return !1;
|
|
33
33
|
try {
|
|
34
34
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
35
35
|
} catch {
|
|
36
36
|
return !1;
|
|
37
37
|
}
|
|
38
|
-
}, Kt = x("Date"), Qt = x("File"), Xt = x("Blob"), Gt = x("FileList"), Zt = (e) =>
|
|
38
|
+
}, Kt = x("Date"), Qt = x("File"), Xt = x("Blob"), Gt = x("FileList"), Zt = (e) => V(e) && A(e.pipe), Yt = (e) => {
|
|
39
39
|
let t;
|
|
40
|
-
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t =
|
|
40
|
+
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = se(e)) === "formdata" || // detect form-data instance
|
|
41
41
|
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
42
42
|
}, en = x("URLSearchParams"), [tn, nn, rn, on] = ["ReadableStream", "Request", "Response", "Headers"].map(x), sn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
43
|
-
function
|
|
43
|
+
function W(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
44
44
|
if (e === null || typeof e > "u")
|
|
45
45
|
return;
|
|
46
46
|
let r, o;
|
|
47
|
-
if (typeof e != "object" && (e = [e]),
|
|
47
|
+
if (typeof e != "object" && (e = [e]), v(e))
|
|
48
48
|
for (r = 0, o = e.length; r < o; r++)
|
|
49
49
|
t.call(null, e[r], r, e);
|
|
50
50
|
else {
|
|
51
|
-
if (
|
|
51
|
+
if (J(e))
|
|
52
52
|
return;
|
|
53
53
|
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
|
|
54
54
|
let c;
|
|
@@ -57,7 +57,7 @@ function Q(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
function ct(e, t) {
|
|
60
|
-
if (
|
|
60
|
+
if (J(e))
|
|
61
61
|
return null;
|
|
62
62
|
t = t.toLowerCase();
|
|
63
63
|
const n = Object.keys(e);
|
|
@@ -67,17 +67,17 @@ function ct(e, t) {
|
|
|
67
67
|
return o;
|
|
68
68
|
return null;
|
|
69
69
|
}
|
|
70
|
-
const U = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ut = (e) =>
|
|
70
|
+
const U = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ut = (e) => !$(e) && e !== U;
|
|
71
71
|
function ye() {
|
|
72
72
|
const { caseless: e } = ut(this) && this || {}, t = {}, n = (r, o) => {
|
|
73
73
|
const s = e && ct(t, o) || o;
|
|
74
|
-
|
|
74
|
+
Z(t[s]) && Z(r) ? t[s] = ye(t[s], r) : Z(r) ? t[s] = ye({}, r) : v(r) ? t[s] = r.slice() : t[s] = r;
|
|
75
75
|
};
|
|
76
76
|
for (let r = 0, o = arguments.length; r < o; r++)
|
|
77
|
-
arguments[r] &&
|
|
77
|
+
arguments[r] && W(arguments[r], n);
|
|
78
78
|
return t;
|
|
79
79
|
}
|
|
80
|
-
const an = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
80
|
+
const an = (e, t, n, { allOwnKeys: r } = {}) => (W(t, (o, s) => {
|
|
81
81
|
n && A(o) ? e[s] = ot(o, n) : e[s] = o;
|
|
82
82
|
}, { allOwnKeys: r }), e), cn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), un = (e, t, n, r) => {
|
|
83
83
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
@@ -99,7 +99,7 @@ const an = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (o, s) => {
|
|
|
99
99
|
return r !== -1 && r === n;
|
|
100
100
|
}, dn = (e) => {
|
|
101
101
|
if (!e) return null;
|
|
102
|
-
if (
|
|
102
|
+
if (v(e)) return e;
|
|
103
103
|
let t = e.length;
|
|
104
104
|
if (!at(t)) return null;
|
|
105
105
|
const n = new Array(t);
|
|
@@ -107,7 +107,7 @@ const an = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (o, s) => {
|
|
|
107
107
|
n[t] = e[t];
|
|
108
108
|
return n;
|
|
109
109
|
}, pn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && xe(Uint8Array)), hn = (e, t) => {
|
|
110
|
-
const r = (e && e[
|
|
110
|
+
const r = (e && e[oe]).call(e);
|
|
111
111
|
let o;
|
|
112
112
|
for (; (o = r.next()) && !o.done; ) {
|
|
113
113
|
const s = o.value;
|
|
@@ -126,7 +126,7 @@ const an = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (o, s) => {
|
|
|
126
126
|
}
|
|
127
127
|
), Ue = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), gn = x("RegExp"), lt = (e, t) => {
|
|
128
128
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
129
|
-
|
|
129
|
+
W(n, (o, s) => {
|
|
130
130
|
let i;
|
|
131
131
|
(i = t(o, s, e)) !== !1 && (r[s] = i || o);
|
|
132
132
|
}), Object.defineProperties(e, r);
|
|
@@ -151,55 +151,55 @@ const an = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (o, s) => {
|
|
|
151
151
|
n[s] = !0;
|
|
152
152
|
});
|
|
153
153
|
};
|
|
154
|
-
return
|
|
154
|
+
return v(e) ? r(e) : r(String(e).split(t)), n;
|
|
155
155
|
}, Sn = () => {
|
|
156
156
|
}, Rn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
157
157
|
function Tn(e) {
|
|
158
|
-
return !!(e && A(e.append) && e[st] === "FormData" && e[
|
|
158
|
+
return !!(e && A(e.append) && e[st] === "FormData" && e[oe]);
|
|
159
159
|
}
|
|
160
160
|
const On = (e) => {
|
|
161
161
|
const t = new Array(10), n = (r, o) => {
|
|
162
|
-
if (
|
|
162
|
+
if (V(r)) {
|
|
163
163
|
if (t.indexOf(r) >= 0)
|
|
164
164
|
return;
|
|
165
|
-
if (
|
|
165
|
+
if (J(r))
|
|
166
166
|
return r;
|
|
167
167
|
if (!("toJSON" in r)) {
|
|
168
168
|
t[o] = r;
|
|
169
|
-
const s =
|
|
170
|
-
return
|
|
169
|
+
const s = v(r) ? [] : {};
|
|
170
|
+
return W(r, (i, c) => {
|
|
171
171
|
const f = n(i, o + 1);
|
|
172
|
-
|
|
172
|
+
!$(f) && (s[c] = f);
|
|
173
173
|
}), t[o] = void 0, s;
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
return r;
|
|
177
177
|
};
|
|
178
178
|
return n(e, 0);
|
|
179
|
-
}, An = x("AsyncFunction"), _n = (e) => e && (
|
|
179
|
+
}, An = x("AsyncFunction"), _n = (e) => e && (V(e) || A(e)) && A(e.then) && A(e.catch), ft = ((e, t) => e ? setImmediate : t ? ((n, r) => (U.addEventListener("message", ({ source: o, data: s }) => {
|
|
180
180
|
o === U && s === n && r.length && r.shift()();
|
|
181
181
|
}, !1), (o) => {
|
|
182
182
|
r.push(o), U.postMessage(n, "*");
|
|
183
183
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
184
184
|
typeof setImmediate == "function",
|
|
185
185
|
A(U.postMessage)
|
|
186
|
-
), xn = typeof queueMicrotask < "u" ? queueMicrotask.bind(U) : typeof process < "u" && process.nextTick || ft,
|
|
187
|
-
isArray:
|
|
186
|
+
), xn = typeof queueMicrotask < "u" ? queueMicrotask.bind(U) : typeof process < "u" && process.nextTick || ft, kn = (e) => e != null && A(e[oe]), a = {
|
|
187
|
+
isArray: v,
|
|
188
188
|
isArrayBuffer: it,
|
|
189
|
-
isBuffer:
|
|
189
|
+
isBuffer: J,
|
|
190
190
|
isFormData: Yt,
|
|
191
191
|
isArrayBufferView: zt,
|
|
192
192
|
isString: Jt,
|
|
193
193
|
isNumber: at,
|
|
194
194
|
isBoolean: Vt,
|
|
195
|
-
isObject:
|
|
196
|
-
isPlainObject:
|
|
195
|
+
isObject: V,
|
|
196
|
+
isPlainObject: Z,
|
|
197
197
|
isEmptyObject: Wt,
|
|
198
198
|
isReadableStream: tn,
|
|
199
199
|
isRequest: nn,
|
|
200
200
|
isResponse: rn,
|
|
201
201
|
isHeaders: on,
|
|
202
|
-
isUndefined:
|
|
202
|
+
isUndefined: $,
|
|
203
203
|
isDate: Kt,
|
|
204
204
|
isFile: Qt,
|
|
205
205
|
isBlob: Xt,
|
|
@@ -209,14 +209,14 @@ const On = (e) => {
|
|
|
209
209
|
isURLSearchParams: en,
|
|
210
210
|
isTypedArray: pn,
|
|
211
211
|
isFileList: Gt,
|
|
212
|
-
forEach:
|
|
212
|
+
forEach: W,
|
|
213
213
|
merge: ye,
|
|
214
214
|
extend: an,
|
|
215
215
|
trim: sn,
|
|
216
216
|
stripBOM: cn,
|
|
217
217
|
inherits: un,
|
|
218
218
|
toFlatObject: ln,
|
|
219
|
-
kindOf:
|
|
219
|
+
kindOf: se,
|
|
220
220
|
kindOfTest: x,
|
|
221
221
|
endsWith: fn,
|
|
222
222
|
toArray: dn,
|
|
@@ -241,7 +241,7 @@ const On = (e) => {
|
|
|
241
241
|
isThenable: _n,
|
|
242
242
|
setImmediate: ft,
|
|
243
243
|
asap: xn,
|
|
244
|
-
isIterable:
|
|
244
|
+
isIterable: kn
|
|
245
245
|
};
|
|
246
246
|
function y(e, t, n, r, o) {
|
|
247
247
|
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), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
@@ -293,7 +293,7 @@ y.from = (e, t, n, r, o, s) => {
|
|
|
293
293
|
return f !== Error.prototype;
|
|
294
294
|
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, s && Object.assign(i, s), i;
|
|
295
295
|
};
|
|
296
|
-
const
|
|
296
|
+
const Cn = null;
|
|
297
297
|
function we(e) {
|
|
298
298
|
return a.isPlainObject(e) || a.isArray(e);
|
|
299
299
|
}
|
|
@@ -311,7 +311,7 @@ function Pn(e) {
|
|
|
311
311
|
const Ln = a.toFlatObject(a, {}, null, function(t) {
|
|
312
312
|
return /^is[A-Z]/.test(t);
|
|
313
313
|
});
|
|
314
|
-
function
|
|
314
|
+
function ae(e, t, n) {
|
|
315
315
|
if (!a.isObject(e))
|
|
316
316
|
throw new TypeError("target must be an object");
|
|
317
317
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
@@ -340,10 +340,10 @@ function ce(e, t, n) {
|
|
|
340
340
|
if (a.endsWith(m, "{}"))
|
|
341
341
|
m = r ? m : m.slice(0, -2), p = JSON.stringify(p);
|
|
342
342
|
else if (a.isArray(p) && Pn(p) || (a.isFileList(p) || a.endsWith(m, "[]")) && (E = a.toArray(p)))
|
|
343
|
-
return m = ht(m), E.forEach(function(R,
|
|
343
|
+
return m = ht(m), E.forEach(function(R, C) {
|
|
344
344
|
!(a.isUndefined(R) || R === null) && t.append(
|
|
345
345
|
// eslint-disable-next-line no-nested-ternary
|
|
346
|
-
i === !0 ? Ne([m],
|
|
346
|
+
i === !0 ? Ne([m], C, s) : i === null ? m : m + "[]",
|
|
347
347
|
l(R)
|
|
348
348
|
);
|
|
349
349
|
}), !1;
|
|
@@ -388,10 +388,10 @@ function Fe(e) {
|
|
|
388
388
|
return t[r];
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
this._pairs = [], e &&
|
|
391
|
+
function ke(e, t) {
|
|
392
|
+
this._pairs = [], e && ae(e, this, t);
|
|
393
393
|
}
|
|
394
|
-
const mt =
|
|
394
|
+
const mt = ke.prototype;
|
|
395
395
|
mt.append = function(t, n) {
|
|
396
396
|
this._pairs.push([t, n]);
|
|
397
397
|
};
|
|
@@ -415,7 +415,7 @@ function yt(e, t, n) {
|
|
|
415
415
|
});
|
|
416
416
|
const o = n && n.serialize;
|
|
417
417
|
let s;
|
|
418
|
-
if (o ? s = o(t, n) : s = a.isURLSearchParams(t) ? t.toString() : new
|
|
418
|
+
if (o ? s = o(t, n) : s = a.isURLSearchParams(t) ? t.toString() : new ke(t, n).toString(r), s) {
|
|
419
419
|
const i = e.indexOf("#");
|
|
420
420
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
421
421
|
}
|
|
@@ -479,7 +479,7 @@ const wt = {
|
|
|
479
479
|
silentJSONParsing: !0,
|
|
480
480
|
forcedJSONParsing: !0,
|
|
481
481
|
clarifyTimeoutError: !1
|
|
482
|
-
}, Nn = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
482
|
+
}, Nn = typeof URLSearchParams < "u" ? URLSearchParams : ke, Fn = typeof FormData < "u" ? FormData : null, Dn = typeof Blob < "u" ? Blob : null, vn = {
|
|
483
483
|
isBrowser: !0,
|
|
484
484
|
classes: {
|
|
485
485
|
URLSearchParams: Nn,
|
|
@@ -487,10 +487,10 @@ const wt = {
|
|
|
487
487
|
Blob: Dn
|
|
488
488
|
},
|
|
489
489
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
490
|
-
},
|
|
491
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", jn =
|
|
490
|
+
}, Ce = typeof window < "u" && typeof document < "u", ge = typeof navigator == "object" && navigator || void 0, In = Ce && (!ge || ["ReactNative", "NativeScript", "NS"].indexOf(ge.product) < 0), Bn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
491
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", jn = Ce && window.location.href || "http://localhost", qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
492
492
|
__proto__: null,
|
|
493
|
-
hasBrowserEnv:
|
|
493
|
+
hasBrowserEnv: Ce,
|
|
494
494
|
hasStandardBrowserEnv: In,
|
|
495
495
|
hasStandardBrowserWebWorkerEnv: Bn,
|
|
496
496
|
navigator: ge,
|
|
@@ -500,7 +500,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", jn
|
|
|
500
500
|
...vn
|
|
501
501
|
};
|
|
502
502
|
function Mn(e, t) {
|
|
503
|
-
return
|
|
503
|
+
return ae(e, new T.classes.URLSearchParams(), {
|
|
504
504
|
visitor: function(n, r, o, s) {
|
|
505
505
|
return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
506
506
|
},
|
|
@@ -544,7 +544,7 @@ function zn(e, t, n) {
|
|
|
544
544
|
}
|
|
545
545
|
return (n || JSON.stringify)(e);
|
|
546
546
|
}
|
|
547
|
-
const
|
|
547
|
+
const K = {
|
|
548
548
|
transitional: wt,
|
|
549
549
|
adapter: ["xhr", "http", "fetch"],
|
|
550
550
|
transformRequest: [function(t, n) {
|
|
@@ -563,7 +563,7 @@ const X = {
|
|
|
563
563
|
return Mn(t, this.formSerializer).toString();
|
|
564
564
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
565
565
|
const f = this.env && this.env.FormData;
|
|
566
|
-
return
|
|
566
|
+
return ae(
|
|
567
567
|
c ? { "files[]": t } : t,
|
|
568
568
|
f && new f(),
|
|
569
569
|
this.formSerializer
|
|
@@ -573,7 +573,7 @@ const X = {
|
|
|
573
573
|
return s || o ? (n.setContentType("application/json", !1), zn(t)) : t;
|
|
574
574
|
}],
|
|
575
575
|
transformResponse: [function(t) {
|
|
576
|
-
const n = this.transitional ||
|
|
576
|
+
const n = this.transitional || K.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
577
577
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
578
578
|
return t;
|
|
579
579
|
if (t && a.isString(t) && (r && !this.responseType || o)) {
|
|
@@ -611,7 +611,7 @@ const X = {
|
|
|
611
611
|
}
|
|
612
612
|
};
|
|
613
613
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
614
|
-
|
|
614
|
+
K.headers[e] = {};
|
|
615
615
|
});
|
|
616
616
|
const Jn = a.toObjectSet([
|
|
617
617
|
"age",
|
|
@@ -639,11 +639,11 @@ const Jn = a.toObjectSet([
|
|
|
639
639
|
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && Jn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
640
640
|
}), t;
|
|
641
641
|
}, ve = Symbol("internals");
|
|
642
|
-
function
|
|
642
|
+
function B(e) {
|
|
643
643
|
return e && String(e).trim().toLowerCase();
|
|
644
644
|
}
|
|
645
|
-
function
|
|
646
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
645
|
+
function Y(e) {
|
|
646
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(Y) : String(e);
|
|
647
647
|
}
|
|
648
648
|
function Wn(e) {
|
|
649
649
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -684,11 +684,11 @@ let _ = class {
|
|
|
684
684
|
set(t, n, r) {
|
|
685
685
|
const o = this;
|
|
686
686
|
function s(c, f, l) {
|
|
687
|
-
const u =
|
|
687
|
+
const u = B(f);
|
|
688
688
|
if (!u)
|
|
689
689
|
throw new Error("header name must be a non-empty string");
|
|
690
690
|
const d = a.findKey(o, u);
|
|
691
|
-
(!d || o[d] === void 0 || l === !0 || l === void 0 && o[d] !== !1) && (o[d || f] =
|
|
691
|
+
(!d || o[d] === void 0 || l === !0 || l === void 0 && o[d] !== !1) && (o[d || f] = Y(c));
|
|
692
692
|
}
|
|
693
693
|
const i = (c, f) => a.forEach(c, (l, u) => s(l, u, f));
|
|
694
694
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
@@ -708,7 +708,7 @@ let _ = class {
|
|
|
708
708
|
return this;
|
|
709
709
|
}
|
|
710
710
|
get(t, n) {
|
|
711
|
-
if (t =
|
|
711
|
+
if (t = B(t), t) {
|
|
712
712
|
const r = a.findKey(this, t);
|
|
713
713
|
if (r) {
|
|
714
714
|
const o = this[r];
|
|
@@ -725,7 +725,7 @@ let _ = class {
|
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
727
|
has(t, n) {
|
|
728
|
-
if (t =
|
|
728
|
+
if (t = B(t), t) {
|
|
729
729
|
const r = a.findKey(this, t);
|
|
730
730
|
return !!(r && this[r] !== void 0 && (!n || de(this, this[r], r, n)));
|
|
731
731
|
}
|
|
@@ -735,7 +735,7 @@ let _ = class {
|
|
|
735
735
|
const r = this;
|
|
736
736
|
let o = !1;
|
|
737
737
|
function s(i) {
|
|
738
|
-
if (i =
|
|
738
|
+
if (i = B(i), i) {
|
|
739
739
|
const c = a.findKey(r, i);
|
|
740
740
|
c && (!n || de(r, r[c], c, n)) && (delete r[c], o = !0);
|
|
741
741
|
}
|
|
@@ -756,11 +756,11 @@ let _ = class {
|
|
|
756
756
|
return a.forEach(this, (o, s) => {
|
|
757
757
|
const i = a.findKey(r, s);
|
|
758
758
|
if (i) {
|
|
759
|
-
n[i] =
|
|
759
|
+
n[i] = Y(o), delete n[s];
|
|
760
760
|
return;
|
|
761
761
|
}
|
|
762
762
|
const c = t ? Qn(s) : String(s).trim();
|
|
763
|
-
c !== s && delete n[s], n[c] =
|
|
763
|
+
c !== s && delete n[s], n[c] = Y(o), r[c] = !0;
|
|
764
764
|
}), this;
|
|
765
765
|
}
|
|
766
766
|
concat(...t) {
|
|
@@ -797,7 +797,7 @@ let _ = class {
|
|
|
797
797
|
accessors: {}
|
|
798
798
|
}).accessors, o = this.prototype;
|
|
799
799
|
function s(i) {
|
|
800
|
-
const c =
|
|
800
|
+
const c = B(i);
|
|
801
801
|
r[c] || (Xn(o, i), r[c] = !0);
|
|
802
802
|
}
|
|
803
803
|
return a.isArray(t) ? t.forEach(s) : s(t), this;
|
|
@@ -815,7 +815,7 @@ a.reduceDescriptors(_.prototype, ({ value: e }, t) => {
|
|
|
815
815
|
});
|
|
816
816
|
a.freezeMethods(_);
|
|
817
817
|
function pe(e, t) {
|
|
818
|
-
const n = this ||
|
|
818
|
+
const n = this || K, r = t || n, o = _.from(r.headers);
|
|
819
819
|
let s = r.data;
|
|
820
820
|
return a.forEach(e, function(c) {
|
|
821
821
|
s = c.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
@@ -824,10 +824,10 @@ function pe(e, t) {
|
|
|
824
824
|
function bt(e) {
|
|
825
825
|
return !!(e && e.__CANCEL__);
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function I(e, t, n) {
|
|
828
828
|
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
829
829
|
}
|
|
830
|
-
a.inherits(
|
|
830
|
+
a.inherits(I, y, {
|
|
831
831
|
__CANCEL__: !0
|
|
832
832
|
});
|
|
833
833
|
function Et(e, t, n) {
|
|
@@ -872,7 +872,7 @@ function Yn(e, t) {
|
|
|
872
872
|
}, r - d)));
|
|
873
873
|
}, () => o && i(o)];
|
|
874
874
|
}
|
|
875
|
-
const
|
|
875
|
+
const ne = (e, t, n = 3) => {
|
|
876
876
|
let r = 0;
|
|
877
877
|
const o = Zn(50, 250);
|
|
878
878
|
return Yn((s) => {
|
|
@@ -1061,18 +1061,18 @@ const Rt = (e) => {
|
|
|
1061
1061
|
}, h.onerror = function() {
|
|
1062
1062
|
r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
|
|
1063
1063
|
}, h.ontimeout = function() {
|
|
1064
|
-
let
|
|
1064
|
+
let C = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1065
1065
|
const O = o.transitional || wt;
|
|
1066
|
-
o.timeoutErrorMessage && (
|
|
1067
|
-
|
|
1066
|
+
o.timeoutErrorMessage && (C = o.timeoutErrorMessage), r(new y(
|
|
1067
|
+
C,
|
|
1068
1068
|
O.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1069
1069
|
e,
|
|
1070
1070
|
h
|
|
1071
1071
|
)), h = null;
|
|
1072
|
-
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(
|
|
1073
|
-
h.setRequestHeader(O,
|
|
1074
|
-
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), l && ([w, p] =
|
|
1075
|
-
h && (r(!R || R.type ? new
|
|
1072
|
+
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(C, O) {
|
|
1073
|
+
h.setRequestHeader(O, C);
|
|
1074
|
+
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), l && ([w, p] = ne(l, !0), h.addEventListener("progress", w)), f && h.upload && ([d, g] = ne(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (u = (R) => {
|
|
1075
|
+
h && (r(!R || R.type ? new I(null, e, h) : R), h.abort(), h = null);
|
|
1076
1076
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1077
1077
|
const S = Gn(o.url);
|
|
1078
1078
|
if (S && T.protocols.indexOf(S) === -1) {
|
|
@@ -1089,7 +1089,7 @@ const Rt = (e) => {
|
|
|
1089
1089
|
if (!o) {
|
|
1090
1090
|
o = !0, c();
|
|
1091
1091
|
const u = l instanceof Error ? l : this.reason;
|
|
1092
|
-
r.abort(u instanceof y ? u : new
|
|
1092
|
+
r.abort(u instanceof y ? u : new I(u instanceof Error ? u.message : u));
|
|
1093
1093
|
}
|
|
1094
1094
|
};
|
|
1095
1095
|
let i = t && setTimeout(() => {
|
|
@@ -1161,7 +1161,7 @@ const Rt = (e) => {
|
|
|
1161
1161
|
}, {
|
|
1162
1162
|
highWaterMark: 2
|
|
1163
1163
|
});
|
|
1164
|
-
},
|
|
1164
|
+
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Tt = ce && typeof ReadableStream == "function", lr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ot = (e, ...t) => {
|
|
1165
1165
|
try {
|
|
1166
1166
|
return !!e(...t);
|
|
1167
1167
|
} catch {
|
|
@@ -1177,12 +1177,12 @@ const Rt = (e) => {
|
|
|
1177
1177
|
}
|
|
1178
1178
|
}).headers.has("Content-Type");
|
|
1179
1179
|
return e && !t;
|
|
1180
|
-
}), Me = 64 * 1024, be = Tt && Ot(() => a.isReadableStream(new Response("").body)),
|
|
1180
|
+
}), Me = 64 * 1024, be = Tt && Ot(() => a.isReadableStream(new Response("").body)), re = {
|
|
1181
1181
|
stream: be && ((e) => e.body)
|
|
1182
1182
|
};
|
|
1183
|
-
|
|
1183
|
+
ce && ((e) => {
|
|
1184
1184
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1185
|
-
!
|
|
1185
|
+
!re[t] && (re[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1186
1186
|
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1187
1187
|
});
|
|
1188
1188
|
});
|
|
@@ -1204,7 +1204,7 @@ const dr = async (e) => {
|
|
|
1204
1204
|
}, pr = async (e, t) => {
|
|
1205
1205
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1206
1206
|
return n ?? dr(t);
|
|
1207
|
-
}, hr =
|
|
1207
|
+
}, hr = ce && (async (e) => {
|
|
1208
1208
|
let {
|
|
1209
1209
|
url: t,
|
|
1210
1210
|
method: n,
|
|
@@ -1233,11 +1233,11 @@ const dr = async (e) => {
|
|
|
1233
1233
|
duplex: "half"
|
|
1234
1234
|
}), P;
|
|
1235
1235
|
if (a.isFormData(r) && (P = O.headers.get("content-type")) && u.setContentType(P), O.body) {
|
|
1236
|
-
const [L,
|
|
1236
|
+
const [L, Q] = Ie(
|
|
1237
1237
|
h,
|
|
1238
|
-
|
|
1238
|
+
ne(Be(f))
|
|
1239
1239
|
);
|
|
1240
|
-
r = qe(O.body, Me, L,
|
|
1240
|
+
r = qe(O.body, Me, L, Q);
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
1243
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1258,22 +1258,22 @@ const dr = async (e) => {
|
|
|
1258
1258
|
["status", "statusText", "headers"].forEach((Le) => {
|
|
1259
1259
|
O[Le] = S[Le];
|
|
1260
1260
|
});
|
|
1261
|
-
const P = a.toFiniteNumber(S.headers.get("content-length")), [L,
|
|
1261
|
+
const P = a.toFiniteNumber(S.headers.get("content-length")), [L, Q] = c && Ie(
|
|
1262
1262
|
P,
|
|
1263
|
-
|
|
1263
|
+
ne(Be(c), !0)
|
|
1264
1264
|
) || [];
|
|
1265
1265
|
S = new Response(
|
|
1266
1266
|
qe(S.body, Me, L, () => {
|
|
1267
|
-
|
|
1267
|
+
Q && Q(), m && m();
|
|
1268
1268
|
}),
|
|
1269
1269
|
O
|
|
1270
1270
|
);
|
|
1271
1271
|
}
|
|
1272
1272
|
l = l || "text";
|
|
1273
|
-
let
|
|
1273
|
+
let C = await re[a.findKey(re, l) || "text"](S, e);
|
|
1274
1274
|
return !R && m && m(), await new Promise((O, P) => {
|
|
1275
1275
|
Et(O, P, {
|
|
1276
|
-
data:
|
|
1276
|
+
data: C,
|
|
1277
1277
|
headers: _.from(S.headers),
|
|
1278
1278
|
status: S.status,
|
|
1279
1279
|
statusText: S.statusText,
|
|
@@ -1290,7 +1290,7 @@ const dr = async (e) => {
|
|
|
1290
1290
|
) : y.from(E, E && E.code, e, p);
|
|
1291
1291
|
}
|
|
1292
1292
|
}), Ee = {
|
|
1293
|
-
http:
|
|
1293
|
+
http: Cn,
|
|
1294
1294
|
xhr: sr,
|
|
1295
1295
|
fetch: hr
|
|
1296
1296
|
};
|
|
@@ -1336,13 +1336,13 @@ const He = (e) => `- ${e}`, mr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1336
1336
|
};
|
|
1337
1337
|
function he(e) {
|
|
1338
1338
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1339
|
-
throw new
|
|
1339
|
+
throw new I(null, e);
|
|
1340
1340
|
}
|
|
1341
1341
|
function $e(e) {
|
|
1342
1342
|
return he(e), e.headers = _.from(e.headers), e.data = pe.call(
|
|
1343
1343
|
e,
|
|
1344
1344
|
e.transformRequest
|
|
1345
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), At.getAdapter(e.adapter ||
|
|
1345
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), At.getAdapter(e.adapter || K.adapter)(e).then(function(r) {
|
|
1346
1346
|
return he(e), r.data = pe.call(
|
|
1347
1347
|
e,
|
|
1348
1348
|
e.transformResponse,
|
|
@@ -1356,14 +1356,14 @@ function $e(e) {
|
|
|
1356
1356
|
), r.response.headers = _.from(r.response.headers))), Promise.reject(r);
|
|
1357
1357
|
});
|
|
1358
1358
|
}
|
|
1359
|
-
const _t = "1.11.0",
|
|
1359
|
+
const _t = "1.11.0", ue = {};
|
|
1360
1360
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1361
|
-
|
|
1361
|
+
ue[e] = function(r) {
|
|
1362
1362
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1363
1363
|
};
|
|
1364
1364
|
});
|
|
1365
1365
|
const ze = {};
|
|
1366
|
-
|
|
1366
|
+
ue.transitional = function(t, n, r) {
|
|
1367
1367
|
function o(s, i) {
|
|
1368
1368
|
return "[Axios v" + _t + "] Transitional option '" + s + "'" + i + (r ? ". " + r : "");
|
|
1369
1369
|
}
|
|
@@ -1376,7 +1376,7 @@ le.transitional = function(t, n, r) {
|
|
|
1376
1376
|
return n && !ze[i] && (ze[i] = !0), t ? t(s, i, c) : !0;
|
|
1377
1377
|
};
|
|
1378
1378
|
};
|
|
1379
|
-
|
|
1379
|
+
ue.spelling = function(t) {
|
|
1380
1380
|
return (n, r) => !0;
|
|
1381
1381
|
};
|
|
1382
1382
|
function yr(e, t, n) {
|
|
@@ -1396,10 +1396,10 @@ function yr(e, t, n) {
|
|
|
1396
1396
|
throw new y("Unknown option " + s, y.ERR_BAD_OPTION);
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
|
-
const
|
|
1399
|
+
const ee = {
|
|
1400
1400
|
assertOptions: yr,
|
|
1401
|
-
validators:
|
|
1402
|
-
},
|
|
1401
|
+
validators: ue
|
|
1402
|
+
}, k = ee.validators;
|
|
1403
1403
|
let N = class {
|
|
1404
1404
|
constructor(t) {
|
|
1405
1405
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -1435,18 +1435,18 @@ let N = class {
|
|
|
1435
1435
|
_request(t, n) {
|
|
1436
1436
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
|
|
1437
1437
|
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
1438
|
-
r !== void 0 &&
|
|
1439
|
-
silentJSONParsing:
|
|
1440
|
-
forcedJSONParsing:
|
|
1441
|
-
clarifyTimeoutError:
|
|
1438
|
+
r !== void 0 && ee.assertOptions(r, {
|
|
1439
|
+
silentJSONParsing: k.transitional(k.boolean),
|
|
1440
|
+
forcedJSONParsing: k.transitional(k.boolean),
|
|
1441
|
+
clarifyTimeoutError: k.transitional(k.boolean)
|
|
1442
1442
|
}, !1), o != null && (a.isFunction(o) ? n.paramsSerializer = {
|
|
1443
1443
|
serialize: o
|
|
1444
|
-
} :
|
|
1445
|
-
encode:
|
|
1446
|
-
serialize:
|
|
1447
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1448
|
-
baseUrl:
|
|
1449
|
-
withXsrfToken:
|
|
1444
|
+
} : ee.assertOptions(o, {
|
|
1445
|
+
encode: k.function,
|
|
1446
|
+
serialize: k.function
|
|
1447
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ee.assertOptions(n, {
|
|
1448
|
+
baseUrl: k.spelling("baseURL"),
|
|
1449
|
+
withXsrfToken: k.spelling("withXSRFToken")
|
|
1450
1450
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1451
1451
|
let i = s && a.merge(
|
|
1452
1452
|
s.common,
|
|
@@ -1548,7 +1548,7 @@ let wr = class xt {
|
|
|
1548
1548
|
r.unsubscribe(s);
|
|
1549
1549
|
}, i;
|
|
1550
1550
|
}, t(function(s, i, c) {
|
|
1551
|
-
r.reason || (r.reason = new
|
|
1551
|
+
r.reason || (r.reason = new I(s, i, c), n(r.reason));
|
|
1552
1552
|
});
|
|
1553
1553
|
}
|
|
1554
1554
|
/**
|
|
@@ -1673,19 +1673,19 @@ const Se = {
|
|
|
1673
1673
|
Object.entries(Se).forEach(([e, t]) => {
|
|
1674
1674
|
Se[t] = e;
|
|
1675
1675
|
});
|
|
1676
|
-
function
|
|
1676
|
+
function kt(e) {
|
|
1677
1677
|
const t = new N(e), n = ot(N.prototype.request, t);
|
|
1678
1678
|
return a.extend(n, N.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
1679
|
-
return
|
|
1679
|
+
return kt(F(e, o));
|
|
1680
1680
|
}, n;
|
|
1681
1681
|
}
|
|
1682
|
-
const b =
|
|
1682
|
+
const b = kt(K);
|
|
1683
1683
|
b.Axios = N;
|
|
1684
|
-
b.CanceledError =
|
|
1684
|
+
b.CanceledError = I;
|
|
1685
1685
|
b.CancelToken = wr;
|
|
1686
1686
|
b.isCancel = bt;
|
|
1687
1687
|
b.VERSION = _t;
|
|
1688
|
-
b.toFormData =
|
|
1688
|
+
b.toFormData = ae;
|
|
1689
1689
|
b.AxiosError = y;
|
|
1690
1690
|
b.Cancel = b.CanceledError;
|
|
1691
1691
|
b.all = function(t) {
|
|
@@ -1718,7 +1718,7 @@ const {
|
|
|
1718
1718
|
mergeConfig: ho
|
|
1719
1719
|
} = b;
|
|
1720
1720
|
/*! js-cookie v3.0.5 | MIT */
|
|
1721
|
-
function
|
|
1721
|
+
function X(e) {
|
|
1722
1722
|
for (var t = 1; t < arguments.length; t++) {
|
|
1723
1723
|
var n = arguments[t];
|
|
1724
1724
|
for (var r in n)
|
|
@@ -1740,7 +1740,7 @@ var Er = {
|
|
|
1740
1740
|
function Re(e, t) {
|
|
1741
1741
|
function n(o, s, i) {
|
|
1742
1742
|
if (!(typeof document > "u")) {
|
|
1743
|
-
i =
|
|
1743
|
+
i = X({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
1744
1744
|
var c = "";
|
|
1745
1745
|
for (var f in i)
|
|
1746
1746
|
i[f] && (c += "; " + f, i[f] !== !0 && (c += "=" + i[f].split(";")[0]));
|
|
@@ -1769,16 +1769,16 @@ function Re(e, t) {
|
|
|
1769
1769
|
n(
|
|
1770
1770
|
o,
|
|
1771
1771
|
"",
|
|
1772
|
-
|
|
1772
|
+
X({}, s, {
|
|
1773
1773
|
expires: -1
|
|
1774
1774
|
})
|
|
1775
1775
|
);
|
|
1776
1776
|
},
|
|
1777
1777
|
withAttributes: function(o) {
|
|
1778
|
-
return Re(this.converter,
|
|
1778
|
+
return Re(this.converter, X({}, this.attributes, o));
|
|
1779
1779
|
},
|
|
1780
1780
|
withConverter: function(o) {
|
|
1781
|
-
return Re(
|
|
1781
|
+
return Re(X({}, this.converter, o), this.attributes);
|
|
1782
1782
|
}
|
|
1783
1783
|
},
|
|
1784
1784
|
{
|
|
@@ -1788,9 +1788,9 @@ function Re(e, t) {
|
|
|
1788
1788
|
);
|
|
1789
1789
|
}
|
|
1790
1790
|
var Sr = Re(Er, { path: "/" }), Je;
|
|
1791
|
-
const
|
|
1791
|
+
const Ct = typeof window < "u", Rr = (e) => typeof e == "string", Ve = () => +Date.now(), Te = () => {
|
|
1792
1792
|
};
|
|
1793
|
-
|
|
1793
|
+
Ct && ((Je = window == null ? void 0 : window.navigator) != null && Je.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1794
1794
|
function Pe(e) {
|
|
1795
1795
|
return typeof e == "function" ? e() : Dt(e);
|
|
1796
1796
|
}
|
|
@@ -1827,7 +1827,7 @@ function xr(e) {
|
|
|
1827
1827
|
const n = Pe(e);
|
|
1828
1828
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1829
1829
|
}
|
|
1830
|
-
const Pt =
|
|
1830
|
+
const Pt = Ct ? window : void 0;
|
|
1831
1831
|
function We(...e) {
|
|
1832
1832
|
let t, n, r, o;
|
|
1833
1833
|
if (Rr(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = Pt) : [t, n, r, o] = e, !t)
|
|
@@ -1844,15 +1844,15 @@ function We(...e) {
|
|
|
1844
1844
|
}
|
|
1845
1845
|
const Ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Qe = "__vueuse_ssr_handlers__";
|
|
1846
1846
|
Ke[Qe] = Ke[Qe] || {};
|
|
1847
|
-
const
|
|
1848
|
-
function Pr(e =
|
|
1847
|
+
const kr = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"], Cr = 6e4;
|
|
1848
|
+
function Pr(e = Cr, t = {}) {
|
|
1849
1849
|
const {
|
|
1850
1850
|
initialState: n = !1,
|
|
1851
1851
|
listenForVisibilityChange: r = !0,
|
|
1852
|
-
events: o =
|
|
1852
|
+
events: o = kr,
|
|
1853
1853
|
window: s = Pt,
|
|
1854
1854
|
eventFilter: i = Or(50)
|
|
1855
|
-
} = t, c =
|
|
1855
|
+
} = t, c = te(n), f = te(Ve());
|
|
1856
1856
|
let l;
|
|
1857
1857
|
const u = Tr(i, () => {
|
|
1858
1858
|
c.value = !1, f.value = Ve(), clearTimeout(l), l = setTimeout(() => c.value = !0, e);
|
|
@@ -1933,14 +1933,14 @@ let Ut = (e = 21) => {
|
|
|
1933
1933
|
}
|
|
1934
1934
|
return t;
|
|
1935
1935
|
};
|
|
1936
|
-
const
|
|
1936
|
+
const G = (e) => new URL(location.href).searchParams.get(e), D = {
|
|
1937
1937
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
1938
1938
|
// 重定向到登录页
|
|
1939
1939
|
logoutCurpage: "/api/justauth/oauth-server/v1/visitor/logout-curpage",
|
|
1940
1940
|
// 清除登录信息
|
|
1941
1941
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
1942
1942
|
// 通过code获取token
|
|
1943
|
-
}, { baseURL: Ye, noRedireLogin: Br = !1 } = _e(),
|
|
1943
|
+
}, { baseURL: Ye, noRedireLogin: Br = !1 } = _e(), q = location.origin + "/home", M = {
|
|
1944
1944
|
response_type: "code",
|
|
1945
1945
|
scope: "sever",
|
|
1946
1946
|
client_id: "sys",
|
|
@@ -1951,7 +1951,7 @@ const $ = (e) => new URL(location.href).searchParams.get(e), B = {
|
|
|
1951
1951
|
e.forEach((r) => {
|
|
1952
1952
|
n.delete(r);
|
|
1953
1953
|
}), t.search = n.toString(), window.history.replaceState({}, "", t);
|
|
1954
|
-
}, Nt =
|
|
1954
|
+
}, Nt = te(!1), Ft = (e) => {
|
|
1955
1955
|
if (e <= 0) return;
|
|
1956
1956
|
const { idle: t } = Pr(e);
|
|
1957
1957
|
Ae(
|
|
@@ -1964,29 +1964,29 @@ const $ = (e) => new URL(location.href).searchParams.get(e), B = {
|
|
|
1964
1964
|
localStorage.getItem("idelTime") && Ft(Number(localStorage.getItem("idelTime")));
|
|
1965
1965
|
let tt = "";
|
|
1966
1966
|
const jr = async () => {
|
|
1967
|
-
const e =
|
|
1968
|
-
if (r && localStorage.setItem("loginType", r), !e) return
|
|
1967
|
+
const e = G("code") || "", t = G("redirect_url") || "/", n = G("kingdee_token") || "", r = G("loginType") || "";
|
|
1968
|
+
if (r && localStorage.setItem("loginType", r), !e) return H();
|
|
1969
1969
|
if (e === tt)
|
|
1970
|
-
return et(["code", "state", "kingdee_token", "redirect_url"]), window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t)),
|
|
1970
|
+
return et(["code", "state", "kingdee_token", "redirect_url"]), window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t)), H();
|
|
1971
1971
|
tt = e, et(["code", "state", "kingdee_token", "redirect_url"]);
|
|
1972
1972
|
let o = {};
|
|
1973
1973
|
const s = {
|
|
1974
1974
|
grant_type: "authorization_code",
|
|
1975
1975
|
code: e,
|
|
1976
|
-
client_id:
|
|
1977
|
-
client_secret:
|
|
1978
|
-
redirect_uri: r ? nt(
|
|
1976
|
+
client_id: M.client_id,
|
|
1977
|
+
client_secret: M.client_secret,
|
|
1978
|
+
redirect_uri: r ? nt(q, { loginType: r }) : q,
|
|
1979
1979
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
1980
1980
|
nonce: Ut()
|
|
1981
1981
|
};
|
|
1982
1982
|
n && (sessionStorage.setItem("kingdee_token", n), s.redirect_uri = `${s.redirect_uri}?kingdee_token=${n}`);
|
|
1983
1983
|
try {
|
|
1984
|
-
await b.create().get(
|
|
1984
|
+
await b.create().get(D.token, { baseURL: Ye });
|
|
1985
1985
|
} catch {
|
|
1986
1986
|
}
|
|
1987
1987
|
try {
|
|
1988
1988
|
o = await b.create().post(
|
|
1989
|
-
|
|
1989
|
+
D.token,
|
|
1990
1990
|
{},
|
|
1991
1991
|
{
|
|
1992
1992
|
baseURL: Ye,
|
|
@@ -2003,38 +2003,37 @@ const jr = async () => {
|
|
|
2003
2003
|
refreshToken: f,
|
|
2004
2004
|
info: o.data
|
|
2005
2005
|
};
|
|
2006
|
-
|
|
2006
|
+
z().save(u), await rt(i);
|
|
2007
2007
|
const d = Number(l) - (/* @__PURE__ */ new Date()).getTime();
|
|
2008
2008
|
return d && d > 0 && (Ft(d), d && localStorage.setItem("idelTime", d.toString())), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), i;
|
|
2009
2009
|
} catch {
|
|
2010
|
-
return
|
|
2010
|
+
return le({ ...M, redirect_uri: q });
|
|
2011
2011
|
}
|
|
2012
|
-
},
|
|
2012
|
+
}, j = te(!1), mo = async (e) => {
|
|
2013
2013
|
if (e.public) return "";
|
|
2014
|
-
if (Nt.value)
|
|
2015
|
-
|
|
2016
|
-
|
|
2014
|
+
if (Nt.value)
|
|
2015
|
+
return le({ ...M, redirect_uri: q });
|
|
2016
|
+
if (j.value)
|
|
2017
|
+
return await new Promise(async (r) => {
|
|
2017
2018
|
Ae(
|
|
2018
|
-
() =>
|
|
2019
|
-
(
|
|
2020
|
-
if (!
|
|
2021
|
-
const
|
|
2022
|
-
|
|
2019
|
+
() => j.value,
|
|
2020
|
+
(o) => {
|
|
2021
|
+
if (!o) {
|
|
2022
|
+
const s = H();
|
|
2023
|
+
r(s);
|
|
2023
2024
|
}
|
|
2024
2025
|
}
|
|
2025
2026
|
);
|
|
2026
2027
|
});
|
|
2027
|
-
const { accessTokenExpiredAt: t } =
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
let r = D();
|
|
2031
|
-
H.value = !0;
|
|
2028
|
+
const { accessTokenExpiredAt: t } = z().getData();
|
|
2029
|
+
let n = H();
|
|
2030
|
+
j.value = !0;
|
|
2032
2031
|
try {
|
|
2033
|
-
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (
|
|
2032
|
+
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (n = await Hr(M)), n = await jr(), j.value = !1;
|
|
2034
2033
|
} catch {
|
|
2035
|
-
|
|
2034
|
+
j.value = !1;
|
|
2036
2035
|
}
|
|
2037
|
-
return
|
|
2036
|
+
return n;
|
|
2038
2037
|
}, qr = () => {
|
|
2039
2038
|
let e = !1;
|
|
2040
2039
|
return localStorage.getItem("thirdLogouSource") === "zhongshen" && (e = !0), e;
|
|
@@ -2045,7 +2044,7 @@ const jr = async () => {
|
|
|
2045
2044
|
}
|
|
2046
2045
|
};
|
|
2047
2046
|
let me = !1;
|
|
2048
|
-
const
|
|
2047
|
+
const le = (e) => {
|
|
2049
2048
|
if (!Br && !me) {
|
|
2050
2049
|
me = !0;
|
|
2051
2050
|
try {
|
|
@@ -2058,12 +2057,12 @@ const J = (e) => {
|
|
|
2058
2057
|
Object.entries(t).forEach(([f, l]) => {
|
|
2059
2058
|
f !== "client_secret" && s.set(f, String(l));
|
|
2060
2059
|
});
|
|
2061
|
-
const i = s.toString(), c = `${r}${
|
|
2062
|
-
if (localStorage.removeItem("idelTime"), sessionStorage.clear(),
|
|
2060
|
+
const i = s.toString(), c = `${r}${D.oauth}?${i}`;
|
|
2061
|
+
if (localStorage.removeItem("idelTime"), sessionStorage.clear(), z().remove(), qr())
|
|
2063
2062
|
Mr(c);
|
|
2064
2063
|
else {
|
|
2065
2064
|
try {
|
|
2066
|
-
b.create().get(
|
|
2065
|
+
b.create().get(D.logoutCurpage, { baseURL: r });
|
|
2067
2066
|
} catch {
|
|
2068
2067
|
}
|
|
2069
2068
|
window.__isAutoCloseApp = !1, location.replace(c);
|
|
@@ -2073,16 +2072,16 @@ const J = (e) => {
|
|
|
2073
2072
|
}
|
|
2074
2073
|
}
|
|
2075
2074
|
};
|
|
2076
|
-
Ir(
|
|
2075
|
+
Ir(le);
|
|
2077
2076
|
const Hr = async (e) => {
|
|
2078
|
-
const { baseURL: t } = _e(), { refreshToken: n } =
|
|
2077
|
+
const { baseURL: t } = _e(), { refreshToken: n } = z().getData();
|
|
2079
2078
|
try {
|
|
2080
|
-
await b.create().get(
|
|
2079
|
+
await b.create().get(D.token, { baseURL: t });
|
|
2081
2080
|
} catch {
|
|
2082
2081
|
}
|
|
2083
2082
|
try {
|
|
2084
2083
|
const r = await b.create().post(
|
|
2085
|
-
|
|
2084
|
+
D.token,
|
|
2086
2085
|
{},
|
|
2087
2086
|
{
|
|
2088
2087
|
baseURL: t,
|
|
@@ -2101,13 +2100,13 @@ const Hr = async (e) => {
|
|
|
2101
2100
|
refreshToken: i,
|
|
2102
2101
|
info: r.data
|
|
2103
2102
|
};
|
|
2104
|
-
return
|
|
2103
|
+
return z().save(c), await rt(o), o;
|
|
2105
2104
|
} catch {
|
|
2106
|
-
return
|
|
2105
|
+
return le({ ...e, redirect_uri: q });
|
|
2107
2106
|
}
|
|
2108
|
-
},
|
|
2107
|
+
}, z = () => ({
|
|
2109
2108
|
getData: () => ({
|
|
2110
|
-
accessToken:
|
|
2109
|
+
accessToken: H(),
|
|
2111
2110
|
accessTokenExpiredAt: fe("accessTokenExpiredAt") ? Number(fe("accessTokenExpiredAt")) : "",
|
|
2112
2111
|
refreshToken: fe("refreshToken")
|
|
2113
2112
|
}),
|
|
@@ -2122,11 +2121,11 @@ const Hr = async (e) => {
|
|
|
2122
2121
|
}
|
|
2123
2122
|
});
|
|
2124
2123
|
export {
|
|
2125
|
-
|
|
2124
|
+
G as getQuery,
|
|
2126
2125
|
mo as getToken,
|
|
2127
2126
|
jr as getTokenFromCode,
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2127
|
+
M as getTokenParams,
|
|
2128
|
+
le as login,
|
|
2129
|
+
q as real_uri,
|
|
2130
|
+
z as tokenStorage
|
|
2132
2131
|
};
|