@odynn/awayz-core 0.6.26 → 0.6.28
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/{AccountService-B9DbWoCe.js → AccountService-DEwilAk3.js} +603 -607
- package/dist/{TripsService-DJhDDtrv.js → TripsService-Dqw5SICI.js} +1 -1
- package/dist/components/CashValue/CashValue.js +1 -1
- package/dist/components/CashValue/CashValue.stories.js +1 -1
- package/dist/components/Wallet/Card/Card.stories.js +1 -1
- package/dist/configs/endpoints.js +1 -1
- package/dist/context/AwayzContext.js +4 -2
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +1 -1
- package/dist/hooks/useBookingManagement/useBookingManagement.js +1 -1
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +1 -1
- package/dist/hooks/useFeatureFlags.js +72 -0
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.js +2 -2
- package/dist/hooks/useTripManagement/useTripManagement.test.js +2 -2
- package/dist/hooks/useWallet/useWallet.js +49 -48
- package/dist/hooks/useWallet/useWallet.test.js +1 -1
- package/dist/lib/configs/endpoints.d.ts +2 -1
- package/dist/lib/context/AwayzContext.d.ts +3 -0
- package/dist/lib/hooks/useFeatureFlags.d.ts +19 -0
- package/dist/lib/services/bookings/BookingService.types.d.ts +7 -5
- package/dist/lib/services/features/featureService.d.ts +8 -0
- package/dist/main.js +1 -1
- package/dist/providers/AwayzProvider.js +21 -18
- package/dist/services/account/AccountService.js +1 -1
- package/dist/services/bookings/BookingService.js +16 -11
- package/dist/services/currency/CurrencyService.js +1 -1
- package/dist/services/features/featureService.js +27 -0
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +1 -1
- package/dist/services/instanceConfig.js +1 -1
- package/dist/services/noRetryInstance.js +1 -1
- package/dist/services/preferences/PreferencesService.js +1 -1
- package/dist/services/rewards/RewardsService.js +1 -1
- package/dist/services/trips/TripsService.js +2 -2
- package/dist/services/wallet/WalletService.js +1 -1
- package/package.json +1 -1
|
@@ -1,110 +1,107 @@
|
|
|
1
1
|
var lt = Object.defineProperty;
|
|
2
2
|
var ft = (e, t, n) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
3
|
+
var I = (e, t, n) => ft(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import "./arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { a as
|
|
5
|
+
import { a as k } from "./keys-BcBfU51M.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { awayzClient as $ } from "./configs/awayzClient.js";
|
|
8
|
-
import { EAuthEndpoints as
|
|
8
|
+
import { EAuthEndpoints as T } from "./configs/endpoints.js";
|
|
9
9
|
import { getBaseUrl as qe } from "./configs/baseUrl.js";
|
|
10
10
|
import { EAuthFlow as dt } from "./types/EAuthFlow.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const L = (e) => Array.isArray(e) ? e.map((t) => L(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
15
|
-
const s = pt(n);
|
|
16
|
-
return t[s] = L(e[n]), t;
|
|
11
|
+
const P = (e) => Array.isArray(e) ? e.map((t) => P(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
12
|
+
const r = mt(n);
|
|
13
|
+
return t[r] = P(e[n]), t;
|
|
17
14
|
}, {}) : e;
|
|
18
|
-
function
|
|
15
|
+
function pt(e) {
|
|
19
16
|
return e.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
20
17
|
}
|
|
21
18
|
const we = (e) => Array.isArray(e) ? e.map((t) => we(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
22
|
-
const
|
|
23
|
-
return t[
|
|
24
|
-
}, {}) : e,
|
|
19
|
+
const r = pt(n);
|
|
20
|
+
return t[r] = we(e[n]), t;
|
|
21
|
+
}, {}) : e, ht = (e) => (Object.keys(e).forEach(
|
|
25
22
|
(t) => !e[t] && delete e[t]
|
|
26
|
-
), e);
|
|
27
|
-
var j = /* @__PURE__ */ ((e) => (e.LOCATIONS = "LOCATIONS", e.CHECK_USER = "CHECK_USER", e.USER_REGIONS = "USER_REGIONS", e.CONVERT_CURRENCY = "CONVERT_CURRENCY", e.CLIENT_COMPONENT_KEY = "CLIENT_COMPONENT_KEY", e.SEARCH_LIMIT = "SEARCH_LIMIT", e.PROGRAMS = "PROGRAMS", e.USER_PROGRAMS = "USER_PROGRAMS", e.LINKED_USER_PROGRAMS = "LINKED_USER_PROGRAMS", e.BANKS = "BANKS", e.CARDS = "CARDS", e.USER_CARDS = "USER_CARDS", e.TRIPS = "TRIPS", e.UNCATEGORISED_BOOKINGS = "UNCATEGORISED_BOOKINGS", e.BOOKING = "BOOKING", e.VALUE_CENTS = "VALUE_CENTS", e.AVAILABILITY_ALERTS = "AVAILABILITY_ALERTS", e.ALERT_NOTIFICATIONS = "ALERT_NOTIFICATIONS", e.POINTS_AS_CASH = "POINTS_AS_CASH", e))(j || {}), Et = /* @__PURE__ */ ((e) => (e.HOTEL = "Hotel", e.AIRLINE = "Airline", e.BANK = "Bank", e))(Et || {});
|
|
23
|
+
), e), mt = (e) => e.toLowerCase().replace(/_([a-z])/g, (t, n) => n.toUpperCase());
|
|
24
|
+
var j = /* @__PURE__ */ ((e) => (e.LOCATIONS = "LOCATIONS", e.CHECK_USER = "CHECK_USER", e.USER_REGIONS = "USER_REGIONS", e.CONVERT_CURRENCY = "CONVERT_CURRENCY", e.CLIENT_COMPONENT_KEY = "CLIENT_COMPONENT_KEY", e.SEARCH_LIMIT = "SEARCH_LIMIT", e.PROGRAMS = "PROGRAMS", e.USER_PROGRAMS = "USER_PROGRAMS", e.LINKED_USER_PROGRAMS = "LINKED_USER_PROGRAMS", e.BANKS = "BANKS", e.CARDS = "CARDS", e.USER_CARDS = "USER_CARDS", e.TRIPS = "TRIPS", e.UNCATEGORISED_BOOKINGS = "UNCATEGORISED_BOOKINGS", e.BOOKING = "BOOKING", e.VALUE_CENTS = "VALUE_CENTS", e.AVAILABILITY_ALERTS = "AVAILABILITY_ALERTS", e.ALERT_NOTIFICATIONS = "ALERT_NOTIFICATIONS", e.POINTS_AS_CASH = "POINTS_AS_CASH", e.GET_USER_REGION = "get_user_region", e.PRICING = "pricing", e.FAQS = "faqs", e.FEATURES = "features", e.AIRLINE_HEALTH = "airline_health", e))(j || {}), Et = /* @__PURE__ */ ((e) => (e.HOTEL = "Hotel", e.AIRLINE = "Airline", e.BANK = "Bank", e))(Et || {});
|
|
28
25
|
function He(e, t) {
|
|
29
26
|
return function() {
|
|
30
27
|
return e.apply(t, arguments);
|
|
31
28
|
};
|
|
32
29
|
}
|
|
33
|
-
const { toString:
|
|
34
|
-
const n =
|
|
30
|
+
const { toString: Rt } = Object.prototype, { getPrototypeOf: Re } = Object, { iterator: te, toStringTag: Me } = Symbol, ne = /* @__PURE__ */ ((e) => (t) => {
|
|
31
|
+
const n = Rt.call(t);
|
|
35
32
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
36
|
-
})(/* @__PURE__ */ Object.create(null)), U = (e) => (e = e.toLowerCase(), (t) => ne(t) === e),
|
|
37
|
-
function
|
|
33
|
+
})(/* @__PURE__ */ Object.create(null)), U = (e) => (e = e.toLowerCase(), (t) => ne(t) === e), re = (e) => (t) => typeof t === e, { isArray: z } = Array, v = re("undefined");
|
|
34
|
+
function St(e) {
|
|
38
35
|
return e !== null && !v(e) && e.constructor !== null && !v(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
39
36
|
}
|
|
40
37
|
const je = U("ArrayBuffer");
|
|
41
|
-
function
|
|
38
|
+
function gt(e) {
|
|
42
39
|
let t;
|
|
43
40
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && je(e.buffer), t;
|
|
44
41
|
}
|
|
45
|
-
const
|
|
42
|
+
const yt = re("string"), _ = re("function"), ze = re("number"), se = (e) => e !== null && typeof e == "object", wt = (e) => e === !0 || e === !1, X = (e) => {
|
|
46
43
|
if (ne(e) !== "object")
|
|
47
44
|
return !1;
|
|
48
|
-
const t =
|
|
45
|
+
const t = Re(e);
|
|
49
46
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Me in e) && !(te in e);
|
|
50
|
-
},
|
|
47
|
+
}, bt = U("Date"), Tt = U("File"), Ot = U("Blob"), At = U("FileList"), _t = (e) => se(e) && _(e.pipe), Nt = (e) => {
|
|
51
48
|
let t;
|
|
52
49
|
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = ne(e)) === "formdata" || // detect form-data instance
|
|
53
50
|
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
54
|
-
}, Ct = U("URLSearchParams"), [
|
|
51
|
+
}, Ct = U("URLSearchParams"), [It, Ut, xt, kt] = ["ReadableStream", "Request", "Response", "Headers"].map(U), Lt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
55
52
|
function V(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
56
53
|
if (e === null || typeof e > "u")
|
|
57
54
|
return;
|
|
58
|
-
let
|
|
55
|
+
let r, s;
|
|
59
56
|
if (typeof e != "object" && (e = [e]), z(e))
|
|
60
|
-
for (
|
|
61
|
-
t.call(null, e[
|
|
57
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
58
|
+
t.call(null, e[r], r, e);
|
|
62
59
|
else {
|
|
63
60
|
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
64
61
|
let c;
|
|
65
|
-
for (
|
|
66
|
-
c = o[
|
|
62
|
+
for (r = 0; r < i; r++)
|
|
63
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
67
64
|
}
|
|
68
65
|
}
|
|
69
|
-
function
|
|
66
|
+
function Ge(e, t) {
|
|
70
67
|
t = t.toLowerCase();
|
|
71
68
|
const n = Object.keys(e);
|
|
72
|
-
let
|
|
73
|
-
for (;
|
|
74
|
-
if (
|
|
75
|
-
return
|
|
69
|
+
let r = n.length, s;
|
|
70
|
+
for (; r-- > 0; )
|
|
71
|
+
if (s = n[r], t === s.toLowerCase())
|
|
72
|
+
return s;
|
|
76
73
|
return null;
|
|
77
74
|
}
|
|
78
75
|
const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, $e = (e) => !v(e) && e !== q;
|
|
79
76
|
function fe() {
|
|
80
|
-
const { caseless: e } = $e(this) && this || {}, t = {}, n = (
|
|
81
|
-
const o = e &&
|
|
82
|
-
X(t[o]) && X(
|
|
77
|
+
const { caseless: e } = $e(this) && this || {}, t = {}, n = (r, s) => {
|
|
78
|
+
const o = e && Ge(t, s) || s;
|
|
79
|
+
X(t[o]) && X(r) ? t[o] = fe(t[o], r) : X(r) ? t[o] = fe({}, r) : z(r) ? t[o] = r.slice() : t[o] = r;
|
|
83
80
|
};
|
|
84
|
-
for (let
|
|
85
|
-
arguments[
|
|
81
|
+
for (let r = 0, s = arguments.length; r < s; r++)
|
|
82
|
+
arguments[r] && V(arguments[r], n);
|
|
86
83
|
return t;
|
|
87
84
|
}
|
|
88
|
-
const
|
|
89
|
-
n && _(
|
|
90
|
-
}, { allOwnKeys:
|
|
91
|
-
e.prototype = Object.create(t.prototype,
|
|
85
|
+
const Pt = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (s, o) => {
|
|
86
|
+
n && _(s) ? e[o] = He(s, n) : e[o] = s;
|
|
87
|
+
}, { allOwnKeys: r }), e), Ft = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Dt = (e, t, n, r) => {
|
|
88
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
92
89
|
value: t.prototype
|
|
93
90
|
}), n && Object.assign(e.prototype, n);
|
|
94
|
-
}, Bt = (e, t, n,
|
|
95
|
-
let
|
|
91
|
+
}, Bt = (e, t, n, r) => {
|
|
92
|
+
let s, o, i;
|
|
96
93
|
const c = {};
|
|
97
94
|
if (t = t || {}, e == null) return t;
|
|
98
95
|
do {
|
|
99
|
-
for (
|
|
100
|
-
i =
|
|
101
|
-
e = n !== !1 &&
|
|
96
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
97
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
98
|
+
e = n !== !1 && Re(e);
|
|
102
99
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
103
100
|
return t;
|
|
104
101
|
}, qt = (e, t, n) => {
|
|
105
102
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
106
|
-
const
|
|
107
|
-
return
|
|
103
|
+
const r = e.indexOf(t, n);
|
|
104
|
+
return r !== -1 && r === n;
|
|
108
105
|
}, Ht = (e) => {
|
|
109
106
|
if (!e) return null;
|
|
110
107
|
if (z(e)) return e;
|
|
@@ -114,36 +111,36 @@ const Lt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, o) => {
|
|
|
114
111
|
for (; t-- > 0; )
|
|
115
112
|
n[t] = e[t];
|
|
116
113
|
return n;
|
|
117
|
-
}, Mt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
118
|
-
const
|
|
119
|
-
let
|
|
120
|
-
for (; (
|
|
121
|
-
const o =
|
|
114
|
+
}, Mt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Re(Uint8Array)), jt = (e, t) => {
|
|
115
|
+
const r = (e && e[te]).call(e);
|
|
116
|
+
let s;
|
|
117
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
118
|
+
const o = s.value;
|
|
122
119
|
t.call(e, o[0], o[1]);
|
|
123
120
|
}
|
|
124
121
|
}, zt = (e, t) => {
|
|
125
122
|
let n;
|
|
126
|
-
const
|
|
123
|
+
const r = [];
|
|
127
124
|
for (; (n = e.exec(t)) !== null; )
|
|
128
|
-
|
|
129
|
-
return
|
|
130
|
-
},
|
|
125
|
+
r.push(n);
|
|
126
|
+
return r;
|
|
127
|
+
}, Gt = U("HTMLFormElement"), $t = (e) => e.toLowerCase().replace(
|
|
131
128
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
132
|
-
function(n,
|
|
133
|
-
return
|
|
129
|
+
function(n, r, s) {
|
|
130
|
+
return r.toUpperCase() + s;
|
|
134
131
|
}
|
|
135
|
-
),
|
|
136
|
-
const n = Object.getOwnPropertyDescriptors(e),
|
|
137
|
-
V(n, (
|
|
132
|
+
), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Kt = U("RegExp"), Ke = (e, t) => {
|
|
133
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
134
|
+
V(n, (s, o) => {
|
|
138
135
|
let i;
|
|
139
|
-
(i = t(
|
|
140
|
-
}), Object.defineProperties(e,
|
|
136
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
137
|
+
}), Object.defineProperties(e, r);
|
|
141
138
|
}, vt = (e) => {
|
|
142
|
-
|
|
139
|
+
Ke(e, (t, n) => {
|
|
143
140
|
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
144
141
|
return !1;
|
|
145
|
-
const
|
|
146
|
-
if (_(
|
|
142
|
+
const r = e[n];
|
|
143
|
+
if (_(r)) {
|
|
147
144
|
if (t.enumerable = !1, "writable" in t) {
|
|
148
145
|
t.writable = !1;
|
|
149
146
|
return;
|
|
@@ -154,61 +151,61 @@ const Lt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, o) => {
|
|
|
154
151
|
}
|
|
155
152
|
});
|
|
156
153
|
}, Vt = (e, t) => {
|
|
157
|
-
const n = {},
|
|
158
|
-
|
|
154
|
+
const n = {}, r = (s) => {
|
|
155
|
+
s.forEach((o) => {
|
|
159
156
|
n[o] = !0;
|
|
160
157
|
});
|
|
161
158
|
};
|
|
162
|
-
return z(e) ?
|
|
159
|
+
return z(e) ? r(e) : r(String(e).split(t)), n;
|
|
163
160
|
}, Jt = () => {
|
|
164
161
|
}, Wt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
165
162
|
function Xt(e) {
|
|
166
163
|
return !!(e && _(e.append) && e[Me] === "FormData" && e[te]);
|
|
167
164
|
}
|
|
168
165
|
const Yt = (e) => {
|
|
169
|
-
const t = new Array(10), n = (
|
|
170
|
-
if (
|
|
171
|
-
if (t.indexOf(
|
|
166
|
+
const t = new Array(10), n = (r, s) => {
|
|
167
|
+
if (se(r)) {
|
|
168
|
+
if (t.indexOf(r) >= 0)
|
|
172
169
|
return;
|
|
173
|
-
if (!("toJSON" in
|
|
174
|
-
t[
|
|
175
|
-
const o = z(
|
|
176
|
-
return V(
|
|
177
|
-
const f = n(i,
|
|
170
|
+
if (!("toJSON" in r)) {
|
|
171
|
+
t[s] = r;
|
|
172
|
+
const o = z(r) ? [] : {};
|
|
173
|
+
return V(r, (i, c) => {
|
|
174
|
+
const f = n(i, s + 1);
|
|
178
175
|
!v(f) && (o[c] = f);
|
|
179
|
-
}), t[
|
|
176
|
+
}), t[s] = void 0, o;
|
|
180
177
|
}
|
|
181
178
|
}
|
|
182
|
-
return
|
|
179
|
+
return r;
|
|
183
180
|
};
|
|
184
181
|
return n(e, 0);
|
|
185
|
-
}, Zt = U("AsyncFunction"), Qt = (e) => e && (
|
|
186
|
-
|
|
187
|
-
}, !1), (
|
|
188
|
-
|
|
182
|
+
}, Zt = U("AsyncFunction"), Qt = (e) => e && (se(e) || _(e)) && _(e.then) && _(e.catch), ve = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: s, data: o }) => {
|
|
183
|
+
s === q && o === n && r.length && r.shift()();
|
|
184
|
+
}, !1), (s) => {
|
|
185
|
+
r.push(s), q.postMessage(n, "*");
|
|
189
186
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
190
187
|
typeof setImmediate == "function",
|
|
191
188
|
_(q.postMessage)
|
|
192
189
|
), en = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || ve, tn = (e) => e != null && _(e[te]), a = {
|
|
193
190
|
isArray: z,
|
|
194
191
|
isArrayBuffer: je,
|
|
195
|
-
isBuffer:
|
|
192
|
+
isBuffer: St,
|
|
196
193
|
isFormData: Nt,
|
|
197
|
-
isArrayBufferView:
|
|
198
|
-
isString:
|
|
194
|
+
isArrayBufferView: gt,
|
|
195
|
+
isString: yt,
|
|
199
196
|
isNumber: ze,
|
|
200
197
|
isBoolean: wt,
|
|
201
|
-
isObject:
|
|
198
|
+
isObject: se,
|
|
202
199
|
isPlainObject: X,
|
|
203
|
-
isReadableStream:
|
|
200
|
+
isReadableStream: It,
|
|
204
201
|
isRequest: Ut,
|
|
205
|
-
isResponse:
|
|
206
|
-
isHeaders:
|
|
202
|
+
isResponse: xt,
|
|
203
|
+
isHeaders: kt,
|
|
207
204
|
isUndefined: v,
|
|
208
|
-
isDate:
|
|
209
|
-
isFile:
|
|
205
|
+
isDate: bt,
|
|
206
|
+
isFile: Tt,
|
|
210
207
|
isBlob: Ot,
|
|
211
|
-
isRegExp:
|
|
208
|
+
isRegExp: Kt,
|
|
212
209
|
isFunction: _,
|
|
213
210
|
isStream: _t,
|
|
214
211
|
isURLSearchParams: Ct,
|
|
@@ -216,8 +213,8 @@ const Yt = (e) => {
|
|
|
216
213
|
isFileList: At,
|
|
217
214
|
forEach: V,
|
|
218
215
|
merge: fe,
|
|
219
|
-
extend:
|
|
220
|
-
trim:
|
|
216
|
+
extend: Pt,
|
|
217
|
+
trim: Lt,
|
|
221
218
|
stripBOM: Ft,
|
|
222
219
|
inherits: Dt,
|
|
223
220
|
toFlatObject: Bt,
|
|
@@ -227,17 +224,17 @@ const Yt = (e) => {
|
|
|
227
224
|
toArray: Ht,
|
|
228
225
|
forEachEntry: jt,
|
|
229
226
|
matchAll: zt,
|
|
230
|
-
isHTMLForm:
|
|
231
|
-
hasOwnProperty:
|
|
232
|
-
hasOwnProp:
|
|
227
|
+
isHTMLForm: Gt,
|
|
228
|
+
hasOwnProperty: be,
|
|
229
|
+
hasOwnProp: be,
|
|
233
230
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
234
|
-
reduceDescriptors:
|
|
231
|
+
reduceDescriptors: Ke,
|
|
235
232
|
freezeMethods: vt,
|
|
236
233
|
toObjectSet: Vt,
|
|
237
234
|
toCamelCase: $t,
|
|
238
235
|
noop: Jt,
|
|
239
236
|
toFiniteNumber: Wt,
|
|
240
|
-
findKey:
|
|
237
|
+
findKey: Ge,
|
|
241
238
|
global: q,
|
|
242
239
|
isContextDefined: $e,
|
|
243
240
|
isSpecCompliantForm: Xt,
|
|
@@ -248,8 +245,8 @@ const Yt = (e) => {
|
|
|
248
245
|
asap: en,
|
|
249
246
|
isIterable: tn
|
|
250
247
|
};
|
|
251
|
-
function E(e, t, n,
|
|
252
|
-
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),
|
|
248
|
+
function E(e, t, n, r, s) {
|
|
249
|
+
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);
|
|
253
250
|
}
|
|
254
251
|
a.inherits(E, Error, {
|
|
255
252
|
toJSON: function() {
|
|
@@ -292,11 +289,11 @@ const Ve = E.prototype, Je = {};
|
|
|
292
289
|
});
|
|
293
290
|
Object.defineProperties(E, Je);
|
|
294
291
|
Object.defineProperty(Ve, "isAxiosError", { value: !0 });
|
|
295
|
-
E.from = (e, t, n,
|
|
292
|
+
E.from = (e, t, n, r, s, o) => {
|
|
296
293
|
const i = Object.create(Ve);
|
|
297
294
|
return a.toFlatObject(e, i, function(f) {
|
|
298
295
|
return f !== Error.prototype;
|
|
299
|
-
}, (c) => c !== "isAxiosError"), E.call(i, e.message, t, n,
|
|
296
|
+
}, (c) => c !== "isAxiosError"), E.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
300
297
|
};
|
|
301
298
|
const nn = null;
|
|
302
299
|
function de(e) {
|
|
@@ -305,15 +302,15 @@ function de(e) {
|
|
|
305
302
|
function We(e) {
|
|
306
303
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
307
304
|
}
|
|
308
|
-
function
|
|
309
|
-
return e ? e.concat(t).map(function(
|
|
310
|
-
return
|
|
305
|
+
function Te(e, t, n) {
|
|
306
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
307
|
+
return s = We(s), !n && o ? "[" + s + "]" : s;
|
|
311
308
|
}).join(n ? "." : "") : t;
|
|
312
309
|
}
|
|
313
|
-
function
|
|
310
|
+
function rn(e) {
|
|
314
311
|
return a.isArray(e) && !e.some(de);
|
|
315
312
|
}
|
|
316
|
-
const
|
|
313
|
+
const sn = a.toFlatObject(a, {}, null, function(t) {
|
|
317
314
|
return /^is[A-Z]/.test(t);
|
|
318
315
|
});
|
|
319
316
|
function oe(e, t, n) {
|
|
@@ -326,8 +323,8 @@ function oe(e, t, n) {
|
|
|
326
323
|
}, !1, function(m, p) {
|
|
327
324
|
return !a.isUndefined(p[m]);
|
|
328
325
|
});
|
|
329
|
-
const
|
|
330
|
-
if (!a.isFunction(
|
|
326
|
+
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
327
|
+
if (!a.isFunction(s))
|
|
331
328
|
throw new TypeError("visitor must be a function");
|
|
332
329
|
function u(h) {
|
|
333
330
|
if (h === null) return "";
|
|
@@ -338,44 +335,44 @@ function oe(e, t, n) {
|
|
|
338
335
|
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
339
336
|
}
|
|
340
337
|
function l(h, m, p) {
|
|
341
|
-
let
|
|
338
|
+
let g = h;
|
|
342
339
|
if (h && !p && typeof h == "object") {
|
|
343
340
|
if (a.endsWith(m, "{}"))
|
|
344
|
-
m =
|
|
345
|
-
else if (a.isArray(h) &&
|
|
346
|
-
return m = We(m),
|
|
347
|
-
!(a.isUndefined(
|
|
341
|
+
m = r ? m : m.slice(0, -2), h = JSON.stringify(h);
|
|
342
|
+
else if (a.isArray(h) && rn(h) || (a.isFileList(h) || a.endsWith(m, "[]")) && (g = a.toArray(h)))
|
|
343
|
+
return m = We(m), g.forEach(function(b, L) {
|
|
344
|
+
!(a.isUndefined(b) || b === null) && t.append(
|
|
348
345
|
// eslint-disable-next-line no-nested-ternary
|
|
349
|
-
i === !0 ?
|
|
350
|
-
u(
|
|
346
|
+
i === !0 ? Te([m], L, o) : i === null ? m : m + "[]",
|
|
347
|
+
u(b)
|
|
351
348
|
);
|
|
352
349
|
}), !1;
|
|
353
350
|
}
|
|
354
|
-
return de(h) ? !0 : (t.append(
|
|
351
|
+
return de(h) ? !0 : (t.append(Te(p, m, o), u(h)), !1);
|
|
355
352
|
}
|
|
356
|
-
const d = [],
|
|
353
|
+
const d = [], R = Object.assign(sn, {
|
|
357
354
|
defaultVisitor: l,
|
|
358
355
|
convertValue: u,
|
|
359
356
|
isVisitable: de
|
|
360
357
|
});
|
|
361
|
-
function
|
|
358
|
+
function S(h, m) {
|
|
362
359
|
if (!a.isUndefined(h)) {
|
|
363
360
|
if (d.indexOf(h) !== -1)
|
|
364
361
|
throw Error("Circular reference detected in " + m.join("."));
|
|
365
|
-
d.push(h), a.forEach(h, function(
|
|
366
|
-
(!(a.isUndefined(
|
|
362
|
+
d.push(h), a.forEach(h, function(g, w) {
|
|
363
|
+
(!(a.isUndefined(g) || g === null) && s.call(
|
|
367
364
|
t,
|
|
368
|
-
|
|
365
|
+
g,
|
|
369
366
|
a.isString(w) ? w.trim() : w,
|
|
370
367
|
m,
|
|
371
|
-
|
|
372
|
-
)) === !0 &&
|
|
368
|
+
R
|
|
369
|
+
)) === !0 && S(g, m ? m.concat(w) : [w]);
|
|
373
370
|
}), d.pop();
|
|
374
371
|
}
|
|
375
372
|
}
|
|
376
373
|
if (!a.isObject(e))
|
|
377
374
|
throw new TypeError("data must be an object");
|
|
378
|
-
return
|
|
375
|
+
return S(e), t;
|
|
379
376
|
}
|
|
380
377
|
function Oe(e) {
|
|
381
378
|
const t = {
|
|
@@ -387,23 +384,23 @@ function Oe(e) {
|
|
|
387
384
|
"%20": "+",
|
|
388
385
|
"%00": "\0"
|
|
389
386
|
};
|
|
390
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
391
|
-
return t[
|
|
387
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
388
|
+
return t[r];
|
|
392
389
|
});
|
|
393
390
|
}
|
|
394
|
-
function
|
|
391
|
+
function Se(e, t) {
|
|
395
392
|
this._pairs = [], e && oe(e, this, t);
|
|
396
393
|
}
|
|
397
|
-
const Xe =
|
|
394
|
+
const Xe = Se.prototype;
|
|
398
395
|
Xe.append = function(t, n) {
|
|
399
396
|
this._pairs.push([t, n]);
|
|
400
397
|
};
|
|
401
398
|
Xe.toString = function(t) {
|
|
402
|
-
const n = t ? function(
|
|
403
|
-
return t.call(this,
|
|
399
|
+
const n = t ? function(r) {
|
|
400
|
+
return t.call(this, r, Oe);
|
|
404
401
|
} : Oe;
|
|
405
|
-
return this._pairs.map(function(
|
|
406
|
-
return n(
|
|
402
|
+
return this._pairs.map(function(s) {
|
|
403
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
407
404
|
}, "").join("&");
|
|
408
405
|
};
|
|
409
406
|
function on(e) {
|
|
@@ -412,13 +409,13 @@ function on(e) {
|
|
|
412
409
|
function Ye(e, t, n) {
|
|
413
410
|
if (!t)
|
|
414
411
|
return e;
|
|
415
|
-
const
|
|
412
|
+
const r = n && n.encode || on;
|
|
416
413
|
a.isFunction(n) && (n = {
|
|
417
414
|
serialize: n
|
|
418
415
|
});
|
|
419
|
-
const
|
|
416
|
+
const s = n && n.serialize;
|
|
420
417
|
let o;
|
|
421
|
-
if (
|
|
418
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Se(t, n).toString(r), o) {
|
|
422
419
|
const i = e.indexOf("#");
|
|
423
420
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
424
421
|
}
|
|
@@ -436,12 +433,12 @@ class Ae {
|
|
|
436
433
|
*
|
|
437
434
|
* @return {Number} An ID used to remove interceptor later
|
|
438
435
|
*/
|
|
439
|
-
use(t, n,
|
|
436
|
+
use(t, n, r) {
|
|
440
437
|
return this.handlers.push({
|
|
441
438
|
fulfilled: t,
|
|
442
439
|
rejected: n,
|
|
443
|
-
synchronous:
|
|
444
|
-
runWhen:
|
|
440
|
+
synchronous: r ? r.synchronous : !1,
|
|
441
|
+
runWhen: r ? r.runWhen : null
|
|
445
442
|
}), this.handlers.length - 1;
|
|
446
443
|
}
|
|
447
444
|
/**
|
|
@@ -473,8 +470,8 @@ class Ae {
|
|
|
473
470
|
* @returns {void}
|
|
474
471
|
*/
|
|
475
472
|
forEach(t) {
|
|
476
|
-
a.forEach(this.handlers, function(
|
|
477
|
-
|
|
473
|
+
a.forEach(this.handlers, function(r) {
|
|
474
|
+
r !== null && t(r);
|
|
478
475
|
});
|
|
479
476
|
}
|
|
480
477
|
}
|
|
@@ -482,7 +479,7 @@ const Ze = {
|
|
|
482
479
|
silentJSONParsing: !0,
|
|
483
480
|
forcedJSONParsing: !0,
|
|
484
481
|
clarifyTimeoutError: !1
|
|
485
|
-
}, an = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
482
|
+
}, an = typeof URLSearchParams < "u" ? URLSearchParams : Se, cn = typeof FormData < "u" ? FormData : null, un = typeof Blob < "u" ? Blob : null, ln = {
|
|
486
483
|
isBrowser: !0,
|
|
487
484
|
classes: {
|
|
488
485
|
URLSearchParams: an,
|
|
@@ -490,10 +487,10 @@ const Ze = {
|
|
|
490
487
|
Blob: un
|
|
491
488
|
},
|
|
492
489
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
493
|
-
},
|
|
494
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", pn =
|
|
490
|
+
}, ge = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0, fn = ge && (!pe || ["ReactNative", "NativeScript", "NS"].indexOf(pe.product) < 0), dn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
491
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", pn = ge && window.location.href || "http://localhost", hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
495
492
|
__proto__: null,
|
|
496
|
-
hasBrowserEnv:
|
|
493
|
+
hasBrowserEnv: ge,
|
|
497
494
|
hasStandardBrowserEnv: fn,
|
|
498
495
|
hasStandardBrowserWebWorkerEnv: dn,
|
|
499
496
|
navigator: pe,
|
|
@@ -504,45 +501,45 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", pn
|
|
|
504
501
|
};
|
|
505
502
|
function mn(e, t) {
|
|
506
503
|
return oe(e, new O.classes.URLSearchParams(), Object.assign({
|
|
507
|
-
visitor: function(n,
|
|
508
|
-
return O.isNode && a.isBuffer(n) ? (this.append(
|
|
504
|
+
visitor: function(n, r, s, o) {
|
|
505
|
+
return O.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
509
506
|
}
|
|
510
507
|
}, t));
|
|
511
508
|
}
|
|
512
509
|
function En(e) {
|
|
513
510
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
514
511
|
}
|
|
515
|
-
function
|
|
512
|
+
function Rn(e) {
|
|
516
513
|
const t = {}, n = Object.keys(e);
|
|
517
|
-
let
|
|
518
|
-
const
|
|
514
|
+
let r;
|
|
515
|
+
const s = n.length;
|
|
519
516
|
let o;
|
|
520
|
-
for (
|
|
521
|
-
o = n[
|
|
517
|
+
for (r = 0; r < s; r++)
|
|
518
|
+
o = n[r], t[o] = e[o];
|
|
522
519
|
return t;
|
|
523
520
|
}
|
|
524
521
|
function Qe(e) {
|
|
525
|
-
function t(n,
|
|
522
|
+
function t(n, r, s, o) {
|
|
526
523
|
let i = n[o++];
|
|
527
524
|
if (i === "__proto__") return !0;
|
|
528
525
|
const c = Number.isFinite(+i), f = o >= n.length;
|
|
529
|
-
return i = !i && a.isArray(
|
|
526
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Rn(s[i])), !c);
|
|
530
527
|
}
|
|
531
528
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
532
529
|
const n = {};
|
|
533
|
-
return a.forEachEntry(e, (
|
|
534
|
-
t(En(
|
|
530
|
+
return a.forEachEntry(e, (r, s) => {
|
|
531
|
+
t(En(r), s, n, 0);
|
|
535
532
|
}), n;
|
|
536
533
|
}
|
|
537
534
|
return null;
|
|
538
535
|
}
|
|
539
|
-
function
|
|
536
|
+
function Sn(e, t, n) {
|
|
540
537
|
if (a.isString(e))
|
|
541
538
|
try {
|
|
542
539
|
return (t || JSON.parse)(e), a.trim(e);
|
|
543
|
-
} catch (
|
|
544
|
-
if (
|
|
545
|
-
throw
|
|
540
|
+
} catch (r) {
|
|
541
|
+
if (r.name !== "SyntaxError")
|
|
542
|
+
throw r;
|
|
546
543
|
}
|
|
547
544
|
return (n || JSON.stringify)(e);
|
|
548
545
|
}
|
|
@@ -550,9 +547,9 @@ const J = {
|
|
|
550
547
|
transitional: Ze,
|
|
551
548
|
adapter: ["xhr", "http", "fetch"],
|
|
552
549
|
transformRequest: [function(t, n) {
|
|
553
|
-
const
|
|
550
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
554
551
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
555
|
-
return
|
|
552
|
+
return s ? JSON.stringify(Qe(t)) : t;
|
|
556
553
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
557
554
|
return t;
|
|
558
555
|
if (a.isArrayBufferView(t))
|
|
@@ -561,9 +558,9 @@ const J = {
|
|
|
561
558
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
562
559
|
let c;
|
|
563
560
|
if (o) {
|
|
564
|
-
if (
|
|
561
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
565
562
|
return mn(t, this.formSerializer).toString();
|
|
566
|
-
if ((c = a.isFileList(t)) ||
|
|
563
|
+
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
567
564
|
const f = this.env && this.env.FormData;
|
|
568
565
|
return oe(
|
|
569
566
|
c ? { "files[]": t } : t,
|
|
@@ -572,14 +569,14 @@ const J = {
|
|
|
572
569
|
);
|
|
573
570
|
}
|
|
574
571
|
}
|
|
575
|
-
return o ||
|
|
572
|
+
return o || s ? (n.setContentType("application/json", !1), Sn(t)) : t;
|
|
576
573
|
}],
|
|
577
574
|
transformResponse: [function(t) {
|
|
578
|
-
const n = this.transitional || J.transitional,
|
|
575
|
+
const n = this.transitional || J.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
579
576
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
580
577
|
return t;
|
|
581
|
-
if (t && a.isString(t) && (
|
|
582
|
-
const i = !(n && n.silentJSONParsing) &&
|
|
578
|
+
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
579
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
583
580
|
try {
|
|
584
581
|
return JSON.parse(t);
|
|
585
582
|
} catch (c) {
|
|
@@ -615,7 +612,7 @@ const J = {
|
|
|
615
612
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
616
613
|
J.headers[e] = {};
|
|
617
614
|
});
|
|
618
|
-
const
|
|
615
|
+
const gn = a.toObjectSet([
|
|
619
616
|
"age",
|
|
620
617
|
"authorization",
|
|
621
618
|
"content-length",
|
|
@@ -633,15 +630,15 @@ const Sn = a.toObjectSet([
|
|
|
633
630
|
"referer",
|
|
634
631
|
"retry-after",
|
|
635
632
|
"user-agent"
|
|
636
|
-
]),
|
|
633
|
+
]), yn = (e) => {
|
|
637
634
|
const t = {};
|
|
638
|
-
let n,
|
|
635
|
+
let n, r, s;
|
|
639
636
|
return e && e.split(`
|
|
640
637
|
`).forEach(function(i) {
|
|
641
|
-
|
|
638
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.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);
|
|
642
639
|
}), t;
|
|
643
640
|
}, _e = Symbol("internals");
|
|
644
|
-
function
|
|
641
|
+
function K(e) {
|
|
645
642
|
return e && String(e).trim().toLowerCase();
|
|
646
643
|
}
|
|
647
644
|
function Y(e) {
|
|
@@ -649,31 +646,31 @@ function Y(e) {
|
|
|
649
646
|
}
|
|
650
647
|
function wn(e) {
|
|
651
648
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
652
|
-
let
|
|
653
|
-
for (;
|
|
654
|
-
t[
|
|
649
|
+
let r;
|
|
650
|
+
for (; r = n.exec(e); )
|
|
651
|
+
t[r[1]] = r[2];
|
|
655
652
|
return t;
|
|
656
653
|
}
|
|
657
|
-
const
|
|
658
|
-
function ce(e, t, n,
|
|
659
|
-
if (a.isFunction(
|
|
660
|
-
return
|
|
661
|
-
if (
|
|
662
|
-
if (a.isString(
|
|
663
|
-
return t.indexOf(
|
|
664
|
-
if (a.isRegExp(
|
|
665
|
-
return
|
|
654
|
+
const bn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
655
|
+
function ce(e, t, n, r, s) {
|
|
656
|
+
if (a.isFunction(r))
|
|
657
|
+
return r.call(this, t, n);
|
|
658
|
+
if (s && (t = n), !!a.isString(t)) {
|
|
659
|
+
if (a.isString(r))
|
|
660
|
+
return t.indexOf(r) !== -1;
|
|
661
|
+
if (a.isRegExp(r))
|
|
662
|
+
return r.test(t);
|
|
666
663
|
}
|
|
667
664
|
}
|
|
668
|
-
function
|
|
669
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n,
|
|
665
|
+
function Tn(e) {
|
|
666
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
670
667
|
}
|
|
671
668
|
function On(e, t) {
|
|
672
669
|
const n = a.toCamelCase(" " + t);
|
|
673
|
-
["get", "set", "has"].forEach((
|
|
674
|
-
Object.defineProperty(e,
|
|
675
|
-
value: function(
|
|
676
|
-
return this[
|
|
670
|
+
["get", "set", "has"].forEach((r) => {
|
|
671
|
+
Object.defineProperty(e, r + n, {
|
|
672
|
+
value: function(s, o, i) {
|
|
673
|
+
return this[r].call(this, t, s, o, i);
|
|
677
674
|
},
|
|
678
675
|
configurable: !0
|
|
679
676
|
});
|
|
@@ -683,20 +680,20 @@ let N = class {
|
|
|
683
680
|
constructor(t) {
|
|
684
681
|
t && this.set(t);
|
|
685
682
|
}
|
|
686
|
-
set(t, n,
|
|
687
|
-
const
|
|
683
|
+
set(t, n, r) {
|
|
684
|
+
const s = this;
|
|
688
685
|
function o(c, f, u) {
|
|
689
|
-
const l =
|
|
686
|
+
const l = K(f);
|
|
690
687
|
if (!l)
|
|
691
688
|
throw new Error("header name must be a non-empty string");
|
|
692
|
-
const d = a.findKey(
|
|
693
|
-
(!d ||
|
|
689
|
+
const d = a.findKey(s, l);
|
|
690
|
+
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = Y(c));
|
|
694
691
|
}
|
|
695
692
|
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
696
693
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
697
694
|
i(t, n);
|
|
698
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
699
|
-
i(
|
|
695
|
+
else if (a.isString(t) && (t = t.trim()) && !bn(t))
|
|
696
|
+
i(yn(t), n);
|
|
700
697
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
701
698
|
let c = {}, f, u;
|
|
702
699
|
for (const l of t) {
|
|
@@ -706,63 +703,63 @@ let N = class {
|
|
|
706
703
|
}
|
|
707
704
|
i(c, n);
|
|
708
705
|
} else
|
|
709
|
-
t != null && o(n, t,
|
|
706
|
+
t != null && o(n, t, r);
|
|
710
707
|
return this;
|
|
711
708
|
}
|
|
712
709
|
get(t, n) {
|
|
713
|
-
if (t =
|
|
714
|
-
const
|
|
715
|
-
if (
|
|
716
|
-
const
|
|
710
|
+
if (t = K(t), t) {
|
|
711
|
+
const r = a.findKey(this, t);
|
|
712
|
+
if (r) {
|
|
713
|
+
const s = this[r];
|
|
717
714
|
if (!n)
|
|
718
|
-
return
|
|
715
|
+
return s;
|
|
719
716
|
if (n === !0)
|
|
720
|
-
return wn(
|
|
717
|
+
return wn(s);
|
|
721
718
|
if (a.isFunction(n))
|
|
722
|
-
return n.call(this,
|
|
719
|
+
return n.call(this, s, r);
|
|
723
720
|
if (a.isRegExp(n))
|
|
724
|
-
return n.exec(
|
|
721
|
+
return n.exec(s);
|
|
725
722
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
726
723
|
}
|
|
727
724
|
}
|
|
728
725
|
}
|
|
729
726
|
has(t, n) {
|
|
730
|
-
if (t =
|
|
731
|
-
const
|
|
732
|
-
return !!(
|
|
727
|
+
if (t = K(t), t) {
|
|
728
|
+
const r = a.findKey(this, t);
|
|
729
|
+
return !!(r && this[r] !== void 0 && (!n || ce(this, this[r], r, n)));
|
|
733
730
|
}
|
|
734
731
|
return !1;
|
|
735
732
|
}
|
|
736
733
|
delete(t, n) {
|
|
737
|
-
const
|
|
738
|
-
let
|
|
734
|
+
const r = this;
|
|
735
|
+
let s = !1;
|
|
739
736
|
function o(i) {
|
|
740
|
-
if (i =
|
|
741
|
-
const c = a.findKey(
|
|
742
|
-
c && (!n || ce(
|
|
737
|
+
if (i = K(i), i) {
|
|
738
|
+
const c = a.findKey(r, i);
|
|
739
|
+
c && (!n || ce(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
743
740
|
}
|
|
744
741
|
}
|
|
745
|
-
return a.isArray(t) ? t.forEach(o) : o(t),
|
|
742
|
+
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
746
743
|
}
|
|
747
744
|
clear(t) {
|
|
748
745
|
const n = Object.keys(this);
|
|
749
|
-
let
|
|
750
|
-
for (;
|
|
751
|
-
const o = n[
|
|
752
|
-
(!t || ce(this, this[o], o, t, !0)) && (delete this[o],
|
|
746
|
+
let r = n.length, s = !1;
|
|
747
|
+
for (; r--; ) {
|
|
748
|
+
const o = n[r];
|
|
749
|
+
(!t || ce(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
753
750
|
}
|
|
754
|
-
return
|
|
751
|
+
return s;
|
|
755
752
|
}
|
|
756
753
|
normalize(t) {
|
|
757
|
-
const n = this,
|
|
758
|
-
return a.forEach(this, (
|
|
759
|
-
const i = a.findKey(
|
|
754
|
+
const n = this, r = {};
|
|
755
|
+
return a.forEach(this, (s, o) => {
|
|
756
|
+
const i = a.findKey(r, o);
|
|
760
757
|
if (i) {
|
|
761
|
-
n[i] = Y(
|
|
758
|
+
n[i] = Y(s), delete n[o];
|
|
762
759
|
return;
|
|
763
760
|
}
|
|
764
|
-
const c = t ?
|
|
765
|
-
c !== o && delete n[o], n[c] = Y(
|
|
761
|
+
const c = t ? Tn(o) : String(o).trim();
|
|
762
|
+
c !== o && delete n[o], n[c] = Y(s), r[c] = !0;
|
|
766
763
|
}), this;
|
|
767
764
|
}
|
|
768
765
|
concat(...t) {
|
|
@@ -770,8 +767,8 @@ let N = class {
|
|
|
770
767
|
}
|
|
771
768
|
toJSON(t) {
|
|
772
769
|
const n = /* @__PURE__ */ Object.create(null);
|
|
773
|
-
return a.forEach(this, (
|
|
774
|
-
|
|
770
|
+
return a.forEach(this, (r, s) => {
|
|
771
|
+
r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
|
775
772
|
}), n;
|
|
776
773
|
}
|
|
777
774
|
[Symbol.iterator]() {
|
|
@@ -791,16 +788,16 @@ let N = class {
|
|
|
791
788
|
return t instanceof this ? t : new this(t);
|
|
792
789
|
}
|
|
793
790
|
static concat(t, ...n) {
|
|
794
|
-
const
|
|
795
|
-
return n.forEach((
|
|
791
|
+
const r = new this(t);
|
|
792
|
+
return n.forEach((s) => r.set(s)), r;
|
|
796
793
|
}
|
|
797
794
|
static accessor(t) {
|
|
798
|
-
const
|
|
795
|
+
const r = (this[_e] = this[_e] = {
|
|
799
796
|
accessors: {}
|
|
800
|
-
}).accessors,
|
|
797
|
+
}).accessors, s = this.prototype;
|
|
801
798
|
function o(i) {
|
|
802
|
-
const c =
|
|
803
|
-
|
|
799
|
+
const c = K(i);
|
|
800
|
+
r[c] || (On(s, i), r[c] = !0);
|
|
804
801
|
}
|
|
805
802
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
806
803
|
}
|
|
@@ -810,31 +807,31 @@ a.reduceDescriptors(N.prototype, ({ value: e }, t) => {
|
|
|
810
807
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
811
808
|
return {
|
|
812
809
|
get: () => e,
|
|
813
|
-
set(
|
|
814
|
-
this[n] =
|
|
810
|
+
set(r) {
|
|
811
|
+
this[n] = r;
|
|
815
812
|
}
|
|
816
813
|
};
|
|
817
814
|
});
|
|
818
815
|
a.freezeMethods(N);
|
|
819
816
|
function ue(e, t) {
|
|
820
|
-
const n = this || J,
|
|
821
|
-
let o =
|
|
817
|
+
const n = this || J, r = t || n, s = N.from(r.headers);
|
|
818
|
+
let o = r.data;
|
|
822
819
|
return a.forEach(e, function(c) {
|
|
823
|
-
o = c.call(n, o,
|
|
824
|
-
}),
|
|
820
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
821
|
+
}), s.normalize(), o;
|
|
825
822
|
}
|
|
826
823
|
function et(e) {
|
|
827
824
|
return !!(e && e.__CANCEL__);
|
|
828
825
|
}
|
|
829
|
-
function
|
|
826
|
+
function G(e, t, n) {
|
|
830
827
|
E.call(this, e ?? "canceled", E.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
831
828
|
}
|
|
832
|
-
a.inherits(
|
|
829
|
+
a.inherits(G, E, {
|
|
833
830
|
__CANCEL__: !0
|
|
834
831
|
});
|
|
835
832
|
function tt(e, t, n) {
|
|
836
|
-
const
|
|
837
|
-
!n.status || !
|
|
833
|
+
const r = n.config.validateStatus;
|
|
834
|
+
!n.status || !r || r(n.status) ? e(n) : t(new E(
|
|
838
835
|
"Request failed with status code " + n.status,
|
|
839
836
|
[E.ERR_BAD_REQUEST, E.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
840
837
|
n.config,
|
|
@@ -848,38 +845,38 @@ function An(e) {
|
|
|
848
845
|
}
|
|
849
846
|
function _n(e, t) {
|
|
850
847
|
e = e || 10;
|
|
851
|
-
const n = new Array(e),
|
|
852
|
-
let
|
|
848
|
+
const n = new Array(e), r = new Array(e);
|
|
849
|
+
let s = 0, o = 0, i;
|
|
853
850
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
854
|
-
const u = Date.now(), l =
|
|
855
|
-
i || (i = u), n[
|
|
856
|
-
let d = o,
|
|
857
|
-
for (; d !==
|
|
858
|
-
|
|
859
|
-
if (
|
|
851
|
+
const u = Date.now(), l = r[o];
|
|
852
|
+
i || (i = u), n[s] = f, r[s] = u;
|
|
853
|
+
let d = o, R = 0;
|
|
854
|
+
for (; d !== s; )
|
|
855
|
+
R += n[d++], d = d % e;
|
|
856
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
860
857
|
return;
|
|
861
|
-
const
|
|
862
|
-
return
|
|
858
|
+
const S = l && u - l;
|
|
859
|
+
return S ? Math.round(R * 1e3 / S) : void 0;
|
|
863
860
|
};
|
|
864
861
|
}
|
|
865
862
|
function Nn(e, t) {
|
|
866
|
-
let n = 0,
|
|
863
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
867
864
|
const i = (u, l = Date.now()) => {
|
|
868
|
-
n = l,
|
|
865
|
+
n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
869
866
|
};
|
|
870
867
|
return [(...u) => {
|
|
871
868
|
const l = Date.now(), d = l - n;
|
|
872
|
-
d >=
|
|
873
|
-
o = null, i(
|
|
874
|
-
},
|
|
875
|
-
}, () =>
|
|
869
|
+
d >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
870
|
+
o = null, i(s);
|
|
871
|
+
}, r - d)));
|
|
872
|
+
}, () => s && i(s)];
|
|
876
873
|
}
|
|
877
874
|
const Q = (e, t, n = 3) => {
|
|
878
|
-
let
|
|
879
|
-
const
|
|
875
|
+
let r = 0;
|
|
876
|
+
const s = _n(50, 250);
|
|
880
877
|
return Nn((o) => {
|
|
881
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i -
|
|
882
|
-
|
|
878
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
879
|
+
r = i;
|
|
883
880
|
const d = {
|
|
884
881
|
loaded: i,
|
|
885
882
|
total: c,
|
|
@@ -895,20 +892,20 @@ const Q = (e, t, n = 3) => {
|
|
|
895
892
|
}, n);
|
|
896
893
|
}, Ne = (e, t) => {
|
|
897
894
|
const n = e != null;
|
|
898
|
-
return [(
|
|
895
|
+
return [(r) => t[0]({
|
|
899
896
|
lengthComputable: n,
|
|
900
897
|
total: e,
|
|
901
|
-
loaded:
|
|
898
|
+
loaded: r
|
|
902
899
|
}), t[1]];
|
|
903
900
|
}, Ce = (e) => (...t) => a.asap(() => e(...t)), Cn = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, O.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
904
901
|
new URL(O.origin),
|
|
905
902
|
O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
|
|
906
|
-
) : () => !0,
|
|
903
|
+
) : () => !0, In = O.hasStandardBrowserEnv ? (
|
|
907
904
|
// Standard browser envs support document.cookie
|
|
908
905
|
{
|
|
909
|
-
write(e, t, n,
|
|
906
|
+
write(e, t, n, r, s, o) {
|
|
910
907
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
911
|
-
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(
|
|
908
|
+
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
912
909
|
},
|
|
913
910
|
read(e) {
|
|
914
911
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -933,41 +930,41 @@ const Q = (e, t, n = 3) => {
|
|
|
933
930
|
function Un(e) {
|
|
934
931
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
935
932
|
}
|
|
936
|
-
function
|
|
933
|
+
function xn(e, t) {
|
|
937
934
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
938
935
|
}
|
|
939
936
|
function nt(e, t, n) {
|
|
940
|
-
let
|
|
941
|
-
return e && (
|
|
937
|
+
let r = !Un(t);
|
|
938
|
+
return e && (r || n == !1) ? xn(e, t) : t;
|
|
942
939
|
}
|
|
943
|
-
const
|
|
940
|
+
const Ie = (e) => e instanceof N ? { ...e } : e;
|
|
944
941
|
function M(e, t) {
|
|
945
942
|
t = t || {};
|
|
946
943
|
const n = {};
|
|
947
|
-
function
|
|
948
|
-
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless:
|
|
944
|
+
function r(u, l, d, R) {
|
|
945
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: R }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
949
946
|
}
|
|
950
|
-
function
|
|
947
|
+
function s(u, l, d, R) {
|
|
951
948
|
if (a.isUndefined(l)) {
|
|
952
949
|
if (!a.isUndefined(u))
|
|
953
|
-
return
|
|
954
|
-
} else return
|
|
950
|
+
return r(void 0, u, d, R);
|
|
951
|
+
} else return r(u, l, d, R);
|
|
955
952
|
}
|
|
956
953
|
function o(u, l) {
|
|
957
954
|
if (!a.isUndefined(l))
|
|
958
|
-
return
|
|
955
|
+
return r(void 0, l);
|
|
959
956
|
}
|
|
960
957
|
function i(u, l) {
|
|
961
958
|
if (a.isUndefined(l)) {
|
|
962
959
|
if (!a.isUndefined(u))
|
|
963
|
-
return
|
|
964
|
-
} else return
|
|
960
|
+
return r(void 0, u);
|
|
961
|
+
} else return r(void 0, l);
|
|
965
962
|
}
|
|
966
963
|
function c(u, l, d) {
|
|
967
964
|
if (d in t)
|
|
968
|
-
return
|
|
965
|
+
return r(u, l);
|
|
969
966
|
if (d in e)
|
|
970
|
-
return
|
|
967
|
+
return r(void 0, u);
|
|
971
968
|
}
|
|
972
969
|
const f = {
|
|
973
970
|
url: o,
|
|
@@ -998,16 +995,16 @@ function M(e, t) {
|
|
|
998
995
|
socketPath: i,
|
|
999
996
|
responseEncoding: i,
|
|
1000
997
|
validateStatus: c,
|
|
1001
|
-
headers: (u, l, d) =>
|
|
998
|
+
headers: (u, l, d) => s(Ie(u), Ie(l), d, !0)
|
|
1002
999
|
};
|
|
1003
1000
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1004
|
-
const d = f[l] ||
|
|
1005
|
-
a.isUndefined(
|
|
1001
|
+
const d = f[l] || s, R = d(e[l], t[l], l);
|
|
1002
|
+
a.isUndefined(R) && d !== c || (n[l] = R);
|
|
1006
1003
|
}), n;
|
|
1007
1004
|
}
|
|
1008
|
-
const
|
|
1005
|
+
const rt = (e) => {
|
|
1009
1006
|
const t = M({}, e);
|
|
1010
|
-
let { data: n, withXSRFToken:
|
|
1007
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1011
1008
|
t.headers = i = N.from(i), t.url = Ye(nt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1012
1009
|
"Authorization",
|
|
1013
1010
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
@@ -1021,77 +1018,77 @@ const st = (e) => {
|
|
|
1021
1018
|
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1022
1019
|
}
|
|
1023
1020
|
}
|
|
1024
|
-
if (O.hasStandardBrowserEnv && (
|
|
1025
|
-
const u =
|
|
1026
|
-
u && i.set(
|
|
1021
|
+
if (O.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Cn(t.url))) {
|
|
1022
|
+
const u = s && o && In.read(o);
|
|
1023
|
+
u && i.set(s, u);
|
|
1027
1024
|
}
|
|
1028
1025
|
return t;
|
|
1029
|
-
},
|
|
1030
|
-
return new Promise(function(n,
|
|
1031
|
-
const
|
|
1032
|
-
let o =
|
|
1033
|
-
const i = N.from(
|
|
1034
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } =
|
|
1026
|
+
}, kn = typeof XMLHttpRequest < "u", Ln = kn && function(e) {
|
|
1027
|
+
return new Promise(function(n, r) {
|
|
1028
|
+
const s = rt(e);
|
|
1029
|
+
let o = s.data;
|
|
1030
|
+
const i = N.from(s.headers).normalize();
|
|
1031
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, R, S, h;
|
|
1035
1032
|
function m() {
|
|
1036
|
-
|
|
1033
|
+
S && S(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1037
1034
|
}
|
|
1038
1035
|
let p = new XMLHttpRequest();
|
|
1039
|
-
p.open(
|
|
1040
|
-
function
|
|
1036
|
+
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1037
|
+
function g() {
|
|
1041
1038
|
if (!p)
|
|
1042
1039
|
return;
|
|
1043
|
-
const
|
|
1040
|
+
const b = N.from(
|
|
1044
1041
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1045
1042
|
), A = {
|
|
1046
1043
|
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1047
1044
|
status: p.status,
|
|
1048
1045
|
statusText: p.statusText,
|
|
1049
|
-
headers:
|
|
1046
|
+
headers: b,
|
|
1050
1047
|
config: e,
|
|
1051
1048
|
request: p
|
|
1052
1049
|
};
|
|
1053
1050
|
tt(function(B) {
|
|
1054
1051
|
n(B), m();
|
|
1055
1052
|
}, function(B) {
|
|
1056
|
-
|
|
1053
|
+
r(B), m();
|
|
1057
1054
|
}, A), p = null;
|
|
1058
1055
|
}
|
|
1059
|
-
"onloadend" in p ? p.onloadend =
|
|
1060
|
-
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1056
|
+
"onloadend" in p ? p.onloadend = g : p.onreadystatechange = function() {
|
|
1057
|
+
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1061
1058
|
}, p.onabort = function() {
|
|
1062
|
-
p && (
|
|
1059
|
+
p && (r(new E("Request aborted", E.ECONNABORTED, e, p)), p = null);
|
|
1063
1060
|
}, p.onerror = function() {
|
|
1064
|
-
|
|
1061
|
+
r(new E("Network Error", E.ERR_NETWORK, e, p)), p = null;
|
|
1065
1062
|
}, p.ontimeout = function() {
|
|
1066
|
-
let
|
|
1067
|
-
const A =
|
|
1068
|
-
|
|
1069
|
-
|
|
1063
|
+
let L = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1064
|
+
const A = s.transitional || Ze;
|
|
1065
|
+
s.timeoutErrorMessage && (L = s.timeoutErrorMessage), r(new E(
|
|
1066
|
+
L,
|
|
1070
1067
|
A.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
|
1071
1068
|
e,
|
|
1072
1069
|
p
|
|
1073
1070
|
)), p = null;
|
|
1074
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(
|
|
1075
|
-
p.setRequestHeader(A,
|
|
1076
|
-
}), a.isUndefined(
|
|
1077
|
-
p && (
|
|
1078
|
-
},
|
|
1079
|
-
const w = An(
|
|
1071
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(L, A) {
|
|
1072
|
+
p.setRequestHeader(A, L);
|
|
1073
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([R, h] = Q(u, !0), p.addEventListener("progress", R)), f && p.upload && ([d, S] = Q(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (l = (b) => {
|
|
1074
|
+
p && (r(!b || b.type ? new G(null, e, p) : b), p.abort(), p = null);
|
|
1075
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1076
|
+
const w = An(s.url);
|
|
1080
1077
|
if (w && O.protocols.indexOf(w) === -1) {
|
|
1081
|
-
|
|
1078
|
+
r(new E("Unsupported protocol " + w + ":", E.ERR_BAD_REQUEST, e));
|
|
1082
1079
|
return;
|
|
1083
1080
|
}
|
|
1084
1081
|
p.send(o || null);
|
|
1085
1082
|
});
|
|
1086
|
-
},
|
|
1083
|
+
}, Pn = (e, t) => {
|
|
1087
1084
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1088
1085
|
if (t || n) {
|
|
1089
|
-
let
|
|
1086
|
+
let r = new AbortController(), s;
|
|
1090
1087
|
const o = function(u) {
|
|
1091
|
-
if (!
|
|
1092
|
-
|
|
1088
|
+
if (!s) {
|
|
1089
|
+
s = !0, c();
|
|
1093
1090
|
const l = u instanceof Error ? u : this.reason;
|
|
1094
|
-
|
|
1091
|
+
r.abort(l instanceof E ? l : new G(l instanceof Error ? l.message : l));
|
|
1095
1092
|
}
|
|
1096
1093
|
};
|
|
1097
1094
|
let i = t && setTimeout(() => {
|
|
@@ -1103,7 +1100,7 @@ const st = (e) => {
|
|
|
1103
1100
|
}), e = null);
|
|
1104
1101
|
};
|
|
1105
1102
|
e.forEach((u) => u.addEventListener("abort", o));
|
|
1106
|
-
const { signal: f } =
|
|
1103
|
+
const { signal: f } = r;
|
|
1107
1104
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1108
1105
|
}
|
|
1109
1106
|
}, Fn = function* (e, t) {
|
|
@@ -1112,9 +1109,9 @@ const st = (e) => {
|
|
|
1112
1109
|
yield e;
|
|
1113
1110
|
return;
|
|
1114
1111
|
}
|
|
1115
|
-
let
|
|
1116
|
-
for (;
|
|
1117
|
-
|
|
1112
|
+
let r = 0, s;
|
|
1113
|
+
for (; r < n; )
|
|
1114
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1118
1115
|
}, Dn = async function* (e, t) {
|
|
1119
1116
|
for await (const n of Bn(e))
|
|
1120
1117
|
yield* Fn(n, t);
|
|
@@ -1126,31 +1123,31 @@ const st = (e) => {
|
|
|
1126
1123
|
const t = e.getReader();
|
|
1127
1124
|
try {
|
|
1128
1125
|
for (; ; ) {
|
|
1129
|
-
const { done: n, value:
|
|
1126
|
+
const { done: n, value: r } = await t.read();
|
|
1130
1127
|
if (n)
|
|
1131
1128
|
break;
|
|
1132
|
-
yield
|
|
1129
|
+
yield r;
|
|
1133
1130
|
}
|
|
1134
1131
|
} finally {
|
|
1135
1132
|
await t.cancel();
|
|
1136
1133
|
}
|
|
1137
|
-
}, Ue = (e, t, n,
|
|
1138
|
-
const
|
|
1134
|
+
}, Ue = (e, t, n, r) => {
|
|
1135
|
+
const s = Dn(e, t);
|
|
1139
1136
|
let o = 0, i, c = (f) => {
|
|
1140
|
-
i || (i = !0,
|
|
1137
|
+
i || (i = !0, r && r(f));
|
|
1141
1138
|
};
|
|
1142
1139
|
return new ReadableStream({
|
|
1143
1140
|
async pull(f) {
|
|
1144
1141
|
try {
|
|
1145
|
-
const { done: u, value: l } = await
|
|
1142
|
+
const { done: u, value: l } = await s.next();
|
|
1146
1143
|
if (u) {
|
|
1147
1144
|
c(), f.close();
|
|
1148
1145
|
return;
|
|
1149
1146
|
}
|
|
1150
1147
|
let d = l.byteLength;
|
|
1151
1148
|
if (n) {
|
|
1152
|
-
let
|
|
1153
|
-
n(
|
|
1149
|
+
let R = o += d;
|
|
1150
|
+
n(R);
|
|
1154
1151
|
}
|
|
1155
1152
|
f.enqueue(new Uint8Array(l));
|
|
1156
1153
|
} catch (u) {
|
|
@@ -1158,18 +1155,18 @@ const st = (e) => {
|
|
|
1158
1155
|
}
|
|
1159
1156
|
},
|
|
1160
1157
|
cancel(f) {
|
|
1161
|
-
return c(f),
|
|
1158
|
+
return c(f), s.return();
|
|
1162
1159
|
}
|
|
1163
1160
|
}, {
|
|
1164
1161
|
highWaterMark: 2
|
|
1165
1162
|
});
|
|
1166
|
-
}, ie = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1163
|
+
}, ie = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", st = ie && typeof ReadableStream == "function", qn = ie && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), ot = (e, ...t) => {
|
|
1167
1164
|
try {
|
|
1168
1165
|
return !!e(...t);
|
|
1169
1166
|
} catch {
|
|
1170
1167
|
return !1;
|
|
1171
1168
|
}
|
|
1172
|
-
}, Hn =
|
|
1169
|
+
}, Hn = st && ot(() => {
|
|
1173
1170
|
let e = !1;
|
|
1174
1171
|
const t = new Request(O.origin, {
|
|
1175
1172
|
body: new ReadableStream(),
|
|
@@ -1179,13 +1176,13 @@ const st = (e) => {
|
|
|
1179
1176
|
}
|
|
1180
1177
|
}).headers.has("Content-Type");
|
|
1181
1178
|
return e && !t;
|
|
1182
|
-
}),
|
|
1179
|
+
}), xe = 64 * 1024, he = st && ot(() => a.isReadableStream(new Response("").body)), ee = {
|
|
1183
1180
|
stream: he && ((e) => e.body)
|
|
1184
1181
|
};
|
|
1185
1182
|
ie && ((e) => {
|
|
1186
1183
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1187
|
-
!ee[t] && (ee[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n,
|
|
1188
|
-
throw new E(`Response type '${t}' is not supported`, E.ERR_NOT_SUPPORT,
|
|
1184
|
+
!ee[t] && (ee[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1185
|
+
throw new E(`Response type '${t}' is not supported`, E.ERR_NOT_SUPPORT, r);
|
|
1189
1186
|
});
|
|
1190
1187
|
});
|
|
1191
1188
|
})(new Response());
|
|
@@ -1210,8 +1207,8 @@ const Mn = async (e) => {
|
|
|
1210
1207
|
let {
|
|
1211
1208
|
url: t,
|
|
1212
1209
|
method: n,
|
|
1213
|
-
data:
|
|
1214
|
-
signal:
|
|
1210
|
+
data: r,
|
|
1211
|
+
signal: s,
|
|
1215
1212
|
cancelToken: o,
|
|
1216
1213
|
timeout: i,
|
|
1217
1214
|
onDownloadProgress: c,
|
|
@@ -1219,63 +1216,63 @@ const Mn = async (e) => {
|
|
|
1219
1216
|
responseType: u,
|
|
1220
1217
|
headers: l,
|
|
1221
1218
|
withCredentials: d = "same-origin",
|
|
1222
|
-
fetchOptions:
|
|
1223
|
-
} =
|
|
1219
|
+
fetchOptions: R
|
|
1220
|
+
} = rt(e);
|
|
1224
1221
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1225
|
-
let
|
|
1226
|
-
const m =
|
|
1227
|
-
|
|
1222
|
+
let S = Pn([s, o && o.toAbortSignal()], i), h;
|
|
1223
|
+
const m = S && S.unsubscribe && (() => {
|
|
1224
|
+
S.unsubscribe();
|
|
1228
1225
|
});
|
|
1229
1226
|
let p;
|
|
1230
1227
|
try {
|
|
1231
|
-
if (f && Hn && n !== "get" && n !== "head" && (p = await jn(l,
|
|
1228
|
+
if (f && Hn && n !== "get" && n !== "head" && (p = await jn(l, r)) !== 0) {
|
|
1232
1229
|
let A = new Request(t, {
|
|
1233
1230
|
method: "POST",
|
|
1234
|
-
body:
|
|
1231
|
+
body: r,
|
|
1235
1232
|
duplex: "half"
|
|
1236
1233
|
}), F;
|
|
1237
|
-
if (a.isFormData(
|
|
1234
|
+
if (a.isFormData(r) && (F = A.headers.get("content-type")) && l.setContentType(F), A.body) {
|
|
1238
1235
|
const [B, W] = Ne(
|
|
1239
1236
|
p,
|
|
1240
1237
|
Q(Ce(f))
|
|
1241
1238
|
);
|
|
1242
|
-
|
|
1239
|
+
r = Ue(A.body, xe, B, W);
|
|
1243
1240
|
}
|
|
1244
1241
|
}
|
|
1245
1242
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
1246
|
-
const
|
|
1243
|
+
const g = "credentials" in Request.prototype;
|
|
1247
1244
|
h = new Request(t, {
|
|
1248
|
-
...
|
|
1249
|
-
signal:
|
|
1245
|
+
...R,
|
|
1246
|
+
signal: S,
|
|
1250
1247
|
method: n.toUpperCase(),
|
|
1251
1248
|
headers: l.normalize().toJSON(),
|
|
1252
|
-
body:
|
|
1249
|
+
body: r,
|
|
1253
1250
|
duplex: "half",
|
|
1254
|
-
credentials:
|
|
1251
|
+
credentials: g ? d : void 0
|
|
1255
1252
|
});
|
|
1256
1253
|
let w = await fetch(h);
|
|
1257
|
-
const
|
|
1258
|
-
if (he && (c ||
|
|
1254
|
+
const b = he && (u === "stream" || u === "response");
|
|
1255
|
+
if (he && (c || b && m)) {
|
|
1259
1256
|
const A = {};
|
|
1260
|
-
["status", "statusText", "headers"].forEach((
|
|
1261
|
-
A[
|
|
1257
|
+
["status", "statusText", "headers"].forEach((ye) => {
|
|
1258
|
+
A[ye] = w[ye];
|
|
1262
1259
|
});
|
|
1263
1260
|
const F = a.toFiniteNumber(w.headers.get("content-length")), [B, W] = c && Ne(
|
|
1264
1261
|
F,
|
|
1265
1262
|
Q(Ce(c), !0)
|
|
1266
1263
|
) || [];
|
|
1267
1264
|
w = new Response(
|
|
1268
|
-
Ue(w.body,
|
|
1265
|
+
Ue(w.body, xe, B, () => {
|
|
1269
1266
|
W && W(), m && m();
|
|
1270
1267
|
}),
|
|
1271
1268
|
A
|
|
1272
1269
|
);
|
|
1273
1270
|
}
|
|
1274
1271
|
u = u || "text";
|
|
1275
|
-
let
|
|
1276
|
-
return !
|
|
1272
|
+
let L = await ee[a.findKey(ee, u) || "text"](w, e);
|
|
1273
|
+
return !b && m && m(), await new Promise((A, F) => {
|
|
1277
1274
|
tt(A, F, {
|
|
1278
|
-
data:
|
|
1275
|
+
data: L,
|
|
1279
1276
|
headers: N.from(w.headers),
|
|
1280
1277
|
status: w.status,
|
|
1281
1278
|
statusText: w.statusText,
|
|
@@ -1283,17 +1280,17 @@ const Mn = async (e) => {
|
|
|
1283
1280
|
request: h
|
|
1284
1281
|
});
|
|
1285
1282
|
});
|
|
1286
|
-
} catch (
|
|
1287
|
-
throw m && m(),
|
|
1283
|
+
} catch (g) {
|
|
1284
|
+
throw m && m(), g && g.name === "TypeError" && /Load failed|fetch/i.test(g.message) ? Object.assign(
|
|
1288
1285
|
new E("Network Error", E.ERR_NETWORK, e, h),
|
|
1289
1286
|
{
|
|
1290
|
-
cause:
|
|
1287
|
+
cause: g.cause || g
|
|
1291
1288
|
}
|
|
1292
|
-
) : E.from(
|
|
1289
|
+
) : E.from(g, g && g.code, e, h);
|
|
1293
1290
|
}
|
|
1294
1291
|
}), me = {
|
|
1295
1292
|
http: nn,
|
|
1296
|
-
xhr:
|
|
1293
|
+
xhr: Ln,
|
|
1297
1294
|
fetch: zn
|
|
1298
1295
|
};
|
|
1299
1296
|
a.forEach(me, (e, t) => {
|
|
@@ -1305,78 +1302,78 @@ a.forEach(me, (e, t) => {
|
|
|
1305
1302
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1306
1303
|
}
|
|
1307
1304
|
});
|
|
1308
|
-
const
|
|
1305
|
+
const ke = (e) => `- ${e}`, Gn = (e) => a.isFunction(e) || e === null || e === !1, it = {
|
|
1309
1306
|
getAdapter: (e) => {
|
|
1310
1307
|
e = a.isArray(e) ? e : [e];
|
|
1311
1308
|
const { length: t } = e;
|
|
1312
|
-
let n,
|
|
1313
|
-
const
|
|
1309
|
+
let n, r;
|
|
1310
|
+
const s = {};
|
|
1314
1311
|
for (let o = 0; o < t; o++) {
|
|
1315
1312
|
n = e[o];
|
|
1316
1313
|
let i;
|
|
1317
|
-
if (
|
|
1314
|
+
if (r = n, !Gn(n) && (r = me[(i = String(n)).toLowerCase()], r === void 0))
|
|
1318
1315
|
throw new E(`Unknown adapter '${i}'`);
|
|
1319
|
-
if (
|
|
1316
|
+
if (r)
|
|
1320
1317
|
break;
|
|
1321
|
-
|
|
1318
|
+
s[i || "#" + o] = r;
|
|
1322
1319
|
}
|
|
1323
|
-
if (!
|
|
1324
|
-
const o = Object.entries(
|
|
1320
|
+
if (!r) {
|
|
1321
|
+
const o = Object.entries(s).map(
|
|
1325
1322
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1326
1323
|
);
|
|
1327
1324
|
let i = t ? o.length > 1 ? `since :
|
|
1328
|
-
` + o.map(
|
|
1329
|
-
`) : " " +
|
|
1325
|
+
` + o.map(ke).join(`
|
|
1326
|
+
`) : " " + ke(o[0]) : "as no adapter specified";
|
|
1330
1327
|
throw new E(
|
|
1331
1328
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1332
1329
|
"ERR_NOT_SUPPORT"
|
|
1333
1330
|
);
|
|
1334
1331
|
}
|
|
1335
|
-
return
|
|
1332
|
+
return r;
|
|
1336
1333
|
},
|
|
1337
1334
|
adapters: me
|
|
1338
1335
|
};
|
|
1339
1336
|
function le(e) {
|
|
1340
1337
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1341
|
-
throw new
|
|
1338
|
+
throw new G(null, e);
|
|
1342
1339
|
}
|
|
1343
|
-
function
|
|
1340
|
+
function Le(e) {
|
|
1344
1341
|
return le(e), e.headers = N.from(e.headers), e.data = ue.call(
|
|
1345
1342
|
e,
|
|
1346
1343
|
e.transformRequest
|
|
1347
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), it.getAdapter(e.adapter || J.adapter)(e).then(function(
|
|
1348
|
-
return le(e),
|
|
1344
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), it.getAdapter(e.adapter || J.adapter)(e).then(function(r) {
|
|
1345
|
+
return le(e), r.data = ue.call(
|
|
1349
1346
|
e,
|
|
1350
1347
|
e.transformResponse,
|
|
1351
|
-
|
|
1352
|
-
),
|
|
1353
|
-
}, function(
|
|
1354
|
-
return et(
|
|
1348
|
+
r
|
|
1349
|
+
), r.headers = N.from(r.headers), r;
|
|
1350
|
+
}, function(r) {
|
|
1351
|
+
return et(r) || (le(e), r && r.response && (r.response.data = ue.call(
|
|
1355
1352
|
e,
|
|
1356
1353
|
e.transformResponse,
|
|
1357
|
-
|
|
1358
|
-
),
|
|
1354
|
+
r.response
|
|
1355
|
+
), r.response.headers = N.from(r.response.headers))), Promise.reject(r);
|
|
1359
1356
|
});
|
|
1360
1357
|
}
|
|
1361
1358
|
const at = "1.9.0", ae = {};
|
|
1362
1359
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1363
|
-
ae[e] = function(
|
|
1364
|
-
return typeof
|
|
1360
|
+
ae[e] = function(r) {
|
|
1361
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1365
1362
|
};
|
|
1366
1363
|
});
|
|
1367
|
-
const
|
|
1368
|
-
ae.transitional = function(t, n,
|
|
1369
|
-
function
|
|
1370
|
-
return "[Axios v" + at + "] Transitional option '" + o + "'" + i + (
|
|
1364
|
+
const Pe = {};
|
|
1365
|
+
ae.transitional = function(t, n, r) {
|
|
1366
|
+
function s(o, i) {
|
|
1367
|
+
return "[Axios v" + at + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1371
1368
|
}
|
|
1372
1369
|
return (o, i, c) => {
|
|
1373
1370
|
if (t === !1)
|
|
1374
1371
|
throw new E(
|
|
1375
|
-
|
|
1372
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1376
1373
|
E.ERR_DEPRECATED
|
|
1377
1374
|
);
|
|
1378
|
-
return n && !
|
|
1379
|
-
|
|
1375
|
+
return n && !Pe[i] && (Pe[i] = !0, console.warn(
|
|
1376
|
+
s(
|
|
1380
1377
|
i,
|
|
1381
1378
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1382
1379
|
)
|
|
@@ -1384,15 +1381,15 @@ ae.transitional = function(t, n, s) {
|
|
|
1384
1381
|
};
|
|
1385
1382
|
};
|
|
1386
1383
|
ae.spelling = function(t) {
|
|
1387
|
-
return (n,
|
|
1384
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1388
1385
|
};
|
|
1389
1386
|
function $n(e, t, n) {
|
|
1390
1387
|
if (typeof e != "object")
|
|
1391
1388
|
throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
|
|
1392
|
-
const
|
|
1393
|
-
let
|
|
1394
|
-
for (;
|
|
1395
|
-
const o = s
|
|
1389
|
+
const r = Object.keys(e);
|
|
1390
|
+
let s = r.length;
|
|
1391
|
+
for (; s-- > 0; ) {
|
|
1392
|
+
const o = r[s], i = t[o];
|
|
1396
1393
|
if (i) {
|
|
1397
1394
|
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1398
1395
|
if (f !== !0)
|
|
@@ -1406,7 +1403,7 @@ function $n(e, t, n) {
|
|
|
1406
1403
|
const Z = {
|
|
1407
1404
|
assertOptions: $n,
|
|
1408
1405
|
validators: ae
|
|
1409
|
-
},
|
|
1406
|
+
}, x = Z.validators;
|
|
1410
1407
|
let H = class {
|
|
1411
1408
|
constructor(t) {
|
|
1412
1409
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -1425,35 +1422,35 @@ let H = class {
|
|
|
1425
1422
|
async request(t, n) {
|
|
1426
1423
|
try {
|
|
1427
1424
|
return await this._request(t, n);
|
|
1428
|
-
} catch (
|
|
1429
|
-
if (
|
|
1430
|
-
let
|
|
1431
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1432
|
-
const o =
|
|
1425
|
+
} catch (r) {
|
|
1426
|
+
if (r instanceof Error) {
|
|
1427
|
+
let s = {};
|
|
1428
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1429
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1433
1430
|
try {
|
|
1434
|
-
|
|
1435
|
-
` + o) :
|
|
1431
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1432
|
+
` + o) : r.stack = o;
|
|
1436
1433
|
} catch {
|
|
1437
1434
|
}
|
|
1438
1435
|
}
|
|
1439
|
-
throw
|
|
1436
|
+
throw r;
|
|
1440
1437
|
}
|
|
1441
1438
|
}
|
|
1442
1439
|
_request(t, n) {
|
|
1443
1440
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = M(this.defaults, n);
|
|
1444
|
-
const { transitional:
|
|
1445
|
-
|
|
1446
|
-
silentJSONParsing:
|
|
1447
|
-
forcedJSONParsing:
|
|
1448
|
-
clarifyTimeoutError:
|
|
1449
|
-
}, !1),
|
|
1450
|
-
serialize:
|
|
1451
|
-
} : Z.assertOptions(
|
|
1452
|
-
encode:
|
|
1453
|
-
serialize:
|
|
1441
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1442
|
+
r !== void 0 && Z.assertOptions(r, {
|
|
1443
|
+
silentJSONParsing: x.transitional(x.boolean),
|
|
1444
|
+
forcedJSONParsing: x.transitional(x.boolean),
|
|
1445
|
+
clarifyTimeoutError: x.transitional(x.boolean)
|
|
1446
|
+
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1447
|
+
serialize: s
|
|
1448
|
+
} : Z.assertOptions(s, {
|
|
1449
|
+
encode: x.function,
|
|
1450
|
+
serialize: x.function
|
|
1454
1451
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Z.assertOptions(n, {
|
|
1455
|
-
baseUrl:
|
|
1456
|
-
withXsrfToken:
|
|
1452
|
+
baseUrl: x.spelling("baseURL"),
|
|
1453
|
+
withXsrfToken: x.spelling("withXSRFToken")
|
|
1457
1454
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1458
1455
|
let i = o && a.merge(
|
|
1459
1456
|
o.common,
|
|
@@ -1474,30 +1471,30 @@ let H = class {
|
|
|
1474
1471
|
this.interceptors.response.forEach(function(m) {
|
|
1475
1472
|
u.push(m.fulfilled, m.rejected);
|
|
1476
1473
|
});
|
|
1477
|
-
let l, d = 0,
|
|
1474
|
+
let l, d = 0, R;
|
|
1478
1475
|
if (!f) {
|
|
1479
|
-
const h = [
|
|
1480
|
-
for (h.unshift.apply(h, c), h.push.apply(h, u),
|
|
1476
|
+
const h = [Le.bind(this), void 0];
|
|
1477
|
+
for (h.unshift.apply(h, c), h.push.apply(h, u), R = h.length, l = Promise.resolve(n); d < R; )
|
|
1481
1478
|
l = l.then(h[d++], h[d++]);
|
|
1482
1479
|
return l;
|
|
1483
1480
|
}
|
|
1484
|
-
|
|
1485
|
-
let
|
|
1486
|
-
for (d = 0; d <
|
|
1481
|
+
R = c.length;
|
|
1482
|
+
let S = n;
|
|
1483
|
+
for (d = 0; d < R; ) {
|
|
1487
1484
|
const h = c[d++], m = c[d++];
|
|
1488
1485
|
try {
|
|
1489
|
-
|
|
1486
|
+
S = h(S);
|
|
1490
1487
|
} catch (p) {
|
|
1491
1488
|
m.call(this, p);
|
|
1492
1489
|
break;
|
|
1493
1490
|
}
|
|
1494
1491
|
}
|
|
1495
1492
|
try {
|
|
1496
|
-
l =
|
|
1493
|
+
l = Le.call(this, S);
|
|
1497
1494
|
} catch (h) {
|
|
1498
1495
|
return Promise.reject(h);
|
|
1499
1496
|
}
|
|
1500
|
-
for (d = 0,
|
|
1497
|
+
for (d = 0, R = u.length; d < R; )
|
|
1501
1498
|
l = l.then(u[d++], u[d++]);
|
|
1502
1499
|
return l;
|
|
1503
1500
|
}
|
|
@@ -1508,20 +1505,20 @@ let H = class {
|
|
|
1508
1505
|
}
|
|
1509
1506
|
};
|
|
1510
1507
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1511
|
-
H.prototype[t] = function(n,
|
|
1512
|
-
return this.request(M(
|
|
1508
|
+
H.prototype[t] = function(n, r) {
|
|
1509
|
+
return this.request(M(r || {}, {
|
|
1513
1510
|
method: t,
|
|
1514
1511
|
url: n,
|
|
1515
|
-
data: (
|
|
1512
|
+
data: (r || {}).data
|
|
1516
1513
|
}));
|
|
1517
1514
|
};
|
|
1518
1515
|
});
|
|
1519
1516
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1520
|
-
function n(
|
|
1517
|
+
function n(r) {
|
|
1521
1518
|
return function(o, i, c) {
|
|
1522
1519
|
return this.request(M(c || {}, {
|
|
1523
1520
|
method: t,
|
|
1524
|
-
headers:
|
|
1521
|
+
headers: r ? {
|
|
1525
1522
|
"Content-Type": "multipart/form-data"
|
|
1526
1523
|
} : {},
|
|
1527
1524
|
url: o,
|
|
@@ -1531,7 +1528,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1531
1528
|
}
|
|
1532
1529
|
H.prototype[t] = n(), H.prototype[t + "Form"] = n(!0);
|
|
1533
1530
|
});
|
|
1534
|
-
let
|
|
1531
|
+
let Kn = class ct {
|
|
1535
1532
|
constructor(t) {
|
|
1536
1533
|
if (typeof t != "function")
|
|
1537
1534
|
throw new TypeError("executor must be a function.");
|
|
@@ -1539,23 +1536,23 @@ let Gn = class ct {
|
|
|
1539
1536
|
this.promise = new Promise(function(o) {
|
|
1540
1537
|
n = o;
|
|
1541
1538
|
});
|
|
1542
|
-
const
|
|
1543
|
-
this.promise.then((
|
|
1544
|
-
if (!
|
|
1545
|
-
let o =
|
|
1539
|
+
const r = this;
|
|
1540
|
+
this.promise.then((s) => {
|
|
1541
|
+
if (!r._listeners) return;
|
|
1542
|
+
let o = r._listeners.length;
|
|
1546
1543
|
for (; o-- > 0; )
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
}), this.promise.then = (
|
|
1544
|
+
r._listeners[o](s);
|
|
1545
|
+
r._listeners = null;
|
|
1546
|
+
}), this.promise.then = (s) => {
|
|
1550
1547
|
let o;
|
|
1551
1548
|
const i = new Promise((c) => {
|
|
1552
|
-
|
|
1553
|
-
}).then(
|
|
1549
|
+
r.subscribe(c), o = c;
|
|
1550
|
+
}).then(s);
|
|
1554
1551
|
return i.cancel = function() {
|
|
1555
|
-
|
|
1552
|
+
r.unsubscribe(o);
|
|
1556
1553
|
}, i;
|
|
1557
1554
|
}, t(function(o, i, c) {
|
|
1558
|
-
|
|
1555
|
+
r.reason || (r.reason = new G(o, i, c), n(r.reason));
|
|
1559
1556
|
});
|
|
1560
1557
|
}
|
|
1561
1558
|
/**
|
|
@@ -1585,8 +1582,8 @@ let Gn = class ct {
|
|
|
1585
1582
|
n !== -1 && this._listeners.splice(n, 1);
|
|
1586
1583
|
}
|
|
1587
1584
|
toAbortSignal() {
|
|
1588
|
-
const t = new AbortController(), n = (
|
|
1589
|
-
t.abort(
|
|
1585
|
+
const t = new AbortController(), n = (r) => {
|
|
1586
|
+
t.abort(r);
|
|
1590
1587
|
};
|
|
1591
1588
|
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1592
1589
|
}
|
|
@@ -1597,8 +1594,8 @@ let Gn = class ct {
|
|
|
1597
1594
|
static source() {
|
|
1598
1595
|
let t;
|
|
1599
1596
|
return {
|
|
1600
|
-
token: new ct(function(
|
|
1601
|
-
t =
|
|
1597
|
+
token: new ct(function(s) {
|
|
1598
|
+
t = s;
|
|
1602
1599
|
}),
|
|
1603
1600
|
cancel: t
|
|
1604
1601
|
};
|
|
@@ -1682,86 +1679,86 @@ Object.entries(Ee).forEach(([e, t]) => {
|
|
|
1682
1679
|
});
|
|
1683
1680
|
function ut(e) {
|
|
1684
1681
|
const t = new H(e), n = He(H.prototype.request, t);
|
|
1685
|
-
return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(
|
|
1686
|
-
return ut(M(e,
|
|
1682
|
+
return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1683
|
+
return ut(M(e, s));
|
|
1687
1684
|
}, n;
|
|
1688
1685
|
}
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1686
|
+
const y = ut(J);
|
|
1687
|
+
y.Axios = H;
|
|
1688
|
+
y.CanceledError = G;
|
|
1689
|
+
y.CancelToken = Kn;
|
|
1690
|
+
y.isCancel = et;
|
|
1691
|
+
y.VERSION = at;
|
|
1692
|
+
y.toFormData = oe;
|
|
1693
|
+
y.AxiosError = E;
|
|
1694
|
+
y.Cancel = y.CanceledError;
|
|
1695
|
+
y.all = function(t) {
|
|
1699
1696
|
return Promise.all(t);
|
|
1700
1697
|
};
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1698
|
+
y.spread = vn;
|
|
1699
|
+
y.isAxiosError = Vn;
|
|
1700
|
+
y.mergeConfig = M;
|
|
1701
|
+
y.AxiosHeaders = N;
|
|
1702
|
+
y.formToJSON = (e) => Qe(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1703
|
+
y.getAdapter = it.getAdapter;
|
|
1704
|
+
y.HttpStatusCode = Ee;
|
|
1705
|
+
y.default = y;
|
|
1709
1706
|
const {
|
|
1710
|
-
Axios:
|
|
1707
|
+
Axios: hr,
|
|
1711
1708
|
AxiosError: Jn,
|
|
1712
|
-
CanceledError:
|
|
1713
|
-
isCancel:
|
|
1714
|
-
CancelToken:
|
|
1715
|
-
VERSION:
|
|
1716
|
-
all:
|
|
1717
|
-
Cancel:
|
|
1718
|
-
isAxiosError:
|
|
1719
|
-
spread:
|
|
1720
|
-
toFormData:
|
|
1721
|
-
AxiosHeaders:
|
|
1709
|
+
CanceledError: mr,
|
|
1710
|
+
isCancel: Er,
|
|
1711
|
+
CancelToken: Rr,
|
|
1712
|
+
VERSION: Sr,
|
|
1713
|
+
all: gr,
|
|
1714
|
+
Cancel: yr,
|
|
1715
|
+
isAxiosError: wr,
|
|
1716
|
+
spread: br,
|
|
1717
|
+
toFormData: Tr,
|
|
1718
|
+
AxiosHeaders: Or,
|
|
1722
1719
|
HttpStatusCode: D,
|
|
1723
|
-
formToJSON:
|
|
1724
|
-
getAdapter:
|
|
1725
|
-
mergeConfig:
|
|
1726
|
-
} =
|
|
1727
|
-
for (const
|
|
1728
|
-
t ?
|
|
1720
|
+
formToJSON: Ar,
|
|
1721
|
+
getAdapter: _r,
|
|
1722
|
+
mergeConfig: Nr
|
|
1723
|
+
} = y, Wn = (e) => (e.baseURL = qe(), e.headers.Authorization = localStorage.getItem(k.TOKEN), e.headers["client-id"] = localStorage.getItem(k.CLIENT_ID), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }), Fe = (e, t, n) => {
|
|
1724
|
+
for (const r of e)
|
|
1725
|
+
t ? r.rej(t) : r.res(n);
|
|
1729
1726
|
}, Xn = async (e) => new Promise((t, n) => {
|
|
1730
1727
|
setTimeout(t, e);
|
|
1731
1728
|
}), Yn = async (e, t) => (await Xn(t), e()), De = (e, t) => {
|
|
1732
|
-
var
|
|
1733
|
-
let n = "",
|
|
1734
|
-
typeof t == "string" ? n = t : t instanceof Jn ? (n = t.message,
|
|
1729
|
+
var s, o;
|
|
1730
|
+
let n = "", r = t;
|
|
1731
|
+
typeof t == "string" ? n = t : t instanceof Jn ? (n = t.message, r = {
|
|
1735
1732
|
message: t.message,
|
|
1736
1733
|
cause: t.cause,
|
|
1737
1734
|
status: t.status,
|
|
1738
|
-
data: (
|
|
1735
|
+
data: (s = t == null ? void 0 : t.response) == null ? void 0 : s.data
|
|
1739
1736
|
}) : n = t.message, (o = window.parent) == null || o.postMessage(
|
|
1740
|
-
{ type: "auth_error", details: { message: n, action: e, info:
|
|
1737
|
+
{ type: "auth_error", details: { message: n, action: e, info: r } },
|
|
1741
1738
|
"*"
|
|
1742
1739
|
);
|
|
1743
|
-
}, Zn = async (e, t, n,
|
|
1740
|
+
}, Zn = async (e, t, n, r, s) => {
|
|
1744
1741
|
var f, u, l;
|
|
1745
|
-
const o = t.config, i = localStorage.getItem(
|
|
1742
|
+
const o = t.config, i = localStorage.getItem(k.REFRESH_TOKEN), c = ((f = t.response) == null ? void 0 : f.status) || D.InternalServerError;
|
|
1746
1743
|
if (!o || o.__retries === n)
|
|
1747
1744
|
throw t;
|
|
1748
|
-
if (c === D.Unauthorized && o.url !==
|
|
1745
|
+
if (c === D.Unauthorized && o.url !== T.REFRESH_EMBED_TOKEN && o.url !== T.REFRESH_TOKEN && o.url !== T.SIGN_IN && o.url !== T.SIGN_UP) {
|
|
1749
1746
|
if (!i)
|
|
1750
1747
|
throw De(
|
|
1751
1748
|
"refresh_token",
|
|
1752
1749
|
"no refresh token found to reauthenticate user"
|
|
1753
1750
|
), t;
|
|
1754
|
-
if (
|
|
1755
|
-
return new Promise((p,
|
|
1756
|
-
e.push({ res: p, rej:
|
|
1757
|
-
}).then((p) => (o.headers && (o.headers.Authorization = `Bearer ${p}`),
|
|
1751
|
+
if (r)
|
|
1752
|
+
return new Promise((p, g) => {
|
|
1753
|
+
e.push({ res: p, rej: g });
|
|
1754
|
+
}).then((p) => (o.headers && (o.headers.Authorization = `Bearer ${p}`), s(o))).catch((p) => {
|
|
1758
1755
|
throw p;
|
|
1759
1756
|
});
|
|
1760
|
-
|
|
1761
|
-
const
|
|
1757
|
+
r = !0;
|
|
1758
|
+
const R = localStorage.getItem(k.AUTH_FLOW) === dt.POST_MESSAGE ? Be.refreshEmbedToken : Be.refreshToken, { data: S, success: h, message: m } = await R(i);
|
|
1762
1759
|
if (!h)
|
|
1763
|
-
throw (u = o == null ? void 0 : o.url) != null && u.includes(
|
|
1764
|
-
return (l = o.url) != null && l.includes(
|
|
1760
|
+
throw (u = o == null ? void 0 : o.url) != null && u.includes(T.EXCHANGE_TOKEN) || De("refresh_token", m), r = !1, Fe(e, t), t;
|
|
1761
|
+
return (l = o.url) != null && l.includes(T.EXCHANGE_TOKEN) && "id_token" in S && (o.data = JSON.stringify({ idToken: S.id_token })), r = !1, o.headers && (o.headers.Authorization = `Bearer ${S.token}`), Fe(e, null, S.token), s(o);
|
|
1765
1762
|
}
|
|
1766
1763
|
if ([
|
|
1767
1764
|
D.BadRequest,
|
|
@@ -1773,28 +1770,28 @@ const {
|
|
|
1773
1770
|
].includes(c) || (o.__retries || (o.__retries = 0), o.__retries += 1, o.__retries > n))
|
|
1774
1771
|
throw t;
|
|
1775
1772
|
return Yn(
|
|
1776
|
-
() =>
|
|
1773
|
+
() => s(o),
|
|
1777
1774
|
Math.pow(10, o.__retries + 1) / 2
|
|
1778
1775
|
// Exponential backoff 50ms, 500ms, 5000ms
|
|
1779
1776
|
);
|
|
1780
|
-
}, Qn =
|
|
1781
|
-
Qn.interceptors.request.use((e) => (e.baseURL = qe(), e.headers.Authorization = localStorage.getItem(
|
|
1782
|
-
const C =
|
|
1777
|
+
}, Qn = y.create();
|
|
1778
|
+
Qn.interceptors.request.use((e) => (e.baseURL = qe(), e.headers.Authorization = localStorage.getItem(k.TOKEN), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }));
|
|
1779
|
+
const C = y.create();
|
|
1783
1780
|
C.interceptors.request.use((e) => (e = Wn(e), e));
|
|
1784
|
-
const
|
|
1785
|
-
let
|
|
1786
|
-
const
|
|
1781
|
+
const er = 3;
|
|
1782
|
+
let tr = !1;
|
|
1783
|
+
const nr = [];
|
|
1787
1784
|
C.interceptors.response.use(
|
|
1788
1785
|
null,
|
|
1789
1786
|
(e) => Zn(
|
|
1790
|
-
|
|
1787
|
+
nr,
|
|
1791
1788
|
e,
|
|
1792
|
-
|
|
1793
|
-
|
|
1789
|
+
er,
|
|
1790
|
+
tr,
|
|
1794
1791
|
C
|
|
1795
1792
|
)
|
|
1796
1793
|
);
|
|
1797
|
-
class
|
|
1794
|
+
class rr {
|
|
1798
1795
|
constructor() {
|
|
1799
1796
|
/**
|
|
1800
1797
|
* Logs in a user with the provided email and password.
|
|
@@ -1802,33 +1799,33 @@ class ss {
|
|
|
1802
1799
|
* @param params - The sign-in parameters containing email and password.
|
|
1803
1800
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1804
1801
|
*/
|
|
1805
|
-
|
|
1806
|
-
var n,
|
|
1802
|
+
I(this, "login", async (t) => {
|
|
1803
|
+
var n, r, s, o;
|
|
1807
1804
|
try {
|
|
1808
|
-
const { data:
|
|
1805
|
+
const { data: i } = await C.post(T.SIGN_IN, {
|
|
1809
1806
|
email_address: t.email,
|
|
1810
1807
|
password: t.password
|
|
1811
|
-
}),
|
|
1808
|
+
}), c = await $.ensureQueryData({
|
|
1812
1809
|
queryKey: [j.USER_REGIONS],
|
|
1813
1810
|
queryFn: this.getRegions
|
|
1814
|
-
}),
|
|
1815
|
-
return localStorage.setItem(
|
|
1811
|
+
}), f = P(i.data), u = (n = i.data) == null ? void 0 : n.accessToken;
|
|
1812
|
+
return localStorage.setItem(k.TOKEN, u), {
|
|
1816
1813
|
success: !0,
|
|
1817
|
-
data:
|
|
1818
|
-
...
|
|
1819
|
-
token:
|
|
1814
|
+
data: P({
|
|
1815
|
+
...i.data,
|
|
1816
|
+
token: u,
|
|
1820
1817
|
user: {
|
|
1821
|
-
...
|
|
1822
|
-
userRegion:
|
|
1823
|
-
(
|
|
1818
|
+
...f.user,
|
|
1819
|
+
userRegion: c.find(
|
|
1820
|
+
(l) => l.code === i.data.user.user_region
|
|
1824
1821
|
)
|
|
1825
1822
|
}
|
|
1826
1823
|
})
|
|
1827
1824
|
};
|
|
1828
|
-
} catch (
|
|
1829
|
-
return console.error(
|
|
1825
|
+
} catch (i) {
|
|
1826
|
+
return console.error(i), {
|
|
1830
1827
|
success: !1,
|
|
1831
|
-
message: ((
|
|
1828
|
+
message: ((s = (r = i.response) == null ? void 0 : r.data) == null ? void 0 : s.message) || ((o = i == null ? void 0 : i.response) == null ? void 0 : o.data) || i.message || "error signing in"
|
|
1832
1829
|
};
|
|
1833
1830
|
}
|
|
1834
1831
|
});
|
|
@@ -1838,10 +1835,10 @@ class ss {
|
|
|
1838
1835
|
* @param params - The sign-up parameters containing email, password, and region.
|
|
1839
1836
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1840
1837
|
*/
|
|
1841
|
-
|
|
1842
|
-
var n,
|
|
1838
|
+
I(this, "signUp", async (t) => {
|
|
1839
|
+
var n, r, s, o, i;
|
|
1843
1840
|
try {
|
|
1844
|
-
const { data:
|
|
1841
|
+
const { data: c } = await C.post(T.SIGN_UP, {
|
|
1845
1842
|
user: {
|
|
1846
1843
|
email_address: t.email,
|
|
1847
1844
|
password: t.password,
|
|
@@ -1850,67 +1847,65 @@ class ss {
|
|
|
1850
1847
|
success_url: t.successUrl,
|
|
1851
1848
|
cancel_url: t.cancelUrl,
|
|
1852
1849
|
price_id: t.priceId
|
|
1853
|
-
}),
|
|
1850
|
+
}), f = await $.ensureQueryData({
|
|
1854
1851
|
queryKey: [j.USER_REGIONS],
|
|
1855
1852
|
queryFn: this.getRegions
|
|
1856
|
-
}),
|
|
1857
|
-
return localStorage.setItem(
|
|
1853
|
+
}), u = P(c.data), l = (n = c.data) == null ? void 0 : n.tokens.accessToken;
|
|
1854
|
+
return localStorage.setItem(k.TOKEN, l), {
|
|
1858
1855
|
success: !0,
|
|
1859
1856
|
data: {
|
|
1860
|
-
token:
|
|
1861
|
-
|
|
1862
|
-
refreshToken: (o = u.data) == null ? void 0 : o.tokens.refreshToken,
|
|
1857
|
+
token: l,
|
|
1858
|
+
...(r = c.data) == null ? void 0 : r.tokens,
|
|
1863
1859
|
user: {
|
|
1864
|
-
...
|
|
1865
|
-
userRegion:
|
|
1866
|
-
(
|
|
1860
|
+
...u.user,
|
|
1861
|
+
userRegion: f.find(
|
|
1862
|
+
(d) => d.code === c.data.user.user_region
|
|
1867
1863
|
)
|
|
1868
1864
|
}
|
|
1869
1865
|
}
|
|
1870
1866
|
};
|
|
1871
|
-
} catch (
|
|
1872
|
-
return console.error(
|
|
1867
|
+
} catch (c) {
|
|
1868
|
+
return console.error(c), {
|
|
1873
1869
|
success: !1,
|
|
1874
|
-
message: ((
|
|
1870
|
+
message: ((o = (s = c.response) == null ? void 0 : s.data) == null ? void 0 : o.message) || ((i = c.response) == null ? void 0 : i.data) || c.message || "error signing up"
|
|
1875
1871
|
};
|
|
1876
1872
|
}
|
|
1877
1873
|
});
|
|
1878
|
-
|
|
1879
|
-
var
|
|
1874
|
+
I(this, "getOrCreateGoogleUser", async (t, n) => {
|
|
1875
|
+
var r, s, o, i, c;
|
|
1880
1876
|
try {
|
|
1881
|
-
const { data:
|
|
1877
|
+
const { data: f } = await C.post(T.GOOGLE_AUTH, {
|
|
1882
1878
|
google_access_token: t,
|
|
1883
1879
|
user_region: n
|
|
1884
|
-
}),
|
|
1880
|
+
}), u = await $.ensureQueryData({
|
|
1885
1881
|
queryKey: [j.USER_REGIONS],
|
|
1886
1882
|
queryFn: this.getRegions
|
|
1887
|
-
}),
|
|
1888
|
-
return localStorage.setItem(
|
|
1883
|
+
}), l = P(f.data), d = (r = f.data) == null ? void 0 : r.tokens.accessToken;
|
|
1884
|
+
return localStorage.setItem(k.TOKEN, d), {
|
|
1889
1885
|
success: !0,
|
|
1890
1886
|
data: {
|
|
1891
|
-
token:
|
|
1892
|
-
|
|
1893
|
-
refreshToken: (i = l.data) == null ? void 0 : i.tokens.refreshToken,
|
|
1887
|
+
token: d,
|
|
1888
|
+
...(s = f.data) == null ? void 0 : s.tokens,
|
|
1894
1889
|
user: {
|
|
1895
|
-
...
|
|
1896
|
-
userRegion:
|
|
1897
|
-
(
|
|
1890
|
+
...l.user,
|
|
1891
|
+
userRegion: u.find(
|
|
1892
|
+
(R) => R.code === f.data.user.user_region
|
|
1898
1893
|
)
|
|
1899
1894
|
}
|
|
1900
1895
|
}
|
|
1901
1896
|
};
|
|
1902
|
-
} catch (
|
|
1903
|
-
return console.error(
|
|
1897
|
+
} catch (f) {
|
|
1898
|
+
return console.error(f), {
|
|
1904
1899
|
success: !1,
|
|
1905
|
-
message: ((
|
|
1900
|
+
message: ((i = (o = f.response) == null ? void 0 : o.data) == null ? void 0 : i.message) || ((c = f == null ? void 0 : f.response) == null ? void 0 : c.data) || f.message || "error getting or creating google user"
|
|
1906
1901
|
};
|
|
1907
1902
|
}
|
|
1908
1903
|
});
|
|
1909
|
-
|
|
1910
|
-
var n,
|
|
1904
|
+
I(this, "resendVerificationEmail", async (t) => {
|
|
1905
|
+
var n, r, s;
|
|
1911
1906
|
try {
|
|
1912
1907
|
return (await C.post(
|
|
1913
|
-
|
|
1908
|
+
T.RESEND_VERIFICATION_EMAIL,
|
|
1914
1909
|
{
|
|
1915
1910
|
email_address: t.email,
|
|
1916
1911
|
success_url: t.successUrl,
|
|
@@ -1920,7 +1915,7 @@ class ss {
|
|
|
1920
1915
|
} catch (o) {
|
|
1921
1916
|
return console.error(o), {
|
|
1922
1917
|
success: !1,
|
|
1923
|
-
message: ((
|
|
1918
|
+
message: ((r = (n = o.response) == null ? void 0 : n.data) == null ? void 0 : r.message) || ((s = o.response) == null ? void 0 : s.data) || o.message || "error resending verification email"
|
|
1924
1919
|
};
|
|
1925
1920
|
}
|
|
1926
1921
|
});
|
|
@@ -1930,19 +1925,19 @@ class ss {
|
|
|
1930
1925
|
* @param idToken - The ID token to authenticate with.
|
|
1931
1926
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1932
1927
|
*/
|
|
1933
|
-
|
|
1934
|
-
var
|
|
1928
|
+
I(this, "authenticateWithToken", async (t, n) => {
|
|
1929
|
+
var r, s, o;
|
|
1935
1930
|
try {
|
|
1936
1931
|
const { data: i } = await C.post(
|
|
1937
|
-
|
|
1938
|
-
|
|
1932
|
+
T.EXCHANGE_TOKEN,
|
|
1933
|
+
ht({
|
|
1939
1934
|
idToken: t,
|
|
1940
1935
|
exchangeTokenEndPoint: n
|
|
1941
1936
|
})
|
|
1942
1937
|
), c = await $.ensureQueryData({
|
|
1943
1938
|
queryKey: [j.USER_REGIONS],
|
|
1944
1939
|
queryFn: this.getRegions
|
|
1945
|
-
}), f =
|
|
1940
|
+
}), f = P(i.data);
|
|
1946
1941
|
return {
|
|
1947
1942
|
success: !0,
|
|
1948
1943
|
data: {
|
|
@@ -1958,7 +1953,7 @@ class ss {
|
|
|
1958
1953
|
} catch (i) {
|
|
1959
1954
|
return console.error(i), {
|
|
1960
1955
|
success: !1,
|
|
1961
|
-
message: ((
|
|
1956
|
+
message: ((s = (r = i.response) == null ? void 0 : r.data) == null ? void 0 : s.message) || ((o = i == null ? void 0 : i.response) == null ? void 0 : o.data) || i.message || "error exchanging token"
|
|
1962
1957
|
};
|
|
1963
1958
|
}
|
|
1964
1959
|
});
|
|
@@ -1967,20 +1962,20 @@ class ss {
|
|
|
1967
1962
|
*
|
|
1968
1963
|
* @returns A promise that resolves to a service response containing the user details.
|
|
1969
1964
|
*/
|
|
1970
|
-
|
|
1965
|
+
I(this, "checkUser", async () => {
|
|
1971
1966
|
try {
|
|
1972
|
-
const { data: t } = await C.get(
|
|
1967
|
+
const { data: t } = await C.get(T.ME), n = await $.ensureQueryData({
|
|
1973
1968
|
queryKey: [j.USER_REGIONS],
|
|
1974
1969
|
queryFn: this.getRegions
|
|
1975
|
-
}),
|
|
1970
|
+
}), r = {
|
|
1976
1971
|
...t.data,
|
|
1977
1972
|
userRegion: n.find(
|
|
1978
|
-
(
|
|
1973
|
+
(s) => s.code === t.data.user_region
|
|
1979
1974
|
)
|
|
1980
1975
|
};
|
|
1981
1976
|
return {
|
|
1982
1977
|
success: !0,
|
|
1983
|
-
data:
|
|
1978
|
+
data: P(r)
|
|
1984
1979
|
};
|
|
1985
1980
|
} catch (t) {
|
|
1986
1981
|
console.error(t);
|
|
@@ -1997,23 +1992,23 @@ class ss {
|
|
|
1997
1992
|
*
|
|
1998
1993
|
* @param refreshToken - The refresh token
|
|
1999
1994
|
*/
|
|
2000
|
-
|
|
1995
|
+
I(this, "refreshEmbedToken", async (t) => {
|
|
2001
1996
|
try {
|
|
2002
1997
|
const { data: n } = await C.post(
|
|
2003
|
-
|
|
1998
|
+
T.REFRESH_EMBED_TOKEN,
|
|
2004
1999
|
{
|
|
2005
2000
|
refreshToken: t
|
|
2006
2001
|
}
|
|
2007
|
-
),
|
|
2008
|
-
return localStorage.setItem(
|
|
2002
|
+
), r = n.data.token;
|
|
2003
|
+
return localStorage.setItem(k.TOKEN, r), {
|
|
2009
2004
|
success: !0,
|
|
2010
2005
|
data: n.data
|
|
2011
2006
|
};
|
|
2012
2007
|
} catch (n) {
|
|
2013
|
-
const { response:
|
|
2008
|
+
const { response: r } = n;
|
|
2014
2009
|
return localStorage.removeItem("refreshToken"), localStorage.removeItem("token"), {
|
|
2015
2010
|
success: !1,
|
|
2016
|
-
message:
|
|
2011
|
+
message: r == null ? void 0 : r.data.message
|
|
2017
2012
|
};
|
|
2018
2013
|
}
|
|
2019
2014
|
});
|
|
@@ -2022,26 +2017,26 @@ class ss {
|
|
|
2022
2017
|
*
|
|
2023
2018
|
* @param refreshToken - The refresh token
|
|
2024
2019
|
*/
|
|
2025
|
-
|
|
2020
|
+
I(this, "refreshToken", async (t) => {
|
|
2026
2021
|
try {
|
|
2027
2022
|
const { data: n } = await C.post(
|
|
2028
|
-
|
|
2023
|
+
T.REFRESH_TOKEN,
|
|
2029
2024
|
{
|
|
2030
2025
|
refreshToken: t
|
|
2031
2026
|
}
|
|
2032
|
-
),
|
|
2033
|
-
return localStorage.setItem(
|
|
2027
|
+
), r = n.data.accessToken;
|
|
2028
|
+
return localStorage.setItem(k.TOKEN, r), {
|
|
2034
2029
|
success: !0,
|
|
2035
2030
|
data: {
|
|
2036
2031
|
...n.data,
|
|
2037
|
-
token:
|
|
2032
|
+
token: r
|
|
2038
2033
|
}
|
|
2039
2034
|
};
|
|
2040
2035
|
} catch (n) {
|
|
2041
|
-
const { response:
|
|
2036
|
+
const { response: r } = n;
|
|
2042
2037
|
return localStorage.removeItem("refreshToken"), localStorage.removeItem("token"), {
|
|
2043
2038
|
success: !1,
|
|
2044
|
-
message:
|
|
2039
|
+
message: r == null ? void 0 : r.data.message
|
|
2045
2040
|
};
|
|
2046
2041
|
}
|
|
2047
2042
|
});
|
|
@@ -2050,27 +2045,27 @@ class ss {
|
|
|
2050
2045
|
*
|
|
2051
2046
|
* @returns A promise that resolves to a service response containing the request limit data.
|
|
2052
2047
|
*/
|
|
2053
|
-
|
|
2048
|
+
I(this, "getRequestLimit", async () => (await C.get(T.REQUEST_LIMIT)).data);
|
|
2054
2049
|
/**
|
|
2055
2050
|
* Retrieves the regions available for user registration.
|
|
2056
2051
|
*
|
|
2057
2052
|
* @returns A promise that resolves to a service response containing the available regions.
|
|
2058
2053
|
*/
|
|
2059
|
-
|
|
2054
|
+
I(this, "getRegions", async () => {
|
|
2060
2055
|
var n;
|
|
2061
|
-
const t = await C.get(
|
|
2062
|
-
return
|
|
2056
|
+
const t = await C.get(T.REGIONS);
|
|
2057
|
+
return P((n = t.data) == null ? void 0 : n.data);
|
|
2063
2058
|
});
|
|
2064
2059
|
}
|
|
2065
2060
|
}
|
|
2066
|
-
const Be = new
|
|
2061
|
+
const Be = new rr();
|
|
2067
2062
|
export {
|
|
2068
2063
|
Be as A,
|
|
2069
2064
|
j as E,
|
|
2070
|
-
|
|
2065
|
+
P as a,
|
|
2071
2066
|
Et as b,
|
|
2072
2067
|
C as c,
|
|
2073
|
-
|
|
2068
|
+
y as d,
|
|
2074
2069
|
Jn as e,
|
|
2075
2070
|
we as f,
|
|
2076
2071
|
Wn as g,
|
|
@@ -2080,5 +2075,6 @@ export {
|
|
|
2080
2075
|
Yn as k,
|
|
2081
2076
|
De as l,
|
|
2082
2077
|
Fe as p,
|
|
2083
|
-
|
|
2078
|
+
ht as r,
|
|
2079
|
+
mt as t
|
|
2084
2080
|
};
|