@lgsm/modules 1.0.2 → 1.1.0

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