@das-fed/upf-utils 6.4.0-dev.231 → 6.4.0-dev.232

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 (123) hide show
  1. package/api-services/es5.js +2168 -2103
  2. package/api-services/index.js +1649 -1598
  3. package/api-services/index.js.gz +0 -0
  4. package/api-services/modules/app-manage/es5.js +2367 -2278
  5. package/api-services/modules/app-manage/index.js +1977 -1890
  6. package/api-services/modules/app-manage/index.js.gz +0 -0
  7. package/api-services/modules/authentication/es5.js +2398 -2330
  8. package/api-services/modules/authentication/index.js +1992 -1937
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/es5.js +2313 -2236
  11. package/api-services/modules/bems/index.js +1905 -1836
  12. package/api-services/modules/bems/index.js.gz +0 -0
  13. package/api-services/modules/contract/es5.js +2365 -2279
  14. package/api-services/modules/contract/index.js +1975 -1892
  15. package/api-services/modules/contract/index.js.gz +0 -0
  16. package/api-services/modules/duty-manage/es5.js +2305 -2228
  17. package/api-services/modules/duty-manage/index.js +1902 -1833
  18. package/api-services/modules/duty-manage/index.js.gz +0 -0
  19. package/api-services/modules/enterpriseright/es5.js +2300 -2223
  20. package/api-services/modules/enterpriseright/index.js +1898 -1829
  21. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  22. package/api-services/modules/es5.js +1998 -1921
  23. package/api-services/modules/file/es5.js +2045 -1968
  24. package/api-services/modules/file/index.js +1577 -1508
  25. package/api-services/modules/file/index.js.gz +0 -0
  26. package/api-services/modules/gateway-edge/es5.js +2398 -2330
  27. package/api-services/modules/gateway-edge/index.js +1992 -1937
  28. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  29. package/api-services/modules/index.js +1483 -1414
  30. package/api-services/modules/index.js.gz +0 -0
  31. package/api-services/modules/iot/es5.js +2264 -2199
  32. package/api-services/modules/iot/index.js +1865 -1814
  33. package/api-services/modules/iot/index.js.gz +0 -0
  34. package/api-services/modules/justauth/es5.js +2302 -2225
  35. package/api-services/modules/justauth/index.js +1899 -1830
  36. package/api-services/modules/justauth/index.js.gz +0 -0
  37. package/api-services/modules/knowledge/es5.js +2300 -2223
  38. package/api-services/modules/knowledge/index.js +1898 -1829
  39. package/api-services/modules/knowledge/index.js.gz +0 -0
  40. package/api-services/modules/link/es5.js +2398 -2330
  41. package/api-services/modules/link/index.js +1992 -1937
  42. package/api-services/modules/link/index.js.gz +0 -0
  43. package/api-services/modules/permission/es5.js +2365 -2279
  44. package/api-services/modules/permission/index.js +1975 -1892
  45. package/api-services/modules/permission/index.js.gz +0 -0
  46. package/api-services/modules/platformManage/es5.js +2319 -2242
  47. package/api-services/modules/platformManage/index.js +1909 -1840
  48. package/api-services/modules/platformManage/index.js.gz +0 -0
  49. package/api-services/modules/portal/es5.js +2239 -2174
  50. package/api-services/modules/portal/index.js +1848 -1797
  51. package/api-services/modules/portal/index.js.gz +0 -0
  52. package/api-services/modules/space-manage/es5.js +2239 -2174
  53. package/api-services/modules/space-manage/index.js +1848 -1797
  54. package/api-services/modules/space-manage/index.js.gz +0 -0
  55. package/api-services/modules/super-admin/es5.js +2376 -2290
  56. package/api-services/modules/super-admin/index.js +1977 -1894
  57. package/api-services/modules/super-admin/index.js.gz +0 -0
  58. package/api-services/modules/supplier/es5.js +2305 -2228
  59. package/api-services/modules/supplier/index.js +1900 -1831
  60. package/api-services/modules/supplier/index.js.gz +0 -0
  61. package/api-services/modules/supplychain-manage/es5.js +2398 -2330
  62. package/api-services/modules/supplychain-manage/index.js +1992 -1937
  63. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  64. package/api-services/modules/systemConfiguration/es5.js +2388 -2323
  65. package/api-services/modules/systemConfiguration/index.js +1984 -1933
  66. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  67. package/api-services/modules/tool/es5.js +2388 -2323
  68. package/api-services/modules/tool/index.js +1984 -1933
  69. package/api-services/modules/tool/index.js.gz +0 -0
  70. package/api-services/src/create-service/es5.js +2097 -2020
  71. package/api-services/src/create-service/index.js +1715 -1646
  72. package/api-services/src/create-service/index.js.gz +0 -0
  73. package/common-info/es5.js +2410 -2345
  74. package/common-info/getPermissionMethod/es5.js +2296 -2229
  75. package/common-info/getPermissionMethod/index.js +1905 -1850
  76. package/common-info/getPermissionMethod/index.js.gz +0 -0
  77. package/common-info/index.js +1954 -1903
  78. package/common-info/index.js.gz +0 -0
  79. package/common-info/set-personal-info/es5.js +1073 -997
  80. package/common-info/set-personal-info/index.js +895 -827
  81. package/common-info/set-personal-info/index.js.gz +0 -0
  82. package/common-tools/extract-file-name/es5.js +1074 -998
  83. package/common-tools/extract-file-name/index.js +889 -821
  84. package/common-tools/extract-file-name/index.js.gz +0 -0
  85. package/common-tools/handle-data/es5.js +1 -1
  86. package/common-tools/update-browser-title/es5.js +1 -1
  87. package/common-tools/update-fav-icon/es5.js +1 -1
  88. package/create-api-service/access-token-auto-refresh/es5.js +325 -0
  89. package/create-api-service/access-token-auto-refresh/index.d.ts +20 -0
  90. package/create-api-service/access-token-auto-refresh/index.js +182 -0
  91. package/create-api-service/access-token-auto-refresh/index.js.gz +0 -0
  92. package/create-api-service/check-token/es5.js +73 -2273
  93. package/create-api-service/check-token/index.d.ts +3 -8
  94. package/create-api-service/check-token/index.js +40 -1729
  95. package/create-api-service/check-token/index.js.gz +0 -0
  96. package/create-api-service/es5.js +2238 -2173
  97. package/create-api-service/index.js +1847 -1796
  98. package/create-api-service/index.js.gz +0 -0
  99. package/create-api-service/sso/es5.js +1242 -1166
  100. package/create-api-service/sso/index.js +1006 -938
  101. package/create-api-service/sso/index.js.gz +0 -0
  102. package/create-api-service/token-refresh-shared/es5.js +2403 -0
  103. package/create-api-service/token-refresh-shared/index.d.ts +30 -0
  104. package/create-api-service/token-refresh-shared/index.js +1820 -0
  105. package/create-api-service/token-refresh-shared/index.js.gz +0 -0
  106. package/curring-http/es5.js +1442 -1366
  107. package/curring-http/index.js +1132 -1064
  108. package/curring-http/index.js.gz +0 -0
  109. package/directive/clickOutside/es5.js +1 -1
  110. package/directive/hoverInside/es5.js +1 -1
  111. package/directive/utils/es5.js +1 -1
  112. package/esm-map.json +19 -1
  113. package/hooks/use-get-auth/es5.js +1 -1
  114. package/package.json +3 -3
  115. package/pinyin-first-character/es5.js +47 -45
  116. package/pinyin-first-character/index.js +37 -35
  117. package/pinyin-first-character/index.js.gz +0 -0
  118. package/style/es5.js +11 -11
  119. package/style/index.js +10 -10
  120. package/style/index.js.gz +0 -0
  121. package/token-tools/es5.js +85 -18
  122. package/token-tools/index.js +80 -8
  123. package/token-tools/index.js.gz +0 -0
@@ -0,0 +1,1820 @@
1
+ import { getConfig as wt } from "@das-fed/upf-utils/config";
2
+ function Ke(e, t) {
3
+ return function() {
4
+ return e.apply(t, arguments);
5
+ };
6
+ }
7
+ const { toString: Et } = Object.prototype, { getPrototypeOf: Re } = Object, { iterator: ie, toStringTag: Xe } = Symbol, ce = /* @__PURE__ */ ((e) => (t) => {
8
+ const n = Et.call(t);
9
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
10
+ })(/* @__PURE__ */ Object.create(null)), N = (e) => (e = e.toLowerCase(), (t) => ce(t) === e), ae = (e) => (t) => typeof t === e, { isArray: M } = Array, I = ae("undefined");
11
+ function v(e) {
12
+ return e !== null && !I(e) && e.constructor !== null && !I(e.constructor) && T(e.constructor.isBuffer) && e.constructor.isBuffer(e);
13
+ }
14
+ const Ge = N("ArrayBuffer");
15
+ function Rt(e) {
16
+ let t;
17
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ge(e.buffer), t;
18
+ }
19
+ const gt = ae("string"), T = ae("function"), Qe = ae("number"), K = (e) => e !== null && typeof e == "object", St = (e) => e === !0 || e === !1, ne = (e) => {
20
+ if (ce(e) !== "object")
21
+ return !1;
22
+ const t = Re(e);
23
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Xe in e) && !(ie in e);
24
+ }, Ot = (e) => {
25
+ if (!K(e) || v(e))
26
+ return !1;
27
+ try {
28
+ return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
29
+ } catch {
30
+ return !1;
31
+ }
32
+ }, Tt = N("Date"), At = N("File"), xt = N("Blob"), Ct = N("FileList"), Pt = (e) => K(e) && T(e.pipe), Nt = (e) => {
33
+ let t;
34
+ return e && (typeof FormData == "function" && e instanceof FormData || T(e.append) && ((t = ce(e)) === "formdata" || // detect form-data instance
35
+ t === "object" && T(e.toString) && e.toString() === "[object FormData]"));
36
+ }, _t = N("URLSearchParams"), [Ft, Ut, Lt, Bt] = ["ReadableStream", "Request", "Response", "Headers"].map(N), kt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
37
+ function X(e, t, { allOwnKeys: n = !1 } = {}) {
38
+ if (e === null || typeof e > "u")
39
+ return;
40
+ let r, s;
41
+ if (typeof e != "object" && (e = [e]), M(e))
42
+ for (r = 0, s = e.length; r < s; r++)
43
+ t.call(null, e[r], r, e);
44
+ else {
45
+ if (v(e))
46
+ return;
47
+ const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
48
+ let a;
49
+ for (r = 0; r < o; r++)
50
+ a = i[r], t.call(null, e[a], a, e);
51
+ }
52
+ }
53
+ function Ye(e, t) {
54
+ if (v(e))
55
+ return null;
56
+ t = t.toLowerCase();
57
+ const n = Object.keys(e);
58
+ let r = n.length, s;
59
+ for (; r-- > 0; )
60
+ if (s = n[r], t === s.toLowerCase())
61
+ return s;
62
+ return null;
63
+ }
64
+ const j = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ze = (e) => !I(e) && e !== j;
65
+ function ye() {
66
+ const { caseless: e, skipUndefined: t } = Ze(this) && this || {}, n = {}, r = (s, i) => {
67
+ const o = e && Ye(n, i) || i;
68
+ ne(n[o]) && ne(s) ? n[o] = ye(n[o], s) : ne(s) ? n[o] = ye({}, s) : M(s) ? n[o] = s.slice() : (!t || !I(s)) && (n[o] = s);
69
+ };
70
+ for (let s = 0, i = arguments.length; s < i; s++)
71
+ arguments[s] && X(arguments[s], r);
72
+ return n;
73
+ }
74
+ const jt = (e, t, n, { allOwnKeys: r } = {}) => (X(t, (s, i) => {
75
+ n && T(s) ? e[i] = Ke(s, n) : e[i] = s;
76
+ }, { allOwnKeys: r }), e), Dt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), qt = (e, t, n, r) => {
77
+ e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
78
+ value: t.prototype
79
+ }), n && Object.assign(e.prototype, n);
80
+ }, Ht = (e, t, n, r) => {
81
+ let s, i, o;
82
+ const a = {};
83
+ if (t = t || {}, e == null) return t;
84
+ do {
85
+ for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
86
+ o = s[i], (!r || r(o, e, t)) && !a[o] && (t[o] = e[o], a[o] = !0);
87
+ e = n !== !1 && Re(e);
88
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
89
+ return t;
90
+ }, It = (e, t, n) => {
91
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
92
+ const r = e.indexOf(t, n);
93
+ return r !== -1 && r === n;
94
+ }, Mt = (e) => {
95
+ if (!e) return null;
96
+ if (M(e)) return e;
97
+ let t = e.length;
98
+ if (!Qe(t)) return null;
99
+ const n = new Array(t);
100
+ for (; t-- > 0; )
101
+ n[t] = e[t];
102
+ return n;
103
+ }, zt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Re(Uint8Array)), $t = (e, t) => {
104
+ const r = (e && e[ie]).call(e);
105
+ let s;
106
+ for (; (s = r.next()) && !s.done; ) {
107
+ const i = s.value;
108
+ t.call(e, i[0], i[1]);
109
+ }
110
+ }, Jt = (e, t) => {
111
+ let n;
112
+ const r = [];
113
+ for (; (n = e.exec(t)) !== null; )
114
+ r.push(n);
115
+ return r;
116
+ }, Vt = N("HTMLFormElement"), Wt = (e) => e.toLowerCase().replace(
117
+ /[-_\s]([a-z\d])(\w*)/g,
118
+ function(n, r, s) {
119
+ return r.toUpperCase() + s;
120
+ }
121
+ ), Fe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), vt = N("RegExp"), et = (e, t) => {
122
+ const n = Object.getOwnPropertyDescriptors(e), r = {};
123
+ X(n, (s, i) => {
124
+ let o;
125
+ (o = t(s, i, e)) !== !1 && (r[i] = o || s);
126
+ }), Object.defineProperties(e, r);
127
+ }, Kt = (e) => {
128
+ et(e, (t, n) => {
129
+ if (T(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
130
+ return !1;
131
+ const r = e[n];
132
+ if (T(r)) {
133
+ if (t.enumerable = !1, "writable" in t) {
134
+ t.writable = !1;
135
+ return;
136
+ }
137
+ t.set || (t.set = () => {
138
+ throw Error("Can not rewrite read-only method '" + n + "'");
139
+ });
140
+ }
141
+ });
142
+ }, Xt = (e, t) => {
143
+ const n = {}, r = (s) => {
144
+ s.forEach((i) => {
145
+ n[i] = !0;
146
+ });
147
+ };
148
+ return M(e) ? r(e) : r(String(e).split(t)), n;
149
+ }, Gt = () => {
150
+ }, Qt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
151
+ function Yt(e) {
152
+ return !!(e && T(e.append) && e[Xe] === "FormData" && e[ie]);
153
+ }
154
+ const Zt = (e) => {
155
+ const t = new Array(10), n = (r, s) => {
156
+ if (K(r)) {
157
+ if (t.indexOf(r) >= 0)
158
+ return;
159
+ if (v(r))
160
+ return r;
161
+ if (!("toJSON" in r)) {
162
+ t[s] = r;
163
+ const i = M(r) ? [] : {};
164
+ return X(r, (o, a) => {
165
+ const d = n(o, s + 1);
166
+ !I(d) && (i[a] = d);
167
+ }), t[s] = void 0, i;
168
+ }
169
+ }
170
+ return r;
171
+ };
172
+ return n(e, 0);
173
+ }, en = N("AsyncFunction"), tn = (e) => e && (K(e) || T(e)) && T(e.then) && T(e.catch), tt = ((e, t) => e ? setImmediate : t ? ((n, r) => (j.addEventListener("message", ({ source: s, data: i }) => {
174
+ s === j && i === n && r.length && r.shift()();
175
+ }, !1), (s) => {
176
+ r.push(s), j.postMessage(n, "*");
177
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
178
+ typeof setImmediate == "function",
179
+ T(j.postMessage)
180
+ ), nn = typeof queueMicrotask < "u" ? queueMicrotask.bind(j) : typeof process < "u" && process.nextTick || tt, rn = (e) => e != null && T(e[ie]), c = {
181
+ isArray: M,
182
+ isArrayBuffer: Ge,
183
+ isBuffer: v,
184
+ isFormData: Nt,
185
+ isArrayBufferView: Rt,
186
+ isString: gt,
187
+ isNumber: Qe,
188
+ isBoolean: St,
189
+ isObject: K,
190
+ isPlainObject: ne,
191
+ isEmptyObject: Ot,
192
+ isReadableStream: Ft,
193
+ isRequest: Ut,
194
+ isResponse: Lt,
195
+ isHeaders: Bt,
196
+ isUndefined: I,
197
+ isDate: Tt,
198
+ isFile: At,
199
+ isBlob: xt,
200
+ isRegExp: vt,
201
+ isFunction: T,
202
+ isStream: Pt,
203
+ isURLSearchParams: _t,
204
+ isTypedArray: zt,
205
+ isFileList: Ct,
206
+ forEach: X,
207
+ merge: ye,
208
+ extend: jt,
209
+ trim: kt,
210
+ stripBOM: Dt,
211
+ inherits: qt,
212
+ toFlatObject: Ht,
213
+ kindOf: ce,
214
+ kindOfTest: N,
215
+ endsWith: It,
216
+ toArray: Mt,
217
+ forEachEntry: $t,
218
+ matchAll: Jt,
219
+ isHTMLForm: Vt,
220
+ hasOwnProperty: Fe,
221
+ hasOwnProp: Fe,
222
+ // an alias to avoid ESLint no-prototype-builtins detection
223
+ reduceDescriptors: et,
224
+ freezeMethods: Kt,
225
+ toObjectSet: Xt,
226
+ toCamelCase: Wt,
227
+ noop: Gt,
228
+ toFiniteNumber: Qt,
229
+ findKey: Ye,
230
+ global: j,
231
+ isContextDefined: Ze,
232
+ isSpecCompliantForm: Yt,
233
+ toJSONObject: Zt,
234
+ isAsyncFn: en,
235
+ isThenable: tn,
236
+ setImmediate: tt,
237
+ asap: nn,
238
+ isIterable: rn
239
+ };
240
+ function y(e, t, n, r, s) {
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);
242
+ }
243
+ c.inherits(y, Error, {
244
+ toJSON: function() {
245
+ return {
246
+ // Standard
247
+ message: this.message,
248
+ name: this.name,
249
+ // Microsoft
250
+ description: this.description,
251
+ number: this.number,
252
+ // Mozilla
253
+ fileName: this.fileName,
254
+ lineNumber: this.lineNumber,
255
+ columnNumber: this.columnNumber,
256
+ stack: this.stack,
257
+ // Axios
258
+ config: c.toJSONObject(this.config),
259
+ code: this.code,
260
+ status: this.status
261
+ };
262
+ }
263
+ });
264
+ const nt = y.prototype, rt = {};
265
+ [
266
+ "ERR_BAD_OPTION_VALUE",
267
+ "ERR_BAD_OPTION",
268
+ "ECONNABORTED",
269
+ "ETIMEDOUT",
270
+ "ERR_NETWORK",
271
+ "ERR_FR_TOO_MANY_REDIRECTS",
272
+ "ERR_DEPRECATED",
273
+ "ERR_BAD_RESPONSE",
274
+ "ERR_BAD_REQUEST",
275
+ "ERR_CANCELED",
276
+ "ERR_NOT_SUPPORT",
277
+ "ERR_INVALID_URL"
278
+ // eslint-disable-next-line func-names
279
+ ].forEach((e) => {
280
+ rt[e] = { value: e };
281
+ });
282
+ Object.defineProperties(y, rt);
283
+ Object.defineProperty(nt, "isAxiosError", { value: !0 });
284
+ y.from = (e, t, n, r, s, i) => {
285
+ const o = Object.create(nt);
286
+ c.toFlatObject(e, o, function(u) {
287
+ return u !== Error.prototype;
288
+ }, (f) => f !== "isAxiosError");
289
+ const a = e && e.message ? e.message : "Error", d = t == null && e ? e.code : t;
290
+ return y.call(o, a, d, n, r, s), e && o.cause == null && Object.defineProperty(o, "cause", { value: e, configurable: !0 }), o.name = e && e.name || "Error", i && Object.assign(o, i), o;
291
+ };
292
+ const sn = null;
293
+ function be(e) {
294
+ return c.isPlainObject(e) || c.isArray(e);
295
+ }
296
+ function st(e) {
297
+ return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
298
+ }
299
+ function Ue(e, t, n) {
300
+ return e ? e.concat(t).map(function(s, i) {
301
+ return s = st(s), !n && i ? "[" + s + "]" : s;
302
+ }).join(n ? "." : "") : t;
303
+ }
304
+ function on(e) {
305
+ return c.isArray(e) && !e.some(be);
306
+ }
307
+ const cn = c.toFlatObject(c, {}, null, function(t) {
308
+ return /^is[A-Z]/.test(t);
309
+ });
310
+ function ue(e, t, n) {
311
+ if (!c.isObject(e))
312
+ throw new TypeError("target must be an object");
313
+ t = t || new FormData(), n = c.toFlatObject(n, {
314
+ metaTokens: !0,
315
+ dots: !1,
316
+ indexes: !1
317
+ }, !1, function(m, p) {
318
+ return !c.isUndefined(p[m]);
319
+ });
320
+ const r = n.metaTokens, s = n.visitor || u, i = n.dots, o = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
321
+ if (!c.isFunction(s))
322
+ throw new TypeError("visitor must be a function");
323
+ function f(l) {
324
+ if (l === null) return "";
325
+ if (c.isDate(l))
326
+ return l.toISOString();
327
+ if (c.isBoolean(l))
328
+ return l.toString();
329
+ if (!d && c.isBlob(l))
330
+ throw new y("Blob is not supported. Use a Buffer instead.");
331
+ return c.isArrayBuffer(l) || c.isTypedArray(l) ? d && typeof Blob == "function" ? new Blob([l]) : Buffer.from(l) : l;
332
+ }
333
+ function u(l, m, p) {
334
+ let E = l;
335
+ if (l && !p && typeof l == "object") {
336
+ if (c.endsWith(m, "{}"))
337
+ m = r ? m : m.slice(0, -2), l = JSON.stringify(l);
338
+ else if (c.isArray(l) && on(l) || (c.isFileList(l) || c.endsWith(m, "[]")) && (E = c.toArray(l)))
339
+ return m = st(m), E.forEach(function(R, O) {
340
+ !(c.isUndefined(R) || R === null) && t.append(
341
+ // eslint-disable-next-line no-nested-ternary
342
+ o === !0 ? Ue([m], O, i) : o === null ? m : m + "[]",
343
+ f(R)
344
+ );
345
+ }), !1;
346
+ }
347
+ return be(l) ? !0 : (t.append(Ue(p, m, i), f(l)), !1);
348
+ }
349
+ const h = [], b = Object.assign(cn, {
350
+ defaultVisitor: u,
351
+ convertValue: f,
352
+ isVisitable: be
353
+ });
354
+ function g(l, m) {
355
+ if (!c.isUndefined(l)) {
356
+ if (h.indexOf(l) !== -1)
357
+ throw Error("Circular reference detected in " + m.join("."));
358
+ h.push(l), c.forEach(l, function(E, x) {
359
+ (!(c.isUndefined(E) || E === null) && s.call(
360
+ t,
361
+ E,
362
+ c.isString(x) ? x.trim() : x,
363
+ m,
364
+ b
365
+ )) === !0 && g(E, m ? m.concat(x) : [x]);
366
+ }), h.pop();
367
+ }
368
+ }
369
+ if (!c.isObject(e))
370
+ throw new TypeError("data must be an object");
371
+ return g(e), t;
372
+ }
373
+ function Le(e) {
374
+ const t = {
375
+ "!": "%21",
376
+ "'": "%27",
377
+ "(": "%28",
378
+ ")": "%29",
379
+ "~": "%7E",
380
+ "%20": "+",
381
+ "%00": "\0"
382
+ };
383
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
384
+ return t[r];
385
+ });
386
+ }
387
+ function ge(e, t) {
388
+ this._pairs = [], e && ue(e, this, t);
389
+ }
390
+ const ot = ge.prototype;
391
+ ot.append = function(t, n) {
392
+ this._pairs.push([t, n]);
393
+ };
394
+ ot.toString = function(t) {
395
+ const n = t ? function(r) {
396
+ return t.call(this, r, Le);
397
+ } : Le;
398
+ return this._pairs.map(function(s) {
399
+ return n(s[0]) + "=" + n(s[1]);
400
+ }, "").join("&");
401
+ };
402
+ function an(e) {
403
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
404
+ }
405
+ function it(e, t, n) {
406
+ if (!t)
407
+ return e;
408
+ const r = n && n.encode || an;
409
+ c.isFunction(n) && (n = {
410
+ serialize: n
411
+ });
412
+ const s = n && n.serialize;
413
+ let i;
414
+ if (s ? i = s(t, n) : i = c.isURLSearchParams(t) ? t.toString() : new ge(t, n).toString(r), i) {
415
+ const o = e.indexOf("#");
416
+ o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
417
+ }
418
+ return e;
419
+ }
420
+ class Be {
421
+ constructor() {
422
+ this.handlers = [];
423
+ }
424
+ /**
425
+ * Add a new interceptor to the stack
426
+ *
427
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
428
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
429
+ *
430
+ * @return {Number} An ID used to remove interceptor later
431
+ */
432
+ use(t, n, r) {
433
+ return this.handlers.push({
434
+ fulfilled: t,
435
+ rejected: n,
436
+ synchronous: r ? r.synchronous : !1,
437
+ runWhen: r ? r.runWhen : null
438
+ }), this.handlers.length - 1;
439
+ }
440
+ /**
441
+ * Remove an interceptor from the stack
442
+ *
443
+ * @param {Number} id The ID that was returned by `use`
444
+ *
445
+ * @returns {void}
446
+ */
447
+ eject(t) {
448
+ this.handlers[t] && (this.handlers[t] = null);
449
+ }
450
+ /**
451
+ * Clear all interceptors from the stack
452
+ *
453
+ * @returns {void}
454
+ */
455
+ clear() {
456
+ this.handlers && (this.handlers = []);
457
+ }
458
+ /**
459
+ * Iterate over all the registered interceptors
460
+ *
461
+ * This method is particularly useful for skipping over any
462
+ * interceptors that may have become `null` calling `eject`.
463
+ *
464
+ * @param {Function} fn The function to call for each interceptor
465
+ *
466
+ * @returns {void}
467
+ */
468
+ forEach(t) {
469
+ c.forEach(this.handlers, function(r) {
470
+ r !== null && t(r);
471
+ });
472
+ }
473
+ }
474
+ const ct = {
475
+ silentJSONParsing: !0,
476
+ forcedJSONParsing: !0,
477
+ clarifyTimeoutError: !1
478
+ }, un = typeof URLSearchParams < "u" ? URLSearchParams : ge, ln = typeof FormData < "u" ? FormData : null, fn = typeof Blob < "u" ? Blob : null, dn = {
479
+ isBrowser: !0,
480
+ classes: {
481
+ URLSearchParams: un,
482
+ FormData: ln,
483
+ Blob: fn
484
+ },
485
+ protocols: ["http", "https", "file", "blob", "url", "data"]
486
+ }, Se = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, pn = Se && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), hn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
487
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", mn = Se && window.location.href || "http://localhost", yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
488
+ __proto__: null,
489
+ hasBrowserEnv: Se,
490
+ hasStandardBrowserEnv: pn,
491
+ hasStandardBrowserWebWorkerEnv: hn,
492
+ navigator: we,
493
+ origin: mn
494
+ }, Symbol.toStringTag, { value: "Module" })), S = {
495
+ ...yn,
496
+ ...dn
497
+ };
498
+ function bn(e, t) {
499
+ return ue(e, new S.classes.URLSearchParams(), {
500
+ visitor: function(n, r, s, i) {
501
+ return S.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
502
+ },
503
+ ...t
504
+ });
505
+ }
506
+ function wn(e) {
507
+ return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
508
+ }
509
+ function En(e) {
510
+ const t = {}, n = Object.keys(e);
511
+ let r;
512
+ const s = n.length;
513
+ let i;
514
+ for (r = 0; r < s; r++)
515
+ i = n[r], t[i] = e[i];
516
+ return t;
517
+ }
518
+ function at(e) {
519
+ function t(n, r, s, i) {
520
+ let o = n[i++];
521
+ if (o === "__proto__") return !0;
522
+ const a = Number.isFinite(+o), d = i >= n.length;
523
+ return o = !o && c.isArray(s) ? s.length : o, d ? (c.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !a) : ((!s[o] || !c.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && c.isArray(s[o]) && (s[o] = En(s[o])), !a);
524
+ }
525
+ if (c.isFormData(e) && c.isFunction(e.entries)) {
526
+ const n = {};
527
+ return c.forEachEntry(e, (r, s) => {
528
+ t(wn(r), s, n, 0);
529
+ }), n;
530
+ }
531
+ return null;
532
+ }
533
+ function Rn(e, t, n) {
534
+ if (c.isString(e))
535
+ try {
536
+ return (t || JSON.parse)(e), c.trim(e);
537
+ } catch (r) {
538
+ if (r.name !== "SyntaxError")
539
+ throw r;
540
+ }
541
+ return (0, JSON.stringify)(e);
542
+ }
543
+ const G = {
544
+ transitional: ct,
545
+ adapter: ["xhr", "http", "fetch"],
546
+ transformRequest: [function(t, n) {
547
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = c.isObject(t);
548
+ if (i && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
549
+ return s ? JSON.stringify(at(t)) : t;
550
+ if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
551
+ return t;
552
+ if (c.isArrayBufferView(t))
553
+ return t.buffer;
554
+ if (c.isURLSearchParams(t))
555
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
556
+ let a;
557
+ if (i) {
558
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
559
+ return bn(t, this.formSerializer).toString();
560
+ if ((a = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
561
+ const d = this.env && this.env.FormData;
562
+ return ue(
563
+ a ? { "files[]": t } : t,
564
+ d && new d(),
565
+ this.formSerializer
566
+ );
567
+ }
568
+ }
569
+ return i || s ? (n.setContentType("application/json", !1), Rn(t)) : t;
570
+ }],
571
+ transformResponse: [function(t) {
572
+ const n = this.transitional || G.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
573
+ if (c.isResponse(t) || c.isReadableStream(t))
574
+ return t;
575
+ if (t && c.isString(t) && (r && !this.responseType || s)) {
576
+ const o = !(n && n.silentJSONParsing) && s;
577
+ try {
578
+ return JSON.parse(t, this.parseReviver);
579
+ } catch (a) {
580
+ if (o)
581
+ throw a.name === "SyntaxError" ? y.from(a, y.ERR_BAD_RESPONSE, this, null, this.response) : a;
582
+ }
583
+ }
584
+ return t;
585
+ }],
586
+ /**
587
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
588
+ * timeout is not created.
589
+ */
590
+ timeout: 0,
591
+ xsrfCookieName: "XSRF-TOKEN",
592
+ xsrfHeaderName: "X-XSRF-TOKEN",
593
+ maxContentLength: -1,
594
+ maxBodyLength: -1,
595
+ env: {
596
+ FormData: S.classes.FormData,
597
+ Blob: S.classes.Blob
598
+ },
599
+ validateStatus: function(t) {
600
+ return t >= 200 && t < 300;
601
+ },
602
+ headers: {
603
+ common: {
604
+ Accept: "application/json, text/plain, */*",
605
+ "Content-Type": void 0
606
+ }
607
+ }
608
+ };
609
+ c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
610
+ G.headers[e] = {};
611
+ });
612
+ const gn = c.toObjectSet([
613
+ "age",
614
+ "authorization",
615
+ "content-length",
616
+ "content-type",
617
+ "etag",
618
+ "expires",
619
+ "from",
620
+ "host",
621
+ "if-modified-since",
622
+ "if-unmodified-since",
623
+ "last-modified",
624
+ "location",
625
+ "max-forwards",
626
+ "proxy-authorization",
627
+ "referer",
628
+ "retry-after",
629
+ "user-agent"
630
+ ]), Sn = (e) => {
631
+ const t = {};
632
+ let n, r, s;
633
+ return e && e.split(`
634
+ `).forEach(function(o) {
635
+ s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && gn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
636
+ }), t;
637
+ }, ke = Symbol("internals");
638
+ function V(e) {
639
+ return e && String(e).trim().toLowerCase();
640
+ }
641
+ function re(e) {
642
+ return e === !1 || e == null ? e : c.isArray(e) ? e.map(re) : String(e);
643
+ }
644
+ function On(e) {
645
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
646
+ let r;
647
+ for (; r = n.exec(e); )
648
+ t[r[1]] = r[2];
649
+ return t;
650
+ }
651
+ const Tn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
652
+ function pe(e, t, n, r, s) {
653
+ if (c.isFunction(r))
654
+ return r.call(this, t, n);
655
+ if (s && (t = n), !!c.isString(t)) {
656
+ if (c.isString(r))
657
+ return t.indexOf(r) !== -1;
658
+ if (c.isRegExp(r))
659
+ return r.test(t);
660
+ }
661
+ }
662
+ function An(e) {
663
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
664
+ }
665
+ function xn(e, t) {
666
+ const n = c.toCamelCase(" " + t);
667
+ ["get", "set", "has"].forEach((r) => {
668
+ Object.defineProperty(e, r + n, {
669
+ value: function(s, i, o) {
670
+ return this[r].call(this, t, s, i, o);
671
+ },
672
+ configurable: !0
673
+ });
674
+ });
675
+ }
676
+ class A {
677
+ constructor(t) {
678
+ t && this.set(t);
679
+ }
680
+ set(t, n, r) {
681
+ const s = this;
682
+ function i(a, d, f) {
683
+ const u = V(d);
684
+ if (!u)
685
+ throw new Error("header name must be a non-empty string");
686
+ const h = c.findKey(s, u);
687
+ (!h || s[h] === void 0 || f === !0 || f === void 0 && s[h] !== !1) && (s[h || d] = re(a));
688
+ }
689
+ const o = (a, d) => c.forEach(a, (f, u) => i(f, u, d));
690
+ if (c.isPlainObject(t) || t instanceof this.constructor)
691
+ o(t, n);
692
+ else if (c.isString(t) && (t = t.trim()) && !Tn(t))
693
+ o(Sn(t), n);
694
+ else if (c.isObject(t) && c.isIterable(t)) {
695
+ let a = {}, d, f;
696
+ for (const u of t) {
697
+ if (!c.isArray(u))
698
+ throw TypeError("Object iterator must return a key-value pair");
699
+ a[f = u[0]] = (d = a[f]) ? c.isArray(d) ? [...d, u[1]] : [d, u[1]] : u[1];
700
+ }
701
+ o(a, n);
702
+ } else
703
+ t != null && i(n, t, r);
704
+ return this;
705
+ }
706
+ get(t, n) {
707
+ if (t = V(t), t) {
708
+ const r = c.findKey(this, t);
709
+ if (r) {
710
+ const s = this[r];
711
+ if (!n)
712
+ return s;
713
+ if (n === !0)
714
+ return On(s);
715
+ if (c.isFunction(n))
716
+ return n.call(this, s, r);
717
+ if (c.isRegExp(n))
718
+ return n.exec(s);
719
+ throw new TypeError("parser must be boolean|regexp|function");
720
+ }
721
+ }
722
+ }
723
+ has(t, n) {
724
+ if (t = V(t), t) {
725
+ const r = c.findKey(this, t);
726
+ return !!(r && this[r] !== void 0 && (!n || pe(this, this[r], r, n)));
727
+ }
728
+ return !1;
729
+ }
730
+ delete(t, n) {
731
+ const r = this;
732
+ let s = !1;
733
+ function i(o) {
734
+ if (o = V(o), o) {
735
+ const a = c.findKey(r, o);
736
+ a && (!n || pe(r, r[a], a, n)) && (delete r[a], s = !0);
737
+ }
738
+ }
739
+ return c.isArray(t) ? t.forEach(i) : i(t), s;
740
+ }
741
+ clear(t) {
742
+ const n = Object.keys(this);
743
+ let r = n.length, s = !1;
744
+ for (; r--; ) {
745
+ const i = n[r];
746
+ (!t || pe(this, this[i], i, t, !0)) && (delete this[i], s = !0);
747
+ }
748
+ return s;
749
+ }
750
+ normalize(t) {
751
+ const n = this, r = {};
752
+ return c.forEach(this, (s, i) => {
753
+ const o = c.findKey(r, i);
754
+ if (o) {
755
+ n[o] = re(s), delete n[i];
756
+ return;
757
+ }
758
+ const a = t ? An(i) : String(i).trim();
759
+ a !== i && delete n[i], n[a] = re(s), r[a] = !0;
760
+ }), this;
761
+ }
762
+ concat(...t) {
763
+ return this.constructor.concat(this, ...t);
764
+ }
765
+ toJSON(t) {
766
+ const n = /* @__PURE__ */ Object.create(null);
767
+ return c.forEach(this, (r, s) => {
768
+ r != null && r !== !1 && (n[s] = t && c.isArray(r) ? r.join(", ") : r);
769
+ }), n;
770
+ }
771
+ [Symbol.iterator]() {
772
+ return Object.entries(this.toJSON())[Symbol.iterator]();
773
+ }
774
+ toString() {
775
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
776
+ `);
777
+ }
778
+ getSetCookie() {
779
+ return this.get("set-cookie") || [];
780
+ }
781
+ get [Symbol.toStringTag]() {
782
+ return "AxiosHeaders";
783
+ }
784
+ static from(t) {
785
+ return t instanceof this ? t : new this(t);
786
+ }
787
+ static concat(t, ...n) {
788
+ const r = new this(t);
789
+ return n.forEach((s) => r.set(s)), r;
790
+ }
791
+ static accessor(t) {
792
+ const r = (this[ke] = this[ke] = {
793
+ accessors: {}
794
+ }).accessors, s = this.prototype;
795
+ function i(o) {
796
+ const a = V(o);
797
+ r[a] || (xn(s, o), r[a] = !0);
798
+ }
799
+ return c.isArray(t) ? t.forEach(i) : i(t), this;
800
+ }
801
+ }
802
+ A.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
803
+ c.reduceDescriptors(A.prototype, ({ value: e }, t) => {
804
+ let n = t[0].toUpperCase() + t.slice(1);
805
+ return {
806
+ get: () => e,
807
+ set(r) {
808
+ this[n] = r;
809
+ }
810
+ };
811
+ });
812
+ c.freezeMethods(A);
813
+ function he(e, t) {
814
+ const n = this || G, r = t || n, s = A.from(r.headers);
815
+ let i = r.data;
816
+ return c.forEach(e, function(a) {
817
+ i = a.call(n, i, s.normalize(), t ? t.status : void 0);
818
+ }), s.normalize(), i;
819
+ }
820
+ function ut(e) {
821
+ return !!(e && e.__CANCEL__);
822
+ }
823
+ function z(e, t, n) {
824
+ y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
825
+ }
826
+ c.inherits(z, y, {
827
+ __CANCEL__: !0
828
+ });
829
+ function lt(e, t, n) {
830
+ const r = n.config.validateStatus;
831
+ !n.status || !r || r(n.status) ? e(n) : t(new y(
832
+ "Request failed with status code " + n.status,
833
+ [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
834
+ n.config,
835
+ n.request,
836
+ n
837
+ ));
838
+ }
839
+ function Cn(e) {
840
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
841
+ return t && t[1] || "";
842
+ }
843
+ function Pn(e, t) {
844
+ e = e || 10;
845
+ const n = new Array(e), r = new Array(e);
846
+ let s = 0, i = 0, o;
847
+ return t = t !== void 0 ? t : 1e3, function(d) {
848
+ const f = Date.now(), u = r[i];
849
+ o || (o = f), n[s] = d, r[s] = f;
850
+ let h = i, b = 0;
851
+ for (; h !== s; )
852
+ b += n[h++], h = h % e;
853
+ if (s = (s + 1) % e, s === i && (i = (i + 1) % e), f - o < t)
854
+ return;
855
+ const g = u && f - u;
856
+ return g ? Math.round(b * 1e3 / g) : void 0;
857
+ };
858
+ }
859
+ function Nn(e, t) {
860
+ let n = 0, r = 1e3 / t, s, i;
861
+ const o = (f, u = Date.now()) => {
862
+ n = u, s = null, i && (clearTimeout(i), i = null), e(...f);
863
+ };
864
+ return [(...f) => {
865
+ const u = Date.now(), h = u - n;
866
+ h >= r ? o(f, u) : (s = f, i || (i = setTimeout(() => {
867
+ i = null, o(s);
868
+ }, r - h)));
869
+ }, () => s && o(s)];
870
+ }
871
+ const oe = (e, t, n = 3) => {
872
+ let r = 0;
873
+ const s = Pn(50, 250);
874
+ return Nn((i) => {
875
+ const o = i.loaded, a = i.lengthComputable ? i.total : void 0, d = o - r, f = s(d), u = o <= a;
876
+ r = o;
877
+ const h = {
878
+ loaded: o,
879
+ total: a,
880
+ progress: a ? o / a : void 0,
881
+ bytes: d,
882
+ rate: f || void 0,
883
+ estimated: f && a && u ? (a - o) / f : void 0,
884
+ event: i,
885
+ lengthComputable: a != null,
886
+ [t ? "download" : "upload"]: !0
887
+ };
888
+ e(h);
889
+ }, n);
890
+ }, je = (e, t) => {
891
+ const n = e != null;
892
+ return [(r) => t[0]({
893
+ lengthComputable: n,
894
+ total: e,
895
+ loaded: r
896
+ }), t[1]];
897
+ }, De = (e) => (...t) => c.asap(() => e(...t)), _n = S.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, S.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
898
+ new URL(S.origin),
899
+ S.navigator && /(msie|trident)/i.test(S.navigator.userAgent)
900
+ ) : () => !0, Fn = S.hasStandardBrowserEnv ? (
901
+ // Standard browser envs support document.cookie
902
+ {
903
+ write(e, t, n, r, s, i, o) {
904
+ if (typeof document > "u") return;
905
+ const a = [`${e}=${encodeURIComponent(t)}`];
906
+ c.isNumber(n) && a.push(`expires=${new Date(n).toUTCString()}`), c.isString(r) && a.push(`path=${r}`), c.isString(s) && a.push(`domain=${s}`), i === !0 && a.push("secure"), c.isString(o) && a.push(`SameSite=${o}`), document.cookie = a.join("; ");
907
+ },
908
+ read(e) {
909
+ if (typeof document > "u") return null;
910
+ const t = document.cookie.match(new RegExp("(?:^|; )" + e + "=([^;]*)"));
911
+ return t ? decodeURIComponent(t[1]) : null;
912
+ },
913
+ remove(e) {
914
+ this.write(e, "", Date.now() - 864e5, "/");
915
+ }
916
+ }
917
+ ) : (
918
+ // Non-standard browser env (web workers, react-native) lack needed support.
919
+ {
920
+ write() {
921
+ },
922
+ read() {
923
+ return null;
924
+ },
925
+ remove() {
926
+ }
927
+ }
928
+ );
929
+ function Un(e) {
930
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
931
+ }
932
+ function Ln(e, t) {
933
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
934
+ }
935
+ function ft(e, t, n) {
936
+ let r = !Un(t);
937
+ return e && (r || n == !1) ? Ln(e, t) : t;
938
+ }
939
+ const qe = (e) => e instanceof A ? { ...e } : e;
940
+ function q(e, t) {
941
+ t = t || {};
942
+ const n = {};
943
+ function r(f, u, h, b) {
944
+ return c.isPlainObject(f) && c.isPlainObject(u) ? c.merge.call({ caseless: b }, f, u) : c.isPlainObject(u) ? c.merge({}, u) : c.isArray(u) ? u.slice() : u;
945
+ }
946
+ function s(f, u, h, b) {
947
+ if (c.isUndefined(u)) {
948
+ if (!c.isUndefined(f))
949
+ return r(void 0, f, h, b);
950
+ } else return r(f, u, h, b);
951
+ }
952
+ function i(f, u) {
953
+ if (!c.isUndefined(u))
954
+ return r(void 0, u);
955
+ }
956
+ function o(f, u) {
957
+ if (c.isUndefined(u)) {
958
+ if (!c.isUndefined(f))
959
+ return r(void 0, f);
960
+ } else return r(void 0, u);
961
+ }
962
+ function a(f, u, h) {
963
+ if (h in t)
964
+ return r(f, u);
965
+ if (h in e)
966
+ return r(void 0, f);
967
+ }
968
+ const d = {
969
+ url: i,
970
+ method: i,
971
+ data: i,
972
+ baseURL: o,
973
+ transformRequest: o,
974
+ transformResponse: o,
975
+ paramsSerializer: o,
976
+ timeout: o,
977
+ timeoutMessage: o,
978
+ withCredentials: o,
979
+ withXSRFToken: o,
980
+ adapter: o,
981
+ responseType: o,
982
+ xsrfCookieName: o,
983
+ xsrfHeaderName: o,
984
+ onUploadProgress: o,
985
+ onDownloadProgress: o,
986
+ decompress: o,
987
+ maxContentLength: o,
988
+ maxBodyLength: o,
989
+ beforeRedirect: o,
990
+ transport: o,
991
+ httpAgent: o,
992
+ httpsAgent: o,
993
+ cancelToken: o,
994
+ socketPath: o,
995
+ responseEncoding: o,
996
+ validateStatus: a,
997
+ headers: (f, u, h) => s(qe(f), qe(u), h, !0)
998
+ };
999
+ return c.forEach(Object.keys({ ...e, ...t }), function(u) {
1000
+ const h = d[u] || s, b = h(e[u], t[u], u);
1001
+ c.isUndefined(b) && h !== a || (n[u] = b);
1002
+ }), n;
1003
+ }
1004
+ const dt = (e) => {
1005
+ const t = q({}, e);
1006
+ let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: a } = t;
1007
+ if (t.headers = o = A.from(o), t.url = it(ft(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && o.set(
1008
+ "Authorization",
1009
+ "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
1010
+ ), c.isFormData(n)) {
1011
+ if (S.hasStandardBrowserEnv || S.hasStandardBrowserWebWorkerEnv)
1012
+ o.setContentType(void 0);
1013
+ else if (c.isFunction(n.getHeaders)) {
1014
+ const d = n.getHeaders(), f = ["content-type", "content-length"];
1015
+ Object.entries(d).forEach(([u, h]) => {
1016
+ f.includes(u.toLowerCase()) && o.set(u, h);
1017
+ });
1018
+ }
1019
+ }
1020
+ if (S.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && _n(t.url))) {
1021
+ const d = s && i && Fn.read(i);
1022
+ d && o.set(s, d);
1023
+ }
1024
+ return t;
1025
+ }, Bn = typeof XMLHttpRequest < "u", kn = Bn && function(e) {
1026
+ return new Promise(function(n, r) {
1027
+ const s = dt(e);
1028
+ let i = s.data;
1029
+ const o = A.from(s.headers).normalize();
1030
+ let { responseType: a, onUploadProgress: d, onDownloadProgress: f } = s, u, h, b, g, l;
1031
+ function m() {
1032
+ g && g(), l && l(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1033
+ }
1034
+ let p = new XMLHttpRequest();
1035
+ p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
1036
+ function E() {
1037
+ if (!p)
1038
+ return;
1039
+ const R = A.from(
1040
+ "getAllResponseHeaders" in p && p.getAllResponseHeaders()
1041
+ ), P = {
1042
+ data: !a || a === "text" || a === "json" ? p.responseText : p.response,
1043
+ status: p.status,
1044
+ statusText: p.statusText,
1045
+ headers: R,
1046
+ config: e,
1047
+ request: p
1048
+ };
1049
+ lt(function(C) {
1050
+ n(C), m();
1051
+ }, function(C) {
1052
+ r(C), m();
1053
+ }, P), p = null;
1054
+ }
1055
+ "onloadend" in p ? p.onloadend = E : p.onreadystatechange = function() {
1056
+ !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(E);
1057
+ }, p.onabort = function() {
1058
+ p && (r(new y("Request aborted", y.ECONNABORTED, e, p)), p = null);
1059
+ }, p.onerror = function(O) {
1060
+ const P = O && O.message ? O.message : "Network Error", B = new y(P, y.ERR_NETWORK, e, p);
1061
+ B.event = O || null, r(B), p = null;
1062
+ }, p.ontimeout = function() {
1063
+ let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1064
+ const P = s.transitional || ct;
1065
+ s.timeoutErrorMessage && (O = s.timeoutErrorMessage), r(new y(
1066
+ O,
1067
+ P.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1068
+ e,
1069
+ p
1070
+ )), p = null;
1071
+ }, i === void 0 && o.setContentType(null), "setRequestHeader" in p && c.forEach(o.toJSON(), function(O, P) {
1072
+ p.setRequestHeader(P, O);
1073
+ }), c.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), a && a !== "json" && (p.responseType = s.responseType), f && ([b, l] = oe(f, !0), p.addEventListener("progress", b)), d && p.upload && ([h, g] = oe(d), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", g)), (s.cancelToken || s.signal) && (u = (R) => {
1074
+ p && (r(!R || R.type ? new z(null, e, p) : R), p.abort(), p = null);
1075
+ }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1076
+ const x = Cn(s.url);
1077
+ if (x && S.protocols.indexOf(x) === -1) {
1078
+ r(new y("Unsupported protocol " + x + ":", y.ERR_BAD_REQUEST, e));
1079
+ return;
1080
+ }
1081
+ p.send(i || null);
1082
+ });
1083
+ }, jn = (e, t) => {
1084
+ const { length: n } = e = e ? e.filter(Boolean) : [];
1085
+ if (t || n) {
1086
+ let r = new AbortController(), s;
1087
+ const i = function(f) {
1088
+ if (!s) {
1089
+ s = !0, a();
1090
+ const u = f instanceof Error ? f : this.reason;
1091
+ r.abort(u instanceof y ? u : new z(u instanceof Error ? u.message : u));
1092
+ }
1093
+ };
1094
+ let o = t && setTimeout(() => {
1095
+ o = null, i(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
1096
+ }, t);
1097
+ const a = () => {
1098
+ e && (o && clearTimeout(o), o = null, e.forEach((f) => {
1099
+ f.unsubscribe ? f.unsubscribe(i) : f.removeEventListener("abort", i);
1100
+ }), e = null);
1101
+ };
1102
+ e.forEach((f) => f.addEventListener("abort", i));
1103
+ const { signal: d } = r;
1104
+ return d.unsubscribe = () => c.asap(a), d;
1105
+ }
1106
+ }, Dn = function* (e, t) {
1107
+ let n = e.byteLength;
1108
+ if (n < t) {
1109
+ yield e;
1110
+ return;
1111
+ }
1112
+ let r = 0, s;
1113
+ for (; r < n; )
1114
+ s = r + t, yield e.slice(r, s), r = s;
1115
+ }, qn = async function* (e, t) {
1116
+ for await (const n of Hn(e))
1117
+ yield* Dn(n, t);
1118
+ }, Hn = async function* (e) {
1119
+ if (e[Symbol.asyncIterator]) {
1120
+ yield* e;
1121
+ return;
1122
+ }
1123
+ const t = e.getReader();
1124
+ try {
1125
+ for (; ; ) {
1126
+ const { done: n, value: r } = await t.read();
1127
+ if (n)
1128
+ break;
1129
+ yield r;
1130
+ }
1131
+ } finally {
1132
+ await t.cancel();
1133
+ }
1134
+ }, He = (e, t, n, r) => {
1135
+ const s = qn(e, t);
1136
+ let i = 0, o, a = (d) => {
1137
+ o || (o = !0, r && r(d));
1138
+ };
1139
+ return new ReadableStream({
1140
+ async pull(d) {
1141
+ try {
1142
+ const { done: f, value: u } = await s.next();
1143
+ if (f) {
1144
+ a(), d.close();
1145
+ return;
1146
+ }
1147
+ let h = u.byteLength;
1148
+ if (n) {
1149
+ let b = i += h;
1150
+ n(b);
1151
+ }
1152
+ d.enqueue(new Uint8Array(u));
1153
+ } catch (f) {
1154
+ throw a(f), f;
1155
+ }
1156
+ },
1157
+ cancel(d) {
1158
+ return a(d), s.return();
1159
+ }
1160
+ }, {
1161
+ highWaterMark: 2
1162
+ });
1163
+ }, Ie = 64 * 1024, { isFunction: te } = c, In = (({ Request: e, Response: t }) => ({
1164
+ Request: e,
1165
+ Response: t
1166
+ }))(c.global), {
1167
+ ReadableStream: Me,
1168
+ TextEncoder: ze
1169
+ } = c.global, $e = (e, ...t) => {
1170
+ try {
1171
+ return !!e(...t);
1172
+ } catch {
1173
+ return !1;
1174
+ }
1175
+ }, Mn = (e) => {
1176
+ e = c.merge.call({
1177
+ skipUndefined: !0
1178
+ }, In, e);
1179
+ const { fetch: t, Request: n, Response: r } = e, s = t ? te(t) : typeof fetch == "function", i = te(n), o = te(r);
1180
+ if (!s)
1181
+ return !1;
1182
+ const a = s && te(Me), d = s && (typeof ze == "function" ? /* @__PURE__ */ ((l) => (m) => l.encode(m))(new ze()) : async (l) => new Uint8Array(await new n(l).arrayBuffer())), f = i && a && $e(() => {
1183
+ let l = !1;
1184
+ const m = new n(S.origin, {
1185
+ body: new Me(),
1186
+ method: "POST",
1187
+ get duplex() {
1188
+ return l = !0, "half";
1189
+ }
1190
+ }).headers.has("Content-Type");
1191
+ return l && !m;
1192
+ }), u = o && a && $e(() => c.isReadableStream(new r("").body)), h = {
1193
+ stream: u && ((l) => l.body)
1194
+ };
1195
+ s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((l) => {
1196
+ !h[l] && (h[l] = (m, p) => {
1197
+ let E = m && m[l];
1198
+ if (E)
1199
+ return E.call(m);
1200
+ throw new y(`Response type '${l}' is not supported`, y.ERR_NOT_SUPPORT, p);
1201
+ });
1202
+ });
1203
+ const b = async (l) => {
1204
+ if (l == null)
1205
+ return 0;
1206
+ if (c.isBlob(l))
1207
+ return l.size;
1208
+ if (c.isSpecCompliantForm(l))
1209
+ return (await new n(S.origin, {
1210
+ method: "POST",
1211
+ body: l
1212
+ }).arrayBuffer()).byteLength;
1213
+ if (c.isArrayBufferView(l) || c.isArrayBuffer(l))
1214
+ return l.byteLength;
1215
+ if (c.isURLSearchParams(l) && (l = l + ""), c.isString(l))
1216
+ return (await d(l)).byteLength;
1217
+ }, g = async (l, m) => {
1218
+ const p = c.toFiniteNumber(l.getContentLength());
1219
+ return p ?? b(m);
1220
+ };
1221
+ return async (l) => {
1222
+ let {
1223
+ url: m,
1224
+ method: p,
1225
+ data: E,
1226
+ signal: x,
1227
+ cancelToken: R,
1228
+ timeout: O,
1229
+ onDownloadProgress: P,
1230
+ onUploadProgress: B,
1231
+ responseType: C,
1232
+ headers: fe,
1233
+ withCredentials: Y = "same-origin",
1234
+ fetchOptions: Ae
1235
+ } = dt(l), xe = t || fetch;
1236
+ C = C ? (C + "").toLowerCase() : "text";
1237
+ let Z = jn([x, R && R.toAbortSignal()], O), J = null;
1238
+ const k = Z && Z.unsubscribe && (() => {
1239
+ Z.unsubscribe();
1240
+ });
1241
+ let Ce;
1242
+ try {
1243
+ if (B && f && p !== "get" && p !== "head" && (Ce = await g(fe, E)) !== 0) {
1244
+ let L = new n(m, {
1245
+ method: "POST",
1246
+ body: E,
1247
+ duplex: "half"
1248
+ }), H;
1249
+ if (c.isFormData(E) && (H = L.headers.get("content-type")) && fe.setContentType(H), L.body) {
1250
+ const [de, ee] = je(
1251
+ Ce,
1252
+ oe(De(B))
1253
+ );
1254
+ E = He(L.body, Ie, de, ee);
1255
+ }
1256
+ }
1257
+ c.isString(Y) || (Y = Y ? "include" : "omit");
1258
+ const _ = i && "credentials" in n.prototype, Pe = {
1259
+ ...Ae,
1260
+ signal: Z,
1261
+ method: p.toUpperCase(),
1262
+ headers: fe.normalize().toJSON(),
1263
+ body: E,
1264
+ duplex: "half",
1265
+ credentials: _ ? Y : void 0
1266
+ };
1267
+ J = i && new n(m, Pe);
1268
+ let U = await (i ? xe(J, Ae) : xe(m, Pe));
1269
+ const Ne = u && (C === "stream" || C === "response");
1270
+ if (u && (P || Ne && k)) {
1271
+ const L = {};
1272
+ ["status", "statusText", "headers"].forEach((_e) => {
1273
+ L[_e] = U[_e];
1274
+ });
1275
+ const H = c.toFiniteNumber(U.headers.get("content-length")), [de, ee] = P && je(
1276
+ H,
1277
+ oe(De(P), !0)
1278
+ ) || [];
1279
+ U = new r(
1280
+ He(U.body, Ie, de, () => {
1281
+ ee && ee(), k && k();
1282
+ }),
1283
+ L
1284
+ );
1285
+ }
1286
+ C = C || "text";
1287
+ let bt = await h[c.findKey(h, C) || "text"](U, l);
1288
+ return !Ne && k && k(), await new Promise((L, H) => {
1289
+ lt(L, H, {
1290
+ data: bt,
1291
+ headers: A.from(U.headers),
1292
+ status: U.status,
1293
+ statusText: U.statusText,
1294
+ config: l,
1295
+ request: J
1296
+ });
1297
+ });
1298
+ } catch (_) {
1299
+ throw k && k(), _ && _.name === "TypeError" && /Load failed|fetch/i.test(_.message) ? Object.assign(
1300
+ new y("Network Error", y.ERR_NETWORK, l, J),
1301
+ {
1302
+ cause: _.cause || _
1303
+ }
1304
+ ) : y.from(_, _ && _.code, l, J);
1305
+ }
1306
+ };
1307
+ }, zn = /* @__PURE__ */ new Map(), pt = (e) => {
1308
+ let t = e && e.env || {};
1309
+ const { fetch: n, Request: r, Response: s } = t, i = [
1310
+ r,
1311
+ s,
1312
+ n
1313
+ ];
1314
+ let o = i.length, a = o, d, f, u = zn;
1315
+ for (; a--; )
1316
+ d = i[a], f = u.get(d), f === void 0 && u.set(d, f = a ? /* @__PURE__ */ new Map() : Mn(t)), u = f;
1317
+ return f;
1318
+ };
1319
+ pt();
1320
+ const Oe = {
1321
+ http: sn,
1322
+ xhr: kn,
1323
+ fetch: {
1324
+ get: pt
1325
+ }
1326
+ };
1327
+ c.forEach(Oe, (e, t) => {
1328
+ if (e) {
1329
+ try {
1330
+ Object.defineProperty(e, "name", { value: t });
1331
+ } catch {
1332
+ }
1333
+ Object.defineProperty(e, "adapterName", { value: t });
1334
+ }
1335
+ });
1336
+ const Je = (e) => `- ${e}`, $n = (e) => c.isFunction(e) || e === null || e === !1;
1337
+ function Jn(e, t) {
1338
+ e = c.isArray(e) ? e : [e];
1339
+ const { length: n } = e;
1340
+ let r, s;
1341
+ const i = {};
1342
+ for (let o = 0; o < n; o++) {
1343
+ r = e[o];
1344
+ let a;
1345
+ if (s = r, !$n(r) && (s = Oe[(a = String(r)).toLowerCase()], s === void 0))
1346
+ throw new y(`Unknown adapter '${a}'`);
1347
+ if (s && (c.isFunction(s) || (s = s.get(t))))
1348
+ break;
1349
+ i[a || "#" + o] = s;
1350
+ }
1351
+ if (!s) {
1352
+ const o = Object.entries(i).map(
1353
+ ([d, f]) => `adapter ${d} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1354
+ );
1355
+ let a = n ? o.length > 1 ? `since :
1356
+ ` + o.map(Je).join(`
1357
+ `) : " " + Je(o[0]) : "as no adapter specified";
1358
+ throw new y(
1359
+ "There is no suitable adapter to dispatch the request " + a,
1360
+ "ERR_NOT_SUPPORT"
1361
+ );
1362
+ }
1363
+ return s;
1364
+ }
1365
+ const ht = {
1366
+ /**
1367
+ * Resolve an adapter from a list of adapter names or functions.
1368
+ * @type {Function}
1369
+ */
1370
+ getAdapter: Jn,
1371
+ /**
1372
+ * Exposes all known adapters
1373
+ * @type {Object<string, Function|Object>}
1374
+ */
1375
+ adapters: Oe
1376
+ };
1377
+ function me(e) {
1378
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1379
+ throw new z(null, e);
1380
+ }
1381
+ function Ve(e) {
1382
+ return me(e), e.headers = A.from(e.headers), e.data = he.call(
1383
+ e,
1384
+ e.transformRequest
1385
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), ht.getAdapter(e.adapter || G.adapter, e)(e).then(function(r) {
1386
+ return me(e), r.data = he.call(
1387
+ e,
1388
+ e.transformResponse,
1389
+ r
1390
+ ), r.headers = A.from(r.headers), r;
1391
+ }, function(r) {
1392
+ return ut(r) || (me(e), r && r.response && (r.response.data = he.call(
1393
+ e,
1394
+ e.transformResponse,
1395
+ r.response
1396
+ ), r.response.headers = A.from(r.response.headers))), Promise.reject(r);
1397
+ });
1398
+ }
1399
+ const mt = "1.13.2", le = {};
1400
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1401
+ le[e] = function(r) {
1402
+ return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1403
+ };
1404
+ });
1405
+ const We = {};
1406
+ le.transitional = function(t, n, r) {
1407
+ function s(i, o) {
1408
+ return "[Axios v" + mt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
1409
+ }
1410
+ return (i, o, a) => {
1411
+ if (t === !1)
1412
+ throw new y(
1413
+ s(o, " has been removed" + (n ? " in " + n : "")),
1414
+ y.ERR_DEPRECATED
1415
+ );
1416
+ return n && !We[o] && (We[o] = !0), t ? t(i, o, a) : !0;
1417
+ };
1418
+ };
1419
+ le.spelling = function(t) {
1420
+ return (n, r) => !0;
1421
+ };
1422
+ function Vn(e, t, n) {
1423
+ if (typeof e != "object")
1424
+ throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1425
+ const r = Object.keys(e);
1426
+ let s = r.length;
1427
+ for (; s-- > 0; ) {
1428
+ const i = r[s], o = t[i];
1429
+ if (o) {
1430
+ const a = e[i], d = a === void 0 || o(a, i, e);
1431
+ if (d !== !0)
1432
+ throw new y("option " + i + " must be " + d, y.ERR_BAD_OPTION_VALUE);
1433
+ continue;
1434
+ }
1435
+ if (n !== !0)
1436
+ throw new y("Unknown option " + i, y.ERR_BAD_OPTION);
1437
+ }
1438
+ }
1439
+ const se = {
1440
+ assertOptions: Vn,
1441
+ validators: le
1442
+ }, F = se.validators;
1443
+ class D {
1444
+ constructor(t) {
1445
+ this.defaults = t || {}, this.interceptors = {
1446
+ request: new Be(),
1447
+ response: new Be()
1448
+ };
1449
+ }
1450
+ /**
1451
+ * Dispatch a request
1452
+ *
1453
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1454
+ * @param {?Object} config
1455
+ *
1456
+ * @returns {Promise} The Promise to be fulfilled
1457
+ */
1458
+ async request(t, n) {
1459
+ try {
1460
+ return await this._request(t, n);
1461
+ } catch (r) {
1462
+ if (r instanceof Error) {
1463
+ let s = {};
1464
+ Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1465
+ const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1466
+ try {
1467
+ r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
1468
+ ` + i) : r.stack = i;
1469
+ } catch {
1470
+ }
1471
+ }
1472
+ throw r;
1473
+ }
1474
+ }
1475
+ _request(t, n) {
1476
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = q(this.defaults, n);
1477
+ const { transitional: r, paramsSerializer: s, headers: i } = n;
1478
+ r !== void 0 && se.assertOptions(r, {
1479
+ silentJSONParsing: F.transitional(F.boolean),
1480
+ forcedJSONParsing: F.transitional(F.boolean),
1481
+ clarifyTimeoutError: F.transitional(F.boolean)
1482
+ }, !1), s != null && (c.isFunction(s) ? n.paramsSerializer = {
1483
+ serialize: s
1484
+ } : se.assertOptions(s, {
1485
+ encode: F.function,
1486
+ serialize: F.function
1487
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), se.assertOptions(n, {
1488
+ baseUrl: F.spelling("baseURL"),
1489
+ withXsrfToken: F.spelling("withXSRFToken")
1490
+ }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1491
+ let o = i && c.merge(
1492
+ i.common,
1493
+ i[n.method]
1494
+ );
1495
+ i && c.forEach(
1496
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1497
+ (l) => {
1498
+ delete i[l];
1499
+ }
1500
+ ), n.headers = A.concat(o, i);
1501
+ const a = [];
1502
+ let d = !0;
1503
+ this.interceptors.request.forEach(function(m) {
1504
+ typeof m.runWhen == "function" && m.runWhen(n) === !1 || (d = d && m.synchronous, a.unshift(m.fulfilled, m.rejected));
1505
+ });
1506
+ const f = [];
1507
+ this.interceptors.response.forEach(function(m) {
1508
+ f.push(m.fulfilled, m.rejected);
1509
+ });
1510
+ let u, h = 0, b;
1511
+ if (!d) {
1512
+ const l = [Ve.bind(this), void 0];
1513
+ for (l.unshift(...a), l.push(...f), b = l.length, u = Promise.resolve(n); h < b; )
1514
+ u = u.then(l[h++], l[h++]);
1515
+ return u;
1516
+ }
1517
+ b = a.length;
1518
+ let g = n;
1519
+ for (; h < b; ) {
1520
+ const l = a[h++], m = a[h++];
1521
+ try {
1522
+ g = l(g);
1523
+ } catch (p) {
1524
+ m.call(this, p);
1525
+ break;
1526
+ }
1527
+ }
1528
+ try {
1529
+ u = Ve.call(this, g);
1530
+ } catch (l) {
1531
+ return Promise.reject(l);
1532
+ }
1533
+ for (h = 0, b = f.length; h < b; )
1534
+ u = u.then(f[h++], f[h++]);
1535
+ return u;
1536
+ }
1537
+ getUri(t) {
1538
+ t = q(this.defaults, t);
1539
+ const n = ft(t.baseURL, t.url, t.allowAbsoluteUrls);
1540
+ return it(n, t.params, t.paramsSerializer);
1541
+ }
1542
+ }
1543
+ c.forEach(["delete", "get", "head", "options"], function(t) {
1544
+ D.prototype[t] = function(n, r) {
1545
+ return this.request(q(r || {}, {
1546
+ method: t,
1547
+ url: n,
1548
+ data: (r || {}).data
1549
+ }));
1550
+ };
1551
+ });
1552
+ c.forEach(["post", "put", "patch"], function(t) {
1553
+ function n(r) {
1554
+ return function(i, o, a) {
1555
+ return this.request(q(a || {}, {
1556
+ method: t,
1557
+ headers: r ? {
1558
+ "Content-Type": "multipart/form-data"
1559
+ } : {},
1560
+ url: i,
1561
+ data: o
1562
+ }));
1563
+ };
1564
+ }
1565
+ D.prototype[t] = n(), D.prototype[t + "Form"] = n(!0);
1566
+ });
1567
+ class Te {
1568
+ constructor(t) {
1569
+ if (typeof t != "function")
1570
+ throw new TypeError("executor must be a function.");
1571
+ let n;
1572
+ this.promise = new Promise(function(i) {
1573
+ n = i;
1574
+ });
1575
+ const r = this;
1576
+ this.promise.then((s) => {
1577
+ if (!r._listeners) return;
1578
+ let i = r._listeners.length;
1579
+ for (; i-- > 0; )
1580
+ r._listeners[i](s);
1581
+ r._listeners = null;
1582
+ }), this.promise.then = (s) => {
1583
+ let i;
1584
+ const o = new Promise((a) => {
1585
+ r.subscribe(a), i = a;
1586
+ }).then(s);
1587
+ return o.cancel = function() {
1588
+ r.unsubscribe(i);
1589
+ }, o;
1590
+ }, t(function(i, o, a) {
1591
+ r.reason || (r.reason = new z(i, o, a), n(r.reason));
1592
+ });
1593
+ }
1594
+ /**
1595
+ * Throws a `CanceledError` if cancellation has been requested.
1596
+ */
1597
+ throwIfRequested() {
1598
+ if (this.reason)
1599
+ throw this.reason;
1600
+ }
1601
+ /**
1602
+ * Subscribe to the cancel signal
1603
+ */
1604
+ subscribe(t) {
1605
+ if (this.reason) {
1606
+ t(this.reason);
1607
+ return;
1608
+ }
1609
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
1610
+ }
1611
+ /**
1612
+ * Unsubscribe from the cancel signal
1613
+ */
1614
+ unsubscribe(t) {
1615
+ if (!this._listeners)
1616
+ return;
1617
+ const n = this._listeners.indexOf(t);
1618
+ n !== -1 && this._listeners.splice(n, 1);
1619
+ }
1620
+ toAbortSignal() {
1621
+ const t = new AbortController(), n = (r) => {
1622
+ t.abort(r);
1623
+ };
1624
+ return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
1625
+ }
1626
+ /**
1627
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1628
+ * cancels the `CancelToken`.
1629
+ */
1630
+ static source() {
1631
+ let t;
1632
+ return {
1633
+ token: new Te(function(s) {
1634
+ t = s;
1635
+ }),
1636
+ cancel: t
1637
+ };
1638
+ }
1639
+ }
1640
+ function Wn(e) {
1641
+ return function(n) {
1642
+ return e.apply(null, n);
1643
+ };
1644
+ }
1645
+ function vn(e) {
1646
+ return c.isObject(e) && e.isAxiosError === !0;
1647
+ }
1648
+ const Ee = {
1649
+ Continue: 100,
1650
+ SwitchingProtocols: 101,
1651
+ Processing: 102,
1652
+ EarlyHints: 103,
1653
+ Ok: 200,
1654
+ Created: 201,
1655
+ Accepted: 202,
1656
+ NonAuthoritativeInformation: 203,
1657
+ NoContent: 204,
1658
+ ResetContent: 205,
1659
+ PartialContent: 206,
1660
+ MultiStatus: 207,
1661
+ AlreadyReported: 208,
1662
+ ImUsed: 226,
1663
+ MultipleChoices: 300,
1664
+ MovedPermanently: 301,
1665
+ Found: 302,
1666
+ SeeOther: 303,
1667
+ NotModified: 304,
1668
+ UseProxy: 305,
1669
+ Unused: 306,
1670
+ TemporaryRedirect: 307,
1671
+ PermanentRedirect: 308,
1672
+ BadRequest: 400,
1673
+ Unauthorized: 401,
1674
+ PaymentRequired: 402,
1675
+ Forbidden: 403,
1676
+ NotFound: 404,
1677
+ MethodNotAllowed: 405,
1678
+ NotAcceptable: 406,
1679
+ ProxyAuthenticationRequired: 407,
1680
+ RequestTimeout: 408,
1681
+ Conflict: 409,
1682
+ Gone: 410,
1683
+ LengthRequired: 411,
1684
+ PreconditionFailed: 412,
1685
+ PayloadTooLarge: 413,
1686
+ UriTooLong: 414,
1687
+ UnsupportedMediaType: 415,
1688
+ RangeNotSatisfiable: 416,
1689
+ ExpectationFailed: 417,
1690
+ ImATeapot: 418,
1691
+ MisdirectedRequest: 421,
1692
+ UnprocessableEntity: 422,
1693
+ Locked: 423,
1694
+ FailedDependency: 424,
1695
+ TooEarly: 425,
1696
+ UpgradeRequired: 426,
1697
+ PreconditionRequired: 428,
1698
+ TooManyRequests: 429,
1699
+ RequestHeaderFieldsTooLarge: 431,
1700
+ UnavailableForLegalReasons: 451,
1701
+ InternalServerError: 500,
1702
+ NotImplemented: 501,
1703
+ BadGateway: 502,
1704
+ ServiceUnavailable: 503,
1705
+ GatewayTimeout: 504,
1706
+ HttpVersionNotSupported: 505,
1707
+ VariantAlsoNegotiates: 506,
1708
+ InsufficientStorage: 507,
1709
+ LoopDetected: 508,
1710
+ NotExtended: 510,
1711
+ NetworkAuthenticationRequired: 511,
1712
+ WebServerIsDown: 521,
1713
+ ConnectionTimedOut: 522,
1714
+ OriginIsUnreachable: 523,
1715
+ TimeoutOccurred: 524,
1716
+ SslHandshakeFailed: 525,
1717
+ InvalidSslCertificate: 526
1718
+ };
1719
+ Object.entries(Ee).forEach(([e, t]) => {
1720
+ Ee[t] = e;
1721
+ });
1722
+ function yt(e) {
1723
+ const t = new D(e), n = Ke(D.prototype.request, t);
1724
+ return c.extend(n, D.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1725
+ return yt(q(e, s));
1726
+ }, n;
1727
+ }
1728
+ const w = yt(G);
1729
+ w.Axios = D;
1730
+ w.CanceledError = z;
1731
+ w.CancelToken = Te;
1732
+ w.isCancel = ut;
1733
+ w.VERSION = mt;
1734
+ w.toFormData = ue;
1735
+ w.AxiosError = y;
1736
+ w.Cancel = w.CanceledError;
1737
+ w.all = function(t) {
1738
+ return Promise.all(t);
1739
+ };
1740
+ w.spread = Wn;
1741
+ w.isAxiosError = vn;
1742
+ w.mergeConfig = q;
1743
+ w.AxiosHeaders = A;
1744
+ w.formToJSON = (e) => at(c.isHTMLForm(e) ? new FormData(e) : e);
1745
+ w.getAdapter = ht.getAdapter;
1746
+ w.HttpStatusCode = Ee;
1747
+ w.default = w;
1748
+ const Kn = 60 * 1e3, Xn = 1, Gn = 1e3, $ = "basic-application-access-token-refresh", Qn = "/api/admin/basic-application/authorization/v1/login/oauth/token/refresh", ve = /* @__PURE__ */ new Map(), Q = (e = $) => {
1749
+ const t = ve.get(e);
1750
+ if (t) return t;
1751
+ const n = { isRefreshing: !1, queue: [] };
1752
+ return ve.set(e, n), n;
1753
+ }, W = (e) => {
1754
+ const t = e ? Number(e) : 0;
1755
+ return Number.isFinite(t) ? t : 0;
1756
+ }, Yn = (e) => {
1757
+ const t = W((e == null ? void 0 : e.accessExp) || (e == null ? void 0 : e.access_exp) || (e == null ? void 0 : e.accessTokenExpiredAt) || (e == null ? void 0 : e.exp)), n = W((e == null ? void 0 : e.refreshExp) || (e == null ? void 0 : e.refresh_exp));
1758
+ return {
1759
+ accessToken: String((e == null ? void 0 : e.accessToken) || (e == null ? void 0 : e.access_token) || "").trim(),
1760
+ refreshToken: String((e == null ? void 0 : e.refreshToken) || (e == null ? void 0 : e.refresh_token) || "").trim(),
1761
+ accessExp: t,
1762
+ accessTokenExpiredAt: W((e == null ? void 0 : e.accessTokenExpiredAt) || t),
1763
+ refreshExp: n,
1764
+ sub: e != null && e.sub ? String(e.sub).trim() : void 0,
1765
+ tenant: e != null && e.tenant ? String(e.tenant).trim() : void 0
1766
+ };
1767
+ }, nr = (e, t = Kn) => {
1768
+ const n = Date.now(), r = W((e == null ? void 0 : e.accessExp) || (e == null ? void 0 : e.accessTokenExpiredAt));
1769
+ if (r && n < r - t) return "access_valid";
1770
+ const s = W(e == null ? void 0 : e.refreshExp);
1771
+ return s && n >= s - t ? "refresh_expired" : "need_refresh";
1772
+ }, rr = (e = $) => {
1773
+ const t = Q(e);
1774
+ return t.isRefreshing ? !1 : (t.isRefreshing = !0, !0);
1775
+ }, sr = (e = $) => new Promise((t, n) => {
1776
+ Q(e).queue.push({ resolve: t, reject: n });
1777
+ }), or = (e, t = $) => {
1778
+ const n = Q(t);
1779
+ n.queue.forEach((r) => r.resolve(e)), n.queue = [], n.isRefreshing = !1;
1780
+ }, ir = (e, t = $) => {
1781
+ const n = Q(t);
1782
+ n.queue.forEach((r) => r.reject(e)), n.queue = [], n.isRefreshing = !1;
1783
+ }, cr = (e = $, t = "Refresh state cleared") => {
1784
+ const n = Q(e);
1785
+ n.queue.forEach((r) => r.reject(t)), n.queue = [], n.isRefreshing = !1;
1786
+ }, Zn = async (e) => {
1787
+ const { baseURL: t } = wt(), n = await w.create().post(
1788
+ Qn,
1789
+ { refreshToken: e },
1790
+ {
1791
+ baseURL: t
1792
+ // withCredentials: true,
1793
+ }
1794
+ );
1795
+ return Yn((n == null ? void 0 : n.data) || {});
1796
+ };
1797
+ async function er(e, t = Xn, n = Gn, r = 0) {
1798
+ try {
1799
+ return await Zn(e);
1800
+ } catch (s) {
1801
+ if (r < t)
1802
+ return await new Promise((i) => setTimeout(i, n)), er(e, t, n, r + 1);
1803
+ throw s;
1804
+ }
1805
+ }
1806
+ export {
1807
+ Kn as CHECK_BUFFER_TIME,
1808
+ $ as DEFAULT_REFRESH_SCOPE,
1809
+ Xn as MAX_RETRIES,
1810
+ Gn as RETRY_DELAY,
1811
+ cr as clearRefreshState,
1812
+ nr as getRefreshPrecheckResult,
1813
+ Yn as normalizeRefreshData,
1814
+ er as refreshTokenWithRetry,
1815
+ ir as rejectRefreshResult,
1816
+ or as resolveRefreshResult,
1817
+ rr as startRefreshPending,
1818
+ W as toTimestamp,
1819
+ sr as waitRefreshResult
1820
+ };