@opensecret/react 1.3.5 → 1.3.6
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/opensecret-react.es.js +396 -396
- package/dist/opensecret-react.umd.js +17 -17
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Oy = Object.defineProperty;
|
|
2
2
|
var _f = (r) => {
|
|
3
3
|
throw TypeError(r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var He = (r, e, t) =>
|
|
5
|
+
var Ty = (r, e, t) => e in r ? Oy(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
6
|
+
var He = (r, e, t) => Ty(r, typeof e != "symbol" ? e + "" : e, t), Mc = (r, e, t) => e.has(r) || _f("Cannot " + t);
|
|
7
7
|
var $ = (r, e, t) => (Mc(r, e, "read from private field"), t ? t.call(r) : e.get(r)), rr = (r, e, t) => e.has(r) ? _f("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), kt = (r, e, t, n) => (Mc(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), De = (r, e, t) => (Mc(r, e, "access private method"), t);
|
|
8
8
|
var Ef = (r, e, t, n) => ({
|
|
9
9
|
set _(i) {
|
|
@@ -15,7 +15,7 @@ var Ef = (r, e, t, n) => ({
|
|
|
15
15
|
});
|
|
16
16
|
import { jsx as md } from "react/jsx-runtime";
|
|
17
17
|
import { createContext as wd, useState as nl, useEffect as Os, useContext as bd } from "react";
|
|
18
|
-
class
|
|
18
|
+
class Ny {
|
|
19
19
|
constructor() {
|
|
20
20
|
He(this, "_appApiUrl", "");
|
|
21
21
|
He(this, "_platformApiUrl", "");
|
|
@@ -70,11 +70,11 @@ class Ty {
|
|
|
70
70
|
return this.isPlatformPath(e) ? "platformRefreshToken" : "refreshToken";
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
const Ho = new
|
|
73
|
+
const Ho = new Ny(), xd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74
74
|
__proto__: null,
|
|
75
75
|
apiConfig: Ho
|
|
76
76
|
}, Symbol.toStringTag, { value: "Module" })), hr = 256;
|
|
77
|
-
class
|
|
77
|
+
class Py {
|
|
78
78
|
// TODO(dchest): methods to encode chunk-by-chunk.
|
|
79
79
|
constructor(e = "=") {
|
|
80
80
|
He(this, "_paddingCharacter");
|
|
@@ -142,7 +142,7 @@ class Ny {
|
|
|
142
142
|
return t;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
const Ad = new
|
|
145
|
+
const Ad = new Py();
|
|
146
146
|
function $r(r) {
|
|
147
147
|
return Ad.encode(r);
|
|
148
148
|
}
|
|
@@ -160,10 +160,10 @@ function Cr(r) {
|
|
|
160
160
|
r[e] = 0;
|
|
161
161
|
return r;
|
|
162
162
|
}
|
|
163
|
-
const
|
|
164
|
-
function
|
|
163
|
+
const jy = 20;
|
|
164
|
+
function Ry(r, e, t) {
|
|
165
165
|
let n = 1634760805, i = 857760878, s = 2036477234, o = 1797285236, c = t[3] << 24 | t[2] << 16 | t[1] << 8 | t[0], u = t[7] << 24 | t[6] << 16 | t[5] << 8 | t[4], h = t[11] << 24 | t[10] << 16 | t[9] << 8 | t[8], m = t[15] << 24 | t[14] << 16 | t[13] << 8 | t[12], x = t[19] << 24 | t[18] << 16 | t[17] << 8 | t[16], G = t[23] << 24 | t[22] << 16 | t[21] << 8 | t[20], N = t[27] << 24 | t[26] << 16 | t[25] << 8 | t[24], v = t[31] << 24 | t[30] << 16 | t[29] << 8 | t[28], A = e[3] << 24 | e[2] << 16 | e[1] << 8 | e[0], O = e[7] << 24 | e[6] << 16 | e[5] << 8 | e[4], I = e[11] << 24 | e[10] << 16 | e[9] << 8 | e[8], P = e[15] << 24 | e[14] << 16 | e[13] << 8 | e[12], R = n, ue = i, Ge = s, Ye = o, je = c, W = u, ne = h, ie = m, xe = x, tt = G, At = N, It = v, dt = A, Qe = O, ae = I, Ee = P;
|
|
166
|
-
for (let gt = 0; gt <
|
|
166
|
+
for (let gt = 0; gt < jy; gt += 2)
|
|
167
167
|
R = R + je | 0, dt ^= R, dt = dt >>> 16 | dt << 16, xe = xe + dt | 0, je ^= xe, je = je >>> 20 | je << 12, ue = ue + W | 0, Qe ^= ue, Qe = Qe >>> 16 | Qe << 16, tt = tt + Qe | 0, W ^= tt, W = W >>> 20 | W << 12, Ge = Ge + ne | 0, ae ^= Ge, ae = ae >>> 16 | ae << 16, At = At + ae | 0, ne ^= At, ne = ne >>> 20 | ne << 12, Ye = Ye + ie | 0, Ee ^= Ye, Ee = Ee >>> 16 | Ee << 16, It = It + Ee | 0, ie ^= It, ie = ie >>> 20 | ie << 12, Ge = Ge + ne | 0, ae ^= Ge, ae = ae >>> 24 | ae << 8, At = At + ae | 0, ne ^= At, ne = ne >>> 25 | ne << 7, Ye = Ye + ie | 0, Ee ^= Ye, Ee = Ee >>> 24 | Ee << 8, It = It + Ee | 0, ie ^= It, ie = ie >>> 25 | ie << 7, ue = ue + W | 0, Qe ^= ue, Qe = Qe >>> 24 | Qe << 8, tt = tt + Qe | 0, W ^= tt, W = W >>> 25 | W << 7, R = R + je | 0, dt ^= R, dt = dt >>> 24 | dt << 8, xe = xe + dt | 0, je ^= xe, je = je >>> 25 | je << 7, R = R + W | 0, Ee ^= R, Ee = Ee >>> 16 | Ee << 16, At = At + Ee | 0, W ^= At, W = W >>> 20 | W << 12, ue = ue + ne | 0, dt ^= ue, dt = dt >>> 16 | dt << 16, It = It + dt | 0, ne ^= It, ne = ne >>> 20 | ne << 12, Ge = Ge + ie | 0, Qe ^= Ge, Qe = Qe >>> 16 | Qe << 16, xe = xe + Qe | 0, ie ^= xe, ie = ie >>> 20 | ie << 12, Ye = Ye + je | 0, ae ^= Ye, ae = ae >>> 16 | ae << 16, tt = tt + ae | 0, je ^= tt, je = je >>> 20 | je << 12, Ge = Ge + ie | 0, Qe ^= Ge, Qe = Qe >>> 24 | Qe << 8, xe = xe + Qe | 0, ie ^= xe, ie = ie >>> 25 | ie << 7, Ye = Ye + je | 0, ae ^= Ye, ae = ae >>> 24 | ae << 8, tt = tt + ae | 0, je ^= tt, je = je >>> 25 | je << 7, ue = ue + ne | 0, dt ^= ue, dt = dt >>> 24 | dt << 8, It = It + dt | 0, ne ^= It, ne = ne >>> 25 | ne << 7, R = R + W | 0, Ee ^= R, Ee = Ee >>> 24 | Ee << 8, At = At + Ee | 0, W ^= At, W = W >>> 25 | W << 7;
|
|
168
168
|
Gt(R + n | 0, r, 0), Gt(ue + i | 0, r, 4), Gt(Ge + s | 0, r, 8), Gt(Ye + o | 0, r, 12), Gt(je + c | 0, r, 16), Gt(W + u | 0, r, 20), Gt(ne + h | 0, r, 24), Gt(ie + m | 0, r, 28), Gt(xe + x | 0, r, 32), Gt(tt + G | 0, r, 36), Gt(At + N | 0, r, 40), Gt(It + v | 0, r, 44), Gt(dt + A | 0, r, 48), Gt(Qe + O | 0, r, 52), Gt(ae + I | 0, r, 56), Gt(Ee + P | 0, r, 60);
|
|
169
169
|
}
|
|
@@ -184,24 +184,24 @@ function il(r, e, t, n, i = 0) {
|
|
|
184
184
|
}
|
|
185
185
|
const c = new Uint8Array(64);
|
|
186
186
|
for (let u = 0; u < t.length; u += 64) {
|
|
187
|
-
|
|
187
|
+
Ry(c, s, r);
|
|
188
188
|
for (let h = u; h < u + 64 && h < t.length; h++)
|
|
189
189
|
n[h] = t[h] ^ c[h - u];
|
|
190
|
-
|
|
190
|
+
Uy(s, 0, o);
|
|
191
191
|
}
|
|
192
192
|
return Cr(c), i === 0 && Cr(s), n;
|
|
193
193
|
}
|
|
194
194
|
function kf(r, e, t, n = 0) {
|
|
195
195
|
return Cr(t), il(r, e, t, t, n);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Uy(r, e, t) {
|
|
198
198
|
let n = 1;
|
|
199
199
|
for (; t--; )
|
|
200
200
|
n = n + (r[e] & 255) | 0, r[e] = n & 255, n >>>= 8, e++;
|
|
201
201
|
if (n > 0)
|
|
202
202
|
throw new Error("ChaCha: counter overflow");
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function Dy(r, e) {
|
|
205
205
|
if (r.length !== e.length)
|
|
206
206
|
return 0;
|
|
207
207
|
let t = 0;
|
|
@@ -209,13 +209,13 @@ function Uy(r, e) {
|
|
|
209
209
|
t |= r[n] ^ e[n];
|
|
210
210
|
return 1 & t - 1 >>> 8;
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
return r.length === 0 || e.length === 0 ? !1 :
|
|
212
|
+
function $y(r, e) {
|
|
213
|
+
return r.length === 0 || e.length === 0 ? !1 : Dy(r, e) !== 0;
|
|
214
214
|
}
|
|
215
|
-
const
|
|
216
|
-
class
|
|
215
|
+
const My = 16;
|
|
216
|
+
class Vy {
|
|
217
217
|
constructor(e) {
|
|
218
|
-
He(this, "digestLength",
|
|
218
|
+
He(this, "digestLength", My);
|
|
219
219
|
He(this, "_buffer", new Uint8Array(16));
|
|
220
220
|
He(this, "_r", new Uint16Array(10));
|
|
221
221
|
He(this, "_h", new Uint16Array(10));
|
|
@@ -329,16 +329,16 @@ class My {
|
|
|
329
329
|
return Cr(this._buffer), Cr(this._r), Cr(this._h), Cr(this._pad), this._leftover = 0, this._fin = 0, this._finished = !0, this;
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
const
|
|
332
|
+
const Ly = 32, Hy = 12, Fy = 16, Cf = new Uint8Array(16);
|
|
333
333
|
class Tu {
|
|
334
334
|
/**
|
|
335
335
|
* Creates a new instance with the given 32-byte key.
|
|
336
336
|
*/
|
|
337
337
|
constructor(e) {
|
|
338
|
-
He(this, "nonceLength",
|
|
339
|
-
He(this, "tagLength",
|
|
338
|
+
He(this, "nonceLength", Hy);
|
|
339
|
+
He(this, "tagLength", Fy);
|
|
340
340
|
He(this, "_key");
|
|
341
|
-
if (e.length !==
|
|
341
|
+
if (e.length !== Ly)
|
|
342
342
|
throw new Error("ChaCha20Poly1305 needs 32-byte key");
|
|
343
343
|
this._key = new Uint8Array(e);
|
|
344
344
|
}
|
|
@@ -394,7 +394,7 @@ class Tu {
|
|
|
394
394
|
const o = new Uint8Array(32);
|
|
395
395
|
kf(this._key, s, o, 4);
|
|
396
396
|
const c = new Uint8Array(this.tagLength);
|
|
397
|
-
if (this._authenticate(c, o, t.subarray(0, t.length - this.tagLength), n),
|
|
397
|
+
if (this._authenticate(c, o, t.subarray(0, t.length - this.tagLength), n), !$y(c, t.subarray(t.length - this.tagLength, t.length)))
|
|
398
398
|
return null;
|
|
399
399
|
const u = t.length - this.tagLength;
|
|
400
400
|
let h;
|
|
@@ -410,7 +410,7 @@ class Tu {
|
|
|
410
410
|
return Cr(this._key), this;
|
|
411
411
|
}
|
|
412
412
|
_authenticate(e, t, n, i) {
|
|
413
|
-
const s = new
|
|
413
|
+
const s = new Vy(t);
|
|
414
414
|
i && (s.update(i), i.length % 16 > 0 && s.update(Cf.subarray(i.length % 16))), s.update(n), n.length % 16 > 0 && s.update(Cf.subarray(n.length % 16));
|
|
415
415
|
const o = new Uint8Array(8);
|
|
416
416
|
i && If(i.length, o), s.update(o), If(n.length, o), s.update(o);
|
|
@@ -421,7 +421,7 @@ class Tu {
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
const Bf = 65536;
|
|
424
|
-
class
|
|
424
|
+
class zy {
|
|
425
425
|
constructor() {
|
|
426
426
|
He(this, "isAvailable", !1);
|
|
427
427
|
He(this, "isInstantiated", !1);
|
|
@@ -436,12 +436,12 @@ class Fy {
|
|
|
436
436
|
return t;
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
const
|
|
440
|
-
function
|
|
439
|
+
const Gy = new zy();
|
|
440
|
+
function qy(r, e = Gy) {
|
|
441
441
|
return e.randomBytes(r);
|
|
442
442
|
}
|
|
443
443
|
function Sd(r, e) {
|
|
444
|
-
const t = new Tu(r), n =
|
|
444
|
+
const t = new Tu(r), n = qy(12), s = new TextEncoder().encode(e), o = t.seal(n, s), c = new Uint8Array(n.length + o.length);
|
|
445
445
|
return c.set(n), c.set(o, n.length), $r(c);
|
|
446
446
|
}
|
|
447
447
|
function _d(r, e) {
|
|
@@ -451,10 +451,10 @@ function _d(r, e) {
|
|
|
451
451
|
return new TextDecoder().decode(c);
|
|
452
452
|
}
|
|
453
453
|
var sl = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
454
|
-
function
|
|
454
|
+
function Ky(r) {
|
|
455
455
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function Zy(r) {
|
|
458
458
|
if (r.__esModule) return r;
|
|
459
459
|
var e = r.default;
|
|
460
460
|
if (typeof e == "function") {
|
|
@@ -1308,10 +1308,10 @@ var Of;
|
|
|
1308
1308
|
* SOFTWARE.
|
|
1309
1309
|
*
|
|
1310
1310
|
*/
|
|
1311
|
-
const
|
|
1311
|
+
const Wy = "[object ArrayBuffer]";
|
|
1312
1312
|
class Y {
|
|
1313
1313
|
static isArrayBuffer(e) {
|
|
1314
|
-
return Object.prototype.toString.call(e) ===
|
|
1314
|
+
return Object.prototype.toString.call(e) === Wy;
|
|
1315
1315
|
}
|
|
1316
1316
|
static toArrayBuffer(e) {
|
|
1317
1317
|
return this.isArrayBuffer(e) ? e : e.byteLength === e.buffer.byteLength || e.byteOffset === 0 && e.byteLength === e.buffer.byteLength ? e.buffer : this.toUint8Array(e.buffer).slice(e.byteOffset, e.byteOffset + e.byteLength).buffer;
|
|
@@ -1358,7 +1358,7 @@ class Y {
|
|
|
1358
1358
|
return e[e.length - 1] instanceof Function ? this.toView(i, e[e.length - 1]) : i.buffer;
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
|
-
const Vc = "string",
|
|
1361
|
+
const Vc = "string", Yy = /^[0-9a-f]+$/i, Jy = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/, Xy = /^[a-zA-Z0-9-_]+$/;
|
|
1362
1362
|
class Tf {
|
|
1363
1363
|
static fromString(e) {
|
|
1364
1364
|
const t = unescape(encodeURIComponent(e)), n = new Uint8Array(t.length);
|
|
@@ -1393,13 +1393,13 @@ class Yr {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
class de {
|
|
1395
1395
|
static isHex(e) {
|
|
1396
|
-
return typeof e === Vc &&
|
|
1396
|
+
return typeof e === Vc && Yy.test(e);
|
|
1397
1397
|
}
|
|
1398
1398
|
static isBase64(e) {
|
|
1399
|
-
return typeof e === Vc &&
|
|
1399
|
+
return typeof e === Vc && Jy.test(e);
|
|
1400
1400
|
}
|
|
1401
1401
|
static isBase64Url(e) {
|
|
1402
|
-
return typeof e === Vc &&
|
|
1402
|
+
return typeof e === Vc && Xy.test(e);
|
|
1403
1403
|
}
|
|
1404
1404
|
static ToString(e, t = "utf8") {
|
|
1405
1405
|
const n = Y.toUint8Array(e);
|
|
@@ -1560,7 +1560,7 @@ class de {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
}
|
|
1562
1562
|
de.DEFAULT_UTF8_ENCODING = "utf8";
|
|
1563
|
-
function
|
|
1563
|
+
function Qy(...r) {
|
|
1564
1564
|
const e = r.map((i) => i.byteLength).reduce((i, s) => i + s), t = new Uint8Array(e);
|
|
1565
1565
|
let n = 0;
|
|
1566
1566
|
return r.map((i) => new Uint8Array(i)).forEach((i) => {
|
|
@@ -1636,7 +1636,7 @@ function Ed() {
|
|
|
1636
1636
|
s[c] = r[c];
|
|
1637
1637
|
return s[0] &= 127, Mi(s, 8) - n;
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1639
|
+
function eg(r) {
|
|
1640
1640
|
const e = r < 0 ? r * -1 : r;
|
|
1641
1641
|
let t = 128;
|
|
1642
1642
|
for (let n = 1; n < 8; n++) {
|
|
@@ -1659,7 +1659,7 @@ function Qy(r) {
|
|
|
1659
1659
|
}
|
|
1660
1660
|
return new ArrayBuffer(0);
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function tg(r, e) {
|
|
1663
1663
|
if (r.byteLength !== e.byteLength)
|
|
1664
1664
|
return !1;
|
|
1665
1665
|
const t = new Uint8Array(r), n = new Uint8Array(e);
|
|
@@ -1741,7 +1741,7 @@ class Ha {
|
|
|
1741
1741
|
return Nu(this.items);
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
|
-
const _s = [new Uint8Array([1])], Nf = "0123456789", Lc = "name", Pf = "valueHexView",
|
|
1744
|
+
const _s = [new Uint8Array([1])], Nf = "0123456789", Lc = "name", Pf = "valueHexView", rg = "isHexOnly", ng = "idBlock", ig = "tagClass", sg = "tagNumber", og = "isConstructed", ag = "fromBER", cg = "toBER", lg = "local", yr = "", qr = new ArrayBuffer(0), Fa = new Uint8Array(0), Us = "EndOfContent", Id = "OCTET STRING", kd = "BIT STRING";
|
|
1745
1745
|
function fn(r) {
|
|
1746
1746
|
var e;
|
|
1747
1747
|
return e = class extends r {
|
|
@@ -2033,7 +2033,7 @@ class Jt extends Ei {
|
|
|
2033
2033
|
if (!(e instanceof this.constructor))
|
|
2034
2034
|
return !1;
|
|
2035
2035
|
const t = this.toBER(), n = e.toBER();
|
|
2036
|
-
return
|
|
2036
|
+
return tg(t, n);
|
|
2037
2037
|
}
|
|
2038
2038
|
}
|
|
2039
2039
|
Jt.NAME = "BaseBlock";
|
|
@@ -2077,7 +2077,7 @@ class fo extends Jt {
|
|
|
2077
2077
|
Nd = fo;
|
|
2078
2078
|
ce.Primitive = Nd;
|
|
2079
2079
|
fo.NAME = "PRIMITIVE";
|
|
2080
|
-
function
|
|
2080
|
+
function ug(r, e) {
|
|
2081
2081
|
if (r instanceof e)
|
|
2082
2082
|
return r;
|
|
2083
2083
|
const t = new e();
|
|
@@ -2234,7 +2234,7 @@ function ns(r, e = 0, t = r.length) {
|
|
|
2234
2234
|
default:
|
|
2235
2235
|
u = i.idBlock.isConstructed ? ce.Constructed : ce.Primitive;
|
|
2236
2236
|
}
|
|
2237
|
-
return i =
|
|
2237
|
+
return i = ug(i, u), c = i.fromBER(r, e, i.lenBlock.isIndefiniteForm ? t : i.lenBlock.length), i.valueBeforeDecodeView = r.subarray(n, n + i.blockLength), {
|
|
2238
2238
|
offset: c,
|
|
2239
2239
|
result: i
|
|
2240
2240
|
};
|
|
@@ -2249,7 +2249,7 @@ function Ui(r) {
|
|
|
2249
2249
|
}
|
|
2250
2250
|
return ns(Y.toUint8Array(r).slice(), 0, r.byteLength);
|
|
2251
2251
|
}
|
|
2252
|
-
function
|
|
2252
|
+
function fg(r, e) {
|
|
2253
2253
|
return r ? 1 : e;
|
|
2254
2254
|
}
|
|
2255
2255
|
class Vn extends fr {
|
|
@@ -2263,7 +2263,7 @@ class Vn extends fr {
|
|
|
2263
2263
|
if (this.valueBeforeDecodeView = i.subarray(t, t + n), this.valueBeforeDecodeView.length === 0)
|
|
2264
2264
|
return this.warnings.push("Zero buffer length"), t;
|
|
2265
2265
|
let s = t;
|
|
2266
|
-
for (;
|
|
2266
|
+
for (; fg(this.isIndefiniteForm, n) > 0; ) {
|
|
2267
2267
|
const o = ns(i, s, n);
|
|
2268
2268
|
if (o.offset === -1)
|
|
2269
2269
|
return this.error = o.result.error, this.warnings.concat(o.result.warnings), -1;
|
|
@@ -2581,7 +2581,7 @@ Fd = oi;
|
|
|
2581
2581
|
ce.BitString = Fd;
|
|
2582
2582
|
oi.NAME = kd;
|
|
2583
2583
|
var zd;
|
|
2584
|
-
function
|
|
2584
|
+
function hg(r, e) {
|
|
2585
2585
|
const t = new Uint8Array([0]), n = new Uint8Array(r), i = new Uint8Array(e);
|
|
2586
2586
|
let s = n.slice(0);
|
|
2587
2587
|
const o = s.length - 1, c = i.slice(0), u = c.length - 1;
|
|
@@ -2619,7 +2619,7 @@ function jf(r) {
|
|
|
2619
2619
|
}
|
|
2620
2620
|
return _s[r];
|
|
2621
2621
|
}
|
|
2622
|
-
function
|
|
2622
|
+
function dg(r, e) {
|
|
2623
2623
|
let t = 0;
|
|
2624
2624
|
const n = new Uint8Array(r), i = new Uint8Array(e), s = n.slice(0), o = s.length - 1, c = i.slice(0), u = c.length - 1;
|
|
2625
2625
|
let h, m = 0;
|
|
@@ -2649,7 +2649,7 @@ class Ru extends fn(fr) {
|
|
|
2649
2649
|
this.valueHexView.length >= 4 ? (this.warnings.push("Too big Integer for decoding, hex only"), this.isHexOnly = !0, this._valueDec = 0) : (this.isHexOnly = !1, this.valueHexView.length > 0 && (this._valueDec = Ed.call(this)));
|
|
2650
2650
|
}
|
|
2651
2651
|
set valueDec(e) {
|
|
2652
|
-
this._valueDec = e, this.isHexOnly = !1, this.valueHexView = new Uint8Array(
|
|
2652
|
+
this._valueDec = e, this.isHexOnly = !1, this.valueHexView = new Uint8Array(eg(e));
|
|
2653
2653
|
}
|
|
2654
2654
|
get valueDec() {
|
|
2655
2655
|
return this._valueDec;
|
|
@@ -2700,10 +2700,10 @@ class Ru extends fn(fr) {
|
|
|
2700
2700
|
if ((i & 1) === 1)
|
|
2701
2701
|
switch (n) {
|
|
2702
2702
|
case e:
|
|
2703
|
-
t =
|
|
2703
|
+
t = dg(jf(n), t), o = "-";
|
|
2704
2704
|
break;
|
|
2705
2705
|
default:
|
|
2706
|
-
t =
|
|
2706
|
+
t = hg(t, jf(n));
|
|
2707
2707
|
}
|
|
2708
2708
|
n++, i >>= 1;
|
|
2709
2709
|
}
|
|
@@ -3521,7 +3521,7 @@ class Go extends ui {
|
|
|
3521
3521
|
super(n), this.value = e, this.local = t;
|
|
3522
3522
|
}
|
|
3523
3523
|
}
|
|
3524
|
-
class
|
|
3524
|
+
class pg {
|
|
3525
3525
|
constructor({ data: e = Fa } = {}) {
|
|
3526
3526
|
this.dataView = Y.toUint8Array(e);
|
|
3527
3527
|
}
|
|
@@ -3577,17 +3577,17 @@ function ri(r, e, t) {
|
|
|
3577
3577
|
verified: !1,
|
|
3578
3578
|
result: { error: "Wrong ASN.1 schema" }
|
|
3579
3579
|
};
|
|
3580
|
-
if (!(
|
|
3580
|
+
if (!(ng in t))
|
|
3581
3581
|
return {
|
|
3582
3582
|
verified: !1,
|
|
3583
3583
|
result: { error: "Wrong ASN.1 schema" }
|
|
3584
3584
|
};
|
|
3585
|
-
if (!(
|
|
3585
|
+
if (!(ag in t.idBlock))
|
|
3586
3586
|
return {
|
|
3587
3587
|
verified: !1,
|
|
3588
3588
|
result: { error: "Wrong ASN.1 schema" }
|
|
3589
3589
|
};
|
|
3590
|
-
if (!(
|
|
3590
|
+
if (!(cg in t.idBlock))
|
|
3591
3591
|
return {
|
|
3592
3592
|
verified: !1,
|
|
3593
3593
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3603,7 +3603,7 @@ function ri(r, e, t) {
|
|
|
3603
3603
|
verified: !1,
|
|
3604
3604
|
result: { error: "Error decoding idBlock for ASN.1 schema" }
|
|
3605
3605
|
};
|
|
3606
|
-
if (t.idBlock.hasOwnProperty(
|
|
3606
|
+
if (t.idBlock.hasOwnProperty(ig) === !1)
|
|
3607
3607
|
return {
|
|
3608
3608
|
verified: !1,
|
|
3609
3609
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3613,7 +3613,7 @@ function ri(r, e, t) {
|
|
|
3613
3613
|
verified: !1,
|
|
3614
3614
|
result: r
|
|
3615
3615
|
};
|
|
3616
|
-
if (t.idBlock.hasOwnProperty(
|
|
3616
|
+
if (t.idBlock.hasOwnProperty(sg) === !1)
|
|
3617
3617
|
return {
|
|
3618
3618
|
verified: !1,
|
|
3619
3619
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3623,7 +3623,7 @@ function ri(r, e, t) {
|
|
|
3623
3623
|
verified: !1,
|
|
3624
3624
|
result: r
|
|
3625
3625
|
};
|
|
3626
|
-
if (t.idBlock.hasOwnProperty(
|
|
3626
|
+
if (t.idBlock.hasOwnProperty(og) === !1)
|
|
3627
3627
|
return {
|
|
3628
3628
|
verified: !1,
|
|
3629
3629
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3633,7 +3633,7 @@ function ri(r, e, t) {
|
|
|
3633
3633
|
verified: !1,
|
|
3634
3634
|
result: r
|
|
3635
3635
|
};
|
|
3636
|
-
if (!(
|
|
3636
|
+
if (!(rg in t.idBlock))
|
|
3637
3637
|
return {
|
|
3638
3638
|
verified: !1,
|
|
3639
3639
|
result: { error: "Wrong ASN.1 schema" }
|
|
@@ -3703,7 +3703,7 @@ function ri(r, e, t) {
|
|
|
3703
3703
|
return t.name && (t.name = t.name.replace(/^\s+|\s+$/g, yr), t.name && delete r[t.name]), o;
|
|
3704
3704
|
if (Lc in t.valueBlock.value[0] && t.valueBlock.value[0].name.length > 0) {
|
|
3705
3705
|
let h = {};
|
|
3706
|
-
|
|
3706
|
+
lg in t.valueBlock.value[0] && t.valueBlock.value[0].local ? h = e : h = r, typeof h[t.valueBlock.value[0].name] > "u" && (h[t.valueBlock.value[0].name] = []), h[t.valueBlock.value[0].name].push(e.valueBlock.value[u]);
|
|
3707
3707
|
}
|
|
3708
3708
|
} else if (o = ri(r, e.valueBlock.value[u - s], t.valueBlock.value[u]), o.verified === !1)
|
|
3709
3709
|
if (t.valueBlock.value[u].optional)
|
|
@@ -3738,7 +3738,7 @@ function ri(r, e, t) {
|
|
|
3738
3738
|
result: r
|
|
3739
3739
|
};
|
|
3740
3740
|
}
|
|
3741
|
-
function
|
|
3741
|
+
function yg(r, e) {
|
|
3742
3742
|
if (!(e instanceof Object))
|
|
3743
3743
|
return {
|
|
3744
3744
|
verified: !1,
|
|
@@ -3778,7 +3778,7 @@ const Sp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3778
3778
|
OctetString: si,
|
|
3779
3779
|
Primitive: fo,
|
|
3780
3780
|
PrintableString: Ya,
|
|
3781
|
-
RawData:
|
|
3781
|
+
RawData: pg,
|
|
3782
3782
|
RelativeObjectIdentifier: Uu,
|
|
3783
3783
|
Repeated: Go,
|
|
3784
3784
|
Sequence: mn,
|
|
@@ -3795,7 +3795,7 @@ const Sp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3795
3795
|
VisibleString: ho,
|
|
3796
3796
|
compareSchema: ri,
|
|
3797
3797
|
fromBER: Ui,
|
|
3798
|
-
verifySchema:
|
|
3798
|
+
verifySchema: yg
|
|
3799
3799
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3800
3800
|
var M;
|
|
3801
3801
|
(function(r) {
|
|
@@ -3867,7 +3867,7 @@ class it {
|
|
|
3867
3867
|
return new si({ name: e });
|
|
3868
3868
|
}
|
|
3869
3869
|
}
|
|
3870
|
-
const
|
|
3870
|
+
const gg = {
|
|
3871
3871
|
fromASN: (r) => r instanceof li ? null : r.valueBeforeDecodeView,
|
|
3872
3872
|
toASN: (r) => {
|
|
3873
3873
|
if (r === null)
|
|
@@ -3877,28 +3877,28 @@ const yg = {
|
|
|
3877
3877
|
throw new Error(e.result.error);
|
|
3878
3878
|
return e.result;
|
|
3879
3879
|
}
|
|
3880
|
-
},
|
|
3880
|
+
}, vg = {
|
|
3881
3881
|
fromASN: (r) => r.valueBlock.valueHexView.byteLength >= 4 ? r.valueBlock.toString() : r.valueBlock.valueDec,
|
|
3882
3882
|
toASN: (r) => new nn({ value: +r })
|
|
3883
|
-
},
|
|
3883
|
+
}, mg = {
|
|
3884
3884
|
fromASN: (r) => r.valueBlock.valueDec,
|
|
3885
3885
|
toASN: (r) => new Ga({ value: r })
|
|
3886
3886
|
}, xt = {
|
|
3887
3887
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3888
3888
|
toASN: (r) => new nn({ valueHex: r })
|
|
3889
|
-
},
|
|
3889
|
+
}, wg = {
|
|
3890
3890
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3891
3891
|
toASN: (r) => new oi({ valueHex: r })
|
|
3892
|
-
},
|
|
3892
|
+
}, bg = {
|
|
3893
3893
|
fromASN: (r) => r.valueBlock.toString(),
|
|
3894
3894
|
toASN: (r) => new qa({ value: r })
|
|
3895
|
-
},
|
|
3895
|
+
}, xg = {
|
|
3896
3896
|
fromASN: (r) => r.valueBlock.value,
|
|
3897
3897
|
toASN: (r) => new za({ value: r })
|
|
3898
3898
|
}, qo = {
|
|
3899
3899
|
fromASN: (r) => r.valueBlock.valueHexView,
|
|
3900
3900
|
toASN: (r) => new si({ valueHex: r })
|
|
3901
|
-
},
|
|
3901
|
+
}, Ag = {
|
|
3902
3902
|
fromASN: (r) => new it(r.getValue()),
|
|
3903
3903
|
toASN: (r) => r.toASN()
|
|
3904
3904
|
};
|
|
@@ -3908,62 +3908,62 @@ function Tr(r) {
|
|
|
3908
3908
|
toASN: (e) => new r({ value: e })
|
|
3909
3909
|
};
|
|
3910
3910
|
}
|
|
3911
|
-
const _p = Tr(kn),
|
|
3911
|
+
const _p = Tr(kn), Sg = Tr(Ka), _g = Tr(Za), Eg = Tr(Wa), Ig = Tr(Ya), kg = Tr(Ja), Cg = Tr(Xa), Bg = Tr(Qa), Og = Tr(ec), Tg = Tr(ho), Ng = Tr(tc), Pg = Tr(rc), jg = {
|
|
3912
3912
|
fromASN: (r) => r.toDate(),
|
|
3913
3913
|
toASN: (r) => new po({ valueDate: r })
|
|
3914
|
-
},
|
|
3914
|
+
}, Rg = {
|
|
3915
3915
|
fromASN: (r) => r.toDate(),
|
|
3916
3916
|
toASN: (r) => new nc({ valueDate: r })
|
|
3917
|
-
},
|
|
3917
|
+
}, Ug = {
|
|
3918
3918
|
fromASN: () => null,
|
|
3919
3919
|
toASN: () => new li()
|
|
3920
3920
|
};
|
|
3921
3921
|
function Fu(r) {
|
|
3922
3922
|
switch (r) {
|
|
3923
3923
|
case b.Any:
|
|
3924
|
-
return
|
|
3924
|
+
return gg;
|
|
3925
3925
|
case b.BitString:
|
|
3926
|
-
return
|
|
3926
|
+
return wg;
|
|
3927
3927
|
case b.BmpString:
|
|
3928
|
-
return
|
|
3928
|
+
return Sg;
|
|
3929
3929
|
case b.Boolean:
|
|
3930
|
-
return
|
|
3930
|
+
return xg;
|
|
3931
3931
|
case b.CharacterString:
|
|
3932
|
-
return
|
|
3932
|
+
return Pg;
|
|
3933
3933
|
case b.Enumerated:
|
|
3934
|
-
return
|
|
3934
|
+
return mg;
|
|
3935
3935
|
case b.GeneralString:
|
|
3936
|
-
return
|
|
3936
|
+
return Ng;
|
|
3937
3937
|
case b.GeneralizedTime:
|
|
3938
|
-
return
|
|
3938
|
+
return Rg;
|
|
3939
3939
|
case b.GraphicString:
|
|
3940
|
-
return
|
|
3940
|
+
return Og;
|
|
3941
3941
|
case b.IA5String:
|
|
3942
|
-
return
|
|
3942
|
+
return Bg;
|
|
3943
3943
|
case b.Integer:
|
|
3944
|
-
return
|
|
3944
|
+
return vg;
|
|
3945
3945
|
case b.Null:
|
|
3946
|
-
return
|
|
3946
|
+
return Ug;
|
|
3947
3947
|
case b.NumericString:
|
|
3948
|
-
return
|
|
3948
|
+
return Eg;
|
|
3949
3949
|
case b.ObjectIdentifier:
|
|
3950
|
-
return
|
|
3950
|
+
return bg;
|
|
3951
3951
|
case b.OctetString:
|
|
3952
3952
|
return qo;
|
|
3953
3953
|
case b.PrintableString:
|
|
3954
|
-
return Eg;
|
|
3955
|
-
case b.TeletexString:
|
|
3956
3954
|
return Ig;
|
|
3955
|
+
case b.TeletexString:
|
|
3956
|
+
return kg;
|
|
3957
3957
|
case b.UTCTime:
|
|
3958
|
-
return
|
|
3958
|
+
return jg;
|
|
3959
3959
|
case b.UniversalString:
|
|
3960
|
-
return
|
|
3960
|
+
return _g;
|
|
3961
3961
|
case b.Utf8String:
|
|
3962
3962
|
return _p;
|
|
3963
3963
|
case b.VideotexString:
|
|
3964
|
-
return
|
|
3964
|
+
return Cg;
|
|
3965
3965
|
case b.VisibleString:
|
|
3966
|
-
return
|
|
3966
|
+
return Tg;
|
|
3967
3967
|
default:
|
|
3968
3968
|
return null;
|
|
3969
3969
|
}
|
|
@@ -3979,7 +3979,7 @@ function Ep(r) {
|
|
|
3979
3979
|
}
|
|
3980
3980
|
return !1;
|
|
3981
3981
|
}
|
|
3982
|
-
function
|
|
3982
|
+
function Dg(r, e) {
|
|
3983
3983
|
if (!(r && e) || r.byteLength !== e.byteLength)
|
|
3984
3984
|
return !1;
|
|
3985
3985
|
const t = new Uint8Array(r), n = new Uint8Array(e);
|
|
@@ -3988,7 +3988,7 @@ function Ug(r, e) {
|
|
|
3988
3988
|
return !1;
|
|
3989
3989
|
return !0;
|
|
3990
3990
|
}
|
|
3991
|
-
class
|
|
3991
|
+
class $g {
|
|
3992
3992
|
constructor() {
|
|
3993
3993
|
this.items = /* @__PURE__ */ new WeakMap();
|
|
3994
3994
|
}
|
|
@@ -4096,7 +4096,7 @@ class Dg {
|
|
|
4096
4096
|
return t ? this.items.get(t) || this.findParentSchema(t) : null;
|
|
4097
4097
|
}
|
|
4098
4098
|
}
|
|
4099
|
-
const Br = new
|
|
4099
|
+
const Br = new $g(), H = (r) => (e) => {
|
|
4100
4100
|
let t;
|
|
4101
4101
|
Br.has(e) ? t = Br.get(e) : (t = Br.createDefault(e), Br.set(e, t)), Object.assign(t, r);
|
|
4102
4102
|
}, y = (r) => (e, t) => {
|
|
@@ -4116,7 +4116,7 @@ class Rf extends Error {
|
|
|
4116
4116
|
super(...arguments), this.schemas = [];
|
|
4117
4117
|
}
|
|
4118
4118
|
}
|
|
4119
|
-
class
|
|
4119
|
+
class Mg {
|
|
4120
4120
|
static parse(e, t) {
|
|
4121
4121
|
const n = Ui(e);
|
|
4122
4122
|
if (n.result.error)
|
|
@@ -4234,7 +4234,7 @@ class zu {
|
|
|
4234
4234
|
} else
|
|
4235
4235
|
for (const o in n.items) {
|
|
4236
4236
|
const c = n.items[o], u = e[o];
|
|
4237
|
-
if (u === void 0 || c.defaultValue === u || typeof c.defaultValue == "object" && typeof u == "object" &&
|
|
4237
|
+
if (u === void 0 || c.defaultValue === u || typeof c.defaultValue == "object" && typeof u == "object" && Dg(this.serialize(c.defaultValue), this.serialize(u)))
|
|
4238
4238
|
continue;
|
|
4239
4239
|
const h = zu.toAsnItem(c, o, t, u);
|
|
4240
4240
|
if (typeof c.context == "number")
|
|
@@ -4328,7 +4328,7 @@ class K {
|
|
|
4328
4328
|
return zu.serialize(e);
|
|
4329
4329
|
}
|
|
4330
4330
|
static parse(e, t) {
|
|
4331
|
-
return
|
|
4331
|
+
return Mg.parse(e, t);
|
|
4332
4332
|
}
|
|
4333
4333
|
static toString(e) {
|
|
4334
4334
|
const t = Y.isBufferSource(e) ? Y.toArrayBuffer(e) : K.serialize(e), n = Ui(t);
|
|
@@ -4939,7 +4939,7 @@ let Ht = fl = class extends hl {
|
|
|
4939
4939
|
Ht = fl = f([
|
|
4940
4940
|
H({ type: M.Sequence })
|
|
4941
4941
|
], Ht);
|
|
4942
|
-
const
|
|
4942
|
+
const Vg = {
|
|
4943
4943
|
fromASN: (r) => Df.toString(qo.fromASN(r)),
|
|
4944
4944
|
toASN: (r) => qo.toASN(Df.fromString(r))
|
|
4945
4945
|
};
|
|
@@ -4992,7 +4992,7 @@ f([
|
|
|
4992
4992
|
y({ type: b.IA5String, context: 6, implicit: !0 })
|
|
4993
4993
|
], $e.prototype, "uniformResourceIdentifier", void 0);
|
|
4994
4994
|
f([
|
|
4995
|
-
y({ type: b.OctetString, context: 7, implicit: !0, converter:
|
|
4995
|
+
y({ type: b.OctetString, context: 7, implicit: !0, converter: Vg })
|
|
4996
4996
|
], $e.prototype, "iPAddress", void 0);
|
|
4997
4997
|
f([
|
|
4998
4998
|
y({ type: b.ObjectIdentifier, context: 8, implicit: !0 })
|
|
@@ -5000,9 +5000,9 @@ f([
|
|
|
5000
5000
|
$e = f([
|
|
5001
5001
|
H({ type: M.Choice })
|
|
5002
5002
|
], $e);
|
|
5003
|
-
const qu = "1.3.6.1.5.5.7",
|
|
5003
|
+
const qu = "1.3.6.1.5.5.7", Lg = `${qu}.1`, is = `${qu}.3`, oc = `${qu}.48`, $f = `${oc}.1`, Mf = `${oc}.2`, Vf = `${oc}.3`, Lf = `${oc}.5`, Yn = "2.5.29";
|
|
5004
5004
|
var dl;
|
|
5005
|
-
const pl = `${
|
|
5005
|
+
const pl = `${Lg}.1`;
|
|
5006
5006
|
class yo {
|
|
5007
5007
|
constructor(e = {}) {
|
|
5008
5008
|
this.accessMethod = "", this.accessLocation = new $e(), Object.assign(this, e);
|
|
@@ -5297,7 +5297,7 @@ let Xo = Al = class extends yt {
|
|
|
5297
5297
|
Xo = Al = f([
|
|
5298
5298
|
H({ type: M.Sequence, itemType: b.ObjectIdentifier })
|
|
5299
5299
|
], Xo);
|
|
5300
|
-
const
|
|
5300
|
+
const Hg = `${is}.1`, Fg = `${is}.2`, zg = `${is}.3`, Gg = `${is}.4`, qg = `${is}.8`, Kg = `${is}.9`;
|
|
5301
5301
|
let Sl = class {
|
|
5302
5302
|
constructor(e = new ArrayBuffer(0)) {
|
|
5303
5303
|
this.value = e;
|
|
@@ -6218,7 +6218,7 @@ f([
|
|
|
6218
6218
|
y({ type: it, context: 0, implicit: !0, optional: !0 })
|
|
6219
6219
|
], Vs.prototype, "value", void 0);
|
|
6220
6220
|
f([
|
|
6221
|
-
y({ type: it, converter:
|
|
6221
|
+
y({ type: it, converter: Ag, context: 0, implicit: !0, optional: !0, repeated: "sequence" })
|
|
6222
6222
|
], Vs.prototype, "constructedValue", void 0);
|
|
6223
6223
|
Vs = f([
|
|
6224
6224
|
H({ type: M.Choice })
|
|
@@ -6537,7 +6537,7 @@ f([
|
|
|
6537
6537
|
f([
|
|
6538
6538
|
y({ type: Kl, context: 1, implicit: !0, optional: !0 })
|
|
6539
6539
|
], Ao.prototype, "unprotectedAttrs", void 0);
|
|
6540
|
-
const
|
|
6540
|
+
const Zg = "1.2.840.113549.1.7.1", Zl = "1.2.840.113549.1.7.2";
|
|
6541
6541
|
var Wl;
|
|
6542
6542
|
let la = Wl = class extends yt {
|
|
6543
6543
|
constructor(e) {
|
|
@@ -6574,9 +6574,9 @@ const Ls = "1.2.840.10045.2.1", ff = "1.2.840.10045.4.1", Vp = "1.2.840.10045.4.
|
|
|
6574
6574
|
function So(r) {
|
|
6575
6575
|
return new oe({ algorithm: r });
|
|
6576
6576
|
}
|
|
6577
|
-
const
|
|
6577
|
+
const Wg = So(ff);
|
|
6578
6578
|
So(Vp);
|
|
6579
|
-
const
|
|
6579
|
+
const Yg = So(hf), Jg = So(df), Xg = So(pf);
|
|
6580
6580
|
let Hs = class {
|
|
6581
6581
|
constructor(e = {}) {
|
|
6582
6582
|
Object.assign(this, e);
|
|
@@ -6591,7 +6591,7 @@ f([
|
|
|
6591
6591
|
Hs = f([
|
|
6592
6592
|
H({ type: M.Sequence })
|
|
6593
6593
|
], Hs);
|
|
6594
|
-
class
|
|
6594
|
+
class Qg extends it {
|
|
6595
6595
|
}
|
|
6596
6596
|
let Wi = class {
|
|
6597
6597
|
constructor(e = {}) {
|
|
@@ -6629,7 +6629,7 @@ f([
|
|
|
6629
6629
|
y({ type: Wi })
|
|
6630
6630
|
], _n.prototype, "curve", void 0);
|
|
6631
6631
|
f([
|
|
6632
|
-
y({ type:
|
|
6632
|
+
y({ type: Qg })
|
|
6633
6633
|
], _n.prototype, "base", void 0);
|
|
6634
6634
|
f([
|
|
6635
6635
|
y({ type: b.Integer, converter: xt })
|
|
@@ -6685,29 +6685,29 @@ f([
|
|
|
6685
6685
|
f([
|
|
6686
6686
|
y({ type: b.Integer, converter: xt })
|
|
6687
6687
|
], ua.prototype, "s", void 0);
|
|
6688
|
-
const wr = "1.2.840.113549.1.1", gi = `${wr}.1`,
|
|
6688
|
+
const wr = "1.2.840.113549.1.1", gi = `${wr}.1`, ev = `${wr}.7`, tv = `${wr}.9`, Ps = `${wr}.10`, rv = `${wr}.2`, nv = `${wr}.4`, fa = `${wr}.5`, iv = `${wr}.14`, Jl = `${wr}.11`, ha = `${wr}.12`, da = `${wr}.13`, Lp = `${wr}.15`, Hp = `${wr}.16`, pa = "1.3.14.3.2.26", Fp = "2.16.840.1.101.3.4.2.4", ya = "2.16.840.1.101.3.4.2.1", ga = "2.16.840.1.101.3.4.2.2", va = "2.16.840.1.101.3.4.2.3", sv = "2.16.840.1.101.3.4.2.5", ov = "2.16.840.1.101.3.4.2.6", av = "1.2.840.113549.2.2", cv = "1.2.840.113549.2.5", Ac = `${wr}.8`;
|
|
6689
6689
|
function Ft(r) {
|
|
6690
6690
|
return new oe({ algorithm: r, parameters: null });
|
|
6691
6691
|
}
|
|
6692
|
-
Ft(ov);
|
|
6693
6692
|
Ft(av);
|
|
6693
|
+
Ft(cv);
|
|
6694
6694
|
const vi = Ft(pa);
|
|
6695
6695
|
Ft(Fp);
|
|
6696
6696
|
Ft(ya);
|
|
6697
6697
|
Ft(ga);
|
|
6698
6698
|
Ft(va);
|
|
6699
|
-
Ft(iv);
|
|
6700
6699
|
Ft(sv);
|
|
6700
|
+
Ft(ov);
|
|
6701
6701
|
const zp = new oe({
|
|
6702
6702
|
algorithm: Ac,
|
|
6703
6703
|
parameters: K.serialize(vi)
|
|
6704
6704
|
}), Gp = new oe({
|
|
6705
|
-
algorithm:
|
|
6705
|
+
algorithm: tv,
|
|
6706
6706
|
parameters: K.serialize(qo.toASN(new Uint8Array([218, 57, 163, 238, 94, 107, 75, 13, 50, 85, 191, 239, 149, 96, 24, 144, 175, 216, 7, 9]).buffer))
|
|
6707
6707
|
});
|
|
6708
6708
|
Ft(gi);
|
|
6709
|
-
Ft(tv);
|
|
6710
6709
|
Ft(rv);
|
|
6710
|
+
Ft(nv);
|
|
6711
6711
|
Ft(fa);
|
|
6712
6712
|
Ft(Lp);
|
|
6713
6713
|
Ft(Hp);
|
|
@@ -6733,7 +6733,7 @@ f([
|
|
|
6733
6733
|
y({ type: oe, context: 2, defaultValue: Gp })
|
|
6734
6734
|
], Sc.prototype, "pSourceAlgorithm", void 0);
|
|
6735
6735
|
new oe({
|
|
6736
|
-
algorithm:
|
|
6736
|
+
algorithm: ev,
|
|
6737
6737
|
parameters: K.serialize(new Sc())
|
|
6738
6738
|
});
|
|
6739
6739
|
class mi {
|
|
@@ -6873,7 +6873,7 @@ function gf(r, e) {
|
|
|
6873
6873
|
}
|
|
6874
6874
|
r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
|
|
6875
6875
|
}
|
|
6876
|
-
function
|
|
6876
|
+
function lv(r, e, t, n) {
|
|
6877
6877
|
function i(s) {
|
|
6878
6878
|
return s instanceof t ? s : new t(function(o) {
|
|
6879
6879
|
o(s);
|
|
@@ -6900,7 +6900,7 @@ function cv(r, e, t, n) {
|
|
|
6900
6900
|
h((n = n.apply(r, [])).next());
|
|
6901
6901
|
});
|
|
6902
6902
|
}
|
|
6903
|
-
function
|
|
6903
|
+
function uv(r, e) {
|
|
6904
6904
|
var t = { label: 0, sent: function() {
|
|
6905
6905
|
if (s[0] & 1) throw s[1];
|
|
6906
6906
|
return s[1];
|
|
@@ -6992,9 +6992,9 @@ function ti() {
|
|
|
6992
6992
|
r = r.concat(ma(arguments[e]));
|
|
6993
6993
|
return r;
|
|
6994
6994
|
}
|
|
6995
|
-
var
|
|
6996
|
-
function
|
|
6997
|
-
var e = Reflect.getMetadata("design:paramtypes", r) || [], t = Reflect.getOwnMetadata(
|
|
6995
|
+
var fv = "injectionTokens";
|
|
6996
|
+
function hv(r) {
|
|
6997
|
+
var e = Reflect.getMetadata("design:paramtypes", r) || [], t = Reflect.getOwnMetadata(fv, r) || {};
|
|
6998
6998
|
return Object.keys(t).forEach(function(n) {
|
|
6999
6999
|
e[+n] = t[n];
|
|
7000
7000
|
}), e;
|
|
@@ -7042,13 +7042,13 @@ var Kp = function() {
|
|
|
7042
7042
|
function Ni(r) {
|
|
7043
7043
|
return typeof r == "string" || typeof r == "symbol";
|
|
7044
7044
|
}
|
|
7045
|
-
function
|
|
7045
|
+
function dv(r) {
|
|
7046
7046
|
return typeof r == "object" && "token" in r && "multiple" in r;
|
|
7047
7047
|
}
|
|
7048
7048
|
function rh(r) {
|
|
7049
7049
|
return typeof r == "object" && "token" in r && "transform" in r;
|
|
7050
7050
|
}
|
|
7051
|
-
function
|
|
7051
|
+
function pv(r) {
|
|
7052
7052
|
return typeof r == "function" || r instanceof Kp;
|
|
7053
7053
|
}
|
|
7054
7054
|
function Do(r) {
|
|
@@ -7057,7 +7057,7 @@ function Do(r) {
|
|
|
7057
7057
|
function $o(r) {
|
|
7058
7058
|
return r.useValue != null;
|
|
7059
7059
|
}
|
|
7060
|
-
function
|
|
7060
|
+
function yv(r) {
|
|
7061
7061
|
return qp(r) || $o(r) || Do(r) || ru(r);
|
|
7062
7062
|
}
|
|
7063
7063
|
var vf = function() {
|
|
@@ -7083,7 +7083,7 @@ var vf = function() {
|
|
|
7083
7083
|
}, r.prototype.ensure = function(e) {
|
|
7084
7084
|
this._registryMap.has(e) || this._registryMap.set(e, []);
|
|
7085
7085
|
}, r;
|
|
7086
|
-
}(),
|
|
7086
|
+
}(), gv = function(r) {
|
|
7087
7087
|
gf(e, r);
|
|
7088
7088
|
function e() {
|
|
7089
7089
|
return r !== null && r.apply(this, arguments) || this;
|
|
@@ -7095,54 +7095,54 @@ var vf = function() {
|
|
|
7095
7095
|
}
|
|
7096
7096
|
return r;
|
|
7097
7097
|
}();
|
|
7098
|
-
function
|
|
7098
|
+
function vv(r, e) {
|
|
7099
7099
|
if (r === null)
|
|
7100
7100
|
return "at position #" + e;
|
|
7101
7101
|
var t = r.split(",")[e].trim();
|
|
7102
7102
|
return '"' + t + '" at position #' + e;
|
|
7103
7103
|
}
|
|
7104
|
-
function
|
|
7104
|
+
function mv(r, e, t) {
|
|
7105
7105
|
return t === void 0 && (t = " "), ti([r], e.message.split(`
|
|
7106
7106
|
`).map(function(n) {
|
|
7107
7107
|
return t + n;
|
|
7108
7108
|
})).join(`
|
|
7109
7109
|
`);
|
|
7110
7110
|
}
|
|
7111
|
-
function
|
|
7112
|
-
var n = ma(r.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), i = n[1], s = i === void 0 ? null : i, o =
|
|
7113
|
-
return
|
|
7111
|
+
function wv(r, e, t) {
|
|
7112
|
+
var n = ma(r.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), i = n[1], s = i === void 0 ? null : i, o = vv(s, e);
|
|
7113
|
+
return mv("Cannot inject the dependency " + o + ' of "' + r.name + '" constructor. Reason:', t);
|
|
7114
7114
|
}
|
|
7115
|
-
function
|
|
7115
|
+
function bv(r) {
|
|
7116
7116
|
if (typeof r.dispose != "function")
|
|
7117
7117
|
return !1;
|
|
7118
7118
|
var e = r.dispose;
|
|
7119
7119
|
return !(e.length > 0);
|
|
7120
7120
|
}
|
|
7121
|
-
var
|
|
7121
|
+
var xv = function(r) {
|
|
7122
7122
|
gf(e, r);
|
|
7123
7123
|
function e() {
|
|
7124
7124
|
return r !== null && r.apply(this, arguments) || this;
|
|
7125
7125
|
}
|
|
7126
7126
|
return e;
|
|
7127
|
-
}(vf),
|
|
7127
|
+
}(vf), Av = function(r) {
|
|
7128
7128
|
gf(e, r);
|
|
7129
7129
|
function e() {
|
|
7130
7130
|
return r !== null && r.apply(this, arguments) || this;
|
|
7131
7131
|
}
|
|
7132
7132
|
return e;
|
|
7133
|
-
}(vf),
|
|
7133
|
+
}(vf), Sv = /* @__PURE__ */ function() {
|
|
7134
7134
|
function r() {
|
|
7135
|
-
this.preResolution = new
|
|
7135
|
+
this.preResolution = new xv(), this.postResolution = new Av();
|
|
7136
7136
|
}
|
|
7137
7137
|
return r;
|
|
7138
|
-
}(), Zp = /* @__PURE__ */ new Map(),
|
|
7138
|
+
}(), Zp = /* @__PURE__ */ new Map(), _v = function() {
|
|
7139
7139
|
function r(e) {
|
|
7140
|
-
this.parent = e, this._registry = new
|
|
7140
|
+
this.parent = e, this._registry = new gv(), this.interceptors = new Sv(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
|
|
7141
7141
|
}
|
|
7142
7142
|
return r.prototype.register = function(e, t, n) {
|
|
7143
7143
|
n === void 0 && (n = { lifecycle: dr.Transient }), this.ensureNotDisposed();
|
|
7144
7144
|
var i;
|
|
7145
|
-
if (
|
|
7145
|
+
if (yv(t) ? i = t : i = { useClass: t }, Do(i))
|
|
7146
7146
|
for (var s = [e], o = i; o != null; ) {
|
|
7147
7147
|
var c = o.useToken;
|
|
7148
7148
|
if (s.includes(c))
|
|
@@ -7189,7 +7189,7 @@ var bv = function(r) {
|
|
|
7189
7189
|
var i = this.resolveRegistration(n, t);
|
|
7190
7190
|
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
7191
7191
|
}
|
|
7192
|
-
if (
|
|
7192
|
+
if (pv(e)) {
|
|
7193
7193
|
var i = this.construct(e, t);
|
|
7194
7194
|
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
7195
7195
|
}
|
|
@@ -7316,9 +7316,9 @@ var bv = function(r) {
|
|
|
7316
7316
|
options: n
|
|
7317
7317
|
});
|
|
7318
7318
|
}, r.prototype.dispose = function() {
|
|
7319
|
-
return
|
|
7319
|
+
return lv(this, void 0, void 0, function() {
|
|
7320
7320
|
var e;
|
|
7321
|
-
return
|
|
7321
|
+
return uv(this, function(t) {
|
|
7322
7322
|
switch (t.label) {
|
|
7323
7323
|
case 0:
|
|
7324
7324
|
return this.disposed = !0, e = [], this.disposables.forEach(function(n) {
|
|
@@ -7350,25 +7350,25 @@ var bv = function(r) {
|
|
|
7350
7350
|
var o = s.map(n.resolveParams(t, e));
|
|
7351
7351
|
return new (e.bind.apply(e, ti([void 0], o)))();
|
|
7352
7352
|
}();
|
|
7353
|
-
return
|
|
7353
|
+
return bv(i) && this.disposables.add(i), i;
|
|
7354
7354
|
}, r.prototype.resolveParams = function(e, t) {
|
|
7355
7355
|
var n = this;
|
|
7356
7356
|
return function(i, s) {
|
|
7357
7357
|
var o, c, u;
|
|
7358
7358
|
try {
|
|
7359
|
-
return
|
|
7359
|
+
return dv(i) ? rh(i) ? i.multiple ? (o = n.resolve(i.transform)).transform.apply(o, ti([n.resolveAll(i.token)], i.transformArgs)) : (c = n.resolve(i.transform)).transform.apply(c, ti([n.resolve(i.token, e)], i.transformArgs)) : i.multiple ? n.resolveAll(i.token) : n.resolve(i.token, e) : rh(i) ? (u = n.resolve(i.transform, e)).transform.apply(u, ti([n.resolve(i.token, e)], i.transformArgs)) : n.resolve(i, e);
|
|
7360
7360
|
} catch (h) {
|
|
7361
|
-
throw new Error(
|
|
7361
|
+
throw new Error(wv(t, s, h));
|
|
7362
7362
|
}
|
|
7363
7363
|
};
|
|
7364
7364
|
}, r.prototype.ensureNotDisposed = function() {
|
|
7365
7365
|
if (this.disposed)
|
|
7366
7366
|
throw new Error("This container has been disposed, you cannot interact with a disposed container");
|
|
7367
7367
|
}, r;
|
|
7368
|
-
}(), lr = new
|
|
7368
|
+
}(), lr = new _v();
|
|
7369
7369
|
function Ic() {
|
|
7370
7370
|
return function(r) {
|
|
7371
|
-
Zp.set(r,
|
|
7371
|
+
Zp.set(r, hv(r));
|
|
7372
7372
|
};
|
|
7373
7373
|
}
|
|
7374
7374
|
if (typeof Reflect > "u" || !Reflect.getMetadata)
|
|
@@ -7800,7 +7800,7 @@ f([
|
|
|
7800
7800
|
*
|
|
7801
7801
|
*/
|
|
7802
7802
|
const Io = "crypto.algorithm";
|
|
7803
|
-
class
|
|
7803
|
+
class Ev {
|
|
7804
7804
|
getAlgorithms() {
|
|
7805
7805
|
return lr.resolveAll(Io);
|
|
7806
7806
|
}
|
|
@@ -7836,7 +7836,7 @@ class _v {
|
|
|
7836
7836
|
}
|
|
7837
7837
|
}
|
|
7838
7838
|
const Yi = "crypto.algorithmProvider";
|
|
7839
|
-
lr.registerSingleton(Yi,
|
|
7839
|
+
lr.registerSingleton(Yi, Ev);
|
|
7840
7840
|
var Mo;
|
|
7841
7841
|
const br = "1.3.36.3.3.2.8.1.1", Ah = `${br}.1`, Sh = `${br}.2`, _h = `${br}.3`, Eh = `${br}.4`, Ih = `${br}.5`, kh = `${br}.6`, Ch = `${br}.7`, Bh = `${br}.8`, Oh = `${br}.9`, Th = `${br}.10`, Nh = `${br}.11`, Ph = `${br}.12`, jh = `${br}.13`, Rh = `${br}.14`, Uh = "brainpoolP160r1", Dh = "brainpoolP160t1", $h = "brainpoolP192r1", Mh = "brainpoolP192t1", Vh = "brainpoolP224r1", Lh = "brainpoolP224t1", Hh = "brainpoolP256r1", Fh = "brainpoolP256t1", zh = "brainpoolP320r1", Gh = "brainpoolP320t1", qh = "brainpoolP384r1", Kh = "brainpoolP384t1", Zh = "brainpoolP512r1", Wh = "brainpoolP512t1", Ct = "ECDSA";
|
|
7842
7842
|
let zs = Mo = class {
|
|
@@ -7846,13 +7846,13 @@ let zs = Mo = class {
|
|
|
7846
7846
|
if ("hash" in e)
|
|
7847
7847
|
switch ((typeof e.hash == "string" ? e.hash : e.hash.name).toLowerCase()) {
|
|
7848
7848
|
case "sha-1":
|
|
7849
|
-
return Zg;
|
|
7850
|
-
case "sha-256":
|
|
7851
7849
|
return Wg;
|
|
7852
|
-
case "sha-
|
|
7850
|
+
case "sha-256":
|
|
7853
7851
|
return Yg;
|
|
7854
|
-
case "sha-
|
|
7852
|
+
case "sha-384":
|
|
7855
7853
|
return Jg;
|
|
7854
|
+
case "sha-512":
|
|
7855
|
+
return Xg;
|
|
7856
7856
|
}
|
|
7857
7857
|
else if ("namedCurve" in e) {
|
|
7858
7858
|
let t = "";
|
|
@@ -7992,7 +7992,7 @@ class nt {
|
|
|
7992
7992
|
}
|
|
7993
7993
|
nt.NAME = r0;
|
|
7994
7994
|
nt.VALUE = n0;
|
|
7995
|
-
class
|
|
7995
|
+
class Iv {
|
|
7996
7996
|
static toTextObject(e) {
|
|
7997
7997
|
const t = new nt("Algorithm Identifier", {}, Bn.toString(e.algorithm));
|
|
7998
7998
|
if (e.parameters)
|
|
@@ -8022,7 +8022,7 @@ Bn.items = {
|
|
|
8022
8022
|
[va]: "sha512",
|
|
8023
8023
|
[gi]: "rsaEncryption",
|
|
8024
8024
|
[fa]: "sha1WithRSAEncryption",
|
|
8025
|
-
[
|
|
8025
|
+
[iv]: "sha224WithRSAEncryption",
|
|
8026
8026
|
[Jl]: "sha256WithRSAEncryption",
|
|
8027
8027
|
[ha]: "sha384WithRSAEncryption",
|
|
8028
8028
|
[da]: "sha512WithRSAEncryption",
|
|
@@ -8032,12 +8032,12 @@ Bn.items = {
|
|
|
8032
8032
|
[hf]: "ecdsaWithSHA256",
|
|
8033
8033
|
[df]: "ecdsaWithSHA384",
|
|
8034
8034
|
[pf]: "ecdsaWithSHA512",
|
|
8035
|
-
[
|
|
8036
|
-
[
|
|
8037
|
-
[
|
|
8038
|
-
[
|
|
8039
|
-
[
|
|
8040
|
-
[
|
|
8035
|
+
[Hg]: "TLS WWW server authentication",
|
|
8036
|
+
[Fg]: "TLS WWW client authentication",
|
|
8037
|
+
[zg]: "Code Signing",
|
|
8038
|
+
[Gg]: "E-mail Protection",
|
|
8039
|
+
[qg]: "Time Stamping",
|
|
8040
|
+
[Kg]: "OCSP Signing",
|
|
8041
8041
|
[Zl]: "Signed Data"
|
|
8042
8042
|
};
|
|
8043
8043
|
class Gn {
|
|
@@ -8094,7 +8094,7 @@ class Gn {
|
|
|
8094
8094
|
}
|
|
8095
8095
|
}
|
|
8096
8096
|
Gn.oidSerializer = Bn;
|
|
8097
|
-
Gn.algorithmSerializer =
|
|
8097
|
+
Gn.algorithmSerializer = Iv;
|
|
8098
8098
|
class Jn {
|
|
8099
8099
|
constructor(...e) {
|
|
8100
8100
|
if (e.length === 1) {
|
|
@@ -8213,9 +8213,9 @@ class Dn {
|
|
|
8213
8213
|
}
|
|
8214
8214
|
i0 = Symbol.toStringTag;
|
|
8215
8215
|
Dn.DEFAULT = "default";
|
|
8216
|
-
const Zt = new Dn(),
|
|
8217
|
-
function
|
|
8218
|
-
return new RegExp(
|
|
8216
|
+
const Zt = new Dn(), kv = /^[0-2](?:\.[1-9][0-9]*)+$/;
|
|
8217
|
+
function Cv(r) {
|
|
8218
|
+
return new RegExp(kv).test(r);
|
|
8219
8219
|
}
|
|
8220
8220
|
class s0 {
|
|
8221
8221
|
constructor(e = {}) {
|
|
@@ -8227,7 +8227,7 @@ class s0 {
|
|
|
8227
8227
|
return this.items[e] || null;
|
|
8228
8228
|
}
|
|
8229
8229
|
findId(e) {
|
|
8230
|
-
return
|
|
8230
|
+
return Cv(e) ? e : this.get(e);
|
|
8231
8231
|
}
|
|
8232
8232
|
register(e, t) {
|
|
8233
8233
|
this.items[e] = t, this.items[t] = e;
|
|
@@ -8246,11 +8246,11 @@ mr.register("G", "2.5.4.42");
|
|
|
8246
8246
|
mr.register("I", "2.5.4.43");
|
|
8247
8247
|
mr.register("SN", "2.5.4.4");
|
|
8248
8248
|
mr.register("T", "2.5.4.12");
|
|
8249
|
-
function
|
|
8249
|
+
function Bv(r, e) {
|
|
8250
8250
|
return `\\${de.ToHex(de.FromUtf8String(e)).toUpperCase()}`;
|
|
8251
8251
|
}
|
|
8252
|
-
function
|
|
8253
|
-
return r.replace(/([,+"\\<>;])/g, "\\$1").replace(/^([ #])/, "\\$1").replace(/([ ]$)/, "\\$1").replace(/([\r\n\t])/,
|
|
8252
|
+
function Ov(r) {
|
|
8253
|
+
return r.replace(/([,+"\\<>;])/g, "\\$1").replace(/^([ #])/, "\\$1").replace(/([ ]$)/, "\\$1").replace(/([\r\n\t])/, Bv);
|
|
8254
8254
|
}
|
|
8255
8255
|
class Hn {
|
|
8256
8256
|
static isASCII(e) {
|
|
@@ -8283,7 +8283,7 @@ class Hn {
|
|
|
8283
8283
|
}
|
|
8284
8284
|
toString() {
|
|
8285
8285
|
return this.asn.map((e) => e.map((t) => {
|
|
8286
|
-
const n = this.getName(t.type) || t.type, i = t.value.anyValue ? `#${de.ToHex(t.value.anyValue)}` :
|
|
8286
|
+
const n = this.getName(t.type) || t.type, i = t.value.anyValue ? `#${de.ToHex(t.value.anyValue)}` : Ov(t.value.toString());
|
|
8287
8287
|
return `${n}=${i}`;
|
|
8288
8288
|
}).join("+")).join(", ");
|
|
8289
8289
|
}
|
|
@@ -8377,7 +8377,7 @@ class Hn {
|
|
|
8377
8377
|
return e.length >= 1 && !(!((t = e[0]) === null || t === void 0) && t.subtle) ? (i = e[0] || i, n = e[1] || Zt.get()) : n = e[0] || Zt.get(), await n.subtle.digest(i, this.toArrayBuffer());
|
|
8378
8378
|
}
|
|
8379
8379
|
}
|
|
8380
|
-
const o0 = "Cannot initialize GeneralName from ASN.1 data.", Yh = `${o0} Unsupported string format in use.`,
|
|
8380
|
+
const o0 = "Cannot initialize GeneralName from ASN.1 data.", Yh = `${o0} Unsupported string format in use.`, Tv = `${o0} Value doesn't match to GUID regular expression.`, Jh = /^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i, Xh = "1.3.6.1.4.1.311.25.1", Qh = "1.3.6.1.4.1.311.20.2.3", Fc = "dns", zc = "dn", Gc = "email", qc = "ip", Kc = "url", Zc = "guid", Wc = "upn", No = "id";
|
|
8381
8381
|
class $n extends Jn {
|
|
8382
8382
|
constructor(...e) {
|
|
8383
8383
|
let t;
|
|
@@ -8449,7 +8449,7 @@ class $n extends Jn {
|
|
|
8449
8449
|
this.type = Zc;
|
|
8450
8450
|
const t = K.parse(e.otherName.value, it), n = new RegExp(Jh, "i").exec(de.ToHex(t));
|
|
8451
8451
|
if (!n)
|
|
8452
|
-
throw new Error(
|
|
8452
|
+
throw new Error(Tv);
|
|
8453
8453
|
this.value = n.slice(1).map((i, s) => s < 3 ? de.ToHex(new Uint8Array(de.FromHex(i)).reverse()) : i).join("-");
|
|
8454
8454
|
} else if (e.otherName.typeId === Qh)
|
|
8455
8455
|
this.type = Wc, this.value = K.parse(e.otherName.value, Xt).toString();
|
|
@@ -8534,7 +8534,7 @@ class Gs extends Jn {
|
|
|
8534
8534
|
}
|
|
8535
8535
|
}
|
|
8536
8536
|
Gs.NAME = "GeneralNames";
|
|
8537
|
-
const js = "-{5}", qs = "\\n",
|
|
8537
|
+
const js = "-{5}", qs = "\\n", Nv = `[^${qs}]+`, Pv = `${js}BEGIN (${Nv}(?=${js}))${js}`, jv = `${js}END \\1${js}`, Ji = "\\n", Rv = `[^:${qs}]+`, Uv = `(?:[^${qs}]+${Ji}(?: +[^${qs}]+${Ji})*)`, Dv = "[a-zA-Z0-9=+/]+", $v = `(?:${Dv}${Ji})+`, ed = `${Pv}${Ji}(?:((?:${Rv}: ${Uv})+))?${Ji}?(${$v})${jv}`;
|
|
8538
8538
|
class gr {
|
|
8539
8539
|
static isPem(e) {
|
|
8540
8540
|
return typeof e == "string" && new RegExp(ed, "g").test(e);
|
|
@@ -8681,7 +8681,7 @@ class sn extends Fr {
|
|
|
8681
8681
|
e.length > 1 ? (i = e[0] || i, n = e[1] || n, t = e[2] || Zt.get()) : t = e[0] || Zt.get();
|
|
8682
8682
|
let s = this.rawData;
|
|
8683
8683
|
const o = K.parse(this.rawData, rn);
|
|
8684
|
-
return o.algorithm.algorithm === Ps && (s =
|
|
8684
|
+
return o.algorithm.algorithm === Ps && (s = Mv(o, s)), t.subtle.importKey("spki", s, i, !0, n);
|
|
8685
8685
|
}
|
|
8686
8686
|
onInit(e) {
|
|
8687
8687
|
const t = lr.resolve(Yi), n = this.algorithm = t.toWebAlgorithm(e.algorithm);
|
|
@@ -8717,7 +8717,7 @@ class sn extends Fr {
|
|
|
8717
8717
|
return e;
|
|
8718
8718
|
}
|
|
8719
8719
|
}
|
|
8720
|
-
function
|
|
8720
|
+
function Mv(r, e) {
|
|
8721
8721
|
return r.algorithm = new oe({
|
|
8722
8722
|
algorithm: gi,
|
|
8723
8723
|
parameters: null
|
|
@@ -9068,7 +9068,7 @@ class Nc {
|
|
|
9068
9068
|
}
|
|
9069
9069
|
Nc.items = /* @__PURE__ */ new Map();
|
|
9070
9070
|
const Pc = "crypto.signatureFormatter";
|
|
9071
|
-
class
|
|
9071
|
+
class Vv {
|
|
9072
9072
|
toAsnSignature(e, t) {
|
|
9073
9073
|
return Y.toArrayBuffer(t);
|
|
9074
9074
|
}
|
|
@@ -9220,7 +9220,7 @@ class Or {
|
|
|
9220
9220
|
toWebSignature(e, t) {
|
|
9221
9221
|
if (e.name === "ECDSA") {
|
|
9222
9222
|
const n = K.parse(t, ua), i = e.namedCurve, s = Or.namedCurveSize.get(i) || Or.defaultNamedCurveSize, o = this.addPadding(s, this.removePadding(n.r)), c = this.addPadding(s, this.removePadding(n.s));
|
|
9223
|
-
return
|
|
9223
|
+
return Qy(o, c);
|
|
9224
9224
|
}
|
|
9225
9225
|
return null;
|
|
9226
9226
|
}
|
|
@@ -9280,7 +9280,7 @@ Au = f([
|
|
|
9280
9280
|
Ic()
|
|
9281
9281
|
], Au);
|
|
9282
9282
|
lr.registerSingleton(Io, Au);
|
|
9283
|
-
class
|
|
9283
|
+
class Lv extends Fr {
|
|
9284
9284
|
constructor(e) {
|
|
9285
9285
|
Fr.isAsnEncoded(e) ? super(e, Fs) : super(e), this.tag = gr.CertificateRequestTag;
|
|
9286
9286
|
}
|
|
@@ -9339,7 +9339,7 @@ class Vv extends Fr {
|
|
|
9339
9339
|
}), e;
|
|
9340
9340
|
}
|
|
9341
9341
|
}
|
|
9342
|
-
|
|
9342
|
+
Lv.NAME = "PKCS#10 Certificate Request";
|
|
9343
9343
|
class wi extends Fr {
|
|
9344
9344
|
constructor(e) {
|
|
9345
9345
|
Fr.isAsnEncoded(e) ? super(e, di) : super(e), this.tag = gr.CertificateTag;
|
|
@@ -9438,7 +9438,7 @@ class wi extends Fr {
|
|
|
9438
9438
|
}
|
|
9439
9439
|
}
|
|
9440
9440
|
wi.NAME = "Certificate";
|
|
9441
|
-
class
|
|
9441
|
+
class Hv extends Array {
|
|
9442
9442
|
constructor(e) {
|
|
9443
9443
|
if (super(), Fr.isAsnEncoded(e))
|
|
9444
9444
|
this.import(e);
|
|
@@ -9450,7 +9450,7 @@ class Lv extends Array {
|
|
|
9450
9450
|
}
|
|
9451
9451
|
export(e) {
|
|
9452
9452
|
const t = new xn();
|
|
9453
|
-
t.version = 1, t.encapContentInfo.eContentType =
|
|
9453
|
+
t.version = 1, t.encapContentInfo.eContentType = Zg, t.encapContentInfo.eContent = new qi({
|
|
9454
9454
|
single: new it()
|
|
9455
9455
|
}), t.certificates = new Ms(this.map((s) => new pi({
|
|
9456
9456
|
certificate: K.parse(s.rawData, di)
|
|
@@ -9507,12 +9507,12 @@ class Lv extends Array {
|
|
|
9507
9507
|
});
|
|
9508
9508
|
}
|
|
9509
9509
|
}
|
|
9510
|
-
class
|
|
9510
|
+
class Fv {
|
|
9511
9511
|
constructor(e = {}) {
|
|
9512
9512
|
this.certificates = [], e.certificates && (this.certificates = e.certificates);
|
|
9513
9513
|
}
|
|
9514
9514
|
async build(e, t = Zt.get()) {
|
|
9515
|
-
const n = new
|
|
9515
|
+
const n = new Hv(e);
|
|
9516
9516
|
let i = e;
|
|
9517
9517
|
for (; i = await this.findIssuer(i, t); ) {
|
|
9518
9518
|
const s = await i.getThumbprint(t);
|
|
@@ -9568,7 +9568,7 @@ jr.register(wl, h0);
|
|
|
9568
9568
|
jr.register(pl, d0);
|
|
9569
9569
|
Nc.register(t0, p0);
|
|
9570
9570
|
Nc.register(mf, wf);
|
|
9571
|
-
lr.registerSingleton(Pc,
|
|
9571
|
+
lr.registerSingleton(Pc, Vv);
|
|
9572
9572
|
lr.registerSingleton(Pc, Or);
|
|
9573
9573
|
Or.namedCurveSize.set("P-256", 32);
|
|
9574
9574
|
Or.namedCurveSize.set("K-256", 32);
|
|
@@ -9622,7 +9622,7 @@ let We = (vn = class {
|
|
|
9622
9622
|
function _a(r) {
|
|
9623
9623
|
if (r != null && typeof r == "object") return r[Er.ENCODED];
|
|
9624
9624
|
}
|
|
9625
|
-
function
|
|
9625
|
+
function zv(r) {
|
|
9626
9626
|
if (r != null && typeof r == "object") return r[Er.LENGTH];
|
|
9627
9627
|
}
|
|
9628
9628
|
function Zs(r, e) {
|
|
@@ -9642,7 +9642,7 @@ function y0(r) {
|
|
|
9642
9642
|
function Vr(r) {
|
|
9643
9643
|
return r.reduce((e, t) => e + t.toString(16).padStart(2, "0"), "");
|
|
9644
9644
|
}
|
|
9645
|
-
function
|
|
9645
|
+
function Gv(r) {
|
|
9646
9646
|
const e = r.reduce((i, s) => i + s.length, 0), t = new Uint8Array(e);
|
|
9647
9647
|
let n = 0;
|
|
9648
9648
|
for (const i of r) t.set(i, n), n += i.length;
|
|
@@ -9652,12 +9652,12 @@ function bf(r) {
|
|
|
9652
9652
|
const e = atob(r);
|
|
9653
9653
|
return Uint8Array.from(e, (t) => t.codePointAt(0));
|
|
9654
9654
|
}
|
|
9655
|
-
const
|
|
9656
|
-
function
|
|
9657
|
-
const e = r.replace(/[_-]/g, (t) =>
|
|
9655
|
+
const qv = { "-": "+", _: "/" };
|
|
9656
|
+
function Kv(r) {
|
|
9657
|
+
const e = r.replace(/[_-]/g, (t) => qv[t]);
|
|
9658
9658
|
return bf(e.padEnd(Math.ceil(e.length / 4) * 4, "="));
|
|
9659
9659
|
}
|
|
9660
|
-
function
|
|
9660
|
+
function Zv() {
|
|
9661
9661
|
const r = new Uint8Array(4), e = new Uint32Array(r.buffer);
|
|
9662
9662
|
return !((e[0] = 1) & r[0]);
|
|
9663
9663
|
}
|
|
@@ -9762,7 +9762,7 @@ function v0(r, e = 0, t = !1) {
|
|
|
9762
9762
|
} else if (i === 31) return s ? NaN : n * (1 / 0);
|
|
9763
9763
|
return n * 2 ** (i - 25) * (1024 + s);
|
|
9764
9764
|
}
|
|
9765
|
-
function
|
|
9765
|
+
function Wv(r) {
|
|
9766
9766
|
const e = new DataView(new ArrayBuffer(4));
|
|
9767
9767
|
e.setFloat32(0, r, !1);
|
|
9768
9768
|
const t = e.getUint32(0, !1);
|
|
@@ -9777,7 +9777,7 @@ function Zv(r) {
|
|
|
9777
9777
|
else return null;
|
|
9778
9778
|
return n;
|
|
9779
9779
|
}
|
|
9780
|
-
function
|
|
9780
|
+
function Yv(r) {
|
|
9781
9781
|
if (r !== 0) {
|
|
9782
9782
|
const e = new ArrayBuffer(8), t = new DataView(e);
|
|
9783
9783
|
t.setFloat64(0, r, !1);
|
|
@@ -9786,7 +9786,7 @@ function Wv(r) {
|
|
|
9786
9786
|
}
|
|
9787
9787
|
return r;
|
|
9788
9788
|
}
|
|
9789
|
-
function
|
|
9789
|
+
function Jv(r) {
|
|
9790
9790
|
switch (r.length) {
|
|
9791
9791
|
case 2:
|
|
9792
9792
|
v0(r, 0, !0);
|
|
@@ -9805,7 +9805,7 @@ function Yv(r) {
|
|
|
9805
9805
|
throw new TypeError(`Bad input to isSubnormal: ${r}`);
|
|
9806
9806
|
}
|
|
9807
9807
|
}
|
|
9808
|
-
const ad = me.SIMPLE_FLOAT << 5 | bt.TWO,
|
|
9808
|
+
const ad = me.SIMPLE_FLOAT << 5 | bt.TWO, Xv = me.SIMPLE_FLOAT << 5 | bt.FOUR, Qv = me.SIMPLE_FLOAT << 5 | bt.EIGHT, em = me.SIMPLE_FLOAT << 5 | Mn.TRUE, tm = me.SIMPLE_FLOAT << 5 | Mn.FALSE, rm = me.SIMPLE_FLOAT << 5 | Mn.UNDEFINED, nm = me.SIMPLE_FLOAT << 5 | Mn.NULL, im = new TextEncoder(), sm = { ...Ea.defaultOptions, avoidInts: !1, cde: !1, collapseBigInts: !0, dcbor: !1, float64: !1, flushToZero: !1, forceEndian: null, ignoreOriginalEncoding: !1, largeNegativeAsBigInt: !1, reduceUnsafeNumbers: !1, rejectBigInts: !1, rejectCustomSimples: !1, rejectDuplicateKeys: !1, rejectFloats: !1, rejectUndefined: !1, simplifyNegativeZero: !1, sortKeys: null, stringNormalization: null }, m0 = { cde: !0, ignoreOriginalEncoding: !0, sortKeys: g0 }, om = { ...m0, dcbor: !0, largeNegativeAsBigInt: !0, reduceUnsafeNumbers: !0, rejectCustomSimples: !0, rejectDuplicateKeys: !0, rejectUndefined: !0, simplifyNegativeZero: !0, stringNormalization: "NFC" };
|
|
9809
9809
|
function w0(r) {
|
|
9810
9810
|
const e = r < 0;
|
|
9811
9811
|
return typeof r == "bigint" ? [e ? -r - 1n : r, e] : [e ? -r - 1 : r, e];
|
|
@@ -9814,9 +9814,9 @@ function Xc(r, e, t) {
|
|
|
9814
9814
|
if (t.rejectFloats) throw new Error(`Attempt to encode an unwanted floating point number: ${r}`);
|
|
9815
9815
|
if (isNaN(r)) e.writeUint8(ad), e.writeUint16(32256);
|
|
9816
9816
|
else if (!t.float64 && Math.fround(r) === r) {
|
|
9817
|
-
const n =
|
|
9818
|
-
n === null ? (e.writeUint8(
|
|
9819
|
-
} else e.writeUint8(
|
|
9817
|
+
const n = Wv(r);
|
|
9818
|
+
n === null ? (e.writeUint8(Xv), e.writeFloat32(r)) : (e.writeUint8(ad), e.writeUint16(n));
|
|
9819
|
+
} else e.writeUint8(Qv), e.writeFloat64(r);
|
|
9820
9820
|
}
|
|
9821
9821
|
function zr(r, e, t) {
|
|
9822
9822
|
const [n, i] = w0(r);
|
|
@@ -9845,34 +9845,34 @@ function b0(r, e, t) {
|
|
|
9845
9845
|
const u = y0(c + o);
|
|
9846
9846
|
zr(u.length, e, me.BYTE_STRING), e.write(u);
|
|
9847
9847
|
}
|
|
9848
|
-
function om(r, e, t) {
|
|
9849
|
-
t.flushToZero && (r = Wv(r)), Object.is(r, -0) ? t.simplifyNegativeZero ? t.avoidInts ? Xc(0, e, t) : zr(0, e) : Xc(r, e, t) : !t.avoidInts && Number.isSafeInteger(r) ? zr(r, e) : t.reduceUnsafeNumbers && Math.floor(r) === r && r >= Sa.MIN && r <= Sa.MAX ? b0(BigInt(r), e, t) : Xc(r, e, t);
|
|
9850
|
-
}
|
|
9851
9848
|
function am(r, e, t) {
|
|
9852
|
-
|
|
9853
|
-
zr(i.length, e, me.UTF8_STRING), e.write(i);
|
|
9849
|
+
t.flushToZero && (r = Yv(r)), Object.is(r, -0) ? t.simplifyNegativeZero ? t.avoidInts ? Xc(0, e, t) : zr(0, e) : Xc(r, e, t) : !t.avoidInts && Number.isSafeInteger(r) ? zr(r, e) : t.reduceUnsafeNumbers && Math.floor(r) === r && r >= Sa.MIN && r <= Sa.MAX ? b0(BigInt(r), e, t) : Xc(r, e, t);
|
|
9854
9850
|
}
|
|
9855
9851
|
function cm(r, e, t) {
|
|
9852
|
+
const n = t.stringNormalization ? r.normalize(t.stringNormalization) : r, i = im.encode(n);
|
|
9853
|
+
zr(i.length, e, me.UTF8_STRING), e.write(i);
|
|
9854
|
+
}
|
|
9855
|
+
function lm(r, e, t) {
|
|
9856
9856
|
const n = r;
|
|
9857
9857
|
xf(n, n.length, me.ARRAY, e, t);
|
|
9858
9858
|
for (const i of n) ii(i, e, t);
|
|
9859
9859
|
}
|
|
9860
|
-
function
|
|
9860
|
+
function um(r, e) {
|
|
9861
9861
|
const t = r;
|
|
9862
9862
|
zr(t.length, e, me.BYTE_STRING), e.write(t);
|
|
9863
9863
|
}
|
|
9864
|
-
const _u = /* @__PURE__ */ new Map([[Array,
|
|
9864
|
+
const _u = /* @__PURE__ */ new Map([[Array, lm], [Uint8Array, um]]);
|
|
9865
9865
|
function Rt(r, e) {
|
|
9866
9866
|
const t = _u.get(r);
|
|
9867
9867
|
return _u.set(r, e), t;
|
|
9868
9868
|
}
|
|
9869
9869
|
function xf(r, e, t, n, i) {
|
|
9870
|
-
const s =
|
|
9870
|
+
const s = zv(r);
|
|
9871
9871
|
s && !i.ignoreOriginalEncoding ? n.write(s) : zr(e, n, t);
|
|
9872
9872
|
}
|
|
9873
|
-
function
|
|
9873
|
+
function fm(r, e, t) {
|
|
9874
9874
|
if (r === null) {
|
|
9875
|
-
e.writeUint8(
|
|
9875
|
+
e.writeUint8(nm);
|
|
9876
9876
|
return;
|
|
9877
9877
|
}
|
|
9878
9878
|
if (!t.ignoreOriginalEncoding && Er.ENCODED in r) {
|
|
@@ -9901,23 +9901,23 @@ function um(r, e, t) {
|
|
|
9901
9901
|
function ii(r, e, t) {
|
|
9902
9902
|
switch (typeof r) {
|
|
9903
9903
|
case "number":
|
|
9904
|
-
|
|
9904
|
+
am(r, e, t);
|
|
9905
9905
|
break;
|
|
9906
9906
|
case "bigint":
|
|
9907
9907
|
b0(r, e, t);
|
|
9908
9908
|
break;
|
|
9909
9909
|
case "string":
|
|
9910
|
-
|
|
9910
|
+
cm(r, e, t);
|
|
9911
9911
|
break;
|
|
9912
9912
|
case "boolean":
|
|
9913
|
-
e.writeUint8(r ?
|
|
9913
|
+
e.writeUint8(r ? em : tm);
|
|
9914
9914
|
break;
|
|
9915
9915
|
case "undefined":
|
|
9916
9916
|
if (t.rejectUndefined) throw new Error("Attempt to encode unwanted undefined.");
|
|
9917
|
-
e.writeUint8(
|
|
9917
|
+
e.writeUint8(rm);
|
|
9918
9918
|
break;
|
|
9919
9919
|
case "object":
|
|
9920
|
-
|
|
9920
|
+
fm(r, e, t);
|
|
9921
9921
|
break;
|
|
9922
9922
|
case "symbol":
|
|
9923
9923
|
throw new TypeError(`Unknown symbol: ${r.toString()}`);
|
|
@@ -9926,8 +9926,8 @@ function ii(r, e, t) {
|
|
|
9926
9926
|
}
|
|
9927
9927
|
}
|
|
9928
9928
|
function jc(r, e = {}) {
|
|
9929
|
-
const t = { ...
|
|
9930
|
-
e.dcbor ? Object.assign(t,
|
|
9929
|
+
const t = { ...sm };
|
|
9930
|
+
e.dcbor ? Object.assign(t, om) : e.cde && Object.assign(t, m0), Object.assign(t, e);
|
|
9931
9931
|
const n = new Ea(t);
|
|
9932
9932
|
return ii(r, n, t), n.read();
|
|
9933
9933
|
}
|
|
@@ -9956,7 +9956,7 @@ const Tn = class Tn {
|
|
|
9956
9956
|
};
|
|
9957
9957
|
He(Tn, "KnownSimple", /* @__PURE__ */ new Map([[Mn.FALSE, !1], [Mn.TRUE, !0], [Mn.NULL, null], [Mn.UNDEFINED, void 0]]));
|
|
9958
9958
|
let Ws = Tn;
|
|
9959
|
-
const
|
|
9959
|
+
const hm = new TextDecoder("utf8", { fatal: !0, ignoreBOM: !0 });
|
|
9960
9960
|
var Ar, Dr, Kt, kr, Wt, ei, Eu, ks;
|
|
9961
9961
|
const Va = class Va {
|
|
9962
9962
|
constructor(e, t) {
|
|
@@ -10039,7 +10039,7 @@ Ar = new WeakMap(), Dr = new WeakMap(), Kt = new WeakMap(), kr = new WeakMap(),
|
|
|
10039
10039
|
o === 1 / 0 ? yield* De(this, Wt, ks).call(this, i, e, t) : yield [i, s, De(this, Wt, Eu).call(this, o), t, o];
|
|
10040
10040
|
break;
|
|
10041
10041
|
case me.UTF8_STRING:
|
|
10042
|
-
o === 1 / 0 ? yield* De(this, Wt, ks).call(this, i, e, t) : yield [i, s,
|
|
10042
|
+
o === 1 / 0 ? yield* De(this, Wt, ks).call(this, i, e, t) : yield [i, s, hm.decode(De(this, Wt, Eu).call(this, o)), t, o];
|
|
10043
10043
|
break;
|
|
10044
10044
|
case me.ARRAY:
|
|
10045
10045
|
if (o === 1 / 0) yield* De(this, Wt, ks).call(this, i, e, t, !1);
|
|
@@ -10085,7 +10085,7 @@ Ar = new WeakMap(), Dr = new WeakMap(), Kt = new WeakMap(), kr = new WeakMap(),
|
|
|
10085
10085
|
}
|
|
10086
10086
|
}, He(Va, "defaultOptions", { maxDepth: 1024, encoding: "hex", requirePreferred: !1 });
|
|
10087
10087
|
let Ys = Va;
|
|
10088
|
-
const
|
|
10088
|
+
const dm = /* @__PURE__ */ new Map([[bt.ZERO, 1], [bt.ONE, 2], [bt.TWO, 3], [bt.FOUR, 5], [bt.EIGHT, 9]]), pm = new Uint8Array(0);
|
|
10089
10089
|
var tn, ar, en, La, A0;
|
|
10090
10090
|
let Nn = (tn = class {
|
|
10091
10091
|
constructor(e, t, n, i) {
|
|
@@ -10126,10 +10126,10 @@ let Nn = (tn = class {
|
|
|
10126
10126
|
const h = i.toHere(u);
|
|
10127
10127
|
if (h.length !== 3 || h[1] !== 126 || h[2] !== 0) throw new Error(`Invalid NaN encoding: "${Vr(h)}"`);
|
|
10128
10128
|
}
|
|
10129
|
-
if (n.rejectSubnormals &&
|
|
10129
|
+
if (n.rejectSubnormals && Jv(i.toHere(u + 1)), n.rejectLongFloats) {
|
|
10130
10130
|
const h = jc(c, { chunkSize: 9, reduceUnsafeNumbers: n.rejectUnsafeFloatInts });
|
|
10131
10131
|
if (h[0] >> 5 !== s) throw new Error(`Should have been encoded as int, not float: ${c}`);
|
|
10132
|
-
if (h.length <
|
|
10132
|
+
if (h.length < dm.get(o)) throw new Error(`Number should have been encoded shorter: ${c}`);
|
|
10133
10133
|
}
|
|
10134
10134
|
if (typeof c == "number" && n.boxed) return Is(c, i.toHere(u));
|
|
10135
10135
|
} else {
|
|
@@ -10197,7 +10197,7 @@ let Nn = (tn = class {
|
|
|
10197
10197
|
break;
|
|
10198
10198
|
}
|
|
10199
10199
|
case me.BYTE_STRING:
|
|
10200
|
-
return
|
|
10200
|
+
return Gv(this.children);
|
|
10201
10201
|
case me.UTF8_STRING: {
|
|
10202
10202
|
const n = this.children.join("");
|
|
10203
10203
|
t = $(this, ar).boxed ? Is(n, e.toHere(this.offset)) : n;
|
|
@@ -10216,7 +10216,7 @@ let Nn = (tn = class {
|
|
|
10216
10216
|
if (t % 2) throw new Error("Missing map value");
|
|
10217
10217
|
const n = new Array(t / 2);
|
|
10218
10218
|
if ($(this, en)) for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1], $(this, en)[i]];
|
|
10219
|
-
else for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1],
|
|
10219
|
+
else for (let i = 0; i < t; i += 2) n[i >> 1] = [e[i], e[i + 1], pm];
|
|
10220
10220
|
return n;
|
|
10221
10221
|
}, He(tn, "defaultDecodeOptions", { ...Ys.defaultOptions, ParentType: tn, boxed: !1, cde: !1, dcbor: !1, diagnosticSizes: x0.PREFERRED, convertUnsafeIntsToFloat: !1, pretty: !1, preferMap: !1, rejectLargeNegatives: !1, rejectBigInts: !1, rejectDuplicateKeys: !1, rejectFloats: !1, rejectInts: !1, rejectLongLoundNaN: !1, rejectLongFloats: !1, rejectNegativeZero: !1, rejectSimple: !1, rejectStreaming: !1, rejectStringsNotNormalizedAs: null, rejectSubnormals: !1, rejectUndefined: !1, rejectUnsafeFloatInts: !1, saveOriginal: !1, sortKeys: null }), He(tn, "cdeDecodeOptions", { cde: !0, rejectStreaming: !0, requirePreferred: !0, sortKeys: g0 }), He(tn, "dcborDecodeOptions", { ...tn.cdeDecodeOptions, dcbor: !0, convertUnsafeIntsToFloat: !0, rejectDuplicateKeys: !0, rejectLargeNegatives: !0, rejectLongLoundNaN: !0, rejectLongFloats: !0, rejectNegativeZero: !0, rejectSimple: !0, rejectUndefined: !0, rejectUnsafeFloatInts: !0, rejectStringsNotNormalizedAs: "NFC" }), tn);
|
|
10222
10222
|
var gd, vd;
|
|
@@ -10314,9 +10314,9 @@ function _0(r, e, t) {
|
|
|
10314
10314
|
}
|
|
10315
10315
|
return n;
|
|
10316
10316
|
}
|
|
10317
|
-
const
|
|
10318
|
-
function
|
|
10319
|
-
const t = { ...
|
|
10317
|
+
const ym = { ...Nn.defaultDecodeOptions, initialDepth: 0, noPrefixHex: !1, minCol: 0 };
|
|
10318
|
+
function gm(r, e) {
|
|
10319
|
+
const t = { ...ym, ...e, ParentType: Iu, saveOriginal: !0 }, n = new Ys(r, t);
|
|
10320
10320
|
let i, s;
|
|
10321
10321
|
for (const c of n) {
|
|
10322
10322
|
if (s = Nn.create(c, i, t, n), c[2] === Er.BREAK) if (i != null && i.isStreaming) i.left = 1;
|
|
@@ -10334,7 +10334,7 @@ function ym(r, e) {
|
|
|
10334
10334
|
`;
|
|
10335
10335
|
return o += _0(s, t), o;
|
|
10336
10336
|
}
|
|
10337
|
-
const cd = !
|
|
10337
|
+
const cd = !Zv();
|
|
10338
10338
|
function E0(r) {
|
|
10339
10339
|
if (typeof r == "object" && r) {
|
|
10340
10340
|
if (r.constructor !== Number) throw new Error(`Expected number: ${r}`);
|
|
@@ -10391,12 +10391,12 @@ el.comment = (r, e, t) => {
|
|
|
10391
10391
|
const o = i[s] & 31;
|
|
10392
10392
|
let c = Vr(i.subarray(s, ++s));
|
|
10393
10393
|
o >= 24 && (c += " ", c += Vr(i.subarray(s, s + 2 ** (o - 24)))), n.minCol = Math.max(n.minCol, (t + 1) * 2 + c.length);
|
|
10394
|
-
const u =
|
|
10394
|
+
const u = gm(r.contents, n);
|
|
10395
10395
|
let h = `Embedded CBOR
|
|
10396
10396
|
`;
|
|
10397
10397
|
return h += `${"".padStart((t + 1) * 2, " ")}${c}`.padEnd(n.minCol + 1, " "), h += `-- Bytes (Length: ${r.contents.length})
|
|
10398
10398
|
`, h += u, h;
|
|
10399
|
-
}, el.noChildren = !0, We.registerDecoder(Et.CBOR, el), We.registerDecoder(Et.URI, (r) => (Pn(r.contents), new URL(r.contents)), "URI"), Rt(URL, (r) => [Et.URI, r.toString()]), We.registerDecoder(Et.BASE64URL, (r) => (Pn(r.contents),
|
|
10399
|
+
}, el.noChildren = !0, We.registerDecoder(Et.CBOR, el), We.registerDecoder(Et.URI, (r) => (Pn(r.contents), new URL(r.contents)), "URI"), Rt(URL, (r) => [Et.URI, r.toString()]), We.registerDecoder(Et.BASE64URL, (r) => (Pn(r.contents), Kv(r.contents)), "Base64url-encoded"), We.registerDecoder(Et.BASE64, (r) => (Pn(r.contents), bf(r.contents)), "Base64-encoded"), We.registerDecoder(35, (r) => (Pn(r.contents), new RegExp(r.contents)), "RegExp"), We.registerDecoder(21065, (r) => {
|
|
10400
10400
|
Pn(r.contents);
|
|
10401
10401
|
let e = r.contents.replace(new RegExp("(?<!\\\\)(?<!\\[(?:[^\\]]|\\\\\\])*)\\.", "g"), `[^
|
|
10402
10402
|
\r]`);
|
|
@@ -10559,7 +10559,7 @@ const se = ct.arrayToEnum([
|
|
|
10559
10559
|
"invalid_intersection_types",
|
|
10560
10560
|
"not_multiple_of",
|
|
10561
10561
|
"not_finite"
|
|
10562
|
-
]),
|
|
10562
|
+
]), vm = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
10563
10563
|
class _r extends Error {
|
|
10564
10564
|
constructor(e) {
|
|
10565
10565
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
@@ -10677,7 +10677,7 @@ const Xi = (r, e) => {
|
|
|
10677
10677
|
return { message: t };
|
|
10678
10678
|
};
|
|
10679
10679
|
let k0 = Xi;
|
|
10680
|
-
function
|
|
10680
|
+
function mm(r) {
|
|
10681
10681
|
k0 = r;
|
|
10682
10682
|
}
|
|
10683
10683
|
function Ba() {
|
|
@@ -10703,7 +10703,7 @@ const Oa = (r) => {
|
|
|
10703
10703
|
path: s,
|
|
10704
10704
|
message: c
|
|
10705
10705
|
};
|
|
10706
|
-
},
|
|
10706
|
+
}, wm = [];
|
|
10707
10707
|
function Q(r, e) {
|
|
10708
10708
|
const t = Ba(), n = Oa({
|
|
10709
10709
|
issueData: e,
|
|
@@ -10994,14 +10994,14 @@ class Ke {
|
|
|
10994
10994
|
return this.safeParse(null).success;
|
|
10995
10995
|
}
|
|
10996
10996
|
}
|
|
10997
|
-
const
|
|
10997
|
+
const bm = /^c[^\s-]{8,}$/i, xm = /^[0-9a-z]+$/, Am = /^[0-9A-HJKMNP-TV-Z]{26}$/, Sm = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, _m = /^[a-z0-9_-]{21}$/i, Em = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Im = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, km = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
10998
10998
|
let rl;
|
|
10999
|
-
const
|
|
10999
|
+
const Cm = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Bm = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Om = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, B0 = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Tm = new RegExp(`^${B0}$`);
|
|
11000
11000
|
function O0(r) {
|
|
11001
11001
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
11002
11002
|
return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
11003
11003
|
}
|
|
11004
|
-
function
|
|
11004
|
+
function Nm(r) {
|
|
11005
11005
|
return new RegExp(`^${O0(r)}$`);
|
|
11006
11006
|
}
|
|
11007
11007
|
function T0(r) {
|
|
@@ -11009,8 +11009,8 @@ function T0(r) {
|
|
|
11009
11009
|
const t = [];
|
|
11010
11010
|
return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
11011
11011
|
}
|
|
11012
|
-
function
|
|
11013
|
-
return !!((e === "v4" || !e) &&
|
|
11012
|
+
function Pm(r, e) {
|
|
11013
|
+
return !!((e === "v4" || !e) && Cm.test(r) || (e === "v6" || !e) && Bm.test(r));
|
|
11014
11014
|
}
|
|
11015
11015
|
class Mr extends Ke {
|
|
11016
11016
|
_parse(e) {
|
|
@@ -11061,43 +11061,43 @@ class Mr extends Ke {
|
|
|
11061
11061
|
message: s.message
|
|
11062
11062
|
}), n.dirty());
|
|
11063
11063
|
} else if (s.kind === "email")
|
|
11064
|
-
|
|
11064
|
+
Im.test(e.data) || (i = this._getOrReturnCtx(e, i), Q(i, {
|
|
11065
11065
|
validation: "email",
|
|
11066
11066
|
code: F.invalid_string,
|
|
11067
11067
|
message: s.message
|
|
11068
11068
|
}), n.dirty());
|
|
11069
11069
|
else if (s.kind === "emoji")
|
|
11070
|
-
rl || (rl = new RegExp(
|
|
11070
|
+
rl || (rl = new RegExp(km, "u")), rl.test(e.data) || (i = this._getOrReturnCtx(e, i), Q(i, {
|
|
11071
11071
|
validation: "emoji",
|
|
11072
11072
|
code: F.invalid_string,
|
|
11073
11073
|
message: s.message
|
|
11074
11074
|
}), n.dirty());
|
|
11075
11075
|
else if (s.kind === "uuid")
|
|
11076
|
-
|
|
11076
|
+
Sm.test(e.data) || (i = this._getOrReturnCtx(e, i), Q(i, {
|
|
11077
11077
|
validation: "uuid",
|
|
11078
11078
|
code: F.invalid_string,
|
|
11079
11079
|
message: s.message
|
|
11080
11080
|
}), n.dirty());
|
|
11081
11081
|
else if (s.kind === "nanoid")
|
|
11082
|
-
|
|
11082
|
+
_m.test(e.data) || (i = this._getOrReturnCtx(e, i), Q(i, {
|
|
11083
11083
|
validation: "nanoid",
|
|
11084
11084
|
code: F.invalid_string,
|
|
11085
11085
|
message: s.message
|
|
11086
11086
|
}), n.dirty());
|
|
11087
11087
|
else if (s.kind === "cuid")
|
|
11088
|
-
|
|
11088
|
+
bm.test(e.data) || (i = this._getOrReturnCtx(e, i), Q(i, {
|
|
11089
11089
|
validation: "cuid",
|
|
11090
11090
|
code: F.invalid_string,
|
|
11091
11091
|
message: s.message
|
|
11092
11092
|
}), n.dirty());
|
|
11093
11093
|
else if (s.kind === "cuid2")
|
|
11094
|
-
|
|
11094
|
+
xm.test(e.data) || (i = this._getOrReturnCtx(e, i), Q(i, {
|
|
11095
11095
|
validation: "cuid2",
|
|
11096
11096
|
code: F.invalid_string,
|
|
11097
11097
|
message: s.message
|
|
11098
11098
|
}), n.dirty());
|
|
11099
11099
|
else if (s.kind === "ulid")
|
|
11100
|
-
|
|
11100
|
+
Am.test(e.data) || (i = this._getOrReturnCtx(e, i), Q(i, {
|
|
11101
11101
|
validation: "ulid",
|
|
11102
11102
|
code: F.invalid_string,
|
|
11103
11103
|
message: s.message
|
|
@@ -11132,23 +11132,23 @@ class Mr extends Ke {
|
|
|
11132
11132
|
code: F.invalid_string,
|
|
11133
11133
|
validation: "datetime",
|
|
11134
11134
|
message: s.message
|
|
11135
|
-
}), n.dirty()) : s.kind === "date" ?
|
|
11135
|
+
}), n.dirty()) : s.kind === "date" ? Tm.test(e.data) || (i = this._getOrReturnCtx(e, i), Q(i, {
|
|
11136
11136
|
code: F.invalid_string,
|
|
11137
11137
|
validation: "date",
|
|
11138
11138
|
message: s.message
|
|
11139
|
-
}), n.dirty()) : s.kind === "time" ?
|
|
11139
|
+
}), n.dirty()) : s.kind === "time" ? Nm(s).test(e.data) || (i = this._getOrReturnCtx(e, i), Q(i, {
|
|
11140
11140
|
code: F.invalid_string,
|
|
11141
11141
|
validation: "time",
|
|
11142
11142
|
message: s.message
|
|
11143
|
-
}), n.dirty()) : s.kind === "duration" ?
|
|
11143
|
+
}), n.dirty()) : s.kind === "duration" ? Em.test(e.data) || (i = this._getOrReturnCtx(e, i), Q(i, {
|
|
11144
11144
|
validation: "duration",
|
|
11145
11145
|
code: F.invalid_string,
|
|
11146
11146
|
message: s.message
|
|
11147
|
-
}), n.dirty()) : s.kind === "ip" ?
|
|
11147
|
+
}), n.dirty()) : s.kind === "ip" ? Pm(e.data, s.version) || (i = this._getOrReturnCtx(e, i), Q(i, {
|
|
11148
11148
|
validation: "ip",
|
|
11149
11149
|
code: F.invalid_string,
|
|
11150
11150
|
message: s.message
|
|
11151
|
-
}), n.dirty()) : s.kind === "base64" ?
|
|
11151
|
+
}), n.dirty()) : s.kind === "base64" ? Om.test(e.data) || (i = this._getOrReturnCtx(e, i), Q(i, {
|
|
11152
11152
|
validation: "base64",
|
|
11153
11153
|
code: F.invalid_string,
|
|
11154
11154
|
message: s.message
|
|
@@ -11370,7 +11370,7 @@ Mr.create = (r) => {
|
|
|
11370
11370
|
...Fe(r)
|
|
11371
11371
|
});
|
|
11372
11372
|
};
|
|
11373
|
-
function
|
|
11373
|
+
function jm(r, e) {
|
|
11374
11374
|
const t = (r.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, i = t > n ? t : n, s = parseInt(r.toFixed(i).replace(".", "")), o = parseInt(e.toFixed(i).replace(".", ""));
|
|
11375
11375
|
return s % o / Math.pow(10, i);
|
|
11376
11376
|
}
|
|
@@ -11409,7 +11409,7 @@ class qn extends Ke {
|
|
|
11409
11409
|
inclusive: s.inclusive,
|
|
11410
11410
|
exact: !1,
|
|
11411
11411
|
message: s.message
|
|
11412
|
-
}), i.dirty()) : s.kind === "multipleOf" ?
|
|
11412
|
+
}), i.dirty()) : s.kind === "multipleOf" ? jm(e.data, s.value) !== 0 && (n = this._getOrReturnCtx(e, n), Q(n, {
|
|
11413
11413
|
code: F.not_multiple_of,
|
|
11414
11414
|
multipleOf: s.value,
|
|
11415
11415
|
message: s.message
|
|
@@ -13110,7 +13110,7 @@ Ra.create = (r) => new Ra({
|
|
|
13110
13110
|
typeName: Ie.ZodNaN,
|
|
13111
13111
|
...Fe(r)
|
|
13112
13112
|
});
|
|
13113
|
-
const
|
|
13113
|
+
const Rm = Symbol("zod_brand");
|
|
13114
13114
|
class Af extends Ke {
|
|
13115
13115
|
_parse(e) {
|
|
13116
13116
|
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
@@ -13187,16 +13187,16 @@ function P0(r, e = {}, t) {
|
|
|
13187
13187
|
}
|
|
13188
13188
|
}) : Qi.create();
|
|
13189
13189
|
}
|
|
13190
|
-
const
|
|
13190
|
+
const Um = {
|
|
13191
13191
|
object: Ot.lazycreate
|
|
13192
13192
|
};
|
|
13193
13193
|
var Ie;
|
|
13194
13194
|
(function(r) {
|
|
13195
13195
|
r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
|
|
13196
13196
|
})(Ie || (Ie = {}));
|
|
13197
|
-
const
|
|
13197
|
+
const Dm = (r, e = {
|
|
13198
13198
|
message: `Input not instance of ${r.name}`
|
|
13199
|
-
}) => P0((t) => t instanceof r, e), j0 = Mr.create, R0 = qn.create,
|
|
13199
|
+
}) => P0((t) => t instanceof r, e), j0 = Mr.create, R0 = qn.create, $m = Ra.create, Mm = Kn.create, U0 = Qs.create, Vm = xi.create, Lm = Na.create, Hm = eo.create, Fm = to.create, zm = Qi.create, Gm = ai.create, qm = En.create, Km = Pa.create, Zm = Lr.create, Wm = Ot.create, Ym = Ot.strictCreate, Jm = ro.create, Xm = Rc.create, Qm = no.create, e1 = un.create, t1 = io.create, r1 = ja.create, n1 = Ai.create, i1 = $i.create, s1 = so.create, o1 = oo.create, a1 = Zn.create, c1 = ao.create, l1 = es.create, pd = Gr.create, u1 = on.create, f1 = Wn.create, h1 = Gr.createWithPreprocess, d1 = ko.create, p1 = () => j0().optional(), y1 = () => R0().optional(), g1 = () => U0().optional(), v1 = {
|
|
13200
13200
|
string: (r) => Mr.create({ ...r, coerce: !0 }),
|
|
13201
13201
|
number: (r) => qn.create({ ...r, coerce: !0 }),
|
|
13202
13202
|
boolean: (r) => Qs.create({
|
|
@@ -13205,14 +13205,14 @@ const Um = (r, e = {
|
|
|
13205
13205
|
}),
|
|
13206
13206
|
bigint: (r) => Kn.create({ ...r, coerce: !0 }),
|
|
13207
13207
|
date: (r) => xi.create({ ...r, coerce: !0 })
|
|
13208
|
-
},
|
|
13208
|
+
}, m1 = ke;
|
|
13209
13209
|
var Bt = /* @__PURE__ */ Object.freeze({
|
|
13210
13210
|
__proto__: null,
|
|
13211
13211
|
defaultErrorMap: Xi,
|
|
13212
|
-
setErrorMap:
|
|
13212
|
+
setErrorMap: mm,
|
|
13213
13213
|
getErrorMap: Ba,
|
|
13214
13214
|
makeIssue: Oa,
|
|
13215
|
-
EMPTY_PATH:
|
|
13215
|
+
EMPTY_PATH: wm,
|
|
13216
13216
|
addIssueToContext: Q,
|
|
13217
13217
|
ParseStatus: sr,
|
|
13218
13218
|
INVALID: ke,
|
|
@@ -13266,66 +13266,66 @@ var Bt = /* @__PURE__ */ Object.freeze({
|
|
|
13266
13266
|
ZodDefault: co,
|
|
13267
13267
|
ZodCatch: lo,
|
|
13268
13268
|
ZodNaN: Ra,
|
|
13269
|
-
BRAND:
|
|
13269
|
+
BRAND: Rm,
|
|
13270
13270
|
ZodBranded: Af,
|
|
13271
13271
|
ZodPipeline: ko,
|
|
13272
13272
|
ZodReadonly: uo,
|
|
13273
13273
|
custom: P0,
|
|
13274
13274
|
Schema: Ke,
|
|
13275
13275
|
ZodSchema: Ke,
|
|
13276
|
-
late:
|
|
13276
|
+
late: Um,
|
|
13277
13277
|
get ZodFirstPartyTypeKind() {
|
|
13278
13278
|
return Ie;
|
|
13279
13279
|
},
|
|
13280
|
-
coerce:
|
|
13281
|
-
any:
|
|
13282
|
-
array:
|
|
13283
|
-
bigint:
|
|
13280
|
+
coerce: v1,
|
|
13281
|
+
any: zm,
|
|
13282
|
+
array: Zm,
|
|
13283
|
+
bigint: Mm,
|
|
13284
13284
|
boolean: U0,
|
|
13285
|
-
date:
|
|
13286
|
-
discriminatedUnion:
|
|
13285
|
+
date: Vm,
|
|
13286
|
+
discriminatedUnion: Xm,
|
|
13287
13287
|
effect: pd,
|
|
13288
|
-
enum:
|
|
13289
|
-
function:
|
|
13290
|
-
instanceof:
|
|
13291
|
-
intersection:
|
|
13292
|
-
lazy:
|
|
13293
|
-
literal:
|
|
13294
|
-
map:
|
|
13295
|
-
nan:
|
|
13296
|
-
nativeEnum:
|
|
13297
|
-
never:
|
|
13298
|
-
null:
|
|
13299
|
-
nullable:
|
|
13288
|
+
enum: a1,
|
|
13289
|
+
function: i1,
|
|
13290
|
+
instanceof: Dm,
|
|
13291
|
+
intersection: Qm,
|
|
13292
|
+
lazy: s1,
|
|
13293
|
+
literal: o1,
|
|
13294
|
+
map: r1,
|
|
13295
|
+
nan: $m,
|
|
13296
|
+
nativeEnum: c1,
|
|
13297
|
+
never: qm,
|
|
13298
|
+
null: Fm,
|
|
13299
|
+
nullable: f1,
|
|
13300
13300
|
number: R0,
|
|
13301
|
-
object:
|
|
13302
|
-
oboolean:
|
|
13303
|
-
onumber:
|
|
13304
|
-
optional:
|
|
13305
|
-
ostring:
|
|
13306
|
-
pipeline:
|
|
13307
|
-
preprocess:
|
|
13308
|
-
promise:
|
|
13309
|
-
record:
|
|
13310
|
-
set:
|
|
13311
|
-
strictObject:
|
|
13301
|
+
object: Wm,
|
|
13302
|
+
oboolean: g1,
|
|
13303
|
+
onumber: y1,
|
|
13304
|
+
optional: u1,
|
|
13305
|
+
ostring: p1,
|
|
13306
|
+
pipeline: d1,
|
|
13307
|
+
preprocess: h1,
|
|
13308
|
+
promise: l1,
|
|
13309
|
+
record: t1,
|
|
13310
|
+
set: n1,
|
|
13311
|
+
strictObject: Ym,
|
|
13312
13312
|
string: j0,
|
|
13313
|
-
symbol:
|
|
13313
|
+
symbol: Lm,
|
|
13314
13314
|
transformer: pd,
|
|
13315
|
-
tuple:
|
|
13316
|
-
undefined:
|
|
13317
|
-
union:
|
|
13318
|
-
unknown:
|
|
13319
|
-
void:
|
|
13320
|
-
NEVER:
|
|
13315
|
+
tuple: e1,
|
|
13316
|
+
undefined: Hm,
|
|
13317
|
+
union: Jm,
|
|
13318
|
+
unknown: Gm,
|
|
13319
|
+
void: Km,
|
|
13320
|
+
NEVER: m1,
|
|
13321
13321
|
ZodIssueCode: F,
|
|
13322
|
-
quotelessJson:
|
|
13322
|
+
quotelessJson: vm,
|
|
13323
13323
|
ZodError: _r
|
|
13324
13324
|
});
|
|
13325
13325
|
const Ua = new Uint8Array([48, 130, 2, 17, 48, 130, 1, 150, 160, 3, 2, 1, 2, 2, 17, 0, 249, 49, 117, 104, 27, 144, 175, 225, 29, 70, 204, 180, 228, 231, 248, 86, 48, 10, 6, 8, 42, 134, 72, 206, 61, 4, 3, 3, 48, 73, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 15, 48, 13, 6, 3, 85, 4, 10, 12, 6, 65, 109, 97, 122, 111, 110, 49, 12, 48, 10, 6, 3, 85, 4, 11, 12, 3, 65, 87, 83, 49, 27, 48, 25, 6, 3, 85, 4, 3, 12, 18, 97, 119, 115, 46, 110, 105, 116, 114, 111, 45, 101, 110, 99, 108, 97, 118, 101, 115, 48, 30, 23, 13, 49, 57, 49, 48, 50, 56, 49, 51, 50, 56, 48, 53, 90, 23, 13, 52, 57, 49, 48, 50, 56, 49, 52, 50, 56, 48, 53, 90, 48, 73, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 15, 48, 13, 6, 3, 85, 4, 10, 12, 6, 65, 109, 97, 122, 111, 110, 49, 12, 48, 10, 6, 3, 85, 4, 11, 12, 3, 65, 87, 83, 49, 27, 48, 25, 6, 3, 85, 4, 3, 12, 18, 97, 119, 115, 46, 110, 105, 116, 114, 111, 45, 101, 110, 99, 108, 97, 118, 101, 115, 48, 118, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 34, 3, 98, 0, 4, 252, 2, 84, 235, 166, 8, 193, 243, 104, 112, 226, 154, 218, 144, 190, 70, 56, 50, 146, 115, 110, 137, 75, 255, 246, 114, 217, 137, 68, 75, 80, 81, 229, 52, 164, 177, 246, 219, 227, 192, 188, 88, 26, 50, 183, 177, 118, 7, 14, 222, 18, 214, 154, 63, 234, 33, 27, 102, 231, 82, 207, 125, 209, 221, 9, 95, 111, 19, 112, 244, 23, 8, 67, 217, 220, 16, 1, 33, 228, 207, 99, 1, 40, 9, 102, 68, 135, 201, 121, 98, 132, 48, 77, 197, 63, 244, 163, 66, 48, 64, 48, 15, 6, 3, 85, 29, 19, 1, 1, 255, 4, 5, 48, 3, 1, 1, 255, 48, 29, 6, 3, 85, 29, 14, 4, 22, 4, 20, 144, 37, 181, 13, 217, 5, 71, 231, 150, 195, 150, 250, 114, 157, 207, 153, 169, 223, 75, 150, 48, 14, 6, 3, 85, 29, 15, 1, 1, 255, 4, 4, 3, 2, 1, 134, 48, 10, 6, 8, 42, 134, 72, 206, 61, 4, 3, 3, 3, 105, 0, 48, 102, 2, 49, 0, 163, 127, 47, 145, 161, 201, 189, 94, 231, 184, 98, 124, 22, 152, 210, 85, 3, 142, 31, 3, 67, 249, 91, 99, 169, 98, 140, 61, 57, 128, 149, 69, 161, 30, 188, 191, 46, 59, 85, 216, 174, 238, 113, 180, 195, 214, 173, 243, 2, 49, 0, 162, 243, 155, 22, 5, 178, 112, 40, 165, 221, 75, 160, 105, 181, 1, 110, 101, 180, 251, 222, 143, 224, 6, 29, 106, 83, 25, 127, 156, 218, 245, 217, 67, 188, 97, 252, 43, 235, 3, 203, 111, 238, 141, 35, 2, 243, 223, 246]);
|
|
13326
13326
|
if (!Ua || Ua.length === 0)
|
|
13327
13327
|
throw new Error("AWS root certificate is empty or not loaded correctly");
|
|
13328
|
-
const
|
|
13328
|
+
const w1 = Bt.object({
|
|
13329
13329
|
module_id: Bt.string().min(1),
|
|
13330
13330
|
digest: Bt.literal("SHA384"),
|
|
13331
13331
|
timestamp: Bt.number().min(1677721600),
|
|
@@ -13335,18 +13335,18 @@ const m1 = Bt.object({
|
|
|
13335
13335
|
public_key: Bt.nullable(Bt.instanceof(Uint8Array)),
|
|
13336
13336
|
user_data: Bt.nullable(Bt.instanceof(Uint8Array)),
|
|
13337
13337
|
nonce: Bt.nullable(Bt.instanceof(Uint8Array))
|
|
13338
|
-
}),
|
|
13338
|
+
}), b1 = Bt.object({
|
|
13339
13339
|
protected: Bt.instanceof(Uint8Array),
|
|
13340
13340
|
// There's an "unprotected" header in the CBOR, but we never use it
|
|
13341
13341
|
payload: Bt.instanceof(Uint8Array),
|
|
13342
13342
|
signature: Bt.instanceof(Uint8Array)
|
|
13343
13343
|
});
|
|
13344
|
-
async function
|
|
13344
|
+
async function x1(r) {
|
|
13345
13345
|
try {
|
|
13346
13346
|
if (!r)
|
|
13347
13347
|
throw new Error("Attestation document is empty.");
|
|
13348
13348
|
const e = Rs(r), t = Ca(e), n = t[0], i = t[2], s = t[3];
|
|
13349
|
-
return
|
|
13349
|
+
return b1.parse({
|
|
13350
13350
|
protected: n,
|
|
13351
13351
|
payload: i,
|
|
13352
13352
|
signature: s
|
|
@@ -13355,15 +13355,15 @@ async function b1(r) {
|
|
|
13355
13355
|
throw console.error("Error parsing document data:", e), new Error("Failed to parse document data.");
|
|
13356
13356
|
}
|
|
13357
13357
|
}
|
|
13358
|
-
async function
|
|
13358
|
+
async function A1(r) {
|
|
13359
13359
|
try {
|
|
13360
13360
|
const e = Ca(r);
|
|
13361
|
-
return
|
|
13361
|
+
return w1.parse(e);
|
|
13362
13362
|
} catch (e) {
|
|
13363
13363
|
throw console.error("Error parsing document payload:", e), new Error("Failed to parse document payload.");
|
|
13364
13364
|
}
|
|
13365
13365
|
}
|
|
13366
|
-
function
|
|
13366
|
+
function S1(r, e) {
|
|
13367
13367
|
const t = [
|
|
13368
13368
|
"Signature1",
|
|
13369
13369
|
// Context string
|
|
@@ -13376,10 +13376,10 @@ function A1(r, e) {
|
|
|
13376
13376
|
];
|
|
13377
13377
|
return jc(t);
|
|
13378
13378
|
}
|
|
13379
|
-
async function
|
|
13379
|
+
async function _1(r, e) {
|
|
13380
13380
|
try {
|
|
13381
13381
|
console.log("SIGNATURE:"), console.log($r(r.signature));
|
|
13382
|
-
const t =
|
|
13382
|
+
const t = S1(r.protected, r.payload), n = await crypto.subtle.digest("SHA-384", t);
|
|
13383
13383
|
return console.log("SIGNATURE STRUCTURE DIGEST:"), console.log($r(new Uint8Array(n))), await crypto.subtle.verify(
|
|
13384
13384
|
// TODO: these could be derived from the document, but we're hardcoding them for now
|
|
13385
13385
|
{
|
|
@@ -13396,7 +13396,7 @@ async function S1(r, e) {
|
|
|
13396
13396
|
}
|
|
13397
13397
|
async function Si(r, e, t) {
|
|
13398
13398
|
try {
|
|
13399
|
-
const n = await
|
|
13399
|
+
const n = await x1(r), i = await A1(n.payload);
|
|
13400
13400
|
if (!i.nonce)
|
|
13401
13401
|
throw new Error("Attestation document does not have a nonce.");
|
|
13402
13402
|
const o = new TextDecoder("utf-8").decode(i.nonce);
|
|
@@ -13409,7 +13409,7 @@ async function Si(r, e, t) {
|
|
|
13409
13409
|
const P = new wi(i.cabundle[I]);
|
|
13410
13410
|
c.push(P);
|
|
13411
13411
|
}
|
|
13412
|
-
const h = new wi(i.certificate), x = await new
|
|
13412
|
+
const h = new wi(i.certificate), x = await new Fv({
|
|
13413
13413
|
certificates: c
|
|
13414
13414
|
}).build(h);
|
|
13415
13415
|
console.log("Chain items:", x);
|
|
@@ -13424,7 +13424,7 @@ async function Si(r, e, t) {
|
|
|
13424
13424
|
throw new Error("Certificate chain length does not match length of cabundle.");
|
|
13425
13425
|
const v = h.publicKey;
|
|
13426
13426
|
console.log("PUBLIC KEY:"), console.log($r(new Uint8Array(v.rawData)));
|
|
13427
|
-
const A = await v.export(), O = await
|
|
13427
|
+
const A = await v.export(), O = await _1(n, A);
|
|
13428
13428
|
if (console.log("Signature verified:", O), !O)
|
|
13429
13429
|
throw new Error("Signature verification failed.");
|
|
13430
13430
|
return i;
|
|
@@ -13432,29 +13432,29 @@ async function Si(r, e, t) {
|
|
|
13432
13432
|
throw console.error("Error verifying attestation document:", n), n;
|
|
13433
13433
|
}
|
|
13434
13434
|
}
|
|
13435
|
-
const
|
|
13435
|
+
const E1 = Bt.object({
|
|
13436
13436
|
public_key: Bt.nullable(Bt.instanceof(Uint8Array))
|
|
13437
13437
|
});
|
|
13438
|
-
async function
|
|
13438
|
+
async function I1(r) {
|
|
13439
13439
|
const e = Rs(r), n = Ca(e)[2], i = Ca(n);
|
|
13440
|
-
return await
|
|
13440
|
+
return await E1.parse(i);
|
|
13441
13441
|
}
|
|
13442
|
-
async function
|
|
13442
|
+
async function k1(r, e) {
|
|
13443
13443
|
try {
|
|
13444
|
-
const t = await
|
|
13445
|
-
return n && (n === "http://127.0.0.1:3000" || n === "http://localhost:3000" || n === "http://0.0.0.0:3000") ? (console.log("DEV MODE: Using fake attestation document"), await
|
|
13444
|
+
const t = await W1(r, e), n = e || H1();
|
|
13445
|
+
return n && (n === "http://127.0.0.1:3000" || n === "http://localhost:3000" || n === "http://0.0.0.0:3000") ? (console.log("DEV MODE: Using fake attestation document"), await I1(t)) : await Si(t, Ua, r);
|
|
13446
13446
|
} catch (t) {
|
|
13447
13447
|
throw t instanceof Error ? (console.error("Error verifying attestation document:", t), new Error(`Couldn't process attestation document: ${t.message}`)) : (console.error("Error verifying attestation document:", t), new Error("Couldn't process attestation document."));
|
|
13448
13448
|
}
|
|
13449
13449
|
}
|
|
13450
|
-
function
|
|
13450
|
+
function C1(r) {
|
|
13451
13451
|
throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
13452
13452
|
}
|
|
13453
13453
|
var D0 = { exports: {} };
|
|
13454
|
-
const
|
|
13454
|
+
const B1 = {}, O1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
13455
13455
|
__proto__: null,
|
|
13456
|
-
default:
|
|
13457
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
13456
|
+
default: B1
|
|
13457
|
+
}, Symbol.toStringTag, { value: "Module" })), T1 = /* @__PURE__ */ Zy(O1);
|
|
13458
13458
|
(function(r) {
|
|
13459
13459
|
(function(e) {
|
|
13460
13460
|
var t = function(l) {
|
|
@@ -14010,7 +14010,7 @@ const C1 = {}, B1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14010
14010
|
if (l.length !== k) throw new Error("bad key size");
|
|
14011
14011
|
if (p.length !== T) throw new Error("bad nonce size");
|
|
14012
14012
|
}
|
|
14013
|
-
function
|
|
14013
|
+
function By(l, p) {
|
|
14014
14014
|
if (l.length !== Re) throw new Error("bad public key size");
|
|
14015
14015
|
if (p.length !== Z) throw new Error("bad secret key size");
|
|
14016
14016
|
}
|
|
@@ -14046,7 +14046,7 @@ const C1 = {}, B1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14046
14046
|
var g = e.box.before(d, a);
|
|
14047
14047
|
return e.secretbox(l, p, g);
|
|
14048
14048
|
}, e.box.before = function(l, p) {
|
|
14049
|
-
xr(l, p),
|
|
14049
|
+
xr(l, p), By(l, p);
|
|
14050
14050
|
var d = new Uint8Array(te);
|
|
14051
14051
|
return pn(d, l, p), d;
|
|
14052
14052
|
}, e.box.after = e.secretbox, e.box.open = function(l, p, d, a) {
|
|
@@ -14116,7 +14116,7 @@ const C1 = {}, B1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14116
14116
|
for (g = 0; g < a; g++) d[g] = S[g];
|
|
14117
14117
|
Sf(S);
|
|
14118
14118
|
});
|
|
14119
|
-
} else typeof
|
|
14119
|
+
} else typeof C1 < "u" && (l = T1, l && l.randomBytes && e.setPRNG(function(d, a) {
|
|
14120
14120
|
var g, S = l.randomBytes(a);
|
|
14121
14121
|
for (g = 0; g < a; g++) d[g] = S[g];
|
|
14122
14122
|
Sf(S);
|
|
@@ -14124,9 +14124,9 @@ const C1 = {}, B1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
14124
14124
|
}();
|
|
14125
14125
|
})(r.exports ? r.exports : self.nacl = self.nacl || {});
|
|
14126
14126
|
})(D0);
|
|
14127
|
-
var
|
|
14128
|
-
const $0 = /* @__PURE__ */
|
|
14129
|
-
function
|
|
14127
|
+
var N1 = D0.exports;
|
|
14128
|
+
const $0 = /* @__PURE__ */ Ky(N1);
|
|
14129
|
+
function P1() {
|
|
14130
14130
|
return $0.box.keyPair();
|
|
14131
14131
|
}
|
|
14132
14132
|
async function _i(r, e) {
|
|
@@ -14139,12 +14139,12 @@ async function _i(r, e) {
|
|
|
14139
14139
|
}
|
|
14140
14140
|
const i = window.crypto.randomUUID();
|
|
14141
14141
|
console.log("Generated attestation nonce:", i);
|
|
14142
|
-
const s = await
|
|
14142
|
+
const s = await k1(i, e);
|
|
14143
14143
|
if (s && s.public_key) {
|
|
14144
14144
|
console.log("Attestation document verification succeeded");
|
|
14145
|
-
const o =
|
|
14145
|
+
const o = P1();
|
|
14146
14146
|
console.log("Generated client key pair");
|
|
14147
|
-
const c = new Uint8Array(s.public_key), { encrypted_session_key: u, session_id: h } = await
|
|
14147
|
+
const c = new Uint8Array(s.public_key), { encrypted_session_key: u, session_id: h } = await Y1(
|
|
14148
14148
|
$r(o.publicKey),
|
|
14149
14149
|
i,
|
|
14150
14150
|
e
|
|
@@ -14163,10 +14163,10 @@ async function _i(r, e) {
|
|
|
14163
14163
|
}
|
|
14164
14164
|
}
|
|
14165
14165
|
let lt = "";
|
|
14166
|
-
function
|
|
14166
|
+
function j1(r) {
|
|
14167
14167
|
lt = r;
|
|
14168
14168
|
}
|
|
14169
|
-
async function
|
|
14169
|
+
async function R1(r, e) {
|
|
14170
14170
|
return Tt(
|
|
14171
14171
|
`${lt}/platform/login`,
|
|
14172
14172
|
"POST",
|
|
@@ -14175,7 +14175,7 @@ async function j1(r, e) {
|
|
|
14175
14175
|
"Failed to login"
|
|
14176
14176
|
);
|
|
14177
14177
|
}
|
|
14178
|
-
async function
|
|
14178
|
+
async function U1(r, e, t, n) {
|
|
14179
14179
|
return Tt(
|
|
14180
14180
|
`${lt}/platform/register`,
|
|
14181
14181
|
"POST",
|
|
@@ -14184,7 +14184,7 @@ async function R1(r, e, t, n) {
|
|
|
14184
14184
|
"Failed to register"
|
|
14185
14185
|
);
|
|
14186
14186
|
}
|
|
14187
|
-
async function
|
|
14187
|
+
async function D1(r) {
|
|
14188
14188
|
return Tt(
|
|
14189
14189
|
`${lt}/platform/logout`,
|
|
14190
14190
|
"POST",
|
|
@@ -14193,7 +14193,7 @@ async function U1(r) {
|
|
|
14193
14193
|
"Failed to logout"
|
|
14194
14194
|
);
|
|
14195
14195
|
}
|
|
14196
|
-
async function
|
|
14196
|
+
async function $1() {
|
|
14197
14197
|
const r = window.localStorage.getItem("refresh_token");
|
|
14198
14198
|
if (!r) throw new Error("No refresh token available");
|
|
14199
14199
|
const e = { refresh_token: r };
|
|
@@ -14266,12 +14266,12 @@ async function q0(r, e) {
|
|
|
14266
14266
|
void 0
|
|
14267
14267
|
);
|
|
14268
14268
|
}
|
|
14269
|
-
function
|
|
14269
|
+
function M1(r) {
|
|
14270
14270
|
const e = /^[A-Za-z0-9+/]*[=]{0,2}$/, t = r.length % 4 === 0, n = e.test(r);
|
|
14271
14271
|
return t && n;
|
|
14272
14272
|
}
|
|
14273
14273
|
async function K0(r, e, t, n) {
|
|
14274
|
-
if (
|
|
14274
|
+
if (!M1(n))
|
|
14275
14275
|
throw new Error(
|
|
14276
14276
|
"Secret must be base64 encoded. Use @stablelib/base64's encode function to encode your data."
|
|
14277
14277
|
);
|
|
@@ -14381,7 +14381,7 @@ async function ay(r) {
|
|
|
14381
14381
|
void 0
|
|
14382
14382
|
);
|
|
14383
14383
|
}
|
|
14384
|
-
async function
|
|
14384
|
+
async function V1() {
|
|
14385
14385
|
return Pe(`${lt}/platform/me`, "GET", void 0);
|
|
14386
14386
|
}
|
|
14387
14387
|
async function cy(r) {
|
|
@@ -14447,7 +14447,7 @@ async function Pe(r, e, t, n) {
|
|
|
14447
14447
|
if (s) {
|
|
14448
14448
|
console.log("Refreshing access token");
|
|
14449
14449
|
const u = Ho.getRefreshFunction(r);
|
|
14450
|
-
console.log(`Using ${u}`), u === "platformRefreshToken" ? await
|
|
14450
|
+
console.log(`Using ${u}`), u === "platformRefreshToken" ? await $1() : await Uc();
|
|
14451
14451
|
}
|
|
14452
14452
|
const o = window.localStorage.getItem("access_token");
|
|
14453
14453
|
if (!o)
|
|
@@ -14538,27 +14538,27 @@ async function Tt(r, e, t, n, i) {
|
|
|
14538
14538
|
return s.data;
|
|
14539
14539
|
}
|
|
14540
14540
|
let Xe = "";
|
|
14541
|
-
function
|
|
14541
|
+
function L1(r) {
|
|
14542
14542
|
Xe = r;
|
|
14543
14543
|
}
|
|
14544
|
-
function
|
|
14544
|
+
function H1() {
|
|
14545
14545
|
return Xe;
|
|
14546
14546
|
}
|
|
14547
|
-
async function
|
|
14547
|
+
async function F1(r, e, t) {
|
|
14548
14548
|
return Tt(
|
|
14549
14549
|
`${Xe}/login`,
|
|
14550
14550
|
"POST",
|
|
14551
14551
|
{ email: r, password: e, client_id: t }
|
|
14552
14552
|
);
|
|
14553
14553
|
}
|
|
14554
|
-
async function
|
|
14554
|
+
async function z1(r, e, t) {
|
|
14555
14555
|
return Tt(
|
|
14556
14556
|
`${Xe}/login`,
|
|
14557
14557
|
"POST",
|
|
14558
14558
|
{ id: r, password: e, client_id: t }
|
|
14559
14559
|
);
|
|
14560
14560
|
}
|
|
14561
|
-
async function
|
|
14561
|
+
async function G1(r, e, t, n, i) {
|
|
14562
14562
|
return Tt(`${Xe}/register`, "POST", {
|
|
14563
14563
|
email: r,
|
|
14564
14564
|
password: e,
|
|
@@ -14567,7 +14567,7 @@ async function z1(r, e, t, n, i) {
|
|
|
14567
14567
|
name: i
|
|
14568
14568
|
});
|
|
14569
14569
|
}
|
|
14570
|
-
async function
|
|
14570
|
+
async function q1(r, e, t) {
|
|
14571
14571
|
return Tt(`${Xe}/register`, "POST", {
|
|
14572
14572
|
password: r,
|
|
14573
14573
|
inviteCode: e.toLowerCase(),
|
|
@@ -14591,7 +14591,7 @@ async function Uc() {
|
|
|
14591
14591
|
throw console.error("Error refreshing token:", t), t;
|
|
14592
14592
|
}
|
|
14593
14593
|
}
|
|
14594
|
-
async function
|
|
14594
|
+
async function K1() {
|
|
14595
14595
|
return Pe(
|
|
14596
14596
|
`${Xe}/protected/user`,
|
|
14597
14597
|
"GET",
|
|
@@ -14636,7 +14636,7 @@ async function gy() {
|
|
|
14636
14636
|
"Failed to list key-value pairs"
|
|
14637
14637
|
);
|
|
14638
14638
|
}
|
|
14639
|
-
async function
|
|
14639
|
+
async function Z1(r) {
|
|
14640
14640
|
const e = { refresh_token: r };
|
|
14641
14641
|
return Tt(`${Xe}/logout`, "POST", e);
|
|
14642
14642
|
}
|
|
@@ -14657,13 +14657,13 @@ async function $a() {
|
|
|
14657
14657
|
"Failed to request new verification code"
|
|
14658
14658
|
);
|
|
14659
14659
|
}
|
|
14660
|
-
async function
|
|
14660
|
+
async function W1(r, e) {
|
|
14661
14661
|
const n = await fetch(`${e || Xe}/attestation/${r}`);
|
|
14662
14662
|
if (!n.ok)
|
|
14663
14663
|
throw new Error(`Request failed with status ${n.status}`);
|
|
14664
14664
|
return (await n.json()).attestation_document;
|
|
14665
14665
|
}
|
|
14666
|
-
async function
|
|
14666
|
+
async function Y1(r, e, t) {
|
|
14667
14667
|
const i = await fetch(`${t || Xe}/key_exchange`, {
|
|
14668
14668
|
method: "POST",
|
|
14669
14669
|
headers: {
|
|
@@ -14675,7 +14675,7 @@ async function W1(r, e, t) {
|
|
|
14675
14675
|
throw new Error("Key exchange failed");
|
|
14676
14676
|
return i.json();
|
|
14677
14677
|
}
|
|
14678
|
-
async function
|
|
14678
|
+
async function J1(r, e, t) {
|
|
14679
14679
|
const n = {
|
|
14680
14680
|
email: r,
|
|
14681
14681
|
hashed_secret: e,
|
|
@@ -14689,7 +14689,7 @@ async function Y1(r, e, t) {
|
|
|
14689
14689
|
"Failed to request password reset"
|
|
14690
14690
|
);
|
|
14691
14691
|
}
|
|
14692
|
-
async function
|
|
14692
|
+
async function X1(r, e, t, n, i) {
|
|
14693
14693
|
const s = {
|
|
14694
14694
|
email: r,
|
|
14695
14695
|
alphanumeric_code: e,
|
|
@@ -14717,7 +14717,7 @@ async function my(r, e) {
|
|
|
14717
14717
|
"Failed to change password"
|
|
14718
14718
|
);
|
|
14719
14719
|
}
|
|
14720
|
-
async function
|
|
14720
|
+
async function Q1(r, e) {
|
|
14721
14721
|
try {
|
|
14722
14722
|
return await Tt(
|
|
14723
14723
|
`${Xe}/auth/github`,
|
|
@@ -14730,7 +14730,7 @@ async function X1(r, e) {
|
|
|
14730
14730
|
throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
|
|
14731
14731
|
}
|
|
14732
14732
|
}
|
|
14733
|
-
async function
|
|
14733
|
+
async function ew(r, e, t) {
|
|
14734
14734
|
const n = { code: r, state: e, invite_code: t };
|
|
14735
14735
|
try {
|
|
14736
14736
|
return await Tt(
|
|
@@ -14748,7 +14748,7 @@ async function Q1(r, e, t) {
|
|
|
14748
14748
|
) : new Error("Failed to authenticate with GitHub. Please try again.") : i;
|
|
14749
14749
|
}
|
|
14750
14750
|
}
|
|
14751
|
-
async function
|
|
14751
|
+
async function tw(r, e) {
|
|
14752
14752
|
try {
|
|
14753
14753
|
return await Tt(
|
|
14754
14754
|
`${Xe}/auth/google`,
|
|
@@ -14761,7 +14761,7 @@ async function ew(r, e) {
|
|
|
14761
14761
|
throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
|
|
14762
14762
|
}
|
|
14763
14763
|
}
|
|
14764
|
-
async function
|
|
14764
|
+
async function rw(r, e, t) {
|
|
14765
14765
|
const n = { code: r, state: e, invite_code: t };
|
|
14766
14766
|
try {
|
|
14767
14767
|
return await Tt(
|
|
@@ -14779,7 +14779,7 @@ async function tw(r, e, t) {
|
|
|
14779
14779
|
) : new Error("Failed to authenticate with Google. Please try again.") : i;
|
|
14780
14780
|
}
|
|
14781
14781
|
}
|
|
14782
|
-
async function
|
|
14782
|
+
async function nw(r, e) {
|
|
14783
14783
|
try {
|
|
14784
14784
|
return await Tt(
|
|
14785
14785
|
`${Xe}/auth/apple`,
|
|
@@ -14792,7 +14792,7 @@ async function rw(r, e) {
|
|
|
14792
14792
|
throw t instanceof Error && t.message.includes("Invalid invite code") ? new Error("Invalid invite code. Please check and try again.") : t;
|
|
14793
14793
|
}
|
|
14794
14794
|
}
|
|
14795
|
-
async function
|
|
14795
|
+
async function iw(r, e, t) {
|
|
14796
14796
|
const n = { code: r, state: e, invite_code: t };
|
|
14797
14797
|
try {
|
|
14798
14798
|
return await Tt(
|
|
@@ -14810,7 +14810,7 @@ async function nw(r, e, t) {
|
|
|
14810
14810
|
) : new Error("Failed to authenticate with Apple. Please try again.") : i;
|
|
14811
14811
|
}
|
|
14812
14812
|
}
|
|
14813
|
-
async function
|
|
14813
|
+
async function sw(r, e, t) {
|
|
14814
14814
|
const n = {
|
|
14815
14815
|
...r,
|
|
14816
14816
|
client_id: e,
|
|
@@ -14882,7 +14882,7 @@ async function Ay(r, e) {
|
|
|
14882
14882
|
"Failed to fetch public key"
|
|
14883
14883
|
);
|
|
14884
14884
|
}
|
|
14885
|
-
async function
|
|
14885
|
+
async function ow(r, e, t) {
|
|
14886
14886
|
const n = {
|
|
14887
14887
|
email: r,
|
|
14888
14888
|
password: e,
|
|
@@ -14895,7 +14895,7 @@ async function sw(r, e, t) {
|
|
|
14895
14895
|
"Failed to convert guest account"
|
|
14896
14896
|
);
|
|
14897
14897
|
}
|
|
14898
|
-
async function
|
|
14898
|
+
async function aw(r) {
|
|
14899
14899
|
return Pe(
|
|
14900
14900
|
`${Xe}/protected/third_party_token`,
|
|
14901
14901
|
"POST",
|
|
@@ -14927,7 +14927,7 @@ async function _y(r, e) {
|
|
|
14927
14927
|
"Failed to decrypt data"
|
|
14928
14928
|
);
|
|
14929
14929
|
}
|
|
14930
|
-
async function
|
|
14930
|
+
async function cw(r) {
|
|
14931
14931
|
const e = {
|
|
14932
14932
|
hashed_secret: r
|
|
14933
14933
|
};
|
|
@@ -14938,7 +14938,7 @@ async function aw(r) {
|
|
|
14938
14938
|
"Failed to request account deletion"
|
|
14939
14939
|
);
|
|
14940
14940
|
}
|
|
14941
|
-
async function
|
|
14941
|
+
async function lw(r, e) {
|
|
14942
14942
|
const t = {
|
|
14943
14943
|
confirmation_code: r,
|
|
14944
14944
|
plaintext_secret: e
|
|
@@ -14950,7 +14950,7 @@ async function cw(r, e) {
|
|
|
14950
14950
|
"Failed to confirm account deletion"
|
|
14951
14951
|
);
|
|
14952
14952
|
}
|
|
14953
|
-
async function
|
|
14953
|
+
async function Ey() {
|
|
14954
14954
|
try {
|
|
14955
14955
|
const r = await Pe(
|
|
14956
14956
|
`${Xe}/v1/models`,
|
|
@@ -15185,18 +15185,18 @@ async function ww(r, e) {
|
|
|
15185
15185
|
};
|
|
15186
15186
|
}
|
|
15187
15187
|
const ts = Ua, Dc = "641a0321a3e244efe456463195d606317ed7cdcc3c1756e09893f3c68f79bb5b";
|
|
15188
|
-
function
|
|
15188
|
+
function Iy(r) {
|
|
15189
15189
|
return Array.from(r).map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
15190
15190
|
}
|
|
15191
15191
|
async function bw(r) {
|
|
15192
15192
|
const e = await crypto.subtle.digest("SHA-256", r);
|
|
15193
|
-
return
|
|
15193
|
+
return Iy(new Uint8Array(e));
|
|
15194
15194
|
}
|
|
15195
15195
|
async function rs(r, e, t) {
|
|
15196
15196
|
console.log("Raw timestamp:", r.timestamp), console.log("Date object:", new Date(r.timestamp));
|
|
15197
15197
|
const n = Array.from(r.pcrs.entries()).map(([m, x]) => ({
|
|
15198
15198
|
id: m,
|
|
15199
|
-
value:
|
|
15199
|
+
value: Iy(x)
|
|
15200
15200
|
})).filter((m) => !m.value.match(/^0+$/)), i = n.find((m) => m.id === 0);
|
|
15201
15201
|
let s = null;
|
|
15202
15202
|
i && (s = await ww(i.value, t));
|
|
@@ -15231,7 +15231,7 @@ async function rs(r, e, t) {
|
|
|
15231
15231
|
validatedPcr0Hash: s
|
|
15232
15232
|
};
|
|
15233
15233
|
}
|
|
15234
|
-
const
|
|
15234
|
+
const ky = wd({
|
|
15235
15235
|
auth: {
|
|
15236
15236
|
loading: !0,
|
|
15237
15237
|
user: void 0
|
|
@@ -15301,7 +15301,7 @@ const Iy = wd({
|
|
|
15301
15301
|
generateThirdPartyToken: async () => ({ token: "" }),
|
|
15302
15302
|
encryptData: Sy,
|
|
15303
15303
|
decryptData: _y,
|
|
15304
|
-
fetchModels:
|
|
15304
|
+
fetchModels: Ey
|
|
15305
15305
|
});
|
|
15306
15306
|
function xx({
|
|
15307
15307
|
children: r,
|
|
@@ -15322,7 +15322,7 @@ function xx({
|
|
|
15322
15322
|
throw new Error(
|
|
15323
15323
|
"OpenSecretProvider requires a non-empty clientId. Please provide a valid project UUID."
|
|
15324
15324
|
);
|
|
15325
|
-
|
|
15325
|
+
L1(e), Promise.resolve().then(() => xd).then(({ apiConfig: W }) => {
|
|
15326
15326
|
const ne = W.platformApiUrl || "";
|
|
15327
15327
|
W.configure(e, ne);
|
|
15328
15328
|
});
|
|
@@ -15339,7 +15339,7 @@ function xx({
|
|
|
15339
15339
|
return;
|
|
15340
15340
|
}
|
|
15341
15341
|
try {
|
|
15342
|
-
const ie = await
|
|
15342
|
+
const ie = await K1();
|
|
15343
15343
|
s({
|
|
15344
15344
|
loading: !1,
|
|
15345
15345
|
user: ie
|
|
@@ -15357,7 +15357,7 @@ function xx({
|
|
|
15357
15357
|
async function h(W, ne) {
|
|
15358
15358
|
console.log("Signing in");
|
|
15359
15359
|
try {
|
|
15360
|
-
const { access_token: ie, refresh_token: xe } = await
|
|
15360
|
+
const { access_token: ie, refresh_token: xe } = await F1(W, ne, t);
|
|
15361
15361
|
window.localStorage.setItem("access_token", ie), window.localStorage.setItem("refresh_token", xe), await u();
|
|
15362
15362
|
} catch (ie) {
|
|
15363
15363
|
throw console.error(ie), ie;
|
|
@@ -15365,7 +15365,7 @@ function xx({
|
|
|
15365
15365
|
}
|
|
15366
15366
|
async function m(W, ne, ie, xe) {
|
|
15367
15367
|
try {
|
|
15368
|
-
const { access_token: tt, refresh_token: At } = await
|
|
15368
|
+
const { access_token: tt, refresh_token: At } = await G1(
|
|
15369
15369
|
W,
|
|
15370
15370
|
ne,
|
|
15371
15371
|
ie,
|
|
@@ -15380,7 +15380,7 @@ function xx({
|
|
|
15380
15380
|
async function x(W, ne) {
|
|
15381
15381
|
console.log("Signing in Guest");
|
|
15382
15382
|
try {
|
|
15383
|
-
const { access_token: ie, refresh_token: xe } = await
|
|
15383
|
+
const { access_token: ie, refresh_token: xe } = await z1(W, ne, t);
|
|
15384
15384
|
window.localStorage.setItem("access_token", ie), window.localStorage.setItem("refresh_token", xe), await u();
|
|
15385
15385
|
} catch (ie) {
|
|
15386
15386
|
throw console.error(ie), ie;
|
|
@@ -15388,7 +15388,7 @@ function xx({
|
|
|
15388
15388
|
}
|
|
15389
15389
|
async function G(W, ne) {
|
|
15390
15390
|
try {
|
|
15391
|
-
const { access_token: ie, refresh_token: xe, id: tt } = await
|
|
15391
|
+
const { access_token: ie, refresh_token: xe, id: tt } = await q1(
|
|
15392
15392
|
W,
|
|
15393
15393
|
ne,
|
|
15394
15394
|
t
|
|
@@ -15400,7 +15400,7 @@ function xx({
|
|
|
15400
15400
|
}
|
|
15401
15401
|
async function N(W, ne, ie) {
|
|
15402
15402
|
try {
|
|
15403
|
-
await
|
|
15403
|
+
await ow(W, ne, ie), await u();
|
|
15404
15404
|
} catch (xe) {
|
|
15405
15405
|
throw console.error(xe), xe;
|
|
15406
15406
|
}
|
|
@@ -15409,7 +15409,7 @@ function xx({
|
|
|
15409
15409
|
const W = window.localStorage.getItem("refresh_token");
|
|
15410
15410
|
if (W)
|
|
15411
15411
|
try {
|
|
15412
|
-
await
|
|
15412
|
+
await Z1(W);
|
|
15413
15413
|
} catch (ne) {
|
|
15414
15414
|
console.error("Error during logout:", ne);
|
|
15415
15415
|
}
|
|
@@ -15437,20 +15437,20 @@ function xx({
|
|
|
15437
15437
|
requestNewVerificationEmail: $a,
|
|
15438
15438
|
changePassword: my,
|
|
15439
15439
|
refreshAccessToken: Uc,
|
|
15440
|
-
requestPasswordReset: (W, ne) =>
|
|
15441
|
-
confirmPasswordReset: (W, ne, ie, xe) =>
|
|
15442
|
-
requestAccountDeletion:
|
|
15443
|
-
confirmAccountDeletion:
|
|
15440
|
+
requestPasswordReset: (W, ne) => J1(W, ne, t),
|
|
15441
|
+
confirmPasswordReset: (W, ne, ie, xe) => X1(W, ne, ie, xe, t),
|
|
15442
|
+
requestAccountDeletion: cw,
|
|
15443
|
+
confirmAccountDeletion: lw,
|
|
15444
15444
|
initiateGitHubAuth: async (W) => {
|
|
15445
15445
|
try {
|
|
15446
|
-
return await
|
|
15446
|
+
return await Q1(t, W);
|
|
15447
15447
|
} catch (ne) {
|
|
15448
15448
|
throw console.error("Failed to initiate GitHub auth:", ne), ne;
|
|
15449
15449
|
}
|
|
15450
15450
|
},
|
|
15451
15451
|
handleGitHubCallback: async (W, ne, ie) => {
|
|
15452
15452
|
try {
|
|
15453
|
-
const { access_token: xe, refresh_token: tt } = await
|
|
15453
|
+
const { access_token: xe, refresh_token: tt } = await ew(
|
|
15454
15454
|
W,
|
|
15455
15455
|
ne,
|
|
15456
15456
|
ie
|
|
@@ -15462,14 +15462,14 @@ function xx({
|
|
|
15462
15462
|
},
|
|
15463
15463
|
initiateGoogleAuth: async (W) => {
|
|
15464
15464
|
try {
|
|
15465
|
-
return await
|
|
15465
|
+
return await tw(t, W);
|
|
15466
15466
|
} catch (ne) {
|
|
15467
15467
|
throw console.error("Failed to initiate Google auth:", ne), ne;
|
|
15468
15468
|
}
|
|
15469
15469
|
},
|
|
15470
15470
|
handleGoogleCallback: async (W, ne, ie) => {
|
|
15471
15471
|
try {
|
|
15472
|
-
const { access_token: xe, refresh_token: tt } = await
|
|
15472
|
+
const { access_token: xe, refresh_token: tt } = await rw(
|
|
15473
15473
|
W,
|
|
15474
15474
|
ne,
|
|
15475
15475
|
ie
|
|
@@ -15481,14 +15481,14 @@ function xx({
|
|
|
15481
15481
|
},
|
|
15482
15482
|
initiateAppleAuth: async (W) => {
|
|
15483
15483
|
try {
|
|
15484
|
-
return await
|
|
15484
|
+
return await nw(t, W);
|
|
15485
15485
|
} catch (ne) {
|
|
15486
15486
|
throw console.error("Failed to initiate Apple auth:", ne), ne;
|
|
15487
15487
|
}
|
|
15488
15488
|
},
|
|
15489
15489
|
handleAppleCallback: async (W, ne, ie) => {
|
|
15490
15490
|
try {
|
|
15491
|
-
const { access_token: xe, refresh_token: tt } = await
|
|
15491
|
+
const { access_token: xe, refresh_token: tt } = await iw(
|
|
15492
15492
|
W,
|
|
15493
15493
|
ne,
|
|
15494
15494
|
ie
|
|
@@ -15500,7 +15500,7 @@ function xx({
|
|
|
15500
15500
|
},
|
|
15501
15501
|
handleAppleNativeSignIn: async (W, ne) => {
|
|
15502
15502
|
try {
|
|
15503
|
-
const { access_token: ie, refresh_token: xe } = await
|
|
15503
|
+
const { access_token: ie, refresh_token: xe } = await sw(
|
|
15504
15504
|
W,
|
|
15505
15505
|
t,
|
|
15506
15506
|
ne
|
|
@@ -15533,14 +15533,14 @@ function xx({
|
|
|
15533
15533
|
);
|
|
15534
15534
|
return rs(xe, xe.cabundle, n);
|
|
15535
15535
|
},
|
|
15536
|
-
generateThirdPartyToken:
|
|
15536
|
+
generateThirdPartyToken: aw,
|
|
15537
15537
|
encryptData: Sy,
|
|
15538
15538
|
decryptData: _y,
|
|
15539
|
-
fetchModels:
|
|
15539
|
+
fetchModels: Ey
|
|
15540
15540
|
};
|
|
15541
|
-
return /* @__PURE__ */ md(
|
|
15541
|
+
return /* @__PURE__ */ md(ky.Provider, { value: je, children: r });
|
|
15542
15542
|
}
|
|
15543
|
-
const
|
|
15543
|
+
const Cy = wd({
|
|
15544
15544
|
auth: {
|
|
15545
15545
|
loading: !0,
|
|
15546
15546
|
developer: void 0
|
|
@@ -15611,7 +15611,7 @@ function Ax({
|
|
|
15611
15611
|
throw new Error(
|
|
15612
15612
|
"OpenSecretDeveloper requires a non-empty apiUrl. Please provide a valid API endpoint URL."
|
|
15613
15613
|
);
|
|
15614
|
-
|
|
15614
|
+
j1(e), Promise.resolve().then(() => xd).then(({ apiConfig: m }) => {
|
|
15615
15615
|
const x = m.appApiUrl || "";
|
|
15616
15616
|
m.configure(x, e);
|
|
15617
15617
|
}).catch((m) => {
|
|
@@ -15630,7 +15630,7 @@ function Ax({
|
|
|
15630
15630
|
return;
|
|
15631
15631
|
}
|
|
15632
15632
|
try {
|
|
15633
|
-
const G = await
|
|
15633
|
+
const G = await V1();
|
|
15634
15634
|
i({
|
|
15635
15635
|
loading: !1,
|
|
15636
15636
|
developer: {
|
|
@@ -15661,7 +15661,7 @@ function Ax({
|
|
|
15661
15661
|
}, []);
|
|
15662
15662
|
async function c(m, x) {
|
|
15663
15663
|
try {
|
|
15664
|
-
const { access_token: G, refresh_token: N } = await
|
|
15664
|
+
const { access_token: G, refresh_token: N } = await R1(m, x);
|
|
15665
15665
|
return window.localStorage.setItem("access_token", G), window.localStorage.setItem("refresh_token", N), await s(), { access_token: G, refresh_token: N, id: "", email: m };
|
|
15666
15666
|
} catch (G) {
|
|
15667
15667
|
throw console.error("Login error:", G), G;
|
|
@@ -15669,7 +15669,7 @@ function Ax({
|
|
|
15669
15669
|
}
|
|
15670
15670
|
async function u(m, x, G, N) {
|
|
15671
15671
|
try {
|
|
15672
|
-
const { access_token: v, refresh_token: A } = await
|
|
15672
|
+
const { access_token: v, refresh_token: A } = await U1(
|
|
15673
15673
|
m,
|
|
15674
15674
|
x,
|
|
15675
15675
|
G,
|
|
@@ -15689,7 +15689,7 @@ function Ax({
|
|
|
15689
15689
|
const m = window.localStorage.getItem("refresh_token");
|
|
15690
15690
|
if (m)
|
|
15691
15691
|
try {
|
|
15692
|
-
await
|
|
15692
|
+
await D1(m);
|
|
15693
15693
|
} catch (x) {
|
|
15694
15694
|
console.error("Error during logout:", x);
|
|
15695
15695
|
}
|
|
@@ -15736,13 +15736,13 @@ function Ax({
|
|
|
15736
15736
|
acceptInvite: ay,
|
|
15737
15737
|
apiUrl: e
|
|
15738
15738
|
};
|
|
15739
|
-
return /* @__PURE__ */ md(
|
|
15739
|
+
return /* @__PURE__ */ md(Cy.Provider, { value: h, children: r });
|
|
15740
15740
|
}
|
|
15741
15741
|
function Sx() {
|
|
15742
|
-
return bd(
|
|
15742
|
+
return bd(ky);
|
|
15743
15743
|
}
|
|
15744
15744
|
function _x() {
|
|
15745
|
-
return bd(
|
|
15745
|
+
return bd(Cy);
|
|
15746
15746
|
}
|
|
15747
15747
|
function Ex() {
|
|
15748
15748
|
const r = new Uint8Array(32);
|
|
@@ -15753,9 +15753,9 @@ async function Ix(r) {
|
|
|
15753
15753
|
return Array.from(new Uint8Array(n)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
15754
15754
|
}
|
|
15755
15755
|
export {
|
|
15756
|
-
|
|
15756
|
+
ky as OpenSecretContext,
|
|
15757
15757
|
Ax as OpenSecretDeveloper,
|
|
15758
|
-
|
|
15758
|
+
Cy as OpenSecretDeveloperContext,
|
|
15759
15759
|
xx as OpenSecretProvider,
|
|
15760
15760
|
Ho as apiConfig,
|
|
15761
15761
|
Ex as generateSecureSecret,
|