@openclaw/matrix 2026.7.1-beta.2 → 2026.7.1-beta.5

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 (1070) hide show
  1. package/dist/{account-selection-Bv_ZuOu4.js → account-selection-5e4mHR1m.js} +1 -1
  2. package/dist/api.js +5 -5
  3. package/dist/{approval-handler.runtime-DzpLXVdc.js → approval-handler.runtime-DI5x9r8I.js} +5 -5
  4. package/dist/{approval-ids-R834n6m3.js → approval-ids-ZgqbspmS.js} +1 -1
  5. package/dist/{approval-reaction-auth-eAqCXUFG.js → approval-reaction-auth-D9LijQhr.js} +2 -2
  6. package/dist/{approval-reactions-BRGQgOu2.js → approval-reactions-BdUaUXVw.js} +24 -73
  7. package/dist/auth-presence.js +1 -1
  8. package/dist/{channel-KcNo9qtl.js → channel-jUTBsjHU.js} +20 -18
  9. package/dist/channel-plugin-api.js +1 -1
  10. package/dist/{channel.runtime-DtsGVgZj.js → channel.runtime-DO1Nv9ed.js} +25 -13
  11. package/dist/{cli-Clvpw_8I.js → cli-CEfWwCKx.js} +9 -9
  12. package/dist/{cli-metadata-D3N0Avnt.js → cli-metadata-CfiEO-CE.js} +1 -1
  13. package/dist/cli-metadata.js +1 -1
  14. package/dist/{client-BQz5GcYr.js → client-FRuyCNju.js} +2 -2
  15. package/dist/{client-bootstrap-CBJciU5u.js → client-bootstrap-DjFJ7e0N.js} +1 -2
  16. package/dist/{client-D-5GVz_D.js → client-tgnlQJk4.js} +2 -2
  17. package/dist/{config-schema-Dn-fHID8.js → config-schema-DtnhNYd-.js} +1 -1
  18. package/dist/contract-api.js +2 -2
  19. package/dist/{create-client-DhGid8FE.js → create-client-CNakT7zF.js} +3 -3
  20. package/dist/{credentials-G8lNmiME.js → credentials-Ds9V1mn2.js} +1 -1
  21. package/dist/{credentials-read-TzTOQPOM.js → credentials-read-BlkvsNFg.js} +1 -1
  22. package/dist/{credentials-write.runtime-5PDPPG9f.js → credentials-write.runtime-CTqqxcut.js} +1 -1
  23. package/dist/{crypto-runtime-B7kyrTL0.js → crypto-runtime-B74cTS6A.js} +4 -4
  24. package/dist/{crypto-state-store-DK2tcEyP.js → crypto-state-store-Jy3qwhdy.js} +1 -1
  25. package/dist/{deps-D3bkh48_.js → deps-CdjHvnmh.js} +20 -2
  26. package/dist/{directory-live-Ctu4whZK.js → directory-live-Ufd4qSpX.js} +2 -2
  27. package/dist/{doctor-BRSDNU5C.js → doctor-DfaOqFtr.js} +3 -3
  28. package/dist/{doctor-contract-Dq8OZWHF.js → doctor-contract-BAja_fmb.js} +1 -1
  29. package/dist/doctor-contract-api.js +8 -14
  30. package/dist/{draft-stream-j71tSUu-.js → draft-stream-D4EH25gv.js} +1 -1
  31. package/dist/{encryption-guidance-Bg3IRYoX.js → encryption-guidance-D8walY04.js} +1 -1
  32. package/dist/{file-sync-store-BWLVB01Y.js → file-sync-store-DVm0ACml.js} +3 -3
  33. package/dist/helper-api.js +1 -1
  34. package/dist/{idb-persistence-BGY1CJ7J.js → idb-persistence-BHm97th-.js} +1 -1
  35. package/dist/index.js +1 -1
  36. package/dist/{legacy-crypto-inspector-D_8iylBq.js → legacy-crypto-inspector-vzXSkm18.js} +1 -1
  37. package/dist/{legacy-crypto-restore-B0gcIEkE.js → legacy-crypto-restore-CIBfOmLn.js} +2 -2
  38. package/dist/{matrix-migration.runtime-Ctlb_rZl.js → matrix-migration.runtime-BMCyrANT.js} +3 -3
  39. package/dist/{media-text-XO4VaezT.js → media-text-p-LP21qs.js} +1 -1
  40. package/dist/{messages-nQLGGa1r.js → messages-DRKkiEY-.js} +6 -5
  41. package/dist/{monitor-k3Sko8qt.js → monitor-CsGOGdwu.js} +71 -71
  42. package/dist/plugin-entry.handlers.runtime.js +1 -1
  43. package/dist/probe.runtime-2MZLc6ng.js +3 -0
  44. package/dist/{profile-update-DIOAhezh.js → profile-update-Ucc8RrJL.js} +2 -2
  45. package/dist/{reaction-events-BDsbR82F.js → reaction-events-DentrVii.js} +3 -3
  46. package/dist/{recovery-key-store-BGk8c_gf.js → recovery-key-store-DSeLFvNx.js} +1 -1
  47. package/dist/{resolve-targets-BbrinjHd.js → resolve-targets-DcV_KfgX.js} +1 -1
  48. package/dist/{resolver.runtime-B3N7k_6-.js → resolver.runtime-Hr6bO5zl.js} +1 -1
  49. package/dist/runtime-api.js +2 -2
  50. package/dist/runtime-heavy-api.js +1 -1
  51. package/dist/{sdk-eyqOqjmn.js → sdk-AZYVl34z.js} +8 -6
  52. package/dist/{send-D0hpevF-.js → send-D92v6Yy0.js} +21 -8
  53. package/dist/session-binding-contract-api.js +1 -1
  54. package/dist/{setup-bootstrap-Ihb_DM2a.js → setup-bootstrap-Da564w5f.js} +2 -2
  55. package/dist/{setup-core-D2BQs8w1.js → setup-core-BGgbrdaJ.js} +5 -8
  56. package/dist/setup-plugin-api.js +3 -3
  57. package/dist/{setup-surface-1qf1LZIP.js → setup-surface-iJ6pd-t5.js} +6 -6
  58. package/dist/{shared-BGcaBMK3.js → shared-DkFfq7mH.js} +6 -6
  59. package/dist/{startup-verification-Bd31KqLv.js → startup-verification-BKMAXvcV.js} +2 -2
  60. package/dist/{storage-t5S-5c_5.js → storage-CQdyKcGg.js} +5 -5
  61. package/dist/{thread-bindings-BnuBS0VH.js → thread-bindings-BX5nmWpw.js} +3 -3
  62. package/dist/{tool-actions.runtime-BeUveYxV.js → tool-actions.runtime-C1d5fxE_.js} +12 -12
  63. package/dist/{verification-CNw2K4uT.js → verification-BGCMiO1p.js} +2 -2
  64. package/node_modules/@babel/runtime/package.json +468 -1089
  65. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/.cargo/config.toml +2 -0
  66. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/CHANGELOG.md +12 -3
  67. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/README.md +17 -0
  68. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js +10 -2
  69. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/package.json +1 -1
  70. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/xtask/.idea/modules.xml +8 -0
  71. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/xtask/.idea/vcs.xml +6 -0
  72. package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/xtask/.idea/xtask.iml +11 -0
  73. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/package.json +1 -1
  74. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.cjs +28 -28
  75. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.js +24 -24
  76. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm +0 -0
  77. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts +58 -58
  78. package/node_modules/content-type/README.md +32 -57
  79. package/node_modules/content-type/dist/index.d.ts +26 -0
  80. package/node_modules/content-type/dist/index.js +170 -0
  81. package/node_modules/content-type/dist/index.js.map +1 -0
  82. package/node_modules/content-type/package.json +35 -25
  83. package/node_modules/linkify-it/README.md +3 -4
  84. package/node_modules/linkify-it/build/index.cjs.js +44 -41
  85. package/node_modules/linkify-it/index.mjs +10 -11
  86. package/node_modules/linkify-it/lib/re.mjs +34 -30
  87. package/node_modules/linkify-it/package.json +10 -15
  88. package/node_modules/markdown-it/dist/index.cjs.js +3652 -5378
  89. package/node_modules/markdown-it/dist/index.cjs.js.map +1 -0
  90. package/node_modules/markdown-it/dist/markdown-it.js +1399 -4479
  91. package/node_modules/markdown-it/dist/markdown-it.js.map +1 -0
  92. package/node_modules/markdown-it/dist/markdown-it.min.js +3 -2
  93. package/node_modules/markdown-it/dist/markdown-it.min.js.map +1 -0
  94. package/node_modules/markdown-it/lib/common/html_re.mjs +9 -9
  95. package/node_modules/markdown-it/lib/common/utils.mjs +2 -11
  96. package/node_modules/markdown-it/lib/parser_block.mjs +9 -9
  97. package/node_modules/markdown-it/lib/parser_core.mjs +7 -7
  98. package/node_modules/markdown-it/lib/parser_inline.mjs +16 -16
  99. package/node_modules/markdown-it/lib/renderer.mjs +2 -2
  100. package/node_modules/markdown-it/lib/rules_block/blockquote.mjs +6 -6
  101. package/node_modules/markdown-it/lib/rules_block/code.mjs +2 -2
  102. package/node_modules/markdown-it/lib/rules_block/fence.mjs +4 -4
  103. package/node_modules/markdown-it/lib/rules_block/heading.mjs +7 -7
  104. package/node_modules/markdown-it/lib/rules_block/hr.mjs +2 -2
  105. package/node_modules/markdown-it/lib/rules_block/html_block.mjs +6 -6
  106. package/node_modules/markdown-it/lib/rules_block/lheading.mjs +8 -8
  107. package/node_modules/markdown-it/lib/rules_block/list.mjs +6 -6
  108. package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +5 -5
  109. package/node_modules/markdown-it/lib/rules_block/reference.mjs +1 -1
  110. package/node_modules/markdown-it/lib/rules_block/state_block.mjs +6 -6
  111. package/node_modules/markdown-it/lib/rules_block/table.mjs +4 -4
  112. package/node_modules/markdown-it/lib/rules_core/block.mjs +3 -3
  113. package/node_modules/markdown-it/lib/rules_core/linkify.mjs +15 -15
  114. package/node_modules/markdown-it/lib/rules_core/normalize.mjs +2 -2
  115. package/node_modules/markdown-it/lib/rules_inline/autolink.mjs +17 -17
  116. package/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +2 -2
  117. package/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +8 -8
  118. package/node_modules/markdown-it/lib/rules_inline/entity.mjs +7 -7
  119. package/node_modules/markdown-it/lib/rules_inline/escape.mjs +15 -1
  120. package/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +1 -1
  121. package/node_modules/markdown-it/lib/rules_inline/link.mjs +1 -1
  122. package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +2 -2
  123. package/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +10 -10
  124. package/node_modules/markdown-it/lib/token.mjs +12 -12
  125. package/node_modules/markdown-it/package.json +25 -34
  126. package/node_modules/matrix-js-sdk/CHANGELOG.md +24 -0
  127. package/node_modules/matrix-js-sdk/README.md +1 -1
  128. package/node_modules/matrix-js-sdk/lib/@types/AESEncryptedSecretStoragePayload.js +3 -1
  129. package/node_modules/matrix-js-sdk/lib/@types/IIdentityServerProvider.js +3 -1
  130. package/node_modules/matrix-js-sdk/lib/@types/PushRules.js +7 -7
  131. package/node_modules/matrix-js-sdk/lib/@types/PushRules.js.map +1 -1
  132. package/node_modules/matrix-js-sdk/lib/@types/auth.js +4 -4
  133. package/node_modules/matrix-js-sdk/lib/@types/auth.js.map +1 -1
  134. package/node_modules/matrix-js-sdk/lib/@types/beacon.js +2 -2
  135. package/node_modules/matrix-js-sdk/lib/@types/beacon.js.map +1 -1
  136. package/node_modules/matrix-js-sdk/lib/@types/common.js +3 -1
  137. package/node_modules/matrix-js-sdk/lib/@types/crypto.js +3 -1
  138. package/node_modules/matrix-js-sdk/lib/@types/event.d.ts +6 -1
  139. package/node_modules/matrix-js-sdk/lib/@types/event.d.ts.map +1 -1
  140. package/node_modules/matrix-js-sdk/lib/@types/event.js +23 -20
  141. package/node_modules/matrix-js-sdk/lib/@types/event.js.map +1 -1
  142. package/node_modules/matrix-js-sdk/lib/@types/events.js +3 -1
  143. package/node_modules/matrix-js-sdk/lib/@types/extensible_events.js +6 -6
  144. package/node_modules/matrix-js-sdk/lib/@types/extensible_events.js.map +1 -1
  145. package/node_modules/matrix-js-sdk/lib/@types/global.d.js.map +1 -1
  146. package/node_modules/matrix-js-sdk/lib/@types/json.js +3 -1
  147. package/node_modules/matrix-js-sdk/lib/@types/local_notifications.js +3 -1
  148. package/node_modules/matrix-js-sdk/lib/@types/location.js +4 -4
  149. package/node_modules/matrix-js-sdk/lib/@types/location.js.map +1 -1
  150. package/node_modules/matrix-js-sdk/lib/@types/matrix-sdk-crypto-wasm.d.js +3 -1
  151. package/node_modules/matrix-js-sdk/lib/@types/media.js +3 -1
  152. package/node_modules/matrix-js-sdk/lib/@types/membership.js +1 -1
  153. package/node_modules/matrix-js-sdk/lib/@types/membership.js.map +1 -1
  154. package/node_modules/matrix-js-sdk/lib/@types/partials.js +6 -6
  155. package/node_modules/matrix-js-sdk/lib/@types/partials.js.map +1 -1
  156. package/node_modules/matrix-js-sdk/lib/@types/polls.js +5 -5
  157. package/node_modules/matrix-js-sdk/lib/@types/polls.js.map +1 -1
  158. package/node_modules/matrix-js-sdk/lib/@types/read_receipts.js +2 -2
  159. package/node_modules/matrix-js-sdk/lib/@types/read_receipts.js.map +1 -1
  160. package/node_modules/matrix-js-sdk/lib/@types/registration.js +3 -1
  161. package/node_modules/matrix-js-sdk/lib/@types/requests.js +1 -1
  162. package/node_modules/matrix-js-sdk/lib/@types/requests.js.map +1 -1
  163. package/node_modules/matrix-js-sdk/lib/@types/retention.d.ts +15 -0
  164. package/node_modules/matrix-js-sdk/lib/@types/retention.d.ts.map +1 -0
  165. package/node_modules/matrix-js-sdk/lib/@types/retention.js +13 -0
  166. package/node_modules/matrix-js-sdk/lib/@types/retention.js.map +1 -0
  167. package/node_modules/matrix-js-sdk/lib/@types/search.js +1 -1
  168. package/node_modules/matrix-js-sdk/lib/@types/search.js.map +1 -1
  169. package/node_modules/matrix-js-sdk/lib/@types/signed.js +3 -1
  170. package/node_modules/matrix-js-sdk/lib/@types/spaces.js +3 -1
  171. package/node_modules/matrix-js-sdk/lib/@types/state_events.js +3 -1
  172. package/node_modules/matrix-js-sdk/lib/@types/synapse.js +3 -1
  173. package/node_modules/matrix-js-sdk/lib/@types/sync.js +1 -1
  174. package/node_modules/matrix-js-sdk/lib/@types/sync.js.map +1 -1
  175. package/node_modules/matrix-js-sdk/lib/@types/threepids.js +1 -1
  176. package/node_modules/matrix-js-sdk/lib/@types/threepids.js.map +1 -1
  177. package/node_modules/matrix-js-sdk/lib/@types/topic.js +1 -1
  178. package/node_modules/matrix-js-sdk/lib/@types/topic.js.map +1 -1
  179. package/node_modules/matrix-js-sdk/lib/@types/uia.js +3 -1
  180. package/node_modules/matrix-js-sdk/lib/NamespacedValue.js +8 -8
  181. package/node_modules/matrix-js-sdk/lib/NamespacedValue.js.map +1 -1
  182. package/node_modules/matrix-js-sdk/lib/ReEmitter.js +8 -15
  183. package/node_modules/matrix-js-sdk/lib/ReEmitter.js.map +1 -1
  184. package/node_modules/matrix-js-sdk/lib/ToDeviceMessageQueue.js +47 -55
  185. package/node_modules/matrix-js-sdk/lib/ToDeviceMessageQueue.js.map +1 -1
  186. package/node_modules/matrix-js-sdk/lib/autodiscovery.js +233 -247
  187. package/node_modules/matrix-js-sdk/lib/autodiscovery.js.map +1 -1
  188. package/node_modules/matrix-js-sdk/lib/base64.js +1 -1
  189. package/node_modules/matrix-js-sdk/lib/base64.js.map +1 -1
  190. package/node_modules/matrix-js-sdk/lib/browser-index.d.ts +2 -2
  191. package/node_modules/matrix-js-sdk/lib/browser-index.d.ts.map +1 -1
  192. package/node_modules/matrix-js-sdk/lib/browser-index.js +5 -5
  193. package/node_modules/matrix-js-sdk/lib/browser-index.js.map +1 -1
  194. package/node_modules/matrix-js-sdk/lib/capabilityPoller.d.ts +38 -0
  195. package/node_modules/matrix-js-sdk/lib/capabilityPoller.d.ts.map +1 -0
  196. package/node_modules/matrix-js-sdk/lib/capabilityPoller.js +93 -0
  197. package/node_modules/matrix-js-sdk/lib/capabilityPoller.js.map +1 -0
  198. package/node_modules/matrix-js-sdk/lib/client.d.ts +9 -8
  199. package/node_modules/matrix-js-sdk/lib/client.d.ts.map +1 -1
  200. package/node_modules/matrix-js-sdk/lib/client.js +2123 -2483
  201. package/node_modules/matrix-js-sdk/lib/client.js.map +1 -1
  202. package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.js +3 -1
  203. package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.js.map +1 -1
  204. package/node_modules/matrix-js-sdk/lib/common-crypto/key-passphrase.js.map +1 -1
  205. package/node_modules/matrix-js-sdk/lib/content-helpers.js +43 -48
  206. package/node_modules/matrix-js-sdk/lib/content-helpers.js.map +1 -1
  207. package/node_modules/matrix-js-sdk/lib/content-repo.js +14 -24
  208. package/node_modules/matrix-js-sdk/lib/content-repo.js.map +1 -1
  209. package/node_modules/matrix-js-sdk/lib/crypto/store/base.js +6 -6
  210. package/node_modules/matrix-js-sdk/lib/crypto/store/base.js.map +1 -1
  211. package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store-backend.js +189 -237
  212. package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -1
  213. package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store.js +25 -28
  214. package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store.js.map +1 -1
  215. package/node_modules/matrix-js-sdk/lib/crypto/store/localStorage-crypto-store.js +113 -145
  216. package/node_modules/matrix-js-sdk/lib/crypto/store/localStorage-crypto-store.js.map +1 -1
  217. package/node_modules/matrix-js-sdk/lib/crypto/store/memory-crypto-store.js +74 -105
  218. package/node_modules/matrix-js-sdk/lib/crypto/store/memory-crypto-store.js.map +1 -1
  219. package/node_modules/matrix-js-sdk/lib/crypto-api/CryptoEvent.js +1 -1
  220. package/node_modules/matrix-js-sdk/lib/crypto-api/CryptoEvent.js.map +1 -1
  221. package/node_modules/matrix-js-sdk/lib/crypto-api/CryptoEventHandlerMap.js +3 -1
  222. package/node_modules/matrix-js-sdk/lib/crypto-api/index.d.ts +15 -6
  223. package/node_modules/matrix-js-sdk/lib/crypto-api/index.d.ts.map +1 -1
  224. package/node_modules/matrix-js-sdk/lib/crypto-api/index.js +76 -76
  225. package/node_modules/matrix-js-sdk/lib/crypto-api/index.js.map +1 -1
  226. package/node_modules/matrix-js-sdk/lib/crypto-api/key-passphrase.js +15 -23
  227. package/node_modules/matrix-js-sdk/lib/crypto-api/key-passphrase.js.map +1 -1
  228. package/node_modules/matrix-js-sdk/lib/crypto-api/keybackup.js +3 -1
  229. package/node_modules/matrix-js-sdk/lib/crypto-api/recovery-key.js +11 -12
  230. package/node_modules/matrix-js-sdk/lib/crypto-api/recovery-key.js.map +1 -1
  231. package/node_modules/matrix-js-sdk/lib/crypto-api/verification.js +3 -3
  232. package/node_modules/matrix-js-sdk/lib/crypto-api/verification.js.map +1 -1
  233. package/node_modules/matrix-js-sdk/lib/digest.js +7 -14
  234. package/node_modules/matrix-js-sdk/lib/digest.js.map +1 -1
  235. package/node_modules/matrix-js-sdk/lib/embedded.d.ts.map +1 -1
  236. package/node_modules/matrix-js-sdk/lib/embedded.js +379 -500
  237. package/node_modules/matrix-js-sdk/lib/embedded.js.map +1 -1
  238. package/node_modules/matrix-js-sdk/lib/errors.js +2 -2
  239. package/node_modules/matrix-js-sdk/lib/errors.js.map +1 -1
  240. package/node_modules/matrix-js-sdk/lib/event-mapper.js +10 -12
  241. package/node_modules/matrix-js-sdk/lib/event-mapper.js.map +1 -1
  242. package/node_modules/matrix-js-sdk/lib/extensible_events_v1/ExtensibleEvent.js.map +1 -1
  243. package/node_modules/matrix-js-sdk/lib/extensible_events_v1/InvalidEventError.js.map +1 -1
  244. package/node_modules/matrix-js-sdk/lib/extensible_events_v1/MessageEvent.js +26 -28
  245. package/node_modules/matrix-js-sdk/lib/extensible_events_v1/MessageEvent.js.map +1 -1
  246. package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollEndEvent.js +11 -12
  247. package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollEndEvent.js.map +1 -1
  248. package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollResponseEvent.js +6 -6
  249. package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollResponseEvent.js.map +1 -1
  250. package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollStartEvent.js +36 -38
  251. package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollStartEvent.js.map +1 -1
  252. package/node_modules/matrix-js-sdk/lib/extensible_events_v1/utilities.js.map +1 -1
  253. package/node_modules/matrix-js-sdk/lib/feature.js +18 -31
  254. package/node_modules/matrix-js-sdk/lib/feature.js.map +1 -1
  255. package/node_modules/matrix-js-sdk/lib/filter-component.d.ts.map +1 -1
  256. package/node_modules/matrix-js-sdk/lib/filter-component.js +20 -26
  257. package/node_modules/matrix-js-sdk/lib/filter-component.js.map +1 -1
  258. package/node_modules/matrix-js-sdk/lib/filter.js +14 -15
  259. package/node_modules/matrix-js-sdk/lib/filter.js.map +1 -1
  260. package/node_modules/matrix-js-sdk/lib/http-api/errors.js +41 -56
  261. package/node_modules/matrix-js-sdk/lib/http-api/errors.js.map +1 -1
  262. package/node_modules/matrix-js-sdk/lib/http-api/fetch.js +140 -157
  263. package/node_modules/matrix-js-sdk/lib/http-api/fetch.js.map +1 -1
  264. package/node_modules/matrix-js-sdk/lib/http-api/index.js +17 -20
  265. package/node_modules/matrix-js-sdk/lib/http-api/index.js.map +1 -1
  266. package/node_modules/matrix-js-sdk/lib/http-api/interface.js +1 -1
  267. package/node_modules/matrix-js-sdk/lib/http-api/interface.js.map +1 -1
  268. package/node_modules/matrix-js-sdk/lib/http-api/method.js +1 -1
  269. package/node_modules/matrix-js-sdk/lib/http-api/method.js.map +1 -1
  270. package/node_modules/matrix-js-sdk/lib/http-api/prefix.js +3 -3
  271. package/node_modules/matrix-js-sdk/lib/http-api/prefix.js.map +1 -1
  272. package/node_modules/matrix-js-sdk/lib/http-api/refresh.js +80 -99
  273. package/node_modules/matrix-js-sdk/lib/http-api/refresh.js.map +1 -1
  274. package/node_modules/matrix-js-sdk/lib/http-api/utils.d.ts +1 -1
  275. package/node_modules/matrix-js-sdk/lib/http-api/utils.d.ts.map +1 -1
  276. package/node_modules/matrix-js-sdk/lib/http-api/utils.js +35 -47
  277. package/node_modules/matrix-js-sdk/lib/http-api/utils.js.map +1 -1
  278. package/node_modules/matrix-js-sdk/lib/index.js.map +1 -1
  279. package/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js +3 -3
  280. package/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js.map +1 -1
  281. package/node_modules/matrix-js-sdk/lib/indexeddb-worker.js.map +1 -1
  282. package/node_modules/matrix-js-sdk/lib/interactive-auth.d.ts +5 -5
  283. package/node_modules/matrix-js-sdk/lib/interactive-auth.d.ts.map +1 -1
  284. package/node_modules/matrix-js-sdk/lib/interactive-auth.js +181 -203
  285. package/node_modules/matrix-js-sdk/lib/interactive-auth.js.map +1 -1
  286. package/node_modules/matrix-js-sdk/lib/logger.js +22 -56
  287. package/node_modules/matrix-js-sdk/lib/logger.js.map +1 -1
  288. package/node_modules/matrix-js-sdk/lib/matrix.d.ts +1 -0
  289. package/node_modules/matrix-js-sdk/lib/matrix.d.ts.map +1 -1
  290. package/node_modules/matrix-js-sdk/lib/matrix.js +8 -11
  291. package/node_modules/matrix-js-sdk/lib/matrix.js.map +1 -1
  292. package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js +83 -76
  293. package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js.map +1 -1
  294. package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.js +1 -1
  295. package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.js.map +1 -1
  296. package/node_modules/matrix-js-sdk/lib/matrixrtc/IKeyTransport.js +1 -1
  297. package/node_modules/matrix-js-sdk/lib/matrixrtc/IKeyTransport.js.map +1 -1
  298. package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.js +1 -1
  299. package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.js.map +1 -1
  300. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts +1 -1
  301. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js +4 -4
  302. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js.map +1 -1
  303. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
  304. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js +144 -184
  305. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
  306. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.js +35 -39
  307. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.js.map +1 -1
  308. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts +2 -0
  309. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts.map +1 -1
  310. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js +346 -383
  311. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js.map +1 -1
  312. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManagerActionScheduler.d.ts.map +1 -1
  313. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManagerActionScheduler.js +54 -59
  314. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManagerActionScheduler.js.map +1 -1
  315. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js +117 -139
  316. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js.map +1 -1
  317. package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js +49 -54
  318. package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js.map +1 -1
  319. package/node_modules/matrix-js-sdk/lib/matrixrtc/index.js.map +1 -1
  320. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.js +1 -1
  321. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.js.map +1 -1
  322. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/index.js.map +1 -1
  323. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js +15 -23
  324. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js.map +1 -1
  325. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js +4 -5
  326. package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js.map +1 -1
  327. package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js +4 -6
  328. package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js.map +1 -1
  329. package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.js +4 -11
  330. package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.js.map +1 -1
  331. package/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.js +91 -116
  332. package/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.js.map +1 -1
  333. package/node_modules/matrix-js-sdk/lib/models/MSC3089TreeSpace.js +209 -244
  334. package/node_modules/matrix-js-sdk/lib/models/MSC3089TreeSpace.js.map +1 -1
  335. package/node_modules/matrix-js-sdk/lib/models/ToDeviceMessage.js +3 -1
  336. package/node_modules/matrix-js-sdk/lib/models/beacon.js +20 -15
  337. package/node_modules/matrix-js-sdk/lib/models/beacon.js.map +1 -1
  338. package/node_modules/matrix-js-sdk/lib/models/compare-event-ordering.js +13 -13
  339. package/node_modules/matrix-js-sdk/lib/models/compare-event-ordering.js.map +1 -1
  340. package/node_modules/matrix-js-sdk/lib/models/device.js +10 -3
  341. package/node_modules/matrix-js-sdk/lib/models/device.js.map +1 -1
  342. package/node_modules/matrix-js-sdk/lib/models/event-context.js +5 -7
  343. package/node_modules/matrix-js-sdk/lib/models/event-context.js.map +1 -1
  344. package/node_modules/matrix-js-sdk/lib/models/event-status.js +1 -1
  345. package/node_modules/matrix-js-sdk/lib/models/event-status.js.map +1 -1
  346. package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js +91 -91
  347. package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js.map +1 -1
  348. package/node_modules/matrix-js-sdk/lib/models/event-timeline.js +31 -29
  349. package/node_modules/matrix-js-sdk/lib/models/event-timeline.js.map +1 -1
  350. package/node_modules/matrix-js-sdk/lib/models/event.js +215 -235
  351. package/node_modules/matrix-js-sdk/lib/models/event.js.map +1 -1
  352. package/node_modules/matrix-js-sdk/lib/models/invites-ignorer-types.js +4 -4
  353. package/node_modules/matrix-js-sdk/lib/models/invites-ignorer-types.js.map +1 -1
  354. package/node_modules/matrix-js-sdk/lib/models/invites-ignorer.js +159 -179
  355. package/node_modules/matrix-js-sdk/lib/models/invites-ignorer.js.map +1 -1
  356. package/node_modules/matrix-js-sdk/lib/models/poll.js +72 -78
  357. package/node_modules/matrix-js-sdk/lib/models/poll.js.map +1 -1
  358. package/node_modules/matrix-js-sdk/lib/models/profile-keys.js +2 -2
  359. package/node_modules/matrix-js-sdk/lib/models/profile-keys.js.map +1 -1
  360. package/node_modules/matrix-js-sdk/lib/models/read-receipt.js +40 -56
  361. package/node_modules/matrix-js-sdk/lib/models/read-receipt.js.map +1 -1
  362. package/node_modules/matrix-js-sdk/lib/models/related-relations.js +2 -0
  363. package/node_modules/matrix-js-sdk/lib/models/related-relations.js.map +1 -1
  364. package/node_modules/matrix-js-sdk/lib/models/relations-container.js +20 -21
  365. package/node_modules/matrix-js-sdk/lib/models/relations-container.js.map +1 -1
  366. package/node_modules/matrix-js-sdk/lib/models/relations.js +131 -156
  367. package/node_modules/matrix-js-sdk/lib/models/relations.js.map +1 -1
  368. package/node_modules/matrix-js-sdk/lib/models/room-member.js +44 -27
  369. package/node_modules/matrix-js-sdk/lib/models/room-member.js.map +1 -1
  370. package/node_modules/matrix-js-sdk/lib/models/room-receipts.js +48 -55
  371. package/node_modules/matrix-js-sdk/lib/models/room-receipts.js.map +1 -1
  372. package/node_modules/matrix-js-sdk/lib/models/room-retention.d.ts +28 -0
  373. package/node_modules/matrix-js-sdk/lib/models/room-retention.d.ts.map +1 -0
  374. package/node_modules/matrix-js-sdk/lib/models/room-retention.js +192 -0
  375. package/node_modules/matrix-js-sdk/lib/models/room-retention.js.map +1 -0
  376. package/node_modules/matrix-js-sdk/lib/models/room-state.js +141 -170
  377. package/node_modules/matrix-js-sdk/lib/models/room-state.js.map +1 -1
  378. package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts +1 -0
  379. package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts.map +1 -1
  380. package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js +46 -65
  381. package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js.map +1 -1
  382. package/node_modules/matrix-js-sdk/lib/models/room-summary.js.map +1 -1
  383. package/node_modules/matrix-js-sdk/lib/models/room.d.ts +2 -1
  384. package/node_modules/matrix-js-sdk/lib/models/room.d.ts.map +1 -1
  385. package/node_modules/matrix-js-sdk/lib/models/room.js +800 -887
  386. package/node_modules/matrix-js-sdk/lib/models/room.js.map +1 -1
  387. package/node_modules/matrix-js-sdk/lib/models/search-result.js +5 -5
  388. package/node_modules/matrix-js-sdk/lib/models/search-result.js.map +1 -1
  389. package/node_modules/matrix-js-sdk/lib/models/thread.js +267 -283
  390. package/node_modules/matrix-js-sdk/lib/models/thread.js.map +1 -1
  391. package/node_modules/matrix-js-sdk/lib/models/typed-event-emitter.js +7 -18
  392. package/node_modules/matrix-js-sdk/lib/models/typed-event-emitter.js.map +1 -1
  393. package/node_modules/matrix-js-sdk/lib/models/user.js +26 -7
  394. package/node_modules/matrix-js-sdk/lib/models/user.js.map +1 -1
  395. package/node_modules/matrix-js-sdk/lib/oidc/authorize.js +208 -241
  396. package/node_modules/matrix-js-sdk/lib/oidc/authorize.js.map +1 -1
  397. package/node_modules/matrix-js-sdk/lib/oidc/discovery.js +23 -36
  398. package/node_modules/matrix-js-sdk/lib/oidc/discovery.js.map +1 -1
  399. package/node_modules/matrix-js-sdk/lib/oidc/error.js +1 -1
  400. package/node_modules/matrix-js-sdk/lib/oidc/error.js.map +1 -1
  401. package/node_modules/matrix-js-sdk/lib/oidc/index.js +1 -0
  402. package/node_modules/matrix-js-sdk/lib/oidc/index.js.map +1 -1
  403. package/node_modules/matrix-js-sdk/lib/oidc/register.js +60 -66
  404. package/node_modules/matrix-js-sdk/lib/oidc/register.js.map +1 -1
  405. package/node_modules/matrix-js-sdk/lib/oidc/tokenRefresher.js +83 -94
  406. package/node_modules/matrix-js-sdk/lib/oidc/tokenRefresher.js.map +1 -1
  407. package/node_modules/matrix-js-sdk/lib/oidc/validate.js +18 -18
  408. package/node_modules/matrix-js-sdk/lib/oidc/validate.js.map +1 -1
  409. package/node_modules/matrix-js-sdk/lib/pushprocessor.js +70 -81
  410. package/node_modules/matrix-js-sdk/lib/pushprocessor.js.map +1 -1
  411. package/node_modules/matrix-js-sdk/lib/randomstring.js +9 -9
  412. package/node_modules/matrix-js-sdk/lib/randomstring.js.map +1 -1
  413. package/node_modules/matrix-js-sdk/lib/realtime-callbacks.js +25 -28
  414. package/node_modules/matrix-js-sdk/lib/realtime-callbacks.js.map +1 -1
  415. package/node_modules/matrix-js-sdk/lib/receipt-accumulator.d.ts +2 -0
  416. package/node_modules/matrix-js-sdk/lib/receipt-accumulator.d.ts.map +1 -1
  417. package/node_modules/matrix-js-sdk/lib/receipt-accumulator.js +14 -22
  418. package/node_modules/matrix-js-sdk/lib/receipt-accumulator.js.map +1 -1
  419. package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.js +272 -298
  420. package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.js.map +1 -1
  421. package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousChannel.js +3 -1
  422. package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousCode.js +3 -1
  423. package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousError.js.map +1 -1
  424. package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousFailureReason.js +2 -2
  425. package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousFailureReason.js.map +1 -1
  426. package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousIntent.js +1 -1
  427. package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousIntent.js.map +1 -1
  428. package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousTransport.js +3 -1
  429. package/node_modules/matrix-js-sdk/lib/rendezvous/channels/MSC4108SecureChannel.js +122 -144
  430. package/node_modules/matrix-js-sdk/lib/rendezvous/channels/MSC4108SecureChannel.js.map +1 -1
  431. package/node_modules/matrix-js-sdk/lib/rendezvous/index.js +44 -69
  432. package/node_modules/matrix-js-sdk/lib/rendezvous/index.js.map +1 -1
  433. package/node_modules/matrix-js-sdk/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts +1 -1
  434. package/node_modules/matrix-js-sdk/lib/rendezvous/transports/MSC4108RendezvousSession.js +142 -152
  435. package/node_modules/matrix-js-sdk/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +1 -1
  436. package/node_modules/matrix-js-sdk/lib/retentionPolicy.d.ts +33 -0
  437. package/node_modules/matrix-js-sdk/lib/retentionPolicy.d.ts.map +1 -0
  438. package/node_modules/matrix-js-sdk/lib/retentionPolicy.js +39 -0
  439. package/node_modules/matrix-js-sdk/lib/retentionPolicy.js.map +1 -0
  440. package/node_modules/matrix-js-sdk/lib/room-hierarchy.js +52 -56
  441. package/node_modules/matrix-js-sdk/lib/room-hierarchy.js.map +1 -1
  442. package/node_modules/matrix-js-sdk/lib/rust-crypto/CrossSigningIdentity.js +94 -104
  443. package/node_modules/matrix-js-sdk/lib/rust-crypto/CrossSigningIdentity.js.map +1 -1
  444. package/node_modules/matrix-js-sdk/lib/rust-crypto/DehydratedDeviceManager.js +158 -190
  445. package/node_modules/matrix-js-sdk/lib/rust-crypto/DehydratedDeviceManager.js.map +1 -1
  446. package/node_modules/matrix-js-sdk/lib/rust-crypto/KeyClaimManager.js +17 -20
  447. package/node_modules/matrix-js-sdk/lib/rust-crypto/KeyClaimManager.js.map +1 -1
  448. package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestProcessor.js +109 -139
  449. package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestProcessor.js.map +1 -1
  450. package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestsManager.js +72 -86
  451. package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestsManager.js.map +1 -1
  452. package/node_modules/matrix-js-sdk/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts +1 -1
  453. package/node_modules/matrix-js-sdk/lib/rust-crypto/PerSessionKeyBackupDownloader.js +195 -221
  454. package/node_modules/matrix-js-sdk/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +1 -1
  455. package/node_modules/matrix-js-sdk/lib/rust-crypto/RoomEncryptor.js +121 -137
  456. package/node_modules/matrix-js-sdk/lib/rust-crypto/RoomEncryptor.js.map +1 -1
  457. package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.d.ts +7 -2
  458. package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.d.ts.map +1 -1
  459. package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.js +459 -544
  460. package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.js.map +1 -1
  461. package/node_modules/matrix-js-sdk/lib/rust-crypto/constants.js +1 -1
  462. package/node_modules/matrix-js-sdk/lib/rust-crypto/constants.js.map +1 -1
  463. package/node_modules/matrix-js-sdk/lib/rust-crypto/device-converter.js +15 -28
  464. package/node_modules/matrix-js-sdk/lib/rust-crypto/device-converter.js.map +1 -1
  465. package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js +103 -116
  466. package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js.map +1 -1
  467. package/node_modules/matrix-js-sdk/lib/rust-crypto/libolm_migration.js +303 -365
  468. package/node_modules/matrix-js-sdk/lib/rust-crypto/libolm_migration.js.map +1 -1
  469. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.d.ts +5 -1
  470. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
  471. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js +1065 -1322
  472. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js.map +1 -1
  473. package/node_modules/matrix-js-sdk/lib/rust-crypto/secret-storage.js +12 -25
  474. package/node_modules/matrix-js-sdk/lib/rust-crypto/secret-storage.js.map +1 -1
  475. package/node_modules/matrix-js-sdk/lib/rust-crypto/verification.js +134 -184
  476. package/node_modules/matrix-js-sdk/lib/rust-crypto/verification.js.map +1 -1
  477. package/node_modules/matrix-js-sdk/lib/scheduler.js +42 -17
  478. package/node_modules/matrix-js-sdk/lib/scheduler.js.map +1 -1
  479. package/node_modules/matrix-js-sdk/lib/secret-storage.js +179 -213
  480. package/node_modules/matrix-js-sdk/lib/secret-storage.js.map +1 -1
  481. package/node_modules/matrix-js-sdk/lib/serverCapabilities.d.ts +4 -23
  482. package/node_modules/matrix-js-sdk/lib/serverCapabilities.d.ts.map +1 -1
  483. package/node_modules/matrix-js-sdk/lib/serverCapabilities.js +9 -62
  484. package/node_modules/matrix-js-sdk/lib/serverCapabilities.js.map +1 -1
  485. package/node_modules/matrix-js-sdk/lib/service-types.js +1 -1
  486. package/node_modules/matrix-js-sdk/lib/service-types.js.map +1 -1
  487. package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.d.ts.map +1 -1
  488. package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js +368 -421
  489. package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js.map +1 -1
  490. package/node_modules/matrix-js-sdk/lib/sliding-sync.js +136 -167
  491. package/node_modules/matrix-js-sdk/lib/sliding-sync.js.map +1 -1
  492. package/node_modules/matrix-js-sdk/lib/store/index.d.ts +7 -0
  493. package/node_modules/matrix-js-sdk/lib/store/index.d.ts.map +1 -1
  494. package/node_modules/matrix-js-sdk/lib/store/index.js +3 -1
  495. package/node_modules/matrix-js-sdk/lib/store/index.js.map +1 -1
  496. package/node_modules/matrix-js-sdk/lib/store/indexeddb-backend.js +3 -1
  497. package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.d.ts +1 -0
  498. package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.d.ts.map +1 -1
  499. package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.js +197 -240
  500. package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.js.map +1 -1
  501. package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.d.ts +3 -1
  502. package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.d.ts.map +1 -1
  503. package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.js +51 -59
  504. package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.js.map +1 -1
  505. package/node_modules/matrix-js-sdk/lib/store/indexeddb-store-worker.js +22 -22
  506. package/node_modules/matrix-js-sdk/lib/store/indexeddb-store-worker.js.map +1 -1
  507. package/node_modules/matrix-js-sdk/lib/store/indexeddb.d.ts +7 -5
  508. package/node_modules/matrix-js-sdk/lib/store/indexeddb.d.ts.map +1 -1
  509. package/node_modules/matrix-js-sdk/lib/store/indexeddb.js +63 -79
  510. package/node_modules/matrix-js-sdk/lib/store/indexeddb.js.map +1 -1
  511. package/node_modules/matrix-js-sdk/lib/store/local-storage-events-emitter.js +2 -2
  512. package/node_modules/matrix-js-sdk/lib/store/local-storage-events-emitter.js.map +1 -1
  513. package/node_modules/matrix-js-sdk/lib/store/memory.d.ts +1 -0
  514. package/node_modules/matrix-js-sdk/lib/store/memory.d.ts.map +1 -1
  515. package/node_modules/matrix-js-sdk/lib/store/memory.js +38 -54
  516. package/node_modules/matrix-js-sdk/lib/store/memory.js.map +1 -1
  517. package/node_modules/matrix-js-sdk/lib/store/stub.d.ts +1 -0
  518. package/node_modules/matrix-js-sdk/lib/store/stub.d.ts.map +1 -1
  519. package/node_modules/matrix-js-sdk/lib/store/stub.js +22 -32
  520. package/node_modules/matrix-js-sdk/lib/store/stub.js.map +1 -1
  521. package/node_modules/matrix-js-sdk/lib/sync-accumulator.d.ts +1 -0
  522. package/node_modules/matrix-js-sdk/lib/sync-accumulator.d.ts.map +1 -1
  523. package/node_modules/matrix-js-sdk/lib/sync-accumulator.js +57 -65
  524. package/node_modules/matrix-js-sdk/lib/sync-accumulator.js.map +1 -1
  525. package/node_modules/matrix-js-sdk/lib/sync.d.ts.map +1 -1
  526. package/node_modules/matrix-js-sdk/lib/sync.js +914 -991
  527. package/node_modules/matrix-js-sdk/lib/sync.js.map +1 -1
  528. package/node_modules/matrix-js-sdk/lib/testing.js +63 -105
  529. package/node_modules/matrix-js-sdk/lib/testing.js.map +1 -1
  530. package/node_modules/matrix-js-sdk/lib/thread-utils.js +1 -4
  531. package/node_modules/matrix-js-sdk/lib/thread-utils.js.map +1 -1
  532. package/node_modules/matrix-js-sdk/lib/timeline-window.js +90 -99
  533. package/node_modules/matrix-js-sdk/lib/timeline-window.js.map +1 -1
  534. package/node_modules/matrix-js-sdk/lib/types.js +1 -1
  535. package/node_modules/matrix-js-sdk/lib/types.js.map +1 -1
  536. package/node_modules/matrix-js-sdk/lib/utils/decryptAESSecretStorageItem.js +14 -25
  537. package/node_modules/matrix-js-sdk/lib/utils/decryptAESSecretStorageItem.js.map +1 -1
  538. package/node_modules/matrix-js-sdk/lib/utils/encryptAESSecretStorageItem.js +27 -38
  539. package/node_modules/matrix-js-sdk/lib/utils/encryptAESSecretStorageItem.js.map +1 -1
  540. package/node_modules/matrix-js-sdk/lib/utils/internal/deriveKeys.js +25 -32
  541. package/node_modules/matrix-js-sdk/lib/utils/internal/deriveKeys.js.map +1 -1
  542. package/node_modules/matrix-js-sdk/lib/utils/roomVersion.js +1 -1
  543. package/node_modules/matrix-js-sdk/lib/utils/roomVersion.js.map +1 -1
  544. package/node_modules/matrix-js-sdk/lib/utils.js +83 -135
  545. package/node_modules/matrix-js-sdk/lib/utils.js.map +1 -1
  546. package/node_modules/matrix-js-sdk/lib/version-support.js +3 -3
  547. package/node_modules/matrix-js-sdk/lib/version-support.js.map +1 -1
  548. package/node_modules/matrix-js-sdk/lib/webrtc/audioContext.js +5 -6
  549. package/node_modules/matrix-js-sdk/lib/webrtc/audioContext.js.map +1 -1
  550. package/node_modules/matrix-js-sdk/lib/webrtc/call.js +1123 -1256
  551. package/node_modules/matrix-js-sdk/lib/webrtc/call.js.map +1 -1
  552. package/node_modules/matrix-js-sdk/lib/webrtc/callEventHandler.js +207 -214
  553. package/node_modules/matrix-js-sdk/lib/webrtc/callEventHandler.js.map +1 -1
  554. package/node_modules/matrix-js-sdk/lib/webrtc/callEventTypes.js +2 -2
  555. package/node_modules/matrix-js-sdk/lib/webrtc/callEventTypes.js.map +1 -1
  556. package/node_modules/matrix-js-sdk/lib/webrtc/callFeed.js +33 -20
  557. package/node_modules/matrix-js-sdk/lib/webrtc/callFeed.js.map +1 -1
  558. package/node_modules/matrix-js-sdk/lib/webrtc/groupCall.js +521 -594
  559. package/node_modules/matrix-js-sdk/lib/webrtc/groupCall.js.map +1 -1
  560. package/node_modules/matrix-js-sdk/lib/webrtc/groupCallEventHandler.js +58 -61
  561. package/node_modules/matrix-js-sdk/lib/webrtc/groupCallEventHandler.js.map +1 -1
  562. package/node_modules/matrix-js-sdk/lib/webrtc/mediaHandler.js +203 -233
  563. package/node_modules/matrix-js-sdk/lib/webrtc/mediaHandler.js.map +1 -1
  564. package/node_modules/matrix-js-sdk/lib/webrtc/stats/callFeedStatsReporter.js +16 -20
  565. package/node_modules/matrix-js-sdk/lib/webrtc/stats/callFeedStatsReporter.js.map +1 -1
  566. package/node_modules/matrix-js-sdk/lib/webrtc/stats/callStatsReportGatherer.js +65 -70
  567. package/node_modules/matrix-js-sdk/lib/webrtc/stats/callStatsReportGatherer.js.map +1 -1
  568. package/node_modules/matrix-js-sdk/lib/webrtc/stats/callStatsReportSummary.js +3 -1
  569. package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStats.js.map +1 -1
  570. package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsBuilder.js +2 -2
  571. package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsBuilder.js.map +1 -1
  572. package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsReportBuilder.js +20 -24
  573. package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsReportBuilder.js.map +1 -1
  574. package/node_modules/matrix-js-sdk/lib/webrtc/stats/groupCallStats.js +4 -5
  575. package/node_modules/matrix-js-sdk/lib/webrtc/stats/groupCallStats.js.map +1 -1
  576. package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaSsrcHandler.js +7 -8
  577. package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaSsrcHandler.js.map +1 -1
  578. package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackHandler.js +7 -9
  579. package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackHandler.js.map +1 -1
  580. package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackStats.js.map +1 -1
  581. package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackStatsHandler.js +6 -6
  582. package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +1 -1
  583. package/node_modules/matrix-js-sdk/lib/webrtc/stats/statsReport.js +1 -1
  584. package/node_modules/matrix-js-sdk/lib/webrtc/stats/statsReport.js.map +1 -1
  585. package/node_modules/matrix-js-sdk/lib/webrtc/stats/statsReportEmitter.js.map +1 -1
  586. package/node_modules/matrix-js-sdk/lib/webrtc/stats/summaryStatsReportGatherer.js +14 -14
  587. package/node_modules/matrix-js-sdk/lib/webrtc/stats/summaryStatsReportGatherer.js.map +1 -1
  588. package/node_modules/matrix-js-sdk/lib/webrtc/stats/trackStatsBuilder.js +32 -34
  589. package/node_modules/matrix-js-sdk/lib/webrtc/stats/trackStatsBuilder.js.map +1 -1
  590. package/node_modules/matrix-js-sdk/lib/webrtc/stats/transportStats.js +3 -1
  591. package/node_modules/matrix-js-sdk/lib/webrtc/stats/transportStatsBuilder.js +9 -9
  592. package/node_modules/matrix-js-sdk/lib/webrtc/stats/transportStatsBuilder.js.map +1 -1
  593. package/node_modules/matrix-js-sdk/lib/webrtc/stats/valueFormatter.js +1 -1
  594. package/node_modules/matrix-js-sdk/lib/webrtc/stats/valueFormatter.js.map +1 -1
  595. package/node_modules/matrix-js-sdk/package.json +110 -138
  596. package/node_modules/matrix-js-sdk/src/@types/event.ts +9 -0
  597. package/node_modules/matrix-js-sdk/src/@types/global.d.ts +2 -2
  598. package/node_modules/matrix-js-sdk/src/@types/retention.ts +16 -0
  599. package/node_modules/matrix-js-sdk/src/ToDeviceMessageQueue.ts +2 -2
  600. package/node_modules/matrix-js-sdk/src/browser-index.ts +4 -4
  601. package/node_modules/matrix-js-sdk/src/capabilityPoller.ts +102 -0
  602. package/node_modules/matrix-js-sdk/src/client.ts +37 -25
  603. package/node_modules/matrix-js-sdk/src/crypto-api/index.ts +17 -6
  604. package/node_modules/matrix-js-sdk/src/embedded.ts +4 -6
  605. package/node_modules/matrix-js-sdk/src/filter-component.ts +1 -0
  606. package/node_modules/matrix-js-sdk/src/http-api/utils.ts +5 -10
  607. package/node_modules/matrix-js-sdk/src/interactive-auth.ts +11 -5
  608. package/node_modules/matrix-js-sdk/src/matrix.ts +1 -0
  609. package/node_modules/matrix-js-sdk/src/matrixrtc/LivekitTransport.ts +1 -1
  610. package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +5 -4
  611. package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManager.ts +2 -0
  612. package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManagerActionScheduler.ts +4 -1
  613. package/node_modules/matrix-js-sdk/src/models/MSC3089Branch.ts +1 -1
  614. package/node_modules/matrix-js-sdk/src/models/room-retention.ts +230 -0
  615. package/node_modules/matrix-js-sdk/src/models/room-sticky-events.ts +1 -0
  616. package/node_modules/matrix-js-sdk/src/models/room.ts +26 -12
  617. package/node_modules/matrix-js-sdk/src/receipt-accumulator.ts +2 -0
  618. package/node_modules/matrix-js-sdk/src/rendezvous/index.ts +1 -1
  619. package/node_modules/matrix-js-sdk/src/rendezvous/transports/MSC4108RendezvousSession.ts +2 -2
  620. package/node_modules/matrix-js-sdk/src/retentionPolicy.ts +65 -0
  621. package/node_modules/matrix-js-sdk/src/rust-crypto/PerSessionKeyBackupDownloader.ts +1 -1
  622. package/node_modules/matrix-js-sdk/src/rust-crypto/backup.ts +15 -4
  623. package/node_modules/matrix-js-sdk/src/rust-crypto/index.ts +6 -6
  624. package/node_modules/matrix-js-sdk/src/rust-crypto/rust-crypto.ts +31 -7
  625. package/node_modules/matrix-js-sdk/src/rust-crypto/verification.ts +1 -1
  626. package/node_modules/matrix-js-sdk/src/serverCapabilities.ts +8 -67
  627. package/node_modules/matrix-js-sdk/src/sliding-sync-sdk.ts +5 -7
  628. package/node_modules/matrix-js-sdk/src/store/index.ts +8 -0
  629. package/node_modules/matrix-js-sdk/src/store/indexeddb-local-backend.ts +12 -2
  630. package/node_modules/matrix-js-sdk/src/store/indexeddb-remote-backend.ts +24 -5
  631. package/node_modules/matrix-js-sdk/src/store/indexeddb.ts +20 -8
  632. package/node_modules/matrix-js-sdk/src/store/memory.ts +4 -0
  633. package/node_modules/matrix-js-sdk/src/store/stub.ts +3 -0
  634. package/node_modules/matrix-js-sdk/src/sync-accumulator.ts +9 -0
  635. package/node_modules/matrix-js-sdk/src/sync.ts +11 -9
  636. package/node_modules/media-typer/README.md +19 -33
  637. package/node_modules/media-typer/dist/index.d.ts +29 -0
  638. package/node_modules/media-typer/dist/index.js +64 -0
  639. package/node_modules/media-typer/dist/index.js.map +1 -0
  640. package/node_modules/media-typer/package.json +37 -22
  641. package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +2 -2
  642. package/node_modules/music-metadata/lib/mp4/AtomToken.js +65 -13
  643. package/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +10 -0
  644. package/node_modules/music-metadata/lib/wav/WaveChunk.js +13 -3
  645. package/node_modules/music-metadata/lib/wav/WaveParser.d.ts +1 -0
  646. package/node_modules/music-metadata/lib/wav/WaveParser.js +6 -5
  647. package/node_modules/music-metadata/package.json +5 -5
  648. package/node_modules/typebox/build/compile/validator.d.mts +2 -7
  649. package/node_modules/typebox/build/compile/validator.mjs +6 -36
  650. package/node_modules/typebox/build/error/errors.d.mts +1 -7
  651. package/node_modules/typebox/build/format/_idna.mjs +36 -6
  652. package/node_modules/typebox/build/format/_puny.mjs +4 -1
  653. package/node_modules/typebox/build/format/uuid.d.mts +2 -2
  654. package/node_modules/typebox/build/format/uuid.mjs +3 -3
  655. package/node_modules/typebox/build/guard/emit.d.mts +0 -4
  656. package/node_modules/typebox/build/guard/emit.mjs +0 -8
  657. package/node_modules/typebox/build/guard/guard.d.mts +4 -8
  658. package/node_modules/typebox/build/guard/guard.mjs +5 -13
  659. package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
  660. package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
  661. package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
  662. package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
  663. package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
  664. package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
  665. package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
  666. package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
  667. package/node_modules/typebox/build/schema/types/index.mjs +0 -1
  668. package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
  669. package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
  670. package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
  671. package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
  672. package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
  673. package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
  674. package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
  675. package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
  676. package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
  677. package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
  678. package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
  679. package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
  680. package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
  681. package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
  682. package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
  683. package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
  684. package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
  685. package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
  686. package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
  687. package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
  688. package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
  689. package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
  690. package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
  691. package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
  692. package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
  693. package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
  694. package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
  695. package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
  696. package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
  697. package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
  698. package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
  699. package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
  700. package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
  701. package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
  702. package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
  703. package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
  704. package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
  705. package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
  706. package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
  707. package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
  708. package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
  709. package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
  710. package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
  711. package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
  712. package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  713. package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  714. package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  715. package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  716. package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  717. package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  718. package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  719. package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  720. package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  721. package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  722. package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  723. package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  724. package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
  725. package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
  726. package/node_modules/typebox/build/type/action/index.d.mts +7 -4
  727. package/node_modules/typebox/build/type/action/index.mjs +7 -4
  728. package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
  729. package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
  730. package/node_modules/typebox/build/type/action/module.d.mts +8 -7
  731. package/node_modules/typebox/build/type/action/module.mjs +7 -6
  732. package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
  733. package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
  734. package/node_modules/typebox/build/type/action/with.d.mts +11 -0
  735. package/node_modules/typebox/build/type/action/with.mjs +11 -0
  736. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  737. package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
  738. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
  739. package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
  740. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
  741. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
  742. package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
  743. package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
  744. package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
  745. package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
  746. package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
  747. package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
  748. package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
  749. package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
  750. package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
  751. package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
  752. package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
  753. package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
  754. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
  755. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
  756. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
  757. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
  758. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
  759. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
  760. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
  761. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
  762. package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
  763. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
  764. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
  765. package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
  766. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  767. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
  768. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  769. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  770. package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
  771. package/node_modules/typebox/build/type/engine/index.mjs +2 -2
  772. package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
  773. package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
  774. package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
  775. package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
  776. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
  777. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
  778. package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
  779. package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
  780. package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
  781. package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
  782. package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
  783. package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
  784. package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
  785. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
  786. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
  787. package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
  788. package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
  789. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
  790. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
  791. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
  792. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
  793. package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
  794. package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
  795. package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
  796. package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
  797. package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
  798. package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
  799. package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  800. package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
  801. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
  802. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  803. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  804. package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
  805. package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
  806. package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
  807. package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
  808. package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
  809. package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
  810. package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
  811. package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
  812. package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
  813. package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
  814. package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
  815. package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  816. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
  817. package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
  818. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  819. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
  820. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  821. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  822. package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
  823. package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
  824. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  825. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  826. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
  827. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
  828. package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
  829. package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
  830. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
  831. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
  832. package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
  833. package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
  834. package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
  835. package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
  836. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
  837. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
  838. package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
  839. package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
  840. package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
  841. package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
  842. package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
  843. package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
  844. package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
  845. package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
  846. package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
  847. package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
  848. package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
  849. package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
  850. package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
  851. package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  852. package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
  853. package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
  854. package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
  855. package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
  856. package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
  857. package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
  858. package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
  859. package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
  860. package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
  861. package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
  862. package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
  863. package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
  864. package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
  865. package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  866. package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
  867. package/node_modules/typebox/build/type/extends/object.mjs +25 -3
  868. package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
  869. package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
  870. package/node_modules/typebox/build/type/extends/record.mjs +23 -0
  871. package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
  872. package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
  873. package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
  874. package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
  875. package/node_modules/typebox/build/type/extends/union.mjs +2 -2
  876. package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
  877. package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
  878. package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
  879. package/node_modules/typebox/build/type/script/parser.mjs +22 -22
  880. package/node_modules/typebox/build/type/script/script.d.mts +3 -4
  881. package/node_modules/typebox/build/type/script/script.mjs +3 -2
  882. package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
  883. package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  884. package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
  885. package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
  886. package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
  887. package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
  888. package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
  889. package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
  890. package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
  891. package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
  892. package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
  893. package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
  894. package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
  895. package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
  896. package/node_modules/typebox/build/type/types/call.d.mts +3 -3
  897. package/node_modules/typebox/build/type/types/call.mjs +3 -2
  898. package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
  899. package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  900. package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
  901. package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
  902. package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
  903. package/node_modules/typebox/build/type/types/enum.mjs +5 -0
  904. package/node_modules/typebox/build/type/types/index.d.mts +1 -4
  905. package/node_modules/typebox/build/type/types/index.mjs +1 -4
  906. package/node_modules/typebox/build/type/types/number.d.mts +1 -1
  907. package/node_modules/typebox/build/type/types/number.mjs +1 -1
  908. package/node_modules/typebox/build/type/types/record.d.mts +13 -7
  909. package/node_modules/typebox/build/type/types/record.mjs +15 -9
  910. package/node_modules/typebox/build/type/types/static.d.mts +2 -5
  911. package/node_modules/typebox/build/typebox.d.mts +4 -8
  912. package/node_modules/typebox/build/typebox.mjs +4 -8
  913. package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
  914. package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
  915. package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
  916. package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
  917. package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
  918. package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
  919. package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
  920. package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
  921. package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
  922. package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
  923. package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
  924. package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
  925. package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
  926. package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
  927. package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
  928. package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
  929. package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
  930. package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
  931. package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
  932. package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  933. package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
  934. package/node_modules/typebox/build/value/index.d.mts +0 -1
  935. package/node_modules/typebox/build/value/index.mjs +0 -1
  936. package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
  937. package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
  938. package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
  939. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
  940. package/node_modules/typebox/build/value/value.d.mts +0 -1
  941. package/node_modules/typebox/build/value/value.mjs +0 -1
  942. package/node_modules/typebox/package.json +25 -25
  943. package/node_modules/typebox/readme.md +97 -80
  944. package/npm-shrinkwrap.json +59 -54
  945. package/package.json +10 -10
  946. package/dist/probe.runtime-BED7DXis.js +0 -3
  947. package/node_modules/@babel/runtime/helpers/AwaitValue.js +0 -4
  948. package/node_modules/@babel/runtime/helpers/applyDecs.js +0 -236
  949. package/node_modules/@babel/runtime/helpers/applyDecs2203.js +0 -184
  950. package/node_modules/@babel/runtime/helpers/applyDecs2203R.js +0 -191
  951. package/node_modules/@babel/runtime/helpers/applyDecs2301.js +0 -222
  952. package/node_modules/@babel/runtime/helpers/applyDecs2305.js +0 -133
  953. package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +0 -10
  954. package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +0 -4
  955. package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +0 -7
  956. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +0 -5
  957. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -4
  958. package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +0 -5
  959. package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +0 -7
  960. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +0 -7
  961. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +0 -7
  962. package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +0 -5
  963. package/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +0 -4
  964. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +0 -7
  965. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +0 -7
  966. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +0 -7
  967. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +0 -4
  968. package/node_modules/@babel/runtime/helpers/decorate.js +0 -250
  969. package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +0 -12
  970. package/node_modules/@babel/runtime/helpers/dispose.js +0 -28
  971. package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +0 -4
  972. package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +0 -236
  973. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +0 -184
  974. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +0 -191
  975. package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +0 -222
  976. package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +0 -133
  977. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +0 -10
  978. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +0 -4
  979. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +0 -7
  980. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
  981. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -4
  982. package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +0 -5
  983. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +0 -7
  984. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +0 -7
  985. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +0 -7
  986. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +0 -5
  987. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +0 -4
  988. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -7
  989. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -7
  990. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -7
  991. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +0 -4
  992. package/node_modules/@babel/runtime/helpers/esm/decorate.js +0 -250
  993. package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +0 -12
  994. package/node_modules/@babel/runtime/helpers/esm/dispose.js +0 -28
  995. package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +0 -14
  996. package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +0 -77
  997. package/node_modules/@babel/runtime/helpers/esm/using.js +0 -12
  998. package/node_modules/@babel/runtime/helpers/objectSpread.js +0 -14
  999. package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +0 -77
  1000. package/node_modules/@babel/runtime/helpers/using.js +0 -12
  1001. package/node_modules/@babel/runtime/regenerator/index.js +0 -15
  1002. package/node_modules/content-type/HISTORY.md +0 -29
  1003. package/node_modules/content-type/index.js +0 -225
  1004. package/node_modules/media-typer/HISTORY.md +0 -50
  1005. package/node_modules/media-typer/index.js +0 -143
  1006. package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
  1007. package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
  1008. package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
  1009. package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
  1010. package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
  1011. package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
  1012. package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
  1013. package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
  1014. package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
  1015. package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
  1016. package/node_modules/typebox/build/type/action/options.d.mts +0 -11
  1017. package/node_modules/typebox/build/type/action/options.mjs +0 -11
  1018. package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
  1019. package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
  1020. package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
  1021. package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
  1022. package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
  1023. package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
  1024. package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
  1025. package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
  1026. package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
  1027. package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
  1028. package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
  1029. package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
  1030. package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
  1031. package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
  1032. package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
  1033. package/node_modules/typebox/build/type/types/base.d.mts +0 -50
  1034. package/node_modules/typebox/build/type/types/base.mjs +0 -84
  1035. package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
  1036. package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
  1037. package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
  1038. package/node_modules/typebox/build/type/types/promise.mjs +0 -29
  1039. package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
  1040. package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
  1041. package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
  1042. package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
  1043. package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
  1044. package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
  1045. package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
  1046. package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
  1047. package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
  1048. package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
  1049. package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
  1050. package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
  1051. package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
  1052. package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
  1053. package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
  1054. package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
  1055. package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
  1056. package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
  1057. package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
  1058. package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
  1059. package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
  1060. package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
  1061. package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
  1062. package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
  1063. package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
  1064. package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
  1065. package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
  1066. package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
  1067. package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
  1068. package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
  1069. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
  1070. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"indexeddb-store-worker.js","names":["LocalIndexedDBStoreBackend","logger","IndexedDBStoreWorker","constructor","postMessage","_defineProperty","call","command","ev","_this$backend","_this$backend2","_this$backend3","_this$backend4","_this$backend5","_this$backend6","_this$backend7","_this$backend8","_this$backend9","_this$backend0","_this$backend1","_this$backend10","_this$backend11","_this$backend12","_this$backend13","_this$backend14","_this$backend15","_this$backend16","_this$backend17","msg","data","prom","backend","indexedDB","args","Promise","resolve","connect","onClose","isNewlyCreated","clearDatabase","getSavedSync","setSyncData","syncToDatabase","getUserPresenceEvents","getNextBatchToken","getOutOfBandMembers","clearOutOfBandMembers","setOutOfBandMembers","getClientOptions","storeClientOptions","saveToDeviceBatches","getOldestToDeviceBatch","removeToDeviceBatch","getUserProfile","storeUserProfiles","removeUserProfiles","undefined","seq","error","then","ret","result","err","message","name"],"sources":["../../src/store/indexeddb-store-worker.ts"],"sourcesContent":["/*\nCopyright 2017 - 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { LocalIndexedDBStoreBackend } from \"./indexeddb-local-backend.ts\";\nimport { logger } from \"../logger.ts\";\n\ninterface ICmd {\n command: string;\n seq: number;\n args: any[];\n}\n\n/**\n * This class lives in the webworker and drives a LocalIndexedDBStoreBackend\n * controlled by messages from the main process.\n *\n * @example\n * It should be instantiated by a web worker script provided by the application\n * in a script, for example:\n * ```\n * import {IndexedDBStoreWorker} from 'matrix-js-sdk/lib/indexeddb-worker.js';\n * const remoteWorker = new IndexedDBStoreWorker(postMessage);\n * onmessage = remoteWorker.onMessage;\n * ```\n *\n * Note that it is advisable to import this class by referencing the file directly to\n * avoid a dependency on the whole js-sdk.\n *\n */\nexport class IndexedDBStoreWorker {\n private backend?: LocalIndexedDBStoreBackend;\n\n /**\n * @param postMessage - The web worker postMessage function that\n * should be used to communicate back to the main script.\n */\n public constructor(private readonly postMessage: InstanceType<typeof Worker>[\"postMessage\"]) {}\n\n private onClose = (): void => {\n this.postMessage.call(null, {\n command: \"closed\",\n });\n };\n\n /**\n * Passes a message event from the main script into the class. This method\n * can be directly assigned to the web worker `onmessage` variable.\n *\n * @param ev - The message event\n */\n public onMessage = (ev: MessageEvent): void => {\n const msg: ICmd = ev.data;\n let prom: Promise<any> | undefined;\n\n switch (msg.command) {\n case \"setupWorker\":\n // this is the 'indexedDB' global (where global != window\n // because it's a web worker and there is no window).\n this.backend = new LocalIndexedDBStoreBackend(indexedDB, msg.args[0]);\n prom = Promise.resolve();\n break;\n case \"connect\":\n prom = this.backend?.connect(this.onClose);\n break;\n case \"isNewlyCreated\":\n prom = this.backend?.isNewlyCreated();\n break;\n case \"clearDatabase\":\n prom = this.backend?.clearDatabase();\n break;\n case \"getSavedSync\":\n prom = this.backend?.getSavedSync(false);\n break;\n case \"setSyncData\":\n prom = this.backend?.setSyncData(msg.args[0]);\n break;\n case \"syncToDatabase\":\n prom = this.backend?.syncToDatabase(msg.args[0]);\n break;\n case \"getUserPresenceEvents\":\n prom = this.backend?.getUserPresenceEvents();\n break;\n case \"getNextBatchToken\":\n prom = this.backend?.getNextBatchToken();\n break;\n case \"getOutOfBandMembers\":\n prom = this.backend?.getOutOfBandMembers(msg.args[0]);\n break;\n case \"clearOutOfBandMembers\":\n prom = this.backend?.clearOutOfBandMembers(msg.args[0]);\n break;\n case \"setOutOfBandMembers\":\n prom = this.backend?.setOutOfBandMembers(msg.args[0], msg.args[1]);\n break;\n case \"getClientOptions\":\n prom = this.backend?.getClientOptions();\n break;\n case \"storeClientOptions\":\n prom = this.backend?.storeClientOptions(msg.args[0]);\n break;\n case \"saveToDeviceBatches\":\n prom = this.backend?.saveToDeviceBatches(msg.args[0]);\n break;\n case \"getOldestToDeviceBatch\":\n prom = this.backend?.getOldestToDeviceBatch();\n break;\n case \"removeToDeviceBatch\":\n prom = this.backend?.removeToDeviceBatch(msg.args[0]);\n break;\n case \"getUserProfile\":\n prom = this.backend?.getUserProfile(msg.args[0]);\n break;\n case \"storeUserProfiles\":\n prom = this.backend?.storeUserProfiles(msg.args[0]);\n break;\n case \"removeUserProfiles\":\n prom = this.backend?.removeUserProfiles(msg.args[0]);\n break;\n }\n\n if (prom === undefined) {\n this.postMessage({\n command: \"cmd_fail\",\n seq: msg.seq,\n // Can't be an Error because they're not structured cloneable\n error: \"Unrecognised command\",\n });\n return;\n }\n\n prom.then(\n (ret) => {\n this.postMessage.call(null, {\n command: \"cmd_success\",\n seq: msg.seq,\n result: ret,\n });\n },\n (err) => {\n logger.error(\"Error running command: \" + msg.command, err);\n this.postMessage.call(null, {\n command: \"cmd_fail\",\n seq: msg.seq,\n // Just send a string because Error objects aren't cloneable\n error: {\n message: err.message,\n name: err.name,\n },\n });\n },\n );\n };\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,0BAA0B,QAAQ,8BAA8B;AACzE,SAASC,MAAM,QAAQ,cAAc;AAQrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,CAAC;EAG9B;AACJ;AACA;AACA;EACWC,WAAWA,CAAkBC,WAAuD,EAAE;IAAAC,eAAA,kBAE3E,MAAY;MAC1B,IAAI,CAACD,WAAW,CAACE,IAAI,C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D;MACR;MAEA,IAAIH,IAAI,KAAK0B,SAAS,EAAE;QACpB,IAAI,CAACpD,WAAW,CAAC;UACbG,OAAO,EAAE,UAAU;UACnBkD,GAAG,EAAE7B,GAAG,CAAC6B,GAAG;UACZ;UACAC,KAAK,EAAE;QACX,CAAC,CAAC;QACF;MACJ;MAEA5B,IAAI,CAAC6B,IAAI,CACJC,GAAG,IAAK;QACL,IAAI,CAACxD,WAAW,CAACE,IAAI,CAAC,IAAI,EAAE;UACxBC,OAAO,EAAE,aAAa;UACtBkD,GAAG,EAAE7B,GAAG,CAAC6B,GAAG;UACZI,MAAM,EAAED;QACZ,CAAC,CAAC;MACN,CAAC,EACAE,GAAG,IAAK;QACL7D,MAAM,CAACyD,KAAK,CAAC,yBAAyB,GAAG9B,GAAG,CAACrB,OAAO,EAAEuD,GAAG,CAAC;QAC1D,IAAI,CAAC1D,WAAW,CAACE,IAAI,CAAC,IAAI,EAAE;UACxBC,OAAO,EAAE,UAAU;UACnBkD,GAAG,EAAE7B,GAAG,CAAC6B,GAAG;UACZ;UACAC,KAAK,EAAE;YACHK,OAAO,EAAED,GAAG,CAACC,OAAO;YACpBC,IAAI,EAAEF,GAAG,CAACE;UACd;QACJ,CAAC,CAAC;MACN,CACJ,CAAC;IACL,CAAC;IAAA,KAnHmC5D,WAAuD,GAAvDA,WAAuD;EAAG;AAoHlG","ignoreList":[]}
1
+ {"version":3,"file":"indexeddb-store-worker.js","names":[],"sources":["../../src/store/indexeddb-store-worker.ts"],"sourcesContent":["/*\nCopyright 2017 - 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { LocalIndexedDBStoreBackend } from \"./indexeddb-local-backend.ts\";\nimport { logger } from \"../logger.ts\";\n\ninterface ICmd {\n command: string;\n seq: number;\n args: any[];\n}\n\n/**\n * This class lives in the webworker and drives a LocalIndexedDBStoreBackend\n * controlled by messages from the main process.\n *\n * @example\n * It should be instantiated by a web worker script provided by the application\n * in a script, for example:\n * ```\n * import {IndexedDBStoreWorker} from 'matrix-js-sdk/lib/indexeddb-worker.js';\n * const remoteWorker = new IndexedDBStoreWorker(postMessage);\n * onmessage = remoteWorker.onMessage;\n * ```\n *\n * Note that it is advisable to import this class by referencing the file directly to\n * avoid a dependency on the whole js-sdk.\n *\n */\nexport class IndexedDBStoreWorker {\n private backend?: LocalIndexedDBStoreBackend;\n\n /**\n * @param postMessage - The web worker postMessage function that\n * should be used to communicate back to the main script.\n */\n public constructor(private readonly postMessage: InstanceType<typeof Worker>[\"postMessage\"]) {}\n\n private onClose = (): void => {\n this.postMessage.call(null, {\n command: \"closed\",\n });\n };\n\n /**\n * Passes a message event from the main script into the class. This method\n * can be directly assigned to the web worker `onmessage` variable.\n *\n * @param ev - The message event\n */\n public onMessage = (ev: MessageEvent): void => {\n const msg: ICmd = ev.data;\n let prom: Promise<any> | undefined;\n\n switch (msg.command) {\n case \"setupWorker\":\n // this is the 'indexedDB' global (where global != window\n // because it's a web worker and there is no window).\n this.backend = new LocalIndexedDBStoreBackend(indexedDB, msg.args[0]);\n prom = Promise.resolve();\n break;\n case \"connect\":\n prom = this.backend?.connect(this.onClose);\n break;\n case \"isNewlyCreated\":\n prom = this.backend?.isNewlyCreated();\n break;\n case \"clearDatabase\":\n prom = this.backend?.clearDatabase();\n break;\n case \"getSavedSync\":\n prom = this.backend?.getSavedSync(false);\n break;\n case \"setSyncData\":\n prom = this.backend?.setSyncData(msg.args[0]);\n break;\n case \"syncToDatabase\":\n prom = this.backend?.syncToDatabase(msg.args[0]);\n break;\n case \"getUserPresenceEvents\":\n prom = this.backend?.getUserPresenceEvents();\n break;\n case \"getNextBatchToken\":\n prom = this.backend?.getNextBatchToken();\n break;\n case \"getOutOfBandMembers\":\n prom = this.backend?.getOutOfBandMembers(msg.args[0]);\n break;\n case \"clearOutOfBandMembers\":\n prom = this.backend?.clearOutOfBandMembers(msg.args[0]);\n break;\n case \"setOutOfBandMembers\":\n prom = this.backend?.setOutOfBandMembers(msg.args[0], msg.args[1]);\n break;\n case \"getClientOptions\":\n prom = this.backend?.getClientOptions();\n break;\n case \"storeClientOptions\":\n prom = this.backend?.storeClientOptions(msg.args[0]);\n break;\n case \"saveToDeviceBatches\":\n prom = this.backend?.saveToDeviceBatches(msg.args[0]);\n break;\n case \"getOldestToDeviceBatch\":\n prom = this.backend?.getOldestToDeviceBatch();\n break;\n case \"removeToDeviceBatch\":\n prom = this.backend?.removeToDeviceBatch(msg.args[0]);\n break;\n case \"getUserProfile\":\n prom = this.backend?.getUserProfile(msg.args[0]);\n break;\n case \"storeUserProfiles\":\n prom = this.backend?.storeUserProfiles(msg.args[0]);\n break;\n case \"removeUserProfiles\":\n prom = this.backend?.removeUserProfiles(msg.args[0]);\n break;\n }\n\n if (prom === undefined) {\n this.postMessage({\n command: \"cmd_fail\",\n seq: msg.seq,\n // Can't be an Error because they're not structured cloneable\n error: \"Unrecognised command\",\n });\n return;\n }\n\n prom.then(\n (ret) => {\n this.postMessage.call(null, {\n command: \"cmd_success\",\n seq: msg.seq,\n result: ret,\n });\n },\n (err) => {\n logger.error(\"Error running command: \" + msg.command, err);\n this.postMessage.call(null, {\n command: \"cmd_fail\",\n seq: msg.seq,\n // Just send a string because Error objects aren't cloneable\n error: {\n message: err.message,\n name: err.name,\n },\n });\n },\n );\n };\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,0BAA0B,QAAQ,8BAA8B;AACzE,SAAS,MAAM,QAAQ,cAAc;AAQrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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D;QACJ,KAAK,mBAAmB;UACpB,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;UACnD;QACJ,KAAK,oBAAoB;UACrB,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;UACpD;MACR;MAEA,IAAI,IAAI,KAAK,SAAS,EAAE;QACpB,IAAI,CAAC,WAAW,CAAC;UACb,OAAO,EAAE,UAAU;UACnB,GAAG,EAAE,GAAG,CAAC,GAAG;UACZ;UACA,KAAK,EAAE;QACX,CAAC,CAAC;QACF;MACJ;MAEA,IAAI,CAAC,IAAI,CACJ,GAAG,IAAK;QACL,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE;UACxB,OAAO,EAAE,aAAa;UACtB,GAAG,EAAE,GAAG,CAAC,GAAG;UACZ,MAAM,EAAE;QACZ,CAAC,CAAC;MACN,CAAC,EACA,GAAG,IAAK;QACL,MAAM,CAAC,KAAK,CAAC,yBAAyB,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC;QAC1D,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE;UACxB,OAAO,EAAE,UAAU;UACnB,GAAG,EAAE,GAAG,CAAC,GAAG;UACZ;UACA,KAAK,EAAE;YACH,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,IAAI,EAAE,GAAG,CAAC;UACd;QACJ,CAAC,CAAC;MACN,CACJ,CAAC;IACL,CAAC;IAAA,KAnHmC,WAAuD,GAAvD,WAAuD;EAAG;AAoHlG","ignoreList":[]}
@@ -17,12 +17,9 @@ interface IOpts extends IBaseOpts {
17
17
  workerFactory?: () => Worker;
18
18
  }
19
19
  export declare class IndexedDBStore extends MemoryStore {
20
+ private readonly opts;
20
21
  static exists(indexedDB: IDBFactory, dbName: string): Promise<boolean>;
21
- /**
22
- * The backend instance.
23
- * Call through to this API if you need to perform specific indexeddb actions like deleting the database.
24
- */
25
- readonly backend: IIndexedDBBackend;
22
+ _backend: IIndexedDBBackend;
26
23
  private startedUp;
27
24
  private syncTs;
28
25
  private userModifiedMap;
@@ -55,6 +52,11 @@ export declare class IndexedDBStore extends MemoryStore {
55
52
  * @param opts - Options object.
56
53
  */
57
54
  constructor(opts: IOpts);
55
+ /**
56
+ * The backend instance.
57
+ * Call through to this API if you need to perform specific indexeddb actions like deleting the database.
58
+ */
59
+ get backend(): IIndexedDBBackend;
58
60
  /** Re-exports `TypedEventEmitter.on` */
59
61
  on(event: EventEmitterEvents | "degraded" | "closed", handler: (...args: any[]) => void): void;
60
62
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"indexeddb.d.ts","sourceRoot":"","sources":["../../src/store/indexeddb.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,WAAW,EAAE,KAAK,KAAK,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAGnE,OAAO,EAAE,KAAK,MAAM,EAAe,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,kCAAkC,CAAC;AAC9F,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAazD,UAAU,KAAM,SAAQ,SAAS;IAC7B,uDAAuD;IACvD,SAAS,CAAC,EAAE,UAAU,CAAC;IACv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AAY,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC"}
@@ -1,5 +1,3 @@
1
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
2
  /*
5
3
  Copyright 2017 - 2021 Vector Creations Ltd
@@ -34,18 +32,12 @@ import { TypedEventEmitter } from "../models/typed-event-emitter.js";
34
32
  // so infrequently that the /sync size gets bigger on reload. Writing more
35
33
  // often does not affect the length of the pause since the entire /sync
36
34
  // response is persisted each time.
37
- var WRITE_DELAY_MS = 1000 * 60 * 5; // once every 5 minutes
35
+ const WRITE_DELAY_MS = 1000 * 60 * 5; // once every 5 minutes
38
36
 
39
37
  export class IndexedDBStore extends MemoryStore {
40
38
  static exists(indexedDB, dbName) {
41
39
  return LocalIndexedDBStoreBackend.exists(indexedDB, dbName);
42
40
  }
43
-
44
- /**
45
- * The backend instance.
46
- * Call through to this API if you need to perform specific indexeddb actions like deleting the database.
47
- */
48
-
49
41
  /**
50
42
  * Construct a new Indexed Database store, which extends MemoryStore.
51
43
  *
@@ -75,6 +67,7 @@ export class IndexedDBStore extends MemoryStore {
75
67
  */
76
68
  constructor(opts) {
77
69
  super(opts);
70
+ _defineProperty(this, "_backend", void 0);
78
71
  _defineProperty(this, "startedUp", false);
79
72
  _defineProperty(this, "syncTs", 0);
80
73
  // Records the last-modified-time of each user at the last point we saved
@@ -114,7 +107,7 @@ export class IndexedDBStore extends MemoryStore {
114
107
  return this.backend.clearDatabase().then(() => {
115
108
  logger.log("Deleted indexeddb data.");
116
109
  }, err => {
117
- logger.error("Failed to delete indexeddb data: ".concat(err));
110
+ logger.error(`Failed to delete indexeddb data: ${err}`);
118
111
  throw err;
119
112
  });
120
113
  }, null));
@@ -123,8 +116,8 @@ export class IndexedDBStore extends MemoryStore {
123
116
 
124
117
  // work out changed users (this doesn't handle deletions but you
125
118
  // can't 'delete' users as they are just presence events).
126
- var userTuples = [];
127
- for (var u of this.getUsers()) {
119
+ const userTuples = [];
120
+ for (const u of this.getUsers()) {
128
121
  if (this.userModifiedMap[u.userId] === u.getLastModifiedTime()) continue;
129
122
  if (!u.events.presence) continue;
130
123
  userTuples.push([u.userId, u.events.presence.event]);
@@ -168,16 +161,25 @@ export class IndexedDBStore extends MemoryStore {
168
161
  super.storeClientOptions(options);
169
162
  return this.backend.storeClientOptions(options);
170
163
  }, "storeClientOptions"));
164
+ this.opts = opts;
171
165
  if (!opts.indexedDB) {
172
166
  throw new Error("Missing required option: indexedDB");
173
167
  }
174
168
  if (opts.workerFactory) {
175
- this.backend = new RemoteIndexedDBStoreBackend(opts.workerFactory, opts.dbName);
169
+ this._backend = new RemoteIndexedDBStoreBackend(opts.workerFactory, opts.dbName);
176
170
  } else {
177
- this.backend = new LocalIndexedDBStoreBackend(opts.indexedDB, opts.dbName);
171
+ this._backend = new LocalIndexedDBStoreBackend(opts.indexedDB, opts.dbName);
178
172
  }
179
173
  }
180
174
 
175
+ /**
176
+ * The backend instance.
177
+ * Call through to this API if you need to perform specific indexeddb actions like deleting the database.
178
+ */
179
+ get backend() {
180
+ return this._backend;
181
+ }
182
+
181
183
  /** Re-exports `TypedEventEmitter.on` */
182
184
  on(event, handler) {
183
185
  this.emitter.on(event, handler);
@@ -188,23 +190,27 @@ export class IndexedDBStore extends MemoryStore {
188
190
  */
189
191
  startup() {
190
192
  if (this.startedUp) {
191
- logger.log("IndexedDBStore.startup: already started");
193
+ logger.log(`IndexedDBStore.startup: already started`);
192
194
  return Promise.resolve();
193
195
  }
194
- logger.log("IndexedDBStore.startup: connecting to backend");
195
- return this.backend.connect(this.onClose).then(() => {
196
- logger.log("IndexedDBStore.startup: loading presence events");
196
+ logger.log(`IndexedDBStore.startup: connecting to backend`);
197
+ return this.backend.connect(this.onClose).catch(e => {
198
+ if (this.opts.workerFactory) {
199
+ logger.log("Falling back to local indexeddb backend");
200
+ this._backend = new LocalIndexedDBStoreBackend(this.opts.indexedDB, this.opts.dbName);
201
+ return this.backend.connect(this.onClose);
202
+ }
203
+ throw e;
204
+ }).then(() => {
205
+ logger.log(`IndexedDBStore.startup: loading presence events`);
197
206
  return this.backend.getUserPresenceEvents();
198
207
  }).then(userPresenceEvents => {
199
- logger.log("IndexedDBStore.startup: processing presence events");
200
- userPresenceEvents.forEach(_ref => {
201
- var _ref2 = _slicedToArray(_ref, 2),
202
- userId = _ref2[0],
203
- rawEvent = _ref2[1];
208
+ logger.log(`IndexedDBStore.startup: processing presence events`);
209
+ userPresenceEvents.forEach(([userId, rawEvent]) => {
204
210
  if (!this.createUser) {
205
211
  throw new Error("`IndexedDBStore.startup` must be called after assigning it to the client, not before!");
206
212
  }
207
- var u = this.createUser(userId);
213
+ const u = this.createUser(userId);
208
214
  if (rawEvent) {
209
215
  u.setPresenceEvent(new MatrixEvent(rawEvent));
210
216
  }
@@ -231,7 +237,7 @@ export class IndexedDBStore extends MemoryStore {
231
237
  * (at the time this function is called).
232
238
  */
233
239
  wantsSave() {
234
- var now = Date.now();
240
+ const now = Date.now();
235
241
  return now - this.syncTs > WRITE_DELAY_MS;
236
242
  }
237
243
 
@@ -242,8 +248,7 @@ export class IndexedDBStore extends MemoryStore {
242
248
  * @returns Promise resolves after the write completes
243
249
  * (or immediately if no write is performed)
244
250
  */
245
- save() {
246
- var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
251
+ save(force = false) {
247
252
  if (force || this.wantsSave()) {
248
253
  return this.reallySave();
249
254
  }
@@ -262,24 +267,20 @@ export class IndexedDBStore extends MemoryStore {
262
267
  * @returns A wrapped member function.
263
268
  */
264
269
  degradable(func, fallback) {
265
- var _this = this;
266
- var fallbackFn = fallback ? super[fallback] : null;
267
- return /*#__PURE__*/_asyncToGenerator(function* () {
268
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
269
- args[_key] = arguments[_key];
270
- }
270
+ const fallbackFn = fallback ? super[fallback] : null;
271
+ return async (...args) => {
271
272
  try {
272
- return yield func.call(_this, ...args);
273
+ return await func.call(this, ...args);
273
274
  } catch (e) {
274
275
  logger.error("IndexedDBStore failure, degrading to MemoryStore", e);
275
- _this.emitter.emit("degraded", e);
276
+ this.emitter.emit("degraded", e);
276
277
  try {
277
278
  // We try to delete IndexedDB after degrading since this store is only a
278
279
  // cache (the app will still function correctly without the data).
279
280
  // It's possible that deleting repair IndexedDB for the next app load,
280
281
  // potentially by making a little more space available.
281
282
  logger.log("IndexedDBStore trying to delete degraded data");
282
- yield _this.backend.clearDatabase();
283
+ await this.backend.clearDatabase();
283
284
  logger.log("IndexedDBStore delete after degrading succeeded");
284
285
  } catch (e) {
285
286
  logger.warn("IndexedDBStore delete after degrading failed", e);
@@ -292,41 +293,33 @@ export class IndexedDBStore extends MemoryStore {
292
293
  // `IndexedDBStore` also maintain the state that `MemoryStore` uses (many are
293
294
  // not overridden at all).
294
295
  if (fallbackFn) {
295
- return fallbackFn.call(_this, ...args);
296
+ return fallbackFn.call(this, ...args);
296
297
  }
297
298
  }
298
- });
299
+ };
299
300
  }
300
301
 
301
302
  // XXX: ideally these would be stored in indexeddb as part of the room but,
302
303
  // we don't store rooms as such and instead accumulate entire sync responses atm.
303
- getPendingEvents(roomId) {
304
- var _superprop_getGetPendingEvents = () => super.getPendingEvents,
305
- _this2 = this;
306
- return _asyncToGenerator(function* () {
307
- if (!_this2.localStorage) return _superprop_getGetPendingEvents().call(_this2, roomId);
308
- var serialized = _this2.localStorage.getItem(pendingEventsKey(roomId));
309
- if (serialized) {
310
- try {
311
- return JSON.parse(serialized);
312
- } catch (e) {
313
- logger.error("Could not parse persisted pending events", e);
314
- }
304
+ async getPendingEvents(roomId) {
305
+ if (!this.localStorage) return super.getPendingEvents(roomId);
306
+ const serialized = this.localStorage.getItem(pendingEventsKey(roomId));
307
+ if (serialized) {
308
+ try {
309
+ return JSON.parse(serialized);
310
+ } catch (e) {
311
+ logger.error("Could not parse persisted pending events", e);
315
312
  }
316
- return [];
317
- })();
313
+ }
314
+ return [];
318
315
  }
319
- setPendingEvents(roomId, events) {
320
- var _superprop_getSetPendingEvents = () => super.setPendingEvents,
321
- _this3 = this;
322
- return _asyncToGenerator(function* () {
323
- if (!_this3.localStorage) return _superprop_getSetPendingEvents().call(_this3, roomId, events);
324
- if (events.length > 0) {
325
- _this3.localStorage.setItem(pendingEventsKey(roomId), JSON.stringify(events));
326
- } else {
327
- _this3.localStorage.removeItem(pendingEventsKey(roomId));
328
- }
329
- })();
316
+ async setPendingEvents(roomId, events) {
317
+ if (!this.localStorage) return super.setPendingEvents(roomId, events);
318
+ if (events.length > 0) {
319
+ this.localStorage.setItem(pendingEventsKey(roomId), JSON.stringify(events));
320
+ } else {
321
+ this.localStorage.removeItem(pendingEventsKey(roomId));
322
+ }
330
323
  }
331
324
  saveToDeviceBatches(batches) {
332
325
  return this.backend.saveToDeviceBatches(batches);
@@ -337,23 +330,14 @@ export class IndexedDBStore extends MemoryStore {
337
330
  removeToDeviceBatch(id) {
338
331
  return this.backend.removeToDeviceBatch(id);
339
332
  }
340
- getUserProfile(userId) {
341
- var _this4 = this;
342
- return _asyncToGenerator(function* () {
343
- return _this4.backend.getUserProfile(userId);
344
- })();
333
+ async getUserProfile(userId) {
334
+ return this.backend.getUserProfile(userId);
345
335
  }
346
- storeUserProfiles(userProfiles) {
347
- var _this5 = this;
348
- return _asyncToGenerator(function* () {
349
- return _this5.backend.storeUserProfiles(userProfiles);
350
- })();
336
+ async storeUserProfiles(userProfiles) {
337
+ return this.backend.storeUserProfiles(userProfiles);
351
338
  }
352
- removeUserProfiles(userIds) {
353
- var _this6 = this;
354
- return _asyncToGenerator(function* () {
355
- return _this6.backend.removeUserProfiles(userIds);
356
- })();
339
+ async removeUserProfiles(userIds) {
340
+ return this.backend.removeUserProfiles(userIds);
357
341
  }
358
342
  }
359
343
 
@@ -362,6 +346,6 @@ export class IndexedDBStore extends MemoryStore {
362
346
  * @returns Storage key to retrieve pending events
363
347
  */
364
348
  function pendingEventsKey(roomId) {
365
- return "mx_pending_events_".concat(roomId);
349
+ return `mx_pending_events_${roomId}`;
366
350
  }
367
351
  //# sourceMappingURL=indexeddb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"indexeddb.js","names":["MemoryStore","LocalIndexedDBStoreBackend","RemoteIndexedDBStoreBackend","MatrixEvent","logger","TypedEventEmitter","WRITE_DELAY_MS","IndexedDBStore","exists","indexedDB","dbName","constructor","opts","_defineProperty","emitter","emit","degradable","backend","getSavedSync","isNewlyCreated","getNextBatchToken","deleteAllData","clearDatabase","then","log","err","error","concat","syncTs","Date","now","userTuples","u","getUsers","userModifiedMap","userId","getLastModifiedTime","events","presence","push","event","syncToDatabase","syncData","setSyncData","roomId","getOutOfBandMembers","membershipEvents","setOutOfBandMembers","clearOutOfBandMembers","getClientOptions","options","storeClientOptions","Error","workerFactory","on","handler","startup","startedUp","Promise","resolve","connect","onClose","getUserPresenceEvents","userPresenceEvents","forEach","_ref","_ref2","_slicedToArray","rawEvent","createUser","setPresenceEvent","storeUser","destroy","wantsSave","save","force","arguments","length","undefined","reallySave","func","fallback","_this","fallbackFn","_asyncToGenerator","_len","args","Array","_key","call","e","warn","getPendingEvents","_superprop_getGetPendingEvents","_this2","localStorage","serialized","getItem","pendingEventsKey","JSON","parse","setPendingEvents","_superprop_getSetPendingEvents","_this3","setItem","stringify","removeItem","saveToDeviceBatches","batches","getOldestToDeviceBatch","removeToDeviceBatch","id","getUserProfile","_this4","storeUserProfiles","userProfiles","_this5","removeUserProfiles","userIds","_this6"],"sources":["../../src/store/indexeddb.ts"],"sourcesContent":["/*\nCopyright 2017 - 2021 Vector Creations Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n/* eslint-disable @babel/no-invalid-this */\n\nimport { MemoryStore, type IOpts as IBaseOpts } from \"./memory.ts\";\nimport { LocalIndexedDBStoreBackend } from \"./indexeddb-local-backend.ts\";\nimport { RemoteIndexedDBStoreBackend } from \"./indexeddb-remote-backend.ts\";\nimport { type IEvent, MatrixEvent } from \"../models/event.ts\";\nimport { logger } from \"../logger.ts\";\nimport { type ISavedSync } from \"./index.ts\";\nimport { type IIndexedDBBackend } from \"./indexeddb-backend.ts\";\nimport { type ISyncResponse } from \"../sync-accumulator.ts\";\nimport { type EventEmitterEvents, TypedEventEmitter } from \"../models/typed-event-emitter.ts\";\nimport { type IStateEventWithRoomId } from \"../@types/search.ts\";\nimport { type IndexedToDeviceBatch, type ToDeviceBatchWithTxnId } from \"../models/ToDeviceMessage.ts\";\nimport { type IStoredClientOpts } from \"../client.ts\";\nimport { type SyncUserProfile } from \"../models/user.ts\";\n\n/**\n * This is an internal module. See {@link IndexedDBStore} for the public class.\n */\n\n// If this value is too small we'll be writing very often which will cause\n// noticeable stop-the-world pauses. If this value is too big we'll be writing\n// so infrequently that the /sync size gets bigger on reload. Writing more\n// often does not affect the length of the pause since the entire /sync\n// response is persisted each time.\nconst WRITE_DELAY_MS = 1000 * 60 * 5; // once every 5 minutes\n\ninterface IOpts extends IBaseOpts {\n /** The Indexed DB interface e.g. `window.indexedDB` */\n indexedDB?: IDBFactory;\n /** Optional database name. The same name must be used to open the same database. */\n dbName?: string;\n /** Optional factory to spin up a Worker to execute the IDB transactions within. */\n workerFactory?: () => Worker;\n}\n\ntype EventHandlerMap = {\n // Fired when an IDB command fails on a degradable path, and the store falls back to MemoryStore\n // This signals the potential for data volatility.\n degraded: (e: Error) => void;\n // Fired when the IndexedDB gets closed unexpectedly, for example, if the underlying storage is removed or\n // if the user clears the database in the browser's history preferences.\n closed: () => void;\n};\n\nexport class IndexedDBStore extends MemoryStore {\n public static exists(indexedDB: IDBFactory, dbName: string): Promise<boolean> {\n return LocalIndexedDBStoreBackend.exists(indexedDB, dbName);\n }\n\n /**\n * The backend instance.\n * Call through to this API if you need to perform specific indexeddb actions like deleting the database.\n */\n public readonly backend: IIndexedDBBackend;\n\n private startedUp = false;\n private syncTs = 0;\n // Records the last-modified-time of each user at the last point we saved\n // the database, such that we can derive the set if users that have been\n // modified since we last saved.\n private userModifiedMap: Record<string, number> = {}; // user_id : timestamp\n private emitter = new TypedEventEmitter<keyof EventHandlerMap, EventHandlerMap>();\n\n /**\n * Construct a new Indexed Database store, which extends MemoryStore.\n *\n * This store functions like a MemoryStore except it periodically persists\n * the contents of the store to an IndexedDB backend.\n *\n * All data is still kept in-memory but can be loaded from disk by calling\n * `startup()`. This can make startup times quicker as a complete\n * sync from the server is not required. This does not reduce memory usage as all\n * the data is eagerly fetched when `startup()` is called.\n * ```\n * let opts = { indexedDB: window.indexedDB, localStorage: window.localStorage };\n * let store = new IndexedDBStore(opts);\n * let client = sdk.createClient({\n * store: store,\n * });\n * await store.startup(); // load from indexed db, must be called after createClient\n * client.startClient();\n * client.on(\"sync\", function(state, prevState, data) {\n * if (state === \"PREPARED\") {\n * console.log(\"Started up, now with go faster stripes!\");\n * }\n * });\n * ```\n *\n * @param opts - Options object.\n */\n public constructor(opts: IOpts) {\n super(opts);\n\n if (!opts.indexedDB) {\n throw new Error(\"Missing required option: indexedDB\");\n }\n\n if (opts.workerFactory) {\n this.backend = new RemoteIndexedDBStoreBackend(opts.workerFactory, opts.dbName);\n } else {\n this.backend = new LocalIndexedDBStoreBackend(opts.indexedDB, opts.dbName);\n }\n }\n\n /** Re-exports `TypedEventEmitter.on` */\n public on(event: EventEmitterEvents | \"degraded\" | \"closed\", handler: (...args: any[]) => void): void {\n this.emitter.on(event, handler);\n }\n\n /**\n * @returns Resolved when loaded from indexed db.\n */\n public startup(): Promise<void> {\n if (this.startedUp) {\n logger.log(`IndexedDBStore.startup: already started`);\n return Promise.resolve();\n }\n\n logger.log(`IndexedDBStore.startup: connecting to backend`);\n return this.backend\n .connect(this.onClose)\n .then(() => {\n logger.log(`IndexedDBStore.startup: loading presence events`);\n return this.backend.getUserPresenceEvents();\n })\n .then((userPresenceEvents) => {\n logger.log(`IndexedDBStore.startup: processing presence events`);\n userPresenceEvents.forEach(([userId, rawEvent]) => {\n if (!this.createUser) {\n throw new Error(\n \"`IndexedDBStore.startup` must be called after assigning it to the client, not before!\",\n );\n }\n const u = this.createUser(userId);\n if (rawEvent) {\n u.setPresenceEvent(new MatrixEvent(rawEvent));\n }\n this.userModifiedMap[u.userId] = u.getLastModifiedTime();\n this.storeUser(u);\n });\n this.startedUp = true;\n });\n }\n\n /*\n * Close the database and destroy any associated workers\n */\n public destroy(): Promise<void> {\n return this.backend.destroy();\n }\n\n private onClose = (): void => {\n this.emitter.emit(\"closed\");\n };\n\n /**\n * @returns Promise which resolves with a sync response to restore the\n * client state to where it was at the last save, or null if there\n * is no saved sync data.\n */\n public getSavedSync = this.degradable((): Promise<ISavedSync | null> => {\n return this.backend.getSavedSync();\n }, \"getSavedSync\");\n\n /** @returns whether or not the database was newly created in this session. */\n public isNewlyCreated = this.degradable((): Promise<boolean> => {\n return this.backend.isNewlyCreated();\n }, \"isNewlyCreated\");\n\n /**\n * @returns If there is a saved sync, the nextBatch token\n * for this sync, otherwise null.\n */\n public getSavedSyncToken = this.degradable((): Promise<string | null> => {\n return this.backend.getNextBatchToken();\n }, \"getSavedSyncToken\");\n\n /**\n * Delete all data from this store.\n * @returns Promise which resolves if the data was deleted from the database.\n */\n public deleteAllData = this.degradable((): Promise<void> => {\n super.deleteAllData();\n return this.backend.clearDatabase().then(\n () => {\n logger.log(\"Deleted indexeddb data.\");\n },\n (err) => {\n logger.error(`Failed to delete indexeddb data: ${err}`);\n throw err;\n },\n );\n }, null);\n\n /**\n * Whether this store would like to save its data\n * Note that obviously whether the store wants to save or\n * not could change between calling this function and calling\n * save().\n *\n * @returns True if calling save() will actually save\n * (at the time this function is called).\n */\n public wantsSave(): boolean {\n const now = Date.now();\n return now - this.syncTs > WRITE_DELAY_MS;\n }\n\n /**\n * Possibly write data to the database.\n *\n * @param force - True to force a save to happen\n * @returns Promise resolves after the write completes\n * (or immediately if no write is performed)\n */\n public save(force = false): Promise<void> {\n if (force || this.wantsSave()) {\n return this.reallySave();\n }\n return Promise.resolve();\n }\n\n private reallySave = this.degradable((): Promise<void> => {\n this.syncTs = Date.now(); // set now to guard against multi-writes\n\n // work out changed users (this doesn't handle deletions but you\n // can't 'delete' users as they are just presence events).\n const userTuples: [userId: string, presenceEvent: Partial<IEvent>][] = [];\n for (const u of this.getUsers()) {\n if (this.userModifiedMap[u.userId] === u.getLastModifiedTime()) continue;\n if (!u.events.presence) continue;\n\n userTuples.push([u.userId, u.events.presence.event]);\n\n // note that we've saved this version of the user\n this.userModifiedMap[u.userId] = u.getLastModifiedTime();\n }\n\n return this.backend.syncToDatabase(userTuples);\n }, null);\n\n public setSyncData = this.degradable((syncData: ISyncResponse): Promise<void> => {\n return this.backend.setSyncData(syncData);\n }, \"setSyncData\");\n\n /**\n * Returns the out-of-band membership events for this room that\n * were previously loaded.\n * @returns the events, potentially an empty array if OOB loading didn't yield any new members\n * @returns in case the members for this room haven't been stored yet\n */\n public getOutOfBandMembers = this.degradable((roomId: string): Promise<IStateEventWithRoomId[] | null> => {\n return this.backend.getOutOfBandMembers(roomId);\n }, \"getOutOfBandMembers\");\n\n /**\n * Stores the out-of-band membership events for this room. Note that\n * it still makes sense to store an empty array as the OOB status for the room is\n * marked as fetched, and getOutOfBandMembers will return an empty array instead of null\n * @param membershipEvents - the membership events to store\n * @returns when all members have been stored\n */\n public setOutOfBandMembers = this.degradable(\n (roomId: string, membershipEvents: IStateEventWithRoomId[]): Promise<void> => {\n super.setOutOfBandMembers(roomId, membershipEvents);\n return this.backend.setOutOfBandMembers(roomId, membershipEvents);\n },\n \"setOutOfBandMembers\",\n );\n\n public clearOutOfBandMembers = this.degradable((roomId: string) => {\n super.clearOutOfBandMembers(roomId);\n return this.backend.clearOutOfBandMembers(roomId);\n }, \"clearOutOfBandMembers\");\n\n public getClientOptions = this.degradable((): Promise<IStoredClientOpts | undefined> => {\n return this.backend.getClientOptions();\n }, \"getClientOptions\");\n\n public storeClientOptions = this.degradable((options: IStoredClientOpts): Promise<void> => {\n super.storeClientOptions(options);\n return this.backend.storeClientOptions(options);\n }, \"storeClientOptions\");\n\n /**\n * All member functions of `IndexedDBStore` that access the backend use this wrapper to\n * watch for failures after initial store startup, including `QuotaExceededError` as\n * free disk space changes, etc.\n *\n * When IndexedDB fails via any of these paths, we degrade this back to a `MemoryStore`\n * in place so that the current operation and all future ones are in-memory only.\n *\n * @param func - The degradable work to do.\n * @param fallback - The method name for fallback.\n * @returns A wrapped member function.\n */\n private degradable<A extends Array<any>, F extends keyof MemoryStore | null, R = void>(\n func: DegradableFn<A, R>,\n fallback: F,\n ): DegradableFn<A, F extends string ? R : void> {\n const fallbackFn = fallback ? (super[fallback] as (...args: A) => Promise<R>) : null;\n\n return (async (...args) => {\n try {\n return await func.call(this, ...args);\n } catch (e) {\n logger.error(\"IndexedDBStore failure, degrading to MemoryStore\", e);\n this.emitter.emit(\"degraded\", e as Error);\n try {\n // We try to delete IndexedDB after degrading since this store is only a\n // cache (the app will still function correctly without the data).\n // It's possible that deleting repair IndexedDB for the next app load,\n // potentially by making a little more space available.\n logger.log(\"IndexedDBStore trying to delete degraded data\");\n await this.backend.clearDatabase();\n logger.log(\"IndexedDBStore delete after degrading succeeded\");\n } catch (e) {\n logger.warn(\"IndexedDBStore delete after degrading failed\", e);\n }\n // Degrade the store from being an instance of `IndexedDBStore` to instead be\n // an instance of `MemoryStore` so that future API calls use the memory path\n // directly and skip IndexedDB entirely. This should be safe as\n // `IndexedDBStore` already extends from `MemoryStore`, so we are making the\n // store become its parent type in a way. The mutator methods of\n // `IndexedDBStore` also maintain the state that `MemoryStore` uses (many are\n // not overridden at all).\n if (fallbackFn) {\n return fallbackFn.call(this, ...args);\n }\n }\n }) as DegradableFn<A, F extends string ? R : void>;\n }\n\n // XXX: ideally these would be stored in indexeddb as part of the room but,\n // we don't store rooms as such and instead accumulate entire sync responses atm.\n public async getPendingEvents(roomId: string): Promise<Partial<IEvent>[]> {\n if (!this.localStorage) return super.getPendingEvents(roomId);\n\n const serialized = this.localStorage.getItem(pendingEventsKey(roomId));\n if (serialized) {\n try {\n return JSON.parse(serialized);\n } catch (e) {\n logger.error(\"Could not parse persisted pending events\", e);\n }\n }\n return [];\n }\n\n public async setPendingEvents(roomId: string, events: Partial<IEvent>[]): Promise<void> {\n if (!this.localStorage) return super.setPendingEvents(roomId, events);\n\n if (events.length > 0) {\n this.localStorage.setItem(pendingEventsKey(roomId), JSON.stringify(events));\n } else {\n this.localStorage.removeItem(pendingEventsKey(roomId));\n }\n }\n\n public saveToDeviceBatches(batches: ToDeviceBatchWithTxnId[]): Promise<void> {\n return this.backend.saveToDeviceBatches(batches);\n }\n\n public getOldestToDeviceBatch(): Promise<IndexedToDeviceBatch | null> {\n return this.backend.getOldestToDeviceBatch();\n }\n\n public removeToDeviceBatch(id: number): Promise<void> {\n return this.backend.removeToDeviceBatch(id);\n }\n\n public async getUserProfile(userId: string): Promise<SyncUserProfile | undefined> {\n return this.backend.getUserProfile(userId);\n }\n\n public async storeUserProfiles(userProfiles: Map<string, SyncUserProfile>): Promise<void> {\n return this.backend.storeUserProfiles(userProfiles);\n }\n\n public async removeUserProfiles(userIds: string[]): Promise<void> {\n return this.backend.removeUserProfiles(userIds);\n }\n}\n\n/**\n * @param roomId - ID of the current room\n * @returns Storage key to retrieve pending events\n */\nfunction pendingEventsKey(roomId: string): string {\n return `mx_pending_events_${roomId}`;\n}\n\ntype DegradableFn<A extends Array<any>, T> = (...args: A) => Promise<T>;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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ACC,EAAE,CAAC;EAC/C;EAEaC,cAAcA,CAAC7E,MAAc,EAAwC;IAAA,IAAA8E,MAAA;IAAA,OAAA7B,iBAAA;MAC9E,OAAO6B,MAAI,CAAChG,OAAO,CAAC+F,cAAc,CAAC7E,MAAM,CAAC;IAAC;EAC/C;EAEa+E,iBAAiBA,CAACC,YAA0C,EAAiB;IAAA,IAAAC,MAAA;IAAA,OAAAhC,iBAAA;MACtF,OAAOgC,MAAI,CAACnG,OAAO,CAACiG,iBAAiB,CAACC,YAAY,CAAC;IAAC;EACxD;EAEaE,kBAAkBA,CAACC,OAAiB,EAAiB;IAAA,IAAAC,MAAA;IAAA,OAAAnC,iBAAA;MAC9D,OAAOmC,MAAI,CAACtG,OAAO,CAACoG,kBAAkB,CAACC,OAAO,CAAC;IAAC;EACpD;AACJ;;AAEA;AACA;AACA;AACA;AACA,SAASpB,gBAAgBA,CAACtD,MAAc,EAAU;EAC9C,4BAAAjB,MAAA,CAA4BiB,MAAM;AACtC","ignoreList":[]}
1
+ {"version":3,"file":"indexeddb.js","names":[],"sources":["../../src/store/indexeddb.ts"],"sourcesContent":["/*\nCopyright 2017 - 2021 Vector Creations Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n/* eslint-disable @babel/no-invalid-this */\n\nimport { MemoryStore, type IOpts as IBaseOpts } from \"./memory.ts\";\nimport { LocalIndexedDBStoreBackend } from \"./indexeddb-local-backend.ts\";\nimport { RemoteIndexedDBStoreBackend } from \"./indexeddb-remote-backend.ts\";\nimport { type IEvent, MatrixEvent } from \"../models/event.ts\";\nimport { logger } from \"../logger.ts\";\nimport { type ISavedSync } from \"./index.ts\";\nimport { type IIndexedDBBackend } from \"./indexeddb-backend.ts\";\nimport { type ISyncResponse } from \"../sync-accumulator.ts\";\nimport { type EventEmitterEvents, TypedEventEmitter } from \"../models/typed-event-emitter.ts\";\nimport { type IStateEventWithRoomId } from \"../@types/search.ts\";\nimport { type IndexedToDeviceBatch, type ToDeviceBatchWithTxnId } from \"../models/ToDeviceMessage.ts\";\nimport { type IStoredClientOpts } from \"../client.ts\";\nimport { type SyncUserProfile } from \"../models/user.ts\";\n\n/**\n * This is an internal module. See {@link IndexedDBStore} for the public class.\n */\n\n// If this value is too small we'll be writing very often which will cause\n// noticeable stop-the-world pauses. If this value is too big we'll be writing\n// so infrequently that the /sync size gets bigger on reload. Writing more\n// often does not affect the length of the pause since the entire /sync\n// response is persisted each time.\nconst WRITE_DELAY_MS = 1000 * 60 * 5; // once every 5 minutes\n\ninterface IOpts extends IBaseOpts {\n /** The Indexed DB interface e.g. `window.indexedDB` */\n indexedDB?: IDBFactory;\n /** Optional database name. The same name must be used to open the same database. */\n dbName?: string;\n /** Optional factory to spin up a Worker to execute the IDB transactions within. */\n workerFactory?: () => Worker;\n}\n\ntype EventHandlerMap = {\n // Fired when an IDB command fails on a degradable path, and the store falls back to MemoryStore\n // This signals the potential for data volatility.\n degraded: (e: Error) => void;\n // Fired when the IndexedDB gets closed unexpectedly, for example, if the underlying storage is removed or\n // if the user clears the database in the browser's history preferences.\n closed: () => void;\n};\n\nexport class IndexedDBStore extends MemoryStore {\n public static exists(indexedDB: IDBFactory, dbName: string): Promise<boolean> {\n return LocalIndexedDBStoreBackend.exists(indexedDB, dbName);\n }\n\n public _backend: IIndexedDBBackend;\n\n private startedUp = false;\n private syncTs = 0;\n // Records the last-modified-time of each user at the last point we saved\n // the database, such that we can derive the set if users that have been\n // modified since we last saved.\n private userModifiedMap: Record<string, number> = {}; // user_id : timestamp\n private emitter = new TypedEventEmitter<keyof EventHandlerMap, EventHandlerMap>();\n\n /**\n * Construct a new Indexed Database store, which extends MemoryStore.\n *\n * This store functions like a MemoryStore except it periodically persists\n * the contents of the store to an IndexedDB backend.\n *\n * All data is still kept in-memory but can be loaded from disk by calling\n * `startup()`. This can make startup times quicker as a complete\n * sync from the server is not required. This does not reduce memory usage as all\n * the data is eagerly fetched when `startup()` is called.\n * ```\n * let opts = { indexedDB: window.indexedDB, localStorage: window.localStorage };\n * let store = new IndexedDBStore(opts);\n * let client = sdk.createClient({\n * store: store,\n * });\n * await store.startup(); // load from indexed db, must be called after createClient\n * client.startClient();\n * client.on(\"sync\", function(state, prevState, data) {\n * if (state === \"PREPARED\") {\n * console.log(\"Started up, now with go faster stripes!\");\n * }\n * });\n * ```\n *\n * @param opts - Options object.\n */\n public constructor(private readonly opts: IOpts) {\n super(opts);\n\n if (!opts.indexedDB) {\n throw new Error(\"Missing required option: indexedDB\");\n }\n\n if (opts.workerFactory) {\n this._backend = new RemoteIndexedDBStoreBackend(opts.workerFactory, opts.dbName);\n } else {\n this._backend = new LocalIndexedDBStoreBackend(opts.indexedDB, opts.dbName);\n }\n }\n\n /**\n * The backend instance.\n * Call through to this API if you need to perform specific indexeddb actions like deleting the database.\n */\n public get backend(): IIndexedDBBackend {\n return this._backend;\n }\n\n /** Re-exports `TypedEventEmitter.on` */\n public on(event: EventEmitterEvents | \"degraded\" | \"closed\", handler: (...args: any[]) => void): void {\n this.emitter.on(event, handler);\n }\n\n /**\n * @returns Resolved when loaded from indexed db.\n */\n public startup(): Promise<void> {\n if (this.startedUp) {\n logger.log(`IndexedDBStore.startup: already started`);\n return Promise.resolve();\n }\n\n logger.log(`IndexedDBStore.startup: connecting to backend`);\n return this.backend\n .connect(this.onClose)\n .catch((e) => {\n if (this.opts.workerFactory) {\n logger.log(\"Falling back to local indexeddb backend\");\n this._backend = new LocalIndexedDBStoreBackend(this.opts.indexedDB!, this.opts.dbName);\n return this.backend.connect(this.onClose);\n }\n throw e;\n })\n .then(() => {\n logger.log(`IndexedDBStore.startup: loading presence events`);\n return this.backend.getUserPresenceEvents();\n })\n .then((userPresenceEvents) => {\n logger.log(`IndexedDBStore.startup: processing presence events`);\n userPresenceEvents.forEach(([userId, rawEvent]) => {\n if (!this.createUser) {\n throw new Error(\n \"`IndexedDBStore.startup` must be called after assigning it to the client, not before!\",\n );\n }\n const u = this.createUser(userId);\n if (rawEvent) {\n u.setPresenceEvent(new MatrixEvent(rawEvent));\n }\n this.userModifiedMap[u.userId] = u.getLastModifiedTime();\n this.storeUser(u);\n });\n this.startedUp = true;\n });\n }\n\n /*\n * Close the database and destroy any associated workers\n */\n public destroy(): Promise<void> {\n return this.backend.destroy();\n }\n\n private onClose = (): void => {\n this.emitter.emit(\"closed\");\n };\n\n /**\n * @returns Promise which resolves with a sync response to restore the\n * client state to where it was at the last save, or null if there\n * is no saved sync data.\n */\n public getSavedSync = this.degradable((): Promise<ISavedSync | null> => {\n return this.backend.getSavedSync();\n }, \"getSavedSync\");\n\n /** @returns whether or not the database was newly created in this session. */\n public isNewlyCreated = this.degradable((): Promise<boolean> => {\n return this.backend.isNewlyCreated();\n }, \"isNewlyCreated\");\n\n /**\n * @returns If there is a saved sync, the nextBatch token\n * for this sync, otherwise null.\n */\n public getSavedSyncToken = this.degradable((): Promise<string | null> => {\n return this.backend.getNextBatchToken();\n }, \"getSavedSyncToken\");\n\n /**\n * Delete all data from this store.\n * @returns Promise which resolves if the data was deleted from the database.\n */\n public deleteAllData = this.degradable((): Promise<void> => {\n super.deleteAllData();\n return this.backend.clearDatabase().then(\n () => {\n logger.log(\"Deleted indexeddb data.\");\n },\n (err) => {\n logger.error(`Failed to delete indexeddb data: ${err}`);\n throw err;\n },\n );\n }, null);\n\n /**\n * Whether this store would like to save its data\n * Note that obviously whether the store wants to save or\n * not could change between calling this function and calling\n * save().\n *\n * @returns True if calling save() will actually save\n * (at the time this function is called).\n */\n public wantsSave(): boolean {\n const now = Date.now();\n return now - this.syncTs > WRITE_DELAY_MS;\n }\n\n /**\n * Possibly write data to the database.\n *\n * @param force - True to force a save to happen\n * @returns Promise resolves after the write completes\n * (or immediately if no write is performed)\n */\n public save(force = false): Promise<void> {\n if (force || this.wantsSave()) {\n return this.reallySave();\n }\n return Promise.resolve();\n }\n\n private reallySave = this.degradable((): Promise<void> => {\n this.syncTs = Date.now(); // set now to guard against multi-writes\n\n // work out changed users (this doesn't handle deletions but you\n // can't 'delete' users as they are just presence events).\n const userTuples: [userId: string, presenceEvent: Partial<IEvent>][] = [];\n for (const u of this.getUsers()) {\n if (this.userModifiedMap[u.userId] === u.getLastModifiedTime()) continue;\n if (!u.events.presence) continue;\n\n userTuples.push([u.userId, u.events.presence.event]);\n\n // note that we've saved this version of the user\n this.userModifiedMap[u.userId] = u.getLastModifiedTime();\n }\n\n return this.backend.syncToDatabase(userTuples);\n }, null);\n\n public setSyncData = this.degradable((syncData: ISyncResponse): Promise<void> => {\n return this.backend.setSyncData(syncData);\n }, \"setSyncData\");\n\n /**\n * Returns the out-of-band membership events for this room that\n * were previously loaded.\n * @returns the events, potentially an empty array if OOB loading didn't yield any new members\n * @returns in case the members for this room haven't been stored yet\n */\n public getOutOfBandMembers = this.degradable((roomId: string): Promise<IStateEventWithRoomId[] | null> => {\n return this.backend.getOutOfBandMembers(roomId);\n }, \"getOutOfBandMembers\");\n\n /**\n * Stores the out-of-band membership events for this room. Note that\n * it still makes sense to store an empty array as the OOB status for the room is\n * marked as fetched, and getOutOfBandMembers will return an empty array instead of null\n * @param membershipEvents - the membership events to store\n * @returns when all members have been stored\n */\n public setOutOfBandMembers = this.degradable(\n (roomId: string, membershipEvents: IStateEventWithRoomId[]): Promise<void> => {\n super.setOutOfBandMembers(roomId, membershipEvents);\n return this.backend.setOutOfBandMembers(roomId, membershipEvents);\n },\n \"setOutOfBandMembers\",\n );\n\n public clearOutOfBandMembers = this.degradable((roomId: string) => {\n super.clearOutOfBandMembers(roomId);\n return this.backend.clearOutOfBandMembers(roomId);\n }, \"clearOutOfBandMembers\");\n\n public getClientOptions = this.degradable((): Promise<IStoredClientOpts | undefined> => {\n return this.backend.getClientOptions();\n }, \"getClientOptions\");\n\n public storeClientOptions = this.degradable((options: IStoredClientOpts): Promise<void> => {\n super.storeClientOptions(options);\n return this.backend.storeClientOptions(options);\n }, \"storeClientOptions\");\n\n /**\n * All member functions of `IndexedDBStore` that access the backend use this wrapper to\n * watch for failures after initial store startup, including `QuotaExceededError` as\n * free disk space changes, etc.\n *\n * When IndexedDB fails via any of these paths, we degrade this back to a `MemoryStore`\n * in place so that the current operation and all future ones are in-memory only.\n *\n * @param func - The degradable work to do.\n * @param fallback - The method name for fallback.\n * @returns A wrapped member function.\n */\n private degradable<A extends Array<any>, F extends keyof MemoryStore | null, R = void>(\n func: DegradableFn<A, R>,\n fallback: F,\n ): DegradableFn<A, F extends string ? R : void> {\n const fallbackFn = fallback ? (super[fallback] as (...args: A) => Promise<R>) : null;\n\n return (async (...args) => {\n try {\n return await func.call(this, ...args);\n } catch (e) {\n logger.error(\"IndexedDBStore failure, degrading to MemoryStore\", e);\n this.emitter.emit(\"degraded\", e as Error);\n try {\n // We try to delete IndexedDB after degrading since this store is only a\n // cache (the app will still function correctly without the data).\n // It's possible that deleting repair IndexedDB for the next app load,\n // potentially by making a little more space available.\n logger.log(\"IndexedDBStore trying to delete degraded data\");\n await this.backend.clearDatabase();\n logger.log(\"IndexedDBStore delete after degrading succeeded\");\n } catch (e) {\n logger.warn(\"IndexedDBStore delete after degrading failed\", e);\n }\n // Degrade the store from being an instance of `IndexedDBStore` to instead be\n // an instance of `MemoryStore` so that future API calls use the memory path\n // directly and skip IndexedDB entirely. This should be safe as\n // `IndexedDBStore` already extends from `MemoryStore`, so we are making the\n // store become its parent type in a way. The mutator methods of\n // `IndexedDBStore` also maintain the state that `MemoryStore` uses (many are\n // not overridden at all).\n if (fallbackFn) {\n return fallbackFn.call(this, ...args);\n }\n }\n }) as DegradableFn<A, F extends string ? R : void>;\n }\n\n // XXX: ideally these would be stored in indexeddb as part of the room but,\n // we don't store rooms as such and instead accumulate entire sync responses atm.\n public async getPendingEvents(roomId: string): Promise<Partial<IEvent>[]> {\n if (!this.localStorage) return super.getPendingEvents(roomId);\n\n const serialized = this.localStorage.getItem(pendingEventsKey(roomId));\n if (serialized) {\n try {\n return JSON.parse(serialized);\n } catch (e) {\n logger.error(\"Could not parse persisted pending events\", e);\n }\n }\n return [];\n }\n\n public async setPendingEvents(roomId: string, events: Partial<IEvent>[]): Promise<void> {\n if (!this.localStorage) return super.setPendingEvents(roomId, events);\n\n if (events.length > 0) {\n this.localStorage.setItem(pendingEventsKey(roomId), JSON.stringify(events));\n } else {\n this.localStorage.removeItem(pendingEventsKey(roomId));\n }\n }\n\n public saveToDeviceBatches(batches: ToDeviceBatchWithTxnId[]): Promise<void> {\n return this.backend.saveToDeviceBatches(batches);\n }\n\n public getOldestToDeviceBatch(): Promise<IndexedToDeviceBatch | null> {\n return this.backend.getOldestToDeviceBatch();\n }\n\n public removeToDeviceBatch(id: number): Promise<void> {\n return this.backend.removeToDeviceBatch(id);\n }\n\n public async getUserProfile(userId: string): Promise<SyncUserProfile | undefined> {\n return this.backend.getUserProfile(userId);\n }\n\n public async storeUserProfiles(userProfiles: Map<string, SyncUserProfile>): Promise<void> {\n return this.backend.storeUserProfiles(userProfiles);\n }\n\n public async removeUserProfiles(userIds: string[]): Promise<void> {\n return this.backend.removeUserProfiles(userIds);\n }\n}\n\n/**\n * @param roomId - ID of the current room\n * @returns Storage key to retrieve pending events\n */\nfunction pendingEventsKey(roomId: string): string {\n return `mx_pending_events_${roomId}`;\n}\n\ntype DegradableFn<A extends Array<any>, T> = (...args: A) => Promise<T>;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAAS,WAAW,QAAiC,aAAa;AAClE,SAAS,0BAA0B,QAAQ,8BAA8B;AACzE,SAAS,2BAA2B,QAAQ,+BAA+B;AAC3E,SAAsB,WAAW,QAAQ,oBAAoB;AAC7D,SAAS,MAAM,QAAQ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C,MAAM,GAAG,CAAC,EAAE;MACnB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/E,CAAC,MAAM;MACH,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC1D;EACJ;EAEO,mBAAmB,CAAC,OAAiC,EAAiB;IACzE,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC;EACpD;EAEO,sBAAsB,GAAyC;IAClE,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;EAChD;EAEO,mBAAmB,CAAC,EAAU,EAAiB;IAClD,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC;EAC/C;EAEA,MAAa,cAAc,CAAC,MAAc,EAAwC;IAC9E,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC;EAC9C;EAEA,MAAa,iBAAiB,CAAC,YAA0C,EAAiB;IACtF,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC;EACvD;EAEA,MAAa,kBAAkB,CAAC,OAAiB,EAAiB;IAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC;EACnD;AACJ;;AAEA;AACA;AACA;AACA;AACA,SAAS,gBAAgB,CAAC,MAAc,EAAU;EAC9C,OAAO,qBAAqB,MAAM,EAAE;AACxC","ignoreList":[]}
@@ -15,7 +15,7 @@ limitations under the License.
15
15
  */
16
16
 
17
17
  import { TypedEventEmitter } from "../models/typed-event-emitter.js";
18
- export var LocalStorageErrors = /*#__PURE__*/function (LocalStorageErrors) {
18
+ export let LocalStorageErrors = /*#__PURE__*/function (LocalStorageErrors) {
19
19
  LocalStorageErrors["Global"] = "Global";
20
20
  LocalStorageErrors["SetItemError"] = "setItem";
21
21
  LocalStorageErrors["GetItemError"] = "getItem";
@@ -33,5 +33,5 @@ export var LocalStorageErrors = /*#__PURE__*/function (LocalStorageErrors) {
33
33
  * See: https://github.com/vector-im/element-web/issues/18423
34
34
  */
35
35
  class LocalStorageErrorsEventsEmitter extends TypedEventEmitter {}
36
- export var localStorageErrorsEventsEmitter = new LocalStorageErrorsEventsEmitter();
36
+ export const localStorageErrorsEventsEmitter = new LocalStorageErrorsEventsEmitter();
37
37
  //# sourceMappingURL=local-storage-events-emitter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-storage-events-emitter.js","names":["TypedEventEmitter","LocalStorageErrors","LocalStorageErrorsEventsEmitter","localStorageErrorsEventsEmitter"],"sources":["../../src/store/local-storage-events-emitter.ts"],"sourcesContent":["/*\nCopyright 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { TypedEventEmitter } from \"../models/typed-event-emitter.ts\";\n\nexport enum LocalStorageErrors {\n Global = \"Global\",\n SetItemError = \"setItem\",\n GetItemError = \"getItem\",\n RemoveItemError = \"removeItem\",\n ClearError = \"clear\",\n QuotaExceededError = \"QuotaExceededError\",\n}\n\ntype EventHandlerMap = {\n [LocalStorageErrors.Global]: (error: Error) => void;\n [LocalStorageErrors.SetItemError]: (error: Error) => void;\n [LocalStorageErrors.GetItemError]: (error: Error) => void;\n [LocalStorageErrors.RemoveItemError]: (error: Error) => void;\n [LocalStorageErrors.ClearError]: (error: Error) => void;\n [LocalStorageErrors.QuotaExceededError]: (error: Error) => void;\n};\n\n/**\n * Used in element-web as a temporary hack to handle all the localStorage errors on the highest level possible\n * As of 15.11.2021 (DD/MM/YYYY) we're not properly handling local storage exceptions anywhere.\n * This store, as an event emitter, is used to re-emit local storage exceptions so that we can handle them\n * and show some kind of a \"It's dead Jim\" modal to the users, telling them that hey,\n * maybe you should check out your disk, as it's probably dying and your session may die with it.\n * See: https://github.com/vector-im/element-web/issues/18423\n */\nclass LocalStorageErrorsEventsEmitter extends TypedEventEmitter<LocalStorageErrors, EventHandlerMap> {}\nexport const localStorageErrorsEventsEmitter = new LocalStorageErrorsEventsEmitter();\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,iBAAiB,QAAQ,kCAAkC;AAEpE,WAAYC,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAkB9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,+BAA+B,SAASF,iBAAiB,CAAsC;AACrG,OAAO,IAAMG,+BAA+B,GAAG,IAAID,+BAA+B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"local-storage-events-emitter.js","names":[],"sources":["../../src/store/local-storage-events-emitter.ts"],"sourcesContent":["/*\nCopyright 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { TypedEventEmitter } from \"../models/typed-event-emitter.ts\";\n\nexport enum LocalStorageErrors {\n Global = \"Global\",\n SetItemError = \"setItem\",\n GetItemError = \"getItem\",\n RemoveItemError = \"removeItem\",\n ClearError = \"clear\",\n QuotaExceededError = \"QuotaExceededError\",\n}\n\ntype EventHandlerMap = {\n [LocalStorageErrors.Global]: (error: Error) => void;\n [LocalStorageErrors.SetItemError]: (error: Error) => void;\n [LocalStorageErrors.GetItemError]: (error: Error) => void;\n [LocalStorageErrors.RemoveItemError]: (error: Error) => void;\n [LocalStorageErrors.ClearError]: (error: Error) => void;\n [LocalStorageErrors.QuotaExceededError]: (error: Error) => void;\n};\n\n/**\n * Used in element-web as a temporary hack to handle all the localStorage errors on the highest level possible\n * As of 15.11.2021 (DD/MM/YYYY) we're not properly handling local storage exceptions anywhere.\n * This store, as an event emitter, is used to re-emit local storage exceptions so that we can handle them\n * and show some kind of a \"It's dead Jim\" modal to the users, telling them that hey,\n * maybe you should check out your disk, as it's probably dying and your session may die with it.\n * See: https://github.com/vector-im/element-web/issues/18423\n */\nclass LocalStorageErrorsEventsEmitter extends TypedEventEmitter<LocalStorageErrors, EventHandlerMap> {}\nexport const localStorageErrorsEventsEmitter = new LocalStorageErrorsEventsEmitter();\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,iBAAiB,QAAQ,kCAAkC;AAEpE,WAAY,kBAAkB,0BAAlB,kBAAkB;EAAlB,kBAAkB;EAAlB,kBAAkB;EAAlB,kBAAkB;EAAlB,kBAAkB;EAAlB,kBAAkB;EAAlB,kBAAkB;EAAA,OAAlB,kBAAkB;AAAA;AAkB9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,+BAA+B,SAAS,iBAAiB,CAAsC;AACrG,OAAO,MAAM,+BAA+B,GAAG,IAAI,+BAA+B,CAAC,CAAC","ignoreList":[]}
@@ -208,6 +208,7 @@ export declare class MemoryStore implements IStore {
208
208
  getUserProfile(userId: string): Promise<SyncUserProfile | undefined>;
209
209
  storeUserProfiles(userProfiles: Map<string, SyncUserProfile>): Promise<void>;
210
210
  removeUserProfiles(userIds: string[]): Promise<void>;
211
+ removeEventsFromRoom(roomId: string, eventIds: string[]): Promise<void>;
211
212
  destroy(): Promise<void>;
212
213
  }
213
214
  //# sourceMappingURL=memory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/store/memory.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGnE,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AActD,MAAM,WAAW,KAAK;IAClB,yGAAyG;IACzG,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,qBAAa,WAAY,YAAW,MAAM;IACtC,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,SAAS,CAAuB;IAIxC,OAAO,CAAC,OAAO,CAAoF;IAC5F,WAAW,EA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