mindoodb 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/README.md +263 -0
  2. package/dist/appendonlystores/InMemoryContentAddressedStoreFactory.d.ts +5 -0
  3. package/dist/appendonlystores/InMemoryContentAddressedStoreFactory.d.ts.map +1 -0
  4. package/dist/appendonlystores/InMemoryContentAddressedStoreFactory.js +17 -0
  5. package/dist/appendonlystores/InMemoryContentAddressedStoreFactory.js.map +1 -0
  6. package/dist/appendonlystores/network/ClientNetworkContentAddressedStore.d.ts +111 -0
  7. package/dist/appendonlystores/network/ClientNetworkContentAddressedStore.d.ts.map +1 -0
  8. package/dist/appendonlystores/network/ClientNetworkContentAddressedStore.js +237 -0
  9. package/dist/appendonlystores/network/ClientNetworkContentAddressedStore.js.map +1 -0
  10. package/dist/appendonlystores/network/HttpTransport.d.ts +78 -0
  11. package/dist/appendonlystores/network/HttpTransport.d.ts.map +1 -0
  12. package/dist/appendonlystores/network/HttpTransport.js +356 -0
  13. package/dist/appendonlystores/network/HttpTransport.js.map +1 -0
  14. package/dist/appendonlystores/network/ServerNetworkContentAddressedStore.d.ts +131 -0
  15. package/dist/appendonlystores/network/ServerNetworkContentAddressedStore.d.ts.map +1 -0
  16. package/dist/appendonlystores/network/ServerNetworkContentAddressedStore.js +248 -0
  17. package/dist/appendonlystores/network/ServerNetworkContentAddressedStore.js.map +1 -0
  18. package/dist/appendonlystores/network/index.d.ts +8 -0
  19. package/dist/appendonlystores/network/index.d.ts.map +1 -0
  20. package/dist/appendonlystores/network/index.js +21 -0
  21. package/dist/appendonlystores/network/index.js.map +1 -0
  22. package/dist/browser/crypto/BrowserCryptoAdapter.d.ts +14 -0
  23. package/dist/browser/crypto/BrowserCryptoAdapter.d.ts.map +1 -0
  24. package/dist/browser/crypto/BrowserCryptoAdapter.js +30 -0
  25. package/dist/browser/crypto/BrowserCryptoAdapter.js.map +1 -0
  26. package/dist/browser/index.d.ts +3 -0
  27. package/dist/browser/index.d.ts.map +1 -0
  28. package/dist/browser/index.js +26 -0
  29. package/dist/browser/index.js.map +1 -0
  30. package/dist/core/BaseMindooDB.d.ts +182 -0
  31. package/dist/core/BaseMindooDB.d.ts.map +1 -0
  32. package/dist/core/BaseMindooDB.js +1701 -0
  33. package/dist/core/BaseMindooDB.js.map +1 -0
  34. package/dist/core/BaseMindooTenant.d.ts +155 -0
  35. package/dist/core/BaseMindooTenant.d.ts.map +1 -0
  36. package/dist/core/BaseMindooTenant.js +673 -0
  37. package/dist/core/BaseMindooTenant.js.map +1 -0
  38. package/dist/core/BaseMindooTenantDirectory.d.ts +99 -0
  39. package/dist/core/BaseMindooTenantDirectory.d.ts.map +1 -0
  40. package/dist/core/BaseMindooTenantDirectory.js +776 -0
  41. package/dist/core/BaseMindooTenantDirectory.js.map +1 -0
  42. package/dist/core/BaseMindooTenantFactory.d.ts +91 -0
  43. package/dist/core/BaseMindooTenantFactory.d.ts.map +1 -0
  44. package/dist/core/BaseMindooTenantFactory.js +297 -0
  45. package/dist/core/BaseMindooTenantFactory.js.map +1 -0
  46. package/dist/core/appendonlystores/InMemoryContentAddressedStore.d.ts +111 -0
  47. package/dist/core/appendonlystores/InMemoryContentAddressedStore.d.ts.map +1 -0
  48. package/dist/core/appendonlystores/InMemoryContentAddressedStore.js +293 -0
  49. package/dist/core/appendonlystores/InMemoryContentAddressedStore.js.map +1 -0
  50. package/dist/core/appendonlystores/network/AuthenticationService.d.ts +78 -0
  51. package/dist/core/appendonlystores/network/AuthenticationService.d.ts.map +1 -0
  52. package/dist/core/appendonlystores/network/AuthenticationService.js +297 -0
  53. package/dist/core/appendonlystores/network/AuthenticationService.js.map +1 -0
  54. package/dist/core/appendonlystores/network/NetworkTransport.d.ts +174 -0
  55. package/dist/core/appendonlystores/network/NetworkTransport.d.ts.map +1 -0
  56. package/dist/core/appendonlystores/network/NetworkTransport.js +3 -0
  57. package/dist/core/appendonlystores/network/NetworkTransport.js.map +1 -0
  58. package/dist/core/appendonlystores/network/types.d.ts +135 -0
  59. package/dist/core/appendonlystores/network/types.d.ts.map +1 -0
  60. package/dist/core/appendonlystores/network/types.js +35 -0
  61. package/dist/core/appendonlystores/network/types.js.map +1 -0
  62. package/dist/core/appendonlystores/types.d.ts +157 -0
  63. package/dist/core/appendonlystores/types.d.ts.map +1 -0
  64. package/dist/core/appendonlystores/types.js +3 -0
  65. package/dist/core/appendonlystores/types.js.map +1 -0
  66. package/dist/core/crypto/CryptoAdapter.d.ts +19 -0
  67. package/dist/core/crypto/CryptoAdapter.d.ts.map +1 -0
  68. package/dist/core/crypto/CryptoAdapter.js +3 -0
  69. package/dist/core/crypto/CryptoAdapter.js.map +1 -0
  70. package/dist/core/crypto/MindooDocSigner.d.ts +106 -0
  71. package/dist/core/crypto/MindooDocSigner.d.ts.map +1 -0
  72. package/dist/core/crypto/MindooDocSigner.js +192 -0
  73. package/dist/core/crypto/MindooDocSigner.js.map +1 -0
  74. package/dist/core/crypto/RSAEncryption.d.ts +62 -0
  75. package/dist/core/crypto/RSAEncryption.d.ts.map +1 -0
  76. package/dist/core/crypto/RSAEncryption.js +167 -0
  77. package/dist/core/crypto/RSAEncryption.js.map +1 -0
  78. package/dist/core/errors.d.ts +10 -0
  79. package/dist/core/errors.d.ts.map +1 -0
  80. package/dist/core/errors.js +17 -0
  81. package/dist/core/errors.js.map +1 -0
  82. package/dist/core/index.d.ts +14 -0
  83. package/dist/core/index.d.ts.map +1 -0
  84. package/dist/core/index.js +53 -0
  85. package/dist/core/index.js.map +1 -0
  86. package/dist/core/indexing/virtualviews/IViewEntryAccessCheck.d.ts +33 -0
  87. package/dist/core/indexing/virtualviews/IViewEntryAccessCheck.d.ts.map +1 -0
  88. package/dist/core/indexing/virtualviews/IViewEntryAccessCheck.js +27 -0
  89. package/dist/core/indexing/virtualviews/IViewEntryAccessCheck.js.map +1 -0
  90. package/dist/core/indexing/virtualviews/IVirtualViewDataProvider.d.ts +31 -0
  91. package/dist/core/indexing/virtualviews/IVirtualViewDataProvider.d.ts.map +1 -0
  92. package/dist/core/indexing/virtualviews/IVirtualViewDataProvider.js +3 -0
  93. package/dist/core/indexing/virtualviews/IVirtualViewDataProvider.js.map +1 -0
  94. package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.d.ts +52 -0
  95. package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.d.ts.map +1 -0
  96. package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.js +106 -0
  97. package/dist/core/indexing/virtualviews/MindooDBVirtualViewDataProvider.js.map +1 -0
  98. package/dist/core/indexing/virtualviews/ViewEntrySortKey.d.ts +44 -0
  99. package/dist/core/indexing/virtualviews/ViewEntrySortKey.d.ts.map +1 -0
  100. package/dist/core/indexing/virtualviews/ViewEntrySortKey.js +107 -0
  101. package/dist/core/indexing/virtualviews/ViewEntrySortKey.js.map +1 -0
  102. package/dist/core/indexing/virtualviews/ViewEntrySortKeyComparator.d.ts +28 -0
  103. package/dist/core/indexing/virtualviews/ViewEntrySortKeyComparator.d.ts.map +1 -0
  104. package/dist/core/indexing/virtualviews/ViewEntrySortKeyComparator.js +133 -0
  105. package/dist/core/indexing/virtualviews/ViewEntrySortKeyComparator.js.map +1 -0
  106. package/dist/core/indexing/virtualviews/VirtualView.d.ts +109 -0
  107. package/dist/core/indexing/virtualviews/VirtualView.d.ts.map +1 -0
  108. package/dist/core/indexing/virtualviews/VirtualView.js +504 -0
  109. package/dist/core/indexing/virtualviews/VirtualView.js.map +1 -0
  110. package/dist/core/indexing/virtualviews/VirtualViewColumn.d.ts +59 -0
  111. package/dist/core/indexing/virtualviews/VirtualViewColumn.d.ts.map +1 -0
  112. package/dist/core/indexing/virtualviews/VirtualViewColumn.js +70 -0
  113. package/dist/core/indexing/virtualviews/VirtualViewColumn.js.map +1 -0
  114. package/dist/core/indexing/virtualviews/VirtualViewDataChange.d.ts +49 -0
  115. package/dist/core/indexing/virtualviews/VirtualViewDataChange.d.ts.map +1 -0
  116. package/dist/core/indexing/virtualviews/VirtualViewDataChange.js +69 -0
  117. package/dist/core/indexing/virtualviews/VirtualViewDataChange.js.map +1 -0
  118. package/dist/core/indexing/virtualviews/VirtualViewEntryData.d.ts +121 -0
  119. package/dist/core/indexing/virtualviews/VirtualViewEntryData.d.ts.map +1 -0
  120. package/dist/core/indexing/virtualviews/VirtualViewEntryData.js +365 -0
  121. package/dist/core/indexing/virtualviews/VirtualViewEntryData.js.map +1 -0
  122. package/dist/core/indexing/virtualviews/VirtualViewFactory.d.ts +131 -0
  123. package/dist/core/indexing/virtualviews/VirtualViewFactory.d.ts.map +1 -0
  124. package/dist/core/indexing/virtualviews/VirtualViewFactory.js +236 -0
  125. package/dist/core/indexing/virtualviews/VirtualViewFactory.js.map +1 -0
  126. package/dist/core/indexing/virtualviews/VirtualViewNavigator.d.ts +330 -0
  127. package/dist/core/indexing/virtualviews/VirtualViewNavigator.d.ts.map +1 -0
  128. package/dist/core/indexing/virtualviews/VirtualViewNavigator.js +1010 -0
  129. package/dist/core/indexing/virtualviews/VirtualViewNavigator.js.map +1 -0
  130. package/dist/core/indexing/virtualviews/index.d.ts +53 -0
  131. package/dist/core/indexing/virtualviews/index.d.ts.map +1 -0
  132. package/dist/core/indexing/virtualviews/index.js +89 -0
  133. package/dist/core/indexing/virtualviews/index.js.map +1 -0
  134. package/dist/core/indexing/virtualviews/types.d.ts +115 -0
  135. package/dist/core/indexing/virtualviews/types.d.ts.map +1 -0
  136. package/dist/core/indexing/virtualviews/types.js +175 -0
  137. package/dist/core/indexing/virtualviews/types.js.map +1 -0
  138. package/dist/core/keys/KeyBag.d.ts +122 -0
  139. package/dist/core/keys/KeyBag.d.ts.map +1 -0
  140. package/dist/core/keys/KeyBag.js +401 -0
  141. package/dist/core/keys/KeyBag.js.map +1 -0
  142. package/dist/core/types.d.ts +1004 -0
  143. package/dist/core/types.d.ts.map +1 -0
  144. package/dist/core/types.js +10 -0
  145. package/dist/core/types.js.map +1 -0
  146. package/dist/core/userid/index.d.ts +53 -0
  147. package/dist/core/userid/index.d.ts.map +1 -0
  148. package/dist/core/userid/index.js +3 -0
  149. package/dist/core/userid/index.js.map +1 -0
  150. package/dist/core/utils/idGeneration.d.ts +109 -0
  151. package/dist/core/utils/idGeneration.d.ts.map +1 -0
  152. package/dist/core/utils/idGeneration.js +182 -0
  153. package/dist/core/utils/idGeneration.js.map +1 -0
  154. package/dist/core/utils/index.d.ts +5 -0
  155. package/dist/core/utils/index.d.ts.map +1 -0
  156. package/dist/core/utils/index.js +19 -0
  157. package/dist/core/utils/index.js.map +1 -0
  158. package/dist/index.d.ts +7 -0
  159. package/dist/index.d.ts.map +1 -0
  160. package/dist/index.js +40 -0
  161. package/dist/index.js.map +1 -0
  162. package/dist/node/crypto/NodeCryptoAdapter.d.ts +16 -0
  163. package/dist/node/crypto/NodeCryptoAdapter.d.ts.map +1 -0
  164. package/dist/node/crypto/NodeCryptoAdapter.js +53 -0
  165. package/dist/node/crypto/NodeCryptoAdapter.js.map +1 -0
  166. package/dist/node/index.d.ts +3 -0
  167. package/dist/node/index.d.ts.map +1 -0
  168. package/dist/node/index.js +26 -0
  169. package/dist/node/index.js.map +1 -0
  170. package/package.json +58 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseMindooTenantDirectory.js","sourceRoot":"","sources":["../../src/core/BaseMindooTenantDirectory.ts"],"names":[],"mappings":";;;AAAA,mCAAiL;AAEjL,0DAAuD;AAEvD,MAAa,yBAAyB;IAwBpC,YAAY,MAAwB;QAtB5B,gBAAW,GAAoB,IAAI,CAAC;QAE5C,mFAAmF;QACnF,+DAA+D;QAC/D,sEAAsE;QACtE,0EAA0E;QAClE,qBAAgB,GAAyB,IAAI,GAAG,EAAE,CAAC;QAC3D,+EAA+E;QACvE,0BAAqB,GAAwB,IAAI,GAAG,EAAE,CAAC;QAE/D,+BAA+B;QACvB,wBAAmB,GAAqB,IAAI,CAAC;QAC7C,oBAAe,GAA2B,IAAI,GAAG,EAAE,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,CAAC;IAC5C,CAAC;IAED;;OAEG;IACK,kBAAkB,CAAC,KAAiB;QAC1C,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CACF;AA9gCD,8DA8gCC"}
@@ -0,0 +1,91 @@
1
+ import { MindooTenantFactory, MindooTenant, EncryptedPrivateKey, ContentAddressedStoreFactory, SigningKeyPair, EncryptionKeyPair } from "./types";
2
+ import { PrivateUserId, PublicUserId } from "./userid";
3
+ import { CryptoAdapter } from "./crypto/CryptoAdapter";
4
+ import { KeyBag } from "./keys/KeyBag";
5
+ /**
6
+ * BaseTenantFactory is a platform-agnostic implementation of TenantFactory
7
+ * that creates and manages tenants and users.
8
+ *
9
+ * It uses CryptoAdapter to abstract platform-specific crypto operations,
10
+ * allowing the same implementation to work in browsers and Node.js.
11
+ */
12
+ export declare class BaseMindooTenantFactory implements MindooTenantFactory {
13
+ private cryptoAdapter;
14
+ private storeFactory;
15
+ constructor(storeFactory: ContentAddressedStoreFactory, cryptoAdapter: CryptoAdapter);
16
+ getCryptoAdapter(): CryptoAdapter;
17
+ /**
18
+ * Create a new tenant from scratch with a new tenant encryption key.
19
+ *
20
+ * The administration public key must be created beforehand using createSigningKeyPair()
21
+ * and passed to this method.
22
+ *
23
+ * The administration encryption public key must be created using createEncryptionKeyPair()
24
+ * and is used to encrypt sensitive data in the directory that only admins can decrypt.
25
+ *
26
+ * @param tenantId The ID of the tenant
27
+ * @param administrationPublicKey The administration public key (Ed25519, PEM format) created using createSigningKeyPair()
28
+ * @param administrationEncryptionPublicKey The administration encryption public key (RSA-OAEP, PEM format) created using createEncryptionKeyPair()
29
+ * @param tenantEncryptionKeyPassword The password to decrypt the tenant encryption private key
30
+ * @param currentUser The current user's private user ID (required for tenant operations)
31
+ * @param currentUserPassword The password to decrypt the current user's private keys
32
+ * @param keyBag The KeyBag instance for storing and loading named encrypted keys
33
+ * @return The new tenant
34
+ */
35
+ createTenant(tenantId: string, administrationPublicKey: string, administrationEncryptionPublicKey: string, tenantEncryptionKeyPassword: string, currentUser: PrivateUserId, currentUserPassword: string, keyBag: KeyBag): Promise<MindooTenant>;
36
+ /**
37
+ * Opens an existing tenant with previously created keys.
38
+ */
39
+ openTenantWithKeys(tenantId: string, tenantEncryptionPrivateKey: EncryptedPrivateKey, tenantEncryptionKeyPassword: string, administrationPublicKey: string, administrationEncryptionPublicKey: string, currentUser: PrivateUserId, currentUserPassword: string, keyBag: KeyBag): Promise<MindooTenant>;
40
+ /**
41
+ * Creates a new user with separate signing and encryption key pairs.
42
+ */
43
+ createUserId(username: string, password: string): Promise<PrivateUserId>;
44
+ /**
45
+ * Removes the private information from a private user ID and returns a public user ID.
46
+ */
47
+ toPublicUserId(privateUserId: PrivateUserId): PublicUserId;
48
+ /**
49
+ * Creates a new signing key pair for the tenant.
50
+ * Returns both the public and encrypted private key, as the public key is needed
51
+ * for signature verification by other users.
52
+ */
53
+ createSigningKeyPair(password: string): Promise<SigningKeyPair>;
54
+ /**
55
+ * Creates a new encrypted symmetric key (AES-256) for document encryption.
56
+ * Symmetric keys are shared secrets - anyone with the key can both encrypt and decrypt.
57
+ * For user-to-user encryption where only the recipient can decrypt, use createEncryptionKeyPair() instead.
58
+ */
59
+ createSymmetricEncryptedPrivateKey(password: string): Promise<EncryptedPrivateKey>;
60
+ /**
61
+ * Creates a new asymmetric encryption key pair (RSA-OAEP) for user-to-user encryption.
62
+ * Returns both the public and encrypted private key.
63
+ *
64
+ * Use case: User A can fetch User B's public key from the directory DB, encrypt data with it,
65
+ * and only User B (with the private key) can decrypt it.
66
+ */
67
+ createEncryptionKeyPair(password: string): Promise<EncryptionKeyPair>;
68
+ /**
69
+ * Internal method to encrypt a private key using password-based key derivation.
70
+ * This is the reverse of BaseMindooTenant.decryptPrivateKey().
71
+ *
72
+ * @param privateKeyBytes The private key bytes to encrypt
73
+ * @param password The password to encrypt the key with
74
+ * @param saltString The salt string for key derivation (e.g., "signing", "encryption", "administration", keyId)
75
+ * @returns The encrypted private key
76
+ */
77
+ private encryptPrivateKey;
78
+ /**
79
+ * Convert ArrayBuffer to PEM format
80
+ */
81
+ private arrayBufferToPEM;
82
+ /**
83
+ * Convert Uint8Array to PEM format
84
+ */
85
+ private uint8ArrayToPEM;
86
+ /**
87
+ * Helper method to convert Uint8Array to base64 string
88
+ */
89
+ private uint8ArrayToBase64;
90
+ }
91
+ //# sourceMappingURL=BaseMindooTenantFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseMindooTenantFactory.d.ts","sourceRoot":"","sources":["../../src/core/BaseMindooTenantFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,4BAA4B,EAC5B,cAAc,EACd,iBAAiB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC;;;;;;GAMG;AACH,qBAAa,uBAAwB,YAAW,mBAAmB;IACjE,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,YAAY,CAA+B;gBAEvC,YAAY,EAAE,4BAA4B,EAAE,aAAa,EAAE,aAAa;IAKpF,gBAAgB,IAAI,aAAa;IAIjC;;;;;;;;;;;;;;;;;OAiBG;IACG,YAAY,CAChB,QAAQ,EAAE,MAAM,EAChB,uBAAuB,EAAE,MAAM,EAC/B,iCAAiC,EAAE,MAAM,EACzC,2BAA2B,EAAE,MAAM,EACnC,WAAW,EAAE,aAAa,EAC1B,mBAAmB,EAAE,MAAM,EAC3B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,YAAY,CAAC;IAsCxB;;OAEG;IACG,kBAAkB,CACtB,QAAQ,EAAE,MAAM,EAChB,0BAA0B,EAAE,mBAAmB,EAC/C,2BAA2B,EAAE,MAAM,EACnC,uBAAuB,EAAE,MAAM,EAC/B,iCAAiC,EAAE,MAAM,EACzC,WAAW,EAAE,aAAa,EAC1B,mBAAmB,EAAE,MAAM,EAC3B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,YAAY,CAAC;IAuBxB;;OAEG;IACG,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA8E9E;;OAEG;IACH,cAAc,CAAC,aAAa,EAAE,aAAa,GAAG,YAAY;IAS1D;;;;OAIG;IACG,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAgCrE;;;;OAIG;IACG,kCAAkC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA2BxF;;;;;;OAMG;IACG,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAqC3E;;;;;;;;OAQG;YACW,iBAAiB;IAgF/B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAKxB;;OAEG;IACH,OAAO,CAAC,eAAe;IAMvB;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAO3B"}
@@ -0,0 +1,297 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseMindooTenantFactory = void 0;
4
+ const BaseMindooTenant_1 = require("./BaseMindooTenant");
5
+ /**
6
+ * BaseTenantFactory is a platform-agnostic implementation of TenantFactory
7
+ * that creates and manages tenants and users.
8
+ *
9
+ * It uses CryptoAdapter to abstract platform-specific crypto operations,
10
+ * allowing the same implementation to work in browsers and Node.js.
11
+ */
12
+ class BaseMindooTenantFactory {
13
+ constructor(storeFactory, cryptoAdapter) {
14
+ this.storeFactory = storeFactory;
15
+ this.cryptoAdapter = cryptoAdapter;
16
+ }
17
+ getCryptoAdapter() {
18
+ return this.cryptoAdapter;
19
+ }
20
+ /**
21
+ * Create a new tenant from scratch with a new tenant encryption key.
22
+ *
23
+ * The administration public key must be created beforehand using createSigningKeyPair()
24
+ * and passed to this method.
25
+ *
26
+ * The administration encryption public key must be created using createEncryptionKeyPair()
27
+ * and is used to encrypt sensitive data in the directory that only admins can decrypt.
28
+ *
29
+ * @param tenantId The ID of the tenant
30
+ * @param administrationPublicKey The administration public key (Ed25519, PEM format) created using createSigningKeyPair()
31
+ * @param administrationEncryptionPublicKey The administration encryption public key (RSA-OAEP, PEM format) created using createEncryptionKeyPair()
32
+ * @param tenantEncryptionKeyPassword The password to decrypt the tenant encryption private key
33
+ * @param currentUser The current user's private user ID (required for tenant operations)
34
+ * @param currentUserPassword The password to decrypt the current user's private keys
35
+ * @param keyBag The KeyBag instance for storing and loading named encrypted keys
36
+ * @return The new tenant
37
+ */
38
+ async createTenant(tenantId, administrationPublicKey, administrationEncryptionPublicKey, tenantEncryptionKeyPassword, currentUser, currentUserPassword, keyBag) {
39
+ console.log(`[BaseTenantFactory] Creating tenant: ${tenantId}`);
40
+ const subtle = this.cryptoAdapter.getSubtle();
41
+ // Generate tenant encryption key (AES-256)
42
+ const tenantEncryptionKey = await subtle.generateKey({
43
+ name: "AES-GCM",
44
+ length: 256,
45
+ }, true, // extractable
46
+ ["encrypt", "decrypt"]);
47
+ // Export the tenant encryption key material
48
+ const tenantKeyMaterial = await subtle.exportKey("raw", tenantEncryptionKey);
49
+ const tenantKeyBytes = new Uint8Array(tenantKeyMaterial);
50
+ // Encrypt the tenant encryption key with password
51
+ const encryptedTenantKey = await this.encryptPrivateKey(tenantKeyBytes, tenantEncryptionKeyPassword, "default");
52
+ return this.openTenantWithKeys(tenantId, encryptedTenantKey, tenantEncryptionKeyPassword, administrationPublicKey, administrationEncryptionPublicKey, currentUser, currentUserPassword, keyBag);
53
+ }
54
+ /**
55
+ * Opens an existing tenant with previously created keys.
56
+ */
57
+ async openTenantWithKeys(tenantId, tenantEncryptionPrivateKey, tenantEncryptionKeyPassword, administrationPublicKey, administrationEncryptionPublicKey, currentUser, currentUserPassword, keyBag) {
58
+ console.log(`[BaseTenantFactory] Opening tenant: ${tenantId}`);
59
+ const tenant = new BaseMindooTenant_1.BaseMindooTenant(this, tenantId, tenantEncryptionPrivateKey, tenantEncryptionKeyPassword, administrationPublicKey, administrationEncryptionPublicKey, currentUser, currentUserPassword, keyBag, this.storeFactory, this.cryptoAdapter);
60
+ // Initialize the tenant
61
+ await tenant.initialize();
62
+ return tenant;
63
+ }
64
+ /**
65
+ * Creates a new user with separate signing and encryption key pairs.
66
+ */
67
+ async createUserId(username, password) {
68
+ console.log(`[BaseTenantFactory] Creating user ID: ${username}`);
69
+ const subtle = this.cryptoAdapter.getSubtle();
70
+ // Generate signing key pair (Ed25519)
71
+ const signingKeyPair = await subtle.generateKey({
72
+ name: "Ed25519",
73
+ }, true, // extractable
74
+ ["sign", "verify"]);
75
+ // Export signing public key (PEM format)
76
+ const signingPublicKeyBuffer = await subtle.exportKey("spki", signingKeyPair.publicKey);
77
+ const signingPublicKey = this.arrayBufferToPEM(signingPublicKeyBuffer, "PUBLIC KEY");
78
+ // Export signing private key
79
+ const signingPrivateKeyBuffer = await subtle.exportKey("pkcs8", signingKeyPair.privateKey);
80
+ const signingPrivateKeyBytes = new Uint8Array(signingPrivateKeyBuffer);
81
+ // Encrypt signing private key with password (salt: "signing")
82
+ const encryptedSigningKey = await this.encryptPrivateKey(signingPrivateKeyBytes, password, "signing");
83
+ // Generate encryption key pair (RSA-OAEP, 3072 bits for state-of-the-art security)
84
+ // NIST recommends 3072-bit RSA for new applications (security through 2030+)
85
+ const encryptionKeyPair = await subtle.generateKey({
86
+ name: "RSA-OAEP",
87
+ modulusLength: 3072,
88
+ publicExponent: new Uint8Array([1, 0, 1]), // 65537
89
+ hash: "SHA-256",
90
+ }, true, // extractable
91
+ ["encrypt", "decrypt"]);
92
+ // Export encryption public key (PEM format)
93
+ const encryptionPublicKeyBuffer = await subtle.exportKey("spki", encryptionKeyPair.publicKey);
94
+ const encryptionPublicKey = this.arrayBufferToPEM(encryptionPublicKeyBuffer, "PUBLIC KEY");
95
+ // Export encryption private key
96
+ const encryptionPrivateKeyBuffer = await subtle.exportKey("pkcs8", encryptionKeyPair.privateKey);
97
+ const encryptionPrivateKeyBytes = new Uint8Array(encryptionPrivateKeyBuffer);
98
+ // Encrypt encryption private key with password (salt: "encryption")
99
+ const encryptedEncryptionKey = await this.encryptPrivateKey(encryptionPrivateKeyBytes, password, "encryption");
100
+ // Create PrivateUserId
101
+ const privateUserId = {
102
+ username,
103
+ administrationSignature: "", // Will be set when user is registered by an admin
104
+ userSigningKeyPair: {
105
+ publicKey: signingPublicKey,
106
+ privateKey: encryptedSigningKey,
107
+ },
108
+ userEncryptionKeyPair: {
109
+ publicKey: encryptionPublicKey,
110
+ privateKey: encryptedEncryptionKey,
111
+ },
112
+ };
113
+ console.log(`[BaseTenantFactory] Created user ID: ${username}`);
114
+ return privateUserId;
115
+ }
116
+ /**
117
+ * Removes the private information from a private user ID and returns a public user ID.
118
+ */
119
+ toPublicUserId(privateUserId) {
120
+ return {
121
+ username: privateUserId.username,
122
+ administrationSignature: privateUserId.administrationSignature,
123
+ userSigningPublicKey: privateUserId.userSigningKeyPair.publicKey,
124
+ userEncryptionPublicKey: privateUserId.userEncryptionKeyPair.publicKey,
125
+ };
126
+ }
127
+ /**
128
+ * Creates a new signing key pair for the tenant.
129
+ * Returns both the public and encrypted private key, as the public key is needed
130
+ * for signature verification by other users.
131
+ */
132
+ async createSigningKeyPair(password) {
133
+ console.log(`[BaseTenantFactory] Creating signing key pair`);
134
+ const subtle = this.cryptoAdapter.getSubtle();
135
+ // Generate a new Ed25519 signing key pair
136
+ const keyPair = await subtle.generateKey({
137
+ name: "Ed25519",
138
+ }, true, // extractable
139
+ ["sign", "verify"]);
140
+ // Export the public key (PEM format) - needed for signature verification
141
+ const publicKeyBuffer = await subtle.exportKey("spki", keyPair.publicKey);
142
+ const publicKey = this.arrayBufferToPEM(publicKeyBuffer, "PUBLIC KEY");
143
+ // Export the private key in PKCS8 format
144
+ const privateKeyBuffer = await subtle.exportKey("pkcs8", keyPair.privateKey);
145
+ const keyBytes = new Uint8Array(privateKeyBuffer);
146
+ // Encrypt the key material using the shared helper
147
+ const encryptedKey = await this.encryptPrivateKey(keyBytes, password, "signing");
148
+ console.log(`[BaseTenantFactory] Created signing key pair`);
149
+ return {
150
+ publicKey,
151
+ privateKey: encryptedKey,
152
+ };
153
+ }
154
+ /**
155
+ * Creates a new encrypted symmetric key (AES-256) for document encryption.
156
+ * Symmetric keys are shared secrets - anyone with the key can both encrypt and decrypt.
157
+ * For user-to-user encryption where only the recipient can decrypt, use createEncryptionKeyPair() instead.
158
+ */
159
+ async createSymmetricEncryptedPrivateKey(password) {
160
+ console.log(`[BaseTenantFactory] Creating encrypted symmetric key`);
161
+ const subtle = this.cryptoAdapter.getSubtle();
162
+ // Generate a new AES-256 key
163
+ const key = await subtle.generateKey({
164
+ name: "AES-GCM",
165
+ length: 256,
166
+ }, true, // extractable
167
+ ["encrypt", "decrypt"]);
168
+ // Export the key material
169
+ const keyMaterial = await subtle.exportKey("raw", key);
170
+ const keyBytes = new Uint8Array(keyMaterial);
171
+ // Encrypt the key material using the shared helper
172
+ // Use "default" as the salt string to match how tenant encryption keys are decrypted
173
+ const encryptedKey = await this.encryptPrivateKey(keyBytes, password, "default");
174
+ console.log(`[BaseTenantFactory] Created encrypted symmetric key`);
175
+ return encryptedKey;
176
+ }
177
+ /**
178
+ * Creates a new asymmetric encryption key pair (RSA-OAEP) for user-to-user encryption.
179
+ * Returns both the public and encrypted private key.
180
+ *
181
+ * Use case: User A can fetch User B's public key from the directory DB, encrypt data with it,
182
+ * and only User B (with the private key) can decrypt it.
183
+ */
184
+ async createEncryptionKeyPair(password) {
185
+ console.log(`[BaseTenantFactory] Creating encryption key pair`);
186
+ const subtle = this.cryptoAdapter.getSubtle();
187
+ // Generate a new RSA-OAEP encryption key pair (3072 bits for state-of-the-art security)
188
+ // NIST recommends 3072-bit RSA for new applications (security through 2030+)
189
+ const encryptionKeyPair = await subtle.generateKey({
190
+ name: "RSA-OAEP",
191
+ modulusLength: 3072,
192
+ publicExponent: new Uint8Array([1, 0, 1]), // 65537
193
+ hash: "SHA-256",
194
+ }, true, // extractable
195
+ ["encrypt", "decrypt"]);
196
+ // Export the public key (PEM format) - can be shared for encryption
197
+ const publicKeyBuffer = await subtle.exportKey("spki", encryptionKeyPair.publicKey);
198
+ const publicKey = this.arrayBufferToPEM(publicKeyBuffer, "PUBLIC KEY");
199
+ // Export the private key in PKCS8 format
200
+ const privateKeyBuffer = await subtle.exportKey("pkcs8", encryptionKeyPair.privateKey);
201
+ const privateKeyBytes = new Uint8Array(privateKeyBuffer);
202
+ // Encrypt the private key material using the shared helper
203
+ // Use "encryption" as the salt string (same as user encryption keys)
204
+ const encryptedKey = await this.encryptPrivateKey(privateKeyBytes, password, "encryption");
205
+ console.log(`[BaseTenantFactory] Created encryption key pair`);
206
+ return {
207
+ publicKey,
208
+ privateKey: encryptedKey,
209
+ };
210
+ }
211
+ /**
212
+ * Internal method to encrypt a private key using password-based key derivation.
213
+ * This is the reverse of BaseMindooTenant.decryptPrivateKey().
214
+ *
215
+ * @param privateKeyBytes The private key bytes to encrypt
216
+ * @param password The password to encrypt the key with
217
+ * @param saltString The salt string for key derivation (e.g., "signing", "encryption", "administration", keyId)
218
+ * @returns The encrypted private key
219
+ */
220
+ async encryptPrivateKey(privateKeyBytes, password, saltString) {
221
+ const subtle = this.cryptoAdapter.getSubtle();
222
+ // Bind getRandomValues to maintain 'this' context
223
+ const randomValues = this.cryptoAdapter.getRandomValues.bind(this.cryptoAdapter);
224
+ // Generate random salt and IV
225
+ const saltArray = new Uint8Array(16); // 16 bytes salt
226
+ randomValues(saltArray);
227
+ const salt = new Uint8Array(saltArray);
228
+ const ivArray = new Uint8Array(12); // 12 bytes for AES-GCM
229
+ randomValues(ivArray);
230
+ const iv = new Uint8Array(ivArray);
231
+ // Combine salt with saltString for key derivation (same as decryption)
232
+ const saltStringBytes = new TextEncoder().encode(saltString);
233
+ const combinedSalt = new Uint8Array(salt.length + saltStringBytes.length);
234
+ combinedSalt.set(salt);
235
+ combinedSalt.set(saltStringBytes, salt.length);
236
+ // Derive encryption key from password using PBKDF2
237
+ const passwordKey = await subtle.importKey("raw", new TextEncoder().encode(password), "PBKDF2", false, ["deriveBits", "deriveKey"]);
238
+ const iterations = 310000; // OWASP-recommended PBKDF2 iterations for PBKDF2-SHA256
239
+ const derivedKey = await subtle.deriveKey({
240
+ name: "PBKDF2",
241
+ salt: combinedSalt,
242
+ iterations: iterations,
243
+ hash: "SHA-256",
244
+ }, passwordKey, {
245
+ name: "AES-GCM",
246
+ length: 256,
247
+ }, false, ["encrypt"]);
248
+ // Encrypt the private key
249
+ const encrypted = await subtle.encrypt({
250
+ name: "AES-GCM",
251
+ iv: iv,
252
+ tagLength: 128,
253
+ }, derivedKey, privateKeyBytes.buffer);
254
+ // Extract ciphertext and tag from encrypted data
255
+ // AES-GCM appends the tag at the end
256
+ const encryptedArray = new Uint8Array(encrypted);
257
+ const tagLength = 16; // 128 bits = 16 bytes
258
+ const ciphertext = encryptedArray.slice(0, encryptedArray.length - tagLength);
259
+ const tag = encryptedArray.slice(encryptedArray.length - tagLength);
260
+ // Create encrypted key structure
261
+ const encryptedKey = {
262
+ ciphertext: this.uint8ArrayToBase64(ciphertext),
263
+ iv: this.uint8ArrayToBase64(iv),
264
+ tag: this.uint8ArrayToBase64(tag),
265
+ salt: this.uint8ArrayToBase64(salt),
266
+ iterations: iterations,
267
+ };
268
+ return encryptedKey;
269
+ }
270
+ /**
271
+ * Convert ArrayBuffer to PEM format
272
+ */
273
+ arrayBufferToPEM(buffer, type) {
274
+ const bytes = new Uint8Array(buffer);
275
+ return this.uint8ArrayToPEM(bytes, type);
276
+ }
277
+ /**
278
+ * Convert Uint8Array to PEM format
279
+ */
280
+ uint8ArrayToPEM(bytes, type) {
281
+ const base64 = this.uint8ArrayToBase64(bytes);
282
+ const chunks = base64.match(/.{1,64}/g) || [];
283
+ return `-----BEGIN ${type}-----\n${chunks.join("\n")}\n-----END ${type}-----`;
284
+ }
285
+ /**
286
+ * Helper method to convert Uint8Array to base64 string
287
+ */
288
+ uint8ArrayToBase64(bytes) {
289
+ let binary = "";
290
+ for (let i = 0; i < bytes.length; i++) {
291
+ binary += String.fromCharCode(bytes[i]);
292
+ }
293
+ return btoa(binary);
294
+ }
295
+ }
296
+ exports.BaseMindooTenantFactory = BaseMindooTenantFactory;
297
+ //# sourceMappingURL=BaseMindooTenantFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseMindooTenantFactory.js","sourceRoot":"","sources":["../../src/core/BaseMindooTenantFactory.ts"],"names":[],"mappings":";;;AASA,yDAAsD;AAItD;;;;;;GAMG;AACH,MAAa,uBAAuB;IAIlC,YAAY,YAA0C,EAAE,aAA4B;QAClF,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,YAAY,CAChB,QAAgB,EAChB,uBAA+B,EAC/B,iCAAyC,EACzC,2BAAmC,EACnC,WAA0B,EAC1B,mBAA2B,EAC3B,MAAc;QAEd,OAAO,CAAC,GAAG,CAAC,wCAAwC,QAAQ,EAAE,CAAC,CAAC;QAEhE,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;QAE9C,2CAA2C;QAC3C,MAAM,mBAAmB,GAAG,MAAM,MA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;IACK,gBAAgB,CAAC,MAAmB,EAAE,IAAY;QACxD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED;;OAEG;IACK,eAAe,CAAC,KAAiB,EAAE,IAAY;QACrD,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QAC9C,OAAO,cAAc,IAAI,UAAU,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,OAAO,CAAC;IAChF,CAAC;IAED;;OAEG;IACK,kBAAkB,CAAC,KAAiB;QAC1C,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CACF;AAlbD,0DAkbC"}
@@ -0,0 +1,111 @@
1
+ import { ContentAddressedStore, ContentAddressedStoreFactory, CreateStoreResult, OpenStoreOptions } from "./types";
2
+ import type { StoreEntry, StoreEntryMetadata } from "../types";
3
+ /**
4
+ * A simple in-memory implementation of ContentAddressedStore for testing purposes.
5
+ *
6
+ * Uses dual-index storage:
7
+ * - Metadata indexed by entry id (primary key)
8
+ * - Encrypted bytes indexed by contentHash (for deduplication)
9
+ *
10
+ * This allows multiple entries to share the same encrypted bytes if they have
11
+ * the same contentHash, enabling storage-level deduplication.
12
+ */
13
+ export declare class InMemoryContentAddressedStore implements ContentAddressedStore {
14
+ private dbId;
15
+ /** Metadata indexed by entry id */
16
+ private entries;
17
+ /** Encrypted bytes indexed by contentHash (deduplicated) */
18
+ private contentStore;
19
+ /** Index for finding entries by docId (for efficient doc queries) */
20
+ private docIndex;
21
+ constructor(dbId: string);
22
+ getId(): string;
23
+ /**
24
+ * Store one or more entries.
25
+ * - Metadata is stored by entry id (always unique)
26
+ * - Encrypted bytes are deduplicated by contentHash (same bytes stored once)
27
+ *
28
+ * @param entries The entries to store
29
+ * @return A promise that resolves when all entries are stored
30
+ */
31
+ putEntries(entries: StoreEntry[]): Promise<void>;
32
+ /**
33
+ * Get entries by their IDs.
34
+ * Returns only entries that exist in this store.
35
+ *
36
+ * @param ids The IDs of the entries to fetch
37
+ * @return A list of entries (may be shorter than input if some don't exist)
38
+ */
39
+ getEntries(ids: string[]): Promise<StoreEntry[]>;
40
+ /**
41
+ * Check which IDs from the provided list exist in this store.
42
+ *
43
+ * @param ids The IDs to check
44
+ * @return A list of IDs that exist in this store
45
+ */
46
+ hasEntries(ids: string[]): Promise<string[]>;
47
+ /**
48
+ * Find entries in the store that are not listed in the given list of IDs.
49
+ * Used for synchronization to identify which entries we have that the peer doesn't.
50
+ *
51
+ * @param knownIds The list of entry IDs we already have
52
+ * @return A list of entry metadata for entries we have that aren't in knownIds
53
+ */
54
+ findNewEntries(knownIds: string[]): Promise<StoreEntryMetadata[]>;
55
+ /**
56
+ * Find entries in the store for a specific document that are not listed in the given list of IDs.
57
+ *
58
+ * @param knownIds The list of entry IDs we already have
59
+ * @param docId The ID of the document
60
+ * @return A list of entry metadata for entries we have that aren't in knownIds
61
+ */
62
+ findNewEntriesForDoc(knownIds: string[], docId: string): Promise<StoreEntryMetadata[]>;
63
+ /**
64
+ * Get all entry IDs in the store.
65
+ * Used for synchronization to identify which entries we have.
66
+ *
67
+ * @return A list of all entry IDs in the store
68
+ */
69
+ getAllIds(): Promise<string[]>;
70
+ /**
71
+ * Resolve the dependency chain starting from an entry ID.
72
+ * Returns IDs in dependency order (oldest first), traversing backward through dependencyIds.
73
+ *
74
+ * @param startId The entry ID to start traversal from
75
+ * @param options Optional traversal options:
76
+ * - stopAtEntryType: Stop when encountering an entry of this type (e.g., "doc_snapshot")
77
+ * - maxDepth: Maximum number of hops to traverse
78
+ * - includeStart: Whether to include startId in the result (default: true)
79
+ * @return A list of entry IDs in dependency order (oldest first)
80
+ */
81
+ resolveDependencies(startId: string, options?: Record<string, unknown>): Promise<string[]>;
82
+ /**
83
+ * Purge all entries for a specific document from the store.
84
+ * This breaks append-only semantics but is required for GDPR compliance.
85
+ *
86
+ * After purging, all entries for the specified document will be removed
87
+ * from the store. Content bytes that are no longer referenced by any
88
+ * entry will also be cleaned up.
89
+ *
90
+ * @param docId The document ID whose entries should be purged
91
+ * @return A promise that resolves when the purge is complete
92
+ */
93
+ purgeDocHistory(docId: string): Promise<void>;
94
+ /**
95
+ * Get storage statistics for debugging/monitoring.
96
+ * @returns Object with entry count, content count, and doc count
97
+ */
98
+ getStats(): {
99
+ entryCount: number;
100
+ contentCount: number;
101
+ docCount: number;
102
+ };
103
+ }
104
+ /**
105
+ * Factory for creating InMemoryContentAddressedStore instances.
106
+ * Each database gets its own isolated in-memory store.
107
+ */
108
+ export declare class InMemoryContentAddressedStoreFactory implements ContentAddressedStoreFactory {
109
+ createStore(dbId: string, _options?: OpenStoreOptions): CreateStoreResult;
110
+ }
111
+ //# sourceMappingURL=InMemoryContentAddressedStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InMemoryContentAddressedStore.d.ts","sourceRoot":"","sources":["../../../src/core/appendonlystores/InMemoryContentAddressedStore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAElB;;;;;;;;;GASG;AACH,qBAAa,6BAA8B,YAAW,qBAAqB;IACzE,OAAO,CAAC,IAAI,C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