@evolu/common 7.4.1 → 8.0.0-next.0
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/README.md +4 -61
- package/dist/src/Array.d.ts +343 -102
- package/dist/src/Array.d.ts.map +1 -1
- package/dist/src/Array.js +181 -85
- package/dist/src/Assert.d.ts +57 -11
- package/dist/src/Assert.d.ts.map +1 -1
- package/dist/src/Assert.js +47 -11
- package/dist/src/BigInt.d.ts +6 -1
- package/dist/src/BigInt.d.ts.map +1 -1
- package/dist/src/BigInt.js +5 -0
- package/dist/src/Brand.d.ts +40 -12
- package/dist/src/Brand.d.ts.map +1 -1
- package/dist/src/Brand.js +5 -0
- package/dist/src/Buffer.d.ts +6 -1
- package/dist/src/Buffer.d.ts.map +1 -1
- package/dist/src/Buffer.js +7 -2
- package/dist/src/Cache.d.ts +10 -2
- package/dist/src/Cache.d.ts.map +1 -1
- package/dist/src/Cache.js +6 -0
- package/dist/src/Callbacks.d.ts +10 -7
- package/dist/src/Callbacks.d.ts.map +1 -1
- package/dist/src/Callbacks.js +23 -13
- package/dist/src/Console.d.ts +361 -69
- package/dist/src/Console.d.ts.map +1 -1
- package/dist/src/Console.js +217 -117
- package/dist/src/Crypto.d.ts +70 -21
- package/dist/src/Crypto.d.ts.map +1 -1
- package/dist/src/Crypto.js +72 -27
- package/dist/src/Eq.d.ts +22 -2
- package/dist/src/Eq.d.ts.map +1 -1
- package/dist/src/Eq.js +21 -1
- package/dist/src/Error.d.ts +23 -12
- package/dist/src/Error.d.ts.map +1 -1
- package/dist/src/Error.js +27 -11
- package/dist/src/Function.d.ts +128 -56
- package/dist/src/Function.d.ts.map +1 -1
- package/dist/src/Function.js +118 -14
- package/dist/src/Identicon.d.ts +5 -0
- package/dist/src/Identicon.d.ts.map +1 -1
- package/dist/src/Identicon.js +6 -1
- package/dist/src/Lookup.d.ts +160 -0
- package/dist/src/Lookup.d.ts.map +1 -0
- package/dist/src/Lookup.js +192 -0
- package/dist/src/Microtask.d.ts +21 -0
- package/dist/src/Microtask.d.ts.map +1 -0
- package/dist/src/Microtask.js +37 -0
- package/dist/src/Number.d.ts +18 -4
- package/dist/src/Number.d.ts.map +1 -1
- package/dist/src/Number.js +23 -1
- package/dist/src/Object.d.ts +110 -5
- package/dist/src/Object.d.ts.map +1 -1
- package/dist/src/Object.js +108 -5
- package/dist/src/Option.d.ts +58 -0
- package/dist/src/Option.d.ts.map +1 -0
- package/dist/src/Option.js +43 -0
- package/dist/src/Order.d.ts +5 -0
- package/dist/src/Order.d.ts.map +1 -1
- package/dist/src/Order.js +8 -3
- package/dist/src/Platform.d.ts +36 -2
- package/dist/src/Platform.d.ts.map +1 -1
- package/dist/src/Platform.js +10 -6
- package/dist/src/Polyfills.d.ts +27 -0
- package/dist/src/Polyfills.d.ts.map +1 -0
- package/dist/src/Polyfills.js +299 -0
- package/dist/src/Random.d.ts +18 -7
- package/dist/src/Random.d.ts.map +1 -1
- package/dist/src/Random.js +9 -7
- package/dist/src/Redacted.d.ts +7 -4
- package/dist/src/Redacted.d.ts.map +1 -1
- package/dist/src/Redacted.js +5 -0
- package/dist/src/Ref.d.ts +31 -16
- package/dist/src/Ref.d.ts.map +1 -1
- package/dist/src/Ref.js +35 -7
- package/dist/src/RefCount.d.ts +62 -0
- package/dist/src/RefCount.d.ts.map +1 -0
- package/dist/src/RefCount.js +83 -0
- package/dist/src/Relation.d.ts +84 -29
- package/dist/src/Relation.d.ts.map +1 -1
- package/dist/src/Relation.js +83 -105
- package/dist/src/Resource.d.ts +263 -0
- package/dist/src/Resource.d.ts.map +1 -0
- package/dist/src/Resource.js +389 -0
- package/dist/src/Result.d.ts +390 -374
- package/dist/src/Result.d.ts.map +1 -1
- package/dist/src/Result.js +142 -70
- package/dist/src/Schedule.d.ts +953 -0
- package/dist/src/Schedule.d.ts.map +1 -0
- package/dist/src/Schedule.js +1199 -0
- package/dist/src/Set.d.ts +181 -0
- package/dist/src/Set.d.ts.map +1 -0
- package/dist/src/Set.js +137 -0
- package/dist/src/Skiplist.d.ts +6 -1
- package/dist/src/Skiplist.d.ts.map +1 -1
- package/dist/src/Skiplist.js +5 -0
- package/dist/src/Sqlite.d.ts +160 -60
- package/dist/src/Sqlite.d.ts.map +1 -1
- package/dist/src/Sqlite.js +290 -190
- package/dist/src/Store.d.ts +36 -28
- package/dist/src/Store.d.ts.map +1 -1
- package/dist/src/Store.js +55 -15
- package/dist/src/String.d.ts +5 -0
- package/dist/src/String.d.ts.map +1 -1
- package/dist/src/String.js +5 -0
- package/dist/src/Task.d.ts +2263 -423
- package/dist/src/Task.d.ts.map +1 -1
- package/dist/src/Task.js +1488 -348
- package/dist/src/Test.d.ts +122 -0
- package/dist/src/Test.d.ts.map +1 -0
- package/dist/src/Test.js +66 -0
- package/dist/src/Time.d.ts +201 -48
- package/dist/src/Time.d.ts.map +1 -1
- package/dist/src/Time.js +190 -86
- package/dist/src/Tracer.d.ts +48 -0
- package/dist/src/Tracer.d.ts.map +1 -0
- package/dist/src/Tracer.js +6 -0
- package/dist/src/Type.d.ts +582 -209
- package/dist/src/Type.d.ts.map +1 -1
- package/dist/src/Type.js +362 -240
- package/dist/src/Types.d.ts +160 -6
- package/dist/src/Types.d.ts.map +1 -1
- package/dist/src/Types.js +22 -2
- package/dist/src/WebSocket.d.ts +113 -58
- package/dist/src/WebSocket.d.ts.map +1 -1
- package/dist/src/WebSocket.js +210 -118
- package/dist/src/Worker.d.ts +245 -60
- package/dist/src/Worker.d.ts.map +1 -1
- package/dist/src/Worker.js +220 -64
- package/dist/src/index.d.ts +25 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +19 -3
- package/dist/src/local-first/Db.d.ts +24 -213
- package/dist/src/local-first/Db.d.ts.map +1 -1
- package/dist/src/local-first/Db.js +622 -293
- package/dist/src/local-first/Error.d.ts +12 -0
- package/dist/src/local-first/Error.d.ts.map +1 -0
- package/dist/src/local-first/Error.js +6 -0
- package/dist/src/local-first/Evolu.d.ts +330 -285
- package/dist/src/local-first/Evolu.d.ts.map +1 -1
- package/dist/src/local-first/Evolu.js +472 -402
- package/dist/src/local-first/LocalAuth.d.ts +10 -10
- package/dist/src/local-first/LocalAuth.d.ts.map +1 -1
- package/dist/src/local-first/LocalAuth.js +6 -1
- package/dist/src/local-first/Owner.d.ts +70 -27
- package/dist/src/local-first/Owner.d.ts.map +1 -1
- package/dist/src/local-first/Owner.js +27 -14
- package/dist/src/local-first/Protocol.d.ts +58 -50
- package/dist/src/local-first/Protocol.d.ts.map +1 -1
- package/dist/src/local-first/Protocol.js +253 -155
- package/dist/src/local-first/Query.d.ts +133 -43
- package/dist/src/local-first/Query.d.ts.map +1 -1
- package/dist/src/local-first/Query.js +139 -90
- package/dist/src/local-first/Relay.d.ts +18 -38
- package/dist/src/local-first/Relay.d.ts.map +1 -1
- package/dist/src/local-first/Relay.js +59 -171
- package/dist/src/local-first/Schema.d.ts +139 -144
- package/dist/src/local-first/Schema.d.ts.map +1 -1
- package/dist/src/local-first/Schema.js +78 -163
- package/dist/src/local-first/Shared.d.ts +125 -0
- package/dist/src/local-first/Shared.d.ts.map +1 -0
- package/dist/src/local-first/Shared.js +569 -0
- package/dist/src/local-first/Storage.d.ts +50 -53
- package/dist/src/local-first/Storage.d.ts.map +1 -1
- package/dist/src/local-first/Storage.js +121 -173
- package/dist/src/local-first/Timestamp.d.ts +28 -35
- package/dist/src/local-first/Timestamp.d.ts.map +1 -1
- package/dist/src/local-first/Timestamp.js +24 -25
- package/dist/src/local-first/index.d.ts +2 -15
- package/dist/src/local-first/index.d.ts.map +1 -1
- package/dist/src/local-first/index.js +2 -15
- package/package.json +36 -26
- package/src/Array.ts +467 -106
- package/src/Assert.ts +87 -12
- package/src/BigInt.ts +7 -1
- package/src/Brand.ts +41 -12
- package/src/Buffer.ts +10 -4
- package/src/Cache.ts +11 -2
- package/src/Callbacks.ts +33 -23
- package/src/Console.ts +567 -178
- package/src/Crypto.ts +111 -62
- package/src/Eq.ts +30 -3
- package/src/Error.ts +50 -34
- package/src/Function.ts +140 -68
- package/src/Identicon.ts +7 -1
- package/src/Lookup.ts +415 -0
- package/src/Microtask.ts +58 -0
- package/src/Number.ts +40 -7
- package/src/Object.ts +155 -16
- package/src/Option.ts +74 -0
- package/src/Order.ts +11 -3
- package/src/Platform.ts +43 -7
- package/src/Polyfills.ts +465 -0
- package/src/Random.ts +25 -11
- package/src/Redacted.ts +8 -4
- package/src/Ref.ts +72 -21
- package/src/RefCount.ts +170 -0
- package/src/Relation.ts +188 -136
- package/src/Resource.ts +864 -0
- package/src/Result.ts +548 -381
- package/src/Schedule.ts +1471 -0
- package/src/Set.ts +247 -0
- package/src/Skiplist.ts +7 -1
- package/src/Sqlite.ts +409 -304
- package/src/Store.ts +94 -48
- package/src/String.ts +6 -0
- package/src/Task.ts +3685 -740
- package/src/Test.ts +162 -0
- package/src/Time.ts +348 -145
- package/src/Tracer.ts +54 -0
- package/src/Type.ts +851 -430
- package/src/Types.ts +202 -7
- package/src/WebSocket.ts +311 -178
- package/src/Worker.ts +527 -147
- package/src/index.ts +74 -3
- package/src/local-first/Db.ts +871 -597
- package/src/local-first/Error.ts +17 -0
- package/src/local-first/Evolu.ts +884 -824
- package/src/local-first/LocalAuth.ts +10 -10
- package/src/local-first/Owner.ts +94 -42
- package/src/local-first/Protocol.ts +440 -303
- package/src/local-first/Query.ts +243 -194
- package/src/local-first/Relay.ts +91 -252
- package/src/local-first/Schema.ts +284 -394
- package/src/local-first/Shared.ts +932 -0
- package/src/local-first/Storage.ts +206 -277
- package/src/local-first/Timestamp.ts +38 -45
- package/src/local-first/index.ts +2 -16
- package/LICENSE +0 -21
- package/dist/src/Instances.d.ts +0 -34
- package/dist/src/Instances.d.ts.map +0 -1
- package/dist/src/Instances.js +0 -44
- package/dist/src/Resources.d.ts +0 -118
- package/dist/src/Resources.d.ts.map +0 -1
- package/dist/src/Resources.js +0 -197
- package/dist/src/local-first/Platform.d.ts +0 -25
- package/dist/src/local-first/Platform.d.ts.map +0 -1
- package/dist/src/local-first/Platform.js +0 -1
- package/dist/src/local-first/Public.d.ts +0 -22
- package/dist/src/local-first/Public.d.ts.map +0 -1
- package/dist/src/local-first/Public.js +0 -15
- package/dist/src/local-first/PublicKysely.d.ts +0 -148
- package/dist/src/local-first/PublicKysely.d.ts.map +0 -1
- package/dist/src/local-first/PublicKysely.js +0 -184
- package/dist/src/local-first/Sync.d.ts +0 -112
- package/dist/src/local-first/Sync.d.ts.map +0 -1
- package/dist/src/local-first/Sync.js +0 -526
- package/src/Instances.ts +0 -92
- package/src/Resources.ts +0 -367
- package/src/local-first/Platform.ts +0 -27
- package/src/local-first/Public.ts +0 -42
- package/src/local-first/PublicKysely.ts +0 -239
- package/src/local-first/Sync.ts +0 -949
package/dist/src/Crypto.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Cryptographic utilities
|
|
2
|
+
* Cryptographic utilities.
|
|
3
3
|
*
|
|
4
|
-
* Type-safe cryptographic operations including random
|
|
4
|
+
* Type-safe cryptographic operations including random bytes generation, SLIP21
|
|
5
5
|
* key derivation, XChaCha20-Poly1305 symmetric encryption, PADMÉ padding, and
|
|
6
6
|
* timing-safe comparisons.
|
|
7
7
|
*
|
|
@@ -11,15 +11,24 @@ import { xchacha20poly1305 } from "@noble/ciphers/chacha.js";
|
|
|
11
11
|
import { hmac } from "@noble/hashes/hmac.js";
|
|
12
12
|
import { sha512 } from "@noble/hashes/sha2.js";
|
|
13
13
|
import { randomBytes, utf8ToBytes } from "@noble/hashes/utils.js";
|
|
14
|
+
import { arrayFrom } from "./Array.js";
|
|
14
15
|
import { trySync } from "./Result.js";
|
|
15
|
-
import { brand, length, NonNegativeInt, Uint8Array } from "./Type.js";
|
|
16
|
-
const Entropy = brand("Entropy", Uint8Array);
|
|
17
|
-
export const Entropy16 = length(16)(Entropy);
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
16
|
+
import { brand, length, NonNegativeInt, Uint8Array, zeroNonNegativeInt, } from "./Type.js";
|
|
17
|
+
const Entropy = /*#__PURE__*/ brand("Entropy", Uint8Array);
|
|
18
|
+
export const Entropy16 = /*#__PURE__*/ length(16)(Entropy);
|
|
19
|
+
export const Entropy24 = /*#__PURE__*/ length(24)(Entropy);
|
|
20
|
+
export const Entropy32 = /*#__PURE__*/ length(32)(Entropy);
|
|
21
|
+
export const Entropy64 = /*#__PURE__*/ length(64)(Entropy);
|
|
20
22
|
export const createRandomBytes = () => ({
|
|
21
23
|
create: randomBytes,
|
|
22
24
|
});
|
|
25
|
+
/** Creates seeded random bytes for deterministic tests. */
|
|
26
|
+
export const testCreateRandomBytes = (deps) => ({
|
|
27
|
+
create: (bytesLength) => {
|
|
28
|
+
const array = arrayFrom(bytesLength, () => deps.randomLib.int(0, 255));
|
|
29
|
+
return new globalThis.Uint8Array(array);
|
|
30
|
+
},
|
|
31
|
+
});
|
|
23
32
|
/**
|
|
24
33
|
* SLIP21.
|
|
25
34
|
*
|
|
@@ -45,29 +54,65 @@ export const deriveSlip21Node = (label, parentNode) => {
|
|
|
45
54
|
message.set(labelBytes, 1);
|
|
46
55
|
return hmac(sha512, parentNode.slice(0, 32), message);
|
|
47
56
|
};
|
|
48
|
-
/** The encryption key for
|
|
49
|
-
export const EncryptionKey = brand("EncryptionKey", Entropy32);
|
|
57
|
+
/** The encryption key for symmetric encryption. */
|
|
58
|
+
export const EncryptionKey = /*#__PURE__*/ brand("EncryptionKey", Entropy32);
|
|
59
|
+
/** The nonce length for XChaCha20-Poly1305 encryption. */
|
|
60
|
+
export const xChaCha20Poly1305NonceLength = 24;
|
|
61
|
+
/**
|
|
62
|
+
* Branded Uint8Array for XChaCha20-Poly1305 encryption.
|
|
63
|
+
*
|
|
64
|
+
* @see {@link encryptWithXChaCha20Poly1305}
|
|
65
|
+
*/
|
|
66
|
+
export const XChaCha20Poly1305Ciphertext = /*#__PURE__*/ brand("XChaCha20Poly1305Ciphertext", Uint8Array);
|
|
50
67
|
/**
|
|
51
|
-
* XChaCha20-Poly1305
|
|
68
|
+
* Encrypts plaintext with XChaCha20-Poly1305.
|
|
69
|
+
*
|
|
70
|
+
* Generates a random nonce internally and returns both the ciphertext and
|
|
71
|
+
* nonce. The nonce must be stored alongside the ciphertext for decryption.
|
|
72
|
+
*
|
|
73
|
+
* ### Example
|
|
52
74
|
*
|
|
53
|
-
*
|
|
75
|
+
* ```ts
|
|
76
|
+
* const deps = { randomBytes: createRandomBytes() };
|
|
77
|
+
* const [ciphertext, nonce] = encryptWithXChaCha20Poly1305(deps)(
|
|
78
|
+
* utf8ToBytes("secret message"),
|
|
79
|
+
* encryptionKey,
|
|
80
|
+
* );
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* @see https://github.com/paulmillr/noble-ciphers
|
|
54
84
|
*/
|
|
55
|
-
export const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
encrypt: (plaintext, encryptionKey) => {
|
|
60
|
-
const nonce = deps.randomBytes.create(nonceLength);
|
|
61
|
-
const ciphertext = xchacha20poly1305(encryptionKey, nonce).encrypt(plaintext);
|
|
62
|
-
return { nonce, ciphertext };
|
|
63
|
-
},
|
|
64
|
-
decrypt: (ciphertext, encryptionKey, nonce) => trySync(() => xchacha20poly1305(encryptionKey, nonce).decrypt(ciphertext), (error) => ({
|
|
65
|
-
type: "SymmetricCryptoDecryptError",
|
|
66
|
-
error,
|
|
67
|
-
})),
|
|
68
|
-
};
|
|
69
|
-
return symmetricCrypto;
|
|
85
|
+
export const encryptWithXChaCha20Poly1305 = (deps) => (plaintext, encryptionKey) => {
|
|
86
|
+
const nonce = deps.randomBytes.create(xChaCha20Poly1305NonceLength);
|
|
87
|
+
const ciphertext = XChaCha20Poly1305Ciphertext.orThrow(xchacha20poly1305(encryptionKey, nonce).encrypt(plaintext));
|
|
88
|
+
return [ciphertext, nonce];
|
|
70
89
|
};
|
|
90
|
+
/**
|
|
91
|
+
* Decrypts ciphertext with XChaCha20-Poly1305.
|
|
92
|
+
*
|
|
93
|
+
* Requires the same nonce that was used during encryption. Returns a
|
|
94
|
+
* {@link Result} that may contain a decryption error if the ciphertext was
|
|
95
|
+
* tampered with or the wrong key/nonce was used.
|
|
96
|
+
*
|
|
97
|
+
* ### Example
|
|
98
|
+
*
|
|
99
|
+
* ```ts
|
|
100
|
+
* const result = decryptWithXChaCha20Poly1305(
|
|
101
|
+
* ciphertext,
|
|
102
|
+
* nonce,
|
|
103
|
+
* encryptionKey,
|
|
104
|
+
* );
|
|
105
|
+
* if (!result.ok) {
|
|
106
|
+
* // Handle decryption error
|
|
107
|
+
* return result;
|
|
108
|
+
* }
|
|
109
|
+
* const plaintext = result.value;
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
export const decryptWithXChaCha20Poly1305 = (ciphertext, nonce, encryptionKey) => trySync(() => xchacha20poly1305(encryptionKey, nonce).decrypt(ciphertext), (error) => ({
|
|
113
|
+
type: "DecryptWithXChaCha20Poly1305Error",
|
|
114
|
+
error,
|
|
115
|
+
}));
|
|
71
116
|
/**
|
|
72
117
|
* Returns the PADMÉ padded length for a given input length.
|
|
73
118
|
*
|
|
@@ -78,7 +123,7 @@ export const createSymmetricCrypto = (deps) => {
|
|
|
78
123
|
*/
|
|
79
124
|
export const createPadmePaddedLength = (length) => {
|
|
80
125
|
if (length <= 0)
|
|
81
|
-
return
|
|
126
|
+
return zeroNonNegativeInt;
|
|
82
127
|
const e = 31 - Math.clz32(length >>> 0);
|
|
83
128
|
const s = 32 - Math.clz32(e >>> 0);
|
|
84
129
|
const z = Math.max(0, e - s);
|
package/dist/src/Eq.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Equality comparison functions and utilities.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type { Order } from "./Order.js";
|
|
7
|
+
import type { JsonValue, JsonValueInput } from "./Type.js";
|
|
3
8
|
/**
|
|
4
9
|
* Compares two values of the same type `A` for equality.
|
|
5
10
|
*
|
|
@@ -31,6 +36,21 @@ export declare const eqFromOrder: <A>(order: Order<A>) => Eq<A>;
|
|
|
31
36
|
* ```
|
|
32
37
|
*/
|
|
33
38
|
export declare const createEqArrayLike: <A>(item: Eq<A>) => Eq<ArrayLike<A>>;
|
|
39
|
+
/**
|
|
40
|
+
* Compares two array-like structures by strict reference equality (`===`).
|
|
41
|
+
*
|
|
42
|
+
* Useful for structural sharing checks where elements are compared by identity.
|
|
43
|
+
*
|
|
44
|
+
* ### Example
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* const a = { x: 1 };
|
|
48
|
+
* const b = { x: 1 };
|
|
49
|
+
* eqArrayStrict([a, a], [a, a]); // true (same references)
|
|
50
|
+
* eqArrayStrict([a], [b]); // false (different references, even if equal values)
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare const eqArrayStrict: <A>(x: ArrayLike<A>, y: ArrayLike<A>) => boolean;
|
|
34
54
|
/**
|
|
35
55
|
* Compares two array-like structures of numbers for equality.
|
|
36
56
|
*
|
package/dist/src/Eq.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Eq.d.ts","sourceRoot":"","sources":["../../src/Eq.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Eq.d.ts","sourceRoot":"","sources":["../../src/Eq.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAGV,SAAS,EACT,cAAc,EACf,MAAM,WAAW,CAAC;AAEnB;;;;;;GAMG;AACH,MAAM,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC;AAE/C,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,KAAG,OAAkB,CAAC;AAE5D,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAY,CAAC;AAC7C,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAY,CAAC;AAC7C,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAY,CAAC;AAC7C,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,OAAO,CAAY,CAAC;AAC/C,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,SAAS,CAAY,CAAC;AACnD,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,IAAI,CAAY,CAAC;AAEzC,mDAAmD;AACnD,eAAO,MAAM,WAAW,GACrB,CAAC,EAAE,OAAO,KAAK,CAAC,CAAC,CAAC,KAAG,EAAE,CAAC,CAAC,CAEP,CAAC;AAEtB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,GAC3B,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,KAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAUhC,CAAC;AAEJ;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,GAvDD,CAAC,uCAFa,OAyD+B,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,uBAA4C,CAAC;AAEvE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,GACxB,CAAC,EAAE,KAAK,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAE,KAAG,EAAE,CAAC,EACzC,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAC9B,CASA,CAAC;AAEJ;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,SAAS,EAAE,GAAG,SAAS,KAAG,OAsExD,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,GAC3B,GAAG,cAAc,EACjB,GAAG,cAAc,KAChB,OAAsD,CAAC"}
|
package/dist/src/Eq.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Equality comparison functions and utilities.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
1
6
|
export const eqStrict = (x, y) => x === y;
|
|
2
7
|
export const eqString = eqStrict;
|
|
3
8
|
export const eqNumber = eqStrict;
|
|
@@ -31,6 +36,21 @@ export const createEqArrayLike = (item) => (x, y) => {
|
|
|
31
36
|
}
|
|
32
37
|
return true;
|
|
33
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Compares two array-like structures by strict reference equality (`===`).
|
|
41
|
+
*
|
|
42
|
+
* Useful for structural sharing checks where elements are compared by identity.
|
|
43
|
+
*
|
|
44
|
+
* ### Example
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* const a = { x: 1 };
|
|
48
|
+
* const b = { x: 1 };
|
|
49
|
+
* eqArrayStrict([a, a], [a, a]); // true (same references)
|
|
50
|
+
* eqArrayStrict([a], [b]); // false (different references, even if equal values)
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export const eqArrayStrict = /*#__PURE__*/ createEqArrayLike(eqStrict);
|
|
34
54
|
/**
|
|
35
55
|
* Compares two array-like structures of numbers for equality.
|
|
36
56
|
*
|
|
@@ -42,7 +62,7 @@ export const createEqArrayLike = (item) => (x, y) => {
|
|
|
42
62
|
* eqArrayNumber([1, 2, 3], [1, 2, 4]); // false
|
|
43
63
|
* ```
|
|
44
64
|
*/
|
|
45
|
-
export const eqArrayNumber = createEqArrayLike(eqNumber);
|
|
65
|
+
export const eqArrayNumber = /*#__PURE__*/ createEqArrayLike(eqNumber);
|
|
46
66
|
/**
|
|
47
67
|
* Creates an equivalence function for objects based on an equivalence for their
|
|
48
68
|
* fields.
|
package/dist/src/Error.d.ts
CHANGED
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* contexts, such as Web Workers and the main thread.
|
|
2
|
+
* Error types and utilities for safe error handling.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type { Typed } from "./Type.js";
|
|
7
|
+
/**
|
|
8
|
+
* A wrapper for unknown errors caught at runtime.
|
|
9
|
+
*
|
|
10
|
+
* When catching errors from unsafe code (third-party libraries, worker
|
|
11
|
+
* boundaries, etc.), we wrap them in `UnknownError` so they can be used in
|
|
12
|
+
* union types and distinguished from other error types.
|
|
13
|
+
*
|
|
14
|
+
* The `error` property contains error details (including `message`, `stack`,
|
|
15
|
+
* and `cause` if available), a string, or a fallback value.
|
|
8
16
|
*
|
|
9
|
-
*
|
|
10
|
-
* a fallback value if serialization fails to preserve as much debugging
|
|
11
|
-
* information as possible.
|
|
17
|
+
* Use {@link createUnknownError} to create instances.
|
|
12
18
|
*/
|
|
13
|
-
export interface
|
|
14
|
-
readonly type: "TransferableError";
|
|
19
|
+
export interface UnknownError extends Typed<"UnknownError"> {
|
|
15
20
|
readonly error: unknown;
|
|
16
21
|
}
|
|
17
|
-
/**
|
|
18
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Creates an {@link UnknownError} from an unknown error.
|
|
24
|
+
*
|
|
25
|
+
* Error objects cannot be directly structured-cloned (for worker messaging) or
|
|
26
|
+
* JSON-serialized because their properties (`message`, `stack`, `cause`) are
|
|
27
|
+
* non-enumerable. This function extracts those properties into a plain object.
|
|
28
|
+
*/
|
|
29
|
+
export declare const createUnknownError: (error: unknown) => UnknownError;
|
|
19
30
|
//# sourceMappingURL=Error.d.ts.map
|
package/dist/src/Error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../src/Error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["../../src/Error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC;IACzD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,YAkDnD,CAAC"}
|
package/dist/src/Error.js
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Error types and utilities for safe error handling.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Creates an {@link UnknownError} from an unknown error.
|
|
8
|
+
*
|
|
9
|
+
* Error objects cannot be directly structured-cloned (for worker messaging) or
|
|
10
|
+
* JSON-serialized because their properties (`message`, `stack`, `cause`) are
|
|
11
|
+
* non-enumerable. This function extracts those properties into a plain object.
|
|
12
|
+
*/
|
|
13
|
+
export const createUnknownError = (error) => {
|
|
3
14
|
const convertError = (err) => {
|
|
4
|
-
const
|
|
15
|
+
const result = Object.getOwnPropertyNames(err).reduce((acc, key) => {
|
|
5
16
|
const value = err[key];
|
|
6
17
|
if (key === "cause" && value instanceof Error) {
|
|
7
18
|
// Recursively process the `cause` property
|
|
@@ -12,33 +23,38 @@ export const createTransferableError = (error) => {
|
|
|
12
23
|
}
|
|
13
24
|
return acc;
|
|
14
25
|
}, {});
|
|
15
|
-
|
|
26
|
+
// Firefox defines `stack` as a getter on Error.prototype, not as an own
|
|
27
|
+
// property, so getOwnPropertyNames misses it. Explicitly include it.
|
|
28
|
+
if (err.stack !== undefined && !("stack" in result)) {
|
|
29
|
+
result.stack = err.stack;
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
16
32
|
};
|
|
17
33
|
if (error instanceof Error) {
|
|
18
34
|
return {
|
|
19
|
-
type: "
|
|
35
|
+
type: "UnknownError",
|
|
20
36
|
error: convertError(error),
|
|
21
37
|
};
|
|
22
38
|
}
|
|
23
39
|
try {
|
|
24
|
-
// Clone other values that are
|
|
40
|
+
// Clone other values that are structured-clonable
|
|
25
41
|
return {
|
|
26
|
-
type: "
|
|
42
|
+
type: "UnknownError",
|
|
27
43
|
error: structuredClone(error),
|
|
28
44
|
};
|
|
29
45
|
}
|
|
30
46
|
catch {
|
|
31
|
-
// Fallback for non-
|
|
47
|
+
// Fallback for non-clonable values
|
|
32
48
|
try {
|
|
33
49
|
return {
|
|
34
|
-
type: "
|
|
35
|
-
error: String(error),
|
|
50
|
+
type: "UnknownError",
|
|
51
|
+
error: String(error),
|
|
36
52
|
};
|
|
37
53
|
}
|
|
38
54
|
catch {
|
|
39
55
|
// Final fallback if even `String(error)` fails
|
|
40
56
|
return {
|
|
41
|
-
type: "
|
|
57
|
+
type: "UnknownError",
|
|
42
58
|
error: "[Unserializable Object]",
|
|
43
59
|
};
|
|
44
60
|
}
|
package/dist/src/Function.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Function utilities including exhaustive checks and composition.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
3
6
|
/**
|
|
4
7
|
* Helper function to ensure exhaustive matching in a switch statement. Throws
|
|
5
8
|
* an error if an unhandled case is encountered.
|
|
6
9
|
*
|
|
7
|
-
* Remember, it's useful only when we don't return anything from the switch
|
|
8
|
-
* statement. Otherwise, a return type of a function is enough.
|
|
9
|
-
*
|
|
10
10
|
* ### Example
|
|
11
11
|
*
|
|
12
12
|
* ```ts
|
|
13
13
|
* type Color = "red" | "green" | "blue";
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* const handleColor = (color: Color): void => {
|
|
16
16
|
* switch (color) {
|
|
17
17
|
* case "red":
|
|
18
18
|
* console.log("Handling red");
|
|
@@ -26,12 +26,68 @@ import { ReadonlyRecord } from "./Object.js";
|
|
|
26
26
|
* default:
|
|
27
27
|
* exhaustiveCheck(color); // Ensures all cases are handled
|
|
28
28
|
* }
|
|
29
|
-
* }
|
|
29
|
+
* };
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* Use this primarily in side-effect switches (`void` branches). For
|
|
33
|
+
* value-producing switches, TypeScript can enforce exhaustiveness without a
|
|
34
|
+
* `default` branch.
|
|
35
|
+
*
|
|
36
|
+
* ### Example
|
|
37
|
+
*
|
|
38
|
+
* Return from each case for value-producing switches.
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* type Color = "red" | "green" | "blue";
|
|
42
|
+
*
|
|
43
|
+
* const colorToHex = (color: Color): string => {
|
|
44
|
+
* switch (color) {
|
|
45
|
+
* case "red":
|
|
46
|
+
* return "#ff0000";
|
|
47
|
+
* case "green":
|
|
48
|
+
* return "#00ff00";
|
|
49
|
+
* case "blue":
|
|
50
|
+
* return "#0000ff";
|
|
51
|
+
* }
|
|
52
|
+
* };
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* ### Example
|
|
56
|
+
*
|
|
57
|
+
* Use assignment + no `default` to get exhaustiveness by definite assignment.
|
|
58
|
+
*
|
|
59
|
+
* ```ts
|
|
60
|
+
* type Input =
|
|
61
|
+
* | { readonly type: "Mutate" }
|
|
62
|
+
* | { readonly type: "Query" }
|
|
63
|
+
* | { readonly type: "Export" };
|
|
64
|
+
*
|
|
65
|
+
* const onInput = (input: Input): void => {
|
|
66
|
+
* let result: "A" | "B" | "C";
|
|
67
|
+
*
|
|
68
|
+
* switch (input.type) {
|
|
69
|
+
* case "Mutate":
|
|
70
|
+
* result = "A";
|
|
71
|
+
* break;
|
|
72
|
+
* case "Query":
|
|
73
|
+
* result = "B";
|
|
74
|
+
* break;
|
|
75
|
+
* case "Export":
|
|
76
|
+
* result = "C";
|
|
77
|
+
* break;
|
|
78
|
+
* }
|
|
79
|
+
*
|
|
80
|
+
* handleKind(result);
|
|
81
|
+
* };
|
|
82
|
+
*
|
|
83
|
+
* const handleKind = (kind: "A" | "B" | "C"): void => {
|
|
84
|
+
* console.log(kind);
|
|
85
|
+
* };
|
|
30
86
|
* ```
|
|
31
87
|
*/
|
|
32
88
|
export declare const exhaustiveCheck: (value: never) => never;
|
|
33
89
|
/**
|
|
34
|
-
* Returns the
|
|
90
|
+
* Returns the value unchanged.
|
|
35
91
|
*
|
|
36
92
|
* Useful as a default transformation, placeholder callback, or when a function
|
|
37
93
|
* is required but no transformation is needed.
|
|
@@ -48,68 +104,84 @@ export declare const exhaustiveCheck: (value: never) => never;
|
|
|
48
104
|
*/
|
|
49
105
|
export declare const identity: <A>(a: A) => A;
|
|
50
106
|
/**
|
|
51
|
-
*
|
|
107
|
+
* A function that takes no arguments and returns a value of type T. Also known
|
|
108
|
+
* as a thunk.
|
|
109
|
+
*
|
|
110
|
+
* Useful for:
|
|
52
111
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
112
|
+
* - Providing default callbacks (see {@link lazyVoid}, {@link lazyTrue}, etc.)
|
|
113
|
+
* - Delaying expensive operations until actually needed
|
|
114
|
+
* - Deferring side effects so the callee controls when they run
|
|
56
115
|
*
|
|
57
116
|
* ### Example
|
|
58
117
|
*
|
|
59
118
|
* ```ts
|
|
60
|
-
* //
|
|
61
|
-
* const
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* const
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* //
|
|
70
|
-
* const
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* // Sets, Records, and Maps
|
|
75
|
-
* const ids = readonly(new Set(["a", "b"]));
|
|
76
|
-
* // Type: ReadonlySet<string>
|
|
77
|
-
*
|
|
78
|
-
* const users: Record<UserId, string> = { ... };
|
|
79
|
-
* const readonlyUsers = readonly(users);
|
|
80
|
-
* // Type: ReadonlyRecord<UserId, string>
|
|
81
|
-
*
|
|
82
|
-
* const lookup = readonly(new Map([["key", "value"]]));
|
|
83
|
-
* // Type: ReadonlyMap<string, string>
|
|
119
|
+
* // Default callback
|
|
120
|
+
* const notify = (onDone: Lazy<void> = lazyVoid) => {
|
|
121
|
+
* onDone();
|
|
122
|
+
* };
|
|
123
|
+
*
|
|
124
|
+
* // Delay computation
|
|
125
|
+
* const getData: Lazy<Data> = () => compute();
|
|
126
|
+
* const data = getData();
|
|
127
|
+
*
|
|
128
|
+
* // Defer side effects
|
|
129
|
+
* const schedule = (job: Lazy<void>) => {
|
|
130
|
+
* queueMicrotask(job);
|
|
131
|
+
* };
|
|
132
|
+
* schedule(() => logMetric("loaded"));
|
|
84
133
|
* ```
|
|
85
|
-
*
|
|
86
|
-
* @experimental
|
|
87
134
|
*/
|
|
88
|
-
export
|
|
89
|
-
export declare function readonly<T>(array: Array<T>): ReadonlyArray<T>;
|
|
90
|
-
export declare function readonly<T>(set: Set<T>): ReadonlySet<T>;
|
|
91
|
-
export declare function readonly<K, V>(map: Map<K, V>): ReadonlyMap<K, V>;
|
|
92
|
-
export declare function readonly<K extends keyof any, V>(record: Record<K, V>): ReadonlyRecord<K, V>;
|
|
135
|
+
export type Lazy<T> = () => T;
|
|
93
136
|
/**
|
|
94
|
-
*
|
|
137
|
+
* Creates a {@link Lazy} from a precomputed value.
|
|
95
138
|
*
|
|
96
|
-
*
|
|
139
|
+
* Use when the value is expensive to compute and want to compute it once at
|
|
140
|
+
* definition time rather than on every call.
|
|
97
141
|
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
142
|
+
* ### Example
|
|
143
|
+
*
|
|
144
|
+
* ```ts
|
|
145
|
+
* // Computed once at definition, returned on every call
|
|
146
|
+
* const getConfig = lazy(parseConfig(rawConfig));
|
|
147
|
+
*
|
|
148
|
+
* // vs. computed on every call
|
|
149
|
+
* const getConfig = () => parseConfig(rawConfig);
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
export declare const lazy: <T>(value: T) => Lazy<T>;
|
|
153
|
+
/** A {@link Lazy} that returns `true`. */
|
|
154
|
+
export declare const lazyTrue: Lazy<true>;
|
|
155
|
+
/** A {@link Lazy} that returns `false`. */
|
|
156
|
+
export declare const lazyFalse: Lazy<false>;
|
|
157
|
+
/** A {@link Lazy} that returns `null`. */
|
|
158
|
+
export declare const lazyNull: Lazy<null>;
|
|
159
|
+
/** A {@link Lazy} that returns `undefined`. */
|
|
160
|
+
export declare const lazyUndefined: Lazy<undefined>;
|
|
161
|
+
/** A {@link Lazy} that returns `undefined` for void callbacks. */
|
|
162
|
+
export declare const lazyVoid: Lazy<void>;
|
|
163
|
+
/**
|
|
164
|
+
* Development placeholder that always throws.
|
|
165
|
+
*
|
|
166
|
+
* Use to sketch function bodies before implementing them. TypeScript infers the
|
|
167
|
+
* return type from context, so surrounding code still type-checks. Use an
|
|
168
|
+
* explicit generic when there is no return type annotation.
|
|
101
169
|
*
|
|
102
170
|
* ### Example
|
|
103
171
|
*
|
|
104
172
|
* ```ts
|
|
105
|
-
*
|
|
106
|
-
* const
|
|
173
|
+
* // Type inferred from return type annotation
|
|
174
|
+
* const fetchUser = (id: UserId): Result<User, FetchError> => todo();
|
|
175
|
+
*
|
|
176
|
+
* expectTypeOf(fetchUser).returns.toEqualTypeOf<
|
|
177
|
+
* Result<User, FetchError>
|
|
178
|
+
* >();
|
|
179
|
+
*
|
|
180
|
+
* // Explicit generic when no return type
|
|
181
|
+
* const getConfig = () => todo<Config>();
|
|
182
|
+
*
|
|
183
|
+
* expectTypeOf(getConfig).returns.toEqualTypeOf<Config>();
|
|
107
184
|
* ```
|
|
108
185
|
*/
|
|
109
|
-
export
|
|
110
|
-
export declare const constVoid: LazyValue<void>;
|
|
111
|
-
export declare const constUndefined: LazyValue<undefined>;
|
|
112
|
-
export declare const constNull: LazyValue<null>;
|
|
113
|
-
export declare const constTrue: LazyValue<true>;
|
|
114
|
-
export declare const constFalse: LazyValue<false>;
|
|
186
|
+
export declare const todo: <T>() => T;
|
|
115
187
|
//# sourceMappingURL=Function.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Function.d.ts","sourceRoot":"","sources":["../../src/Function.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Function.d.ts","sourceRoot":"","sources":["../../src/Function.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,KAAK,KAAG,KAE9C,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,GAAG,CAAC,KAAG,CAAM,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,MAAM,IAAI,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AAE9B;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,IAAI,GACd,CAAC,EAAE,OAAO,CAAC,KAAG,IAAI,CAAC,CAAC,CAEd,CAAC;AAEV,0CAA0C;AAC1C,eAAO,MAAM,QAAQ,EAAE,IAAI,CAAC,IAAI,CAA4B,CAAC;AAE7D,2CAA2C;AAC3C,eAAO,MAAM,SAAS,EAAE,IAAI,CAAC,KAAK,CAA6B,CAAC;AAEhE,0CAA0C;AAC1C,eAAO,MAAM,QAAQ,EAAE,IAAI,CAAC,IAAI,CAA4B,CAAC;AAE7D,+CAA+C;AAC/C,eAAO,MAAM,aAAa,EAAE,IAAI,CAAC,SAAS,CAAiC,CAAC;AAE5E,kEAAkE;AAClE,eAAO,MAAM,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAiB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,eAAO,MAAM,IAAI,GAAI,CAAC,OAAK,CAE1B,CAAC"}
|