@starfish-codes/hellgate 3.1.0 → 3.1.1
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/hellgate-sdk.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
function
|
|
1
|
+
function wr(e) {
|
|
2
2
|
return Array.isArray(e) ? e.filter(Boolean) : Object.fromEntries(Object.entries(e).map(([t, r]) => [
|
|
3
3
|
t,
|
|
4
|
-
typeof r == "object" && r && !Array.isArray(r) ?
|
|
4
|
+
typeof r == "object" && r && !Array.isArray(r) ? wr(r) : r
|
|
5
5
|
]).filter(([t, r]) => typeof r == "object" && r && !Array.isArray(r) ? !!Object.keys(r).length : r != null && r != null));
|
|
6
6
|
}
|
|
7
7
|
function Q(e, t) {
|
|
@@ -12,13 +12,13 @@ function Q(e, t) {
|
|
|
12
12
|
}
|
|
13
13
|
return r;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function gt(e) {
|
|
16
16
|
if (!e.ok)
|
|
17
17
|
throw e;
|
|
18
18
|
return e.json();
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
class
|
|
20
|
+
const Dn = 2e3;
|
|
21
|
+
class Un {
|
|
22
22
|
constructor(t, r) {
|
|
23
23
|
Object.defineProperty(this, "session", {
|
|
24
24
|
enumerable: !0,
|
|
@@ -184,17 +184,17 @@ class Hn {
|
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
startAuthResultPolling(t, r) {
|
|
187
|
-
return window.clearTimeout(this.resultPollingTimer), this.resultPollingTimer = window.setTimeout(() => fetch(t).then((n) =>
|
|
187
|
+
return window.clearTimeout(this.resultPollingTimer), this.resultPollingTimer = window.setTimeout(() => fetch(t).then((n) => gt(n)).then((n) => {
|
|
188
188
|
this.startAuthResultPolling(t, r), r(n);
|
|
189
189
|
}).catch(() => {
|
|
190
|
-
}),
|
|
190
|
+
}), Dn), () => window.clearTimeout(this.resultPollingTimer);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
function it() {
|
|
194
194
|
return document.body;
|
|
195
195
|
}
|
|
196
|
-
var
|
|
197
|
-
function
|
|
196
|
+
var Hn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
197
|
+
function Ln(e) {
|
|
198
198
|
if (e.__esModule)
|
|
199
199
|
return e;
|
|
200
200
|
var t = e.default;
|
|
@@ -215,12 +215,12 @@ function Mn(e) {
|
|
|
215
215
|
});
|
|
216
216
|
}), r;
|
|
217
217
|
}
|
|
218
|
-
var
|
|
218
|
+
var gr = {}, Ne = {}, ne = {};
|
|
219
219
|
Object.defineProperty(ne, "__esModule", {
|
|
220
220
|
value: !0
|
|
221
221
|
});
|
|
222
222
|
ne.makeRequestWithoutElementsPayloadCheck = ne.makeRequestWithElementsPayloadCheck = void 0;
|
|
223
|
-
function
|
|
223
|
+
function Mn(e) {
|
|
224
224
|
function t() {
|
|
225
225
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
226
226
|
return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
|
|
@@ -234,54 +234,54 @@ function In(e) {
|
|
|
234
234
|
}
|
|
235
235
|
}), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
|
|
236
236
|
}
|
|
237
|
-
class
|
|
237
|
+
class Sr extends Mn(Error) {
|
|
238
238
|
constructor(t) {
|
|
239
239
|
super(t), this.name = "NoElementsError";
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const In = (e, t, r, n, s = {}) => {
|
|
243
243
|
if (e != null && e.hasElement(n))
|
|
244
244
|
return e.client[t](r, n, s);
|
|
245
245
|
let i = "Elements not initialized.";
|
|
246
|
-
throw e && (i = "Element not found in payload."), new
|
|
246
|
+
throw e && (i = "Element not found in payload."), new Sr(`${i} Use a regular HTTP client if no elements are needed.`);
|
|
247
247
|
};
|
|
248
|
-
ne.makeRequestWithElementsPayloadCheck =
|
|
249
|
-
const
|
|
248
|
+
ne.makeRequestWithElementsPayloadCheck = In;
|
|
249
|
+
const $n = (e, t, r, n = {}) => {
|
|
250
250
|
if (e)
|
|
251
251
|
return e.client[t](r, n);
|
|
252
|
-
throw new
|
|
252
|
+
throw new Sr("Elements not initialized. Use a regular HTTP client if no elements are needed.");
|
|
253
253
|
};
|
|
254
|
-
ne.makeRequestWithoutElementsPayloadCheck =
|
|
254
|
+
ne.makeRequestWithoutElementsPayloadCheck = $n;
|
|
255
255
|
var Ar = {}, De = {}, C = {}, b = {};
|
|
256
256
|
Object.defineProperty(b, "__esModule", {
|
|
257
257
|
value: !0
|
|
258
258
|
});
|
|
259
259
|
b.USER_AGENT_HEADER = b.USER_AGENT_CLIENT = b.MERGE_CONTENT_TYPE = b.DEFAULT_ELEMENTS_BASE_URL = b.DEFAULT_BASE_URL = b.CONTENT_TYPE_HEADER = b.CLIENT_USER_AGENT_HEADER = b.CLIENT_BASE_PATHS = b.BT_TRANSACTION_ID_HEADER = b.BT_TRACE_ID_HEADER = b.BT_IDEMPOTENCY_KEY_HEADER = b.BT_EXPOSE_PROXY_RESPONSE_HEADER = b.BROWSER_LIST = b.API_KEY_HEADER = void 0;
|
|
260
|
-
const
|
|
261
|
-
b.API_KEY_HEADER =
|
|
262
|
-
const
|
|
263
|
-
b.BT_TRACE_ID_HEADER =
|
|
264
|
-
const
|
|
265
|
-
b.BT_IDEMPOTENCY_KEY_HEADER =
|
|
266
|
-
const
|
|
267
|
-
b.BT_EXPOSE_PROXY_RESPONSE_HEADER =
|
|
268
|
-
const
|
|
269
|
-
b.BT_TRANSACTION_ID_HEADER =
|
|
270
|
-
const
|
|
271
|
-
b.CONTENT_TYPE_HEADER =
|
|
272
|
-
const
|
|
273
|
-
b.MERGE_CONTENT_TYPE =
|
|
274
|
-
const
|
|
275
|
-
b.USER_AGENT_HEADER =
|
|
276
|
-
const
|
|
277
|
-
b.CLIENT_USER_AGENT_HEADER =
|
|
278
|
-
const
|
|
279
|
-
b.USER_AGENT_CLIENT =
|
|
280
|
-
const
|
|
281
|
-
b.DEFAULT_BASE_URL =
|
|
282
|
-
const
|
|
283
|
-
b.DEFAULT_ELEMENTS_BASE_URL =
|
|
284
|
-
const
|
|
260
|
+
const Kn = "BT-API-KEY";
|
|
261
|
+
b.API_KEY_HEADER = Kn;
|
|
262
|
+
const qn = "bt-trace-id";
|
|
263
|
+
b.BT_TRACE_ID_HEADER = qn;
|
|
264
|
+
const Fn = "bt-idempotency-key";
|
|
265
|
+
b.BT_IDEMPOTENCY_KEY_HEADER = Fn;
|
|
266
|
+
const zn = "BT-EXPOSE-RAW-PROXY-RESPONSE";
|
|
267
|
+
b.BT_EXPOSE_PROXY_RESPONSE_HEADER = zn;
|
|
268
|
+
const Wn = "BT-TRANSACTION-ID";
|
|
269
|
+
b.BT_TRANSACTION_ID_HEADER = Wn;
|
|
270
|
+
const kn = "Content-Type";
|
|
271
|
+
b.CONTENT_TYPE_HEADER = kn;
|
|
272
|
+
const Gn = "application/merge-patch+json";
|
|
273
|
+
b.MERGE_CONTENT_TYPE = Gn;
|
|
274
|
+
const Vn = "User-Agent";
|
|
275
|
+
b.USER_AGENT_HEADER = Vn;
|
|
276
|
+
const Jn = "BT-CLIENT-USER-AGENT";
|
|
277
|
+
b.CLIENT_USER_AGENT_HEADER = Jn;
|
|
278
|
+
const Yn = "BasisTheoryJS";
|
|
279
|
+
b.USER_AGENT_CLIENT = Yn;
|
|
280
|
+
const Xn = "https://api.basistheory.com";
|
|
281
|
+
b.DEFAULT_BASE_URL = Xn;
|
|
282
|
+
const Zn = "https://js.basistheory.com/hosted-elements";
|
|
283
|
+
b.DEFAULT_ELEMENTS_BASE_URL = Zn;
|
|
284
|
+
const Qn = {
|
|
285
285
|
tokens: "tokens",
|
|
286
286
|
tokenize: "tokenize",
|
|
287
287
|
applications: "applications",
|
|
@@ -295,8 +295,8 @@ const es = {
|
|
|
295
295
|
sessions: "sessions",
|
|
296
296
|
transactions: "transactions"
|
|
297
297
|
};
|
|
298
|
-
b.CLIENT_BASE_PATHS =
|
|
299
|
-
const
|
|
298
|
+
b.CLIENT_BASE_PATHS = Qn;
|
|
299
|
+
const es = [{
|
|
300
300
|
browserName: "Firefox",
|
|
301
301
|
browserUA: "Firefox"
|
|
302
302
|
}, {
|
|
@@ -324,35 +324,35 @@ const ts = [{
|
|
|
324
324
|
browserName: "Safari",
|
|
325
325
|
browserUA: "Safari"
|
|
326
326
|
}];
|
|
327
|
-
b.BROWSER_LIST =
|
|
327
|
+
b.BROWSER_LIST = es;
|
|
328
328
|
var m = {};
|
|
329
|
-
function
|
|
329
|
+
function Tr(e, t) {
|
|
330
330
|
return function() {
|
|
331
331
|
return e.apply(t, arguments);
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
const { toString:
|
|
335
|
-
const r =
|
|
334
|
+
const { toString: ts } = Object.prototype, { getPrototypeOf: jt } = Object, Ue = /* @__PURE__ */ ((e) => (t) => {
|
|
335
|
+
const r = ts.call(t);
|
|
336
336
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
337
337
|
})(/* @__PURE__ */ Object.create(null)), $ = (e) => (e = e.toLowerCase(), (t) => Ue(t) === e), He = (e) => (t) => typeof t === e, { isArray: ae } = Array, fe = He("undefined");
|
|
338
|
-
function
|
|
338
|
+
function rs(e) {
|
|
339
339
|
return e !== null && !fe(e) && e.constructor !== null && !fe(e.constructor) && x(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
340
340
|
}
|
|
341
|
-
const
|
|
342
|
-
function
|
|
341
|
+
const Rr = $("ArrayBuffer");
|
|
342
|
+
function ns(e) {
|
|
343
343
|
let t;
|
|
344
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
344
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Rr(e.buffer), t;
|
|
345
345
|
}
|
|
346
|
-
const
|
|
346
|
+
const ss = He("string"), x = He("function"), vr = He("number"), Le = (e) => e !== null && typeof e == "object", is = (e) => e === !0 || e === !1, Oe = (e) => {
|
|
347
347
|
if (Ue(e) !== "object")
|
|
348
348
|
return !1;
|
|
349
|
-
const t =
|
|
349
|
+
const t = jt(e);
|
|
350
350
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
351
|
-
},
|
|
351
|
+
}, as = $("Date"), os = $("File"), cs = $("Blob"), us = $("FileList"), ls = (e) => Le(e) && x(e.pipe), ds = (e) => {
|
|
352
352
|
let t;
|
|
353
353
|
return e && (typeof FormData == "function" && e instanceof FormData || x(e.append) && ((t = Ue(e)) === "formdata" || // detect form-data instance
|
|
354
354
|
t === "object" && x(e.toString) && e.toString() === "[object FormData]"));
|
|
355
|
-
},
|
|
355
|
+
}, fs = $("URLSearchParams"), hs = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
356
356
|
function he(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
357
357
|
if (e === null || typeof e > "u")
|
|
358
358
|
return;
|
|
@@ -367,7 +367,7 @@ function he(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
|
367
367
|
o = i[n], t.call(null, e[o], o, e);
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function Or(e, t) {
|
|
371
371
|
t = t.toLowerCase();
|
|
372
372
|
const r = Object.keys(e);
|
|
373
373
|
let n = r.length, s;
|
|
@@ -376,23 +376,23 @@ function Cr(e, t) {
|
|
|
376
376
|
return s;
|
|
377
377
|
return null;
|
|
378
378
|
}
|
|
379
|
-
const
|
|
380
|
-
function
|
|
381
|
-
const { caseless: e } =
|
|
382
|
-
const i = e &&
|
|
383
|
-
Oe(t[i]) && Oe(n) ? t[i] =
|
|
379
|
+
const Cr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : Hn, Pr = (e) => !fe(e) && e !== Cr;
|
|
380
|
+
function St() {
|
|
381
|
+
const { caseless: e } = Pr(this) && this || {}, t = {}, r = (n, s) => {
|
|
382
|
+
const i = e && Or(t, s) || s;
|
|
383
|
+
Oe(t[i]) && Oe(n) ? t[i] = St(t[i], n) : Oe(n) ? t[i] = St({}, n) : ae(n) ? t[i] = n.slice() : t[i] = n;
|
|
384
384
|
};
|
|
385
385
|
for (let n = 0, s = arguments.length; n < s; n++)
|
|
386
386
|
arguments[n] && he(arguments[n], r);
|
|
387
387
|
return t;
|
|
388
388
|
}
|
|
389
|
-
const
|
|
390
|
-
r && x(s) ? e[i] =
|
|
391
|
-
}, { allOwnKeys: n }), e),
|
|
389
|
+
const ps = (e, t, r, { allOwnKeys: n } = {}) => (he(t, (s, i) => {
|
|
390
|
+
r && x(s) ? e[i] = Tr(s, r) : e[i] = s;
|
|
391
|
+
}, { allOwnKeys: n }), e), ms = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Es = (e, t, r, n) => {
|
|
392
392
|
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
393
393
|
value: t.prototype
|
|
394
394
|
}), r && Object.assign(e.prototype, r);
|
|
395
|
-
},
|
|
395
|
+
}, ys = (e, t, r, n) => {
|
|
396
396
|
let s, i, a;
|
|
397
397
|
const o = {};
|
|
398
398
|
if (t = t || {}, e == null)
|
|
@@ -400,51 +400,51 @@ const ms = (e, t, r, { allOwnKeys: n } = {}) => (he(t, (s, i) => {
|
|
|
400
400
|
do {
|
|
401
401
|
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
402
402
|
a = s[i], (!n || n(a, e, t)) && !o[a] && (t[a] = e[a], o[a] = !0);
|
|
403
|
-
e = r !== !1 &&
|
|
403
|
+
e = r !== !1 && jt(e);
|
|
404
404
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
405
405
|
return t;
|
|
406
|
-
},
|
|
406
|
+
}, bs = (e, t, r) => {
|
|
407
407
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
408
408
|
const n = e.indexOf(t, r);
|
|
409
409
|
return n !== -1 && n === r;
|
|
410
|
-
},
|
|
410
|
+
}, _s = (e) => {
|
|
411
411
|
if (!e)
|
|
412
412
|
return null;
|
|
413
413
|
if (ae(e))
|
|
414
414
|
return e;
|
|
415
415
|
let t = e.length;
|
|
416
|
-
if (!
|
|
416
|
+
if (!vr(t))
|
|
417
417
|
return null;
|
|
418
418
|
const r = new Array(t);
|
|
419
419
|
for (; t-- > 0; )
|
|
420
420
|
r[t] = e[t];
|
|
421
421
|
return r;
|
|
422
|
-
},
|
|
422
|
+
}, ws = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && jt(Uint8Array)), gs = (e, t) => {
|
|
423
423
|
const n = (e && e[Symbol.iterator]).call(e);
|
|
424
424
|
let s;
|
|
425
425
|
for (; (s = n.next()) && !s.done; ) {
|
|
426
426
|
const i = s.value;
|
|
427
427
|
t.call(e, i[0], i[1]);
|
|
428
428
|
}
|
|
429
|
-
},
|
|
429
|
+
}, Ss = (e, t) => {
|
|
430
430
|
let r;
|
|
431
431
|
const n = [];
|
|
432
432
|
for (; (r = e.exec(t)) !== null; )
|
|
433
433
|
n.push(r);
|
|
434
434
|
return n;
|
|
435
|
-
}, As = $("HTMLFormElement"),
|
|
435
|
+
}, As = $("HTMLFormElement"), Ts = (e) => e.toLowerCase().replace(
|
|
436
436
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
437
437
|
function(r, n, s) {
|
|
438
438
|
return n.toUpperCase() + s;
|
|
439
439
|
}
|
|
440
|
-
),
|
|
440
|
+
), Jt = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Rs = $("RegExp"), Br = (e, t) => {
|
|
441
441
|
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
442
442
|
he(r, (s, i) => {
|
|
443
443
|
let a;
|
|
444
444
|
(a = t(s, i, e)) !== !1 && (n[i] = a || s);
|
|
445
445
|
}), Object.defineProperties(e, n);
|
|
446
|
-
},
|
|
447
|
-
|
|
446
|
+
}, vs = (e) => {
|
|
447
|
+
Br(e, (t, r) => {
|
|
448
448
|
if (x(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
449
449
|
return !1;
|
|
450
450
|
const n = e[r];
|
|
@@ -458,29 +458,29 @@ const ms = (e, t, r, { allOwnKeys: n } = {}) => (he(t, (s, i) => {
|
|
|
458
458
|
});
|
|
459
459
|
}
|
|
460
460
|
});
|
|
461
|
-
},
|
|
461
|
+
}, Os = (e, t) => {
|
|
462
462
|
const r = {}, n = (s) => {
|
|
463
463
|
s.forEach((i) => {
|
|
464
464
|
r[i] = !0;
|
|
465
465
|
});
|
|
466
466
|
};
|
|
467
467
|
return ae(e) ? n(e) : n(String(e).split(t)), r;
|
|
468
|
-
},
|
|
469
|
-
},
|
|
470
|
-
DIGIT:
|
|
468
|
+
}, Cs = () => {
|
|
469
|
+
}, Ps = (e, t) => (e = +e, Number.isFinite(e) ? e : t), at = "abcdefghijklmnopqrstuvwxyz", Yt = "0123456789", xr = {
|
|
470
|
+
DIGIT: Yt,
|
|
471
471
|
ALPHA: at,
|
|
472
|
-
ALPHA_DIGIT: at + at.toUpperCase() +
|
|
473
|
-
},
|
|
472
|
+
ALPHA_DIGIT: at + at.toUpperCase() + Yt
|
|
473
|
+
}, Bs = (e = 16, t = xr.ALPHA_DIGIT) => {
|
|
474
474
|
let r = "";
|
|
475
475
|
const { length: n } = t;
|
|
476
476
|
for (; e--; )
|
|
477
477
|
r += t[Math.random() * n | 0];
|
|
478
478
|
return r;
|
|
479
479
|
};
|
|
480
|
-
function
|
|
480
|
+
function xs(e) {
|
|
481
481
|
return !!(e && x(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
482
482
|
}
|
|
483
|
-
const
|
|
483
|
+
const js = (e) => {
|
|
484
484
|
const t = new Array(10), r = (n, s) => {
|
|
485
485
|
if (Le(n)) {
|
|
486
486
|
if (t.indexOf(n) >= 0)
|
|
@@ -497,60 +497,60 @@ const Ns = (e) => {
|
|
|
497
497
|
return n;
|
|
498
498
|
};
|
|
499
499
|
return r(e, 0);
|
|
500
|
-
},
|
|
500
|
+
}, Ns = $("AsyncFunction"), Ds = (e) => e && (Le(e) || x(e)) && x(e.then) && x(e.catch);
|
|
501
501
|
var u = {
|
|
502
502
|
isArray: ae,
|
|
503
|
-
isArrayBuffer:
|
|
504
|
-
isBuffer:
|
|
505
|
-
isFormData:
|
|
506
|
-
isArrayBufferView:
|
|
507
|
-
isString:
|
|
508
|
-
isNumber:
|
|
509
|
-
isBoolean:
|
|
503
|
+
isArrayBuffer: Rr,
|
|
504
|
+
isBuffer: rs,
|
|
505
|
+
isFormData: ds,
|
|
506
|
+
isArrayBufferView: ns,
|
|
507
|
+
isString: ss,
|
|
508
|
+
isNumber: vr,
|
|
509
|
+
isBoolean: is,
|
|
510
510
|
isObject: Le,
|
|
511
511
|
isPlainObject: Oe,
|
|
512
512
|
isUndefined: fe,
|
|
513
|
-
isDate:
|
|
514
|
-
isFile:
|
|
515
|
-
isBlob:
|
|
516
|
-
isRegExp:
|
|
513
|
+
isDate: as,
|
|
514
|
+
isFile: os,
|
|
515
|
+
isBlob: cs,
|
|
516
|
+
isRegExp: Rs,
|
|
517
517
|
isFunction: x,
|
|
518
|
-
isStream:
|
|
519
|
-
isURLSearchParams:
|
|
520
|
-
isTypedArray:
|
|
521
|
-
isFileList:
|
|
518
|
+
isStream: ls,
|
|
519
|
+
isURLSearchParams: fs,
|
|
520
|
+
isTypedArray: ws,
|
|
521
|
+
isFileList: us,
|
|
522
522
|
forEach: he,
|
|
523
|
-
merge:
|
|
524
|
-
extend:
|
|
525
|
-
trim:
|
|
526
|
-
stripBOM:
|
|
527
|
-
inherits:
|
|
528
|
-
toFlatObject:
|
|
523
|
+
merge: St,
|
|
524
|
+
extend: ps,
|
|
525
|
+
trim: hs,
|
|
526
|
+
stripBOM: ms,
|
|
527
|
+
inherits: Es,
|
|
528
|
+
toFlatObject: ys,
|
|
529
529
|
kindOf: Ue,
|
|
530
530
|
kindOfTest: $,
|
|
531
|
-
endsWith:
|
|
532
|
-
toArray:
|
|
533
|
-
forEachEntry:
|
|
534
|
-
matchAll:
|
|
531
|
+
endsWith: bs,
|
|
532
|
+
toArray: _s,
|
|
533
|
+
forEachEntry: gs,
|
|
534
|
+
matchAll: Ss,
|
|
535
535
|
isHTMLForm: As,
|
|
536
|
-
hasOwnProperty:
|
|
537
|
-
hasOwnProp:
|
|
536
|
+
hasOwnProperty: Jt,
|
|
537
|
+
hasOwnProp: Jt,
|
|
538
538
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
539
|
-
reduceDescriptors:
|
|
540
|
-
freezeMethods:
|
|
541
|
-
toObjectSet:
|
|
542
|
-
toCamelCase:
|
|
543
|
-
noop:
|
|
544
|
-
toFiniteNumber:
|
|
545
|
-
findKey:
|
|
546
|
-
global:
|
|
547
|
-
isContextDefined:
|
|
548
|
-
ALPHABET:
|
|
549
|
-
generateString:
|
|
550
|
-
isSpecCompliantForm:
|
|
551
|
-
toJSONObject:
|
|
552
|
-
isAsyncFn:
|
|
553
|
-
isThenable:
|
|
539
|
+
reduceDescriptors: Br,
|
|
540
|
+
freezeMethods: vs,
|
|
541
|
+
toObjectSet: Os,
|
|
542
|
+
toCamelCase: Ts,
|
|
543
|
+
noop: Cs,
|
|
544
|
+
toFiniteNumber: Ps,
|
|
545
|
+
findKey: Or,
|
|
546
|
+
global: Cr,
|
|
547
|
+
isContextDefined: Pr,
|
|
548
|
+
ALPHABET: xr,
|
|
549
|
+
generateString: Bs,
|
|
550
|
+
isSpecCompliantForm: xs,
|
|
551
|
+
toJSONObject: js,
|
|
552
|
+
isAsyncFn: Ns,
|
|
553
|
+
isThenable: Ds
|
|
554
554
|
};
|
|
555
555
|
function y(e, t, r, n, s) {
|
|
556
556
|
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), r && (this.config = r), n && (this.request = n), s && (this.response = s);
|
|
@@ -576,7 +576,7 @@ u.inherits(y, Error, {
|
|
|
576
576
|
};
|
|
577
577
|
}
|
|
578
578
|
});
|
|
579
|
-
const
|
|
579
|
+
const jr = y.prototype, Nr = {};
|
|
580
580
|
[
|
|
581
581
|
"ERR_BAD_OPTION_VALUE",
|
|
582
582
|
"ERR_BAD_OPTION",
|
|
@@ -592,32 +592,32 @@ const Nr = y.prototype, Dr = {};
|
|
|
592
592
|
"ERR_INVALID_URL"
|
|
593
593
|
// eslint-disable-next-line func-names
|
|
594
594
|
].forEach((e) => {
|
|
595
|
-
|
|
595
|
+
Nr[e] = { value: e };
|
|
596
596
|
});
|
|
597
|
-
Object.defineProperties(y,
|
|
598
|
-
Object.defineProperty(
|
|
597
|
+
Object.defineProperties(y, Nr);
|
|
598
|
+
Object.defineProperty(jr, "isAxiosError", { value: !0 });
|
|
599
599
|
y.from = (e, t, r, n, s, i) => {
|
|
600
|
-
const a = Object.create(
|
|
600
|
+
const a = Object.create(jr);
|
|
601
601
|
return u.toFlatObject(e, a, function(l) {
|
|
602
602
|
return l !== Error.prototype;
|
|
603
603
|
}, (o) => o !== "isAxiosError"), y.call(a, e.message, t, r, n, s), a.cause = e, a.name = e.name, i && Object.assign(a, i), a;
|
|
604
604
|
};
|
|
605
|
-
var
|
|
605
|
+
var Us = null;
|
|
606
606
|
function At(e) {
|
|
607
607
|
return u.isPlainObject(e) || u.isArray(e);
|
|
608
608
|
}
|
|
609
|
-
function
|
|
609
|
+
function Dr(e) {
|
|
610
610
|
return u.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function Xt(e, t, r) {
|
|
613
613
|
return e ? e.concat(t).map(function(s, i) {
|
|
614
|
-
return s =
|
|
614
|
+
return s = Dr(s), !r && i ? "[" + s + "]" : s;
|
|
615
615
|
}).join(r ? "." : "") : t;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function Hs(e) {
|
|
618
618
|
return u.isArray(e) && !e.some(At);
|
|
619
619
|
}
|
|
620
|
-
const
|
|
620
|
+
const Ls = u.toFlatObject(u, {}, null, function(t) {
|
|
621
621
|
return /^is[A-Z]/.test(t);
|
|
622
622
|
});
|
|
623
623
|
function Me(e, t, r) {
|
|
@@ -627,8 +627,8 @@ function Me(e, t, r) {
|
|
|
627
627
|
metaTokens: !0,
|
|
628
628
|
dots: !1,
|
|
629
629
|
indexes: !1
|
|
630
|
-
}, !1, function(p,
|
|
631
|
-
return !u.isUndefined(
|
|
630
|
+
}, !1, function(p, T) {
|
|
631
|
+
return !u.isUndefined(T[p]);
|
|
632
632
|
});
|
|
633
633
|
const n = r.metaTokens, s = r.visitor || c, i = r.dots, a = r.indexes, l = (r.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(t);
|
|
634
634
|
if (!u.isFunction(s))
|
|
@@ -642,23 +642,23 @@ function Me(e, t, r) {
|
|
|
642
642
|
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
643
643
|
return u.isArrayBuffer(f) || u.isTypedArray(f) ? l && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
644
644
|
}
|
|
645
|
-
function c(f, p,
|
|
645
|
+
function c(f, p, T) {
|
|
646
646
|
let j = f;
|
|
647
|
-
if (f && !
|
|
647
|
+
if (f && !T && typeof f == "object") {
|
|
648
648
|
if (u.endsWith(p, "{}"))
|
|
649
649
|
p = n ? p : p.slice(0, -2), f = JSON.stringify(f);
|
|
650
|
-
else if (u.isArray(f) &&
|
|
651
|
-
return p =
|
|
650
|
+
else if (u.isArray(f) && Hs(f) || (u.isFileList(f) || u.endsWith(p, "[]")) && (j = u.toArray(f)))
|
|
651
|
+
return p = Dr(p), j.forEach(function(_e, Nn) {
|
|
652
652
|
!(u.isUndefined(_e) || _e === null) && t.append(
|
|
653
653
|
// eslint-disable-next-line no-nested-ternary
|
|
654
|
-
a === !0 ?
|
|
654
|
+
a === !0 ? Xt([p], Nn, i) : a === null ? p : p + "[]",
|
|
655
655
|
d(_e)
|
|
656
656
|
);
|
|
657
657
|
}), !1;
|
|
658
658
|
}
|
|
659
|
-
return At(f) ? !0 : (t.append(
|
|
659
|
+
return At(f) ? !0 : (t.append(Xt(T, p, i), d(f)), !1);
|
|
660
660
|
}
|
|
661
|
-
const h = [], E = Object.assign(
|
|
661
|
+
const h = [], E = Object.assign(Ls, {
|
|
662
662
|
defaultVisitor: c,
|
|
663
663
|
convertValue: d,
|
|
664
664
|
isVisitable: At
|
|
@@ -682,7 +682,7 @@ function Me(e, t, r) {
|
|
|
682
682
|
throw new TypeError("data must be an object");
|
|
683
683
|
return w(e), t;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function Zt(e) {
|
|
686
686
|
const t = {
|
|
687
687
|
"!": "%21",
|
|
688
688
|
"'": "%27",
|
|
@@ -696,36 +696,36 @@ function Qt(e) {
|
|
|
696
696
|
return t[n];
|
|
697
697
|
});
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function Nt(e, t) {
|
|
700
700
|
this._pairs = [], e && Me(e, this, t);
|
|
701
701
|
}
|
|
702
|
-
const
|
|
703
|
-
|
|
702
|
+
const Ur = Nt.prototype;
|
|
703
|
+
Ur.append = function(t, r) {
|
|
704
704
|
this._pairs.push([t, r]);
|
|
705
705
|
};
|
|
706
|
-
|
|
706
|
+
Ur.toString = function(t) {
|
|
707
707
|
const r = t ? function(n) {
|
|
708
|
-
return t.call(this, n,
|
|
709
|
-
} :
|
|
708
|
+
return t.call(this, n, Zt);
|
|
709
|
+
} : Zt;
|
|
710
710
|
return this._pairs.map(function(s) {
|
|
711
711
|
return r(s[0]) + "=" + r(s[1]);
|
|
712
712
|
}, "").join("&");
|
|
713
713
|
};
|
|
714
|
-
function
|
|
714
|
+
function Ms(e) {
|
|
715
715
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function Hr(e, t, r) {
|
|
718
718
|
if (!t)
|
|
719
719
|
return e;
|
|
720
|
-
const n = r && r.encode ||
|
|
720
|
+
const n = r && r.encode || Ms, s = r && r.serialize;
|
|
721
721
|
let i;
|
|
722
|
-
if (s ? i = s(t, r) : i = u.isURLSearchParams(t) ? t.toString() : new
|
|
722
|
+
if (s ? i = s(t, r) : i = u.isURLSearchParams(t) ? t.toString() : new Nt(t, r).toString(n), i) {
|
|
723
723
|
const a = e.indexOf("#");
|
|
724
724
|
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
725
725
|
}
|
|
726
726
|
return e;
|
|
727
727
|
}
|
|
728
|
-
class
|
|
728
|
+
class Is {
|
|
729
729
|
constructor() {
|
|
730
730
|
this.handlers = [];
|
|
731
731
|
}
|
|
@@ -779,41 +779,41 @@ class $s {
|
|
|
779
779
|
});
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
|
-
var
|
|
782
|
+
var Qt = Is, Lr = {
|
|
783
783
|
silentJSONParsing: !0,
|
|
784
784
|
forcedJSONParsing: !0,
|
|
785
785
|
clarifyTimeoutError: !1
|
|
786
|
-
},
|
|
786
|
+
}, $s = typeof URLSearchParams < "u" ? URLSearchParams : Nt, Ks = typeof FormData < "u" ? FormData : null, qs = typeof Blob < "u" ? Blob : null, Fs = {
|
|
787
787
|
isBrowser: !0,
|
|
788
788
|
classes: {
|
|
789
|
-
URLSearchParams:
|
|
790
|
-
FormData:
|
|
791
|
-
Blob:
|
|
789
|
+
URLSearchParams: $s,
|
|
790
|
+
FormData: Ks,
|
|
791
|
+
Blob: qs
|
|
792
792
|
},
|
|
793
793
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
794
794
|
};
|
|
795
|
-
const
|
|
795
|
+
const Mr = typeof window < "u" && typeof document < "u", zs = ((e) => Mr && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Ws = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
796
796
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function";
|
|
797
|
-
var
|
|
797
|
+
var ks = /* @__PURE__ */ Object.freeze({
|
|
798
798
|
__proto__: null,
|
|
799
|
-
hasBrowserEnv:
|
|
800
|
-
hasStandardBrowserWebWorkerEnv:
|
|
801
|
-
hasStandardBrowserEnv:
|
|
799
|
+
hasBrowserEnv: Mr,
|
|
800
|
+
hasStandardBrowserWebWorkerEnv: Ws,
|
|
801
|
+
hasStandardBrowserEnv: zs
|
|
802
802
|
}), H = {
|
|
803
|
-
...
|
|
804
|
-
...
|
|
803
|
+
...ks,
|
|
804
|
+
...Fs
|
|
805
805
|
};
|
|
806
|
-
function
|
|
806
|
+
function Gs(e, t) {
|
|
807
807
|
return Me(e, new H.classes.URLSearchParams(), Object.assign({
|
|
808
808
|
visitor: function(r, n, s, i) {
|
|
809
809
|
return H.isNode && u.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
810
810
|
}
|
|
811
811
|
}, t));
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function Vs(e) {
|
|
814
814
|
return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function Js(e) {
|
|
817
817
|
const t = {}, r = Object.keys(e);
|
|
818
818
|
let n;
|
|
819
819
|
const s = r.length;
|
|
@@ -822,21 +822,21 @@ function Ys(e) {
|
|
|
822
822
|
i = r[n], t[i] = e[i];
|
|
823
823
|
return t;
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function Ir(e) {
|
|
826
826
|
function t(r, n, s, i) {
|
|
827
827
|
let a = r[i++];
|
|
828
828
|
const o = Number.isFinite(+a), l = i >= r.length;
|
|
829
|
-
return a = !a && u.isArray(s) ? s.length : a, l ? (u.hasOwnProp(s, a) ? s[a] = [s[a], n] : s[a] = n, !o) : ((!s[a] || !u.isObject(s[a])) && (s[a] = []), t(r, n, s[a], i) && u.isArray(s[a]) && (s[a] =
|
|
829
|
+
return a = !a && u.isArray(s) ? s.length : a, l ? (u.hasOwnProp(s, a) ? s[a] = [s[a], n] : s[a] = n, !o) : ((!s[a] || !u.isObject(s[a])) && (s[a] = []), t(r, n, s[a], i) && u.isArray(s[a]) && (s[a] = Js(s[a])), !o);
|
|
830
830
|
}
|
|
831
831
|
if (u.isFormData(e) && u.isFunction(e.entries)) {
|
|
832
832
|
const r = {};
|
|
833
833
|
return u.forEachEntry(e, (n, s) => {
|
|
834
|
-
t(
|
|
834
|
+
t(Vs(n), s, r, 0);
|
|
835
835
|
}), r;
|
|
836
836
|
}
|
|
837
837
|
return null;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Ys(e, t, r) {
|
|
840
840
|
if (u.isString(e))
|
|
841
841
|
try {
|
|
842
842
|
return (t || JSON.parse)(e), u.trim(e);
|
|
@@ -846,13 +846,13 @@ function Xs(e, t, r) {
|
|
|
846
846
|
}
|
|
847
847
|
return (r || JSON.stringify)(e);
|
|
848
848
|
}
|
|
849
|
-
const
|
|
850
|
-
transitional:
|
|
849
|
+
const Dt = {
|
|
850
|
+
transitional: Lr,
|
|
851
851
|
adapter: ["xhr", "http"],
|
|
852
852
|
transformRequest: [function(t, r) {
|
|
853
853
|
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = u.isObject(t);
|
|
854
854
|
if (i && u.isHTMLForm(t) && (t = new FormData(t)), u.isFormData(t))
|
|
855
|
-
return s && s ? JSON.stringify(
|
|
855
|
+
return s && s ? JSON.stringify(Ir(t)) : t;
|
|
856
856
|
if (u.isArrayBuffer(t) || u.isBuffer(t) || u.isStream(t) || u.isFile(t) || u.isBlob(t))
|
|
857
857
|
return t;
|
|
858
858
|
if (u.isArrayBufferView(t))
|
|
@@ -862,7 +862,7 @@ const Ut = {
|
|
|
862
862
|
let o;
|
|
863
863
|
if (i) {
|
|
864
864
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
865
|
-
return
|
|
865
|
+
return Gs(t, this.formSerializer).toString();
|
|
866
866
|
if ((o = u.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
867
867
|
const l = this.env && this.env.FormData;
|
|
868
868
|
return Me(
|
|
@@ -872,10 +872,10 @@ const Ut = {
|
|
|
872
872
|
);
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
return i || s ? (r.setContentType("application/json", !1),
|
|
875
|
+
return i || s ? (r.setContentType("application/json", !1), Ys(t)) : t;
|
|
876
876
|
}],
|
|
877
877
|
transformResponse: [function(t) {
|
|
878
|
-
const r = this.transitional ||
|
|
878
|
+
const r = this.transitional || Dt.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
879
879
|
if (t && u.isString(t) && (n && !this.responseType || s)) {
|
|
880
880
|
const a = !(r && r.silentJSONParsing) && s;
|
|
881
881
|
try {
|
|
@@ -911,10 +911,10 @@ const Ut = {
|
|
|
911
911
|
}
|
|
912
912
|
};
|
|
913
913
|
u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
914
|
-
|
|
914
|
+
Dt.headers[e] = {};
|
|
915
915
|
});
|
|
916
|
-
var
|
|
917
|
-
const
|
|
916
|
+
var Ut = Dt;
|
|
917
|
+
const Xs = u.toObjectSet([
|
|
918
918
|
"age",
|
|
919
919
|
"authorization",
|
|
920
920
|
"content-length",
|
|
@@ -933,29 +933,29 @@ const Zs = u.toObjectSet([
|
|
|
933
933
|
"retry-after",
|
|
934
934
|
"user-agent"
|
|
935
935
|
]);
|
|
936
|
-
var
|
|
936
|
+
var Zs = (e) => {
|
|
937
937
|
const t = {};
|
|
938
938
|
let r, n, s;
|
|
939
939
|
return e && e.split(`
|
|
940
940
|
`).forEach(function(a) {
|
|
941
|
-
s = a.indexOf(":"), r = a.substring(0, s).trim().toLowerCase(), n = a.substring(s + 1).trim(), !(!r || t[r] &&
|
|
941
|
+
s = a.indexOf(":"), r = a.substring(0, s).trim().toLowerCase(), n = a.substring(s + 1).trim(), !(!r || t[r] && Xs[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
942
942
|
}), t;
|
|
943
943
|
};
|
|
944
|
-
const
|
|
944
|
+
const er = Symbol("internals");
|
|
945
945
|
function oe(e) {
|
|
946
946
|
return e && String(e).trim().toLowerCase();
|
|
947
947
|
}
|
|
948
948
|
function Ce(e) {
|
|
949
949
|
return e === !1 || e == null ? e : u.isArray(e) ? e.map(Ce) : String(e);
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function Qs(e) {
|
|
952
952
|
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
953
953
|
let n;
|
|
954
954
|
for (; n = r.exec(e); )
|
|
955
955
|
t[n[1]] = n[2];
|
|
956
956
|
return t;
|
|
957
957
|
}
|
|
958
|
-
const
|
|
958
|
+
const ei = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
959
959
|
function ot(e, t, r, n, s) {
|
|
960
960
|
if (u.isFunction(n))
|
|
961
961
|
return n.call(this, t, r);
|
|
@@ -966,10 +966,10 @@ function ot(e, t, r, n, s) {
|
|
|
966
966
|
return n.test(t);
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function ti(e) {
|
|
970
970
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function ri(e, t) {
|
|
973
973
|
const r = u.toCamelCase(" " + t);
|
|
974
974
|
["get", "set", "has"].forEach((n) => {
|
|
975
975
|
Object.defineProperty(e, n + r, {
|
|
@@ -994,7 +994,7 @@ class Ie {
|
|
|
994
994
|
(!h || s[h] === void 0 || d === !0 || d === void 0 && s[h] !== !1) && (s[h || l] = Ce(o));
|
|
995
995
|
}
|
|
996
996
|
const a = (o, l) => u.forEach(o, (d, c) => i(d, c, l));
|
|
997
|
-
return u.isPlainObject(t) || t instanceof this.constructor ? a(t, r) : u.isString(t) && (t = t.trim()) && !
|
|
997
|
+
return u.isPlainObject(t) || t instanceof this.constructor ? a(t, r) : u.isString(t) && (t = t.trim()) && !ei(t) ? a(Zs(t), r) : t != null && i(r, t, n), this;
|
|
998
998
|
}
|
|
999
999
|
get(t, r) {
|
|
1000
1000
|
if (t = oe(t), t) {
|
|
@@ -1004,7 +1004,7 @@ class Ie {
|
|
|
1004
1004
|
if (!r)
|
|
1005
1005
|
return s;
|
|
1006
1006
|
if (r === !0)
|
|
1007
|
-
return
|
|
1007
|
+
return Qs(s);
|
|
1008
1008
|
if (u.isFunction(r))
|
|
1009
1009
|
return r.call(this, s, n);
|
|
1010
1010
|
if (u.isRegExp(r))
|
|
@@ -1048,7 +1048,7 @@ class Ie {
|
|
|
1048
1048
|
r[a] = Ce(s), delete r[i];
|
|
1049
1049
|
return;
|
|
1050
1050
|
}
|
|
1051
|
-
const o = t ?
|
|
1051
|
+
const o = t ? ti(i) : String(i).trim();
|
|
1052
1052
|
o !== i && delete r[i], r[o] = Ce(s), n[o] = !0;
|
|
1053
1053
|
}), this;
|
|
1054
1054
|
}
|
|
@@ -1079,12 +1079,12 @@ class Ie {
|
|
|
1079
1079
|
return r.forEach((s) => n.set(s)), n;
|
|
1080
1080
|
}
|
|
1081
1081
|
static accessor(t) {
|
|
1082
|
-
const n = (this[
|
|
1082
|
+
const n = (this[er] = this[er] = {
|
|
1083
1083
|
accessors: {}
|
|
1084
1084
|
}).accessors, s = this.prototype;
|
|
1085
1085
|
function i(a) {
|
|
1086
1086
|
const o = oe(a);
|
|
1087
|
-
n[o] || (
|
|
1087
|
+
n[o] || (ri(s, a), n[o] = !0);
|
|
1088
1088
|
}
|
|
1089
1089
|
return u.isArray(t) ? t.forEach(i) : i(t), this;
|
|
1090
1090
|
}
|
|
@@ -1102,13 +1102,13 @@ u.reduceDescriptors(Ie.prototype, ({ value: e }, t) => {
|
|
|
1102
1102
|
u.freezeMethods(Ie);
|
|
1103
1103
|
var F = Ie;
|
|
1104
1104
|
function ct(e, t) {
|
|
1105
|
-
const r = this ||
|
|
1105
|
+
const r = this || Ut, n = t || r, s = F.from(n.headers);
|
|
1106
1106
|
let i = n.data;
|
|
1107
1107
|
return u.forEach(e, function(o) {
|
|
1108
1108
|
i = o.call(r, i, s.normalize(), t ? t.status : void 0);
|
|
1109
1109
|
}), s.normalize(), i;
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function $r(e) {
|
|
1112
1112
|
return !!(e && e.__CANCEL__);
|
|
1113
1113
|
}
|
|
1114
1114
|
function pe(e, t, r) {
|
|
@@ -1117,7 +1117,7 @@ function pe(e, t, r) {
|
|
|
1117
1117
|
u.inherits(pe, y, {
|
|
1118
1118
|
__CANCEL__: !0
|
|
1119
1119
|
});
|
|
1120
|
-
function
|
|
1120
|
+
function ni(e, t, r) {
|
|
1121
1121
|
const n = r.config.validateStatus;
|
|
1122
1122
|
!r.status || !n || n(r.status) ? e(r) : t(new y(
|
|
1123
1123
|
"Request failed with status code " + r.status,
|
|
@@ -1127,7 +1127,7 @@ function si(e, t, r) {
|
|
|
1127
1127
|
r
|
|
1128
1128
|
));
|
|
1129
1129
|
}
|
|
1130
|
-
var
|
|
1130
|
+
var si = H.hasStandardBrowserEnv ? (
|
|
1131
1131
|
// Standard browser envs support document.cookie
|
|
1132
1132
|
/* @__PURE__ */ function() {
|
|
1133
1133
|
return {
|
|
@@ -1158,16 +1158,16 @@ var ii = H.hasStandardBrowserEnv ? (
|
|
|
1158
1158
|
};
|
|
1159
1159
|
}()
|
|
1160
1160
|
);
|
|
1161
|
-
function
|
|
1161
|
+
function ii(e) {
|
|
1162
1162
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function ai(e, t) {
|
|
1165
1165
|
return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1168
|
-
return e && !
|
|
1167
|
+
function Kr(e, t) {
|
|
1168
|
+
return e && !ii(t) ? ai(e, t) : t;
|
|
1169
1169
|
}
|
|
1170
|
-
var
|
|
1170
|
+
var oi = H.hasStandardBrowserEnv ? (
|
|
1171
1171
|
// Standard browser envs have full support of the APIs needed to test
|
|
1172
1172
|
// whether the request URL is of the same origin as current location.
|
|
1173
1173
|
function() {
|
|
@@ -1199,11 +1199,11 @@ var ci = H.hasStandardBrowserEnv ? (
|
|
|
1199
1199
|
};
|
|
1200
1200
|
}()
|
|
1201
1201
|
);
|
|
1202
|
-
function
|
|
1202
|
+
function ci(e) {
|
|
1203
1203
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1204
1204
|
return t && t[1] || "";
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function ui(e, t) {
|
|
1207
1207
|
e = e || 10;
|
|
1208
1208
|
const r = new Array(e), n = new Array(e);
|
|
1209
1209
|
let s = 0, i = 0, a;
|
|
@@ -1219,9 +1219,9 @@ function li(e, t) {
|
|
|
1219
1219
|
return w ? Math.round(E * 1e3 / w) : void 0;
|
|
1220
1220
|
};
|
|
1221
1221
|
}
|
|
1222
|
-
function
|
|
1222
|
+
function tr(e, t) {
|
|
1223
1223
|
let r = 0;
|
|
1224
|
-
const n =
|
|
1224
|
+
const n = ui(50, 250);
|
|
1225
1225
|
return (s) => {
|
|
1226
1226
|
const i = s.loaded, a = s.lengthComputable ? s.total : void 0, o = i - r, l = n(o), d = i <= a;
|
|
1227
1227
|
r = i;
|
|
@@ -1237,8 +1237,8 @@ function rr(e, t) {
|
|
|
1237
1237
|
c[t ? "download" : "upload"] = !0, e(c);
|
|
1238
1238
|
};
|
|
1239
1239
|
}
|
|
1240
|
-
const
|
|
1241
|
-
var
|
|
1240
|
+
const li = typeof XMLHttpRequest < "u";
|
|
1241
|
+
var di = li && function(e) {
|
|
1242
1242
|
return new Promise(function(r, n) {
|
|
1243
1243
|
let s = e.data;
|
|
1244
1244
|
const i = F.from(e.headers).normalize(), a = e.responseType;
|
|
@@ -1251,7 +1251,7 @@ var fi = di && function(e) {
|
|
|
1251
1251
|
if (H.hasStandardBrowserEnv || H.hasStandardBrowserWebWorkerEnv)
|
|
1252
1252
|
i.setContentType(!1);
|
|
1253
1253
|
else if ((d = i.getContentType()) !== !1) {
|
|
1254
|
-
const [f, ...p] = d ? d.split(";").map((
|
|
1254
|
+
const [f, ...p] = d ? d.split(";").map((T) => T.trim()).filter(Boolean) : [];
|
|
1255
1255
|
i.setContentType([f || "multipart/form-data", ...p].join("; "));
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
@@ -1260,14 +1260,14 @@ var fi = di && function(e) {
|
|
|
1260
1260
|
const f = e.auth.username || "", p = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
1261
1261
|
i.set("Authorization", "Basic " + btoa(f + ":" + p));
|
|
1262
1262
|
}
|
|
1263
|
-
const h =
|
|
1264
|
-
c.open(e.method.toUpperCase(),
|
|
1263
|
+
const h = Kr(e.baseURL, e.url);
|
|
1264
|
+
c.open(e.method.toUpperCase(), Hr(h, e.params, e.paramsSerializer), !0), c.timeout = e.timeout;
|
|
1265
1265
|
function E() {
|
|
1266
1266
|
if (!c)
|
|
1267
1267
|
return;
|
|
1268
1268
|
const f = F.from(
|
|
1269
1269
|
"getAllResponseHeaders" in c && c.getAllResponseHeaders()
|
|
1270
|
-
),
|
|
1270
|
+
), T = {
|
|
1271
1271
|
data: !a || a === "text" || a === "json" ? c.responseText : c.response,
|
|
1272
1272
|
status: c.status,
|
|
1273
1273
|
statusText: c.statusText,
|
|
@@ -1275,11 +1275,11 @@ var fi = di && function(e) {
|
|
|
1275
1275
|
config: e,
|
|
1276
1276
|
request: c
|
|
1277
1277
|
};
|
|
1278
|
-
|
|
1278
|
+
ni(function(D) {
|
|
1279
1279
|
r(D), l();
|
|
1280
1280
|
}, function(D) {
|
|
1281
1281
|
n(D), l();
|
|
1282
|
-
},
|
|
1282
|
+
}, T), c = null;
|
|
1283
1283
|
}
|
|
1284
1284
|
if ("onloadend" in c ? c.onloadend = E : c.onreadystatechange = function() {
|
|
1285
1285
|
!c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(E);
|
|
@@ -1289,23 +1289,23 @@ var fi = di && function(e) {
|
|
|
1289
1289
|
n(new y("Network Error", y.ERR_NETWORK, e, c)), c = null;
|
|
1290
1290
|
}, c.ontimeout = function() {
|
|
1291
1291
|
let p = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
1292
|
-
const
|
|
1292
|
+
const T = e.transitional || Lr;
|
|
1293
1293
|
e.timeoutErrorMessage && (p = e.timeoutErrorMessage), n(new y(
|
|
1294
1294
|
p,
|
|
1295
|
-
|
|
1295
|
+
T.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1296
1296
|
e,
|
|
1297
1297
|
c
|
|
1298
1298
|
)), c = null;
|
|
1299
1299
|
}, H.hasStandardBrowserEnv) {
|
|
1300
|
-
const f =
|
|
1300
|
+
const f = oi(h) && e.xsrfCookieName && si.read(e.xsrfCookieName);
|
|
1301
1301
|
f && i.set(e.xsrfHeaderName, f);
|
|
1302
1302
|
}
|
|
1303
|
-
s === void 0 && i.setContentType(null), "setRequestHeader" in c && u.forEach(i.toJSON(), function(p,
|
|
1304
|
-
c.setRequestHeader(
|
|
1305
|
-
}), u.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), a && a !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress",
|
|
1303
|
+
s === void 0 && i.setContentType(null), "setRequestHeader" in c && u.forEach(i.toJSON(), function(p, T) {
|
|
1304
|
+
c.setRequestHeader(T, p);
|
|
1305
|
+
}), u.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), a && a !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", tr(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", tr(e.onUploadProgress)), (e.cancelToken || e.signal) && (o = (f) => {
|
|
1306
1306
|
c && (n(!f || f.type ? new pe(null, e, c) : f), c.abort(), c = null);
|
|
1307
1307
|
}, e.cancelToken && e.cancelToken.subscribe(o), e.signal && (e.signal.aborted ? o() : e.signal.addEventListener("abort", o)));
|
|
1308
|
-
const w =
|
|
1308
|
+
const w = ci(h);
|
|
1309
1309
|
if (w && H.protocols.indexOf(w) === -1) {
|
|
1310
1310
|
n(new y("Unsupported protocol " + w + ":", y.ERR_BAD_REQUEST, e));
|
|
1311
1311
|
return;
|
|
@@ -1313,11 +1313,11 @@ var fi = di && function(e) {
|
|
|
1313
1313
|
c.send(s || null);
|
|
1314
1314
|
});
|
|
1315
1315
|
};
|
|
1316
|
-
const
|
|
1317
|
-
http:
|
|
1318
|
-
xhr:
|
|
1316
|
+
const Tt = {
|
|
1317
|
+
http: Us,
|
|
1318
|
+
xhr: di
|
|
1319
1319
|
};
|
|
1320
|
-
u.forEach(
|
|
1320
|
+
u.forEach(Tt, (e, t) => {
|
|
1321
1321
|
if (e) {
|
|
1322
1322
|
try {
|
|
1323
1323
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1326,8 +1326,8 @@ u.forEach(Rt, (e, t) => {
|
|
|
1326
1326
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1327
1327
|
}
|
|
1328
1328
|
});
|
|
1329
|
-
const
|
|
1330
|
-
var
|
|
1329
|
+
const rr = (e) => `- ${e}`, fi = (e) => u.isFunction(e) || e === null || e === !1;
|
|
1330
|
+
var qr = {
|
|
1331
1331
|
getAdapter: (e) => {
|
|
1332
1332
|
e = u.isArray(e) ? e : [e];
|
|
1333
1333
|
const { length: t } = e;
|
|
@@ -1336,7 +1336,7 @@ var Fr = {
|
|
|
1336
1336
|
for (let i = 0; i < t; i++) {
|
|
1337
1337
|
r = e[i];
|
|
1338
1338
|
let a;
|
|
1339
|
-
if (n = r, !
|
|
1339
|
+
if (n = r, !fi(r) && (n = Tt[(a = String(r)).toLowerCase()], n === void 0))
|
|
1340
1340
|
throw new y(`Unknown adapter '${a}'`);
|
|
1341
1341
|
if (n)
|
|
1342
1342
|
break;
|
|
@@ -1347,8 +1347,8 @@ var Fr = {
|
|
|
1347
1347
|
([o, l]) => `adapter ${o} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1348
1348
|
);
|
|
1349
1349
|
let a = t ? i.length > 1 ? `since :
|
|
1350
|
-
` + i.map(
|
|
1351
|
-
`) : " " +
|
|
1350
|
+
` + i.map(rr).join(`
|
|
1351
|
+
`) : " " + rr(i[0]) : "as no adapter specified";
|
|
1352
1352
|
throw new y(
|
|
1353
1353
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1354
1354
|
"ERR_NOT_SUPPORT"
|
|
@@ -1356,31 +1356,31 @@ var Fr = {
|
|
|
1356
1356
|
}
|
|
1357
1357
|
return n;
|
|
1358
1358
|
},
|
|
1359
|
-
adapters:
|
|
1359
|
+
adapters: Tt
|
|
1360
1360
|
};
|
|
1361
1361
|
function ut(e) {
|
|
1362
1362
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1363
1363
|
throw new pe(null, e);
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1365
|
+
function nr(e) {
|
|
1366
1366
|
return ut(e), e.headers = F.from(e.headers), e.data = ct.call(
|
|
1367
1367
|
e,
|
|
1368
1368
|
e.transformRequest
|
|
1369
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1369
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), qr.getAdapter(e.adapter || Ut.adapter)(e).then(function(n) {
|
|
1370
1370
|
return ut(e), n.data = ct.call(
|
|
1371
1371
|
e,
|
|
1372
1372
|
e.transformResponse,
|
|
1373
1373
|
n
|
|
1374
1374
|
), n.headers = F.from(n.headers), n;
|
|
1375
1375
|
}, function(n) {
|
|
1376
|
-
return
|
|
1376
|
+
return $r(n) || (ut(e), n && n.response && (n.response.data = ct.call(
|
|
1377
1377
|
e,
|
|
1378
1378
|
e.transformResponse,
|
|
1379
1379
|
n.response
|
|
1380
1380
|
), n.response.headers = F.from(n.response.headers))), Promise.reject(n);
|
|
1381
1381
|
});
|
|
1382
1382
|
}
|
|
1383
|
-
const
|
|
1383
|
+
const sr = (e) => e instanceof F ? e.toJSON() : e;
|
|
1384
1384
|
function se(e, t) {
|
|
1385
1385
|
t = t || {};
|
|
1386
1386
|
const r = {};
|
|
@@ -1439,23 +1439,23 @@ function se(e, t) {
|
|
|
1439
1439
|
socketPath: a,
|
|
1440
1440
|
responseEncoding: a,
|
|
1441
1441
|
validateStatus: o,
|
|
1442
|
-
headers: (d, c) => s(
|
|
1442
|
+
headers: (d, c) => s(sr(d), sr(c), !0)
|
|
1443
1443
|
};
|
|
1444
1444
|
return u.forEach(Object.keys(Object.assign({}, e, t)), function(c) {
|
|
1445
1445
|
const h = l[c] || s, E = h(e[c], t[c], c);
|
|
1446
1446
|
u.isUndefined(E) && h !== o || (r[c] = E);
|
|
1447
1447
|
}), r;
|
|
1448
1448
|
}
|
|
1449
|
-
const
|
|
1449
|
+
const Fr = "1.6.1", Ht = {};
|
|
1450
1450
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1451
|
-
|
|
1451
|
+
Ht[e] = function(n) {
|
|
1452
1452
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1453
1453
|
};
|
|
1454
1454
|
});
|
|
1455
|
-
const
|
|
1456
|
-
|
|
1455
|
+
const ir = {};
|
|
1456
|
+
Ht.transitional = function(t, r, n) {
|
|
1457
1457
|
function s(i, a) {
|
|
1458
|
-
return "[Axios v" +
|
|
1458
|
+
return "[Axios v" + Fr + "] Transitional option '" + i + "'" + a + (n ? ". " + n : "");
|
|
1459
1459
|
}
|
|
1460
1460
|
return (i, a, o) => {
|
|
1461
1461
|
if (t === !1)
|
|
@@ -1463,7 +1463,7 @@ Lt.transitional = function(t, r, n) {
|
|
|
1463
1463
|
s(a, " has been removed" + (r ? " in " + r : "")),
|
|
1464
1464
|
y.ERR_DEPRECATED
|
|
1465
1465
|
);
|
|
1466
|
-
return r && !
|
|
1466
|
+
return r && !ir[a] && (ir[a] = !0, console.warn(
|
|
1467
1467
|
s(
|
|
1468
1468
|
a,
|
|
1469
1469
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
@@ -1471,7 +1471,7 @@ Lt.transitional = function(t, r, n) {
|
|
|
1471
1471
|
)), t ? t(i, a, o) : !0;
|
|
1472
1472
|
};
|
|
1473
1473
|
};
|
|
1474
|
-
function
|
|
1474
|
+
function hi(e, t, r) {
|
|
1475
1475
|
if (typeof e != "object")
|
|
1476
1476
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1477
1477
|
const n = Object.keys(e);
|
|
@@ -1488,16 +1488,16 @@ function pi(e, t, r) {
|
|
|
1488
1488
|
throw new y("Unknown option " + i, y.ERR_BAD_OPTION);
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
|
-
var
|
|
1492
|
-
assertOptions:
|
|
1493
|
-
validators:
|
|
1491
|
+
var Rt = {
|
|
1492
|
+
assertOptions: hi,
|
|
1493
|
+
validators: Ht
|
|
1494
1494
|
};
|
|
1495
|
-
const z =
|
|
1495
|
+
const z = Rt.validators;
|
|
1496
1496
|
class Be {
|
|
1497
1497
|
constructor(t) {
|
|
1498
1498
|
this.defaults = t, this.interceptors = {
|
|
1499
|
-
request: new
|
|
1500
|
-
response: new
|
|
1499
|
+
request: new Qt(),
|
|
1500
|
+
response: new Qt()
|
|
1501
1501
|
};
|
|
1502
1502
|
}
|
|
1503
1503
|
/**
|
|
@@ -1511,13 +1511,13 @@ class Be {
|
|
|
1511
1511
|
request(t, r) {
|
|
1512
1512
|
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = se(this.defaults, r);
|
|
1513
1513
|
const { transitional: n, paramsSerializer: s, headers: i } = r;
|
|
1514
|
-
n !== void 0 &&
|
|
1514
|
+
n !== void 0 && Rt.assertOptions(n, {
|
|
1515
1515
|
silentJSONParsing: z.transitional(z.boolean),
|
|
1516
1516
|
forcedJSONParsing: z.transitional(z.boolean),
|
|
1517
1517
|
clarifyTimeoutError: z.transitional(z.boolean)
|
|
1518
1518
|
}, !1), s != null && (u.isFunction(s) ? r.paramsSerializer = {
|
|
1519
1519
|
serialize: s
|
|
1520
|
-
} :
|
|
1520
|
+
} : Rt.assertOptions(s, {
|
|
1521
1521
|
encode: z.function,
|
|
1522
1522
|
serialize: z.function
|
|
1523
1523
|
}, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1542,7 +1542,7 @@ class Be {
|
|
|
1542
1542
|
});
|
|
1543
1543
|
let c, h = 0, E;
|
|
1544
1544
|
if (!l) {
|
|
1545
|
-
const f = [
|
|
1545
|
+
const f = [nr.bind(this), void 0];
|
|
1546
1546
|
for (f.unshift.apply(f, o), f.push.apply(f, d), E = f.length, c = Promise.resolve(r); h < E; )
|
|
1547
1547
|
c = c.then(f[h++], f[h++]);
|
|
1548
1548
|
return c;
|
|
@@ -1553,13 +1553,13 @@ class Be {
|
|
|
1553
1553
|
const f = o[h++], p = o[h++];
|
|
1554
1554
|
try {
|
|
1555
1555
|
w = f(w);
|
|
1556
|
-
} catch (
|
|
1557
|
-
p.call(this,
|
|
1556
|
+
} catch (T) {
|
|
1557
|
+
p.call(this, T);
|
|
1558
1558
|
break;
|
|
1559
1559
|
}
|
|
1560
1560
|
}
|
|
1561
1561
|
try {
|
|
1562
|
-
c =
|
|
1562
|
+
c = nr.call(this, w);
|
|
1563
1563
|
} catch (f) {
|
|
1564
1564
|
return Promise.reject(f);
|
|
1565
1565
|
}
|
|
@@ -1569,8 +1569,8 @@ class Be {
|
|
|
1569
1569
|
}
|
|
1570
1570
|
getUri(t) {
|
|
1571
1571
|
t = se(this.defaults, t);
|
|
1572
|
-
const r =
|
|
1573
|
-
return
|
|
1572
|
+
const r = Kr(t.baseURL, t.url);
|
|
1573
|
+
return Hr(r, t.params, t.paramsSerializer);
|
|
1574
1574
|
}
|
|
1575
1575
|
}
|
|
1576
1576
|
u.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1598,7 +1598,7 @@ u.forEach(["post", "put", "patch"], function(t) {
|
|
|
1598
1598
|
Be.prototype[t] = r(), Be.prototype[t + "Form"] = r(!0);
|
|
1599
1599
|
});
|
|
1600
1600
|
var Pe = Be;
|
|
1601
|
-
class
|
|
1601
|
+
class Lt {
|
|
1602
1602
|
constructor(t) {
|
|
1603
1603
|
if (typeof t != "function")
|
|
1604
1604
|
throw new TypeError("executor must be a function.");
|
|
@@ -1659,23 +1659,23 @@ class Mt {
|
|
|
1659
1659
|
static source() {
|
|
1660
1660
|
let t;
|
|
1661
1661
|
return {
|
|
1662
|
-
token: new
|
|
1662
|
+
token: new Lt(function(s) {
|
|
1663
1663
|
t = s;
|
|
1664
1664
|
}),
|
|
1665
1665
|
cancel: t
|
|
1666
1666
|
};
|
|
1667
1667
|
}
|
|
1668
1668
|
}
|
|
1669
|
-
var
|
|
1670
|
-
function
|
|
1669
|
+
var pi = Lt;
|
|
1670
|
+
function mi(e) {
|
|
1671
1671
|
return function(r) {
|
|
1672
1672
|
return e.apply(null, r);
|
|
1673
1673
|
};
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1675
|
+
function Ei(e) {
|
|
1676
1676
|
return u.isObject(e) && e.isAxiosError === !0;
|
|
1677
1677
|
}
|
|
1678
|
-
const
|
|
1678
|
+
const vt = {
|
|
1679
1679
|
Continue: 100,
|
|
1680
1680
|
SwitchingProtocols: 101,
|
|
1681
1681
|
Processing: 102,
|
|
@@ -1740,38 +1740,38 @@ const Ot = {
|
|
|
1740
1740
|
NotExtended: 510,
|
|
1741
1741
|
NetworkAuthenticationRequired: 511
|
|
1742
1742
|
};
|
|
1743
|
-
Object.entries(
|
|
1744
|
-
|
|
1743
|
+
Object.entries(vt).forEach(([e, t]) => {
|
|
1744
|
+
vt[t] = e;
|
|
1745
1745
|
});
|
|
1746
|
-
var
|
|
1747
|
-
function
|
|
1748
|
-
const t = new Pe(e), r =
|
|
1746
|
+
var yi = vt;
|
|
1747
|
+
function zr(e) {
|
|
1748
|
+
const t = new Pe(e), r = Tr(Pe.prototype.request, t);
|
|
1749
1749
|
return u.extend(r, Pe.prototype, t, { allOwnKeys: !0 }), u.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
1750
|
-
return
|
|
1750
|
+
return zr(se(e, s));
|
|
1751
1751
|
}, r;
|
|
1752
1752
|
}
|
|
1753
|
-
const
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1753
|
+
const A = zr(Ut);
|
|
1754
|
+
A.Axios = Pe;
|
|
1755
|
+
A.CanceledError = pe;
|
|
1756
|
+
A.CancelToken = pi;
|
|
1757
|
+
A.isCancel = $r;
|
|
1758
|
+
A.VERSION = Fr;
|
|
1759
|
+
A.toFormData = Me;
|
|
1760
|
+
A.AxiosError = y;
|
|
1761
|
+
A.Cancel = A.CanceledError;
|
|
1762
|
+
A.all = function(t) {
|
|
1763
1763
|
return Promise.all(t);
|
|
1764
1764
|
};
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
var
|
|
1774
|
-
const
|
|
1765
|
+
A.spread = mi;
|
|
1766
|
+
A.isAxiosError = Ei;
|
|
1767
|
+
A.mergeConfig = se;
|
|
1768
|
+
A.AxiosHeaders = F;
|
|
1769
|
+
A.formToJSON = (e) => Ir(u.isHTMLForm(e) ? new FormData(e) : e);
|
|
1770
|
+
A.getAdapter = qr.getAdapter;
|
|
1771
|
+
A.HttpStatusCode = yi;
|
|
1772
|
+
A.default = A;
|
|
1773
|
+
var Wr = A, Mt = { exports: {} };
|
|
1774
|
+
const kr = (e) => typeof e == "object" && e !== null, Gr = Symbol("skip"), ar = (e) => kr(e) && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date), Ot = (e, t, r, n = /* @__PURE__ */ new WeakMap()) => {
|
|
1775
1775
|
if (r = {
|
|
1776
1776
|
deep: !1,
|
|
1777
1777
|
target: {},
|
|
@@ -1781,45 +1781,45 @@ const Gr = (e) => typeof e == "object" && e !== null, Vr = Symbol("skip"), or =
|
|
|
1781
1781
|
n.set(e, r.target);
|
|
1782
1782
|
const { target: s } = r;
|
|
1783
1783
|
delete r.target;
|
|
1784
|
-
const i = (a) => a.map((o) =>
|
|
1784
|
+
const i = (a) => a.map((o) => ar(o) ? Ot(o, t, r, n) : o);
|
|
1785
1785
|
if (Array.isArray(e))
|
|
1786
1786
|
return i(e);
|
|
1787
1787
|
for (const [a, o] of Object.entries(e)) {
|
|
1788
1788
|
const l = t(a, o, e);
|
|
1789
|
-
if (l ===
|
|
1789
|
+
if (l === Gr)
|
|
1790
1790
|
continue;
|
|
1791
1791
|
let [d, c, { shouldRecurse: h = !0 } = {}] = l;
|
|
1792
|
-
d !== "__proto__" && (r.deep && h &&
|
|
1792
|
+
d !== "__proto__" && (r.deep && h && ar(c) && (c = Array.isArray(c) ? i(c) : Ot(c, t, r, n)), s[d] = c);
|
|
1793
1793
|
}
|
|
1794
1794
|
return s;
|
|
1795
1795
|
};
|
|
1796
|
-
|
|
1797
|
-
if (!
|
|
1796
|
+
Mt.exports = (e, t, r) => {
|
|
1797
|
+
if (!kr(e))
|
|
1798
1798
|
throw new TypeError(`Expected an object, got \`${e}\` (${typeof e})`);
|
|
1799
|
-
return
|
|
1799
|
+
return Ot(e, t, r);
|
|
1800
1800
|
};
|
|
1801
|
-
|
|
1802
|
-
var
|
|
1803
|
-
const
|
|
1801
|
+
Mt.exports.mapObjectSkip = Gr;
|
|
1802
|
+
var Vr = Mt.exports, It = { exports: {} };
|
|
1803
|
+
const bi = (e) => {
|
|
1804
1804
|
let t = !1, r = !1, n = !1;
|
|
1805
1805
|
for (let s = 0; s < e.length; s++) {
|
|
1806
1806
|
const i = e[s];
|
|
1807
1807
|
t && /[a-zA-Z]/.test(i) && i.toUpperCase() === i ? (e = e.slice(0, s) + "-" + e.slice(s), t = !1, n = r, r = !0, s++) : r && n && /[a-zA-Z]/.test(i) && i.toLowerCase() === i ? (e = e.slice(0, s - 1) + "-" + e.slice(s - 1), n = r, r = !1, t = !0) : (t = i.toLowerCase() === i && i.toUpperCase() !== i, n = r, r = i.toUpperCase() === i && i.toLowerCase() !== i);
|
|
1808
1808
|
}
|
|
1809
1809
|
return e;
|
|
1810
|
-
},
|
|
1810
|
+
}, Jr = (e, t) => {
|
|
1811
1811
|
if (!(typeof e == "string" || Array.isArray(e)))
|
|
1812
1812
|
throw new TypeError("Expected the input to be `string | string[]`");
|
|
1813
1813
|
t = Object.assign({
|
|
1814
1814
|
pascalCase: !1
|
|
1815
1815
|
}, t);
|
|
1816
1816
|
const r = (s) => t.pascalCase ? s.charAt(0).toUpperCase() + s.slice(1) : s;
|
|
1817
|
-
return Array.isArray(e) ? e = e.map((s) => s.trim()).filter((s) => s.length).join("-") : e = e.trim(), e.length === 0 ? "" : e.length === 1 ? t.pascalCase ? e.toUpperCase() : e.toLowerCase() : (e !== e.toLowerCase() && (e =
|
|
1817
|
+
return Array.isArray(e) ? e = e.map((s) => s.trim()).filter((s) => s.length).join("-") : e = e.trim(), e.length === 0 ? "" : e.length === 1 ? t.pascalCase ? e.toUpperCase() : e.toLowerCase() : (e !== e.toLowerCase() && (e = bi(e)), e = e.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (s, i) => i.toUpperCase()).replace(/\d+(\w|$)/g, (s) => s.toUpperCase()), r(e));
|
|
1818
1818
|
};
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
var
|
|
1822
|
-
class
|
|
1819
|
+
It.exports = Jr;
|
|
1820
|
+
It.exports.default = Jr;
|
|
1821
|
+
var _i = It.exports;
|
|
1822
|
+
class wi {
|
|
1823
1823
|
constructor(t = {}) {
|
|
1824
1824
|
if (!(t.maxSize && t.maxSize > 0))
|
|
1825
1825
|
throw new TypeError("`maxSize` must be a number greater than 0");
|
|
@@ -1878,9 +1878,9 @@ class gi {
|
|
|
1878
1878
|
return this._size + t;
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
|
-
var
|
|
1882
|
-
const
|
|
1883
|
-
if (!
|
|
1881
|
+
var gi = wi;
|
|
1882
|
+
const or = Vr, Si = _i, Ai = gi, Ti = (e, t) => e.some((r) => typeof r == "string" ? r === t : (r.lastIndex = 0, r.test(t))), lt = new Ai({ maxSize: 1e5 }), cr = (e) => typeof e == "object" && e !== null && !(e instanceof RegExp) && !(e instanceof Error) && !(e instanceof Date), ur = (e, t) => {
|
|
1883
|
+
if (!cr(e))
|
|
1884
1884
|
return e;
|
|
1885
1885
|
t = {
|
|
1886
1886
|
deep: !1,
|
|
@@ -1888,26 +1888,26 @@ const cr = Jr, Ti = wi, Ai = Si, Ri = (e, t) => e.some((r) => typeof r == "strin
|
|
|
1888
1888
|
...t
|
|
1889
1889
|
};
|
|
1890
1890
|
const { exclude: r, pascalCase: n, stopPaths: s, deep: i } = t, a = new Set(s), o = (l) => (d, c) => {
|
|
1891
|
-
if (i &&
|
|
1891
|
+
if (i && cr(c)) {
|
|
1892
1892
|
const h = l === void 0 ? d : `${l}.${d}`;
|
|
1893
|
-
a.has(h) || (c =
|
|
1893
|
+
a.has(h) || (c = or(c, o(h)));
|
|
1894
1894
|
}
|
|
1895
|
-
if (!(r &&
|
|
1895
|
+
if (!(r && Ti(r, d))) {
|
|
1896
1896
|
const h = n ? `${d}_` : d;
|
|
1897
1897
|
if (lt.has(h))
|
|
1898
1898
|
d = lt.get(h);
|
|
1899
1899
|
else {
|
|
1900
|
-
const E =
|
|
1900
|
+
const E = Si(d, { pascalCase: n });
|
|
1901
1901
|
d.length < 100 && lt.set(h, E), d = E;
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
1904
1904
|
return [d, c];
|
|
1905
1905
|
};
|
|
1906
|
-
return
|
|
1906
|
+
return or(e, o(void 0));
|
|
1907
1907
|
};
|
|
1908
|
-
var
|
|
1909
|
-
function
|
|
1910
|
-
return
|
|
1908
|
+
var Ri = (e, t) => Array.isArray(e) ? Object.keys(e).map((r) => ur(e[r], t)) : ur(e, t), dt, lr;
|
|
1909
|
+
function Yr() {
|
|
1910
|
+
return lr || (lr = 1, dt = Yr()), dt;
|
|
1911
1911
|
}
|
|
1912
1912
|
var xe = function() {
|
|
1913
1913
|
return xe = Object.assign || function(t) {
|
|
@@ -1919,69 +1919,69 @@ var xe = function() {
|
|
|
1919
1919
|
return t;
|
|
1920
1920
|
}, xe.apply(this, arguments);
|
|
1921
1921
|
};
|
|
1922
|
-
function
|
|
1922
|
+
function vi(e) {
|
|
1923
1923
|
return e.toLowerCase();
|
|
1924
1924
|
}
|
|
1925
|
-
var
|
|
1926
|
-
function
|
|
1925
|
+
var Oi = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], Ci = /[^A-Z0-9]+/gi;
|
|
1926
|
+
function Pi(e, t) {
|
|
1927
1927
|
t === void 0 && (t = {});
|
|
1928
|
-
for (var r = t.splitRegexp, n = r === void 0 ?
|
|
1928
|
+
for (var r = t.splitRegexp, n = r === void 0 ? Oi : r, s = t.stripRegexp, i = s === void 0 ? Ci : s, a = t.transform, o = a === void 0 ? vi : a, l = t.delimiter, d = l === void 0 ? " " : l, c = dr(dr(e, n, "$1\0$2"), i, "\0"), h = 0, E = c.length; c.charAt(h) === "\0"; )
|
|
1929
1929
|
h++;
|
|
1930
1930
|
for (; c.charAt(E - 1) === "\0"; )
|
|
1931
1931
|
E--;
|
|
1932
1932
|
return c.slice(h, E).split("\0").map(o).join(d);
|
|
1933
1933
|
}
|
|
1934
|
-
function
|
|
1934
|
+
function dr(e, t, r) {
|
|
1935
1935
|
return t instanceof RegExp ? e.replace(t, r) : t.reduce(function(n, s) {
|
|
1936
1936
|
return n.replace(s, r);
|
|
1937
1937
|
}, e);
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1940
|
-
return t === void 0 && (t = {}),
|
|
1939
|
+
function Bi(e, t) {
|
|
1940
|
+
return t === void 0 && (t = {}), Pi(e, xe({ delimiter: "." }, t));
|
|
1941
1941
|
}
|
|
1942
|
-
function
|
|
1943
|
-
return t === void 0 && (t = {}),
|
|
1942
|
+
function xi(e, t) {
|
|
1943
|
+
return t === void 0 && (t = {}), Bi(e, xe({ delimiter: "_" }, t));
|
|
1944
1944
|
}
|
|
1945
|
-
const
|
|
1945
|
+
const ji = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1946
1946
|
__proto__: null,
|
|
1947
|
-
snakeCase:
|
|
1948
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1949
|
-
var
|
|
1950
|
-
function
|
|
1951
|
-
return
|
|
1952
|
-
}
|
|
1953
|
-
var
|
|
1954
|
-
function
|
|
1955
|
-
return e.replace(
|
|
1947
|
+
snakeCase: xi
|
|
1948
|
+
}, Symbol.toStringTag, { value: "Module" })), Ni = /* @__PURE__ */ Ln(ji);
|
|
1949
|
+
var Di = Mi, Ui = /\s/, Hi = /(_|-|\.|:)/, Li = /([a-z][A-Z]|[A-Z][a-z])/;
|
|
1950
|
+
function Mi(e) {
|
|
1951
|
+
return Ui.test(e) ? e.toLowerCase() : Hi.test(e) ? ($i(e) || e).toLowerCase() : Li.test(e) ? qi(e).toLowerCase() : e.toLowerCase();
|
|
1952
|
+
}
|
|
1953
|
+
var Ii = /[\W_]+(.|$)/g;
|
|
1954
|
+
function $i(e) {
|
|
1955
|
+
return e.replace(Ii, function(t, r) {
|
|
1956
1956
|
return r ? " " + r : "";
|
|
1957
1957
|
});
|
|
1958
1958
|
}
|
|
1959
|
-
var
|
|
1960
|
-
function
|
|
1961
|
-
return e.replace(
|
|
1959
|
+
var Ki = /(.)([A-Z]+)/g;
|
|
1960
|
+
function qi(e) {
|
|
1961
|
+
return e.replace(Ki, function(t, r, n) {
|
|
1962
1962
|
return r + " " + n.toLowerCase().split("").join(" ");
|
|
1963
1963
|
});
|
|
1964
1964
|
}
|
|
1965
|
-
var
|
|
1966
|
-
function
|
|
1967
|
-
return
|
|
1965
|
+
var Fi = Di, zi = Wi;
|
|
1966
|
+
function Wi(e) {
|
|
1967
|
+
return Fi(e).replace(/[\W_]+(.|$)/g, function(t, r) {
|
|
1968
1968
|
return r ? " " + r : "";
|
|
1969
1969
|
}).trim();
|
|
1970
1970
|
}
|
|
1971
|
-
var
|
|
1972
|
-
function
|
|
1973
|
-
return
|
|
1971
|
+
var ki = zi, Gi = Vi;
|
|
1972
|
+
function Vi(e) {
|
|
1973
|
+
return ki(e).replace(/\s/g, "_");
|
|
1974
1974
|
}
|
|
1975
|
-
const
|
|
1976
|
-
var
|
|
1977
|
-
return t = Object.assign({ deep: !0, exclude: [] }, t),
|
|
1975
|
+
const Ji = Vr, Yi = Gi;
|
|
1976
|
+
var Xi = function(e, t) {
|
|
1977
|
+
return t = Object.assign({ deep: !0, exclude: [] }, t), Ji(e, function(r, n) {
|
|
1978
1978
|
return [
|
|
1979
|
-
|
|
1979
|
+
Zi(t.exclude, r) ? r : Yi(r),
|
|
1980
1980
|
n
|
|
1981
1981
|
];
|
|
1982
1982
|
}, t);
|
|
1983
1983
|
};
|
|
1984
|
-
function
|
|
1984
|
+
function Zi(e, t) {
|
|
1985
1985
|
return e.some(function(r) {
|
|
1986
1986
|
return typeof r == "string" ? r === t : r.test(t);
|
|
1987
1987
|
});
|
|
@@ -1991,7 +1991,7 @@ Object.defineProperty(me, "__esModule", {
|
|
|
1991
1991
|
value: !0
|
|
1992
1992
|
});
|
|
1993
1993
|
me.BasisTheoryApiError = void 0;
|
|
1994
|
-
function
|
|
1994
|
+
function Qi(e) {
|
|
1995
1995
|
function t() {
|
|
1996
1996
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
1997
1997
|
return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
|
|
@@ -2005,36 +2005,36 @@ function ea(e) {
|
|
|
2005
2005
|
}
|
|
2006
2006
|
}), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
|
|
2007
2007
|
}
|
|
2008
|
-
class
|
|
2008
|
+
class $t extends Qi(Error) {
|
|
2009
2009
|
constructor(t, r, n) {
|
|
2010
|
-
super(t), this.status = r, this.data = n, this.name = "BasisTheoryApiError", Object.setPrototypeOf(this,
|
|
2010
|
+
super(t), this.status = r, this.data = n, this.name = "BasisTheoryApiError", Object.setPrototypeOf(this, $t.prototype);
|
|
2011
2011
|
}
|
|
2012
2012
|
}
|
|
2013
|
-
me.BasisTheoryApiError =
|
|
2013
|
+
me.BasisTheoryApiError = $t;
|
|
2014
2014
|
Object.defineProperty(m, "__esModule", {
|
|
2015
2015
|
value: !0
|
|
2016
2016
|
});
|
|
2017
2017
|
m.transformTokenResponseCamelCase = m.transformTokenRequestSnakeCase = m.transformResponseCamelCase = m.transformRequestSnakeCase = m.transformReactorResponseCamelCase = m.transformReactorRequestSnakeCase = m.transformProxyResponseCamelCase = m.transformProxyRequestSnakeCase = m.proxyRaw = m.getRuntime = m.getQueryParams = m.getOSVersion = m.getBrowser = m.errorInterceptor = m.dataExtractor = m.dataAndHeadersExtractor = m.createRequestConfig = m.concatResponseTransformerWithDefault = m.concatRequestTransformerWithDefault = m.buildUserAgentString = m.buildClientUserAgentString = m.assertInit = void 0;
|
|
2018
|
-
var
|
|
2018
|
+
var Xr = $e(Wr), L = $e(Ri), fr = $e(Yr()), ea = Ni, Ee = $e(Xi), ta = me, J = b;
|
|
2019
2019
|
function $e(e) {
|
|
2020
2020
|
return e && e.__esModule ? e : { default: e };
|
|
2021
2021
|
}
|
|
2022
|
-
const
|
|
2022
|
+
const ra = (e) => {
|
|
2023
2023
|
if (e == null)
|
|
2024
2024
|
throw new Error("BasisTheory has not yet been properly initialized.");
|
|
2025
2025
|
return e;
|
|
2026
2026
|
};
|
|
2027
|
-
m.assertInit =
|
|
2028
|
-
const
|
|
2027
|
+
m.assertInit = ra;
|
|
2028
|
+
const na = (e) => {
|
|
2029
2029
|
if (!(typeof e > "u"))
|
|
2030
2030
|
return (0, Ee.default)(e, {
|
|
2031
2031
|
deep: !0
|
|
2032
2032
|
});
|
|
2033
2033
|
};
|
|
2034
|
-
m.transformRequestSnakeCase =
|
|
2035
|
-
const
|
|
2036
|
-
m.proxyRaw =
|
|
2037
|
-
const
|
|
2034
|
+
m.transformRequestSnakeCase = na;
|
|
2035
|
+
const sa = (e) => e;
|
|
2036
|
+
m.proxyRaw = sa;
|
|
2037
|
+
const ia = (e) => {
|
|
2038
2038
|
if (!(typeof e > "u"))
|
|
2039
2039
|
return {
|
|
2040
2040
|
...(0, Ee.default)(e, {
|
|
@@ -2045,8 +2045,8 @@ const aa = (e) => {
|
|
|
2045
2045
|
} : {}
|
|
2046
2046
|
};
|
|
2047
2047
|
};
|
|
2048
|
-
m.transformReactorRequestSnakeCase =
|
|
2049
|
-
const
|
|
2048
|
+
m.transformReactorRequestSnakeCase = ia;
|
|
2049
|
+
const aa = (e) => {
|
|
2050
2050
|
if (!(typeof e > "u"))
|
|
2051
2051
|
return {
|
|
2052
2052
|
...(0, Ee.default)(e, {
|
|
@@ -2057,8 +2057,8 @@ const oa = (e) => {
|
|
|
2057
2057
|
} : {}
|
|
2058
2058
|
};
|
|
2059
2059
|
};
|
|
2060
|
-
m.transformProxyRequestSnakeCase =
|
|
2061
|
-
const
|
|
2060
|
+
m.transformProxyRequestSnakeCase = aa;
|
|
2061
|
+
const oa = (e) => {
|
|
2062
2062
|
if (!(typeof e > "u"))
|
|
2063
2063
|
return {
|
|
2064
2064
|
...(0, Ee.default)(e, {
|
|
@@ -2072,10 +2072,10 @@ const ca = (e) => {
|
|
|
2072
2072
|
} : {}
|
|
2073
2073
|
};
|
|
2074
2074
|
};
|
|
2075
|
-
m.transformTokenRequestSnakeCase =
|
|
2076
|
-
const
|
|
2075
|
+
m.transformTokenRequestSnakeCase = oa;
|
|
2076
|
+
const Kt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == null ? void 0 : e.data) !== void 0, ca = (e) => {
|
|
2077
2077
|
if (!(typeof e > "u"))
|
|
2078
|
-
return
|
|
2078
|
+
return Kt(e) ? {
|
|
2079
2079
|
data: e.data.map((n) => ({
|
|
2080
2080
|
...(0, L.default)(n, {
|
|
2081
2081
|
deep: !0
|
|
@@ -2102,10 +2102,10 @@ const qt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == n
|
|
|
2102
2102
|
} : {}
|
|
2103
2103
|
};
|
|
2104
2104
|
};
|
|
2105
|
-
m.transformTokenResponseCamelCase =
|
|
2106
|
-
const
|
|
2105
|
+
m.transformTokenResponseCamelCase = ca;
|
|
2106
|
+
const ua = (e) => {
|
|
2107
2107
|
if (!(typeof e > "u"))
|
|
2108
|
-
return
|
|
2108
|
+
return Kt(e) ? {
|
|
2109
2109
|
data: e.data.map((n) => ({
|
|
2110
2110
|
...(0, L.default)(n, {
|
|
2111
2111
|
deep: !0
|
|
@@ -2126,10 +2126,10 @@ const la = (e) => {
|
|
|
2126
2126
|
} : {}
|
|
2127
2127
|
};
|
|
2128
2128
|
};
|
|
2129
|
-
m.transformReactorResponseCamelCase =
|
|
2130
|
-
const
|
|
2129
|
+
m.transformReactorResponseCamelCase = ua;
|
|
2130
|
+
const la = (e) => {
|
|
2131
2131
|
if (!(typeof e > "u"))
|
|
2132
|
-
return
|
|
2132
|
+
return Kt(e) ? {
|
|
2133
2133
|
data: e.data.map((n) => ({
|
|
2134
2134
|
...(0, L.default)(n, {
|
|
2135
2135
|
deep: !0
|
|
@@ -2150,33 +2150,33 @@ const da = (e) => {
|
|
|
2150
2150
|
} : {}
|
|
2151
2151
|
};
|
|
2152
2152
|
};
|
|
2153
|
-
m.transformProxyResponseCamelCase =
|
|
2154
|
-
const
|
|
2153
|
+
m.transformProxyResponseCamelCase = la;
|
|
2154
|
+
const da = (e) => {
|
|
2155
2155
|
if (!(typeof e > "u"))
|
|
2156
2156
|
return (0, L.default)(e, {
|
|
2157
2157
|
deep: !0
|
|
2158
2158
|
});
|
|
2159
2159
|
};
|
|
2160
|
-
m.transformResponseCamelCase =
|
|
2161
|
-
const
|
|
2162
|
-
m.dataExtractor =
|
|
2163
|
-
const
|
|
2160
|
+
m.transformResponseCamelCase = da;
|
|
2161
|
+
const fa = (e) => e == null ? void 0 : e.data;
|
|
2162
|
+
m.dataExtractor = fa;
|
|
2163
|
+
const ha = (e) => ({
|
|
2164
2164
|
data: e == null ? void 0 : e.data,
|
|
2165
2165
|
headers: e == null ? void 0 : e.headers
|
|
2166
2166
|
});
|
|
2167
|
-
m.dataAndHeadersExtractor =
|
|
2168
|
-
const
|
|
2169
|
-
m.concatRequestTransformerWithDefault =
|
|
2170
|
-
const
|
|
2171
|
-
m.concatResponseTransformerWithDefault =
|
|
2172
|
-
const
|
|
2167
|
+
m.dataAndHeadersExtractor = ha;
|
|
2168
|
+
const Ct = (e) => [e, ...Xr.default.defaults.transformRequest];
|
|
2169
|
+
m.concatRequestTransformerWithDefault = Ct;
|
|
2170
|
+
const Pt = (e) => [...Xr.default.defaults.transformResponse, e];
|
|
2171
|
+
m.concatResponseTransformerWithDefault = Pt;
|
|
2172
|
+
const pa = (e, t) => {
|
|
2173
2173
|
if (!e)
|
|
2174
2174
|
return t ? {
|
|
2175
2175
|
...t.transformRequest !== void 0 ? {
|
|
2176
|
-
transformRequest:
|
|
2176
|
+
transformRequest: Ct(t.transformRequest)
|
|
2177
2177
|
} : {},
|
|
2178
2178
|
...t.transformResponse !== void 0 ? {
|
|
2179
|
-
transformResponse:
|
|
2179
|
+
transformResponse: Pt(t.transformResponse)
|
|
2180
2180
|
} : {}
|
|
2181
2181
|
} : void 0;
|
|
2182
2182
|
const {
|
|
@@ -2209,25 +2209,25 @@ const ma = (e, t) => {
|
|
|
2209
2209
|
params: a
|
|
2210
2210
|
},
|
|
2211
2211
|
...(t == null ? void 0 : t.transformRequest) !== void 0 ? {
|
|
2212
|
-
transformRequest:
|
|
2212
|
+
transformRequest: Ct(t.transformRequest)
|
|
2213
2213
|
} : {},
|
|
2214
2214
|
...(t == null ? void 0 : t.transformResponse) !== void 0 ? {
|
|
2215
|
-
transformResponse:
|
|
2215
|
+
transformResponse: Pt(t.transformResponse)
|
|
2216
2216
|
} : {}
|
|
2217
2217
|
};
|
|
2218
2218
|
};
|
|
2219
|
-
m.createRequestConfig =
|
|
2220
|
-
const
|
|
2219
|
+
m.createRequestConfig = pa;
|
|
2220
|
+
const ma = (e) => {
|
|
2221
2221
|
var t, r;
|
|
2222
2222
|
const n = ((t = e.response) === null || t === void 0 ? void 0 : t.status) || -1, s = (r = e.response) === null || r === void 0 ? void 0 : r.data;
|
|
2223
|
-
throw new
|
|
2223
|
+
throw new ta.BasisTheoryApiError(e.message, n, s);
|
|
2224
2224
|
};
|
|
2225
|
-
m.errorInterceptor =
|
|
2226
|
-
const
|
|
2225
|
+
m.errorInterceptor = ma;
|
|
2226
|
+
const Ea = (e = {}) => {
|
|
2227
2227
|
const t = Object.keys(e);
|
|
2228
2228
|
if (t.length) {
|
|
2229
2229
|
const r = new URLSearchParams(), n = (s, i, a = !1) => {
|
|
2230
|
-
const o = typeof i, l = a ? s : (0,
|
|
2230
|
+
const o = typeof i, l = a ? s : (0, ea.snakeCase)(s);
|
|
2231
2231
|
(i === null || ["boolean", "number", "string"].includes(o)) && r.append(l, i);
|
|
2232
2232
|
};
|
|
2233
2233
|
return t.forEach((s) => {
|
|
@@ -2241,13 +2241,13 @@ const ya = (e = {}) => {
|
|
|
2241
2241
|
}
|
|
2242
2242
|
return "";
|
|
2243
2243
|
};
|
|
2244
|
-
m.getQueryParams =
|
|
2245
|
-
const
|
|
2244
|
+
m.getQueryParams = Ea;
|
|
2245
|
+
const ya = (e) => `(${e.name || ""}; ${e.version || ""}; ${e.url || ""})`, ba = (e) => {
|
|
2246
2246
|
let t = `${J.USER_AGENT_CLIENT}/unknown`;
|
|
2247
|
-
return e && Object.keys(e || {}).length && (t += ` ${
|
|
2247
|
+
return e && Object.keys(e || {}).length && (t += ` ${ya(e)}`), t;
|
|
2248
2248
|
};
|
|
2249
|
-
m.buildUserAgentString =
|
|
2250
|
-
const
|
|
2249
|
+
m.buildUserAgentString = ba;
|
|
2250
|
+
const Zr = () => {
|
|
2251
2251
|
const {
|
|
2252
2252
|
userAgent: e
|
|
2253
2253
|
} = window.navigator;
|
|
@@ -2261,13 +2261,13 @@ const Qr = () => {
|
|
|
2261
2261
|
}
|
|
2262
2262
|
return `${(r == null ? void 0 : r.browserName) || "unknown"}/${t}`;
|
|
2263
2263
|
};
|
|
2264
|
-
m.getBrowser =
|
|
2265
|
-
const
|
|
2266
|
-
if (
|
|
2264
|
+
m.getBrowser = Zr;
|
|
2265
|
+
const Qr = () => typeof window == "object" && window.navigator.product === "ReactNative", en = () => {
|
|
2266
|
+
if (Qr())
|
|
2267
2267
|
return "ReactNative";
|
|
2268
2268
|
if (typeof window > "u")
|
|
2269
2269
|
try {
|
|
2270
|
-
return `${
|
|
2270
|
+
return `${fr.default.type()}/${fr.default.version()}`;
|
|
2271
2271
|
} catch {
|
|
2272
2272
|
return "unknown";
|
|
2273
2273
|
}
|
|
@@ -2278,26 +2278,26 @@ const en = () => typeof window == "object" && window.navigator.product === "Reac
|
|
|
2278
2278
|
return "unknown";
|
|
2279
2279
|
}
|
|
2280
2280
|
};
|
|
2281
|
-
m.getOSVersion =
|
|
2282
|
-
const
|
|
2283
|
-
m.getRuntime =
|
|
2284
|
-
const
|
|
2281
|
+
m.getOSVersion = en;
|
|
2282
|
+
const tn = () => Qr() ? "ReactNative" : typeof window > "u" ? `NodeJS/${process.version}` : Zr();
|
|
2283
|
+
m.getRuntime = tn;
|
|
2284
|
+
const _a = (e) => {
|
|
2285
2285
|
const t = {
|
|
2286
2286
|
client: J.USER_AGENT_CLIENT,
|
|
2287
2287
|
clientVersion: "unknown",
|
|
2288
|
-
osVersion:
|
|
2289
|
-
runtimeVersion:
|
|
2288
|
+
osVersion: en(),
|
|
2289
|
+
runtimeVersion: tn(),
|
|
2290
2290
|
application: {}
|
|
2291
2291
|
};
|
|
2292
2292
|
return e && (t.application = e), JSON.stringify((0, Ee.default)(t));
|
|
2293
2293
|
};
|
|
2294
|
-
m.buildClientUserAgentString =
|
|
2294
|
+
m.buildClientUserAgentString = _a;
|
|
2295
2295
|
var Ke = {};
|
|
2296
2296
|
Object.defineProperty(Ke, "__esModule", {
|
|
2297
2297
|
value: !0
|
|
2298
2298
|
});
|
|
2299
2299
|
Ke.BasisTheoryValidationError = void 0;
|
|
2300
|
-
function
|
|
2300
|
+
function wa(e) {
|
|
2301
2301
|
function t() {
|
|
2302
2302
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
2303
2303
|
return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
|
|
@@ -2311,18 +2311,18 @@ function ga(e) {
|
|
|
2311
2311
|
}
|
|
2312
2312
|
}), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
|
|
2313
2313
|
}
|
|
2314
|
-
class
|
|
2314
|
+
class qt extends wa(Error) {
|
|
2315
2315
|
constructor(t, r, n) {
|
|
2316
|
-
super(t), this.details = r, this.validation = n, this.name = "BasisTheoryValidationError", Object.setPrototypeOf(this,
|
|
2316
|
+
super(t), this.details = r, this.validation = n, this.name = "BasisTheoryValidationError", Object.setPrototypeOf(this, qt.prototype);
|
|
2317
2317
|
}
|
|
2318
2318
|
}
|
|
2319
|
-
Ke.BasisTheoryValidationError =
|
|
2319
|
+
Ke.BasisTheoryValidationError = qt;
|
|
2320
2320
|
var qe = {};
|
|
2321
2321
|
Object.defineProperty(qe, "__esModule", {
|
|
2322
2322
|
value: !0
|
|
2323
2323
|
});
|
|
2324
2324
|
qe.HttpClientError = void 0;
|
|
2325
|
-
function
|
|
2325
|
+
function ga(e) {
|
|
2326
2326
|
function t() {
|
|
2327
2327
|
var r = Reflect.construct(e, Array.from(arguments));
|
|
2328
2328
|
return Object.setPrototypeOf(r, Object.getPrototypeOf(this)), r;
|
|
@@ -2336,12 +2336,12 @@ function Sa(e) {
|
|
|
2336
2336
|
}
|
|
2337
2337
|
}), Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e, t;
|
|
2338
2338
|
}
|
|
2339
|
-
class
|
|
2339
|
+
class Ft extends ga(Error) {
|
|
2340
2340
|
constructor(t, r, n, s) {
|
|
2341
|
-
super(t), this.name = "HttpClientError", this.status = r, this.data = n, this.headers = s, Object.setPrototypeOf(this,
|
|
2341
|
+
super(t), this.name = "HttpClientError", this.status = r, this.data = n, this.headers = s, Object.setPrototypeOf(this, Ft.prototype);
|
|
2342
2342
|
}
|
|
2343
2343
|
}
|
|
2344
|
-
qe.HttpClientError =
|
|
2344
|
+
qe.HttpClientError = Ft;
|
|
2345
2345
|
(function(e) {
|
|
2346
2346
|
Object.defineProperty(e, "__esModule", {
|
|
2347
2347
|
value: !0
|
|
@@ -2387,16 +2387,16 @@ qe.HttpClientError = zt;
|
|
|
2387
2387
|
});
|
|
2388
2388
|
var s = me, i = Ke, a = qe;
|
|
2389
2389
|
})(C);
|
|
2390
|
-
var P = {},
|
|
2390
|
+
var P = {}, Sa = {}, Fe = {};
|
|
2391
2391
|
Object.defineProperty(Fe, "__esModule", {
|
|
2392
2392
|
value: !0
|
|
2393
2393
|
});
|
|
2394
2394
|
Fe.BasisTheoryService = void 0;
|
|
2395
|
-
var we = Aa(
|
|
2395
|
+
var we = Aa(Wr), W = C;
|
|
2396
2396
|
function Aa(e) {
|
|
2397
2397
|
return e && e.__esModule ? e : { default: e };
|
|
2398
2398
|
}
|
|
2399
|
-
class
|
|
2399
|
+
class Ta {
|
|
2400
2400
|
constructor(t) {
|
|
2401
2401
|
const {
|
|
2402
2402
|
apiKey: r,
|
|
@@ -2423,12 +2423,12 @@ class Ra {
|
|
|
2423
2423
|
}), this.client.interceptors.response.use(void 0, W.errorInterceptor);
|
|
2424
2424
|
}
|
|
2425
2425
|
}
|
|
2426
|
-
Fe.BasisTheoryService =
|
|
2426
|
+
Fe.BasisTheoryService = Ta;
|
|
2427
2427
|
(function(e) {
|
|
2428
2428
|
Object.defineProperty(e, "__esModule", {
|
|
2429
2429
|
value: !0
|
|
2430
2430
|
});
|
|
2431
|
-
var t =
|
|
2431
|
+
var t = Sa;
|
|
2432
2432
|
Object.keys(t).forEach(function(n) {
|
|
2433
2433
|
n === "default" || n === "__esModule" || n in e && e[n] === t[n] || Object.defineProperty(e, n, {
|
|
2434
2434
|
enumerable: !0,
|
|
@@ -2451,8 +2451,8 @@ Object.defineProperty(De, "__esModule", {
|
|
|
2451
2451
|
value: !0
|
|
2452
2452
|
});
|
|
2453
2453
|
De.BasisTheoryTransactions = void 0;
|
|
2454
|
-
var ft = C, ce = m,
|
|
2455
|
-
class
|
|
2454
|
+
var ft = C, ce = m, Ra = P;
|
|
2455
|
+
class va extends Ra.BasisTheoryService {
|
|
2456
2456
|
constructor(t) {
|
|
2457
2457
|
const r = {
|
|
2458
2458
|
...t
|
|
@@ -2471,7 +2471,7 @@ class Oa extends va.BasisTheoryService {
|
|
|
2471
2471
|
return this.client.post(n, void 0, (0, ft.createRequestConfig)(r)).then(ce.dataExtractor);
|
|
2472
2472
|
}
|
|
2473
2473
|
}
|
|
2474
|
-
De.BasisTheoryTransactions =
|
|
2474
|
+
De.BasisTheoryTransactions = va;
|
|
2475
2475
|
(function(e) {
|
|
2476
2476
|
Object.defineProperty(e, "__esModule", {
|
|
2477
2477
|
value: !0
|
|
@@ -2486,25 +2486,25 @@ De.BasisTheoryTransactions = Oa;
|
|
|
2486
2486
|
});
|
|
2487
2487
|
});
|
|
2488
2488
|
})(Ar);
|
|
2489
|
-
var
|
|
2489
|
+
var zt = {}, ze = {}, K = {};
|
|
2490
2490
|
Object.defineProperty(K, "__esModule", {
|
|
2491
2491
|
value: !0
|
|
2492
2492
|
});
|
|
2493
2493
|
K.CrudBuilder = void 0;
|
|
2494
2494
|
var v = C;
|
|
2495
|
-
const
|
|
2495
|
+
const Oa = (e) => class extends e {
|
|
2496
2496
|
create(r, n) {
|
|
2497
2497
|
return this.client.post("/", r, (0, v.createRequestConfig)(n)).then(v.dataExtractor);
|
|
2498
2498
|
}
|
|
2499
|
-
},
|
|
2499
|
+
}, Ca = (e) => class extends e {
|
|
2500
2500
|
retrieve(r, n) {
|
|
2501
2501
|
return this.client.get(r, (0, v.createRequestConfig)(n)).then(v.dataExtractor);
|
|
2502
2502
|
}
|
|
2503
|
-
},
|
|
2503
|
+
}, Pa = (e) => class extends e {
|
|
2504
2504
|
update(r, n, s) {
|
|
2505
2505
|
return this.client.put(r, n, (0, v.createRequestConfig)(s)).then(v.dataExtractor);
|
|
2506
2506
|
}
|
|
2507
|
-
},
|
|
2507
|
+
}, Ba = (e) => class extends e {
|
|
2508
2508
|
patch(r, n, s) {
|
|
2509
2509
|
const i = (0, v.createRequestConfig)(s);
|
|
2510
2510
|
return this.client.patch(r, n, {
|
|
@@ -2515,49 +2515,49 @@ const Ca = (e) => class extends e {
|
|
|
2515
2515
|
}
|
|
2516
2516
|
}).then(v.dataExtractor);
|
|
2517
2517
|
}
|
|
2518
|
-
},
|
|
2518
|
+
}, xa = (e) => class extends e {
|
|
2519
2519
|
async delete(r, n) {
|
|
2520
2520
|
await this.client.delete(r, (0, v.createRequestConfig)(n));
|
|
2521
2521
|
}
|
|
2522
|
-
},
|
|
2522
|
+
}, ja = (e) => class extends e {
|
|
2523
2523
|
list(r = {}, n = {}) {
|
|
2524
2524
|
const s = `/${(0, v.getQueryParams)(r)}`;
|
|
2525
2525
|
return this.client.get(s, (0, v.createRequestConfig)(n)).then(v.dataExtractor);
|
|
2526
2526
|
}
|
|
2527
2527
|
};
|
|
2528
|
-
class
|
|
2528
|
+
class Na {
|
|
2529
2529
|
constructor(t) {
|
|
2530
2530
|
this.BaseService = t;
|
|
2531
2531
|
}
|
|
2532
2532
|
create() {
|
|
2533
|
-
return this.BaseService =
|
|
2533
|
+
return this.BaseService = Oa(this.BaseService), this;
|
|
2534
2534
|
}
|
|
2535
2535
|
retrieve() {
|
|
2536
|
-
return this.BaseService =
|
|
2536
|
+
return this.BaseService = Ca(this.BaseService), this;
|
|
2537
2537
|
}
|
|
2538
2538
|
update() {
|
|
2539
|
-
return this.BaseService =
|
|
2539
|
+
return this.BaseService = Pa(this.BaseService), this;
|
|
2540
2540
|
}
|
|
2541
2541
|
patch() {
|
|
2542
|
-
return this.BaseService =
|
|
2542
|
+
return this.BaseService = Ba(this.BaseService), this;
|
|
2543
2543
|
}
|
|
2544
2544
|
delete() {
|
|
2545
|
-
return this.BaseService =
|
|
2545
|
+
return this.BaseService = xa(this.BaseService), this;
|
|
2546
2546
|
}
|
|
2547
2547
|
list() {
|
|
2548
|
-
return this.BaseService =
|
|
2548
|
+
return this.BaseService = ja(this.BaseService), this;
|
|
2549
2549
|
}
|
|
2550
2550
|
build() {
|
|
2551
2551
|
return this.BaseService;
|
|
2552
2552
|
}
|
|
2553
2553
|
}
|
|
2554
|
-
K.CrudBuilder =
|
|
2554
|
+
K.CrudBuilder = Na;
|
|
2555
2555
|
Object.defineProperty(ze, "__esModule", {
|
|
2556
2556
|
value: !0
|
|
2557
2557
|
});
|
|
2558
2558
|
ze.BasisTheoryApplications = void 0;
|
|
2559
|
-
var ge = C,
|
|
2560
|
-
const
|
|
2559
|
+
var ge = C, Da = P, Ua = K;
|
|
2560
|
+
const Ha = new Ua.CrudBuilder(class extends Da.BasisTheoryService {
|
|
2561
2561
|
/**
|
|
2562
2562
|
* @deprecated use {@link retrieveByKey} instead
|
|
2563
2563
|
*/
|
|
@@ -2571,7 +2571,7 @@ const La = new Ha.CrudBuilder(class extends Ua.BasisTheoryService {
|
|
|
2571
2571
|
return this.client.post(`${t}/regenerate`, void 0, (0, ge.createRequestConfig)(r)).then(ge.dataExtractor);
|
|
2572
2572
|
}
|
|
2573
2573
|
}).create().retrieve().update().delete().list().build();
|
|
2574
|
-
ze.BasisTheoryApplications =
|
|
2574
|
+
ze.BasisTheoryApplications = Ha;
|
|
2575
2575
|
(function(e) {
|
|
2576
2576
|
Object.defineProperty(e, "__esModule", {
|
|
2577
2577
|
value: !0
|
|
@@ -2582,14 +2582,14 @@ ze.BasisTheoryApplications = La;
|
|
|
2582
2582
|
}
|
|
2583
2583
|
});
|
|
2584
2584
|
var t = ze;
|
|
2585
|
-
})(
|
|
2586
|
-
var
|
|
2585
|
+
})(zt);
|
|
2586
|
+
var rn = {}, nn = {}, We = {}, sn = {}, ke = {};
|
|
2587
2587
|
Object.defineProperty(ke, "__esModule", {
|
|
2588
2588
|
value: !0
|
|
2589
2589
|
});
|
|
2590
2590
|
ke.BasisTheoryTokenize = void 0;
|
|
2591
|
-
var Se = C,
|
|
2592
|
-
class
|
|
2591
|
+
var Se = C, La = P;
|
|
2592
|
+
class Ma extends La.BasisTheoryService {
|
|
2593
2593
|
tokenize(t, r = {}) {
|
|
2594
2594
|
return this.client.post("/", t, (0, Se.createRequestConfig)(r, {
|
|
2595
2595
|
transformRequest: Se.proxyRaw,
|
|
@@ -2597,7 +2597,7 @@ class Ia extends Ma.BasisTheoryService {
|
|
|
2597
2597
|
})).then(Se.dataExtractor);
|
|
2598
2598
|
}
|
|
2599
2599
|
}
|
|
2600
|
-
ke.BasisTheoryTokenize =
|
|
2600
|
+
ke.BasisTheoryTokenize = Ma;
|
|
2601
2601
|
(function(e) {
|
|
2602
2602
|
Object.defineProperty(e, "__esModule", {
|
|
2603
2603
|
value: !0
|
|
@@ -2608,25 +2608,25 @@ ke.BasisTheoryTokenize = Ia;
|
|
|
2608
2608
|
}
|
|
2609
2609
|
});
|
|
2610
2610
|
var t = ke;
|
|
2611
|
-
})(
|
|
2611
|
+
})(sn);
|
|
2612
2612
|
Object.defineProperty(We, "__esModule", {
|
|
2613
2613
|
value: !0
|
|
2614
2614
|
});
|
|
2615
2615
|
We.delegateTokenize = void 0;
|
|
2616
|
-
var
|
|
2617
|
-
const
|
|
2616
|
+
var Ia = sn;
|
|
2617
|
+
const $a = (e) => class extends Ia.BasisTheoryTokenize {
|
|
2618
2618
|
tokenize(r, n) {
|
|
2619
2619
|
return e != null && e.hasElement(r) ? e.tokenize(r, n) : super.tokenize(r, n);
|
|
2620
2620
|
}
|
|
2621
2621
|
};
|
|
2622
|
-
We.delegateTokenize =
|
|
2623
|
-
var Ge = {},
|
|
2622
|
+
We.delegateTokenize = $a;
|
|
2623
|
+
var Ge = {}, Wt = {}, Ve = {};
|
|
2624
2624
|
Object.defineProperty(Ve, "__esModule", {
|
|
2625
2625
|
value: !0
|
|
2626
2626
|
});
|
|
2627
2627
|
Ve.BasisTheoryTokens = void 0;
|
|
2628
|
-
var U = C, V = m,
|
|
2629
|
-
const
|
|
2628
|
+
var U = C, V = m, Ka = P, qa = K;
|
|
2629
|
+
const Fa = new qa.CrudBuilder(class extends Ka.BasisTheoryService {
|
|
2630
2630
|
constructor(t) {
|
|
2631
2631
|
const r = t;
|
|
2632
2632
|
r.transformRequest = [].concat(V.transformTokenRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(V.transformTokenResponseCamelCase, t.transformResponse || []), super(r);
|
|
@@ -2665,7 +2665,7 @@ const za = new Fa.CrudBuilder(class extends qa.BasisTheoryService {
|
|
|
2665
2665
|
return this.client.post("/search", t, (0, U.createRequestConfig)(r)).then(V.dataExtractor);
|
|
2666
2666
|
}
|
|
2667
2667
|
}).create().delete().list().build();
|
|
2668
|
-
Ve.BasisTheoryTokens =
|
|
2668
|
+
Ve.BasisTheoryTokens = Fa;
|
|
2669
2669
|
(function(e) {
|
|
2670
2670
|
Object.defineProperty(e, "__esModule", {
|
|
2671
2671
|
value: !0
|
|
@@ -2676,13 +2676,13 @@ Ve.BasisTheoryTokens = za;
|
|
|
2676
2676
|
}
|
|
2677
2677
|
});
|
|
2678
2678
|
var t = Ve;
|
|
2679
|
-
})(
|
|
2679
|
+
})(Wt);
|
|
2680
2680
|
Object.defineProperty(Ge, "__esModule", {
|
|
2681
2681
|
value: !0
|
|
2682
2682
|
});
|
|
2683
2683
|
Ge.delegateTokens = void 0;
|
|
2684
|
-
var
|
|
2685
|
-
const
|
|
2684
|
+
var za = Wt;
|
|
2685
|
+
const Wa = (e) => class extends za.BasisTheoryTokens {
|
|
2686
2686
|
create(r, n) {
|
|
2687
2687
|
return e != null && e.hasElement(r) ? e.tokens.create(r, n) : super.create(r, n);
|
|
2688
2688
|
}
|
|
@@ -2693,14 +2693,14 @@ const ka = (e) => class extends Wa.BasisTheoryTokens {
|
|
|
2693
2693
|
return e !== void 0 ? e.tokens.retrieve(r, n) : super.retrieve(r, n);
|
|
2694
2694
|
}
|
|
2695
2695
|
};
|
|
2696
|
-
Ge.delegateTokens =
|
|
2697
|
-
var Je = {},
|
|
2696
|
+
Ge.delegateTokens = Wa;
|
|
2697
|
+
var Je = {}, an = {}, Ye = {};
|
|
2698
2698
|
Object.defineProperty(Ye, "__esModule", {
|
|
2699
2699
|
value: !0
|
|
2700
2700
|
});
|
|
2701
2701
|
Ye.BasisTheoryProxy = void 0;
|
|
2702
|
-
var q = C,
|
|
2703
|
-
class
|
|
2702
|
+
var q = C, ka = P;
|
|
2703
|
+
class Ga extends ka.BasisTheoryService {
|
|
2704
2704
|
get(t) {
|
|
2705
2705
|
return this.proxyRequest("get", t);
|
|
2706
2706
|
}
|
|
@@ -2732,7 +2732,7 @@ class Va extends Ga.BasisTheoryService {
|
|
|
2732
2732
|
})).then(q.dataExtractor);
|
|
2733
2733
|
}
|
|
2734
2734
|
}
|
|
2735
|
-
Ye.BasisTheoryProxy =
|
|
2735
|
+
Ye.BasisTheoryProxy = Ga;
|
|
2736
2736
|
(function(e) {
|
|
2737
2737
|
Object.defineProperty(e, "__esModule", {
|
|
2738
2738
|
value: !0
|
|
@@ -2746,13 +2746,13 @@ Ye.BasisTheoryProxy = Va;
|
|
|
2746
2746
|
}
|
|
2747
2747
|
});
|
|
2748
2748
|
});
|
|
2749
|
-
})(
|
|
2749
|
+
})(an);
|
|
2750
2750
|
Object.defineProperty(Je, "__esModule", {
|
|
2751
2751
|
value: !0
|
|
2752
2752
|
});
|
|
2753
2753
|
Je.delegateProxy = void 0;
|
|
2754
|
-
var
|
|
2755
|
-
const
|
|
2754
|
+
var Va = an;
|
|
2755
|
+
const Ja = (e) => class extends Va.BasisTheoryProxy {
|
|
2756
2756
|
get(r) {
|
|
2757
2757
|
return e !== void 0 ? e.proxy.get(r) : super.get(r);
|
|
2758
2758
|
}
|
|
@@ -2769,7 +2769,7 @@ const Ya = (e) => class extends Ja.BasisTheoryProxy {
|
|
|
2769
2769
|
return e !== void 0 ? e.proxy.delete(r) : super.delete(r);
|
|
2770
2770
|
}
|
|
2771
2771
|
};
|
|
2772
|
-
Je.delegateProxy =
|
|
2772
|
+
Je.delegateProxy = Ja;
|
|
2773
2773
|
(function(e) {
|
|
2774
2774
|
Object.defineProperty(e, "__esModule", {
|
|
2775
2775
|
value: !0
|
|
@@ -2801,15 +2801,15 @@ Je.delegateProxy = Ya;
|
|
|
2801
2801
|
}
|
|
2802
2802
|
});
|
|
2803
2803
|
});
|
|
2804
|
-
})(
|
|
2804
|
+
})(nn);
|
|
2805
2805
|
var X = {};
|
|
2806
2806
|
Object.defineProperty(X, "__esModule", {
|
|
2807
2807
|
value: !0
|
|
2808
2808
|
});
|
|
2809
2809
|
X.injectScript = X.findScript = void 0;
|
|
2810
|
-
const
|
|
2811
|
-
X.findScript =
|
|
2812
|
-
const
|
|
2810
|
+
const Ya = (e) => document.querySelector(`script[src^="${e}"]`);
|
|
2811
|
+
X.findScript = Ya;
|
|
2812
|
+
const Xa = (e) => {
|
|
2813
2813
|
const t = document.createElement("script");
|
|
2814
2814
|
t.src = e;
|
|
2815
2815
|
const r = document.head || document.body;
|
|
@@ -2817,33 +2817,33 @@ const Za = (e) => {
|
|
|
2817
2817
|
throw new Error("No <head> or <body> elements found in document.");
|
|
2818
2818
|
return r.append(t), t;
|
|
2819
2819
|
};
|
|
2820
|
-
X.injectScript =
|
|
2820
|
+
X.injectScript = Xa;
|
|
2821
2821
|
var Xe = {}, R = {};
|
|
2822
2822
|
Object.defineProperty(R, "__esModule", {
|
|
2823
2823
|
value: !0
|
|
2824
2824
|
});
|
|
2825
2825
|
R.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = R.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = R.ELEMENTS_NOM_DOM_ERROR_MESSAGE = R.ELEMENTS_INIT_ERROR_MESSAGE = R.CARD_ICON_POSITIONS = R.CARD_BRANDS = R.AUTOCOMPLETE_VALUES = void 0;
|
|
2826
|
-
const
|
|
2827
|
-
R.ELEMENTS_INIT_ERROR_MESSAGE =
|
|
2828
|
-
const
|
|
2829
|
-
R.ELEMENTS_NOM_DOM_ERROR_MESSAGE =
|
|
2830
|
-
const
|
|
2831
|
-
R.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE =
|
|
2832
|
-
const
|
|
2833
|
-
R.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE =
|
|
2834
|
-
const
|
|
2835
|
-
R.CARD_BRANDS =
|
|
2836
|
-
const
|
|
2837
|
-
R.CARD_ICON_POSITIONS =
|
|
2838
|
-
const
|
|
2839
|
-
R.AUTOCOMPLETE_VALUES =
|
|
2826
|
+
const Za = "BasisTheory Elements was not properly initialized.";
|
|
2827
|
+
R.ELEMENTS_INIT_ERROR_MESSAGE = Za;
|
|
2828
|
+
const Qa = "Tried to load BasisTheoryElements in a non-DOM environment.";
|
|
2829
|
+
R.ELEMENTS_NOM_DOM_ERROR_MESSAGE = Qa;
|
|
2830
|
+
const eo = "Basis Theory Elements did not load properly.";
|
|
2831
|
+
R.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE = eo;
|
|
2832
|
+
const to = "There was an unknown error when loading Basis Theory Elements. Check the console for details.";
|
|
2833
|
+
R.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE = to;
|
|
2834
|
+
const ro = ["visa", "mastercard", "american-express", "discover", "diners-club", "jcb", "unionpay", "maestro", "elo", "hiper", "hipercard", "mir", "unknown"];
|
|
2835
|
+
R.CARD_BRANDS = ro;
|
|
2836
|
+
const no = ["left", "right", "none"];
|
|
2837
|
+
R.CARD_ICON_POSITIONS = no;
|
|
2838
|
+
const so = ["off", "on"];
|
|
2839
|
+
R.AUTOCOMPLETE_VALUES = so;
|
|
2840
2840
|
Object.defineProperty(Xe, "__esModule", {
|
|
2841
2841
|
value: !0
|
|
2842
2842
|
});
|
|
2843
2843
|
Xe.loadElements = void 0;
|
|
2844
|
-
var ht = R,
|
|
2844
|
+
var ht = R, hr = X;
|
|
2845
2845
|
let pt;
|
|
2846
|
-
const
|
|
2846
|
+
const io = (e) => (pt || (pt = new Promise((t, r) => {
|
|
2847
2847
|
if (typeof window != "object") {
|
|
2848
2848
|
r(new Error(ht.ELEMENTS_NOM_DOM_ERROR_MESSAGE));
|
|
2849
2849
|
return;
|
|
@@ -2860,8 +2860,8 @@ const ao = (e) => (pt || (pt = new Promise((t, r) => {
|
|
|
2860
2860
|
} catch {
|
|
2861
2861
|
throw new Error("Invalid format for the given Elements client url.");
|
|
2862
2862
|
}
|
|
2863
|
-
let s = (0,
|
|
2864
|
-
s || (s = (0,
|
|
2863
|
+
let s = (0, hr.findScript)(n);
|
|
2864
|
+
s || (s = (0, hr.injectScript)(n)), s.addEventListener("load", () => {
|
|
2865
2865
|
window.BasisTheoryElements ? t(window.BasisTheoryElements) : r(new Error(ht.ELEMENTS_SCRIPT_LOAD_ERROR_MESSAGE));
|
|
2866
2866
|
}), s.addEventListener("error", (i) => {
|
|
2867
2867
|
r((i == null ? void 0 : i.error) || new Error(ht.ELEMENTS_SCRIPT_UNKNOWN_ERROR_MESSAGE));
|
|
@@ -2871,12 +2871,12 @@ const ao = (e) => (pt || (pt = new Promise((t, r) => {
|
|
|
2871
2871
|
return;
|
|
2872
2872
|
}
|
|
2873
2873
|
})), pt);
|
|
2874
|
-
Xe.loadElements =
|
|
2874
|
+
Xe.loadElements = io;
|
|
2875
2875
|
(function(e) {
|
|
2876
2876
|
Object.defineProperty(e, "__esModule", {
|
|
2877
2877
|
value: !0
|
|
2878
2878
|
});
|
|
2879
|
-
var t =
|
|
2879
|
+
var t = nn;
|
|
2880
2880
|
Object.keys(t).forEach(function(s) {
|
|
2881
2881
|
s === "default" || s === "__esModule" || s in e && e[s] === t[s] || Object.defineProperty(e, s, {
|
|
2882
2882
|
enumerable: !0,
|
|
@@ -2903,16 +2903,16 @@ Xe.loadElements = ao;
|
|
|
2903
2903
|
}
|
|
2904
2904
|
});
|
|
2905
2905
|
});
|
|
2906
|
-
})(
|
|
2907
|
-
var
|
|
2906
|
+
})(rn);
|
|
2907
|
+
var on = {}, Ze = {};
|
|
2908
2908
|
Object.defineProperty(Ze, "__esModule", {
|
|
2909
2909
|
value: !0
|
|
2910
2910
|
});
|
|
2911
2911
|
Ze.BasisTheoryLogs = void 0;
|
|
2912
|
-
var
|
|
2913
|
-
const
|
|
2912
|
+
var ao = P, oo = K;
|
|
2913
|
+
const co = new oo.CrudBuilder(class extends ao.BasisTheoryService {
|
|
2914
2914
|
}).list().build();
|
|
2915
|
-
Ze.BasisTheoryLogs =
|
|
2915
|
+
Ze.BasisTheoryLogs = co;
|
|
2916
2916
|
(function(e) {
|
|
2917
2917
|
Object.defineProperty(e, "__esModule", {
|
|
2918
2918
|
value: !0
|
|
@@ -2923,19 +2923,19 @@ Ze.BasisTheoryLogs = uo;
|
|
|
2923
2923
|
}
|
|
2924
2924
|
});
|
|
2925
2925
|
var t = Ze;
|
|
2926
|
-
})(
|
|
2927
|
-
var
|
|
2926
|
+
})(on);
|
|
2927
|
+
var cn = {}, Qe = {};
|
|
2928
2928
|
Object.defineProperty(Qe, "__esModule", {
|
|
2929
2929
|
value: !0
|
|
2930
2930
|
});
|
|
2931
2931
|
Qe.BasisTheoryPermissions = void 0;
|
|
2932
|
-
var
|
|
2933
|
-
class
|
|
2932
|
+
var pr = C, uo = P;
|
|
2933
|
+
class lo extends uo.BasisTheoryService {
|
|
2934
2934
|
list(t) {
|
|
2935
|
-
return this.client.get("/", (0,
|
|
2935
|
+
return this.client.get("/", (0, pr.createRequestConfig)(t)).then(pr.dataExtractor);
|
|
2936
2936
|
}
|
|
2937
2937
|
}
|
|
2938
|
-
Qe.BasisTheoryPermissions =
|
|
2938
|
+
Qe.BasisTheoryPermissions = lo;
|
|
2939
2939
|
(function(e) {
|
|
2940
2940
|
Object.defineProperty(e, "__esModule", {
|
|
2941
2941
|
value: !0
|
|
@@ -2946,22 +2946,22 @@ Qe.BasisTheoryPermissions = fo;
|
|
|
2946
2946
|
}
|
|
2947
2947
|
});
|
|
2948
2948
|
var t = Qe;
|
|
2949
|
-
})(
|
|
2950
|
-
var
|
|
2949
|
+
})(cn);
|
|
2950
|
+
var un = {}, et = {};
|
|
2951
2951
|
Object.defineProperty(et, "__esModule", {
|
|
2952
2952
|
value: !0
|
|
2953
2953
|
});
|
|
2954
2954
|
et.BasisTheoryProxies = void 0;
|
|
2955
|
-
var
|
|
2956
|
-
const
|
|
2955
|
+
var mr = m, fo = P, ho = K;
|
|
2956
|
+
const po = new ho.CrudBuilder(class extends fo.BasisTheoryService {
|
|
2957
2957
|
constructor(t) {
|
|
2958
2958
|
const r = {
|
|
2959
2959
|
...t
|
|
2960
2960
|
};
|
|
2961
|
-
r.transformRequest = [].concat(
|
|
2961
|
+
r.transformRequest = [].concat(mr.transformProxyRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(mr.transformProxyResponseCamelCase, t.transformResponse || []), super(r);
|
|
2962
2962
|
}
|
|
2963
2963
|
}).create().retrieve().update().patch().delete().list().build();
|
|
2964
|
-
et.BasisTheoryProxies =
|
|
2964
|
+
et.BasisTheoryProxies = po;
|
|
2965
2965
|
(function(e) {
|
|
2966
2966
|
Object.defineProperty(e, "__esModule", {
|
|
2967
2967
|
value: !0
|
|
@@ -2975,16 +2975,16 @@ et.BasisTheoryProxies = mo;
|
|
|
2975
2975
|
}
|
|
2976
2976
|
});
|
|
2977
2977
|
});
|
|
2978
|
-
})(
|
|
2979
|
-
var
|
|
2978
|
+
})(un);
|
|
2979
|
+
var ln = {}, tt = {};
|
|
2980
2980
|
Object.defineProperty(tt, "__esModule", {
|
|
2981
2981
|
value: !0
|
|
2982
2982
|
});
|
|
2983
2983
|
tt.BasisTheoryReactorFormulas = void 0;
|
|
2984
|
-
var
|
|
2985
|
-
const
|
|
2984
|
+
var mo = P, Eo = K;
|
|
2985
|
+
const yo = new Eo.CrudBuilder(class extends mo.BasisTheoryService {
|
|
2986
2986
|
}).create().retrieve().update().delete().list().build();
|
|
2987
|
-
tt.BasisTheoryReactorFormulas =
|
|
2987
|
+
tt.BasisTheoryReactorFormulas = yo;
|
|
2988
2988
|
(function(e) {
|
|
2989
2989
|
Object.defineProperty(e, "__esModule", {
|
|
2990
2990
|
value: !0
|
|
@@ -2995,28 +2995,28 @@ tt.BasisTheoryReactorFormulas = bo;
|
|
|
2995
2995
|
}
|
|
2996
2996
|
});
|
|
2997
2997
|
var t = tt;
|
|
2998
|
-
})(
|
|
2999
|
-
var
|
|
2998
|
+
})(ln);
|
|
2999
|
+
var dn = {}, rt = {};
|
|
3000
3000
|
Object.defineProperty(rt, "__esModule", {
|
|
3001
3001
|
value: !0
|
|
3002
3002
|
});
|
|
3003
3003
|
rt.BasisTheoryReactors = void 0;
|
|
3004
|
-
var
|
|
3005
|
-
const
|
|
3004
|
+
var Ae = C, Er = m, bo = P, _o = K;
|
|
3005
|
+
const wo = new _o.CrudBuilder(class extends bo.BasisTheoryService {
|
|
3006
3006
|
constructor(t) {
|
|
3007
3007
|
const r = {
|
|
3008
3008
|
...t
|
|
3009
3009
|
};
|
|
3010
|
-
r.transformRequest = [].concat(
|
|
3010
|
+
r.transformRequest = [].concat(Er.transformReactorRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(Er.transformReactorResponseCamelCase, t.transformResponse || []), super(r);
|
|
3011
3011
|
}
|
|
3012
3012
|
react(t, r, n) {
|
|
3013
|
-
return this.client.post(`/${t}/react`, r, (0,
|
|
3014
|
-
transformRequest:
|
|
3015
|
-
transformResponse:
|
|
3016
|
-
})).then(
|
|
3013
|
+
return this.client.post(`/${t}/react`, r, (0, Ae.createRequestConfig)(n, {
|
|
3014
|
+
transformRequest: Ae.proxyRaw,
|
|
3015
|
+
transformResponse: Ae.proxyRaw
|
|
3016
|
+
})).then(Ae.dataExtractor);
|
|
3017
3017
|
}
|
|
3018
3018
|
}).create().retrieve().update().patch().delete().list().build();
|
|
3019
|
-
rt.BasisTheoryReactors =
|
|
3019
|
+
rt.BasisTheoryReactors = wo;
|
|
3020
3020
|
(function(e) {
|
|
3021
3021
|
Object.defineProperty(e, "__esModule", {
|
|
3022
3022
|
value: !0
|
|
@@ -3027,28 +3027,28 @@ rt.BasisTheoryReactors = go;
|
|
|
3027
3027
|
}
|
|
3028
3028
|
});
|
|
3029
3029
|
var t = rt;
|
|
3030
|
-
})(
|
|
3031
|
-
var
|
|
3030
|
+
})(dn);
|
|
3031
|
+
var fn = {}, nt = {};
|
|
3032
3032
|
Object.defineProperty(nt, "__esModule", {
|
|
3033
3033
|
value: !0
|
|
3034
3034
|
});
|
|
3035
3035
|
nt.BasisTheorySessions = void 0;
|
|
3036
|
-
var
|
|
3037
|
-
class
|
|
3036
|
+
var yr = C, Te = m, go = P;
|
|
3037
|
+
class So extends go.BasisTheoryService {
|
|
3038
3038
|
constructor(t) {
|
|
3039
3039
|
const r = {
|
|
3040
3040
|
...t
|
|
3041
3041
|
};
|
|
3042
|
-
r.transformRequest = [].concat(
|
|
3042
|
+
r.transformRequest = [].concat(Te.transformProxyRequestSnakeCase, t.transformRequest || []), r.transformResponse = [].concat(Te.transformProxyResponseCamelCase, t.transformResponse || []), super(r);
|
|
3043
3043
|
}
|
|
3044
3044
|
create(t = {}) {
|
|
3045
|
-
return this.client.post("/", void 0, (0,
|
|
3045
|
+
return this.client.post("/", void 0, (0, yr.createRequestConfig)(t)).then(Te.dataExtractor);
|
|
3046
3046
|
}
|
|
3047
3047
|
authorize(t, r = {}) {
|
|
3048
|
-
return this.client.post("/authorize", t, (0,
|
|
3048
|
+
return this.client.post("/authorize", t, (0, yr.createRequestConfig)(r)).then(Te.dataExtractor);
|
|
3049
3049
|
}
|
|
3050
3050
|
}
|
|
3051
|
-
nt.BasisTheorySessions =
|
|
3051
|
+
nt.BasisTheorySessions = So;
|
|
3052
3052
|
(function(e) {
|
|
3053
3053
|
Object.defineProperty(e, "__esModule", {
|
|
3054
3054
|
value: !0
|
|
@@ -3059,14 +3059,14 @@ nt.BasisTheorySessions = To;
|
|
|
3059
3059
|
}
|
|
3060
3060
|
});
|
|
3061
3061
|
var t = nt;
|
|
3062
|
-
})(
|
|
3063
|
-
var
|
|
3062
|
+
})(fn);
|
|
3063
|
+
var hn = {}, st = {};
|
|
3064
3064
|
Object.defineProperty(st, "__esModule", {
|
|
3065
3065
|
value: !0
|
|
3066
3066
|
});
|
|
3067
3067
|
st.BasisTheoryTenants = void 0;
|
|
3068
|
-
var S = C, Ao = P,
|
|
3069
|
-
const
|
|
3068
|
+
var S = C, Ao = P, To = K;
|
|
3069
|
+
const Ro = new To.CrudBuilder(class extends Ao.BasisTheoryService {
|
|
3070
3070
|
retrieve(t) {
|
|
3071
3071
|
return this.client.get("/", (0, S.createRequestConfig)(t)).then(S.dataExtractor);
|
|
3072
3072
|
}
|
|
@@ -3103,7 +3103,7 @@ const vo = new Ro.CrudBuilder(class extends Ao.BasisTheoryService {
|
|
|
3103
3103
|
await this.client.delete(`/members/${t}`, (0, S.createRequestConfig)(r));
|
|
3104
3104
|
}
|
|
3105
3105
|
}).build();
|
|
3106
|
-
st.BasisTheoryTenants =
|
|
3106
|
+
st.BasisTheoryTenants = Ro;
|
|
3107
3107
|
(function(e) {
|
|
3108
3108
|
Object.defineProperty(e, "__esModule", {
|
|
3109
3109
|
value: !0
|
|
@@ -3114,23 +3114,23 @@ st.BasisTheoryTenants = vo;
|
|
|
3114
3114
|
}
|
|
3115
3115
|
});
|
|
3116
3116
|
var t = st;
|
|
3117
|
-
})(
|
|
3117
|
+
})(hn);
|
|
3118
3118
|
Object.defineProperty(Ne, "__esModule", {
|
|
3119
3119
|
value: !0
|
|
3120
3120
|
});
|
|
3121
3121
|
Ne.BasisTheory = void 0;
|
|
3122
|
-
var ue = ne,
|
|
3123
|
-
function
|
|
3122
|
+
var ue = ne, vo = Ar, Oo = zt, _ = C, Re = rn, Co = R, Po = on, Bo = cn, xo = un, jo = ln, No = dn, Do = fn, Uo = hn;
|
|
3123
|
+
function Ho(e, t, r) {
|
|
3124
3124
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
3125
3125
|
}
|
|
3126
|
-
const
|
|
3126
|
+
const Lo = {
|
|
3127
3127
|
apiBaseUrl: _.DEFAULT_BASE_URL,
|
|
3128
3128
|
elements: !1,
|
|
3129
3129
|
appInfo: {}
|
|
3130
3130
|
};
|
|
3131
|
-
class
|
|
3131
|
+
class Mo {
|
|
3132
3132
|
constructor() {
|
|
3133
|
-
|
|
3133
|
+
Ho(this, "_initStatus", "not-started");
|
|
3134
3134
|
}
|
|
3135
3135
|
async init(t, r = {}) {
|
|
3136
3136
|
if (this._initStatus !== "not-started" && this._initStatus !== "error")
|
|
@@ -3138,7 +3138,7 @@ class Io {
|
|
|
3138
3138
|
this._initStatus = "in-progress";
|
|
3139
3139
|
try {
|
|
3140
3140
|
this._initOptions = Object.freeze({
|
|
3141
|
-
...
|
|
3141
|
+
...Lo,
|
|
3142
3142
|
...r
|
|
3143
3143
|
});
|
|
3144
3144
|
let n = this._initOptions.apiBaseUrl;
|
|
@@ -3157,31 +3157,31 @@ class Io {
|
|
|
3157
3157
|
apiKey: t,
|
|
3158
3158
|
baseURL: new URL(_.CLIENT_BASE_PATHS.tokenize, n).toString(),
|
|
3159
3159
|
appInfo: s
|
|
3160
|
-
}), this._applications = new
|
|
3160
|
+
}), this._applications = new Oo.BasisTheoryApplications({
|
|
3161
3161
|
apiKey: t,
|
|
3162
3162
|
baseURL: new URL(_.CLIENT_BASE_PATHS.applications, n).toString(),
|
|
3163
3163
|
appInfo: s
|
|
3164
|
-
}), this._tenants = new
|
|
3164
|
+
}), this._tenants = new Uo.BasisTheoryTenants({
|
|
3165
3165
|
apiKey: t,
|
|
3166
3166
|
baseURL: new URL(_.CLIENT_BASE_PATHS.tenants, n).toString(),
|
|
3167
3167
|
appInfo: s
|
|
3168
|
-
}), this._logs = new
|
|
3168
|
+
}), this._logs = new Po.BasisTheoryLogs({
|
|
3169
3169
|
apiKey: t,
|
|
3170
3170
|
baseURL: new URL(_.CLIENT_BASE_PATHS.logs, n).toString(),
|
|
3171
3171
|
appInfo: s
|
|
3172
|
-
}), this._reactorFormulas = new
|
|
3172
|
+
}), this._reactorFormulas = new jo.BasisTheoryReactorFormulas({
|
|
3173
3173
|
apiKey: t,
|
|
3174
3174
|
baseURL: new URL(_.CLIENT_BASE_PATHS.reactorFormulas, n).toString(),
|
|
3175
3175
|
appInfo: s
|
|
3176
|
-
}), this._reactors = new
|
|
3176
|
+
}), this._reactors = new No.BasisTheoryReactors({
|
|
3177
3177
|
apiKey: t,
|
|
3178
3178
|
baseURL: new URL(_.CLIENT_BASE_PATHS.reactors, n).toString(),
|
|
3179
3179
|
appInfo: s
|
|
3180
|
-
}), this._permissions = new
|
|
3180
|
+
}), this._permissions = new Bo.BasisTheoryPermissions({
|
|
3181
3181
|
apiKey: t,
|
|
3182
3182
|
baseURL: new URL(_.CLIENT_BASE_PATHS.permissions, n).toString(),
|
|
3183
3183
|
appInfo: s
|
|
3184
|
-
}), this._proxies = new
|
|
3184
|
+
}), this._proxies = new xo.BasisTheoryProxies({
|
|
3185
3185
|
apiKey: t,
|
|
3186
3186
|
baseURL: new URL(_.CLIENT_BASE_PATHS.proxies, n).toString(),
|
|
3187
3187
|
appInfo: s
|
|
@@ -3189,11 +3189,11 @@ class Io {
|
|
|
3189
3189
|
apiKey: t,
|
|
3190
3190
|
baseURL: new URL(_.CLIENT_BASE_PATHS.proxy, n).toString(),
|
|
3191
3191
|
appInfo: s
|
|
3192
|
-
}), this._sessions = new
|
|
3192
|
+
}), this._sessions = new Do.BasisTheorySessions({
|
|
3193
3193
|
apiKey: t,
|
|
3194
3194
|
baseURL: new URL(_.CLIENT_BASE_PATHS.sessions, n).toString(),
|
|
3195
3195
|
appInfo: s
|
|
3196
|
-
}), this._transactions = new
|
|
3196
|
+
}), this._transactions = new vo.BasisTheoryTransactions({
|
|
3197
3197
|
apiKey: t,
|
|
3198
3198
|
baseURL: new URL(_.CLIENT_BASE_PATHS.transactions, n).toString(),
|
|
3199
3199
|
appInfo: s
|
|
@@ -3205,7 +3205,7 @@ class Io {
|
|
|
3205
3205
|
}
|
|
3206
3206
|
createElement(t, r) {
|
|
3207
3207
|
if (!this._elements)
|
|
3208
|
-
throw new Error(
|
|
3208
|
+
throw new Error(Co.ELEMENTS_INIT_ERROR_MESSAGE);
|
|
3209
3209
|
return this._elements.createElement(t, r);
|
|
3210
3210
|
}
|
|
3211
3211
|
tokenize(t, r) {
|
|
@@ -3285,7 +3285,7 @@ class Io {
|
|
|
3285
3285
|
this._elements = t;
|
|
3286
3286
|
}
|
|
3287
3287
|
}
|
|
3288
|
-
Ne.BasisTheory =
|
|
3288
|
+
Ne.BasisTheory = Mo;
|
|
3289
3289
|
(function(e) {
|
|
3290
3290
|
Object.defineProperty(e, "__esModule", {
|
|
3291
3291
|
value: !0
|
|
@@ -3303,7 +3303,7 @@ Ne.BasisTheory = Io;
|
|
|
3303
3303
|
}
|
|
3304
3304
|
});
|
|
3305
3305
|
});
|
|
3306
|
-
var n =
|
|
3306
|
+
var n = zt;
|
|
3307
3307
|
Object.keys(n).forEach(function(a) {
|
|
3308
3308
|
a === "default" || a === "__esModule" || Object.prototype.hasOwnProperty.call(t, a) || a in e && e[a] === n[a] || Object.defineProperty(e, a, {
|
|
3309
3309
|
enumerable: !0,
|
|
@@ -3312,7 +3312,7 @@ Ne.BasisTheory = Io;
|
|
|
3312
3312
|
}
|
|
3313
3313
|
});
|
|
3314
3314
|
});
|
|
3315
|
-
var s =
|
|
3315
|
+
var s = Wt;
|
|
3316
3316
|
Object.keys(s).forEach(function(a) {
|
|
3317
3317
|
a === "default" || a === "__esModule" || Object.prototype.hasOwnProperty.call(t, a) || a in e && e[a] === s[a] || Object.defineProperty(e, a, {
|
|
3318
3318
|
enumerable: !0,
|
|
@@ -3323,11 +3323,11 @@ Ne.BasisTheory = Io;
|
|
|
3323
3323
|
});
|
|
3324
3324
|
const i = new r.BasisTheory();
|
|
3325
3325
|
e._instance = i;
|
|
3326
|
-
})(
|
|
3327
|
-
const g = crypto, M = (e) => e instanceof CryptoKey,
|
|
3326
|
+
})(gr);
|
|
3327
|
+
const g = crypto, M = (e) => e instanceof CryptoKey, Io = async (e, t) => {
|
|
3328
3328
|
const r = `SHA-${e.slice(-3)}`;
|
|
3329
3329
|
return new Uint8Array(await g.subtle.digest(r, t));
|
|
3330
|
-
}, Y = new TextEncoder(),
|
|
3330
|
+
}, Y = new TextEncoder(), pn = new TextDecoder(), je = 2 ** 32;
|
|
3331
3331
|
function ye(...e) {
|
|
3332
3332
|
const t = e.reduce((s, { length: i }) => s + i, 0), r = new Uint8Array(t);
|
|
3333
3333
|
let n = 0;
|
|
@@ -3335,55 +3335,55 @@ function ye(...e) {
|
|
|
3335
3335
|
r.set(s, n), n += s.length;
|
|
3336
3336
|
return r;
|
|
3337
3337
|
}
|
|
3338
|
-
function
|
|
3338
|
+
function $o(e, t) {
|
|
3339
3339
|
return ye(Y.encode(e), new Uint8Array([0]), t);
|
|
3340
3340
|
}
|
|
3341
|
-
function
|
|
3341
|
+
function Bt(e, t, r) {
|
|
3342
3342
|
if (t < 0 || t >= je)
|
|
3343
3343
|
throw new RangeError(`value must be >= 0 and <= ${je - 1}. Received ${t}`);
|
|
3344
3344
|
e.set([t >>> 24, t >>> 16, t >>> 8, t & 255], r);
|
|
3345
3345
|
}
|
|
3346
|
-
function
|
|
3346
|
+
function Ko(e) {
|
|
3347
3347
|
const t = Math.floor(e / je), r = e % je, n = new Uint8Array(8);
|
|
3348
|
-
return
|
|
3348
|
+
return Bt(n, t, 0), Bt(n, r, 4), n;
|
|
3349
3349
|
}
|
|
3350
|
-
function
|
|
3350
|
+
function kt(e) {
|
|
3351
3351
|
const t = new Uint8Array(4);
|
|
3352
|
-
return
|
|
3352
|
+
return Bt(t, e), t;
|
|
3353
3353
|
}
|
|
3354
3354
|
function mt(e) {
|
|
3355
|
-
return ye(
|
|
3355
|
+
return ye(kt(e.length), e);
|
|
3356
3356
|
}
|
|
3357
|
-
async function
|
|
3357
|
+
async function qo(e, t, r) {
|
|
3358
3358
|
const n = Math.ceil((t >> 3) / 32), s = new Uint8Array(n * 32);
|
|
3359
3359
|
for (let i = 0; i < n; i++) {
|
|
3360
3360
|
const a = new Uint8Array(4 + e.length + r.length);
|
|
3361
|
-
a.set(
|
|
3361
|
+
a.set(kt(i + 1)), a.set(e, 4), a.set(r, 4 + e.length), s.set(await Io("sha256", a), i * 32);
|
|
3362
3362
|
}
|
|
3363
3363
|
return s.slice(0, t >> 3);
|
|
3364
3364
|
}
|
|
3365
|
-
const
|
|
3365
|
+
const Fo = (e) => {
|
|
3366
3366
|
let t = e;
|
|
3367
3367
|
typeof t == "string" && (t = Y.encode(t));
|
|
3368
3368
|
const r = 32768, n = [];
|
|
3369
3369
|
for (let s = 0; s < t.length; s += r)
|
|
3370
3370
|
n.push(String.fromCharCode.apply(null, t.subarray(s, s + r)));
|
|
3371
3371
|
return btoa(n.join(""));
|
|
3372
|
-
}, B = (e) =>
|
|
3372
|
+
}, B = (e) => Fo(e).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"), zo = (e) => {
|
|
3373
3373
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
3374
3374
|
for (let n = 0; n < t.length; n++)
|
|
3375
3375
|
r[n] = t.charCodeAt(n);
|
|
3376
3376
|
return r;
|
|
3377
|
-
},
|
|
3377
|
+
}, mn = (e) => {
|
|
3378
3378
|
let t = e;
|
|
3379
|
-
t instanceof Uint8Array && (t =
|
|
3379
|
+
t instanceof Uint8Array && (t = pn.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
3380
3380
|
try {
|
|
3381
|
-
return
|
|
3381
|
+
return zo(t);
|
|
3382
3382
|
} catch {
|
|
3383
3383
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
3384
3384
|
}
|
|
3385
3385
|
};
|
|
3386
|
-
class
|
|
3386
|
+
class En extends Error {
|
|
3387
3387
|
static get code() {
|
|
3388
3388
|
return "ERR_JOSE_GENERIC";
|
|
3389
3389
|
}
|
|
@@ -3392,7 +3392,7 @@ class yn extends Error {
|
|
|
3392
3392
|
super(t), this.code = "ERR_JOSE_GENERIC", this.name = this.constructor.name, (r = Error.captureStackTrace) == null || r.call(Error, this, this.constructor);
|
|
3393
3393
|
}
|
|
3394
3394
|
}
|
|
3395
|
-
class O extends
|
|
3395
|
+
class O extends En {
|
|
3396
3396
|
constructor() {
|
|
3397
3397
|
super(...arguments), this.code = "ERR_JOSE_NOT_SUPPORTED";
|
|
3398
3398
|
}
|
|
@@ -3400,7 +3400,7 @@ class O extends yn {
|
|
|
3400
3400
|
return "ERR_JOSE_NOT_SUPPORTED";
|
|
3401
3401
|
}
|
|
3402
3402
|
}
|
|
3403
|
-
class G extends
|
|
3403
|
+
class G extends En {
|
|
3404
3404
|
constructor() {
|
|
3405
3405
|
super(...arguments), this.code = "ERR_JWE_INVALID";
|
|
3406
3406
|
}
|
|
@@ -3408,8 +3408,8 @@ class G extends yn {
|
|
|
3408
3408
|
return "ERR_JWE_INVALID";
|
|
3409
3409
|
}
|
|
3410
3410
|
}
|
|
3411
|
-
const
|
|
3412
|
-
function
|
|
3411
|
+
const Gt = g.getRandomValues.bind(g);
|
|
3412
|
+
function yn(e) {
|
|
3413
3413
|
switch (e) {
|
|
3414
3414
|
case "A128GCM":
|
|
3415
3415
|
case "A128GCMKW":
|
|
@@ -3426,24 +3426,24 @@ function bn(e) {
|
|
|
3426
3426
|
throw new O(`Unsupported JWE Algorithm: ${e}`);
|
|
3427
3427
|
}
|
|
3428
3428
|
}
|
|
3429
|
-
const
|
|
3430
|
-
if (t.length << 3 !==
|
|
3429
|
+
const Wo = (e) => Gt(new Uint8Array(yn(e) >> 3)), ko = (e, t) => {
|
|
3430
|
+
if (t.length << 3 !== yn(e))
|
|
3431
3431
|
throw new G("Invalid Initialization Vector length");
|
|
3432
|
-
},
|
|
3432
|
+
}, Go = (e, t) => {
|
|
3433
3433
|
const r = e.byteLength << 3;
|
|
3434
3434
|
if (r !== t)
|
|
3435
3435
|
throw new G(`Invalid Content Encryption Key length. Expected ${t} bits, got ${r} bits`);
|
|
3436
|
-
},
|
|
3436
|
+
}, br = Go;
|
|
3437
3437
|
function k(e, t = "algorithm.name") {
|
|
3438
3438
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
3439
3439
|
}
|
|
3440
3440
|
function ve(e, t) {
|
|
3441
3441
|
return e.name === t;
|
|
3442
3442
|
}
|
|
3443
|
-
function
|
|
3443
|
+
function Vo(e) {
|
|
3444
3444
|
return parseInt(e.name.slice(4), 10);
|
|
3445
3445
|
}
|
|
3446
|
-
function
|
|
3446
|
+
function Jo(e, t) {
|
|
3447
3447
|
if (t.length && !t.some((r) => e.usages.includes(r))) {
|
|
3448
3448
|
let r = "CryptoKey does not support this operation, its usages must include ";
|
|
3449
3449
|
if (t.length > 2) {
|
|
@@ -3500,16 +3500,16 @@ function ie(e, t, ...r) {
|
|
|
3500
3500
|
if (!ve(e.algorithm, "RSA-OAEP"))
|
|
3501
3501
|
throw k("RSA-OAEP");
|
|
3502
3502
|
const n = parseInt(t.slice(9), 10) || 1;
|
|
3503
|
-
if (
|
|
3503
|
+
if (Vo(e.algorithm.hash) !== n)
|
|
3504
3504
|
throw k(`SHA-${n}`, "algorithm.hash");
|
|
3505
3505
|
break;
|
|
3506
3506
|
}
|
|
3507
3507
|
default:
|
|
3508
3508
|
throw new TypeError("CryptoKey does not support this operation");
|
|
3509
3509
|
}
|
|
3510
|
-
|
|
3510
|
+
Jo(e, r);
|
|
3511
3511
|
}
|
|
3512
|
-
function
|
|
3512
|
+
function bn(e, t, ...r) {
|
|
3513
3513
|
var n;
|
|
3514
3514
|
if (r.length > 2) {
|
|
3515
3515
|
const s = r.pop();
|
|
@@ -3518,11 +3518,11 @@ function _n(e, t, ...r) {
|
|
|
3518
3518
|
r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
3519
3519
|
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && (n = t.constructor) != null && n.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
3520
3520
|
}
|
|
3521
|
-
const I = (e, ...t) =>
|
|
3522
|
-
function
|
|
3523
|
-
return
|
|
3521
|
+
const I = (e, ...t) => bn("Key must be ", e, ...t);
|
|
3522
|
+
function _n(e, t, ...r) {
|
|
3523
|
+
return bn(`Key for the ${e} algorithm must be `, t, ...r);
|
|
3524
3524
|
}
|
|
3525
|
-
const
|
|
3525
|
+
const wn = (e) => M(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", N = ["CryptoKey"], Yo = (...e) => {
|
|
3526
3526
|
const t = e.filter(Boolean);
|
|
3527
3527
|
if (t.length === 0 || t.length === 1)
|
|
3528
3528
|
return !0;
|
|
@@ -3541,11 +3541,11 @@ const gn = (e) => M(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "
|
|
|
3541
3541
|
}
|
|
3542
3542
|
return !0;
|
|
3543
3543
|
};
|
|
3544
|
-
function
|
|
3544
|
+
function Xo(e) {
|
|
3545
3545
|
return typeof e == "object" && e !== null;
|
|
3546
3546
|
}
|
|
3547
|
-
function
|
|
3548
|
-
if (!
|
|
3547
|
+
function Zo(e) {
|
|
3548
|
+
if (!Xo(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
3549
3549
|
return !1;
|
|
3550
3550
|
if (Object.getPrototypeOf(e) === null)
|
|
3551
3551
|
return !0;
|
|
@@ -3554,67 +3554,67 @@ function Qo(e) {
|
|
|
3554
3554
|
t = Object.getPrototypeOf(t);
|
|
3555
3555
|
return Object.getPrototypeOf(e) === t;
|
|
3556
3556
|
}
|
|
3557
|
-
const
|
|
3557
|
+
const Qo = [
|
|
3558
3558
|
{ hash: "SHA-256", name: "HMAC" },
|
|
3559
3559
|
!0,
|
|
3560
3560
|
["sign"]
|
|
3561
|
-
],
|
|
3562
|
-
function
|
|
3561
|
+
], gn = Qo;
|
|
3562
|
+
function ec(e, t) {
|
|
3563
3563
|
if (e.algorithm.length !== parseInt(t.slice(1, 4), 10))
|
|
3564
3564
|
throw new TypeError(`Invalid key size for alg: ${t}`);
|
|
3565
3565
|
}
|
|
3566
|
-
function
|
|
3566
|
+
function tc(e, t, r) {
|
|
3567
3567
|
if (M(e))
|
|
3568
3568
|
return ie(e, t, r), e;
|
|
3569
3569
|
if (e instanceof Uint8Array)
|
|
3570
3570
|
return g.subtle.importKey("raw", e, "AES-KW", !0, [r]);
|
|
3571
3571
|
throw new TypeError(I(e, ...N, "Uint8Array"));
|
|
3572
3572
|
}
|
|
3573
|
-
const
|
|
3574
|
-
const n = await
|
|
3575
|
-
|
|
3576
|
-
const s = await g.subtle.importKey("raw", r, ...
|
|
3573
|
+
const xt = async (e, t, r) => {
|
|
3574
|
+
const n = await tc(t, e, "wrapKey");
|
|
3575
|
+
ec(n, e);
|
|
3576
|
+
const s = await g.subtle.importKey("raw", r, ...gn);
|
|
3577
3577
|
return new Uint8Array(await g.subtle.wrapKey("raw", s, n, "AES-KW"));
|
|
3578
3578
|
};
|
|
3579
|
-
async function
|
|
3579
|
+
async function rc(e, t, r, n, s = new Uint8Array(0), i = new Uint8Array(0)) {
|
|
3580
3580
|
if (!M(e))
|
|
3581
3581
|
throw new TypeError(I(e, ...N));
|
|
3582
3582
|
if (ie(e, "ECDH"), !M(t))
|
|
3583
3583
|
throw new TypeError(I(t, ...N));
|
|
3584
3584
|
ie(t, "ECDH", "deriveBits");
|
|
3585
|
-
const a = ye(mt(Y.encode(r)), mt(s), mt(i),
|
|
3585
|
+
const a = ye(mt(Y.encode(r)), mt(s), mt(i), kt(n));
|
|
3586
3586
|
let o;
|
|
3587
3587
|
e.algorithm.name === "X25519" ? o = 256 : e.algorithm.name === "X448" ? o = 448 : o = Math.ceil(parseInt(e.algorithm.namedCurve.substr(-3), 10) / 8) << 3;
|
|
3588
3588
|
const l = new Uint8Array(await g.subtle.deriveBits({
|
|
3589
3589
|
name: e.algorithm.name,
|
|
3590
3590
|
public: e
|
|
3591
3591
|
}, t, o));
|
|
3592
|
-
return
|
|
3592
|
+
return qo(l, n, a);
|
|
3593
3593
|
}
|
|
3594
|
-
async function
|
|
3594
|
+
async function nc(e) {
|
|
3595
3595
|
if (!M(e))
|
|
3596
3596
|
throw new TypeError(I(e, ...N));
|
|
3597
3597
|
return g.subtle.generateKey(e.algorithm, !0, ["deriveBits"]);
|
|
3598
3598
|
}
|
|
3599
|
-
function
|
|
3599
|
+
function sc(e) {
|
|
3600
3600
|
if (!M(e))
|
|
3601
3601
|
throw new TypeError(I(e, ...N));
|
|
3602
3602
|
return ["P-256", "P-384", "P-521"].includes(e.algorithm.namedCurve) || e.algorithm.name === "X25519" || e.algorithm.name === "X448";
|
|
3603
3603
|
}
|
|
3604
|
-
function
|
|
3604
|
+
function ic(e) {
|
|
3605
3605
|
if (!(e instanceof Uint8Array) || e.length < 8)
|
|
3606
3606
|
throw new G("PBES2 Salt Input must be 8 or more octets");
|
|
3607
3607
|
}
|
|
3608
|
-
function
|
|
3608
|
+
function ac(e, t) {
|
|
3609
3609
|
if (e instanceof Uint8Array)
|
|
3610
3610
|
return g.subtle.importKey("raw", e, "PBKDF2", !1, ["deriveBits"]);
|
|
3611
3611
|
if (M(e))
|
|
3612
3612
|
return ie(e, t, "deriveBits", "deriveKey"), e;
|
|
3613
3613
|
throw new TypeError(I(e, ...N, "Uint8Array"));
|
|
3614
3614
|
}
|
|
3615
|
-
async function
|
|
3616
|
-
|
|
3617
|
-
const s =
|
|
3615
|
+
async function oc(e, t, r, n) {
|
|
3616
|
+
ic(e);
|
|
3617
|
+
const s = $o(t, e), i = parseInt(t.slice(13, 16), 10), a = {
|
|
3618
3618
|
hash: `SHA-${t.slice(8, 11)}`,
|
|
3619
3619
|
iterations: r,
|
|
3620
3620
|
name: "PBKDF2",
|
|
@@ -3622,18 +3622,18 @@ async function cc(e, t, r, n) {
|
|
|
3622
3622
|
}, o = {
|
|
3623
3623
|
length: i,
|
|
3624
3624
|
name: "AES-KW"
|
|
3625
|
-
}, l = await
|
|
3625
|
+
}, l = await ac(n, t);
|
|
3626
3626
|
if (l.usages.includes("deriveBits"))
|
|
3627
3627
|
return new Uint8Array(await g.subtle.deriveBits(a, l, i));
|
|
3628
3628
|
if (l.usages.includes("deriveKey"))
|
|
3629
3629
|
return g.subtle.deriveKey(a, l, o, !1, ["wrapKey", "unwrapKey"]);
|
|
3630
3630
|
throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"');
|
|
3631
3631
|
}
|
|
3632
|
-
const
|
|
3633
|
-
const i = await
|
|
3634
|
-
return { encryptedKey: await
|
|
3632
|
+
const cc = async (e, t, r, n = 2048, s = Gt(new Uint8Array(16))) => {
|
|
3633
|
+
const i = await oc(s, e, n, t);
|
|
3634
|
+
return { encryptedKey: await xt(e.slice(-6), i, r), p2c: n, p2s: B(s) };
|
|
3635
3635
|
};
|
|
3636
|
-
function
|
|
3636
|
+
function _r(e) {
|
|
3637
3637
|
switch (e) {
|
|
3638
3638
|
case "RSA-OAEP":
|
|
3639
3639
|
case "RSA-OAEP-256":
|
|
@@ -3644,24 +3644,24 @@ function wr(e) {
|
|
|
3644
3644
|
throw new O(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
3645
3645
|
}
|
|
3646
3646
|
}
|
|
3647
|
-
const
|
|
3647
|
+
const uc = (e, t) => {
|
|
3648
3648
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
3649
3649
|
const { modulusLength: r } = t.algorithm;
|
|
3650
3650
|
if (typeof r != "number" || r < 2048)
|
|
3651
3651
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
3652
3652
|
}
|
|
3653
|
-
},
|
|
3653
|
+
}, lc = async (e, t, r) => {
|
|
3654
3654
|
if (!M(t))
|
|
3655
3655
|
throw new TypeError(I(t, ...N));
|
|
3656
|
-
if (ie(t, e, "encrypt", "wrapKey"),
|
|
3657
|
-
return new Uint8Array(await g.subtle.encrypt(
|
|
3656
|
+
if (ie(t, e, "encrypt", "wrapKey"), uc(e, t), t.usages.includes("encrypt"))
|
|
3657
|
+
return new Uint8Array(await g.subtle.encrypt(_r(e), t, r));
|
|
3658
3658
|
if (t.usages.includes("wrapKey")) {
|
|
3659
|
-
const n = await g.subtle.importKey("raw", r, ...
|
|
3660
|
-
return new Uint8Array(await g.subtle.wrapKey("raw", n, t,
|
|
3659
|
+
const n = await g.subtle.importKey("raw", r, ...gn);
|
|
3660
|
+
return new Uint8Array(await g.subtle.wrapKey("raw", n, t, _r(e)));
|
|
3661
3661
|
}
|
|
3662
3662
|
throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation');
|
|
3663
3663
|
};
|
|
3664
|
-
function
|
|
3664
|
+
function dc(e) {
|
|
3665
3665
|
let t, r;
|
|
3666
3666
|
switch (e.kty) {
|
|
3667
3667
|
case "RSA": {
|
|
@@ -3733,37 +3733,37 @@ function fc(e) {
|
|
|
3733
3733
|
}
|
|
3734
3734
|
return { algorithm: t, keyUsages: r };
|
|
3735
3735
|
}
|
|
3736
|
-
const
|
|
3736
|
+
const Sn = async (e) => {
|
|
3737
3737
|
if (!e.alg)
|
|
3738
3738
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
3739
|
-
const { algorithm: t, keyUsages: r } =
|
|
3739
|
+
const { algorithm: t, keyUsages: r } = dc(e), n = [
|
|
3740
3740
|
t,
|
|
3741
3741
|
e.ext ?? !1,
|
|
3742
3742
|
e.key_ops ?? r
|
|
3743
3743
|
], s = { ...e };
|
|
3744
3744
|
return delete s.alg, delete s.use, g.subtle.importKey("jwk", s, ...n);
|
|
3745
|
-
}, An = (e) =>
|
|
3745
|
+
}, An = (e) => mn(e);
|
|
3746
3746
|
let Et, yt;
|
|
3747
|
-
const
|
|
3747
|
+
const Tn = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Rn = async (e, t, r, n) => {
|
|
3748
3748
|
let s = e.get(t);
|
|
3749
3749
|
if (s != null && s[n])
|
|
3750
3750
|
return s[n];
|
|
3751
|
-
const i = await
|
|
3751
|
+
const i = await Sn({ ...r, alg: n });
|
|
3752
3752
|
return s ? s[n] = i : e.set(t, { [n]: i }), i;
|
|
3753
|
-
},
|
|
3754
|
-
if (
|
|
3753
|
+
}, fc = (e, t) => {
|
|
3754
|
+
if (Tn(e)) {
|
|
3755
3755
|
let r = e.export({ format: "jwk" });
|
|
3756
|
-
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? An(r.k) : (yt || (yt = /* @__PURE__ */ new WeakMap()),
|
|
3756
|
+
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? An(r.k) : (yt || (yt = /* @__PURE__ */ new WeakMap()), Rn(yt, e, r, t));
|
|
3757
3757
|
}
|
|
3758
3758
|
return e;
|
|
3759
|
-
},
|
|
3760
|
-
if (
|
|
3759
|
+
}, hc = (e, t) => {
|
|
3760
|
+
if (Tn(e)) {
|
|
3761
3761
|
let r = e.export({ format: "jwk" });
|
|
3762
|
-
return r.k ? An(r.k) : (Et || (Et = /* @__PURE__ */ new WeakMap()),
|
|
3762
|
+
return r.k ? An(r.k) : (Et || (Et = /* @__PURE__ */ new WeakMap()), Rn(Et, e, r, t));
|
|
3763
3763
|
}
|
|
3764
3764
|
return e;
|
|
3765
|
-
}, bt = { normalizePublicKey:
|
|
3766
|
-
function
|
|
3765
|
+
}, bt = { normalizePublicKey: fc, normalizePrivateKey: hc };
|
|
3766
|
+
function vn(e) {
|
|
3767
3767
|
switch (e) {
|
|
3768
3768
|
case "A128GCM":
|
|
3769
3769
|
return 128;
|
|
@@ -3780,35 +3780,35 @@ function On(e) {
|
|
|
3780
3780
|
throw new O(`Unsupported JWE Algorithm: ${e}`);
|
|
3781
3781
|
}
|
|
3782
3782
|
}
|
|
3783
|
-
const le = (e) =>
|
|
3784
|
-
async function
|
|
3785
|
-
if (!
|
|
3783
|
+
const le = (e) => Gt(new Uint8Array(vn(e) >> 3));
|
|
3784
|
+
async function pc(e, t) {
|
|
3785
|
+
if (!Zo(e))
|
|
3786
3786
|
throw new TypeError("JWK must be an object");
|
|
3787
3787
|
switch (t || (t = e.alg), e.kty) {
|
|
3788
3788
|
case "oct":
|
|
3789
3789
|
if (typeof e.k != "string" || !e.k)
|
|
3790
3790
|
throw new TypeError('missing "k" (Key Value) Parameter value');
|
|
3791
|
-
return
|
|
3791
|
+
return mn(e.k);
|
|
3792
3792
|
case "RSA":
|
|
3793
3793
|
if (e.oth !== void 0)
|
|
3794
3794
|
throw new O('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
3795
3795
|
case "EC":
|
|
3796
3796
|
case "OKP":
|
|
3797
|
-
return
|
|
3797
|
+
return Sn({ ...e, alg: t });
|
|
3798
3798
|
default:
|
|
3799
3799
|
throw new O('Unsupported "kty" (Key Type) Parameter value');
|
|
3800
3800
|
}
|
|
3801
3801
|
}
|
|
3802
|
-
const ee = (e) => e == null ? void 0 : e[Symbol.toStringTag],
|
|
3802
|
+
const ee = (e) => e == null ? void 0 : e[Symbol.toStringTag], mc = (e, t) => {
|
|
3803
3803
|
if (!(t instanceof Uint8Array)) {
|
|
3804
|
-
if (!
|
|
3805
|
-
throw new TypeError(
|
|
3804
|
+
if (!wn(t))
|
|
3805
|
+
throw new TypeError(_n(e, t, ...N, "Uint8Array"));
|
|
3806
3806
|
if (t.type !== "secret")
|
|
3807
3807
|
throw new TypeError(`${ee(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
3808
3808
|
}
|
|
3809
|
-
},
|
|
3810
|
-
if (!
|
|
3811
|
-
throw new TypeError(
|
|
3809
|
+
}, Ec = (e, t, r) => {
|
|
3810
|
+
if (!wn(t))
|
|
3811
|
+
throw new TypeError(_n(e, t, ...N));
|
|
3812
3812
|
if (t.type === "secret")
|
|
3813
3813
|
throw new TypeError(`${ee(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
3814
3814
|
if (r === "sign" && t.type === "public")
|
|
@@ -3819,10 +3819,10 @@ const ee = (e) => e == null ? void 0 : e[Symbol.toStringTag], Ec = (e, t) => {
|
|
|
3819
3819
|
throw new TypeError(`${ee(t)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
3820
3820
|
if (t.algorithm && r === "encrypt" && t.type === "private")
|
|
3821
3821
|
throw new TypeError(`${ee(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
3822
|
-
},
|
|
3823
|
-
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ?
|
|
3822
|
+
}, yc = (e, t, r) => {
|
|
3823
|
+
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(e) ? mc(e, t) : Ec(e, t, r);
|
|
3824
3824
|
};
|
|
3825
|
-
async function
|
|
3825
|
+
async function bc(e, t, r, n, s) {
|
|
3826
3826
|
if (!(r instanceof Uint8Array))
|
|
3827
3827
|
throw new TypeError(I(r, "Uint8Array"));
|
|
3828
3828
|
const i = parseInt(e.slice(1, 4), 10), a = await g.subtle.importKey("raw", r.subarray(i >> 3), "AES-CBC", !1, ["encrypt"]), o = await g.subtle.importKey("raw", r.subarray(0, i >> 3), {
|
|
@@ -3831,10 +3831,10 @@ async function _c(e, t, r, n, s) {
|
|
|
3831
3831
|
}, !1, ["sign"]), l = new Uint8Array(await g.subtle.encrypt({
|
|
3832
3832
|
iv: n,
|
|
3833
3833
|
name: "AES-CBC"
|
|
3834
|
-
}, a, t)), d = ye(s, n, l,
|
|
3834
|
+
}, a, t)), d = ye(s, n, l, Ko(s.length << 3)), c = new Uint8Array((await g.subtle.sign("HMAC", o, d)).slice(0, i >> 3));
|
|
3835
3835
|
return { ciphertext: l, tag: c, iv: n };
|
|
3836
3836
|
}
|
|
3837
|
-
async function
|
|
3837
|
+
async function _c(e, t, r, n, s) {
|
|
3838
3838
|
let i;
|
|
3839
3839
|
r instanceof Uint8Array ? i = await g.subtle.importKey("raw", r, "AES-GCM", !1, ["encrypt"]) : (ie(r, e, "encrypt"), i = r);
|
|
3840
3840
|
const a = new Uint8Array(await g.subtle.encrypt({
|
|
@@ -3845,31 +3845,31 @@ async function wc(e, t, r, n, s) {
|
|
|
3845
3845
|
}, i, t)), o = a.slice(-16);
|
|
3846
3846
|
return { ciphertext: a.slice(0, -16), tag: o, iv: n };
|
|
3847
3847
|
}
|
|
3848
|
-
const
|
|
3848
|
+
const On = async (e, t, r, n, s) => {
|
|
3849
3849
|
if (!M(r) && !(r instanceof Uint8Array))
|
|
3850
3850
|
throw new TypeError(I(r, ...N, "Uint8Array"));
|
|
3851
|
-
switch (n ?
|
|
3851
|
+
switch (n ? ko(e, n) : n = Wo(e), e) {
|
|
3852
3852
|
case "A128CBC-HS256":
|
|
3853
3853
|
case "A192CBC-HS384":
|
|
3854
3854
|
case "A256CBC-HS512":
|
|
3855
|
-
return r instanceof Uint8Array &&
|
|
3855
|
+
return r instanceof Uint8Array && br(r, parseInt(e.slice(-3), 10)), bc(e, t, r, n, s);
|
|
3856
3856
|
case "A128GCM":
|
|
3857
3857
|
case "A192GCM":
|
|
3858
3858
|
case "A256GCM":
|
|
3859
|
-
return r instanceof Uint8Array &&
|
|
3859
|
+
return r instanceof Uint8Array && br(r, parseInt(e.slice(1, 4), 10)), _c(e, t, r, n, s);
|
|
3860
3860
|
default:
|
|
3861
3861
|
throw new O("Unsupported JWE Content Encryption Algorithm");
|
|
3862
3862
|
}
|
|
3863
3863
|
};
|
|
3864
|
-
async function
|
|
3865
|
-
const s = e.slice(0, 7), i = await
|
|
3864
|
+
async function wc(e, t, r, n) {
|
|
3865
|
+
const s = e.slice(0, 7), i = await On(s, r, t, n, new Uint8Array(0));
|
|
3866
3866
|
return {
|
|
3867
3867
|
encryptedKey: i.ciphertext,
|
|
3868
3868
|
iv: B(i.iv),
|
|
3869
3869
|
tag: B(i.tag)
|
|
3870
3870
|
};
|
|
3871
3871
|
}
|
|
3872
|
-
function
|
|
3872
|
+
function gc(e, t, r, n, s) {
|
|
3873
3873
|
if (s.crit !== void 0 && (n == null ? void 0 : n.crit) === void 0)
|
|
3874
3874
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
3875
3875
|
if (!n || n.crit === void 0)
|
|
@@ -3888,7 +3888,7 @@ function Sc(e, t, r, n, s) {
|
|
|
3888
3888
|
}
|
|
3889
3889
|
return new Set(n.crit);
|
|
3890
3890
|
}
|
|
3891
|
-
const
|
|
3891
|
+
const Sc = async (e) => {
|
|
3892
3892
|
if (e instanceof Uint8Array)
|
|
3893
3893
|
return {
|
|
3894
3894
|
kty: "oct",
|
|
@@ -3902,12 +3902,12 @@ const Tc = async (e) => {
|
|
|
3902
3902
|
return i;
|
|
3903
3903
|
};
|
|
3904
3904
|
async function Ac(e) {
|
|
3905
|
-
return
|
|
3905
|
+
return Sc(e);
|
|
3906
3906
|
}
|
|
3907
|
-
async function
|
|
3907
|
+
async function Tc(e, t, r, n, s = {}) {
|
|
3908
3908
|
var l;
|
|
3909
3909
|
let i, a, o;
|
|
3910
|
-
switch (
|
|
3910
|
+
switch (yc(e, r, "encrypt"), r = await ((l = bt.normalizePublicKey) == null ? void 0 : l.call(bt, r, e)) || r, e) {
|
|
3911
3911
|
case "dir": {
|
|
3912
3912
|
o = r;
|
|
3913
3913
|
break;
|
|
@@ -3916,19 +3916,19 @@ async function Rc(e, t, r, n, s = {}) {
|
|
|
3916
3916
|
case "ECDH-ES+A128KW":
|
|
3917
3917
|
case "ECDH-ES+A192KW":
|
|
3918
3918
|
case "ECDH-ES+A256KW": {
|
|
3919
|
-
if (!
|
|
3919
|
+
if (!sc(r))
|
|
3920
3920
|
throw new O("ECDH with the provided key is not allowed or not supported by your javascript runtime");
|
|
3921
3921
|
const { apu: d, apv: c } = s;
|
|
3922
3922
|
let { epk: h } = s;
|
|
3923
|
-
h || (h = (await
|
|
3924
|
-
const { x: E, y: w, crv: f, kty: p } = await Ac(h),
|
|
3923
|
+
h || (h = (await nc(r)).privateKey);
|
|
3924
|
+
const { x: E, y: w, crv: f, kty: p } = await Ac(h), T = await rc(r, h, e === "ECDH-ES" ? t : e, e === "ECDH-ES" ? vn(t) : parseInt(e.slice(-5, -2), 10), d, c);
|
|
3925
3925
|
if (a = { epk: { x: E, crv: f, kty: p } }, p === "EC" && (a.epk.y = w), d && (a.apu = B(d)), c && (a.apv = B(c)), e === "ECDH-ES") {
|
|
3926
|
-
o =
|
|
3926
|
+
o = T;
|
|
3927
3927
|
break;
|
|
3928
3928
|
}
|
|
3929
3929
|
o = n || le(t);
|
|
3930
3930
|
const j = e.slice(-6);
|
|
3931
|
-
i = await
|
|
3931
|
+
i = await xt(j, T, o);
|
|
3932
3932
|
break;
|
|
3933
3933
|
}
|
|
3934
3934
|
case "RSA1_5":
|
|
@@ -3936,7 +3936,7 @@ async function Rc(e, t, r, n, s = {}) {
|
|
|
3936
3936
|
case "RSA-OAEP-256":
|
|
3937
3937
|
case "RSA-OAEP-384":
|
|
3938
3938
|
case "RSA-OAEP-512": {
|
|
3939
|
-
o = n || le(t), i = await
|
|
3939
|
+
o = n || le(t), i = await lc(e, r, o);
|
|
3940
3940
|
break;
|
|
3941
3941
|
}
|
|
3942
3942
|
case "PBES2-HS256+A128KW":
|
|
@@ -3944,13 +3944,13 @@ async function Rc(e, t, r, n, s = {}) {
|
|
|
3944
3944
|
case "PBES2-HS512+A256KW": {
|
|
3945
3945
|
o = n || le(t);
|
|
3946
3946
|
const { p2c: d, p2s: c } = s;
|
|
3947
|
-
({ encryptedKey: i, ...a } = await
|
|
3947
|
+
({ encryptedKey: i, ...a } = await cc(e, r, o, d, c));
|
|
3948
3948
|
break;
|
|
3949
3949
|
}
|
|
3950
3950
|
case "A128KW":
|
|
3951
3951
|
case "A192KW":
|
|
3952
3952
|
case "A256KW": {
|
|
3953
|
-
o = n || le(t), i = await
|
|
3953
|
+
o = n || le(t), i = await xt(e, r, o);
|
|
3954
3954
|
break;
|
|
3955
3955
|
}
|
|
3956
3956
|
case "A128GCMKW":
|
|
@@ -3958,7 +3958,7 @@ async function Rc(e, t, r, n, s = {}) {
|
|
|
3958
3958
|
case "A256GCMKW": {
|
|
3959
3959
|
o = n || le(t);
|
|
3960
3960
|
const { iv: d } = s;
|
|
3961
|
-
({ encryptedKey: i, ...a } = await
|
|
3961
|
+
({ encryptedKey: i, ...a } = await wc(e, r, o, d));
|
|
3962
3962
|
break;
|
|
3963
3963
|
}
|
|
3964
3964
|
default:
|
|
@@ -3966,8 +3966,8 @@ async function Rc(e, t, r, n, s = {}) {
|
|
|
3966
3966
|
}
|
|
3967
3967
|
return { cek: o, encryptedKey: i, parameters: a };
|
|
3968
3968
|
}
|
|
3969
|
-
const
|
|
3970
|
-
class
|
|
3969
|
+
const Rc = Symbol();
|
|
3970
|
+
class vc {
|
|
3971
3971
|
constructor(t) {
|
|
3972
3972
|
if (!(t instanceof Uint8Array))
|
|
3973
3973
|
throw new TypeError("plaintext must be an instance of Uint8Array");
|
|
@@ -4009,14 +4009,14 @@ class Oc {
|
|
|
4009
4009
|
async encrypt(t, r) {
|
|
4010
4010
|
if (!this._protectedHeader && !this._unprotectedHeader && !this._sharedUnprotectedHeader)
|
|
4011
4011
|
throw new G("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");
|
|
4012
|
-
if (!
|
|
4012
|
+
if (!Yo(this._protectedHeader, this._unprotectedHeader, this._sharedUnprotectedHeader))
|
|
4013
4013
|
throw new G("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");
|
|
4014
4014
|
const n = {
|
|
4015
4015
|
...this._protectedHeader,
|
|
4016
4016
|
...this._unprotectedHeader,
|
|
4017
4017
|
...this._sharedUnprotectedHeader
|
|
4018
4018
|
};
|
|
4019
|
-
if (
|
|
4019
|
+
if (gc(G, /* @__PURE__ */ new Map(), r == null ? void 0 : r.crit, this._protectedHeader, n), n.zip !== void 0)
|
|
4020
4020
|
throw new O('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');
|
|
4021
4021
|
const { alg: s, enc: i } = n;
|
|
4022
4022
|
if (typeof s != "string" || !s)
|
|
@@ -4029,19 +4029,19 @@ class Oc {
|
|
|
4029
4029
|
let o;
|
|
4030
4030
|
{
|
|
4031
4031
|
let p;
|
|
4032
|
-
({ cek: o, encryptedKey: a, parameters: p } = await
|
|
4032
|
+
({ cek: o, encryptedKey: a, parameters: p } = await Tc(s, i, t, this._cek, this._keyManagementParameters)), p && (r && Rc in r ? this._unprotectedHeader ? this._unprotectedHeader = { ...this._unprotectedHeader, ...p } : this.setUnprotectedHeader(p) : this._protectedHeader ? this._protectedHeader = { ...this._protectedHeader, ...p } : this.setProtectedHeader(p));
|
|
4033
4033
|
}
|
|
4034
4034
|
let l, d, c;
|
|
4035
4035
|
this._protectedHeader ? d = Y.encode(B(JSON.stringify(this._protectedHeader))) : d = Y.encode(""), this._aad ? (c = B(this._aad), l = ye(d, Y.encode("."), Y.encode(c))) : l = d;
|
|
4036
|
-
const { ciphertext: h, tag: E, iv: w } = await
|
|
4036
|
+
const { ciphertext: h, tag: E, iv: w } = await On(i, this._plaintext, o, this._iv, l), f = {
|
|
4037
4037
|
ciphertext: B(h)
|
|
4038
4038
|
};
|
|
4039
|
-
return w && (f.iv = B(w)), E && (f.tag = B(E)), a && (f.encrypted_key = B(a)), c && (f.aad = c), this._protectedHeader && (f.protected =
|
|
4039
|
+
return w && (f.iv = B(w)), E && (f.tag = B(E)), a && (f.encrypted_key = B(a)), c && (f.aad = c), this._protectedHeader && (f.protected = pn.decode(d)), this._sharedUnprotectedHeader && (f.unprotected = this._sharedUnprotectedHeader), this._unprotectedHeader && (f.header = this._unprotectedHeader), f;
|
|
4040
4040
|
}
|
|
4041
4041
|
}
|
|
4042
|
-
class
|
|
4042
|
+
class Oc {
|
|
4043
4043
|
constructor(t) {
|
|
4044
|
-
this._flattened = new
|
|
4044
|
+
this._flattened = new vc(t);
|
|
4045
4045
|
}
|
|
4046
4046
|
setContentEncryptionKey(t) {
|
|
4047
4047
|
return this._flattened.setContentEncryptionKey(t), this;
|
|
@@ -4066,15 +4066,15 @@ const _t = {
|
|
|
4066
4066
|
backgroundColor: "transparent"
|
|
4067
4067
|
}
|
|
4068
4068
|
}
|
|
4069
|
-
},
|
|
4069
|
+
}, Cc = {
|
|
4070
4070
|
mask: {
|
|
4071
4071
|
number: "{{ data.number | card_mask: 'true', 'true' }}",
|
|
4072
4072
|
expiration_month: "{{ data.expiration_month }}",
|
|
4073
4073
|
expiration_year: "{{ data.expiration_year }}"
|
|
4074
4074
|
}
|
|
4075
|
-
},
|
|
4076
|
-
var
|
|
4077
|
-
const
|
|
4075
|
+
}, Pc = Cc, Bc = "DOM Element was not found";
|
|
4076
|
+
var xc = { VITE_PACKAGE_VERSION: "v3.1.1", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
4077
|
+
const jc = "v3.1.1";
|
|
4078
4078
|
class be {
|
|
4079
4079
|
constructor(t, r) {
|
|
4080
4080
|
if (Object.defineProperty(this, "options", {
|
|
@@ -4082,6 +4082,11 @@ class be {
|
|
|
4082
4082
|
configurable: !0,
|
|
4083
4083
|
writable: !0,
|
|
4084
4084
|
value: t
|
|
4085
|
+
}), Object.defineProperty(this, "IFRAME_BASE_URL", {
|
|
4086
|
+
enumerable: !0,
|
|
4087
|
+
configurable: !0,
|
|
4088
|
+
writable: !0,
|
|
4089
|
+
value: void 0
|
|
4085
4090
|
}), Object.defineProperty(this, "iframe", {
|
|
4086
4091
|
enumerable: !0,
|
|
4087
4092
|
configurable: !0,
|
|
@@ -4134,22 +4139,22 @@ class be {
|
|
|
4134
4139
|
var n;
|
|
4135
4140
|
(n = this.iframe) == null || n.remove(), this.iframe = null;
|
|
4136
4141
|
}
|
|
4137
|
-
}), !
|
|
4142
|
+
}), this.IFRAME_BASE_URL = xc.VITE_IFRAME_BASE_URL ?? Nc(jc), !this.IFRAME_BASE_URL)
|
|
4138
4143
|
throw new Error("IFRAME_BASE_URL not found");
|
|
4139
|
-
r &&
|
|
4144
|
+
r && wt.set(this, { key: r });
|
|
4140
4145
|
}
|
|
4141
4146
|
mount(t) {
|
|
4142
4147
|
const r = typeof t == "string" ? document.querySelector(t) : t;
|
|
4143
4148
|
if (!r)
|
|
4144
|
-
throw new Error(
|
|
4145
|
-
r.innerHTML = `<iframe width="100%" height="29" src="${
|
|
4149
|
+
throw new Error(Bc);
|
|
4150
|
+
r.innerHTML = `<iframe width="100%" height="29" src="${this.IFRAME_BASE_URL}?field=${this.type}&origin=${location.origin}"></iframe>`, this.iframe = r.querySelector("iframe");
|
|
4146
4151
|
const n = (s) => {
|
|
4147
4152
|
var i;
|
|
4148
4153
|
if (!(s.source !== ((i = this.iframe) == null ? void 0 : i.contentWindow) || s.data.element !== this.type))
|
|
4149
4154
|
if (s.data.type === "change") {
|
|
4150
4155
|
const a = this.extractValue(s.data.data.value), o = { ...s.data.data };
|
|
4151
4156
|
delete o.value;
|
|
4152
|
-
const l =
|
|
4157
|
+
const l = wt.get(this);
|
|
4153
4158
|
l && (l.value = a), this.emitEvent({
|
|
4154
4159
|
...s.data,
|
|
4155
4160
|
data: o
|
|
@@ -4169,7 +4174,7 @@ class be {
|
|
|
4169
4174
|
};
|
|
4170
4175
|
}
|
|
4171
4176
|
secureValue(t) {
|
|
4172
|
-
const r =
|
|
4177
|
+
const r = wt.get(this);
|
|
4173
4178
|
return (r == null ? void 0 : r.key) !== t ? null : (r == null ? void 0 : r.value) ?? null;
|
|
4174
4179
|
}
|
|
4175
4180
|
emitEvent(t) {
|
|
@@ -4178,27 +4183,27 @@ class be {
|
|
|
4178
4183
|
}
|
|
4179
4184
|
iframePostMessage(t) {
|
|
4180
4185
|
var r, n;
|
|
4181
|
-
(n = (r = this.iframe) == null ? void 0 : r.contentWindow) == null || n.postMessage(t,
|
|
4186
|
+
(n = (r = this.iframe) == null ? void 0 : r.contentWindow) == null || n.postMessage(t, this.IFRAME_BASE_URL);
|
|
4182
4187
|
}
|
|
4183
4188
|
}
|
|
4184
|
-
function
|
|
4185
|
-
return `https
|
|
4189
|
+
function Nc(e) {
|
|
4190
|
+
return `https://${window.HG_IFRAME_HOST ?? "sdk.hellgate.io"}/web/${e}/iframe/`;
|
|
4186
4191
|
}
|
|
4187
|
-
const
|
|
4188
|
-
function
|
|
4192
|
+
const wt = /* @__PURE__ */ new Map(), Dc = (e) => e != null;
|
|
4193
|
+
function Cn(e) {
|
|
4189
4194
|
const [t = null, r = null] = (e ?? "").split("/").map((n) => Number(n.trim()));
|
|
4190
4195
|
return { month: t, year: r && r > 10 ? +`20${r}` : null };
|
|
4191
4196
|
}
|
|
4192
|
-
function
|
|
4197
|
+
function Pn(e) {
|
|
4193
4198
|
if (!e)
|
|
4194
4199
|
return null;
|
|
4195
4200
|
const { month: t, year: r } = e;
|
|
4196
4201
|
return [
|
|
4197
4202
|
t && t < 10 ? `0${t}` : t,
|
|
4198
4203
|
r && r >= 100 ? String(r).slice(-2) : r
|
|
4199
|
-
].filter(
|
|
4204
|
+
].filter(Dc).join(" / ");
|
|
4200
4205
|
}
|
|
4201
|
-
class
|
|
4206
|
+
class Uc extends be {
|
|
4202
4207
|
constructor() {
|
|
4203
4208
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4204
4209
|
enumerable: !0,
|
|
@@ -4209,22 +4214,22 @@ class Hc extends be {
|
|
|
4209
4214
|
enumerable: !0,
|
|
4210
4215
|
configurable: !0,
|
|
4211
4216
|
writable: !0,
|
|
4212
|
-
value:
|
|
4217
|
+
value: Cn
|
|
4213
4218
|
}), Object.defineProperty(this, "putValue", {
|
|
4214
4219
|
enumerable: !0,
|
|
4215
4220
|
configurable: !0,
|
|
4216
4221
|
writable: !0,
|
|
4217
|
-
value:
|
|
4222
|
+
value: Pn
|
|
4218
4223
|
});
|
|
4219
4224
|
}
|
|
4220
4225
|
}
|
|
4221
|
-
function
|
|
4226
|
+
function Bn(e) {
|
|
4222
4227
|
return (e == null ? void 0 : e.replaceAll(" ", "")) ?? null;
|
|
4223
4228
|
}
|
|
4224
|
-
function
|
|
4229
|
+
function Hc(e) {
|
|
4225
4230
|
return e;
|
|
4226
4231
|
}
|
|
4227
|
-
class
|
|
4232
|
+
class Lc extends be {
|
|
4228
4233
|
constructor() {
|
|
4229
4234
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4230
4235
|
enumerable: !0,
|
|
@@ -4235,16 +4240,16 @@ class Mc extends be {
|
|
|
4235
4240
|
enumerable: !0,
|
|
4236
4241
|
configurable: !0,
|
|
4237
4242
|
writable: !0,
|
|
4238
|
-
value:
|
|
4243
|
+
value: Bn
|
|
4239
4244
|
}), Object.defineProperty(this, "putValue", {
|
|
4240
4245
|
enumerable: !0,
|
|
4241
4246
|
configurable: !0,
|
|
4242
4247
|
writable: !0,
|
|
4243
|
-
value:
|
|
4248
|
+
value: Hc
|
|
4244
4249
|
});
|
|
4245
4250
|
}
|
|
4246
4251
|
}
|
|
4247
|
-
class
|
|
4252
|
+
class Mc extends be {
|
|
4248
4253
|
constructor() {
|
|
4249
4254
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4250
4255
|
enumerable: !0,
|
|
@@ -4256,8 +4261,8 @@ class Ic extends be {
|
|
|
4256
4261
|
configurable: !0,
|
|
4257
4262
|
writable: !0,
|
|
4258
4263
|
value: (t) => t ? {
|
|
4259
|
-
number: t.cardNumber ?
|
|
4260
|
-
expiry_date: t.cardExpirationDate ?
|
|
4264
|
+
number: t.cardNumber ? Bn(t.cardNumber) : null,
|
|
4265
|
+
expiry_date: t.cardExpirationDate ? Cn(t.cardExpirationDate) : null,
|
|
4261
4266
|
cvc: t.cardVerificationCode ?? null
|
|
4262
4267
|
} : null
|
|
4263
4268
|
}), Object.defineProperty(this, "putValue", {
|
|
@@ -4266,13 +4271,13 @@ class Ic extends be {
|
|
|
4266
4271
|
writable: !0,
|
|
4267
4272
|
value: (t) => t ? {
|
|
4268
4273
|
cardNumber: t.number ? t.number : null,
|
|
4269
|
-
cardExpirationDate: t.expiry_date ?
|
|
4274
|
+
cardExpirationDate: t.expiry_date ? Pn(t.expiry_date) : null,
|
|
4270
4275
|
cardVerificationCode: t.cvc ?? null
|
|
4271
4276
|
} : null
|
|
4272
4277
|
});
|
|
4273
4278
|
}
|
|
4274
4279
|
}
|
|
4275
|
-
class
|
|
4280
|
+
class Ic extends be {
|
|
4276
4281
|
constructor() {
|
|
4277
4282
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4278
4283
|
enumerable: !0,
|
|
@@ -4292,7 +4297,7 @@ class $c extends be {
|
|
|
4292
4297
|
});
|
|
4293
4298
|
}
|
|
4294
4299
|
}
|
|
4295
|
-
class
|
|
4300
|
+
class xn extends be {
|
|
4296
4301
|
constructor() {
|
|
4297
4302
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4298
4303
|
enumerable: !0,
|
|
@@ -4315,28 +4320,28 @@ class jn extends be {
|
|
|
4315
4320
|
function de(e, t, r) {
|
|
4316
4321
|
switch (e) {
|
|
4317
4322
|
case "card":
|
|
4318
|
-
return new Ic(t, r);
|
|
4319
|
-
case "cardNumber":
|
|
4320
4323
|
return new Mc(t, r);
|
|
4324
|
+
case "cardNumber":
|
|
4325
|
+
return new Lc(t, r);
|
|
4321
4326
|
case "cardExpirationDate":
|
|
4322
|
-
return new
|
|
4327
|
+
return new Uc(t, r);
|
|
4323
4328
|
case "cardVerificationCode":
|
|
4324
|
-
return new
|
|
4329
|
+
return new Ic(t, r);
|
|
4325
4330
|
case "text":
|
|
4326
|
-
return new
|
|
4331
|
+
return new xn(t, r);
|
|
4327
4332
|
default:
|
|
4328
4333
|
ASSERT_EXHAUSTIVE(e);
|
|
4329
4334
|
}
|
|
4330
4335
|
}
|
|
4331
|
-
function
|
|
4336
|
+
function $c() {
|
|
4332
4337
|
return Date.now().toString(36) + Math.random().toString(36).slice(2);
|
|
4333
4338
|
}
|
|
4334
|
-
class
|
|
4339
|
+
class Vt {
|
|
4335
4340
|
static async init(t, r) {
|
|
4336
|
-
const n = r.provider === "basis_theory" ? await new
|
|
4341
|
+
const n = r.provider === "basis_theory" ? await new gr.BasisTheory().init(r.api_key, {
|
|
4337
4342
|
elements: !1
|
|
4338
4343
|
}) : void 0;
|
|
4339
|
-
return new
|
|
4344
|
+
return new Vt(t, r, n);
|
|
4340
4345
|
}
|
|
4341
4346
|
constructor(t, r, n, s) {
|
|
4342
4347
|
Object.defineProperty(this, "session", {
|
|
@@ -4483,8 +4488,8 @@ class Jt {
|
|
|
4483
4488
|
return this.bt.tokenize({
|
|
4484
4489
|
type: "card",
|
|
4485
4490
|
data: d,
|
|
4486
|
-
...
|
|
4487
|
-
});
|
|
4491
|
+
...Pc
|
|
4492
|
+
}).then((p) => Array.isArray(p) ? null : { token_id: p.id });
|
|
4488
4493
|
}
|
|
4489
4494
|
case "guardian":
|
|
4490
4495
|
return this.encryptCardData({
|
|
@@ -4534,15 +4539,17 @@ class Jt {
|
|
|
4534
4539
|
throw new Error("Card form must be initialized and completed before processing");
|
|
4535
4540
|
this.cardAdditionalData = i ? this.extractAdditionalData(i) : {}, this.disableFormElements();
|
|
4536
4541
|
const a = await this.tokenize();
|
|
4542
|
+
if (!a)
|
|
4543
|
+
throw new Error("Tokenization failed");
|
|
4537
4544
|
return this.session.completeAction({
|
|
4538
4545
|
action: "tokenize_card",
|
|
4539
4546
|
result: {
|
|
4540
|
-
|
|
4547
|
+
...a,
|
|
4541
4548
|
additional_data: this.cardAdditionalData
|
|
4542
4549
|
}
|
|
4543
4550
|
});
|
|
4544
4551
|
}
|
|
4545
|
-
}), re.set(this,
|
|
4552
|
+
}), re.set(this, $c());
|
|
4546
4553
|
}
|
|
4547
4554
|
hasFormElements() {
|
|
4548
4555
|
return !!Object.keys(this.cardElements).length;
|
|
@@ -4553,7 +4560,7 @@ class Jt {
|
|
|
4553
4560
|
});
|
|
4554
4561
|
}
|
|
4555
4562
|
extractAdditionalData({ cardholder_name: t, billing_address: r = {} }) {
|
|
4556
|
-
return
|
|
4563
|
+
return wr({
|
|
4557
4564
|
cardholder_name: Z(this, t),
|
|
4558
4565
|
billing_address: {
|
|
4559
4566
|
line1: Z(this, r.line1),
|
|
@@ -4565,8 +4572,8 @@ class Jt {
|
|
|
4565
4572
|
});
|
|
4566
4573
|
}
|
|
4567
4574
|
async encryptCardData(t, r) {
|
|
4568
|
-
const n = await
|
|
4569
|
-
return { enc_payload: await new
|
|
4575
|
+
const n = await pc(r, "RSA-OAEP"), s = JSON.stringify(t), i = new TextEncoder().encode(s);
|
|
4576
|
+
return { enc_payload: await new Oc(i).setProtectedHeader({ alg: "RSA-OAEP", enc: "A256GCM" }).encrypt(n) };
|
|
4570
4577
|
}
|
|
4571
4578
|
addElementStateListener(t) {
|
|
4572
4579
|
const r = this.cardElements[t];
|
|
@@ -4598,9 +4605,9 @@ function te(e, t) {
|
|
|
4598
4605
|
}
|
|
4599
4606
|
function Z(e, t) {
|
|
4600
4607
|
const r = re.get(e);
|
|
4601
|
-
return t instanceof
|
|
4608
|
+
return t instanceof xn && r ? te(e, t) ?? void 0 : t;
|
|
4602
4609
|
}
|
|
4603
|
-
class
|
|
4610
|
+
class Kc {
|
|
4604
4611
|
constructor(t = "https://api.hellgate.io", r = new AbortController()) {
|
|
4605
4612
|
Object.defineProperty(this, "abortCtrl", {
|
|
4606
4613
|
enumerable: !0,
|
|
@@ -4617,7 +4624,7 @@ class qc {
|
|
|
4617
4624
|
getSession(t) {
|
|
4618
4625
|
return fetch(`${this.baseUrl}/sessions/${t}`, {
|
|
4619
4626
|
signal: this.abortCtrl.signal
|
|
4620
|
-
}).then((r) =>
|
|
4627
|
+
}).then((r) => gt(r));
|
|
4621
4628
|
}
|
|
4622
4629
|
completeAction(t, r) {
|
|
4623
4630
|
return fetch(`${this.baseUrl}/sessions/${t}/complete-action`, {
|
|
@@ -4628,14 +4635,14 @@ class qc {
|
|
|
4628
4635
|
mode: "cors",
|
|
4629
4636
|
body: JSON.stringify(r),
|
|
4630
4637
|
signal: this.abortCtrl.signal
|
|
4631
|
-
}).then((n) =>
|
|
4638
|
+
}).then((n) => gt(n));
|
|
4632
4639
|
}
|
|
4633
4640
|
cancelAll() {
|
|
4634
4641
|
this.abortCtrl.abort();
|
|
4635
4642
|
}
|
|
4636
4643
|
}
|
|
4637
|
-
const
|
|
4638
|
-
class
|
|
4644
|
+
const qc = 2e3;
|
|
4645
|
+
class Fc {
|
|
4639
4646
|
constructor(t, r) {
|
|
4640
4647
|
Object.defineProperty(this, "id", {
|
|
4641
4648
|
enumerable: !0,
|
|
@@ -4703,7 +4710,7 @@ class zc {
|
|
|
4703
4710
|
const o = this.onStateChange((l) => {
|
|
4704
4711
|
l.next_action !== (s == null ? void 0 : s.next_action) && l.next_action === null && (i(l), o());
|
|
4705
4712
|
});
|
|
4706
|
-
this.api.completeAction(this.id, n).then((l) => this.newStateHandle(l, a)).catch(async (l) => a(await
|
|
4713
|
+
this.api.completeAction(this.id, n).then((l) => this.newStateHandle(l, a)).catch(async (l) => a(await zc(l)));
|
|
4707
4714
|
});
|
|
4708
4715
|
}
|
|
4709
4716
|
}), Object.defineProperty(this, "completeSession", {
|
|
@@ -4735,14 +4742,14 @@ class zc {
|
|
|
4735
4742
|
case "wait": {
|
|
4736
4743
|
window.clearTimeout(this.pollingTimer), this.pollingTimer = window.setTimeout(() => this.updateSessionState(r).catch((s) => {
|
|
4737
4744
|
s instanceof Response && s.status === 404 && (r == null || r(new Error(`Session ${this.id} has expired`)));
|
|
4738
|
-
}),
|
|
4745
|
+
}), qc);
|
|
4739
4746
|
break;
|
|
4740
4747
|
}
|
|
4741
4748
|
}
|
|
4742
4749
|
t.next_action !== ((n = this.state) == null ? void 0 : n.next_action) && this.stateChangeHandlers.forEach((s) => s(t)), t.next_action === null && this.completeSession(t), this.state = t;
|
|
4743
4750
|
}
|
|
4744
4751
|
}
|
|
4745
|
-
async function
|
|
4752
|
+
async function zc(e) {
|
|
4746
4753
|
if (!e.ok)
|
|
4747
4754
|
switch (e.status) {
|
|
4748
4755
|
case 400: {
|
|
@@ -4752,10 +4759,10 @@ async function Wc(e) {
|
|
|
4752
4759
|
}
|
|
4753
4760
|
return e;
|
|
4754
4761
|
}
|
|
4755
|
-
const
|
|
4762
|
+
const Wc = {
|
|
4756
4763
|
base_url: "https://api.hellgate.io"
|
|
4757
4764
|
};
|
|
4758
|
-
class
|
|
4765
|
+
class jn {
|
|
4759
4766
|
constructor(t, r) {
|
|
4760
4767
|
Object.defineProperty(this, "session", {
|
|
4761
4768
|
enumerable: !0,
|
|
@@ -4781,23 +4788,23 @@ class Nn {
|
|
|
4781
4788
|
}
|
|
4782
4789
|
static async init(t, r = {}) {
|
|
4783
4790
|
const { session: n, cardHandler: s, handler3DS: i } = await this.initHandlers(t, r);
|
|
4784
|
-
return new
|
|
4791
|
+
return new jn(n, {
|
|
4785
4792
|
CARD: s,
|
|
4786
4793
|
"3DS": i
|
|
4787
4794
|
});
|
|
4788
4795
|
}
|
|
4789
4796
|
static async initHandlers(t, r) {
|
|
4790
4797
|
const n = {
|
|
4791
|
-
...
|
|
4798
|
+
...Wc,
|
|
4792
4799
|
...r
|
|
4793
|
-
}, s = new
|
|
4800
|
+
}, s = new Kc(n.base_url, n.abortCtrl), i = new Fc(t, s), a = await i.init(), o = a.next_action === "tokenize_card" ? await this.createCardHandler(i, a.data) : void 0, l = this.create3DSHandler(i, r);
|
|
4794
4801
|
return { session: i, cardHandler: o, handler3DS: l };
|
|
4795
4802
|
}
|
|
4796
4803
|
static createCardHandler(t, r) {
|
|
4797
|
-
return
|
|
4804
|
+
return Vt.init(t, r);
|
|
4798
4805
|
}
|
|
4799
4806
|
static create3DSHandler(t, r) {
|
|
4800
|
-
return new
|
|
4807
|
+
return new Un(t, {
|
|
4801
4808
|
domContainer: r.challenge_3ds_container,
|
|
4802
4809
|
labelText: r.challenge_3ds_label_text
|
|
4803
4810
|
});
|
|
@@ -4805,18 +4812,18 @@ class Nn {
|
|
|
4805
4812
|
}
|
|
4806
4813
|
globalThis.HellgateSDK && (globalThis.Hellgate = globalThis.HellgateSDK.Hellgate, delete globalThis.HellgateSDK);
|
|
4807
4814
|
export {
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4815
|
+
Mc as CardElement,
|
|
4816
|
+
Uc as CardExpirationDateElement,
|
|
4817
|
+
Lc as CardNumberElement,
|
|
4818
|
+
Ic as CardVerificationCodeElement,
|
|
4819
|
+
jn as Hellgate,
|
|
4820
|
+
Un as Hellgate3DSHandler,
|
|
4821
|
+
Vt as HellgateCardHandler,
|
|
4822
|
+
xn as TextElement,
|
|
4816
4823
|
de as createElement,
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4824
|
+
Bn as extractCardNumberValue,
|
|
4825
|
+
Cn as extractExpiryDateValue,
|
|
4826
|
+
Hc as putCardNumberValue,
|
|
4827
|
+
Pn as putExpiryDateValue,
|
|
4828
|
+
$c as uid
|
|
4822
4829
|
};
|