@starfish-codes/hellgate 3.5.0 → 3.5.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/card/card-handler.d.ts +1 -0
- package/dist/hellgate-sdk.mjs +273 -261
- package/dist/hellgate-sdk.umd.js +5 -5
- package/package.json +2 -2
package/dist/hellgate-sdk.mjs
CHANGED
|
@@ -252,7 +252,7 @@ const as = (e, t, r, n = {}) => {
|
|
|
252
252
|
throw new Ir("Elements not initialized. Use a regular HTTP client if no elements are needed.");
|
|
253
253
|
};
|
|
254
254
|
ue.makeRequestWithoutElementsPayloadCheck = as;
|
|
255
|
-
var $r = {},
|
|
255
|
+
var $r = {}, Fe = {}, D = {}, _ = {};
|
|
256
256
|
Object.defineProperty(_, "__esModule", {
|
|
257
257
|
value: !0
|
|
258
258
|
});
|
|
@@ -275,10 +275,10 @@ const ps = "User-Agent";
|
|
|
275
275
|
_.USER_AGENT_HEADER = ps;
|
|
276
276
|
const ms = "BT-CLIENT-USER-AGENT";
|
|
277
277
|
_.CLIENT_USER_AGENT_HEADER = ms;
|
|
278
|
-
const
|
|
279
|
-
_.USER_AGENT_CLIENT =
|
|
280
|
-
const
|
|
281
|
-
_.DEFAULT_BASE_URL =
|
|
278
|
+
const Es = "BasisTheoryJS";
|
|
279
|
+
_.USER_AGENT_CLIENT = Es;
|
|
280
|
+
const ys = "https://api.basistheory.com";
|
|
281
|
+
_.DEFAULT_BASE_URL = ys;
|
|
282
282
|
const bs = "https://js.basistheory.com/hosted-elements";
|
|
283
283
|
_.DEFAULT_ELEMENTS_BASE_URL = bs;
|
|
284
284
|
const _s = {
|
|
@@ -331,26 +331,26 @@ function qr(e, t) {
|
|
|
331
331
|
return e.apply(t, arguments);
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
const { toString: ws } = Object.prototype, { getPrototypeOf:
|
|
334
|
+
const { toString: ws } = Object.prototype, { getPrototypeOf: Kt } = Object, Ke = /* @__PURE__ */ ((e) => (t) => {
|
|
335
335
|
const r = ws.call(t);
|
|
336
336
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
337
|
-
})(/* @__PURE__ */ Object.create(null)), I = (e) => (e = e.toLowerCase(), (t) =>
|
|
337
|
+
})(/* @__PURE__ */ Object.create(null)), I = (e) => (e = e.toLowerCase(), (t) => Ke(t) === e), ze = (e) => (t) => typeof t === e, { isArray: de } = Array, be = ze("undefined");
|
|
338
338
|
function Ss(e) {
|
|
339
339
|
return e !== null && !be(e) && e.constructor !== null && !be(e.constructor) && j(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
340
340
|
}
|
|
341
|
-
const
|
|
341
|
+
const Fr = I("ArrayBuffer");
|
|
342
342
|
function Ts(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 && Fr(e.buffer), t;
|
|
345
345
|
}
|
|
346
|
-
const Rs = ze("string"), j = ze("function"),
|
|
347
|
-
if (
|
|
346
|
+
const Rs = ze("string"), j = ze("function"), Kr = ze("number"), We = (e) => e !== null && typeof e == "object", As = (e) => e === !0 || e === !1, Ne = (e) => {
|
|
347
|
+
if (Ke(e) !== "object")
|
|
348
348
|
return !1;
|
|
349
|
-
const t =
|
|
349
|
+
const t = Kt(e);
|
|
350
350
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
351
351
|
}, vs = I("Date"), Os = I("File"), Cs = I("Blob"), Ps = I("FileList"), Bs = (e) => We(e) && j(e.pipe), xs = (e) => {
|
|
352
352
|
let t;
|
|
353
|
-
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t =
|
|
353
|
+
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t = Ke(e)) === "formdata" || // detect form-data instance
|
|
354
354
|
t === "object" && j(e.toString) && e.toString() === "[object FormData]"));
|
|
355
355
|
}, Ns = I("URLSearchParams"), [js, Ds, Us, Ls] = ["ReadableStream", "Request", "Response", "Headers"].map(I), Hs = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
356
356
|
function _e(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
@@ -400,26 +400,26 @@ const Ms = (e, t, r, { allOwnKeys: n } = {}) => (_e(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 && Kt(e);
|
|
404
404
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
405
405
|
return t;
|
|
406
|
-
},
|
|
406
|
+
}, Fs = (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
|
+
}, Ks = (e) => {
|
|
411
411
|
if (!e)
|
|
412
412
|
return null;
|
|
413
413
|
if (de(e))
|
|
414
414
|
return e;
|
|
415
415
|
let t = e.length;
|
|
416
|
-
if (!
|
|
416
|
+
if (!Kr(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
|
-
}, zs = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
422
|
+
}, zs = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Kt(Uint8Array)), Ws = (e, t) => {
|
|
423
423
|
const n = (e && e[Symbol.iterator]).call(e);
|
|
424
424
|
let s;
|
|
425
425
|
for (; (s = n.next()) && !s.done; ) {
|
|
@@ -432,7 +432,7 @@ const Ms = (e, t, r, { allOwnKeys: n } = {}) => (_e(t, (s, i) => {
|
|
|
432
432
|
for (; (r = e.exec(t)) !== null; )
|
|
433
433
|
n.push(r);
|
|
434
434
|
return n;
|
|
435
|
-
},
|
|
435
|
+
}, Vs = I("HTMLFormElement"), Gs = (e) => e.toLowerCase().replace(
|
|
436
436
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
437
437
|
function(r, n, s) {
|
|
438
438
|
return n.toUpperCase() + s;
|
|
@@ -466,11 +466,11 @@ const Ms = (e, t, r, { allOwnKeys: n } = {}) => (_e(t, (s, i) => {
|
|
|
466
466
|
};
|
|
467
467
|
return de(e) ? n(e) : n(String(e).split(t)), r;
|
|
468
468
|
}, Zs = () => {
|
|
469
|
-
}, Qs = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, mt = "abcdefghijklmnopqrstuvwxyz", ur = "0123456789",
|
|
469
|
+
}, Qs = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, mt = "abcdefghijklmnopqrstuvwxyz", ur = "0123456789", Vr = {
|
|
470
470
|
DIGIT: ur,
|
|
471
471
|
ALPHA: mt,
|
|
472
472
|
ALPHA_DIGIT: mt + mt.toUpperCase() + ur
|
|
473
|
-
}, ei = (e = 16, t =
|
|
473
|
+
}, ei = (e = 16, t = Vr.ALPHA_DIGIT) => {
|
|
474
474
|
let r = "";
|
|
475
475
|
const { length: n } = t;
|
|
476
476
|
for (; e--; )
|
|
@@ -497,22 +497,22 @@ const ri = (e) => {
|
|
|
497
497
|
return n;
|
|
498
498
|
};
|
|
499
499
|
return r(e, 0);
|
|
500
|
-
}, ni = I("AsyncFunction"), si = (e) => e && (We(e) || j(e)) && j(e.then) && j(e.catch),
|
|
500
|
+
}, ni = I("AsyncFunction"), si = (e) => e && (We(e) || j(e)) && j(e.then) && j(e.catch), Gr = ((e, t) => e ? setImmediate : t ? ((r, n) => (ee.addEventListener("message", ({ source: s, data: i }) => {
|
|
501
501
|
s === ee && i === r && n.length && n.shift()();
|
|
502
502
|
}, !1), (s) => {
|
|
503
503
|
n.push(s), ee.postMessage(r, "*");
|
|
504
504
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
505
505
|
typeof setImmediate == "function",
|
|
506
506
|
j(ee.postMessage)
|
|
507
|
-
), ii = typeof queueMicrotask < "u" ? queueMicrotask.bind(ee) : typeof process < "u" && process.nextTick ||
|
|
507
|
+
), ii = typeof queueMicrotask < "u" ? queueMicrotask.bind(ee) : typeof process < "u" && process.nextTick || Gr;
|
|
508
508
|
var c = {
|
|
509
509
|
isArray: de,
|
|
510
|
-
isArrayBuffer:
|
|
510
|
+
isArrayBuffer: Fr,
|
|
511
511
|
isBuffer: Ss,
|
|
512
512
|
isFormData: xs,
|
|
513
513
|
isArrayBufferView: Ts,
|
|
514
514
|
isString: Rs,
|
|
515
|
-
isNumber:
|
|
515
|
+
isNumber: Kr,
|
|
516
516
|
isBoolean: As,
|
|
517
517
|
isObject: We,
|
|
518
518
|
isPlainObject: Ne,
|
|
@@ -537,38 +537,38 @@ var c = {
|
|
|
537
537
|
stripBOM: Is,
|
|
538
538
|
inherits: $s,
|
|
539
539
|
toFlatObject: qs,
|
|
540
|
-
kindOf:
|
|
540
|
+
kindOf: Ke,
|
|
541
541
|
kindOfTest: I,
|
|
542
|
-
endsWith:
|
|
543
|
-
toArray:
|
|
542
|
+
endsWith: Fs,
|
|
543
|
+
toArray: Ks,
|
|
544
544
|
forEachEntry: Ws,
|
|
545
545
|
matchAll: ks,
|
|
546
|
-
isHTMLForm:
|
|
546
|
+
isHTMLForm: Vs,
|
|
547
547
|
hasOwnProperty: cr,
|
|
548
548
|
hasOwnProp: cr,
|
|
549
549
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
550
550
|
reduceDescriptors: kr,
|
|
551
551
|
freezeMethods: Ys,
|
|
552
552
|
toObjectSet: Xs,
|
|
553
|
-
toCamelCase:
|
|
553
|
+
toCamelCase: Gs,
|
|
554
554
|
noop: Zs,
|
|
555
555
|
toFiniteNumber: Qs,
|
|
556
556
|
findKey: zr,
|
|
557
557
|
global: ee,
|
|
558
558
|
isContextDefined: Wr,
|
|
559
|
-
ALPHABET:
|
|
559
|
+
ALPHABET: Vr,
|
|
560
560
|
generateString: ei,
|
|
561
561
|
isSpecCompliantForm: ti,
|
|
562
562
|
toJSONObject: ri,
|
|
563
563
|
isAsyncFn: ni,
|
|
564
564
|
isThenable: si,
|
|
565
|
-
setImmediate:
|
|
565
|
+
setImmediate: Gr,
|
|
566
566
|
asap: ii
|
|
567
567
|
};
|
|
568
|
-
function
|
|
568
|
+
function y(e, t, r, n, s) {
|
|
569
569
|
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, this.status = s.status ? s.status : null);
|
|
570
570
|
}
|
|
571
|
-
c.inherits(
|
|
571
|
+
c.inherits(y, Error, {
|
|
572
572
|
toJSON: function() {
|
|
573
573
|
return {
|
|
574
574
|
// Standard
|
|
@@ -589,7 +589,7 @@ c.inherits(E, Error, {
|
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
591
|
});
|
|
592
|
-
const Jr =
|
|
592
|
+
const Jr = y.prototype, Yr = {};
|
|
593
593
|
[
|
|
594
594
|
"ERR_BAD_OPTION_VALUE",
|
|
595
595
|
"ERR_BAD_OPTION",
|
|
@@ -607,13 +607,13 @@ const Jr = E.prototype, Yr = {};
|
|
|
607
607
|
].forEach((e) => {
|
|
608
608
|
Yr[e] = { value: e };
|
|
609
609
|
});
|
|
610
|
-
Object.defineProperties(
|
|
610
|
+
Object.defineProperties(y, Yr);
|
|
611
611
|
Object.defineProperty(Jr, "isAxiosError", { value: !0 });
|
|
612
|
-
|
|
612
|
+
y.from = (e, t, r, n, s, i) => {
|
|
613
613
|
const a = Object.create(Jr);
|
|
614
614
|
return c.toFlatObject(e, a, function(d) {
|
|
615
615
|
return d !== Error.prototype;
|
|
616
|
-
}, (o) => o !== "isAxiosError"),
|
|
616
|
+
}, (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;
|
|
617
617
|
};
|
|
618
618
|
var ai = null;
|
|
619
619
|
function Nt(e) {
|
|
@@ -640,8 +640,8 @@ function ke(e, t, r) {
|
|
|
640
640
|
metaTokens: !0,
|
|
641
641
|
dots: !1,
|
|
642
642
|
indexes: !1
|
|
643
|
-
}, !1, function(
|
|
644
|
-
return !c.isUndefined(p[
|
|
643
|
+
}, !1, function(E, p) {
|
|
644
|
+
return !c.isUndefined(p[E]);
|
|
645
645
|
});
|
|
646
646
|
const n = r.metaTokens, s = r.visitor || l, i = r.dots, a = r.indexes, d = (r.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
647
647
|
if (!c.isFunction(s))
|
|
@@ -652,42 +652,42 @@ function ke(e, t, r) {
|
|
|
652
652
|
if (c.isDate(h))
|
|
653
653
|
return h.toISOString();
|
|
654
654
|
if (!d && c.isBlob(h))
|
|
655
|
-
throw new
|
|
655
|
+
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
656
656
|
return c.isArrayBuffer(h) || c.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
657
657
|
}
|
|
658
|
-
function l(h,
|
|
658
|
+
function l(h, E, p) {
|
|
659
659
|
let S = h;
|
|
660
660
|
if (h && !p && typeof h == "object") {
|
|
661
|
-
if (c.endsWith(
|
|
662
|
-
|
|
663
|
-
else if (c.isArray(h) && oi(h) || (c.isFileList(h) || c.endsWith(
|
|
664
|
-
return
|
|
661
|
+
if (c.endsWith(E, "{}"))
|
|
662
|
+
E = n ? E : E.slice(0, -2), h = JSON.stringify(h);
|
|
663
|
+
else if (c.isArray(h) && oi(h) || (c.isFileList(h) || c.endsWith(E, "[]")) && (S = c.toArray(h)))
|
|
664
|
+
return E = Xr(E), S.forEach(function(O, W) {
|
|
665
665
|
!(c.isUndefined(O) || O === null) && t.append(
|
|
666
666
|
// eslint-disable-next-line no-nested-ternary
|
|
667
|
-
a === !0 ? lr([
|
|
667
|
+
a === !0 ? lr([E], W, i) : a === null ? E : E + "[]",
|
|
668
668
|
u(O)
|
|
669
669
|
);
|
|
670
670
|
}), !1;
|
|
671
671
|
}
|
|
672
|
-
return Nt(h) ? !0 : (t.append(lr(p,
|
|
672
|
+
return Nt(h) ? !0 : (t.append(lr(p, E, i), u(h)), !1);
|
|
673
673
|
}
|
|
674
674
|
const f = [], b = Object.assign(ci, {
|
|
675
675
|
defaultVisitor: l,
|
|
676
676
|
convertValue: u,
|
|
677
677
|
isVisitable: Nt
|
|
678
678
|
});
|
|
679
|
-
function w(h,
|
|
679
|
+
function w(h, E) {
|
|
680
680
|
if (!c.isUndefined(h)) {
|
|
681
681
|
if (f.indexOf(h) !== -1)
|
|
682
|
-
throw Error("Circular reference detected in " +
|
|
682
|
+
throw Error("Circular reference detected in " + E.join("."));
|
|
683
683
|
f.push(h), c.forEach(h, function(S, v) {
|
|
684
684
|
(!(c.isUndefined(S) || S === null) && s.call(
|
|
685
685
|
t,
|
|
686
686
|
S,
|
|
687
687
|
c.isString(v) ? v.trim() : v,
|
|
688
|
-
|
|
688
|
+
E,
|
|
689
689
|
b
|
|
690
|
-
)) === !0 && w(S,
|
|
690
|
+
)) === !0 && w(S, E ? E.concat(v) : [v]);
|
|
691
691
|
}), f.pop();
|
|
692
692
|
}
|
|
693
693
|
}
|
|
@@ -805,15 +805,15 @@ var fr = li, en = {
|
|
|
805
805
|
},
|
|
806
806
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
807
807
|
};
|
|
808
|
-
const Wt = typeof window < "u" && typeof document < "u", jt = typeof navigator == "object" && navigator || void 0, mi = Wt && (!jt || ["ReactNative", "NativeScript", "NS"].indexOf(jt.product) < 0),
|
|
809
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
808
|
+
const Wt = typeof window < "u" && typeof document < "u", jt = typeof navigator == "object" && navigator || void 0, mi = Wt && (!jt || ["ReactNative", "NativeScript", "NS"].indexOf(jt.product) < 0), Ei = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
809
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", yi = Wt && window.location.href || "http://localhost";
|
|
810
810
|
var bi = /* @__PURE__ */ Object.freeze({
|
|
811
811
|
__proto__: null,
|
|
812
812
|
hasBrowserEnv: Wt,
|
|
813
|
-
hasStandardBrowserWebWorkerEnv:
|
|
813
|
+
hasStandardBrowserWebWorkerEnv: Ei,
|
|
814
814
|
hasStandardBrowserEnv: mi,
|
|
815
815
|
navigator: jt,
|
|
816
|
-
origin:
|
|
816
|
+
origin: yi
|
|
817
817
|
}), N = {
|
|
818
818
|
...bi,
|
|
819
819
|
...pi
|
|
@@ -901,7 +901,7 @@ const kt = {
|
|
|
901
901
|
return JSON.parse(t);
|
|
902
902
|
} catch (o) {
|
|
903
903
|
if (a)
|
|
904
|
-
throw o.name === "SyntaxError" ?
|
|
904
|
+
throw o.name === "SyntaxError" ? y.from(o, y.ERR_BAD_RESPONSE, this, null, this.response) : o;
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
return t;
|
|
@@ -932,7 +932,7 @@ const kt = {
|
|
|
932
932
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
933
933
|
kt.headers[e] = {};
|
|
934
934
|
});
|
|
935
|
-
var
|
|
935
|
+
var Vt = kt;
|
|
936
936
|
const Ti = c.toObjectSet([
|
|
937
937
|
"age",
|
|
938
938
|
"authorization",
|
|
@@ -975,7 +975,7 @@ function Ai(e) {
|
|
|
975
975
|
return t;
|
|
976
976
|
}
|
|
977
977
|
const vi = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
978
|
-
function
|
|
978
|
+
function Et(e, t, r, n, s) {
|
|
979
979
|
if (c.isFunction(n))
|
|
980
980
|
return n.call(this, t, r);
|
|
981
981
|
if (s && (t = r), !!c.isString(t)) {
|
|
@@ -999,7 +999,7 @@ function Ci(e, t) {
|
|
|
999
999
|
});
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
|
-
class
|
|
1002
|
+
class Ve {
|
|
1003
1003
|
constructor(t) {
|
|
1004
1004
|
t && this.set(t);
|
|
1005
1005
|
}
|
|
@@ -1044,7 +1044,7 @@ class Ge {
|
|
|
1044
1044
|
has(t, r) {
|
|
1045
1045
|
if (t = he(t), t) {
|
|
1046
1046
|
const n = c.findKey(this, t);
|
|
1047
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
1047
|
+
return !!(n && this[n] !== void 0 && (!r || Et(this, this[n], n, r)));
|
|
1048
1048
|
}
|
|
1049
1049
|
return !1;
|
|
1050
1050
|
}
|
|
@@ -1054,7 +1054,7 @@ class Ge {
|
|
|
1054
1054
|
function i(a) {
|
|
1055
1055
|
if (a = he(a), a) {
|
|
1056
1056
|
const o = c.findKey(n, a);
|
|
1057
|
-
o && (!r ||
|
|
1057
|
+
o && (!r || Et(n, n[o], o, r)) && (delete n[o], s = !0);
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
1060
|
return c.isArray(t) ? t.forEach(i) : i(t), s;
|
|
@@ -1064,7 +1064,7 @@ class Ge {
|
|
|
1064
1064
|
let n = r.length, s = !1;
|
|
1065
1065
|
for (; n--; ) {
|
|
1066
1066
|
const i = r[n];
|
|
1067
|
-
(!t ||
|
|
1067
|
+
(!t || Et(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
1068
1068
|
}
|
|
1069
1069
|
return s;
|
|
1070
1070
|
}
|
|
@@ -1117,8 +1117,8 @@ class Ge {
|
|
|
1117
1117
|
return c.isArray(t) ? t.forEach(i) : i(t), this;
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
|
-
|
|
1121
|
-
c.reduceDescriptors(
|
|
1120
|
+
Ve.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1121
|
+
c.reduceDescriptors(Ve.prototype, ({ value: e }, t) => {
|
|
1122
1122
|
let r = t[0].toUpperCase() + t.slice(1);
|
|
1123
1123
|
return {
|
|
1124
1124
|
get: () => e,
|
|
@@ -1127,10 +1127,10 @@ c.reduceDescriptors(Ge.prototype, ({ value: e }, t) => {
|
|
|
1127
1127
|
}
|
|
1128
1128
|
};
|
|
1129
1129
|
});
|
|
1130
|
-
c.freezeMethods(
|
|
1131
|
-
var H =
|
|
1132
|
-
function
|
|
1133
|
-
const r = this ||
|
|
1130
|
+
c.freezeMethods(Ve);
|
|
1131
|
+
var H = Ve;
|
|
1132
|
+
function yt(e, t) {
|
|
1133
|
+
const r = this || Vt, n = t || r, s = H.from(n.headers);
|
|
1134
1134
|
let i = n.data;
|
|
1135
1135
|
return c.forEach(e, function(o) {
|
|
1136
1136
|
i = o.call(r, i, s.normalize(), t ? t.status : void 0);
|
|
@@ -1140,16 +1140,16 @@ function rn(e) {
|
|
|
1140
1140
|
return !!(e && e.__CANCEL__);
|
|
1141
1141
|
}
|
|
1142
1142
|
function fe(e, t, r) {
|
|
1143
|
-
|
|
1143
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
1144
1144
|
}
|
|
1145
|
-
c.inherits(fe,
|
|
1145
|
+
c.inherits(fe, y, {
|
|
1146
1146
|
__CANCEL__: !0
|
|
1147
1147
|
});
|
|
1148
1148
|
function nn(e, t, r) {
|
|
1149
1149
|
const n = r.config.validateStatus;
|
|
1150
|
-
!r.status || !n || n(r.status) ? e(r) : t(new
|
|
1150
|
+
!r.status || !n || n(r.status) ? e(r) : t(new y(
|
|
1151
1151
|
"Request failed with status code " + r.status,
|
|
1152
|
-
[
|
|
1152
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
1153
1153
|
r.config,
|
|
1154
1154
|
r.request,
|
|
1155
1155
|
r
|
|
@@ -1281,7 +1281,7 @@ function Ui(e, t) {
|
|
|
1281
1281
|
function sn(e, t) {
|
|
1282
1282
|
return e && !Di(t) ? Ui(e, t) : t;
|
|
1283
1283
|
}
|
|
1284
|
-
const
|
|
1284
|
+
const Er = (e) => e instanceof H ? { ...e } : e;
|
|
1285
1285
|
function ne(e, t) {
|
|
1286
1286
|
t = t || {};
|
|
1287
1287
|
const r = {};
|
|
@@ -1341,7 +1341,7 @@ function ne(e, t) {
|
|
|
1341
1341
|
socketPath: a,
|
|
1342
1342
|
responseEncoding: a,
|
|
1343
1343
|
validateStatus: o,
|
|
1344
|
-
headers: (u, l) => s(
|
|
1344
|
+
headers: (u, l) => s(Er(u), Er(l), !0)
|
|
1345
1345
|
};
|
|
1346
1346
|
return c.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1347
1347
|
const f = d[l] || s, b = f(e[l], t[l], l);
|
|
@@ -1377,7 +1377,7 @@ var Hi = Li && function(e) {
|
|
|
1377
1377
|
let i = s.data;
|
|
1378
1378
|
const a = H.from(s.headers).normalize();
|
|
1379
1379
|
let { responseType: o, onUploadProgress: d, onDownloadProgress: u } = s, l, f, b, w, h;
|
|
1380
|
-
function
|
|
1380
|
+
function E() {
|
|
1381
1381
|
w && w(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1382
1382
|
}
|
|
1383
1383
|
let p = new XMLHttpRequest();
|
|
@@ -1396,23 +1396,23 @@ var Hi = Li && function(e) {
|
|
|
1396
1396
|
request: p
|
|
1397
1397
|
};
|
|
1398
1398
|
nn(function(Z) {
|
|
1399
|
-
r(Z),
|
|
1399
|
+
r(Z), E();
|
|
1400
1400
|
}, function(Z) {
|
|
1401
|
-
n(Z),
|
|
1401
|
+
n(Z), E();
|
|
1402
1402
|
}, P), p = null;
|
|
1403
1403
|
}
|
|
1404
1404
|
"onloadend" in p ? p.onloadend = S : p.onreadystatechange = function() {
|
|
1405
1405
|
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1406
1406
|
}, p.onabort = function() {
|
|
1407
|
-
p && (n(new
|
|
1407
|
+
p && (n(new y("Request aborted", y.ECONNABORTED, e, p)), p = null);
|
|
1408
1408
|
}, p.onerror = function() {
|
|
1409
|
-
n(new
|
|
1409
|
+
n(new y("Network Error", y.ERR_NETWORK, e, p)), p = null;
|
|
1410
1410
|
}, p.ontimeout = function() {
|
|
1411
1411
|
let W = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1412
1412
|
const P = s.transitional || en;
|
|
1413
|
-
s.timeoutErrorMessage && (W = s.timeoutErrorMessage), n(new
|
|
1413
|
+
s.timeoutErrorMessage && (W = s.timeoutErrorMessage), n(new y(
|
|
1414
1414
|
W,
|
|
1415
|
-
P.clarifyTimeoutError ?
|
|
1415
|
+
P.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1416
1416
|
e,
|
|
1417
1417
|
p
|
|
1418
1418
|
)), p = null;
|
|
@@ -1423,7 +1423,7 @@ var Hi = Li && function(e) {
|
|
|
1423
1423
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1424
1424
|
const v = Pi(s.url);
|
|
1425
1425
|
if (v && N.protocols.indexOf(v) === -1) {
|
|
1426
|
-
n(new
|
|
1426
|
+
n(new y("Unsupported protocol " + v + ":", y.ERR_BAD_REQUEST, e));
|
|
1427
1427
|
return;
|
|
1428
1428
|
}
|
|
1429
1429
|
p.send(i || null);
|
|
@@ -1437,11 +1437,11 @@ const Mi = (e, t) => {
|
|
|
1437
1437
|
if (!s) {
|
|
1438
1438
|
s = !0, o();
|
|
1439
1439
|
const l = u instanceof Error ? u : this.reason;
|
|
1440
|
-
n.abort(l instanceof
|
|
1440
|
+
n.abort(l instanceof y ? l : new fe(l instanceof Error ? l.message : l));
|
|
1441
1441
|
}
|
|
1442
1442
|
};
|
|
1443
1443
|
let a = t && setTimeout(() => {
|
|
1444
|
-
a = null, i(new
|
|
1444
|
+
a = null, i(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1445
1445
|
}, t);
|
|
1446
1446
|
const o = () => {
|
|
1447
1447
|
e && (a && clearTimeout(a), a = null, e.forEach((u) => {
|
|
@@ -1464,9 +1464,9 @@ const $i = function* (e, t) {
|
|
|
1464
1464
|
for (; n < r; )
|
|
1465
1465
|
s = n + t, yield e.slice(n, s), n = s;
|
|
1466
1466
|
}, qi = async function* (e, t) {
|
|
1467
|
-
for await (const r of
|
|
1467
|
+
for await (const r of Fi(e))
|
|
1468
1468
|
yield* $i(r, t);
|
|
1469
|
-
},
|
|
1469
|
+
}, Fi = async function* (e) {
|
|
1470
1470
|
if (e[Symbol.asyncIterator]) {
|
|
1471
1471
|
yield* e;
|
|
1472
1472
|
return;
|
|
@@ -1482,7 +1482,7 @@ const $i = function* (e, t) {
|
|
|
1482
1482
|
} finally {
|
|
1483
1483
|
await t.cancel();
|
|
1484
1484
|
}
|
|
1485
|
-
},
|
|
1485
|
+
}, yr = (e, t, r, n) => {
|
|
1486
1486
|
const s = qi(e, t);
|
|
1487
1487
|
let i = 0, a, o = (d) => {
|
|
1488
1488
|
a || (a = !0, n && n(d));
|
|
@@ -1511,7 +1511,7 @@ const $i = function* (e, t) {
|
|
|
1511
1511
|
}, {
|
|
1512
1512
|
highWaterMark: 2
|
|
1513
1513
|
});
|
|
1514
|
-
},
|
|
1514
|
+
}, Ge = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", on = Ge && typeof ReadableStream == "function", Ki = Ge && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), cn = (e, ...t) => {
|
|
1515
1515
|
try {
|
|
1516
1516
|
return !!e(...t);
|
|
1517
1517
|
} catch {
|
|
@@ -1530,10 +1530,10 @@ const $i = function* (e, t) {
|
|
|
1530
1530
|
}), br = 64 * 1024, Dt = on && cn(() => c.isReadableStream(new Response("").body)), He = {
|
|
1531
1531
|
stream: Dt && ((e) => e.body)
|
|
1532
1532
|
};
|
|
1533
|
-
|
|
1533
|
+
Ge && ((e) => {
|
|
1534
1534
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1535
1535
|
!He[t] && (He[t] = c.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
|
|
1536
|
-
throw new
|
|
1536
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, n);
|
|
1537
1537
|
});
|
|
1538
1538
|
});
|
|
1539
1539
|
})(new Response());
|
|
@@ -1550,12 +1550,12 @@ const Wi = async (e) => {
|
|
|
1550
1550
|
if (c.isArrayBufferView(e) || c.isArrayBuffer(e))
|
|
1551
1551
|
return e.byteLength;
|
|
1552
1552
|
if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
|
|
1553
|
-
return (await
|
|
1553
|
+
return (await Ki(e)).byteLength;
|
|
1554
1554
|
}, ki = async (e, t) => {
|
|
1555
1555
|
const r = c.toFiniteNumber(e.getContentLength());
|
|
1556
1556
|
return r ?? Wi(t);
|
|
1557
1557
|
};
|
|
1558
|
-
var
|
|
1558
|
+
var Vi = Ge && (async (e) => {
|
|
1559
1559
|
let {
|
|
1560
1560
|
url: t,
|
|
1561
1561
|
method: r,
|
|
@@ -1572,7 +1572,7 @@ var Gi = Ve && (async (e) => {
|
|
|
1572
1572
|
} = an(e);
|
|
1573
1573
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1574
1574
|
let w = Ii([s, i && i.toAbortSignal()], a), h;
|
|
1575
|
-
const
|
|
1575
|
+
const E = w && w.unsubscribe && (() => {
|
|
1576
1576
|
w.unsubscribe();
|
|
1577
1577
|
});
|
|
1578
1578
|
let p;
|
|
@@ -1582,13 +1582,13 @@ var Gi = Ve && (async (e) => {
|
|
|
1582
1582
|
method: "POST",
|
|
1583
1583
|
body: n,
|
|
1584
1584
|
duplex: "half"
|
|
1585
|
-
}),
|
|
1586
|
-
if (c.isFormData(n) && (
|
|
1585
|
+
}), V;
|
|
1586
|
+
if (c.isFormData(n) && (V = P.headers.get("content-type")) && l.setContentType(V), P.body) {
|
|
1587
1587
|
const [Z, Re] = pr(
|
|
1588
1588
|
p,
|
|
1589
1589
|
Le(mr(d))
|
|
1590
1590
|
);
|
|
1591
|
-
n =
|
|
1591
|
+
n = yr(P.body, br, Z, Re);
|
|
1592
1592
|
}
|
|
1593
1593
|
}
|
|
1594
1594
|
c.isString(f) || (f = f ? "include" : "omit");
|
|
@@ -1604,26 +1604,26 @@ var Gi = Ve && (async (e) => {
|
|
|
1604
1604
|
});
|
|
1605
1605
|
let v = await fetch(h);
|
|
1606
1606
|
const O = Dt && (u === "stream" || u === "response");
|
|
1607
|
-
if (Dt && (o || O &&
|
|
1607
|
+
if (Dt && (o || O && E)) {
|
|
1608
1608
|
const P = {};
|
|
1609
1609
|
["status", "statusText", "headers"].forEach((or) => {
|
|
1610
1610
|
P[or] = v[or];
|
|
1611
1611
|
});
|
|
1612
|
-
const
|
|
1613
|
-
|
|
1612
|
+
const V = c.toFiniteNumber(v.headers.get("content-length")), [Z, Re] = o && pr(
|
|
1613
|
+
V,
|
|
1614
1614
|
Le(mr(o), !0)
|
|
1615
1615
|
) || [];
|
|
1616
1616
|
v = new Response(
|
|
1617
|
-
|
|
1618
|
-
Re && Re(),
|
|
1617
|
+
yr(v.body, br, Z, () => {
|
|
1618
|
+
Re && Re(), E && E();
|
|
1619
1619
|
}),
|
|
1620
1620
|
P
|
|
1621
1621
|
);
|
|
1622
1622
|
}
|
|
1623
1623
|
u = u || "text";
|
|
1624
1624
|
let W = await He[c.findKey(He, u) || "text"](v, e);
|
|
1625
|
-
return !O &&
|
|
1626
|
-
nn(P,
|
|
1625
|
+
return !O && E && E(), await new Promise((P, V) => {
|
|
1626
|
+
nn(P, V, {
|
|
1627
1627
|
data: W,
|
|
1628
1628
|
headers: H.from(v.headers),
|
|
1629
1629
|
status: v.status,
|
|
@@ -1633,18 +1633,18 @@ var Gi = Ve && (async (e) => {
|
|
|
1633
1633
|
});
|
|
1634
1634
|
});
|
|
1635
1635
|
} catch (S) {
|
|
1636
|
-
throw
|
|
1637
|
-
new
|
|
1636
|
+
throw E && E(), S && S.name === "TypeError" && /fetch/i.test(S.message) ? Object.assign(
|
|
1637
|
+
new y("Network Error", y.ERR_NETWORK, e, h),
|
|
1638
1638
|
{
|
|
1639
1639
|
cause: S.cause || S
|
|
1640
1640
|
}
|
|
1641
|
-
) :
|
|
1641
|
+
) : y.from(S, S && S.code, e, h);
|
|
1642
1642
|
}
|
|
1643
1643
|
});
|
|
1644
1644
|
const Ut = {
|
|
1645
1645
|
http: ai,
|
|
1646
1646
|
xhr: Hi,
|
|
1647
|
-
fetch:
|
|
1647
|
+
fetch: Vi
|
|
1648
1648
|
};
|
|
1649
1649
|
c.forEach(Ut, (e, t) => {
|
|
1650
1650
|
if (e) {
|
|
@@ -1655,7 +1655,7 @@ c.forEach(Ut, (e, t) => {
|
|
|
1655
1655
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1656
1656
|
}
|
|
1657
1657
|
});
|
|
1658
|
-
const _r = (e) => `- ${e}`,
|
|
1658
|
+
const _r = (e) => `- ${e}`, Gi = (e) => c.isFunction(e) || e === null || e === !1;
|
|
1659
1659
|
var un = {
|
|
1660
1660
|
getAdapter: (e) => {
|
|
1661
1661
|
e = c.isArray(e) ? e : [e];
|
|
@@ -1665,8 +1665,8 @@ var un = {
|
|
|
1665
1665
|
for (let i = 0; i < t; i++) {
|
|
1666
1666
|
r = e[i];
|
|
1667
1667
|
let a;
|
|
1668
|
-
if (n = r, !
|
|
1669
|
-
throw new
|
|
1668
|
+
if (n = r, !Gi(r) && (n = Ut[(a = String(r)).toLowerCase()], n === void 0))
|
|
1669
|
+
throw new y(`Unknown adapter '${a}'`);
|
|
1670
1670
|
if (n)
|
|
1671
1671
|
break;
|
|
1672
1672
|
s[a || "#" + i] = n;
|
|
@@ -1678,7 +1678,7 @@ var un = {
|
|
|
1678
1678
|
let a = t ? i.length > 1 ? `since :
|
|
1679
1679
|
` + i.map(_r).join(`
|
|
1680
1680
|
`) : " " + _r(i[0]) : "as no adapter specified";
|
|
1681
|
-
throw new
|
|
1681
|
+
throw new y(
|
|
1682
1682
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1683
1683
|
"ERR_NOT_SUPPORT"
|
|
1684
1684
|
);
|
|
@@ -1692,39 +1692,39 @@ function bt(e) {
|
|
|
1692
1692
|
throw new fe(null, e);
|
|
1693
1693
|
}
|
|
1694
1694
|
function gr(e) {
|
|
1695
|
-
return bt(e), e.headers = H.from(e.headers), e.data =
|
|
1695
|
+
return bt(e), e.headers = H.from(e.headers), e.data = yt.call(
|
|
1696
1696
|
e,
|
|
1697
1697
|
e.transformRequest
|
|
1698
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), un.getAdapter(e.adapter ||
|
|
1699
|
-
return bt(e), n.data =
|
|
1698
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), un.getAdapter(e.adapter || Vt.adapter)(e).then(function(n) {
|
|
1699
|
+
return bt(e), n.data = yt.call(
|
|
1700
1700
|
e,
|
|
1701
1701
|
e.transformResponse,
|
|
1702
1702
|
n
|
|
1703
1703
|
), n.headers = H.from(n.headers), n;
|
|
1704
1704
|
}, function(n) {
|
|
1705
|
-
return rn(n) || (bt(e), n && n.response && (n.response.data =
|
|
1705
|
+
return rn(n) || (bt(e), n && n.response && (n.response.data = yt.call(
|
|
1706
1706
|
e,
|
|
1707
1707
|
e.transformResponse,
|
|
1708
1708
|
n.response
|
|
1709
1709
|
), n.response.headers = H.from(n.response.headers))), Promise.reject(n);
|
|
1710
1710
|
});
|
|
1711
1711
|
}
|
|
1712
|
-
const ln = "1.7.7",
|
|
1712
|
+
const ln = "1.7.7", Gt = {};
|
|
1713
1713
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1714
|
-
|
|
1714
|
+
Gt[e] = function(n) {
|
|
1715
1715
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1716
1716
|
};
|
|
1717
1717
|
});
|
|
1718
1718
|
const wr = {};
|
|
1719
|
-
|
|
1719
|
+
Gt.transitional = function(t, r, n) {
|
|
1720
1720
|
function s(i, a) {
|
|
1721
1721
|
return "[Axios v" + ln + "] Transitional option '" + i + "'" + a + (n ? ". " + n : "");
|
|
1722
1722
|
}
|
|
1723
1723
|
return (i, a, o) => {
|
|
1724
1724
|
if (t === !1)
|
|
1725
|
-
throw new
|
|
1725
|
+
throw new y(
|
|
1726
1726
|
s(a, " has been removed" + (r ? " in " + r : "")),
|
|
1727
|
-
|
|
1727
|
+
y.ERR_DEPRECATED
|
|
1728
1728
|
);
|
|
1729
1729
|
return r && !wr[a] && (wr[a] = !0, console.warn(
|
|
1730
1730
|
s(
|
|
@@ -1736,7 +1736,7 @@ Vt.transitional = function(t, r, n) {
|
|
|
1736
1736
|
};
|
|
1737
1737
|
function Ji(e, t, r) {
|
|
1738
1738
|
if (typeof e != "object")
|
|
1739
|
-
throw new
|
|
1739
|
+
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1740
1740
|
const n = Object.keys(e);
|
|
1741
1741
|
let s = n.length;
|
|
1742
1742
|
for (; s-- > 0; ) {
|
|
@@ -1744,18 +1744,18 @@ function Ji(e, t, r) {
|
|
|
1744
1744
|
if (a) {
|
|
1745
1745
|
const o = e[i], d = o === void 0 || a(o, i, e);
|
|
1746
1746
|
if (d !== !0)
|
|
1747
|
-
throw new
|
|
1747
|
+
throw new y("option " + i + " must be " + d, y.ERR_BAD_OPTION_VALUE);
|
|
1748
1748
|
continue;
|
|
1749
1749
|
}
|
|
1750
1750
|
if (r !== !0)
|
|
1751
|
-
throw new
|
|
1751
|
+
throw new y("Unknown option " + i, y.ERR_BAD_OPTION);
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
1754
|
var Lt = {
|
|
1755
1755
|
assertOptions: Ji,
|
|
1756
|
-
validators:
|
|
1756
|
+
validators: Gt
|
|
1757
1757
|
};
|
|
1758
|
-
const
|
|
1758
|
+
const G = Lt.validators;
|
|
1759
1759
|
class Me {
|
|
1760
1760
|
constructor(t) {
|
|
1761
1761
|
this.defaults = t, this.interceptors = {
|
|
@@ -1792,14 +1792,14 @@ class Me {
|
|
|
1792
1792
|
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = ne(this.defaults, r);
|
|
1793
1793
|
const { transitional: n, paramsSerializer: s, headers: i } = r;
|
|
1794
1794
|
n !== void 0 && Lt.assertOptions(n, {
|
|
1795
|
-
silentJSONParsing:
|
|
1796
|
-
forcedJSONParsing:
|
|
1797
|
-
clarifyTimeoutError:
|
|
1795
|
+
silentJSONParsing: G.transitional(G.boolean),
|
|
1796
|
+
forcedJSONParsing: G.transitional(G.boolean),
|
|
1797
|
+
clarifyTimeoutError: G.transitional(G.boolean)
|
|
1798
1798
|
}, !1), s != null && (c.isFunction(s) ? r.paramsSerializer = {
|
|
1799
1799
|
serialize: s
|
|
1800
1800
|
} : Lt.assertOptions(s, {
|
|
1801
|
-
encode:
|
|
1802
|
-
serialize:
|
|
1801
|
+
encode: G.function,
|
|
1802
|
+
serialize: G.function
|
|
1803
1803
|
}, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1804
1804
|
let a = i && c.merge(
|
|
1805
1805
|
i.common,
|
|
@@ -1813,12 +1813,12 @@ class Me {
|
|
|
1813
1813
|
), r.headers = H.concat(a, i);
|
|
1814
1814
|
const o = [];
|
|
1815
1815
|
let d = !0;
|
|
1816
|
-
this.interceptors.request.forEach(function(
|
|
1817
|
-
typeof
|
|
1816
|
+
this.interceptors.request.forEach(function(E) {
|
|
1817
|
+
typeof E.runWhen == "function" && E.runWhen(r) === !1 || (d = d && E.synchronous, o.unshift(E.fulfilled, E.rejected));
|
|
1818
1818
|
});
|
|
1819
1819
|
const u = [];
|
|
1820
|
-
this.interceptors.response.forEach(function(
|
|
1821
|
-
u.push(
|
|
1820
|
+
this.interceptors.response.forEach(function(E) {
|
|
1821
|
+
u.push(E.fulfilled, E.rejected);
|
|
1822
1822
|
});
|
|
1823
1823
|
let l, f = 0, b;
|
|
1824
1824
|
if (!d) {
|
|
@@ -1830,11 +1830,11 @@ class Me {
|
|
|
1830
1830
|
b = o.length;
|
|
1831
1831
|
let w = r;
|
|
1832
1832
|
for (f = 0; f < b; ) {
|
|
1833
|
-
const h = o[f++],
|
|
1833
|
+
const h = o[f++], E = o[f++];
|
|
1834
1834
|
try {
|
|
1835
1835
|
w = h(w);
|
|
1836
1836
|
} catch (p) {
|
|
1837
|
-
|
|
1837
|
+
E.call(this, p);
|
|
1838
1838
|
break;
|
|
1839
1839
|
}
|
|
1840
1840
|
}
|
|
@@ -2036,14 +2036,14 @@ function dn(e) {
|
|
|
2036
2036
|
return dn(ne(e, s));
|
|
2037
2037
|
}, r;
|
|
2038
2038
|
}
|
|
2039
|
-
const A = dn(
|
|
2039
|
+
const A = dn(Vt);
|
|
2040
2040
|
A.Axios = De;
|
|
2041
2041
|
A.CanceledError = fe;
|
|
2042
2042
|
A.CancelToken = Yi;
|
|
2043
2043
|
A.isCancel = rn;
|
|
2044
2044
|
A.VERSION = ln;
|
|
2045
2045
|
A.toFormData = ke;
|
|
2046
|
-
A.AxiosError =
|
|
2046
|
+
A.AxiosError = y;
|
|
2047
2047
|
A.Cancel = A.CanceledError;
|
|
2048
2048
|
A.all = function(t) {
|
|
2049
2049
|
return Promise.all(t);
|
|
@@ -2093,7 +2093,7 @@ const ea = (e) => {
|
|
|
2093
2093
|
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);
|
|
2094
2094
|
}
|
|
2095
2095
|
return e;
|
|
2096
|
-
},
|
|
2096
|
+
}, En = (e, t) => {
|
|
2097
2097
|
if (!(typeof e == "string" || Array.isArray(e)))
|
|
2098
2098
|
throw new TypeError("Expected the input to be `string | string[]`");
|
|
2099
2099
|
t = Object.assign({
|
|
@@ -2102,8 +2102,8 @@ const ea = (e) => {
|
|
|
2102
2102
|
const r = (s) => t.pascalCase ? s.charAt(0).toUpperCase() + s.slice(1) : s;
|
|
2103
2103
|
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 = ea(e)), e = e.replace(/^[_.\- ]+/, "").toLowerCase().replace(/[_.\- ]+(\w|$)/g, (s, i) => i.toUpperCase()).replace(/\d+(\w|$)/g, (s) => s.toUpperCase()), r(e));
|
|
2104
2104
|
};
|
|
2105
|
-
Xt.exports =
|
|
2106
|
-
Xt.exports.default =
|
|
2105
|
+
Xt.exports = En;
|
|
2106
|
+
Xt.exports.default = En;
|
|
2107
2107
|
var ta = Xt.exports;
|
|
2108
2108
|
class ra {
|
|
2109
2109
|
constructor(t = {}) {
|
|
@@ -2192,8 +2192,8 @@ const Tr = mn, sa = ta, ia = na, aa = (e, t) => e.some((r) => typeof r == "strin
|
|
|
2192
2192
|
return Tr(e, o(void 0));
|
|
2193
2193
|
};
|
|
2194
2194
|
var oa = (e, t) => Array.isArray(e) ? Object.keys(e).map((r) => Ar(e[r], t)) : Ar(e, t), gt, vr;
|
|
2195
|
-
function
|
|
2196
|
-
return vr || (vr = 1, gt =
|
|
2195
|
+
function yn() {
|
|
2196
|
+
return vr || (vr = 1, gt = yn()), gt;
|
|
2197
2197
|
}
|
|
2198
2198
|
var Ie = function() {
|
|
2199
2199
|
return Ie = Object.assign || function(t) {
|
|
@@ -2232,9 +2232,9 @@ const pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2232
2232
|
__proto__: null,
|
|
2233
2233
|
snakeCase: ha
|
|
2234
2234
|
}, Symbol.toStringTag, { value: "Module" })), ma = /* @__PURE__ */ ns(pa);
|
|
2235
|
-
var
|
|
2235
|
+
var Ea = ga, ya = /\s/, ba = /(_|-|\.|:)/, _a = /([a-z][A-Z]|[A-Z][a-z])/;
|
|
2236
2236
|
function ga(e) {
|
|
2237
|
-
return
|
|
2237
|
+
return ya.test(e) ? e.toLowerCase() : ba.test(e) ? (Sa(e) || e).toLowerCase() : _a.test(e) ? Ra(e).toLowerCase() : e.toLowerCase();
|
|
2238
2238
|
}
|
|
2239
2239
|
var wa = /[\W_]+(.|$)/g;
|
|
2240
2240
|
function Sa(e) {
|
|
@@ -2248,7 +2248,7 @@ function Ra(e) {
|
|
|
2248
2248
|
return r + " " + n.toLowerCase().split("").join(" ");
|
|
2249
2249
|
});
|
|
2250
2250
|
}
|
|
2251
|
-
var Aa =
|
|
2251
|
+
var Aa = Ea, va = Oa;
|
|
2252
2252
|
function Oa(e) {
|
|
2253
2253
|
return Aa(e).replace(/[\W_]+(.|$)/g, function(t, r) {
|
|
2254
2254
|
return r ? " " + r : "";
|
|
@@ -2301,7 +2301,7 @@ Object.defineProperty(m, "__esModule", {
|
|
|
2301
2301
|
value: !0
|
|
2302
2302
|
});
|
|
2303
2303
|
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;
|
|
2304
|
-
var bn = Je(fn), q = Je(oa), Cr = Je(
|
|
2304
|
+
var bn = Je(fn), q = Je(oa), Cr = Je(yn()), La = ma, we = Je(ja), Ha = ge, te = _;
|
|
2305
2305
|
function Je(e) {
|
|
2306
2306
|
return e && e.__esModule ? e : { default: e };
|
|
2307
2307
|
}
|
|
@@ -2332,7 +2332,7 @@ const qa = (e) => {
|
|
|
2332
2332
|
};
|
|
2333
2333
|
};
|
|
2334
2334
|
m.transformReactorRequestSnakeCase = qa;
|
|
2335
|
-
const
|
|
2335
|
+
const Fa = (e) => {
|
|
2336
2336
|
if (!(typeof e > "u"))
|
|
2337
2337
|
return {
|
|
2338
2338
|
...(0, we.default)(e, {
|
|
@@ -2343,8 +2343,8 @@ const Ka = (e) => {
|
|
|
2343
2343
|
} : {}
|
|
2344
2344
|
};
|
|
2345
2345
|
};
|
|
2346
|
-
m.transformProxyRequestSnakeCase =
|
|
2347
|
-
const
|
|
2346
|
+
m.transformProxyRequestSnakeCase = Fa;
|
|
2347
|
+
const Ka = (e) => {
|
|
2348
2348
|
if (!(typeof e > "u"))
|
|
2349
2349
|
return {
|
|
2350
2350
|
...(0, we.default)(e, {
|
|
@@ -2358,7 +2358,7 @@ const Fa = (e) => {
|
|
|
2358
2358
|
} : {}
|
|
2359
2359
|
};
|
|
2360
2360
|
};
|
|
2361
|
-
m.transformTokenRequestSnakeCase =
|
|
2361
|
+
m.transformTokenRequestSnakeCase = Ka;
|
|
2362
2362
|
const Qt = (e) => e && (e == null ? void 0 : e.pagination) !== void 0 && (e == null ? void 0 : e.data) !== void 0, za = (e) => {
|
|
2363
2363
|
if (!(typeof e > "u"))
|
|
2364
2364
|
return Qt(e) ? {
|
|
@@ -2437,15 +2437,15 @@ const ka = (e) => {
|
|
|
2437
2437
|
};
|
|
2438
2438
|
};
|
|
2439
2439
|
m.transformProxyResponseCamelCase = ka;
|
|
2440
|
-
const
|
|
2440
|
+
const Va = (e) => {
|
|
2441
2441
|
if (!(typeof e > "u"))
|
|
2442
2442
|
return (0, q.default)(e, {
|
|
2443
2443
|
deep: !0
|
|
2444
2444
|
});
|
|
2445
2445
|
};
|
|
2446
|
-
m.transformResponseCamelCase =
|
|
2447
|
-
const
|
|
2448
|
-
m.dataExtractor =
|
|
2446
|
+
m.transformResponseCamelCase = Va;
|
|
2447
|
+
const Ga = (e) => e == null ? void 0 : e.data;
|
|
2448
|
+
m.dataExtractor = Ga;
|
|
2449
2449
|
const Ja = (e) => ({
|
|
2450
2450
|
data: e == null ? void 0 : e.data,
|
|
2451
2451
|
headers: e == null ? void 0 : e.headers
|
|
@@ -2733,10 +2733,10 @@ Ze.BasisTheoryService = ao;
|
|
|
2733
2733
|
});
|
|
2734
2734
|
});
|
|
2735
2735
|
})(U);
|
|
2736
|
-
Object.defineProperty(
|
|
2736
|
+
Object.defineProperty(Fe, "__esModule", {
|
|
2737
2737
|
value: !0
|
|
2738
2738
|
});
|
|
2739
|
-
|
|
2739
|
+
Fe.BasisTheoryTransactions = void 0;
|
|
2740
2740
|
var wt = D, pe = m, oo = U;
|
|
2741
2741
|
class co extends oo.BasisTheoryService {
|
|
2742
2742
|
constructor(t) {
|
|
@@ -2757,12 +2757,12 @@ class co extends oo.BasisTheoryService {
|
|
|
2757
2757
|
return this.client.post(n, void 0, (0, wt.createRequestConfig)(r)).then(pe.dataExtractor);
|
|
2758
2758
|
}
|
|
2759
2759
|
}
|
|
2760
|
-
|
|
2760
|
+
Fe.BasisTheoryTransactions = co;
|
|
2761
2761
|
(function(e) {
|
|
2762
2762
|
Object.defineProperty(e, "__esModule", {
|
|
2763
2763
|
value: !0
|
|
2764
2764
|
});
|
|
2765
|
-
var t =
|
|
2765
|
+
var t = Fe;
|
|
2766
2766
|
Object.keys(t).forEach(function(r) {
|
|
2767
2767
|
r === "default" || r === "__esModule" || r in e && e[r] === t[r] || Object.defineProperty(e, r, {
|
|
2768
2768
|
enumerable: !0,
|
|
@@ -2811,7 +2811,7 @@ const uo = (e) => class extends e {
|
|
|
2811
2811
|
return this.client.get(s, (0, B.createRequestConfig)(n)).then(B.dataExtractor);
|
|
2812
2812
|
}
|
|
2813
2813
|
};
|
|
2814
|
-
class
|
|
2814
|
+
class Eo {
|
|
2815
2815
|
constructor(t) {
|
|
2816
2816
|
this.BaseService = t;
|
|
2817
2817
|
}
|
|
@@ -2837,13 +2837,13 @@ class yo {
|
|
|
2837
2837
|
return this.BaseService;
|
|
2838
2838
|
}
|
|
2839
2839
|
}
|
|
2840
|
-
z.CrudBuilder =
|
|
2840
|
+
z.CrudBuilder = Eo;
|
|
2841
2841
|
Object.defineProperty(Qe, "__esModule", {
|
|
2842
2842
|
value: !0
|
|
2843
2843
|
});
|
|
2844
2844
|
Qe.BasisTheoryApplications = void 0;
|
|
2845
|
-
var ve = D,
|
|
2846
|
-
const _o = new bo.CrudBuilder(class extends
|
|
2845
|
+
var ve = D, yo = U, bo = z;
|
|
2846
|
+
const _o = new bo.CrudBuilder(class extends yo.BasisTheoryService {
|
|
2847
2847
|
/**
|
|
2848
2848
|
* @deprecated use {@link retrieveByKey} instead
|
|
2849
2849
|
*/
|
|
@@ -3129,7 +3129,7 @@ Object.defineProperty(at, "__esModule", {
|
|
|
3129
3129
|
at.loadElements = void 0;
|
|
3130
3130
|
var St = C, Pr = se;
|
|
3131
3131
|
let Tt;
|
|
3132
|
-
const
|
|
3132
|
+
const Fo = (e) => (Tt || (Tt = new Promise((t, r) => {
|
|
3133
3133
|
if (typeof window != "object") {
|
|
3134
3134
|
r(new Error(St.ELEMENTS_NOM_DOM_ERROR_MESSAGE));
|
|
3135
3135
|
return;
|
|
@@ -3157,7 +3157,7 @@ const Ko = (e) => (Tt || (Tt = new Promise((t, r) => {
|
|
|
3157
3157
|
return;
|
|
3158
3158
|
}
|
|
3159
3159
|
})), Tt);
|
|
3160
|
-
at.loadElements =
|
|
3160
|
+
at.loadElements = Fo;
|
|
3161
3161
|
(function(e) {
|
|
3162
3162
|
Object.defineProperty(e, "__esModule", {
|
|
3163
3163
|
value: !0
|
|
@@ -3195,8 +3195,8 @@ Object.defineProperty(ot, "__esModule", {
|
|
|
3195
3195
|
value: !0
|
|
3196
3196
|
});
|
|
3197
3197
|
ot.BasisTheoryLogs = void 0;
|
|
3198
|
-
var
|
|
3199
|
-
const Wo = new zo.CrudBuilder(class extends
|
|
3198
|
+
var Ko = U, zo = z;
|
|
3199
|
+
const Wo = new zo.CrudBuilder(class extends Ko.BasisTheoryService {
|
|
3200
3200
|
}).list().build();
|
|
3201
3201
|
ot.BasisTheoryLogs = Wo;
|
|
3202
3202
|
(function(e) {
|
|
@@ -3216,12 +3216,12 @@ Object.defineProperty(ct, "__esModule", {
|
|
|
3216
3216
|
});
|
|
3217
3217
|
ct.BasisTheoryPermissions = void 0;
|
|
3218
3218
|
var Br = D, ko = U;
|
|
3219
|
-
class
|
|
3219
|
+
class Vo extends ko.BasisTheoryService {
|
|
3220
3220
|
list(t) {
|
|
3221
3221
|
return this.client.get("/", (0, Br.createRequestConfig)(t)).then(Br.dataExtractor);
|
|
3222
3222
|
}
|
|
3223
3223
|
}
|
|
3224
|
-
ct.BasisTheoryPermissions =
|
|
3224
|
+
ct.BasisTheoryPermissions = Vo;
|
|
3225
3225
|
(function(e) {
|
|
3226
3226
|
Object.defineProperty(e, "__esModule", {
|
|
3227
3227
|
value: !0
|
|
@@ -3238,8 +3238,8 @@ Object.defineProperty(ut, "__esModule", {
|
|
|
3238
3238
|
value: !0
|
|
3239
3239
|
});
|
|
3240
3240
|
ut.BasisTheoryProxies = void 0;
|
|
3241
|
-
var xr = m,
|
|
3242
|
-
const Yo = new Jo.CrudBuilder(class extends
|
|
3241
|
+
var xr = m, Go = U, Jo = z;
|
|
3242
|
+
const Yo = new Jo.CrudBuilder(class extends Go.BasisTheoryService {
|
|
3243
3243
|
constructor(t) {
|
|
3244
3244
|
const r = {
|
|
3245
3245
|
...t
|
|
@@ -3405,7 +3405,7 @@ Object.defineProperty(qe, "__esModule", {
|
|
|
3405
3405
|
value: !0
|
|
3406
3406
|
});
|
|
3407
3407
|
qe.BasisTheory = void 0;
|
|
3408
|
-
var me = ue, cc = $r, uc = rr, g = D, Be = Tn, lc = C, dc = On, fc = Cn, hc = Pn, pc = Bn, mc = xn,
|
|
3408
|
+
var me = ue, cc = $r, uc = rr, g = D, Be = Tn, lc = C, dc = On, fc = Cn, hc = Pn, pc = Bn, mc = xn, Ec = Nn, yc = jn;
|
|
3409
3409
|
function bc(e, t, r) {
|
|
3410
3410
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
3411
3411
|
}
|
|
@@ -3447,7 +3447,7 @@ class gc {
|
|
|
3447
3447
|
apiKey: t,
|
|
3448
3448
|
baseURL: new URL(g.CLIENT_BASE_PATHS.applications, n).toString(),
|
|
3449
3449
|
appInfo: s
|
|
3450
|
-
}), this._tenants = new
|
|
3450
|
+
}), this._tenants = new yc.BasisTheoryTenants({
|
|
3451
3451
|
apiKey: t,
|
|
3452
3452
|
baseURL: new URL(g.CLIENT_BASE_PATHS.tenants, n).toString(),
|
|
3453
3453
|
appInfo: s
|
|
@@ -3475,7 +3475,7 @@ class gc {
|
|
|
3475
3475
|
apiKey: t,
|
|
3476
3476
|
baseURL: new URL(g.CLIENT_BASE_PATHS.proxy, n).toString(),
|
|
3477
3477
|
appInfo: s
|
|
3478
|
-
}), this._sessions = new
|
|
3478
|
+
}), this._sessions = new Ec.BasisTheorySessions({
|
|
3479
3479
|
apiKey: t,
|
|
3480
3480
|
baseURL: new URL(g.CLIENT_BASE_PATHS.sessions, n).toString(),
|
|
3481
3481
|
appInfo: s
|
|
@@ -3610,7 +3610,7 @@ qe.BasisTheory = gc;
|
|
|
3610
3610
|
const i = new r.BasisTheory();
|
|
3611
3611
|
e._instance = i;
|
|
3612
3612
|
})(Mr);
|
|
3613
|
-
const T = crypto,
|
|
3613
|
+
const T = crypto, F = (e) => e instanceof CryptoKey, wc = async (e, t) => {
|
|
3614
3614
|
const r = `SHA-${e.slice(-3)}`;
|
|
3615
3615
|
return new Uint8Array(await T.subtle.digest(r, t));
|
|
3616
3616
|
}, re = new TextEncoder(), Dn = new TextDecoder(), $e = 2 ** 32;
|
|
@@ -3804,11 +3804,11 @@ function Mn(e, t, ...r) {
|
|
|
3804
3804
|
r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
3805
3805
|
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;
|
|
3806
3806
|
}
|
|
3807
|
-
const
|
|
3807
|
+
const K = (e, ...t) => Mn("Key must be ", e, ...t);
|
|
3808
3808
|
function In(e, t, ...r) {
|
|
3809
3809
|
return Mn(`Key for the ${e} algorithm must be `, t, ...r);
|
|
3810
3810
|
}
|
|
3811
|
-
const $n = (e) =>
|
|
3811
|
+
const $n = (e) => F(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", M = ["CryptoKey"], xc = (...e) => {
|
|
3812
3812
|
const t = e.filter(Boolean);
|
|
3813
3813
|
if (t.length === 0 || t.length === 1)
|
|
3814
3814
|
return !0;
|
|
@@ -3850,23 +3850,23 @@ function Dc(e, t) {
|
|
|
3850
3850
|
throw new TypeError(`Invalid key size for alg: ${t}`);
|
|
3851
3851
|
}
|
|
3852
3852
|
function Uc(e, t, r) {
|
|
3853
|
-
if (
|
|
3853
|
+
if (F(e))
|
|
3854
3854
|
return le(e, t, r), e;
|
|
3855
3855
|
if (e instanceof Uint8Array)
|
|
3856
3856
|
return T.subtle.importKey("raw", e, "AES-KW", !0, [r]);
|
|
3857
|
-
throw new TypeError(
|
|
3857
|
+
throw new TypeError(K(e, ...M, "Uint8Array"));
|
|
3858
3858
|
}
|
|
3859
|
-
const
|
|
3859
|
+
const Ft = async (e, t, r) => {
|
|
3860
3860
|
const n = await Uc(t, e, "wrapKey");
|
|
3861
3861
|
Dc(n, e);
|
|
3862
3862
|
const s = await T.subtle.importKey("raw", r, ...qn);
|
|
3863
3863
|
return new Uint8Array(await T.subtle.wrapKey("raw", s, n, "AES-KW"));
|
|
3864
3864
|
};
|
|
3865
3865
|
async function Lc(e, t, r, n, s = new Uint8Array(0), i = new Uint8Array(0)) {
|
|
3866
|
-
if (!
|
|
3867
|
-
throw new TypeError(
|
|
3868
|
-
if (le(e, "ECDH"), !
|
|
3869
|
-
throw new TypeError(
|
|
3866
|
+
if (!F(e))
|
|
3867
|
+
throw new TypeError(K(e, ...M));
|
|
3868
|
+
if (le(e, "ECDH"), !F(t))
|
|
3869
|
+
throw new TypeError(K(t, ...M));
|
|
3870
3870
|
le(t, "ECDH", "deriveBits");
|
|
3871
3871
|
const a = Se(Rt(re.encode(r)), Rt(s), Rt(i), sr(n));
|
|
3872
3872
|
let o;
|
|
@@ -3878,13 +3878,13 @@ async function Lc(e, t, r, n, s = new Uint8Array(0), i = new Uint8Array(0)) {
|
|
|
3878
3878
|
return Rc(d, n, a);
|
|
3879
3879
|
}
|
|
3880
3880
|
async function Hc(e) {
|
|
3881
|
-
if (!
|
|
3882
|
-
throw new TypeError(
|
|
3881
|
+
if (!F(e))
|
|
3882
|
+
throw new TypeError(K(e, ...M));
|
|
3883
3883
|
return T.subtle.generateKey(e.algorithm, !0, ["deriveBits"]);
|
|
3884
3884
|
}
|
|
3885
3885
|
function Mc(e) {
|
|
3886
|
-
if (!
|
|
3887
|
-
throw new TypeError(
|
|
3886
|
+
if (!F(e))
|
|
3887
|
+
throw new TypeError(K(e, ...M));
|
|
3888
3888
|
return ["P-256", "P-384", "P-521"].includes(e.algorithm.namedCurve) || e.algorithm.name === "X25519" || e.algorithm.name === "X448";
|
|
3889
3889
|
}
|
|
3890
3890
|
function Ic(e) {
|
|
@@ -3894,9 +3894,9 @@ function Ic(e) {
|
|
|
3894
3894
|
function $c(e, t) {
|
|
3895
3895
|
if (e instanceof Uint8Array)
|
|
3896
3896
|
return T.subtle.importKey("raw", e, "PBKDF2", !1, ["deriveBits"]);
|
|
3897
|
-
if (
|
|
3897
|
+
if (F(e))
|
|
3898
3898
|
return le(e, t, "deriveBits", "deriveKey"), e;
|
|
3899
|
-
throw new TypeError(
|
|
3899
|
+
throw new TypeError(K(e, ...M, "Uint8Array"));
|
|
3900
3900
|
}
|
|
3901
3901
|
async function qc(e, t, r, n) {
|
|
3902
3902
|
Ic(e);
|
|
@@ -3915,9 +3915,9 @@ async function qc(e, t, r, n) {
|
|
|
3915
3915
|
return T.subtle.deriveKey(a, d, o, !1, ["wrapKey", "unwrapKey"]);
|
|
3916
3916
|
throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"');
|
|
3917
3917
|
}
|
|
3918
|
-
const
|
|
3918
|
+
const Fc = async (e, t, r, n = 2048, s = ir(new Uint8Array(16))) => {
|
|
3919
3919
|
const i = await qc(s, e, n, t);
|
|
3920
|
-
return { encryptedKey: await
|
|
3920
|
+
return { encryptedKey: await Ft(e.slice(-6), i, r), p2c: n, p2s: L(s) };
|
|
3921
3921
|
};
|
|
3922
3922
|
function Ur(e) {
|
|
3923
3923
|
switch (e) {
|
|
@@ -3930,16 +3930,16 @@ function Ur(e) {
|
|
|
3930
3930
|
throw new x(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
3931
3931
|
}
|
|
3932
3932
|
}
|
|
3933
|
-
const
|
|
3933
|
+
const Kc = (e, t) => {
|
|
3934
3934
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
3935
3935
|
const { modulusLength: r } = t.algorithm;
|
|
3936
3936
|
if (typeof r != "number" || r < 2048)
|
|
3937
3937
|
throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`);
|
|
3938
3938
|
}
|
|
3939
3939
|
}, zc = async (e, t, r) => {
|
|
3940
|
-
if (!
|
|
3941
|
-
throw new TypeError(
|
|
3942
|
-
if (le(t, e, "encrypt", "wrapKey"),
|
|
3940
|
+
if (!F(t))
|
|
3941
|
+
throw new TypeError(K(t, ...M));
|
|
3942
|
+
if (le(t, e, "encrypt", "wrapKey"), Kc(e, t), t.usages.includes("encrypt"))
|
|
3943
3943
|
return new Uint8Array(await T.subtle.encrypt(Ur(e), t, r));
|
|
3944
3944
|
if (t.usages.includes("wrapKey")) {
|
|
3945
3945
|
const n = await T.subtle.importKey("raw", r, ...qn);
|
|
@@ -4019,7 +4019,7 @@ function Wc(e) {
|
|
|
4019
4019
|
}
|
|
4020
4020
|
return { algorithm: t, keyUsages: r };
|
|
4021
4021
|
}
|
|
4022
|
-
const
|
|
4022
|
+
const Fn = async (e) => {
|
|
4023
4023
|
if (!e.alg)
|
|
4024
4024
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
4025
4025
|
const { algorithm: t, keyUsages: r } = Wc(e), n = [
|
|
@@ -4028,27 +4028,27 @@ const Kn = async (e) => {
|
|
|
4028
4028
|
e.key_ops ?? r
|
|
4029
4029
|
], s = { ...e };
|
|
4030
4030
|
return delete s.alg, delete s.use, T.subtle.importKey("jwk", s, ...n);
|
|
4031
|
-
},
|
|
4031
|
+
}, Kn = (e) => Un(e);
|
|
4032
4032
|
let At, vt;
|
|
4033
4033
|
const zn = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", Wn = async (e, t, r, n) => {
|
|
4034
4034
|
let s = e.get(t);
|
|
4035
4035
|
if (s != null && s[n])
|
|
4036
4036
|
return s[n];
|
|
4037
|
-
const i = await
|
|
4037
|
+
const i = await Fn({ ...r, alg: n });
|
|
4038
4038
|
return s ? s[n] = i : e.set(t, { [n]: i }), i;
|
|
4039
4039
|
}, kc = (e, t) => {
|
|
4040
4040
|
if (zn(e)) {
|
|
4041
4041
|
let r = e.export({ format: "jwk" });
|
|
4042
|
-
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ?
|
|
4042
|
+
return delete r.d, delete r.dp, delete r.dq, delete r.p, delete r.q, delete r.qi, r.k ? Kn(r.k) : (vt || (vt = /* @__PURE__ */ new WeakMap()), Wn(vt, e, r, t));
|
|
4043
4043
|
}
|
|
4044
4044
|
return e;
|
|
4045
|
-
},
|
|
4045
|
+
}, Vc = (e, t) => {
|
|
4046
4046
|
if (zn(e)) {
|
|
4047
4047
|
let r = e.export({ format: "jwk" });
|
|
4048
|
-
return r.k ?
|
|
4048
|
+
return r.k ? Kn(r.k) : (At || (At = /* @__PURE__ */ new WeakMap()), Wn(At, e, r, t));
|
|
4049
4049
|
}
|
|
4050
4050
|
return e;
|
|
4051
|
-
}, Ot = { normalizePublicKey: kc, normalizePrivateKey:
|
|
4051
|
+
}, Ot = { normalizePublicKey: kc, normalizePrivateKey: Vc };
|
|
4052
4052
|
function kn(e) {
|
|
4053
4053
|
switch (e) {
|
|
4054
4054
|
case "A128GCM":
|
|
@@ -4066,8 +4066,8 @@ function kn(e) {
|
|
|
4066
4066
|
throw new x(`Unsupported JWE Algorithm: ${e}`);
|
|
4067
4067
|
}
|
|
4068
4068
|
}
|
|
4069
|
-
const
|
|
4070
|
-
async function
|
|
4069
|
+
const Ee = (e) => ir(new Uint8Array(kn(e) >> 3));
|
|
4070
|
+
async function Gc(e, t) {
|
|
4071
4071
|
if (!jc(e))
|
|
4072
4072
|
throw new TypeError("JWK must be an object");
|
|
4073
4073
|
switch (e.kty) {
|
|
@@ -4080,7 +4080,7 @@ async function Vc(e, t) {
|
|
|
4080
4080
|
throw new x('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
|
|
4081
4081
|
case "EC":
|
|
4082
4082
|
case "OKP":
|
|
4083
|
-
return
|
|
4083
|
+
return Fn({ ...e, alg: t });
|
|
4084
4084
|
default:
|
|
4085
4085
|
throw new x('Unsupported "kty" (Key Type) Parameter value');
|
|
4086
4086
|
}
|
|
@@ -4106,7 +4106,7 @@ const Ue = (e) => e == null ? void 0 : e[Symbol.toStringTag], Jc = (e, t) => {
|
|
|
4106
4106
|
};
|
|
4107
4107
|
async function Zc(e, t, r, n, s) {
|
|
4108
4108
|
if (!(r instanceof Uint8Array))
|
|
4109
|
-
throw new TypeError(
|
|
4109
|
+
throw new TypeError(K(r, "Uint8Array"));
|
|
4110
4110
|
const i = parseInt(e.slice(1, 4), 10), a = await T.subtle.importKey("raw", r.subarray(i >> 3), "AES-CBC", !1, ["encrypt"]), o = await T.subtle.importKey("raw", r.subarray(0, i >> 3), {
|
|
4111
4111
|
hash: `SHA-${i << 1}`,
|
|
4112
4112
|
name: "HMAC"
|
|
@@ -4127,9 +4127,9 @@ async function Qc(e, t, r, n, s) {
|
|
|
4127
4127
|
}, i, t)), o = a.slice(-16);
|
|
4128
4128
|
return { ciphertext: a.slice(0, -16), tag: o, iv: n };
|
|
4129
4129
|
}
|
|
4130
|
-
const
|
|
4131
|
-
if (!
|
|
4132
|
-
throw new TypeError(
|
|
4130
|
+
const Vn = async (e, t, r, n, s) => {
|
|
4131
|
+
if (!F(r) && !(r instanceof Uint8Array))
|
|
4132
|
+
throw new TypeError(K(r, ...M, "Uint8Array"));
|
|
4133
4133
|
switch (n ? Cc(e, n) : n = Oc(e), e) {
|
|
4134
4134
|
case "A128CBC-HS256":
|
|
4135
4135
|
case "A192CBC-HS384":
|
|
@@ -4144,7 +4144,7 @@ const Gn = async (e, t, r, n, s) => {
|
|
|
4144
4144
|
}
|
|
4145
4145
|
};
|
|
4146
4146
|
async function eu(e, t, r, n) {
|
|
4147
|
-
const s = e.slice(0, 7), i = await
|
|
4147
|
+
const s = e.slice(0, 7), i = await Vn(s, r, t, n, new Uint8Array(0));
|
|
4148
4148
|
return {
|
|
4149
4149
|
encryptedKey: i.ciphertext,
|
|
4150
4150
|
iv: L(i.iv),
|
|
@@ -4176,8 +4176,8 @@ const ru = async (e) => {
|
|
|
4176
4176
|
kty: "oct",
|
|
4177
4177
|
k: L(e)
|
|
4178
4178
|
};
|
|
4179
|
-
if (!
|
|
4180
|
-
throw new TypeError(
|
|
4179
|
+
if (!F(e))
|
|
4180
|
+
throw new TypeError(K(e, ...M, "Uint8Array"));
|
|
4181
4181
|
if (!e.extractable)
|
|
4182
4182
|
throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");
|
|
4183
4183
|
const { ext: t, key_ops: r, alg: n, use: s, ...i } = await T.subtle.exportKey("jwk", e);
|
|
@@ -4203,14 +4203,14 @@ async function su(e, t, r, n, s = {}) {
|
|
|
4203
4203
|
const { apu: u, apv: l } = s;
|
|
4204
4204
|
let { epk: f } = s;
|
|
4205
4205
|
f || (f = (await Hc(r)).privateKey);
|
|
4206
|
-
const { x: b, y: w, crv: h, kty:
|
|
4207
|
-
if (a = { epk: { x: b, crv: h, kty:
|
|
4206
|
+
const { x: b, y: w, crv: h, kty: E } = await nu(f), p = await Lc(r, f, e === "ECDH-ES" ? t : e, e === "ECDH-ES" ? kn(t) : parseInt(e.slice(-5, -2), 10), u, l);
|
|
4207
|
+
if (a = { epk: { x: b, crv: h, kty: E } }, E === "EC" && (a.epk.y = w), u && (a.apu = L(u)), l && (a.apv = L(l)), e === "ECDH-ES") {
|
|
4208
4208
|
o = p;
|
|
4209
4209
|
break;
|
|
4210
4210
|
}
|
|
4211
|
-
o = n ||
|
|
4211
|
+
o = n || Ee(t);
|
|
4212
4212
|
const S = e.slice(-6);
|
|
4213
|
-
i = await
|
|
4213
|
+
i = await Ft(S, p, o);
|
|
4214
4214
|
break;
|
|
4215
4215
|
}
|
|
4216
4216
|
case "RSA1_5":
|
|
@@ -4218,27 +4218,27 @@ async function su(e, t, r, n, s = {}) {
|
|
|
4218
4218
|
case "RSA-OAEP-256":
|
|
4219
4219
|
case "RSA-OAEP-384":
|
|
4220
4220
|
case "RSA-OAEP-512": {
|
|
4221
|
-
o = n ||
|
|
4221
|
+
o = n || Ee(t), i = await zc(e, r, o);
|
|
4222
4222
|
break;
|
|
4223
4223
|
}
|
|
4224
4224
|
case "PBES2-HS256+A128KW":
|
|
4225
4225
|
case "PBES2-HS384+A192KW":
|
|
4226
4226
|
case "PBES2-HS512+A256KW": {
|
|
4227
|
-
o = n ||
|
|
4227
|
+
o = n || Ee(t);
|
|
4228
4228
|
const { p2c: u, p2s: l } = s;
|
|
4229
|
-
({ encryptedKey: i, ...a } = await
|
|
4229
|
+
({ encryptedKey: i, ...a } = await Fc(e, r, o, u, l));
|
|
4230
4230
|
break;
|
|
4231
4231
|
}
|
|
4232
4232
|
case "A128KW":
|
|
4233
4233
|
case "A192KW":
|
|
4234
4234
|
case "A256KW": {
|
|
4235
|
-
o = n ||
|
|
4235
|
+
o = n || Ee(t), i = await Ft(e, r, o);
|
|
4236
4236
|
break;
|
|
4237
4237
|
}
|
|
4238
4238
|
case "A128GCMKW":
|
|
4239
4239
|
case "A192GCMKW":
|
|
4240
4240
|
case "A256GCMKW": {
|
|
4241
|
-
o = n ||
|
|
4241
|
+
o = n || Ee(t);
|
|
4242
4242
|
const { iv: u } = s;
|
|
4243
4243
|
({ encryptedKey: i, ...a } = await eu(e, r, o, u));
|
|
4244
4244
|
break;
|
|
@@ -4310,12 +4310,12 @@ class au {
|
|
|
4310
4310
|
throw new TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${s}`);
|
|
4311
4311
|
let o;
|
|
4312
4312
|
{
|
|
4313
|
-
let
|
|
4314
|
-
({ cek: o, encryptedKey: a, parameters:
|
|
4313
|
+
let E;
|
|
4314
|
+
({ cek: o, encryptedKey: a, parameters: E } = await su(s, i, t, this._cek, this._keyManagementParameters)), E && (r && iu in r ? this._unprotectedHeader ? this._unprotectedHeader = { ...this._unprotectedHeader, ...E } : this.setUnprotectedHeader(E) : this._protectedHeader ? this._protectedHeader = { ...this._protectedHeader, ...E } : this.setProtectedHeader(E));
|
|
4315
4315
|
}
|
|
4316
4316
|
let d, u, l;
|
|
4317
4317
|
this._protectedHeader ? u = re.encode(L(JSON.stringify(this._protectedHeader))) : u = re.encode(""), this._aad ? (l = L(this._aad), d = Se(u, re.encode("."), re.encode(l))) : d = u;
|
|
4318
|
-
const { ciphertext: f, tag: b, iv: w } = await
|
|
4318
|
+
const { ciphertext: f, tag: b, iv: w } = await Vn(i, this._plaintext, o, this._iv, d), h = {
|
|
4319
4319
|
ciphertext: L(f)
|
|
4320
4320
|
};
|
|
4321
4321
|
return w && (h.iv = L(w)), b && (h.tag = L(b)), a && (h.encrypted_key = L(a)), l && (h.aad = l), this._protectedHeader && (h.protected = Dn.decode(u)), this._sharedUnprotectedHeader && (h.unprotected = this._sharedUnprotectedHeader), this._unprotectedHeader && (h.header = this._unprotectedHeader), h;
|
|
@@ -4354,9 +4354,9 @@ const Ct = {
|
|
|
4354
4354
|
expiration_month: "{{ data.expiration_month }}",
|
|
4355
4355
|
expiration_year: "{{ data.expiration_year }}"
|
|
4356
4356
|
}
|
|
4357
|
-
}, uu = cu, lu = "DOM Element was not found",
|
|
4358
|
-
var du = { VITE_PACKAGE_VERSION: "v3.5.
|
|
4359
|
-
const fu = "v3.5.
|
|
4357
|
+
}, uu = cu, lu = "DOM Element was not found", Gn = (e) => e != null;
|
|
4358
|
+
var du = { VITE_PACKAGE_VERSION: "v3.5.1", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
4359
|
+
const fu = "v3.5.1";
|
|
4360
4360
|
class Te {
|
|
4361
4361
|
constructor(t, r) {
|
|
4362
4362
|
if (Object.defineProperty(this, "options", {
|
|
@@ -4384,7 +4384,7 @@ class Te {
|
|
|
4384
4384
|
configurable: !0,
|
|
4385
4385
|
writable: !0,
|
|
4386
4386
|
value: async ({ ...n }) => {
|
|
4387
|
-
this.iframe &&
|
|
4387
|
+
this.iframe && Gn(n.height) && (this.iframe.height = n.height), this.iframePostMessage({
|
|
4388
4388
|
type: "update",
|
|
4389
4389
|
data: {
|
|
4390
4390
|
...n,
|
|
@@ -4483,7 +4483,7 @@ function Yn(e) {
|
|
|
4483
4483
|
return [
|
|
4484
4484
|
t && t < 10 ? `0${t}` : t,
|
|
4485
4485
|
r && r >= 100 ? String(r).slice(-2) : r
|
|
4486
|
-
].filter(
|
|
4486
|
+
].filter(Gn).join(" / ");
|
|
4487
4487
|
}
|
|
4488
4488
|
class pu extends Te {
|
|
4489
4489
|
constructor() {
|
|
@@ -4511,7 +4511,7 @@ function Xn(e) {
|
|
|
4511
4511
|
function mu(e) {
|
|
4512
4512
|
return e;
|
|
4513
4513
|
}
|
|
4514
|
-
class
|
|
4514
|
+
class Eu extends Te {
|
|
4515
4515
|
constructor() {
|
|
4516
4516
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4517
4517
|
enumerable: !0,
|
|
@@ -4531,7 +4531,7 @@ class yu extends Te {
|
|
|
4531
4531
|
});
|
|
4532
4532
|
}
|
|
4533
4533
|
}
|
|
4534
|
-
class
|
|
4534
|
+
class yu extends Te {
|
|
4535
4535
|
constructor() {
|
|
4536
4536
|
super(...arguments), Object.defineProperty(this, "type", {
|
|
4537
4537
|
enumerable: !0,
|
|
@@ -4599,12 +4599,12 @@ class Zn extends Te {
|
|
|
4599
4599
|
});
|
|
4600
4600
|
}
|
|
4601
4601
|
}
|
|
4602
|
-
function
|
|
4602
|
+
function ye(e, t, r) {
|
|
4603
4603
|
switch (e) {
|
|
4604
4604
|
case "card":
|
|
4605
|
-
return new Eu(t, r);
|
|
4606
|
-
case "cardNumber":
|
|
4607
4605
|
return new yu(t, r);
|
|
4606
|
+
case "cardNumber":
|
|
4607
|
+
return new Eu(t, r);
|
|
4608
4608
|
case "cardExpirationDate":
|
|
4609
4609
|
return new pu(t, r);
|
|
4610
4610
|
case "cardVerificationCode":
|
|
@@ -4696,7 +4696,7 @@ class ar {
|
|
|
4696
4696
|
cvc: null
|
|
4697
4697
|
};
|
|
4698
4698
|
}
|
|
4699
|
-
const a =
|
|
4699
|
+
const a = ye("card", i, s);
|
|
4700
4700
|
return this.cardElements.card = {
|
|
4701
4701
|
element: a,
|
|
4702
4702
|
state: this.createFieldDefaultState()
|
|
@@ -4717,14 +4717,14 @@ class ar {
|
|
|
4717
4717
|
disabled: this.cvcOnlyEnabled,
|
|
4718
4718
|
autocomplete: "on",
|
|
4719
4719
|
style: { ...Ct }
|
|
4720
|
-
}, { cardNumber: a = {}, expiryDate: o = {}, securityCode: d = {}, ...u } = n, l =
|
|
4720
|
+
}, { cardNumber: a = {}, expiryDate: o = {}, securityCode: d = {}, ...u } = n, l = ye("cardNumber", {
|
|
4721
4721
|
...ae(i, {
|
|
4722
4722
|
...u,
|
|
4723
4723
|
...a,
|
|
4724
4724
|
cvc2Only: this.cvcOnlyEnabled,
|
|
4725
4725
|
value: this.session.isNextAction("refresh_security_code") && ((w = this.session.state) != null && w.data) ? Lr(this.session.state.data) : null
|
|
4726
4726
|
})
|
|
4727
|
-
}, s), f =
|
|
4727
|
+
}, s), f = ye("cardExpirationDate", {
|
|
4728
4728
|
...ae(i, {
|
|
4729
4729
|
...u,
|
|
4730
4730
|
...o,
|
|
@@ -4733,7 +4733,7 @@ class ar {
|
|
|
4733
4733
|
year: this.session.state.data.expiry_year
|
|
4734
4734
|
} : null
|
|
4735
4735
|
})
|
|
4736
|
-
}, s), b =
|
|
4736
|
+
}, s), b = ye("cardVerificationCode", {
|
|
4737
4737
|
...ae({
|
|
4738
4738
|
...i,
|
|
4739
4739
|
disabled: !1,
|
|
@@ -4770,7 +4770,7 @@ class ar {
|
|
|
4770
4770
|
disabled: !1,
|
|
4771
4771
|
autocomplete: "on",
|
|
4772
4772
|
style: { ...Ct }
|
|
4773
|
-
}, a =
|
|
4773
|
+
}, a = ye("text", {
|
|
4774
4774
|
...ae(i, { ...n })
|
|
4775
4775
|
}, s);
|
|
4776
4776
|
return this.textElements.push(a), a;
|
|
@@ -4780,16 +4780,19 @@ class ar {
|
|
|
4780
4780
|
configurable: !0,
|
|
4781
4781
|
writable: !0,
|
|
4782
4782
|
value: async (n) => {
|
|
4783
|
-
var
|
|
4784
|
-
if (((
|
|
4785
|
-
throw new Error(`The session's next_action='${(
|
|
4783
|
+
var d, u;
|
|
4784
|
+
if (((d = this.session.state) == null ? void 0 : d.next_action) !== "tokenize_card")
|
|
4785
|
+
throw new Error(`The session's next_action='${(u = this.session.state) == null ? void 0 : u.next_action}'. tokenize() is available only if next_action='tokenize_card'`);
|
|
4786
4786
|
const s = this.getFormValue(), i = this.extractAdditionalData(n);
|
|
4787
4787
|
if (!s)
|
|
4788
4788
|
throw new Error("Form elements must be initialized before tokenization");
|
|
4789
|
+
const a = this.getCardDataValidationError();
|
|
4790
|
+
if (a)
|
|
4791
|
+
throw a;
|
|
4789
4792
|
if (!s.number || !s.expiration_month || !s.expiration_year || !s.cvc)
|
|
4790
4793
|
throw new Error("Card data is not complete");
|
|
4791
|
-
const
|
|
4792
|
-
switch (
|
|
4794
|
+
const o = this.session.state.data;
|
|
4795
|
+
switch (o.provider) {
|
|
4793
4796
|
case "basis_theory": {
|
|
4794
4797
|
if (!this.bt)
|
|
4795
4798
|
throw new Error("basis_theory SDK not found");
|
|
@@ -4797,8 +4800,8 @@ class ar {
|
|
|
4797
4800
|
type: "card",
|
|
4798
4801
|
data: s,
|
|
4799
4802
|
...uu
|
|
4800
|
-
}).then((
|
|
4801
|
-
token_id:
|
|
4803
|
+
}).then((l) => Array.isArray(l) ? null : {
|
|
4804
|
+
token_id: l.id,
|
|
4802
4805
|
additional_data: i
|
|
4803
4806
|
});
|
|
4804
4807
|
}
|
|
@@ -4809,9 +4812,9 @@ class ar {
|
|
|
4809
4812
|
expiry_year: s.expiration_year,
|
|
4810
4813
|
security_code: s.cvc,
|
|
4811
4814
|
additional_data: i
|
|
4812
|
-
},
|
|
4815
|
+
}, o.jwk);
|
|
4813
4816
|
default:
|
|
4814
|
-
ASSERT_EXHAUSTIVE(
|
|
4817
|
+
ASSERT_EXHAUSTIVE(o);
|
|
4815
4818
|
}
|
|
4816
4819
|
}
|
|
4817
4820
|
}), Object.defineProperty(this, "onStateChange", {
|
|
@@ -4851,8 +4854,10 @@ class ar {
|
|
|
4851
4854
|
throw new Error("Card form must be initialized and completed before processing");
|
|
4852
4855
|
if (this.session.isNextAction("refresh_security_code"))
|
|
4853
4856
|
return this.refreshSecurityCode();
|
|
4854
|
-
this.disableFormElements();
|
|
4855
|
-
const s = await this.tokenize(n)
|
|
4857
|
+
this.disableFormElements(!0);
|
|
4858
|
+
const s = await this.tokenize(n).catch((i) => {
|
|
4859
|
+
throw this.disableFormElements(!1), i;
|
|
4860
|
+
});
|
|
4856
4861
|
if (!s)
|
|
4857
4862
|
throw new Error("Tokenization failed");
|
|
4858
4863
|
return this.session.completeAction({
|
|
@@ -4868,16 +4873,17 @@ class ar {
|
|
|
4868
4873
|
}
|
|
4869
4874
|
async refreshSecurityCode() {
|
|
4870
4875
|
const t = this.getFormValue();
|
|
4871
|
-
if (
|
|
4876
|
+
if (!(t != null && t.cvc))
|
|
4872
4877
|
throw new Error("cvc field was not filled");
|
|
4873
4878
|
if (!this.session.isNextAction("refresh_security_code") || !this.session.state)
|
|
4874
4879
|
throw new Error("refreshSecurityCode() is available only if next_action=refresh_security_code");
|
|
4880
|
+
this.disableFormElements(!0);
|
|
4875
4881
|
const r = await this.encryptCardData({ security_code: t.cvc }, this.session.state.data.jwk);
|
|
4876
4882
|
return this.session.completeAction({
|
|
4877
4883
|
action: "refresh_security_code",
|
|
4878
4884
|
result: { ...r }
|
|
4879
4885
|
}).catch((n) => {
|
|
4880
|
-
if (n instanceof Error)
|
|
4886
|
+
if (this.disableFormElements(!1), n instanceof Error)
|
|
4881
4887
|
throw n;
|
|
4882
4888
|
return { status: "failure", data: n };
|
|
4883
4889
|
});
|
|
@@ -4905,9 +4911,9 @@ class ar {
|
|
|
4905
4911
|
hasFormElements() {
|
|
4906
4912
|
return !!Object.keys(this.cardElements).length;
|
|
4907
4913
|
}
|
|
4908
|
-
disableFormElements() {
|
|
4909
|
-
Object.values(this.cardElements).forEach(({ element:
|
|
4910
|
-
|
|
4914
|
+
disableFormElements(t) {
|
|
4915
|
+
Object.values(this.cardElements).forEach(({ element: r }) => {
|
|
4916
|
+
r.update({ disabled: t });
|
|
4911
4917
|
});
|
|
4912
4918
|
}
|
|
4913
4919
|
extractAdditionalData({ cardholder_name: t, billing_address: r = {} }) {
|
|
@@ -4923,7 +4929,7 @@ class ar {
|
|
|
4923
4929
|
});
|
|
4924
4930
|
}
|
|
4925
4931
|
async encryptCardData(t, r) {
|
|
4926
|
-
const n = await
|
|
4932
|
+
const n = await Gc(r, "RSA-OAEP"), s = JSON.stringify(t), i = new TextEncoder().encode(s);
|
|
4927
4933
|
return { enc_payload: await new ou(i).setProtectedHeader({ alg: "RSA-OAEP", enc: "A256GCM" }).encrypt(n) };
|
|
4928
4934
|
}
|
|
4929
4935
|
addElementStateListener(t) {
|
|
@@ -4948,6 +4954,12 @@ class ar {
|
|
|
4948
4954
|
valid: !1
|
|
4949
4955
|
};
|
|
4950
4956
|
}
|
|
4957
|
+
getCardDataValidationError() {
|
|
4958
|
+
if (!this.state.complete)
|
|
4959
|
+
return new Error(this.state.error ?? "Card data is not complete");
|
|
4960
|
+
if (!this.state.valid)
|
|
4961
|
+
return new Error(`Card data is not valid. ${this.state.error}`);
|
|
4962
|
+
}
|
|
4951
4963
|
}
|
|
4952
4964
|
const ce = /* @__PURE__ */ new Map();
|
|
4953
4965
|
function oe(e, t) {
|
|
@@ -5162,15 +5174,15 @@ class Qn {
|
|
|
5162
5174
|
}
|
|
5163
5175
|
globalThis.HellgateSDK && (globalThis.Hellgate = globalThis.HellgateSDK.Hellgate, delete globalThis.HellgateSDK);
|
|
5164
5176
|
export {
|
|
5165
|
-
|
|
5177
|
+
yu as CardElement,
|
|
5166
5178
|
pu as CardExpirationDateElement,
|
|
5167
|
-
|
|
5179
|
+
Eu as CardNumberElement,
|
|
5168
5180
|
bu as CardVerificationCodeElement,
|
|
5169
5181
|
Qn as Hellgate,
|
|
5170
5182
|
ts as Hellgate3DSHandler,
|
|
5171
5183
|
ar as HellgateCardHandler,
|
|
5172
5184
|
Zn as TextElement,
|
|
5173
|
-
|
|
5185
|
+
ye as createElement,
|
|
5174
5186
|
Xn as extractCardNumberValue,
|
|
5175
5187
|
Jn as extractExpiryDateValue,
|
|
5176
5188
|
mu as putCardNumberValue,
|