@das-fed/utils 7.0.7-hot.25 → 7.0.7-hot.27

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.
Files changed (32) hide show
  1. package/api-services/modules/authentication/index.js +743 -725
  2. package/api-services/modules/authentication/index.js.gz +0 -0
  3. package/api-services/modules/bems/index.js +728 -746
  4. package/api-services/modules/bems/index.js.gz +0 -0
  5. package/api-services/modules/contract/index.js +725 -743
  6. package/api-services/modules/contract/index.js.gz +0 -0
  7. package/api-services/modules/enterpriseright/index.js +725 -743
  8. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  9. package/api-services/modules/gateway-edge/index.js +743 -725
  10. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  11. package/api-services/modules/iot/index.js +724 -706
  12. package/api-services/modules/iot/index.js.gz +0 -0
  13. package/api-services/modules/justauth/index.js +744 -726
  14. package/api-services/modules/justauth/index.js.gz +0 -0
  15. package/api-services/modules/knowledge/index.js +743 -725
  16. package/api-services/modules/knowledge/index.js.gz +0 -0
  17. package/api-services/modules/platformManage/index.js +752 -734
  18. package/api-services/modules/platformManage/index.js.gz +0 -0
  19. package/api-services/modules/space-manage/index.js +725 -743
  20. package/api-services/modules/space-manage/index.js.gz +0 -0
  21. package/api-services/modules/supplier/index.js +727 -745
  22. package/api-services/modules/supplier/index.js.gz +0 -0
  23. package/api-services/modules/systemConfiguration/index.js +743 -725
  24. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  25. package/api-services/src/create-service/index.js +699 -717
  26. package/api-services/src/create-service/index.js.gz +0 -0
  27. package/create-api-service/sso/index.js +111 -112
  28. package/create-api-service/sso/index.js.gz +0 -0
  29. package/create-api-service/sso/utils.d.ts +0 -1
  30. package/package.json +4 -4
  31. package/token-tools/index.js +80 -9
  32. package/token-tools/index.js.gz +0 -0
@@ -1,32 +1,32 @@
1
- import { unref as Lt, getCurrentScope as Ft, onScopeDispose as Dt, ref as Y, watch as Se } from "vue";
2
- import { encryption as vt } from "@das-fed/utils/atob";
1
+ import { unref as Ft, getCurrentScope as Dt, onScopeDispose as vt, ref as Y, watch as Se } from "vue";
2
+ import { encryption as It } from "@das-fed/utils/atob";
3
3
  import { getConfig as Oe } from "@das-fed/utils/config";
4
- import { getAccessToken as H, removeAccessToken as It, setAccessToken as Bt, getAccessTokenInfo as le } from "@das-fed/utils/token-tools";
5
- import { appendQueryParams as jt } from "@das-fed/utils/common-tools";
4
+ import { getAccessToken as H, removeAccessToken as Bt, setAccessToken as jt, getAccessTokenInfo as le } from "@das-fed/utils/token-tools";
5
+ import { appendQueryParams as nt } from "@das-fed/utils/common-tools";
6
6
  import { removeProcessEngineToken as qt, setProcessEngineToken as Ht } from "@das-fed/utils/process-engine-info";
7
- import { setPersonalInfo as nt } from "@das-fed/utils/common-info/set-personal-info";
8
- function rt(e, t) {
7
+ import { setPersonalInfo as rt } from "@das-fed/utils/common-info/set-personal-info";
8
+ function st(e, t) {
9
9
  return function() {
10
10
  return e.apply(t, arguments);
11
11
  };
12
12
  }
13
- const { toString: Mt } = Object.prototype, { getPrototypeOf: Ae } = Object, { iterator: se, toStringTag: st } = Symbol, oe = /* @__PURE__ */ ((e) => (t) => {
13
+ const { toString: Mt } = Object.prototype, { getPrototypeOf: Ae } = Object, { iterator: se, toStringTag: ot } = Symbol, oe = /* @__PURE__ */ ((e) => (t) => {
14
14
  const n = Mt.call(t);
15
15
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
16
16
  })(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) => oe(t) === e), ie = (e) => (t) => typeof t === e, { isArray: B } = Array, M = ie("undefined");
17
17
  function z(e) {
18
18
  return e !== null && !M(e) && e.constructor !== null && !M(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
19
19
  }
20
- const ot = C("ArrayBuffer");
20
+ const it = C("ArrayBuffer");
21
21
  function zt(e) {
22
22
  let t;
23
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ot(e.buffer), t;
23
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && it(e.buffer), t;
24
24
  }
25
- const $t = ie("string"), A = ie("function"), it = ie("number"), $ = (e) => e !== null && typeof e == "object", Jt = (e) => e === !0 || e === !1, X = (e) => {
25
+ const $t = ie("string"), A = ie("function"), at = ie("number"), $ = (e) => e !== null && typeof e == "object", Jt = (e) => e === !0 || e === !1, X = (e) => {
26
26
  if (oe(e) !== "object")
27
27
  return !1;
28
28
  const t = Ae(e);
29
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(st in e) && !(se in e);
29
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ot in e) && !(se in e);
30
30
  }, Vt = (e) => {
31
31
  if (!$(e) || z(e))
32
32
  return !1;
@@ -56,7 +56,7 @@ function J(e, t, { allOwnKeys: n = !1 } = {}) {
56
56
  a = o[r], t.call(null, e[a], a, e);
57
57
  }
58
58
  }
59
- function at(e, t) {
59
+ function ct(e, t) {
60
60
  if (z(e))
61
61
  return null;
62
62
  t = t.toLowerCase();
@@ -67,10 +67,10 @@ function at(e, t) {
67
67
  return s;
68
68
  return null;
69
69
  }
70
- const F = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ct = (e) => !M(e) && e !== F;
70
+ const F = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ut = (e) => !M(e) && e !== F;
71
71
  function he() {
72
- const { caseless: e } = ct(this) && this || {}, t = {}, n = (r, s) => {
73
- const o = e && at(t, s) || s;
72
+ const { caseless: e } = ut(this) && this || {}, t = {}, n = (r, s) => {
73
+ const o = e && ct(t, s) || s;
74
74
  X(t[o]) && X(r) ? t[o] = he(t[o], r) : X(r) ? t[o] = he({}, r) : B(r) ? t[o] = r.slice() : t[o] = r;
75
75
  };
76
76
  for (let r = 0, s = arguments.length; r < s; r++)
@@ -78,7 +78,7 @@ function he() {
78
78
  return t;
79
79
  }
80
80
  const on = (e, t, n, { allOwnKeys: r } = {}) => (J(t, (s, o) => {
81
- n && A(s) ? e[o] = rt(s, n) : e[o] = s;
81
+ n && A(s) ? e[o] = st(s, n) : e[o] = s;
82
82
  }, { allOwnKeys: r }), e), an = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), cn = (e, t, n, r) => {
83
83
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
84
84
  value: t.prototype
@@ -101,7 +101,7 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (J(t, (s, o) => {
101
101
  if (!e) return null;
102
102
  if (B(e)) return e;
103
103
  let t = e.length;
104
- if (!it(t)) return null;
104
+ if (!at(t)) return null;
105
105
  const n = new Array(t);
106
106
  for (; t-- > 0; )
107
107
  n[t] = e[t];
@@ -124,14 +124,14 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (J(t, (s, o) => {
124
124
  function(n, r, s) {
125
125
  return r.toUpperCase() + s;
126
126
  }
127
- ), Pe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), yn = C("RegExp"), ut = (e, t) => {
127
+ ), Pe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), yn = C("RegExp"), lt = (e, t) => {
128
128
  const n = Object.getOwnPropertyDescriptors(e), r = {};
129
129
  J(n, (s, o) => {
130
130
  let i;
131
131
  (i = t(s, o, e)) !== !1 && (r[o] = i || s);
132
132
  }), Object.defineProperties(e, r);
133
133
  }, gn = (e) => {
134
- ut(e, (t, n) => {
134
+ lt(e, (t, n) => {
135
135
  if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
136
136
  return !1;
137
137
  const r = e[n];
@@ -155,7 +155,7 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (J(t, (s, o) => {
155
155
  }, En = () => {
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[se]);
158
+ return !!(e && A(e.append) && e[ot] === "FormData" && e[se]);
159
159
  }
160
160
  const Sn = (e) => {
161
161
  const t = new Array(10), n = (r, s) => {
@@ -176,21 +176,21 @@ const Sn = (e) => {
176
176
  return r;
177
177
  };
178
178
  return n(e, 0);
179
- }, On = C("AsyncFunction"), An = (e) => e && ($(e) || A(e)) && A(e.then) && A(e.catch), lt = ((e, t) => e ? setImmediate : t ? ((n, r) => (F.addEventListener("message", ({ source: s, data: o }) => {
179
+ }, On = C("AsyncFunction"), An = (e) => e && ($(e) || A(e)) && A(e.then) && A(e.catch), ft = ((e, t) => e ? setImmediate : t ? ((n, r) => (F.addEventListener("message", ({ source: s, data: o }) => {
180
180
  s === F && o === n && r.length && r.shift()();
181
181
  }, !1), (s) => {
182
182
  r.push(s), F.postMessage(n, "*");
183
183
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
184
184
  typeof setImmediate == "function",
185
185
  A(F.postMessage)
186
- ), _n = typeof queueMicrotask < "u" ? queueMicrotask.bind(F) : typeof process < "u" && process.nextTick || lt, Cn = (e) => e != null && A(e[se]), c = {
186
+ ), _n = typeof queueMicrotask < "u" ? queueMicrotask.bind(F) : typeof process < "u" && process.nextTick || ft, Cn = (e) => e != null && A(e[se]), c = {
187
187
  isArray: B,
188
- isArrayBuffer: ot,
188
+ isArrayBuffer: it,
189
189
  isBuffer: z,
190
190
  isFormData: Zt,
191
191
  isArrayBufferView: zt,
192
192
  isString: $t,
193
- isNumber: it,
193
+ isNumber: at,
194
194
  isBoolean: Jt,
195
195
  isObject: $,
196
196
  isPlainObject: X,
@@ -226,20 +226,20 @@ const Sn = (e) => {
226
226
  hasOwnProperty: Pe,
227
227
  hasOwnProp: Pe,
228
228
  // an alias to avoid ESLint no-prototype-builtins detection
229
- reduceDescriptors: ut,
229
+ reduceDescriptors: lt,
230
230
  freezeMethods: gn,
231
231
  toObjectSet: bn,
232
232
  toCamelCase: wn,
233
233
  noop: En,
234
234
  toFiniteNumber: Rn,
235
- findKey: at,
235
+ findKey: ct,
236
236
  global: F,
237
- isContextDefined: ct,
237
+ isContextDefined: ut,
238
238
  isSpecCompliantForm: Tn,
239
239
  toJSONObject: Sn,
240
240
  isAsyncFn: On,
241
241
  isThenable: An,
242
- setImmediate: lt,
242
+ setImmediate: ft,
243
243
  asap: _n,
244
244
  isIterable: Cn
245
245
  };
@@ -267,7 +267,7 @@ c.inherits(y, Error, {
267
267
  };
268
268
  }
269
269
  });
270
- const ft = y.prototype, dt = {};
270
+ const dt = y.prototype, pt = {};
271
271
  [
272
272
  "ERR_BAD_OPTION_VALUE",
273
273
  "ERR_BAD_OPTION",
@@ -283,12 +283,12 @@ const ft = y.prototype, dt = {};
283
283
  "ERR_INVALID_URL"
284
284
  // eslint-disable-next-line func-names
285
285
  ].forEach((e) => {
286
- dt[e] = { value: e };
286
+ pt[e] = { value: e };
287
287
  });
288
- Object.defineProperties(y, dt);
289
- Object.defineProperty(ft, "isAxiosError", { value: !0 });
288
+ Object.defineProperties(y, pt);
289
+ Object.defineProperty(dt, "isAxiosError", { value: !0 });
290
290
  y.from = (e, t, n, r, s, o) => {
291
- const i = Object.create(ft);
291
+ const i = Object.create(dt);
292
292
  return c.toFlatObject(e, i, function(f) {
293
293
  return f !== Error.prototype;
294
294
  }, (a) => a !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
@@ -297,12 +297,12 @@ const kn = null;
297
297
  function me(e) {
298
298
  return c.isPlainObject(e) || c.isArray(e);
299
299
  }
300
- function pt(e) {
300
+ function ht(e) {
301
301
  return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
302
302
  }
303
303
  function Ne(e, t, n) {
304
304
  return e ? e.concat(t).map(function(s, o) {
305
- return s = pt(s), !n && o ? "[" + s + "]" : s;
305
+ return s = ht(s), !n && o ? "[" + s + "]" : s;
306
306
  }).join(n ? "." : "") : t;
307
307
  }
308
308
  function xn(e) {
@@ -340,7 +340,7 @@ function ae(e, t, n) {
340
340
  if (c.endsWith(w, "{}"))
341
341
  w = r ? w : w.slice(0, -2), p = JSON.stringify(p);
342
342
  else if (c.isArray(p) && xn(p) || (c.isFileList(p) || c.endsWith(w, "[]")) && (E = c.toArray(p)))
343
- return w = pt(w), E.forEach(function(T, x) {
343
+ return w = ht(w), E.forEach(function(T, x) {
344
344
  !(c.isUndefined(T) || T === null) && t.append(
345
345
  // eslint-disable-next-line no-nested-ternary
346
346
  i === !0 ? Ne([w], x, o) : i === null ? w : w + "[]",
@@ -391,11 +391,11 @@ function Ue(e) {
391
391
  function _e(e, t) {
392
392
  this._pairs = [], e && ae(e, this, t);
393
393
  }
394
- const ht = _e.prototype;
395
- ht.append = function(t, n) {
394
+ const mt = _e.prototype;
395
+ mt.append = function(t, n) {
396
396
  this._pairs.push([t, n]);
397
397
  };
398
- ht.toString = function(t) {
398
+ mt.toString = function(t) {
399
399
  const n = t ? function(r) {
400
400
  return t.call(this, r, Ue);
401
401
  } : Ue;
@@ -406,7 +406,7 @@ ht.toString = function(t) {
406
406
  function Nn(e) {
407
407
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
408
408
  }
409
- function mt(e, t, n) {
409
+ function wt(e, t, n) {
410
410
  if (!t)
411
411
  return e;
412
412
  const r = n && n.encode || Nn;
@@ -475,7 +475,7 @@ class Le {
475
475
  });
476
476
  }
477
477
  }
478
- const wt = {
478
+ const yt = {
479
479
  silentJSONParsing: !0,
480
480
  forcedJSONParsing: !0,
481
481
  clarifyTimeoutError: !1
@@ -519,7 +519,7 @@ function Mn(e) {
519
519
  o = n[r], t[o] = e[o];
520
520
  return t;
521
521
  }
522
- function yt(e) {
522
+ function gt(e) {
523
523
  function t(n, r, s, o) {
524
524
  let i = n[o++];
525
525
  if (i === "__proto__") return !0;
@@ -545,12 +545,12 @@ function zn(e, t, n) {
545
545
  return (n || JSON.stringify)(e);
546
546
  }
547
547
  const V = {
548
- transitional: wt,
548
+ transitional: yt,
549
549
  adapter: ["xhr", "http", "fetch"],
550
550
  transformRequest: [function(t, n) {
551
551
  const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = c.isObject(t);
552
552
  if (o && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
553
- return s ? JSON.stringify(yt(t)) : t;
553
+ return s ? JSON.stringify(gt(t)) : t;
554
554
  if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
555
555
  return t;
556
556
  if (c.isArrayBufferView(t))
@@ -821,7 +821,7 @@ function de(e, t) {
821
821
  o = a.call(n, o, s.normalize(), t ? t.status : void 0);
822
822
  }), s.normalize(), o;
823
823
  }
824
- function gt(e) {
824
+ function bt(e) {
825
825
  return !!(e && e.__CANCEL__);
826
826
  }
827
827
  function j(e, t, n) {
@@ -830,7 +830,7 @@ function j(e, t, n) {
830
830
  c.inherits(j, y, {
831
831
  __CANCEL__: !0
832
832
  });
833
- function bt(e, t, n) {
833
+ function Et(e, t, n) {
834
834
  const r = n.config.validateStatus;
835
835
  !n.status || !r || r(n.status) ? e(n) : t(new y(
836
836
  "Request failed with status code " + n.status,
@@ -934,7 +934,7 @@ function tr(e) {
934
934
  function nr(e, t) {
935
935
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
936
936
  }
937
- function Et(e, t, n) {
937
+ function Rt(e, t, n) {
938
938
  let r = !tr(t);
939
939
  return e && (r || n == !1) ? nr(e, t) : t;
940
940
  }
@@ -1003,10 +1003,10 @@ function v(e, t) {
1003
1003
  c.isUndefined(m) && d !== a || (n[u] = m);
1004
1004
  }), n;
1005
1005
  }
1006
- const Rt = (e) => {
1006
+ const Tt = (e) => {
1007
1007
  const t = v({}, e);
1008
1008
  let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: a } = t;
1009
- t.headers = i = _.from(i), t.url = mt(Et(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
1009
+ t.headers = i = _.from(i), t.url = wt(Rt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
1010
1010
  "Authorization",
1011
1011
  "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
1012
1012
  );
@@ -1026,7 +1026,7 @@ const Rt = (e) => {
1026
1026
  return t;
1027
1027
  }, rr = typeof XMLHttpRequest < "u", sr = rr && function(e) {
1028
1028
  return new Promise(function(n, r) {
1029
- const s = Rt(e);
1029
+ const s = Tt(e);
1030
1030
  let o = s.data;
1031
1031
  const i = _.from(s.headers).normalize();
1032
1032
  let { responseType: a, onUploadProgress: f, onDownloadProgress: l } = s, u, d, m, g, p;
@@ -1048,7 +1048,7 @@ const Rt = (e) => {
1048
1048
  config: e,
1049
1049
  request: h
1050
1050
  };
1051
- bt(function(L) {
1051
+ Et(function(L) {
1052
1052
  n(L), w();
1053
1053
  }, function(L) {
1054
1054
  r(L), w();
@@ -1062,7 +1062,7 @@ const Rt = (e) => {
1062
1062
  r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
1063
1063
  }, h.ontimeout = function() {
1064
1064
  let x = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1065
- const O = s.transitional || wt;
1065
+ const O = s.transitional || yt;
1066
1066
  s.timeoutErrorMessage && (x = s.timeoutErrorMessage), r(new y(
1067
1067
  x,
1068
1068
  O.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
@@ -1161,13 +1161,13 @@ const Rt = (e) => {
1161
1161
  }, {
1162
1162
  highWaterMark: 2
1163
1163
  });
1164
- }, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Tt = ce && typeof ReadableStream == "function", ur = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), St = (e, ...t) => {
1164
+ }, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", St = ce && typeof ReadableStream == "function", ur = 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 {
1168
1168
  return !1;
1169
1169
  }
1170
- }, lr = Tt && St(() => {
1170
+ }, lr = St && Ot(() => {
1171
1171
  let e = !1;
1172
1172
  const t = new Request(S.origin, {
1173
1173
  body: new ReadableStream(),
@@ -1177,7 +1177,7 @@ const Rt = (e) => {
1177
1177
  }
1178
1178
  }).headers.has("Content-Type");
1179
1179
  return e && !t;
1180
- }), je = 64 * 1024, ye = Tt && St(() => c.isReadableStream(new Response("").body)), te = {
1180
+ }), je = 64 * 1024, ye = St && Ot(() => c.isReadableStream(new Response("").body)), te = {
1181
1181
  stream: ye && ((e) => e.body)
1182
1182
  };
1183
1183
  ce && ((e) => {
@@ -1218,7 +1218,7 @@ const fr = async (e) => {
1218
1218
  headers: u,
1219
1219
  withCredentials: d = "same-origin",
1220
1220
  fetchOptions: m
1221
- } = Rt(e);
1221
+ } = Tt(e);
1222
1222
  l = l ? (l + "").toLowerCase() : "text";
1223
1223
  let g = or([s, o && o.toAbortSignal()], i), p;
1224
1224
  const w = g && g.unsubscribe && (() => {
@@ -1231,8 +1231,8 @@ const fr = async (e) => {
1231
1231
  method: "POST",
1232
1232
  body: r,
1233
1233
  duplex: "half"
1234
- }), N;
1235
- if (c.isFormData(r) && (N = O.headers.get("content-type")) && u.setContentType(N), O.body) {
1234
+ }), P;
1235
+ if (c.isFormData(r) && (P = O.headers.get("content-type")) && u.setContentType(P), O.body) {
1236
1236
  const [L, W] = De(
1237
1237
  h,
1238
1238
  ee(ve(f))
@@ -1258,8 +1258,8 @@ const fr = async (e) => {
1258
1258
  ["status", "statusText", "headers"].forEach((xe) => {
1259
1259
  O[xe] = R[xe];
1260
1260
  });
1261
- const N = c.toFiniteNumber(R.headers.get("content-length")), [L, W] = a && De(
1262
- N,
1261
+ const P = c.toFiniteNumber(R.headers.get("content-length")), [L, W] = a && De(
1262
+ P,
1263
1263
  ee(ve(a), !0)
1264
1264
  ) || [];
1265
1265
  R = new Response(
@@ -1271,8 +1271,8 @@ const fr = async (e) => {
1271
1271
  }
1272
1272
  l = l || "text";
1273
1273
  let x = await te[c.findKey(te, l) || "text"](R, e);
1274
- return !T && w && w(), await new Promise((O, N) => {
1275
- bt(O, N, {
1274
+ return !T && w && w(), await new Promise((O, P) => {
1275
+ Et(O, P, {
1276
1276
  data: x,
1277
1277
  headers: _.from(R.headers),
1278
1278
  status: R.status,
@@ -1303,7 +1303,7 @@ c.forEach(ge, (e, t) => {
1303
1303
  Object.defineProperty(e, "adapterName", { value: t });
1304
1304
  }
1305
1305
  });
1306
- const qe = (e) => `- ${e}`, hr = (e) => c.isFunction(e) || e === null || e === !1, Ot = {
1306
+ const qe = (e) => `- ${e}`, hr = (e) => c.isFunction(e) || e === null || e === !1, At = {
1307
1307
  getAdapter: (e) => {
1308
1308
  e = c.isArray(e) ? e : [e];
1309
1309
  const { length: t } = e;
@@ -1342,21 +1342,21 @@ function He(e) {
1342
1342
  return pe(e), e.headers = _.from(e.headers), e.data = de.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), Ot.getAdapter(e.adapter || V.adapter)(e).then(function(r) {
1345
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), At.getAdapter(e.adapter || V.adapter)(e).then(function(r) {
1346
1346
  return pe(e), r.data = de.call(
1347
1347
  e,
1348
1348
  e.transformResponse,
1349
1349
  r
1350
1350
  ), r.headers = _.from(r.headers), r;
1351
1351
  }, function(r) {
1352
- return gt(r) || (pe(e), r && r.response && (r.response.data = de.call(
1352
+ return bt(r) || (pe(e), r && r.response && (r.response.data = de.call(
1353
1353
  e,
1354
1354
  e.transformResponse,
1355
1355
  r.response
1356
1356
  ), r.response.headers = _.from(r.response.headers))), Promise.reject(r);
1357
1357
  });
1358
1358
  }
1359
- const At = "1.11.0", ue = {};
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;
@@ -1365,7 +1365,7 @@ const At = "1.11.0", ue = {};
1365
1365
  const Me = {};
1366
1366
  ue.transitional = function(t, n, r) {
1367
1367
  function s(o, i) {
1368
- return "[Axios v" + At + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1368
+ return "[Axios v" + _t + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1369
1369
  }
1370
1370
  return (o, i, a) => {
1371
1371
  if (t === !1)
@@ -1501,8 +1501,8 @@ let D = class {
1501
1501
  }
1502
1502
  getUri(t) {
1503
1503
  t = v(this.defaults, t);
1504
- const n = Et(t.baseURL, t.url, t.allowAbsoluteUrls);
1505
- return mt(n, t.params, t.paramsSerializer);
1504
+ const n = Rt(t.baseURL, t.url, t.allowAbsoluteUrls);
1505
+ return wt(n, t.params, t.paramsSerializer);
1506
1506
  }
1507
1507
  };
1508
1508
  c.forEach(["delete", "get", "head", "options"], function(t) {
@@ -1529,7 +1529,7 @@ c.forEach(["post", "put", "patch"], function(t) {
1529
1529
  }
1530
1530
  D.prototype[t] = n(), D.prototype[t + "Form"] = n(!0);
1531
1531
  });
1532
- let wr = class _t {
1532
+ let wr = class Ct {
1533
1533
  constructor(t) {
1534
1534
  if (typeof t != "function")
1535
1535
  throw new TypeError("executor must be a function.");
@@ -1595,7 +1595,7 @@ let wr = class _t {
1595
1595
  static source() {
1596
1596
  let t;
1597
1597
  return {
1598
- token: new _t(function(s) {
1598
+ token: new Ct(function(s) {
1599
1599
  t = s;
1600
1600
  }),
1601
1601
  cancel: t
@@ -1678,18 +1678,18 @@ const be = {
1678
1678
  Object.entries(be).forEach(([e, t]) => {
1679
1679
  be[t] = e;
1680
1680
  });
1681
- function Ct(e) {
1682
- const t = new D(e), n = rt(D.prototype.request, t);
1681
+ function kt(e) {
1682
+ const t = new D(e), n = st(D.prototype.request, t);
1683
1683
  return c.extend(n, D.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1684
- return Ct(v(e, s));
1684
+ return kt(v(e, s));
1685
1685
  }, n;
1686
1686
  }
1687
- const b = Ct(V);
1687
+ const b = kt(V);
1688
1688
  b.Axios = D;
1689
1689
  b.CanceledError = j;
1690
1690
  b.CancelToken = wr;
1691
- b.isCancel = gt;
1692
- b.VERSION = At;
1691
+ b.isCancel = bt;
1692
+ b.VERSION = _t;
1693
1693
  b.toFormData = ae;
1694
1694
  b.AxiosError = y;
1695
1695
  b.Cancel = b.CanceledError;
@@ -1700,8 +1700,8 @@ b.spread = yr;
1700
1700
  b.isAxiosError = gr;
1701
1701
  b.mergeConfig = v;
1702
1702
  b.AxiosHeaders = _;
1703
- b.formToJSON = (e) => yt(c.isHTMLForm(e) ? new FormData(e) : e);
1704
- b.getAdapter = Ot.getAdapter;
1703
+ b.formToJSON = (e) => gt(c.isHTMLForm(e) ? new FormData(e) : e);
1704
+ b.getAdapter = At.getAdapter;
1705
1705
  b.HttpStatusCode = be;
1706
1706
  b.default = b;
1707
1707
  const {
@@ -1793,11 +1793,11 @@ function Ee(e, t) {
1793
1793
  );
1794
1794
  }
1795
1795
  var Er = Ee(br, { path: "/" }), ze;
1796
- const kt = typeof window < "u", Rr = (e) => typeof e == "string", $e = () => +Date.now(), Re = () => {
1796
+ const xt = typeof window < "u", Rr = (e) => typeof e == "string", $e = () => +Date.now(), Re = () => {
1797
1797
  };
1798
- kt && ((ze = window == null ? void 0 : window.navigator) != null && ze.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
1798
+ xt && ((ze = window == null ? void 0 : window.navigator) != null && ze.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
1799
1799
  function ke(e) {
1800
- return typeof e == "function" ? e() : Lt(e);
1800
+ return typeof e == "function" ? e() : Ft(e);
1801
1801
  }
1802
1802
  function Tr(e, t) {
1803
1803
  function n(...r) {
@@ -1825,17 +1825,17 @@ function Or(e) {
1825
1825
  return e;
1826
1826
  }
1827
1827
  function Ar(e) {
1828
- return Ft() ? (Dt(e), !0) : !1;
1828
+ return Dt() ? (vt(e), !0) : !1;
1829
1829
  }
1830
1830
  function _r(e) {
1831
1831
  var t;
1832
1832
  const n = ke(e);
1833
1833
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
1834
1834
  }
1835
- const xt = kt ? window : void 0;
1835
+ const Pt = xt ? window : void 0;
1836
1836
  function Je(...e) {
1837
1837
  let t, n, r, s;
1838
- if (Rr(e[0]) || Array.isArray(e[0]) ? ([n, r, s] = e, t = xt) : [t, n, r, s] = e, !t)
1838
+ if (Rr(e[0]) || Array.isArray(e[0]) ? ([n, r, s] = e, t = Pt) : [t, n, r, s] = e, !t)
1839
1839
  return Re;
1840
1840
  Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
1841
1841
  const o = [], i = () => {
@@ -1855,7 +1855,7 @@ function xr(e = kr, t = {}) {
1855
1855
  initialState: n = !1,
1856
1856
  listenForVisibilityChange: r = !0,
1857
1857
  events: s = Cr,
1858
- window: o = xt,
1858
+ window: o = Pt,
1859
1859
  eventFilter: i = Sr(50)
1860
1860
  } = t, a = Y(n), f = Y($e());
1861
1861
  let l;
@@ -1918,7 +1918,7 @@ const Dr = (e) => {
1918
1918
  const { type: n, data: r } = t.data;
1919
1919
  });
1920
1920
  };
1921
- let Pt = (e = 21) => {
1921
+ let Nt = (e = 21) => {
1922
1922
  let t = "", n = crypto.getRandomValues(new Uint8Array(e));
1923
1923
  for (; e--; ) {
1924
1924
  let r = n[e] & 63;
@@ -1926,7 +1926,7 @@ let Pt = (e = 21) => {
1926
1926
  }
1927
1927
  return t;
1928
1928
  };
1929
- const P = (e) => new URL(location.href).searchParams.get(e), Te = (e) => {
1929
+ const N = (e) => new URL(location.href).searchParams.get(e), Te = (e) => {
1930
1930
  const t = new URL(window.location.href), n = new URLSearchParams(t.search);
1931
1931
  e.forEach((r) => {
1932
1932
  n.delete(r);
@@ -1937,7 +1937,7 @@ const P = (e) => new URL(location.href).searchParams.get(e), Te = (e) => {
1937
1937
  ssoParam: "/api/justauth/client/v1/visitor/sso-param"
1938
1938
  }
1939
1939
  }, vr = async () => {
1940
- const e = P("authorizer") || "", t = P("_redirect_url") || "";
1940
+ const e = N("authorizer") || "", t = N("_redirect_url") || "";
1941
1941
  if (Te(["authorizer", "_redirect_url"]), e === "feishu") {
1942
1942
  if (!window.tt) return "";
1943
1943
  const n = async () => {
@@ -1954,7 +1954,9 @@ const P = (e) => new URL(location.href).searchParams.get(e), Te = (e) => {
1954
1954
  const s = async (a) => {
1955
1955
  try {
1956
1956
  const f = Ze.feishu.login;
1957
- console.log("_redirect_url===", t), await b.create().get(f, { baseURL: Ge, params: { code: a, _redirect_url: t } }), console.log("login success"), r();
1957
+ console.log("_redirect_url===", t);
1958
+ const l = nt(t, { ignoreAuth: !0 }), d = (await b.create().get(f, { baseURL: Ge, params: { code: a, _redirect_url: l } })).request.responseURL;
1959
+ console.log(`login success:重定向== ${d}`), location.replace(d), r();
1958
1960
  } catch (f) {
1959
1961
  console.error("login fail", f), I({ ...U }), r();
1960
1962
  }
@@ -1968,7 +1970,7 @@ const P = (e) => new URL(location.href).searchParams.get(e), Te = (e) => {
1968
1970
  console.error("requestAuthCode success", a), s(f);
1969
1971
  },
1970
1972
  fail: (a) => {
1971
- console.error("requestAuthCode fail", a), I({ ...U }), r("");
1973
+ console.error("requestAuthCode fail", a), I({ ...U }), r();
1972
1974
  }
1973
1975
  });
1974
1976
  };
@@ -1981,12 +1983,11 @@ const P = (e) => new URL(location.href).searchParams.get(e), Te = (e) => {
1981
1983
  },
1982
1984
  fail: (a) => {
1983
1985
  const { errno: f } = a;
1984
- f === 103 ? i() : (console.error("requestAccess fail", a), I({ ...U }), r(""));
1986
+ f === 103 ? i() : (console.error("requestAccess fail", a), I({ ...U }), r());
1985
1987
  }
1986
1988
  })) : i();
1987
1989
  });
1988
1990
  }
1989
- return "";
1990
1991
  }, ne = {
1991
1992
  oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
1992
1993
  // 重定向到登录页
@@ -1998,24 +1999,22 @@ const P = (e) => new URL(location.href).searchParams.get(e), Te = (e) => {
1998
1999
  response_type: "code",
1999
2000
  scope: "sever",
2000
2001
  client_id: "sys",
2001
- client_secret: vt("das123"),
2002
+ client_secret: It("das123"),
2002
2003
  state: +/* @__PURE__ */ new Date()
2003
- }, Nt = Y(!1), Ut = (e) => {
2004
+ }, Ut = Y(!1), Lt = (e) => {
2004
2005
  if (e <= 0) return;
2005
2006
  const { idle: t } = xr(e);
2006
2007
  Se(
2007
2008
  () => t.value,
2008
2009
  (n) => {
2009
- n === !0 && (Nt.value = !0);
2010
+ n === !0 && (Ut.value = !0);
2010
2011
  }
2011
2012
  );
2012
2013
  };
2013
- localStorage.getItem("idelTime") && Ut(Number(localStorage.getItem("idelTime")));
2014
+ localStorage.getItem("idelTime") && Lt(Number(localStorage.getItem("idelTime")));
2014
2015
  let tt = "";
2015
2016
  const Ir = async () => {
2016
- const e = P("code") || "", t = P("redirect_url") || "/", n = P("kingdee_token") || "";
2017
- P("source");
2018
- const r = P("loginType") || "";
2017
+ const e = N("code") || "", t = N("redirect_url") || "/", n = N("kingdee_token") || "", r = N("loginType") || "";
2019
2018
  if (r && localStorage.setItem("loginType", r), !e) return H();
2020
2019
  const s = ["code", "state", "kingdee_token", "redirect_url", "source"];
2021
2020
  if (e === tt)
@@ -2027,9 +2026,9 @@ const Ir = async () => {
2027
2026
  code: e,
2028
2027
  client_id: U.client_id,
2029
2028
  client_secret: U.client_secret,
2030
- redirect_uri: r ? jt(et, { loginType: r }) : et,
2029
+ redirect_uri: r ? nt(et, { loginType: r }) : et,
2031
2030
  timestamp: (/* @__PURE__ */ new Date()).getTime(),
2032
- nonce: Pt()
2031
+ nonce: Nt()
2033
2032
  };
2034
2033
  n && (sessionStorage.setItem("kingdee_token", n), i.redirect_uri = `${i.redirect_uri}?kingdee_token=${n}`);
2035
2034
  try {
@@ -2055,15 +2054,15 @@ const Ir = async () => {
2055
2054
  refreshToken: l,
2056
2055
  info: o.data
2057
2056
  };
2058
- re().save(d), await nt(a);
2057
+ re().save(d), await rt(a);
2059
2058
  const m = Number(u) - (/* @__PURE__ */ new Date()).getTime();
2060
- return m && m > 0 && (Ut(m), m && localStorage.setItem("idelTime", m.toString())), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), a;
2059
+ return m && m > 0 && (Lt(m), m && localStorage.setItem("idelTime", m.toString())), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), a;
2061
2060
  } catch {
2062
2061
  return I({ ...U });
2063
2062
  }
2064
2063
  }, Q = Y(!1), fs = async (e) => {
2065
2064
  if (e.public) return "";
2066
- if (Nt.value)
2065
+ if (Ut.value)
2067
2066
  return I({ ...U });
2068
2067
  if (Q.value)
2069
2068
  return await new Promise(async (r) => {
@@ -2081,8 +2080,8 @@ const Ir = async () => {
2081
2080
  const { accessTokenExpiredAt: n } = re().getData();
2082
2081
  Q.value = !0;
2083
2082
  try {
2084
- const r = P("code") || "";
2085
- (P("authorizer") || "") === "feishu" ? await vr() : r ? t = await Ir() : typeof n == "number" && n > 0 && +/* @__PURE__ */ new Date() + 6e4 > n && (t = await Br(U));
2083
+ const r = N("code") || "";
2084
+ (N("authorizer") || "") === "feishu" ? await vr() : r ? t = await Ir() : typeof n == "number" && n > 0 && +/* @__PURE__ */ new Date() + 6e4 > n && (t = await Br(U));
2086
2085
  } catch {
2087
2086
  } finally {
2088
2087
  Q.value = !1;
@@ -2109,7 +2108,7 @@ const Br = async (e) => {
2109
2108
  client_id: e.client_id,
2110
2109
  client_secret: e.client_secret,
2111
2110
  timestamp: (/* @__PURE__ */ new Date()).getTime(),
2112
- nonce: Pt()
2111
+ nonce: Nt()
2113
2112
  }
2114
2113
  }
2115
2114
  ), { access_token: s = "", expires_in: o = 0, refresh_token: i = "" } = r.data, a = {
@@ -2118,7 +2117,7 @@ const Br = async (e) => {
2118
2117
  refreshToken: i,
2119
2118
  info: r.data
2120
2119
  };
2121
- return re().save(a), await nt(s), s;
2120
+ return re().save(a), await rt(s), s;
2122
2121
  } catch {
2123
2122
  return I({ ...e });
2124
2123
  }
@@ -2129,17 +2128,17 @@ const Br = async (e) => {
2129
2128
  refreshToken: le("refreshToken")
2130
2129
  }),
2131
2130
  save: (e) => {
2132
- Bt(e.accessToken ?? "", {
2131
+ jt(e.accessToken ?? "", {
2133
2132
  accessTokenExpiredAt: e.accessTokenExpiredAt,
2134
2133
  refreshToken: e.refreshToken
2135
2134
  }), Ht(e);
2136
2135
  },
2137
2136
  remove: () => {
2138
- It(), qt();
2137
+ Bt(), qt();
2139
2138
  }
2140
2139
  });
2141
2140
  export {
2142
- P as getQuery,
2141
+ N as getQuery,
2143
2142
  fs as getToken,
2144
2143
  Ir as getTokenFromCode,
2145
2144
  U as getTokenParams,