@monerium/sdk 2.0.7 → 2.0.10
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/CHANGELOG.md +23 -0
- package/README.md +60 -6
- package/dist/index.d.ts +26 -26
- package/dist/index.es.js +122 -120
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +128 -126
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
var Ce = Object.defineProperty;
|
|
2
|
-
var Se = (s,
|
|
3
|
-
|
|
4
|
-
? Ce(s,
|
|
5
|
-
: (s[
|
|
6
|
-
var
|
|
7
|
-
J = (s,
|
|
8
|
-
if (!
|
|
2
|
+
var Se = (s, c, _) =>
|
|
3
|
+
c in s
|
|
4
|
+
? Ce(s, c, { enumerable: !0, configurable: !0, writable: !0, value: _ })
|
|
5
|
+
: (s[c] = _);
|
|
6
|
+
var M = (s, c, _) => (Se(s, typeof c != "symbol" ? c + "" : c, _), _),
|
|
7
|
+
J = (s, c, _) => {
|
|
8
|
+
if (!c.has(s)) throw TypeError("Cannot " + _);
|
|
9
9
|
};
|
|
10
|
-
var
|
|
11
|
-
J(s,
|
|
10
|
+
var D = (s, c, _) => (
|
|
11
|
+
J(s, c, "read from private field"), _ ? _.call(s) : c.get(s)
|
|
12
12
|
),
|
|
13
|
-
|
|
14
|
-
if (
|
|
13
|
+
T = (s, c, _) => {
|
|
14
|
+
if (c.has(s))
|
|
15
15
|
throw TypeError("Cannot add the same private member more than once");
|
|
16
|
-
|
|
16
|
+
c instanceof WeakSet ? c.add(s) : c.set(s, _);
|
|
17
17
|
},
|
|
18
|
-
Q = (s,
|
|
19
|
-
J(s,
|
|
18
|
+
Q = (s, c, _, W) => (
|
|
19
|
+
J(s, c, "write to private field"), W ? W.call(s, _) : c.set(s, _), _
|
|
20
20
|
);
|
|
21
|
-
var
|
|
22
|
-
(function (s,
|
|
21
|
+
var A = (s, c, _) => (J(s, c, "access private method"), _);
|
|
22
|
+
(function (s, c) {
|
|
23
23
|
typeof exports == "object" && typeof module < "u"
|
|
24
|
-
?
|
|
24
|
+
? c(exports)
|
|
25
25
|
: typeof define == "function" && define.amd
|
|
26
|
-
? define(["exports"],
|
|
26
|
+
? define(["exports"], c)
|
|
27
27
|
: ((s = typeof globalThis < "u" ? globalThis : s || self),
|
|
28
|
-
|
|
28
|
+
c((s["monerium-sdk"] = {})));
|
|
29
29
|
})(this, function (s) {
|
|
30
|
-
var $, z,
|
|
30
|
+
var $, z, P, k, j, ue, q, ce, F, fe;
|
|
31
31
|
("use strict");
|
|
32
|
-
var
|
|
32
|
+
var c =
|
|
33
33
|
typeof globalThis < "u"
|
|
34
34
|
? globalThis
|
|
35
35
|
: typeof window < "u"
|
|
@@ -43,8 +43,8 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
43
43
|
if (r.__esModule) return r;
|
|
44
44
|
var n = r.default;
|
|
45
45
|
if (typeof n == "function") {
|
|
46
|
-
var a = function
|
|
47
|
-
if (this instanceof
|
|
46
|
+
var a = function f() {
|
|
47
|
+
if (this instanceof f) {
|
|
48
48
|
var w = [null];
|
|
49
49
|
w.push.apply(w, arguments);
|
|
50
50
|
var v = Function.bind.apply(n, w);
|
|
@@ -56,17 +56,17 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
56
56
|
} else a = {};
|
|
57
57
|
return (
|
|
58
58
|
Object.defineProperty(a, "__esModule", { value: !0 }),
|
|
59
|
-
Object.keys(r).forEach(function (
|
|
60
|
-
var w = Object.getOwnPropertyDescriptor(r,
|
|
59
|
+
Object.keys(r).forEach(function (f) {
|
|
60
|
+
var w = Object.getOwnPropertyDescriptor(r, f);
|
|
61
61
|
Object.defineProperty(
|
|
62
62
|
a,
|
|
63
|
-
|
|
63
|
+
f,
|
|
64
64
|
w.get
|
|
65
65
|
? w
|
|
66
66
|
: {
|
|
67
67
|
enumerable: !0,
|
|
68
68
|
get: function () {
|
|
69
|
-
return r[
|
|
69
|
+
return r[f];
|
|
70
70
|
},
|
|
71
71
|
}
|
|
72
72
|
);
|
|
@@ -90,13 +90,13 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
90
90
|
'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
|
-
var
|
|
93
|
+
var L = {},
|
|
94
94
|
de = {
|
|
95
95
|
get exports() {
|
|
96
|
-
return
|
|
96
|
+
return L;
|
|
97
97
|
},
|
|
98
98
|
set exports(r) {
|
|
99
|
-
|
|
99
|
+
L = r;
|
|
100
100
|
},
|
|
101
101
|
};
|
|
102
102
|
const pe = _(
|
|
@@ -109,17 +109,17 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
109
109
|
)
|
|
110
110
|
);
|
|
111
111
|
var X;
|
|
112
|
-
function
|
|
112
|
+
function V() {
|
|
113
113
|
return (
|
|
114
114
|
X ||
|
|
115
115
|
((X = 1),
|
|
116
116
|
(function (r, n) {
|
|
117
|
-
(function (a,
|
|
118
|
-
r.exports =
|
|
119
|
-
})(
|
|
117
|
+
(function (a, f) {
|
|
118
|
+
r.exports = f();
|
|
119
|
+
})(c, function () {
|
|
120
120
|
var a =
|
|
121
121
|
a ||
|
|
122
|
-
(function (
|
|
122
|
+
(function (f, w) {
|
|
123
123
|
var v;
|
|
124
124
|
if (
|
|
125
125
|
(typeof window < "u" && window.crypto && (v = window.crypto),
|
|
@@ -131,7 +131,7 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
131
131
|
typeof window < "u" &&
|
|
132
132
|
window.msCrypto &&
|
|
133
133
|
(v = window.msCrypto),
|
|
134
|
-
!v && typeof
|
|
134
|
+
!v && typeof c < "u" && c.crypto && (v = c.crypto),
|
|
135
135
|
!v && typeof he == "function")
|
|
136
136
|
)
|
|
137
137
|
try {
|
|
@@ -228,7 +228,7 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
228
228
|
var e = this.words,
|
|
229
229
|
t = this.sigBytes;
|
|
230
230
|
(e[t >>> 2] &= 4294967295 << (32 - (t % 4) * 8)),
|
|
231
|
-
(e.length =
|
|
231
|
+
(e.length = f.ceil(t / 4));
|
|
232
232
|
},
|
|
233
233
|
clone: function () {
|
|
234
234
|
var e = y.clone.call(this);
|
|
@@ -309,16 +309,16 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
309
309
|
C = B * 4,
|
|
310
310
|
S = m / C;
|
|
311
311
|
e
|
|
312
|
-
? (S =
|
|
313
|
-
: (S =
|
|
312
|
+
? (S = f.ceil(S))
|
|
313
|
+
: (S = f.max((S | 0) - this._minBufferSize, 0));
|
|
314
314
|
var E = S * B,
|
|
315
|
-
|
|
315
|
+
U = f.min(E * 4, m);
|
|
316
316
|
if (E) {
|
|
317
|
-
for (var
|
|
318
|
-
this._doProcessBlock(l,
|
|
319
|
-
(t = l.splice(0, E)), (o.sigBytes -=
|
|
317
|
+
for (var I = 0; I < E; I += B)
|
|
318
|
+
this._doProcessBlock(l, I);
|
|
319
|
+
(t = l.splice(0, E)), (o.sigBytes -= U);
|
|
320
320
|
}
|
|
321
|
-
return new d.init(t,
|
|
321
|
+
return new d.init(t, U);
|
|
322
322
|
},
|
|
323
323
|
clone: function () {
|
|
324
324
|
var e = y.clone.call(this);
|
|
@@ -350,29 +350,29 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
350
350
|
},
|
|
351
351
|
_createHmacHelper: function (e) {
|
|
352
352
|
return function (t, o) {
|
|
353
|
-
return new
|
|
353
|
+
return new R.HMAC.init(e, o).finalize(t);
|
|
354
354
|
};
|
|
355
355
|
},
|
|
356
356
|
});
|
|
357
|
-
var
|
|
357
|
+
var R = (u.algo = {});
|
|
358
358
|
return u;
|
|
359
359
|
})(Math);
|
|
360
360
|
return a;
|
|
361
361
|
});
|
|
362
362
|
})(de)),
|
|
363
|
-
|
|
363
|
+
L
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
366
|
(function (r, n) {
|
|
367
|
-
(function (a,
|
|
368
|
-
r.exports =
|
|
369
|
-
})(
|
|
367
|
+
(function (a, f) {
|
|
368
|
+
r.exports = f(V());
|
|
369
|
+
})(c, function (a) {
|
|
370
370
|
return (
|
|
371
371
|
(function () {
|
|
372
|
-
var
|
|
373
|
-
w =
|
|
372
|
+
var f = a,
|
|
373
|
+
w = f.lib,
|
|
374
374
|
v = w.WordArray,
|
|
375
|
-
H =
|
|
375
|
+
H = f.enc;
|
|
376
376
|
H.Base64url = {
|
|
377
377
|
stringify: function (u, x = !0) {
|
|
378
378
|
var y = u.words,
|
|
@@ -383,8 +383,8 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
383
383
|
for (
|
|
384
384
|
var i = (y[g >>> 2] >>> (24 - (g % 4) * 8)) & 255,
|
|
385
385
|
p = (y[(g + 1) >>> 2] >>> (24 - ((g + 1) % 4) * 8)) & 255,
|
|
386
|
-
|
|
387
|
-
e = (i << 16) | (p << 8) |
|
|
386
|
+
R = (y[(g + 2) >>> 2] >>> (24 - ((g + 2) % 4) * 8)) & 255,
|
|
387
|
+
e = (i << 16) | (p << 8) | R,
|
|
388
388
|
t = 0;
|
|
389
389
|
t < 4 && g + t * 0.75 < d;
|
|
390
390
|
t++
|
|
@@ -428,24 +428,24 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
428
428
|
);
|
|
429
429
|
});
|
|
430
430
|
})(le);
|
|
431
|
-
var
|
|
431
|
+
var N = {},
|
|
432
432
|
ve = {
|
|
433
433
|
get exports() {
|
|
434
|
-
return
|
|
434
|
+
return N;
|
|
435
435
|
},
|
|
436
436
|
set exports(r) {
|
|
437
|
-
|
|
437
|
+
N = r;
|
|
438
438
|
},
|
|
439
439
|
};
|
|
440
440
|
(function (r, n) {
|
|
441
|
-
(function (a,
|
|
442
|
-
r.exports =
|
|
443
|
-
})(
|
|
441
|
+
(function (a, f) {
|
|
442
|
+
r.exports = f(V());
|
|
443
|
+
})(c, function (a) {
|
|
444
444
|
return (
|
|
445
445
|
(function () {
|
|
446
446
|
if (typeof ArrayBuffer == "function") {
|
|
447
|
-
var
|
|
448
|
-
w =
|
|
447
|
+
var f = a,
|
|
448
|
+
w = f.lib,
|
|
449
449
|
v = w.WordArray,
|
|
450
450
|
H = v.init,
|
|
451
451
|
O = (v.init = function (u) {
|
|
@@ -475,21 +475,21 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
475
475
|
);
|
|
476
476
|
});
|
|
477
477
|
})(ve);
|
|
478
|
-
var
|
|
478
|
+
var G = {},
|
|
479
479
|
ge = {
|
|
480
480
|
get exports() {
|
|
481
|
-
return
|
|
481
|
+
return G;
|
|
482
482
|
},
|
|
483
483
|
set exports(r) {
|
|
484
|
-
|
|
484
|
+
G = r;
|
|
485
485
|
},
|
|
486
486
|
};
|
|
487
487
|
(function (r, n) {
|
|
488
|
-
(function (a,
|
|
489
|
-
r.exports =
|
|
490
|
-
})(
|
|
488
|
+
(function (a, f) {
|
|
489
|
+
r.exports = f(V());
|
|
490
|
+
})(c, function (a) {
|
|
491
491
|
return (
|
|
492
|
-
(function (
|
|
492
|
+
(function (f) {
|
|
493
493
|
var w = a,
|
|
494
494
|
v = w.lib,
|
|
495
495
|
H = v.WordArray,
|
|
@@ -498,18 +498,18 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
498
498
|
x = [],
|
|
499
499
|
y = [];
|
|
500
500
|
(function () {
|
|
501
|
-
function h(
|
|
502
|
-
for (var e =
|
|
503
|
-
if (!(
|
|
501
|
+
function h(R) {
|
|
502
|
+
for (var e = f.sqrt(R), t = 2; t <= e; t++)
|
|
503
|
+
if (!(R % t)) return !1;
|
|
504
504
|
return !0;
|
|
505
505
|
}
|
|
506
|
-
function g(
|
|
507
|
-
return ((
|
|
506
|
+
function g(R) {
|
|
507
|
+
return ((R - (R | 0)) * 4294967296) | 0;
|
|
508
508
|
}
|
|
509
509
|
for (var i = 2, p = 0; p < 64; )
|
|
510
510
|
h(i) &&
|
|
511
|
-
(p < 8 && (x[p] = g(
|
|
512
|
-
(y[p] = g(
|
|
511
|
+
(p < 8 && (x[p] = g(f.pow(i, 1 / 2))),
|
|
512
|
+
(y[p] = g(f.pow(i, 1 / 3))),
|
|
513
513
|
p++),
|
|
514
514
|
i++;
|
|
515
515
|
})();
|
|
@@ -522,7 +522,7 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
522
522
|
for (
|
|
523
523
|
var i = this._hash.words,
|
|
524
524
|
p = i[0],
|
|
525
|
-
|
|
525
|
+
R = i[1],
|
|
526
526
|
e = i[2],
|
|
527
527
|
t = i[3],
|
|
528
528
|
o = i[4],
|
|
@@ -540,15 +540,15 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
540
540
|
((S << 25) | (S >>> 7)) ^
|
|
541
541
|
((S << 14) | (S >>> 18)) ^
|
|
542
542
|
(S >>> 3),
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
((
|
|
546
|
-
((
|
|
547
|
-
(
|
|
548
|
-
d[C] = E + d[C - 7] +
|
|
543
|
+
U = d[C - 2],
|
|
544
|
+
I =
|
|
545
|
+
((U << 15) | (U >>> 17)) ^
|
|
546
|
+
((U << 13) | (U >>> 19)) ^
|
|
547
|
+
(U >>> 10);
|
|
548
|
+
d[C] = E + d[C - 7] + I + d[C - 16];
|
|
549
549
|
}
|
|
550
550
|
var _e = (o & l) ^ (~o & m),
|
|
551
|
-
we = (p &
|
|
551
|
+
we = (p & R) ^ (p & e) ^ (R & e),
|
|
552
552
|
be =
|
|
553
553
|
((p << 30) | (p >>> 2)) ^
|
|
554
554
|
((p << 19) | (p >>> 13)) ^
|
|
@@ -564,12 +564,12 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
564
564
|
(l = o),
|
|
565
565
|
(o = (t + se) | 0),
|
|
566
566
|
(t = e),
|
|
567
|
-
(e =
|
|
568
|
-
(
|
|
567
|
+
(e = R),
|
|
568
|
+
(R = p),
|
|
569
569
|
(p = (se + xe) | 0);
|
|
570
570
|
}
|
|
571
571
|
(i[0] = (i[0] + p) | 0),
|
|
572
|
-
(i[1] = (i[1] +
|
|
572
|
+
(i[1] = (i[1] + R) | 0),
|
|
573
573
|
(i[2] = (i[2] + e) | 0),
|
|
574
574
|
(i[3] = (i[3] + t) | 0),
|
|
575
575
|
(i[4] = (i[4] + o) | 0),
|
|
@@ -584,7 +584,7 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
584
584
|
p = h.sigBytes * 8;
|
|
585
585
|
return (
|
|
586
586
|
(g[p >>> 5] |= 128 << (24 - (p % 32))),
|
|
587
|
-
(g[(((p + 64) >>> 9) << 4) + 14] =
|
|
587
|
+
(g[(((p + 64) >>> 9) << 4) + 14] = f.floor(i / 4294967296)),
|
|
588
588
|
(g[(((p + 64) >>> 9) << 4) + 15] = i),
|
|
589
589
|
(h.sigBytes = g.length * 4),
|
|
590
590
|
this._process(),
|
|
@@ -617,26 +617,27 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
617
617
|
};
|
|
618
618
|
class me {
|
|
619
619
|
constructor(n = "sandbox") {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
620
|
+
T(this, P);
|
|
621
|
+
T(this, j);
|
|
622
|
+
T(this, q);
|
|
623
|
+
T(this, F);
|
|
624
|
+
T(this, $, void 0);
|
|
625
|
+
T(this, z, void 0);
|
|
626
|
+
M(this, "codeVerifier");
|
|
627
|
+
M(this, "bearerProfile");
|
|
628
|
+
M(this, "pkceRequest", (n) => this.getAuthFlowURI(n));
|
|
628
629
|
Q(this, $, ye.environments[n]);
|
|
629
630
|
}
|
|
630
631
|
async auth(n) {
|
|
631
632
|
let a;
|
|
632
|
-
if (
|
|
633
|
+
if (A(this, j, ue).call(this, n))
|
|
633
634
|
a = { ...n, grant_type: "authorization_code" };
|
|
634
|
-
else if (
|
|
635
|
+
else if (A(this, q, ce).call(this, n))
|
|
635
636
|
a = { ...n, grant_type: "refresh_token" };
|
|
636
|
-
else if (
|
|
637
|
+
else if (A(this, F, fe).call(this, n))
|
|
637
638
|
a = { ...n, grant_type: "client_credentials" };
|
|
638
639
|
else throw new Error("Authentication method could not be detected.");
|
|
639
|
-
(this.bearerProfile = await
|
|
640
|
+
(this.bearerProfile = await A(this, P, k).call(
|
|
640
641
|
this,
|
|
641
642
|
"post",
|
|
642
643
|
"auth/token",
|
|
@@ -645,40 +646,41 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
645
646
|
)),
|
|
646
647
|
Q(this, z, `Bearer ${this.bearerProfile.access_token}`);
|
|
647
648
|
}
|
|
648
|
-
|
|
649
|
-
this.codeVerifier =
|
|
650
|
-
const a = W.stringify(
|
|
651
|
-
|
|
649
|
+
getAuthFlowURI(n) {
|
|
650
|
+
this.codeVerifier = N.random(64).toString();
|
|
651
|
+
const a = W.stringify(G(this.codeVerifier)),
|
|
652
|
+
f = {
|
|
652
653
|
...n,
|
|
654
|
+
client_id: n == null ? void 0 : n.client_id,
|
|
653
655
|
code_challenge: a,
|
|
654
656
|
code_challenge_method: "S256",
|
|
655
657
|
response_type: "code",
|
|
656
658
|
};
|
|
657
|
-
return `${
|
|
659
|
+
return `${D(this, $).api}/auth?${new URLSearchParams(f)}`;
|
|
658
660
|
}
|
|
659
661
|
getAuthContext() {
|
|
660
|
-
return
|
|
662
|
+
return A(this, P, k).call(this, "get", "auth/context");
|
|
661
663
|
}
|
|
662
664
|
getProfile(n) {
|
|
663
|
-
return
|
|
665
|
+
return A(this, P, k).call(this, "get", `profiles/${n}`);
|
|
664
666
|
}
|
|
665
667
|
getBalances(n) {
|
|
666
668
|
return n
|
|
667
|
-
?
|
|
668
|
-
:
|
|
669
|
+
? A(this, P, k).call(this, "get", `profiles/${n}/balances`)
|
|
670
|
+
: A(this, P, k).call(this, "get", "balances");
|
|
669
671
|
}
|
|
670
672
|
getOrders(n) {
|
|
671
673
|
const a = new URLSearchParams(n);
|
|
672
|
-
return
|
|
674
|
+
return A(this, P, k).call(this, "get", `orders?${a}`);
|
|
673
675
|
}
|
|
674
676
|
getOrder(n) {
|
|
675
|
-
return
|
|
677
|
+
return A(this, P, k).call(this, "get", `orders/${n}`);
|
|
676
678
|
}
|
|
677
679
|
getTokens() {
|
|
678
|
-
return
|
|
680
|
+
return A(this, P, k).call(this, "get", "tokens");
|
|
679
681
|
}
|
|
680
682
|
linkAddress(n, a) {
|
|
681
|
-
return
|
|
683
|
+
return A(this, P, k).call(
|
|
682
684
|
this,
|
|
683
685
|
"post",
|
|
684
686
|
`profiles/${n}/addresses`,
|
|
@@ -687,17 +689,17 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
687
689
|
}
|
|
688
690
|
placeOrder(n, a) {
|
|
689
691
|
return a
|
|
690
|
-
?
|
|
692
|
+
? A(this, P, k).call(
|
|
691
693
|
this,
|
|
692
694
|
"post",
|
|
693
695
|
`profiles/${a}/orders`,
|
|
694
696
|
JSON.stringify(n)
|
|
695
697
|
)
|
|
696
|
-
:
|
|
698
|
+
: A(this, P, k).call(this, "post", "orders", JSON.stringify(n));
|
|
697
699
|
}
|
|
698
700
|
uploadSupportingDocument(n) {
|
|
699
701
|
const a = new URLSearchParams(n);
|
|
700
|
-
return
|
|
702
|
+
return A(this, P, k).call(
|
|
701
703
|
this,
|
|
702
704
|
"post",
|
|
703
705
|
"files/supporting-document",
|
|
@@ -708,32 +710,32 @@ var P = (s, f, _) => (J(s, f, "access private method"), _);
|
|
|
708
710
|
}
|
|
709
711
|
($ = new WeakMap()),
|
|
710
712
|
(z = new WeakMap()),
|
|
711
|
-
(
|
|
712
|
-
(
|
|
713
|
-
const v = await fetch(`${
|
|
713
|
+
(P = new WeakSet()),
|
|
714
|
+
(k = async function (n, a, f, w) {
|
|
715
|
+
const v = await fetch(`${D(this, $).api}/${a}`, {
|
|
714
716
|
method: n,
|
|
715
717
|
headers: {
|
|
716
718
|
"Content-Type": `application/${
|
|
717
719
|
w ? "x-www-form-urlencoded" : "json"
|
|
718
720
|
}`,
|
|
719
|
-
Authorization:
|
|
721
|
+
Authorization: D(this, z) || "",
|
|
720
722
|
},
|
|
721
|
-
body:
|
|
723
|
+
body: f,
|
|
722
724
|
}),
|
|
723
725
|
H = await v.json();
|
|
724
726
|
if (v.ok) return H;
|
|
725
727
|
throw H;
|
|
726
728
|
}),
|
|
727
|
-
(
|
|
729
|
+
(j = new WeakSet()),
|
|
728
730
|
(ue = function (n) {
|
|
729
731
|
return n.code != null;
|
|
730
732
|
}),
|
|
731
|
-
(
|
|
732
|
-
(
|
|
733
|
+
(q = new WeakSet()),
|
|
734
|
+
(ce = function (n) {
|
|
733
735
|
return n.refresh_token != null;
|
|
734
736
|
}),
|
|
735
737
|
(F = new WeakSet()),
|
|
736
|
-
(
|
|
738
|
+
(fe = function (n) {
|
|
737
739
|
return n.client_secret != null;
|
|
738
740
|
});
|
|
739
741
|
var Z = ((r) => (
|