@odynn/awayz-core 0.10.12 → 0.10.14
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/{TripsService-fNtCUyxa.js → TripsService-PQeXLB1p.js} +8 -7
- package/dist/components/CashValue/CashValue.js +1 -1
- package/dist/components/CashValue/CashValue.stories.js +1 -1
- package/dist/components/ClientPointsValue/ClientPointsValue.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 +1 -0
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +110 -99
- package/dist/hooks/useBookingManagement/useBookingManagement.js +1 -1
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +1 -1
- package/dist/hooks/useFeatureFlags.js +1 -1
- 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 +1 -1
- package/dist/hooks/useWallet/useWallet.test.js +1 -1
- package/dist/lib/configs/endpoints.d.ts +1 -0
- package/dist/lib/context/AwayzContext.d.ts +1 -0
- package/dist/lib/hooks/useAwayzAuth/useAwayzAuth.d.ts +9 -5
- package/dist/lib/services/account/AccountService.d.ts +9 -0
- package/dist/lib/services/trips/TripService.types.d.ts +1 -0
- package/dist/main.js +1 -1
- package/dist/{noRetryInstance-C4bqpBc7.js → noRetryInstance-CbNDzU_c.js} +111 -96
- package/dist/providers/AwayzProvider.js +1 -1
- package/dist/services/account/AccountService.js +1 -1
- package/dist/services/bookings/BookingService.js +1 -1
- package/dist/services/currency/CurrencyService.js +1 -1
- package/dist/services/features/featureService.js +1 -1
- 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/dist/utils/clientPoints.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import "./arrayExtensions-DlcBOj5a.js";
|
|
|
5
5
|
import { a as U } from "./keys-BcBfU51M.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { getBaseUrl as He } from "./configs/baseUrl.js";
|
|
8
|
-
import { EAuthEndpoints as
|
|
8
|
+
import { EAuthEndpoints as T } from "./configs/endpoints.js";
|
|
9
9
|
import { getGatewayBaseUrl as mt } from "./configs/gatewayBaseUrl.js";
|
|
10
10
|
import "@tanstack/react-query";
|
|
11
11
|
import "react/jsx-runtime";
|
|
@@ -20,9 +20,9 @@ import "./index-Cv-wvFlM.js";
|
|
|
20
20
|
import "./context/AwayzContext.js";
|
|
21
21
|
/* empty css */
|
|
22
22
|
import { EAuthFlow as Et } from "./types/EAuthFlow.js";
|
|
23
|
-
const
|
|
23
|
+
const L = (e) => Array.isArray(e) ? e.map((t) => L(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
24
24
|
const r = gt(n);
|
|
25
|
-
return t[r] =
|
|
25
|
+
return t[r] = L(e[n]), t;
|
|
26
26
|
}, {}) : e;
|
|
27
27
|
function Rt(e) {
|
|
28
28
|
return e.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
@@ -42,11 +42,11 @@ function Me(e, t) {
|
|
|
42
42
|
const { toString: wt } = Object.prototype, { getPrototypeOf: Se } = Object, { iterator: te, toStringTag: je } = Symbol, ne = /* @__PURE__ */ ((e) => (t) => {
|
|
43
43
|
const n = wt.call(t);
|
|
44
44
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
45
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
45
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ne(t) === e), re = (e) => (t) => typeof t === e, { isArray: z } = Array, v = re("undefined");
|
|
46
46
|
function Tt(e) {
|
|
47
|
-
return e !== null && !
|
|
47
|
+
return e !== null && !v(e) && e.constructor !== null && !v(e.constructor) && N(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
48
48
|
}
|
|
49
|
-
const ze =
|
|
49
|
+
const ze = x("ArrayBuffer");
|
|
50
50
|
function bt(e) {
|
|
51
51
|
let t;
|
|
52
52
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ze(e.buffer), t;
|
|
@@ -56,12 +56,12 @@ const Ot = re("string"), N = re("function"), Ge = re("number"), se = (e) => e !=
|
|
|
56
56
|
return !1;
|
|
57
57
|
const t = Se(e);
|
|
58
58
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(je in e) && !(te in e);
|
|
59
|
-
}, _t =
|
|
59
|
+
}, _t = x("Date"), Nt = x("File"), Ct = x("Blob"), It = x("FileList"), Ut = (e) => se(e) && N(e.pipe), Lt = (e) => {
|
|
60
60
|
let t;
|
|
61
61
|
return e && (typeof FormData == "function" && e instanceof FormData || N(e.append) && ((t = ne(e)) === "formdata" || // detect form-data instance
|
|
62
62
|
t === "object" && N(e.toString) && e.toString() === "[object FormData]"));
|
|
63
|
-
}, xt =
|
|
64
|
-
function
|
|
63
|
+
}, xt = x("URLSearchParams"), [Pt, kt, Ft, Dt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), Bt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
64
|
+
function V(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
65
65
|
if (e === null || typeof e > "u")
|
|
66
66
|
return;
|
|
67
67
|
let r, s;
|
|
@@ -84,17 +84,17 @@ function $e(e, t) {
|
|
|
84
84
|
return s;
|
|
85
85
|
return null;
|
|
86
86
|
}
|
|
87
|
-
const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ke = (e) => !
|
|
87
|
+
const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ke = (e) => !v(e) && e !== q;
|
|
88
88
|
function fe() {
|
|
89
89
|
const { caseless: e } = Ke(this) && this || {}, t = {}, n = (r, s) => {
|
|
90
90
|
const o = e && $e(t, s) || s;
|
|
91
91
|
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;
|
|
92
92
|
};
|
|
93
93
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
94
|
-
arguments[r] &&
|
|
94
|
+
arguments[r] && V(arguments[r], n);
|
|
95
95
|
return t;
|
|
96
96
|
}
|
|
97
|
-
const qt = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
97
|
+
const qt = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (s, o) => {
|
|
98
98
|
n && N(s) ? e[o] = Me(s, n) : e[o] = s;
|
|
99
99
|
}, { allOwnKeys: r }), e), Ht = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Mt = (e, t, n, r) => {
|
|
100
100
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
@@ -130,25 +130,25 @@ const qt = (e, t, n, { allOwnKeys: r } = {}) => (v(t, (s, o) => {
|
|
|
130
130
|
const o = s.value;
|
|
131
131
|
t.call(e, o[0], o[1]);
|
|
132
132
|
}
|
|
133
|
-
},
|
|
133
|
+
}, vt = (e, t) => {
|
|
134
134
|
let n;
|
|
135
135
|
const r = [];
|
|
136
136
|
for (; (n = e.exec(t)) !== null; )
|
|
137
137
|
r.push(n);
|
|
138
138
|
return r;
|
|
139
|
-
},
|
|
139
|
+
}, Vt = x("HTMLFormElement"), Jt = (e) => e.toLowerCase().replace(
|
|
140
140
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
141
141
|
function(n, r, s) {
|
|
142
142
|
return r.toUpperCase() + s;
|
|
143
143
|
}
|
|
144
|
-
), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Wt =
|
|
144
|
+
), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Wt = x("RegExp"), ve = (e, t) => {
|
|
145
145
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
146
|
-
|
|
146
|
+
V(n, (s, o) => {
|
|
147
147
|
let i;
|
|
148
148
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
149
149
|
}), Object.defineProperties(e, r);
|
|
150
150
|
}, Xt = (e) => {
|
|
151
|
-
|
|
151
|
+
ve(e, (t, n) => {
|
|
152
152
|
if (N(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
153
153
|
return !1;
|
|
154
154
|
const r = e[n];
|
|
@@ -182,23 +182,23 @@ const tn = (e) => {
|
|
|
182
182
|
if (!("toJSON" in r)) {
|
|
183
183
|
t[s] = r;
|
|
184
184
|
const o = z(r) ? [] : {};
|
|
185
|
-
return
|
|
185
|
+
return V(r, (i, c) => {
|
|
186
186
|
const f = n(i, s + 1);
|
|
187
|
-
!
|
|
187
|
+
!v(f) && (o[c] = f);
|
|
188
188
|
}), t[s] = void 0, o;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
return r;
|
|
192
192
|
};
|
|
193
193
|
return n(e, 0);
|
|
194
|
-
}, nn =
|
|
194
|
+
}, nn = x("AsyncFunction"), rn = (e) => e && (se(e) || N(e)) && N(e.then) && N(e.catch), Ve = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: s, data: o }) => {
|
|
195
195
|
s === q && o === n && r.length && r.shift()();
|
|
196
196
|
}, !1), (s) => {
|
|
197
197
|
r.push(s), q.postMessage(n, "*");
|
|
198
198
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
199
199
|
typeof setImmediate == "function",
|
|
200
200
|
N(q.postMessage)
|
|
201
|
-
), sn = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick ||
|
|
201
|
+
), sn = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || Ve, on = (e) => e != null && N(e[te]), a = {
|
|
202
202
|
isArray: z,
|
|
203
203
|
isArrayBuffer: ze,
|
|
204
204
|
isBuffer: Tt,
|
|
@@ -213,7 +213,7 @@ const tn = (e) => {
|
|
|
213
213
|
isRequest: kt,
|
|
214
214
|
isResponse: Ft,
|
|
215
215
|
isHeaders: Dt,
|
|
216
|
-
isUndefined:
|
|
216
|
+
isUndefined: v,
|
|
217
217
|
isDate: _t,
|
|
218
218
|
isFile: Nt,
|
|
219
219
|
isBlob: Ct,
|
|
@@ -223,7 +223,7 @@ const tn = (e) => {
|
|
|
223
223
|
isURLSearchParams: xt,
|
|
224
224
|
isTypedArray: $t,
|
|
225
225
|
isFileList: It,
|
|
226
|
-
forEach:
|
|
226
|
+
forEach: V,
|
|
227
227
|
merge: fe,
|
|
228
228
|
extend: qt,
|
|
229
229
|
trim: Bt,
|
|
@@ -231,16 +231,16 @@ const tn = (e) => {
|
|
|
231
231
|
inherits: Mt,
|
|
232
232
|
toFlatObject: jt,
|
|
233
233
|
kindOf: ne,
|
|
234
|
-
kindOfTest:
|
|
234
|
+
kindOfTest: x,
|
|
235
235
|
endsWith: zt,
|
|
236
236
|
toArray: Gt,
|
|
237
237
|
forEachEntry: Kt,
|
|
238
|
-
matchAll:
|
|
239
|
-
isHTMLForm:
|
|
238
|
+
matchAll: vt,
|
|
239
|
+
isHTMLForm: Vt,
|
|
240
240
|
hasOwnProperty: be,
|
|
241
241
|
hasOwnProp: be,
|
|
242
242
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
243
|
-
reduceDescriptors:
|
|
243
|
+
reduceDescriptors: ve,
|
|
244
244
|
freezeMethods: Xt,
|
|
245
245
|
toObjectSet: Yt,
|
|
246
246
|
toCamelCase: Jt,
|
|
@@ -253,7 +253,7 @@ const tn = (e) => {
|
|
|
253
253
|
toJSONObject: tn,
|
|
254
254
|
isAsyncFn: nn,
|
|
255
255
|
isThenable: rn,
|
|
256
|
-
setImmediate:
|
|
256
|
+
setImmediate: Ve,
|
|
257
257
|
asap: sn,
|
|
258
258
|
isIterable: on
|
|
259
259
|
};
|
|
@@ -352,11 +352,11 @@ function oe(e, t, n) {
|
|
|
352
352
|
if (a.endsWith(m, "{}"))
|
|
353
353
|
m = r ? m : m.slice(0, -2), h = JSON.stringify(h);
|
|
354
354
|
else if (a.isArray(h) && cn(h) || (a.isFileList(h) || a.endsWith(m, "[]")) && (y = a.toArray(h)))
|
|
355
|
-
return m = Xe(m), y.forEach(function(
|
|
356
|
-
!(a.isUndefined(
|
|
355
|
+
return m = Xe(m), y.forEach(function(b, k) {
|
|
356
|
+
!(a.isUndefined(b) || b === null) && t.append(
|
|
357
357
|
// eslint-disable-next-line no-nested-ternary
|
|
358
358
|
i === !0 ? Oe([m], k, o) : i === null ? m : m + "[]",
|
|
359
|
-
u(
|
|
359
|
+
u(b)
|
|
360
360
|
);
|
|
361
361
|
}), !1;
|
|
362
362
|
}
|
|
@@ -1049,13 +1049,13 @@ const st = (e) => {
|
|
|
1049
1049
|
function y() {
|
|
1050
1050
|
if (!p)
|
|
1051
1051
|
return;
|
|
1052
|
-
const
|
|
1052
|
+
const b = C.from(
|
|
1053
1053
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1054
|
-
),
|
|
1054
|
+
), _ = {
|
|
1055
1055
|
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1056
1056
|
status: p.status,
|
|
1057
1057
|
statusText: p.statusText,
|
|
1058
|
-
headers:
|
|
1058
|
+
headers: b,
|
|
1059
1059
|
config: e,
|
|
1060
1060
|
request: p
|
|
1061
1061
|
};
|
|
@@ -1063,7 +1063,7 @@ const st = (e) => {
|
|
|
1063
1063
|
n(B), m();
|
|
1064
1064
|
}, function(B) {
|
|
1065
1065
|
r(B), m();
|
|
1066
|
-
},
|
|
1066
|
+
}, _), p = null;
|
|
1067
1067
|
}
|
|
1068
1068
|
"onloadend" in p ? p.onloadend = y : p.onreadystatechange = function() {
|
|
1069
1069
|
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(y);
|
|
@@ -1073,17 +1073,17 @@ const st = (e) => {
|
|
|
1073
1073
|
r(new E("Network Error", E.ERR_NETWORK, e, p)), p = null;
|
|
1074
1074
|
}, p.ontimeout = function() {
|
|
1075
1075
|
let k = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1076
|
-
const
|
|
1076
|
+
const _ = s.transitional || Qe;
|
|
1077
1077
|
s.timeoutErrorMessage && (k = s.timeoutErrorMessage), r(new E(
|
|
1078
1078
|
k,
|
|
1079
|
-
|
|
1079
|
+
_.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
|
1080
1080
|
e,
|
|
1081
1081
|
p
|
|
1082
1082
|
)), p = null;
|
|
1083
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(k,
|
|
1084
|
-
p.setRequestHeader(
|
|
1085
|
-
}), 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 = (
|
|
1086
|
-
p && (r(!
|
|
1083
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(k, _) {
|
|
1084
|
+
p.setRequestHeader(_, k);
|
|
1085
|
+
}), 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) => {
|
|
1086
|
+
p && (r(!b || b.type ? new G(null, e, p) : b), p.abort(), p = null);
|
|
1087
1087
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1088
1088
|
const w = In(s.url);
|
|
1089
1089
|
if (w && O.protocols.indexOf(w) === -1) {
|
|
@@ -1215,7 +1215,7 @@ const $n = async (e) => {
|
|
|
1215
1215
|
}, Kn = async (e, t) => {
|
|
1216
1216
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1217
1217
|
return n ?? $n(t);
|
|
1218
|
-
},
|
|
1218
|
+
}, vn = ie && (async (e) => {
|
|
1219
1219
|
let {
|
|
1220
1220
|
url: t,
|
|
1221
1221
|
method: n,
|
|
@@ -1238,17 +1238,17 @@ const $n = async (e) => {
|
|
|
1238
1238
|
let p;
|
|
1239
1239
|
try {
|
|
1240
1240
|
if (f && Gn && n !== "get" && n !== "head" && (p = await Kn(l, r)) !== 0) {
|
|
1241
|
-
let
|
|
1241
|
+
let _ = new Request(t, {
|
|
1242
1242
|
method: "POST",
|
|
1243
1243
|
body: r,
|
|
1244
1244
|
duplex: "half"
|
|
1245
1245
|
}), D;
|
|
1246
|
-
if (a.isFormData(r) && (D =
|
|
1246
|
+
if (a.isFormData(r) && (D = _.headers.get("content-type")) && l.setContentType(D), _.body) {
|
|
1247
1247
|
const [B, W] = Ce(
|
|
1248
1248
|
p,
|
|
1249
1249
|
Q(Ie(f))
|
|
1250
1250
|
);
|
|
1251
|
-
r = Le(
|
|
1251
|
+
r = Le(_.body, xe, B, W);
|
|
1252
1252
|
}
|
|
1253
1253
|
}
|
|
1254
1254
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1263,11 +1263,11 @@ const $n = async (e) => {
|
|
|
1263
1263
|
credentials: y ? d : void 0
|
|
1264
1264
|
});
|
|
1265
1265
|
let w = await fetch(h);
|
|
1266
|
-
const
|
|
1267
|
-
if (he && (c ||
|
|
1268
|
-
const
|
|
1266
|
+
const b = he && (u === "stream" || u === "response");
|
|
1267
|
+
if (he && (c || b && m)) {
|
|
1268
|
+
const _ = {};
|
|
1269
1269
|
["status", "statusText", "headers"].forEach((we) => {
|
|
1270
|
-
|
|
1270
|
+
_[we] = w[we];
|
|
1271
1271
|
});
|
|
1272
1272
|
const D = a.toFiniteNumber(w.headers.get("content-length")), [B, W] = c && Ce(
|
|
1273
1273
|
D,
|
|
@@ -1277,13 +1277,13 @@ const $n = async (e) => {
|
|
|
1277
1277
|
Le(w.body, xe, B, () => {
|
|
1278
1278
|
W && W(), m && m();
|
|
1279
1279
|
}),
|
|
1280
|
-
|
|
1280
|
+
_
|
|
1281
1281
|
);
|
|
1282
1282
|
}
|
|
1283
1283
|
u = u || "text";
|
|
1284
1284
|
let k = await ee[a.findKey(ee, u) || "text"](w, e);
|
|
1285
|
-
return !
|
|
1286
|
-
nt(
|
|
1285
|
+
return !b && m && m(), await new Promise((_, D) => {
|
|
1286
|
+
nt(_, D, {
|
|
1287
1287
|
data: k,
|
|
1288
1288
|
headers: C.from(w.headers),
|
|
1289
1289
|
status: w.status,
|
|
@@ -1303,7 +1303,7 @@ const $n = async (e) => {
|
|
|
1303
1303
|
}), me = {
|
|
1304
1304
|
http: an,
|
|
1305
1305
|
xhr: Bn,
|
|
1306
|
-
fetch:
|
|
1306
|
+
fetch: vn
|
|
1307
1307
|
};
|
|
1308
1308
|
a.forEach(me, (e, t) => {
|
|
1309
1309
|
if (e) {
|
|
@@ -1314,7 +1314,7 @@ a.forEach(me, (e, t) => {
|
|
|
1314
1314
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1315
1315
|
}
|
|
1316
1316
|
});
|
|
1317
|
-
const Pe = (e) => `- ${e}`,
|
|
1317
|
+
const Pe = (e) => `- ${e}`, Vn = (e) => a.isFunction(e) || e === null || e === !1, at = {
|
|
1318
1318
|
getAdapter: (e) => {
|
|
1319
1319
|
e = a.isArray(e) ? e : [e];
|
|
1320
1320
|
const { length: t } = e;
|
|
@@ -1323,7 +1323,7 @@ const Pe = (e) => `- ${e}`, vn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1323
1323
|
for (let o = 0; o < t; o++) {
|
|
1324
1324
|
n = e[o];
|
|
1325
1325
|
let i;
|
|
1326
|
-
if (r = n, !
|
|
1326
|
+
if (r = n, !Vn(n) && (r = me[(i = String(n)).toLowerCase()], r === void 0))
|
|
1327
1327
|
throw new E(`Unknown adapter '${i}'`);
|
|
1328
1328
|
if (r)
|
|
1329
1329
|
break;
|
|
@@ -1415,7 +1415,7 @@ function Jn(e, t, n) {
|
|
|
1415
1415
|
const Z = {
|
|
1416
1416
|
assertOptions: Jn,
|
|
1417
1417
|
validators: ae
|
|
1418
|
-
},
|
|
1418
|
+
}, P = Z.validators;
|
|
1419
1419
|
let H = class {
|
|
1420
1420
|
constructor(t) {
|
|
1421
1421
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -1452,17 +1452,17 @@ let H = class {
|
|
|
1452
1452
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = M(this.defaults, n);
|
|
1453
1453
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1454
1454
|
r !== void 0 && Z.assertOptions(r, {
|
|
1455
|
-
silentJSONParsing:
|
|
1456
|
-
forcedJSONParsing:
|
|
1457
|
-
clarifyTimeoutError:
|
|
1455
|
+
silentJSONParsing: P.transitional(P.boolean),
|
|
1456
|
+
forcedJSONParsing: P.transitional(P.boolean),
|
|
1457
|
+
clarifyTimeoutError: P.transitional(P.boolean)
|
|
1458
1458
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1459
1459
|
serialize: s
|
|
1460
1460
|
} : Z.assertOptions(s, {
|
|
1461
|
-
encode:
|
|
1462
|
-
serialize:
|
|
1461
|
+
encode: P.function,
|
|
1462
|
+
serialize: P.function
|
|
1463
1463
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Z.assertOptions(n, {
|
|
1464
|
-
baseUrl:
|
|
1465
|
-
withXsrfToken:
|
|
1464
|
+
baseUrl: P.spelling("baseURL"),
|
|
1465
|
+
withXsrfToken: P.spelling("withXSRFToken")
|
|
1466
1466
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1467
1467
|
let i = o && a.merge(
|
|
1468
1468
|
o.common,
|
|
@@ -1731,7 +1731,7 @@ const {
|
|
|
1731
1731
|
HttpStatusCode: F,
|
|
1732
1732
|
formToJSON: $r,
|
|
1733
1733
|
getAdapter: Kr,
|
|
1734
|
-
mergeConfig:
|
|
1734
|
+
mergeConfig: vr
|
|
1735
1735
|
} = g, ft = (e) => (e.baseURL = He(), e.headers.Authorization = localStorage.getItem(U.TOKEN), e.headers["client-id"] = localStorage.getItem(U.CLIENT_ID), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }), Qn = (e) => (e.baseURL = mt(), e.headers.Authorization = localStorage.getItem(U.TOKEN), e.headers["client-id"] = localStorage.getItem(U.CLIENT_ID), e.headers["Api-Version"] = "1.0", e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }), De = (e, t, n) => {
|
|
1736
1736
|
for (const r of e)
|
|
1737
1737
|
t ? r.rej(t) : r.res(n);
|
|
@@ -1754,7 +1754,7 @@ const {
|
|
|
1754
1754
|
const o = t.config, i = localStorage.getItem(U.REFRESH_TOKEN), c = ((f = t.response) == null ? void 0 : f.status) || F.InternalServerError;
|
|
1755
1755
|
if (!o || o.__retries === n)
|
|
1756
1756
|
throw t;
|
|
1757
|
-
if (c === F.Unauthorized && o.url !==
|
|
1757
|
+
if (c === F.Unauthorized && o.url !== T.REFRESH_EMBED_TOKEN && o.url !== T.REFRESH_TOKEN && o.url !== T.SIGN_IN && o.url !== T.SIGN_UP && o.url !== T.OTP) {
|
|
1758
1758
|
if (!i)
|
|
1759
1759
|
throw Be(
|
|
1760
1760
|
"refresh_token",
|
|
@@ -1769,8 +1769,8 @@ const {
|
|
|
1769
1769
|
r = !0;
|
|
1770
1770
|
const R = localStorage.getItem(U.AUTH_FLOW) === Et.POST_MESSAGE ? qe.refreshEmbedToken : qe.refreshToken, { data: S, success: h, message: m } = await R(i);
|
|
1771
1771
|
if (!h)
|
|
1772
|
-
throw (u = o == null ? void 0 : o.url) != null && u.includes(
|
|
1773
|
-
return (l = o.url) != null && l.includes(
|
|
1772
|
+
throw (u = o == null ? void 0 : o.url) != null && u.includes(T.EXCHANGE_TOKEN) || Be("refresh_token", m), r = !1, De(e, t), t;
|
|
1773
|
+
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}`), De(e, null, S.token), s(o);
|
|
1774
1774
|
}
|
|
1775
1775
|
if ([
|
|
1776
1776
|
F.BadRequest,
|
|
@@ -1789,21 +1789,21 @@ const {
|
|
|
1789
1789
|
);
|
|
1790
1790
|
}, nr = g.create();
|
|
1791
1791
|
nr.interceptors.request.use((e) => (e.baseURL = He(), e.headers.Authorization = localStorage.getItem(U.TOKEN), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }));
|
|
1792
|
-
const
|
|
1793
|
-
|
|
1792
|
+
const A = g.create();
|
|
1793
|
+
A.interceptors.request.use((e) => (e = ft(e), e));
|
|
1794
1794
|
const rr = g.create();
|
|
1795
1795
|
rr.interceptors.request.use((e) => (e = Qn(e), e));
|
|
1796
1796
|
const sr = 3;
|
|
1797
1797
|
let or = !1;
|
|
1798
1798
|
const ir = [];
|
|
1799
|
-
|
|
1799
|
+
A.interceptors.response.use(
|
|
1800
1800
|
null,
|
|
1801
1801
|
(e) => dt(
|
|
1802
1802
|
ir,
|
|
1803
1803
|
e,
|
|
1804
1804
|
sr,
|
|
1805
1805
|
or,
|
|
1806
|
-
|
|
1806
|
+
A
|
|
1807
1807
|
)
|
|
1808
1808
|
);
|
|
1809
1809
|
class ar {
|
|
@@ -1817,16 +1817,16 @@ class ar {
|
|
|
1817
1817
|
I(this, "login", async (t) => {
|
|
1818
1818
|
var n, r, s, o;
|
|
1819
1819
|
try {
|
|
1820
|
-
const { data: i } = await
|
|
1820
|
+
const { data: i } = await A.post(T.SIGN_IN, {
|
|
1821
1821
|
email_address: t.email,
|
|
1822
1822
|
password: t.password
|
|
1823
1823
|
}), c = await $.ensureQueryData({
|
|
1824
1824
|
queryKey: [j.USER_REGIONS],
|
|
1825
1825
|
queryFn: this.getRegions
|
|
1826
|
-
}), f =
|
|
1826
|
+
}), f = L(i.data), u = (n = i.data) == null ? void 0 : n.accessToken;
|
|
1827
1827
|
return localStorage.setItem(U.TOKEN, u), {
|
|
1828
1828
|
success: !0,
|
|
1829
|
-
data:
|
|
1829
|
+
data: L({
|
|
1830
1830
|
...i.data,
|
|
1831
1831
|
token: u,
|
|
1832
1832
|
user: {
|
|
@@ -1853,7 +1853,7 @@ class ar {
|
|
|
1853
1853
|
I(this, "signUp", async (t) => {
|
|
1854
1854
|
var n, r, s, o, i;
|
|
1855
1855
|
try {
|
|
1856
|
-
const { data: c } = await
|
|
1856
|
+
const { data: c } = await A.post(T.SIGN_UP, {
|
|
1857
1857
|
user: {
|
|
1858
1858
|
email_address: t.email,
|
|
1859
1859
|
password: t.password,
|
|
@@ -1865,7 +1865,7 @@ class ar {
|
|
|
1865
1865
|
}), f = await $.ensureQueryData({
|
|
1866
1866
|
queryKey: [j.USER_REGIONS],
|
|
1867
1867
|
queryFn: this.getRegions
|
|
1868
|
-
}), u =
|
|
1868
|
+
}), u = L(c.data), l = (n = c.data) == null ? void 0 : n.tokens.accessToken;
|
|
1869
1869
|
return localStorage.setItem(U.TOKEN, l), {
|
|
1870
1870
|
success: !0,
|
|
1871
1871
|
data: {
|
|
@@ -1889,13 +1889,13 @@ class ar {
|
|
|
1889
1889
|
I(this, "getOrCreateGoogleUser", async (t, n) => {
|
|
1890
1890
|
var r, s, o, i, c;
|
|
1891
1891
|
try {
|
|
1892
|
-
const { data: f } = await
|
|
1892
|
+
const { data: f } = await A.post(T.GOOGLE_AUTH, {
|
|
1893
1893
|
google_access_token: t,
|
|
1894
1894
|
user_region: n
|
|
1895
1895
|
}), u = await $.ensureQueryData({
|
|
1896
1896
|
queryKey: [j.USER_REGIONS],
|
|
1897
1897
|
queryFn: this.getRegions
|
|
1898
|
-
}), l =
|
|
1898
|
+
}), l = L(f.data), d = (r = f.data) == null ? void 0 : r.tokens.accessToken;
|
|
1899
1899
|
return localStorage.setItem(U.TOKEN, d), {
|
|
1900
1900
|
success: !0,
|
|
1901
1901
|
data: {
|
|
@@ -1919,8 +1919,8 @@ class ar {
|
|
|
1919
1919
|
I(this, "resendVerificationEmail", async (t) => {
|
|
1920
1920
|
var n, r, s;
|
|
1921
1921
|
try {
|
|
1922
|
-
return (await
|
|
1923
|
-
|
|
1922
|
+
return (await A.post(
|
|
1923
|
+
T.RESEND_VERIFICATION_EMAIL,
|
|
1924
1924
|
{
|
|
1925
1925
|
email_address: t.email,
|
|
1926
1926
|
success_url: t.successUrl,
|
|
@@ -1944,8 +1944,8 @@ class ar {
|
|
|
1944
1944
|
I(this, "authenticateWithToken", async (t, n, r) => {
|
|
1945
1945
|
var s, o, i;
|
|
1946
1946
|
try {
|
|
1947
|
-
const { data: c } = await
|
|
1948
|
-
|
|
1947
|
+
const { data: c } = await A.post(
|
|
1948
|
+
T.EXCHANGE_TOKEN,
|
|
1949
1949
|
St({
|
|
1950
1950
|
idToken: t,
|
|
1951
1951
|
refreshToken: n,
|
|
@@ -1954,7 +1954,7 @@ class ar {
|
|
|
1954
1954
|
), f = await $.ensureQueryData({
|
|
1955
1955
|
queryKey: [j.USER_REGIONS],
|
|
1956
1956
|
queryFn: this.getRegions
|
|
1957
|
-
}), u =
|
|
1957
|
+
}), u = L(c.data);
|
|
1958
1958
|
return {
|
|
1959
1959
|
success: !0,
|
|
1960
1960
|
data: {
|
|
@@ -1981,7 +1981,7 @@ class ar {
|
|
|
1981
1981
|
*/
|
|
1982
1982
|
I(this, "checkUser", async () => {
|
|
1983
1983
|
try {
|
|
1984
|
-
const { data: t } = await
|
|
1984
|
+
const { data: t } = await A.get(T.ME), n = await $.ensureQueryData({
|
|
1985
1985
|
queryKey: [j.USER_REGIONS],
|
|
1986
1986
|
queryFn: this.getRegions
|
|
1987
1987
|
}), r = {
|
|
@@ -1992,7 +1992,7 @@ class ar {
|
|
|
1992
1992
|
};
|
|
1993
1993
|
return {
|
|
1994
1994
|
success: !0,
|
|
1995
|
-
data:
|
|
1995
|
+
data: L(r)
|
|
1996
1996
|
};
|
|
1997
1997
|
} catch (t) {
|
|
1998
1998
|
console.error(t);
|
|
@@ -2011,8 +2011,8 @@ class ar {
|
|
|
2011
2011
|
*/
|
|
2012
2012
|
I(this, "refreshEmbedToken", async (t) => {
|
|
2013
2013
|
try {
|
|
2014
|
-
const { data: n } = await
|
|
2015
|
-
|
|
2014
|
+
const { data: n } = await A.post(
|
|
2015
|
+
T.REFRESH_EMBED_TOKEN,
|
|
2016
2016
|
{
|
|
2017
2017
|
refreshToken: t
|
|
2018
2018
|
}
|
|
@@ -2036,8 +2036,8 @@ class ar {
|
|
|
2036
2036
|
*/
|
|
2037
2037
|
I(this, "refreshToken", async (t) => {
|
|
2038
2038
|
try {
|
|
2039
|
-
const { data: n } = await
|
|
2040
|
-
|
|
2039
|
+
const { data: n } = await A.post(
|
|
2040
|
+
T.REFRESH_TOKEN,
|
|
2041
2041
|
{
|
|
2042
2042
|
refreshToken: t
|
|
2043
2043
|
}
|
|
@@ -2062,7 +2062,7 @@ class ar {
|
|
|
2062
2062
|
*
|
|
2063
2063
|
* @returns A promise that resolves to a service response containing the request limit data.
|
|
2064
2064
|
*/
|
|
2065
|
-
I(this, "getRequestLimit", async () => (await
|
|
2065
|
+
I(this, "getRequestLimit", async () => (await A.get(T.REQUEST_LIMIT)).data);
|
|
2066
2066
|
/**
|
|
2067
2067
|
* Retrieves the regions available for user registration.
|
|
2068
2068
|
*
|
|
@@ -2070,12 +2070,27 @@ class ar {
|
|
|
2070
2070
|
*/
|
|
2071
2071
|
I(this, "getRegions", async () => {
|
|
2072
2072
|
var n;
|
|
2073
|
-
const t = await
|
|
2074
|
-
return
|
|
2073
|
+
const t = await A.get(T.REGIONS);
|
|
2074
|
+
return L((n = t.data) == null ? void 0 : n.data);
|
|
2075
2075
|
});
|
|
2076
2076
|
I(this, "getClientDetails", async () => {
|
|
2077
|
-
const { data: t } = await
|
|
2078
|
-
return
|
|
2077
|
+
const { data: t } = await A.get(T.CLIENT);
|
|
2078
|
+
return L(t.data);
|
|
2079
|
+
});
|
|
2080
|
+
I(this, "validate2FA", async (t, n) => {
|
|
2081
|
+
var r, s, o;
|
|
2082
|
+
try {
|
|
2083
|
+
const i = await A.post(T.OTP, {
|
|
2084
|
+
email_address: t,
|
|
2085
|
+
otp: n
|
|
2086
|
+
});
|
|
2087
|
+
return { success: !0, data: L(i.data) };
|
|
2088
|
+
} catch (i) {
|
|
2089
|
+
return console.error(i), {
|
|
2090
|
+
success: !1,
|
|
2091
|
+
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"
|
|
2092
|
+
};
|
|
2093
|
+
}
|
|
2079
2094
|
});
|
|
2080
2095
|
}
|
|
2081
2096
|
}
|
|
@@ -2089,8 +2104,8 @@ export {
|
|
|
2089
2104
|
qe as A,
|
|
2090
2105
|
j as E,
|
|
2091
2106
|
Re as a,
|
|
2092
|
-
|
|
2093
|
-
|
|
2107
|
+
L as b,
|
|
2108
|
+
A as c,
|
|
2094
2109
|
yt as d,
|
|
2095
2110
|
Zn as e,
|
|
2096
2111
|
Te as f,
|
|
@@ -13,7 +13,7 @@ import '../assets/_styles4.css';import '../assets/_styles6.css';import '../asset
|
|
|
13
13
|
/* empty css */
|
|
14
14
|
/* empty css */
|
|
15
15
|
import { awayzClient as y } from "../configs/awayzClient.js";
|
|
16
|
-
import "../noRetryInstance-
|
|
16
|
+
import "../noRetryInstance-CbNDzU_c.js";
|
|
17
17
|
/* empty css */
|
|
18
18
|
/* empty css */
|
|
19
19
|
import "../index-Cv-wvFlM.js";
|
|
@@ -2,7 +2,7 @@ var g = Object.defineProperty;
|
|
|
2
2
|
var f = (c, t, a) => t in c ? g(c, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : c[t] = a;
|
|
3
3
|
var r = (c, t, a) => f(c, typeof t != "symbol" ? t + "" : t, a);
|
|
4
4
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { c as l, b as m, g as p } from "../../noRetryInstance-
|
|
5
|
+
import { c as l, b as m, g as p } from "../../noRetryInstance-CbNDzU_c.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { EBookingEndpoints as i } from "../../configs/endpoints.js";
|
|
8
8
|
const y = (c) => {
|
|
@@ -2,7 +2,7 @@ import '../../assets/_styles4.css';import '../../assets/_styles6.css';import '..
|
|
|
2
2
|
var l = (c, r, t) => r in c ? f(c, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[r] = t;
|
|
3
3
|
var o = (c, r, t) => l(c, typeof r != "symbol" ? r + "" : r, t);
|
|
4
4
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { A as i, E as u, c as y } from "../../noRetryInstance-
|
|
5
|
+
import { A as i, E as u, c as y } from "../../noRetryInstance-CbNDzU_c.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { ECurrencyEndpoints as p } from "../../configs/endpoints.js";
|
|
8
8
|
import "react/jsx-runtime";
|
package/dist/services/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CurrencyService as a } from "./currency/CurrencyService.js";
|
|
2
|
-
import { c as t, a as o, g as c, i as s } from "../noRetryInstance-
|
|
2
|
+
import { c as t, a as o, g as c, i as s } from "../noRetryInstance-CbNDzU_c.js";
|
|
3
3
|
import { RewardsService as p } from "./rewards/RewardsService.js";
|
|
4
4
|
import { EBookingType as m } from "./trips/TripService.types.js";
|
|
5
5
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
2
2
|
import "../keys-BcBfU51M.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { c as r, g as s, i as c } from "../noRetryInstance-
|
|
4
|
+
import { c as r, g as s, i as c } from "../noRetryInstance-CbNDzU_c.js";
|
|
5
5
|
import "../configs/baseUrl.js";
|
|
6
6
|
export {
|
|
7
7
|
r as clientInstance,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
2
2
|
import "../keys-BcBfU51M.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { m as j, k, l as q, h as w, j as A, n as D, p as E } from "../noRetryInstance-
|
|
4
|
+
import { m as j, k, l as q, h as w, j as A, n as D, p as E } from "../noRetryInstance-CbNDzU_c.js";
|
|
5
5
|
import "../configs/baseUrl.js";
|
|
6
6
|
import "../configs/endpoints.js";
|
|
7
7
|
import "../configs/gatewayBaseUrl.js";
|