@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.
- package/dist/{account-selection-Bv_ZuOu4.js → account-selection-5e4mHR1m.js} +1 -1
- package/dist/api.js +5 -5
- package/dist/{approval-handler.runtime-DzpLXVdc.js → approval-handler.runtime-DI5x9r8I.js} +5 -5
- package/dist/{approval-ids-R834n6m3.js → approval-ids-ZgqbspmS.js} +1 -1
- package/dist/{approval-reaction-auth-eAqCXUFG.js → approval-reaction-auth-D9LijQhr.js} +2 -2
- package/dist/{approval-reactions-BRGQgOu2.js → approval-reactions-BdUaUXVw.js} +24 -73
- package/dist/auth-presence.js +1 -1
- package/dist/{channel-KcNo9qtl.js → channel-jUTBsjHU.js} +20 -18
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-DtsGVgZj.js → channel.runtime-DO1Nv9ed.js} +25 -13
- package/dist/{cli-Clvpw_8I.js → cli-CEfWwCKx.js} +9 -9
- package/dist/{cli-metadata-D3N0Avnt.js → cli-metadata-CfiEO-CE.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-BQz5GcYr.js → client-FRuyCNju.js} +2 -2
- package/dist/{client-bootstrap-CBJciU5u.js → client-bootstrap-DjFJ7e0N.js} +1 -2
- package/dist/{client-D-5GVz_D.js → client-tgnlQJk4.js} +2 -2
- package/dist/{config-schema-Dn-fHID8.js → config-schema-DtnhNYd-.js} +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/{create-client-DhGid8FE.js → create-client-CNakT7zF.js} +3 -3
- package/dist/{credentials-G8lNmiME.js → credentials-Ds9V1mn2.js} +1 -1
- package/dist/{credentials-read-TzTOQPOM.js → credentials-read-BlkvsNFg.js} +1 -1
- package/dist/{credentials-write.runtime-5PDPPG9f.js → credentials-write.runtime-CTqqxcut.js} +1 -1
- package/dist/{crypto-runtime-B7kyrTL0.js → crypto-runtime-B74cTS6A.js} +4 -4
- package/dist/{crypto-state-store-DK2tcEyP.js → crypto-state-store-Jy3qwhdy.js} +1 -1
- package/dist/{deps-D3bkh48_.js → deps-CdjHvnmh.js} +20 -2
- package/dist/{directory-live-Ctu4whZK.js → directory-live-Ufd4qSpX.js} +2 -2
- package/dist/{doctor-BRSDNU5C.js → doctor-DfaOqFtr.js} +3 -3
- package/dist/{doctor-contract-Dq8OZWHF.js → doctor-contract-BAja_fmb.js} +1 -1
- package/dist/doctor-contract-api.js +8 -14
- package/dist/{draft-stream-j71tSUu-.js → draft-stream-D4EH25gv.js} +1 -1
- package/dist/{encryption-guidance-Bg3IRYoX.js → encryption-guidance-D8walY04.js} +1 -1
- package/dist/{file-sync-store-BWLVB01Y.js → file-sync-store-DVm0ACml.js} +3 -3
- package/dist/helper-api.js +1 -1
- package/dist/{idb-persistence-BGY1CJ7J.js → idb-persistence-BHm97th-.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{legacy-crypto-inspector-D_8iylBq.js → legacy-crypto-inspector-vzXSkm18.js} +1 -1
- package/dist/{legacy-crypto-restore-B0gcIEkE.js → legacy-crypto-restore-CIBfOmLn.js} +2 -2
- package/dist/{matrix-migration.runtime-Ctlb_rZl.js → matrix-migration.runtime-BMCyrANT.js} +3 -3
- package/dist/{media-text-XO4VaezT.js → media-text-p-LP21qs.js} +1 -1
- package/dist/{messages-nQLGGa1r.js → messages-DRKkiEY-.js} +6 -5
- package/dist/{monitor-k3Sko8qt.js → monitor-CsGOGdwu.js} +71 -71
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/probe.runtime-2MZLc6ng.js +3 -0
- package/dist/{profile-update-DIOAhezh.js → profile-update-Ucc8RrJL.js} +2 -2
- package/dist/{reaction-events-BDsbR82F.js → reaction-events-DentrVii.js} +3 -3
- package/dist/{recovery-key-store-BGk8c_gf.js → recovery-key-store-DSeLFvNx.js} +1 -1
- package/dist/{resolve-targets-BbrinjHd.js → resolve-targets-DcV_KfgX.js} +1 -1
- package/dist/{resolver.runtime-B3N7k_6-.js → resolver.runtime-Hr6bO5zl.js} +1 -1
- package/dist/runtime-api.js +2 -2
- package/dist/runtime-heavy-api.js +1 -1
- package/dist/{sdk-eyqOqjmn.js → sdk-AZYVl34z.js} +8 -6
- package/dist/{send-D0hpevF-.js → send-D92v6Yy0.js} +21 -8
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/{setup-bootstrap-Ihb_DM2a.js → setup-bootstrap-Da564w5f.js} +2 -2
- package/dist/{setup-core-D2BQs8w1.js → setup-core-BGgbrdaJ.js} +5 -8
- package/dist/setup-plugin-api.js +3 -3
- package/dist/{setup-surface-1qf1LZIP.js → setup-surface-iJ6pd-t5.js} +6 -6
- package/dist/{shared-BGcaBMK3.js → shared-DkFfq7mH.js} +6 -6
- package/dist/{startup-verification-Bd31KqLv.js → startup-verification-BKMAXvcV.js} +2 -2
- package/dist/{storage-t5S-5c_5.js → storage-CQdyKcGg.js} +5 -5
- package/dist/{thread-bindings-BnuBS0VH.js → thread-bindings-BX5nmWpw.js} +3 -3
- package/dist/{tool-actions.runtime-BeUveYxV.js → tool-actions.runtime-C1d5fxE_.js} +12 -12
- package/dist/{verification-CNw2K4uT.js → verification-BGCMiO1p.js} +2 -2
- package/node_modules/@babel/runtime/package.json +468 -1089
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/.cargo/config.toml +2 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/CHANGELOG.md +12 -3
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/README.md +17 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js +10 -2
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/package.json +1 -1
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/xtask/.idea/modules.xml +8 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/xtask/.idea/vcs.xml +6 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/xtask/.idea/xtask.iml +11 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/package.json +1 -1
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.cjs +28 -28
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.js +24 -24
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm +0 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts +58 -58
- package/node_modules/content-type/README.md +32 -57
- package/node_modules/content-type/dist/index.d.ts +26 -0
- package/node_modules/content-type/dist/index.js +170 -0
- package/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/content-type/package.json +35 -25
- package/node_modules/linkify-it/README.md +3 -4
- package/node_modules/linkify-it/build/index.cjs.js +44 -41
- package/node_modules/linkify-it/index.mjs +10 -11
- package/node_modules/linkify-it/lib/re.mjs +34 -30
- package/node_modules/linkify-it/package.json +10 -15
- package/node_modules/markdown-it/dist/index.cjs.js +3652 -5378
- package/node_modules/markdown-it/dist/index.cjs.js.map +1 -0
- package/node_modules/markdown-it/dist/markdown-it.js +1399 -4479
- package/node_modules/markdown-it/dist/markdown-it.js.map +1 -0
- package/node_modules/markdown-it/dist/markdown-it.min.js +3 -2
- package/node_modules/markdown-it/dist/markdown-it.min.js.map +1 -0
- package/node_modules/markdown-it/lib/common/html_re.mjs +9 -9
- package/node_modules/markdown-it/lib/common/utils.mjs +2 -11
- package/node_modules/markdown-it/lib/parser_block.mjs +9 -9
- package/node_modules/markdown-it/lib/parser_core.mjs +7 -7
- package/node_modules/markdown-it/lib/parser_inline.mjs +16 -16
- package/node_modules/markdown-it/lib/renderer.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/blockquote.mjs +6 -6
- package/node_modules/markdown-it/lib/rules_block/code.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/fence.mjs +4 -4
- package/node_modules/markdown-it/lib/rules_block/heading.mjs +7 -7
- package/node_modules/markdown-it/lib/rules_block/hr.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_block/html_block.mjs +6 -6
- package/node_modules/markdown-it/lib/rules_block/lheading.mjs +8 -8
- package/node_modules/markdown-it/lib/rules_block/list.mjs +6 -6
- package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +5 -5
- package/node_modules/markdown-it/lib/rules_block/reference.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_block/state_block.mjs +6 -6
- package/node_modules/markdown-it/lib/rules_block/table.mjs +4 -4
- package/node_modules/markdown-it/lib/rules_core/block.mjs +3 -3
- package/node_modules/markdown-it/lib/rules_core/linkify.mjs +15 -15
- package/node_modules/markdown-it/lib/rules_core/normalize.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/autolink.mjs +17 -17
- package/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +8 -8
- package/node_modules/markdown-it/lib/rules_inline/entity.mjs +7 -7
- package/node_modules/markdown-it/lib/rules_inline/escape.mjs +15 -1
- package/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_inline/link.mjs +1 -1
- package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +2 -2
- package/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +10 -10
- package/node_modules/markdown-it/lib/token.mjs +12 -12
- package/node_modules/markdown-it/package.json +25 -34
- package/node_modules/matrix-js-sdk/CHANGELOG.md +24 -0
- package/node_modules/matrix-js-sdk/README.md +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/AESEncryptedSecretStoragePayload.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/IIdentityServerProvider.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.js +7 -7
- package/node_modules/matrix-js-sdk/lib/@types/PushRules.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/auth.js +4 -4
- package/node_modules/matrix-js-sdk/lib/@types/auth.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/beacon.js +2 -2
- package/node_modules/matrix-js-sdk/lib/@types/beacon.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/common.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/crypto.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.d.ts +6 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/event.js +23 -20
- package/node_modules/matrix-js-sdk/lib/@types/event.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/events.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/extensible_events.js +6 -6
- package/node_modules/matrix-js-sdk/lib/@types/extensible_events.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/global.d.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/json.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/local_notifications.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/location.js +4 -4
- package/node_modules/matrix-js-sdk/lib/@types/location.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/matrix-sdk-crypto-wasm.d.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/media.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/membership.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/membership.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/partials.js +6 -6
- package/node_modules/matrix-js-sdk/lib/@types/partials.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/polls.js +5 -5
- package/node_modules/matrix-js-sdk/lib/@types/polls.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/read_receipts.js +2 -2
- package/node_modules/matrix-js-sdk/lib/@types/read_receipts.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/registration.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/requests.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/requests.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/retention.d.ts +15 -0
- package/node_modules/matrix-js-sdk/lib/@types/retention.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/@types/retention.js +13 -0
- package/node_modules/matrix-js-sdk/lib/@types/retention.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/@types/search.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/search.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/signed.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/spaces.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/state_events.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/synapse.js +3 -1
- package/node_modules/matrix-js-sdk/lib/@types/sync.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/sync.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/threepids.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/threepids.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/topic.js +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/topic.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/@types/uia.js +3 -1
- package/node_modules/matrix-js-sdk/lib/NamespacedValue.js +8 -8
- package/node_modules/matrix-js-sdk/lib/NamespacedValue.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/ReEmitter.js +8 -15
- package/node_modules/matrix-js-sdk/lib/ReEmitter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/ToDeviceMessageQueue.js +47 -55
- package/node_modules/matrix-js-sdk/lib/ToDeviceMessageQueue.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/autodiscovery.js +233 -247
- package/node_modules/matrix-js-sdk/lib/autodiscovery.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/base64.js +1 -1
- package/node_modules/matrix-js-sdk/lib/base64.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/browser-index.d.ts +2 -2
- package/node_modules/matrix-js-sdk/lib/browser-index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/browser-index.js +5 -5
- package/node_modules/matrix-js-sdk/lib/browser-index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/capabilityPoller.d.ts +38 -0
- package/node_modules/matrix-js-sdk/lib/capabilityPoller.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/capabilityPoller.js +93 -0
- package/node_modules/matrix-js-sdk/lib/capabilityPoller.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/client.d.ts +9 -8
- package/node_modules/matrix-js-sdk/lib/client.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/client.js +2123 -2483
- package/node_modules/matrix-js-sdk/lib/client.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.js +3 -1
- package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/common-crypto/key-passphrase.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/content-helpers.js +43 -48
- package/node_modules/matrix-js-sdk/lib/content-helpers.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/content-repo.js +14 -24
- package/node_modules/matrix-js-sdk/lib/content-repo.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/base.js +6 -6
- package/node_modules/matrix-js-sdk/lib/crypto/store/base.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store-backend.js +189 -237
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store.js +25 -28
- package/node_modules/matrix-js-sdk/lib/crypto/store/indexeddb-crypto-store.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/localStorage-crypto-store.js +113 -145
- package/node_modules/matrix-js-sdk/lib/crypto/store/localStorage-crypto-store.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto/store/memory-crypto-store.js +74 -105
- package/node_modules/matrix-js-sdk/lib/crypto/store/memory-crypto-store.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/CryptoEvent.js +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/CryptoEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/CryptoEventHandlerMap.js +3 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.d.ts +15 -6
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.js +76 -76
- package/node_modules/matrix-js-sdk/lib/crypto-api/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/key-passphrase.js +15 -23
- package/node_modules/matrix-js-sdk/lib/crypto-api/key-passphrase.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/keybackup.js +3 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/recovery-key.js +11 -12
- package/node_modules/matrix-js-sdk/lib/crypto-api/recovery-key.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/crypto-api/verification.js +3 -3
- package/node_modules/matrix-js-sdk/lib/crypto-api/verification.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/digest.js +7 -14
- package/node_modules/matrix-js-sdk/lib/digest.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/embedded.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/embedded.js +379 -500
- package/node_modules/matrix-js-sdk/lib/embedded.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/errors.js +2 -2
- package/node_modules/matrix-js-sdk/lib/errors.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/event-mapper.js +10 -12
- package/node_modules/matrix-js-sdk/lib/event-mapper.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/ExtensibleEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/InvalidEventError.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/MessageEvent.js +26 -28
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/MessageEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollEndEvent.js +11 -12
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollEndEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollResponseEvent.js +6 -6
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollResponseEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollStartEvent.js +36 -38
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/PollStartEvent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/extensible_events_v1/utilities.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/feature.js +18 -31
- package/node_modules/matrix-js-sdk/lib/feature.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/filter-component.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/filter-component.js +20 -26
- package/node_modules/matrix-js-sdk/lib/filter-component.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/filter.js +14 -15
- package/node_modules/matrix-js-sdk/lib/filter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/errors.js +41 -56
- package/node_modules/matrix-js-sdk/lib/http-api/errors.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.js +140 -157
- package/node_modules/matrix-js-sdk/lib/http-api/fetch.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/index.js +17 -20
- package/node_modules/matrix-js-sdk/lib/http-api/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/interface.js +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/interface.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/method.js +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/method.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/prefix.js +3 -3
- package/node_modules/matrix-js-sdk/lib/http-api/prefix.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/refresh.js +80 -99
- package/node_modules/matrix-js-sdk/lib/http-api/refresh.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/utils.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/utils.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/http-api/utils.js +35 -47
- package/node_modules/matrix-js-sdk/lib/http-api/utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js +3 -3
- package/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/indexeddb-worker.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/interactive-auth.d.ts +5 -5
- package/node_modules/matrix-js-sdk/lib/interactive-auth.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/interactive-auth.js +181 -203
- package/node_modules/matrix-js-sdk/lib/interactive-auth.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/logger.js +22 -56
- package/node_modules/matrix-js-sdk/lib/logger.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrix.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/matrix.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrix.js +8 -11
- package/node_modules/matrix-js-sdk/lib/matrix.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js +83 -76
- package/node_modules/matrix-js-sdk/lib/matrixrtc/CallMembership.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IKeyTransport.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IKeyTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/IMembershipManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js +4 -4
- package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js +144 -184
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.js +35 -39
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSessionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts +2 -0
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js +346 -383
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManagerActionScheduler.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManagerActionScheduler.js +54 -59
- package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManagerActionScheduler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js +117 -139
- package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js +49 -54
- package/node_modules/matrix-js-sdk/lib/matrixrtc/ToDeviceKeyTransport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.js +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/common.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js +15 -23
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/rtc.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js +4 -5
- package/node_modules/matrix-js-sdk/lib/matrixrtc/membershipData/session.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js +4 -6
- package/node_modules/matrix-js-sdk/lib/matrixrtc/types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.js +4 -11
- package/node_modules/matrix-js-sdk/lib/matrixrtc/utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.js +91 -116
- package/node_modules/matrix-js-sdk/lib/models/MSC3089Branch.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/MSC3089TreeSpace.js +209 -244
- package/node_modules/matrix-js-sdk/lib/models/MSC3089TreeSpace.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/ToDeviceMessage.js +3 -1
- package/node_modules/matrix-js-sdk/lib/models/beacon.js +20 -15
- package/node_modules/matrix-js-sdk/lib/models/beacon.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/compare-event-ordering.js +13 -13
- package/node_modules/matrix-js-sdk/lib/models/compare-event-ordering.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/device.js +10 -3
- package/node_modules/matrix-js-sdk/lib/models/device.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-context.js +5 -7
- package/node_modules/matrix-js-sdk/lib/models/event-context.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-status.js +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-status.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js +91 -91
- package/node_modules/matrix-js-sdk/lib/models/event-timeline-set.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event-timeline.js +31 -29
- package/node_modules/matrix-js-sdk/lib/models/event-timeline.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/event.js +215 -235
- package/node_modules/matrix-js-sdk/lib/models/event.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/invites-ignorer-types.js +4 -4
- package/node_modules/matrix-js-sdk/lib/models/invites-ignorer-types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/invites-ignorer.js +159 -179
- package/node_modules/matrix-js-sdk/lib/models/invites-ignorer.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/poll.js +72 -78
- package/node_modules/matrix-js-sdk/lib/models/poll.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/profile-keys.js +2 -2
- package/node_modules/matrix-js-sdk/lib/models/profile-keys.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/read-receipt.js +40 -56
- package/node_modules/matrix-js-sdk/lib/models/read-receipt.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/related-relations.js +2 -0
- package/node_modules/matrix-js-sdk/lib/models/related-relations.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/relations-container.js +20 -21
- package/node_modules/matrix-js-sdk/lib/models/relations-container.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/relations.js +131 -156
- package/node_modules/matrix-js-sdk/lib/models/relations.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-member.js +44 -27
- package/node_modules/matrix-js-sdk/lib/models/room-member.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-receipts.js +48 -55
- package/node_modules/matrix-js-sdk/lib/models/room-receipts.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-retention.d.ts +28 -0
- package/node_modules/matrix-js-sdk/lib/models/room-retention.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/models/room-retention.js +192 -0
- package/node_modules/matrix-js-sdk/lib/models/room-retention.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/models/room-state.js +141 -170
- package/node_modules/matrix-js-sdk/lib/models/room-state.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js +46 -65
- package/node_modules/matrix-js-sdk/lib/models/room-sticky-events.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room-summary.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.d.ts +2 -1
- package/node_modules/matrix-js-sdk/lib/models/room.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/room.js +800 -887
- package/node_modules/matrix-js-sdk/lib/models/room.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/search-result.js +5 -5
- package/node_modules/matrix-js-sdk/lib/models/search-result.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/thread.js +267 -283
- package/node_modules/matrix-js-sdk/lib/models/thread.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/typed-event-emitter.js +7 -18
- package/node_modules/matrix-js-sdk/lib/models/typed-event-emitter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/models/user.js +26 -7
- package/node_modules/matrix-js-sdk/lib/models/user.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/authorize.js +208 -241
- package/node_modules/matrix-js-sdk/lib/oidc/authorize.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/discovery.js +23 -36
- package/node_modules/matrix-js-sdk/lib/oidc/discovery.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/error.js +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/error.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/index.js +1 -0
- package/node_modules/matrix-js-sdk/lib/oidc/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/register.js +60 -66
- package/node_modules/matrix-js-sdk/lib/oidc/register.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/tokenRefresher.js +83 -94
- package/node_modules/matrix-js-sdk/lib/oidc/tokenRefresher.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/oidc/validate.js +18 -18
- package/node_modules/matrix-js-sdk/lib/oidc/validate.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/pushprocessor.js +70 -81
- package/node_modules/matrix-js-sdk/lib/pushprocessor.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/randomstring.js +9 -9
- package/node_modules/matrix-js-sdk/lib/randomstring.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/realtime-callbacks.js +25 -28
- package/node_modules/matrix-js-sdk/lib/realtime-callbacks.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.d.ts +2 -0
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.js +14 -22
- package/node_modules/matrix-js-sdk/lib/receipt-accumulator.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.js +272 -298
- package/node_modules/matrix-js-sdk/lib/rendezvous/MSC4108SignInWithQR.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousChannel.js +3 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousCode.js +3 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousError.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousFailureReason.js +2 -2
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousFailureReason.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousIntent.js +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousIntent.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/RendezvousTransport.js +3 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/channels/MSC4108SecureChannel.js +122 -144
- package/node_modules/matrix-js-sdk/lib/rendezvous/channels/MSC4108SecureChannel.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.js +44 -69
- package/node_modules/matrix-js-sdk/lib/rendezvous/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/rendezvous/transports/MSC4108RendezvousSession.js +142 -152
- package/node_modules/matrix-js-sdk/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/retentionPolicy.d.ts +33 -0
- package/node_modules/matrix-js-sdk/lib/retentionPolicy.d.ts.map +1 -0
- package/node_modules/matrix-js-sdk/lib/retentionPolicy.js +39 -0
- package/node_modules/matrix-js-sdk/lib/retentionPolicy.js.map +1 -0
- package/node_modules/matrix-js-sdk/lib/room-hierarchy.js +52 -56
- package/node_modules/matrix-js-sdk/lib/room-hierarchy.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/CrossSigningIdentity.js +94 -104
- package/node_modules/matrix-js-sdk/lib/rust-crypto/CrossSigningIdentity.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/DehydratedDeviceManager.js +158 -190
- package/node_modules/matrix-js-sdk/lib/rust-crypto/DehydratedDeviceManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/KeyClaimManager.js +17 -20
- package/node_modules/matrix-js-sdk/lib/rust-crypto/KeyClaimManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestProcessor.js +109 -139
- package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestProcessor.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestsManager.js +72 -86
- package/node_modules/matrix-js-sdk/lib/rust-crypto/OutgoingRequestsManager.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/PerSessionKeyBackupDownloader.js +195 -221
- package/node_modules/matrix-js-sdk/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/RoomEncryptor.js +121 -137
- package/node_modules/matrix-js-sdk/lib/rust-crypto/RoomEncryptor.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.d.ts +7 -2
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.js +459 -544
- package/node_modules/matrix-js-sdk/lib/rust-crypto/backup.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/constants.js +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/constants.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/device-converter.js +15 -28
- package/node_modules/matrix-js-sdk/lib/rust-crypto/device-converter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js +103 -116
- package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/libolm_migration.js +303 -365
- package/node_modules/matrix-js-sdk/lib/rust-crypto/libolm_migration.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.d.ts +5 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js +1065 -1322
- package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/secret-storage.js +12 -25
- package/node_modules/matrix-js-sdk/lib/rust-crypto/secret-storage.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/rust-crypto/verification.js +134 -184
- package/node_modules/matrix-js-sdk/lib/rust-crypto/verification.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/scheduler.js +42 -17
- package/node_modules/matrix-js-sdk/lib/scheduler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/secret-storage.js +179 -213
- package/node_modules/matrix-js-sdk/lib/secret-storage.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/serverCapabilities.d.ts +4 -23
- package/node_modules/matrix-js-sdk/lib/serverCapabilities.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/serverCapabilities.js +9 -62
- package/node_modules/matrix-js-sdk/lib/serverCapabilities.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/service-types.js +1 -1
- package/node_modules/matrix-js-sdk/lib/service-types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js +368 -421
- package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sliding-sync.js +136 -167
- package/node_modules/matrix-js-sdk/lib/sliding-sync.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/index.d.ts +7 -0
- package/node_modules/matrix-js-sdk/lib/store/index.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/index.js +3 -1
- package/node_modules/matrix-js-sdk/lib/store/index.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-backend.js +3 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.js +197 -240
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-local-backend.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.d.ts +3 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.js +51 -59
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-remote-backend.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-store-worker.js +22 -22
- package/node_modules/matrix-js-sdk/lib/store/indexeddb-store-worker.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb.d.ts +7 -5
- package/node_modules/matrix-js-sdk/lib/store/indexeddb.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/indexeddb.js +63 -79
- package/node_modules/matrix-js-sdk/lib/store/indexeddb.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/local-storage-events-emitter.js +2 -2
- package/node_modules/matrix-js-sdk/lib/store/local-storage-events-emitter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/memory.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/store/memory.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/memory.js +38 -54
- package/node_modules/matrix-js-sdk/lib/store/memory.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/stub.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/store/stub.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/store/stub.js +22 -32
- package/node_modules/matrix-js-sdk/lib/store/stub.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync-accumulator.d.ts +1 -0
- package/node_modules/matrix-js-sdk/lib/sync-accumulator.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync-accumulator.js +57 -65
- package/node_modules/matrix-js-sdk/lib/sync-accumulator.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync.d.ts.map +1 -1
- package/node_modules/matrix-js-sdk/lib/sync.js +914 -991
- package/node_modules/matrix-js-sdk/lib/sync.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/testing.js +63 -105
- package/node_modules/matrix-js-sdk/lib/testing.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/thread-utils.js +1 -4
- package/node_modules/matrix-js-sdk/lib/thread-utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/timeline-window.js +90 -99
- package/node_modules/matrix-js-sdk/lib/timeline-window.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/types.js +1 -1
- package/node_modules/matrix-js-sdk/lib/types.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils/decryptAESSecretStorageItem.js +14 -25
- package/node_modules/matrix-js-sdk/lib/utils/decryptAESSecretStorageItem.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils/encryptAESSecretStorageItem.js +27 -38
- package/node_modules/matrix-js-sdk/lib/utils/encryptAESSecretStorageItem.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils/internal/deriveKeys.js +25 -32
- package/node_modules/matrix-js-sdk/lib/utils/internal/deriveKeys.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils/roomVersion.js +1 -1
- package/node_modules/matrix-js-sdk/lib/utils/roomVersion.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/utils.js +83 -135
- package/node_modules/matrix-js-sdk/lib/utils.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/version-support.js +3 -3
- package/node_modules/matrix-js-sdk/lib/version-support.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/audioContext.js +5 -6
- package/node_modules/matrix-js-sdk/lib/webrtc/audioContext.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/call.js +1123 -1256
- package/node_modules/matrix-js-sdk/lib/webrtc/call.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/callEventHandler.js +207 -214
- package/node_modules/matrix-js-sdk/lib/webrtc/callEventHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/callEventTypes.js +2 -2
- package/node_modules/matrix-js-sdk/lib/webrtc/callEventTypes.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/callFeed.js +33 -20
- package/node_modules/matrix-js-sdk/lib/webrtc/callFeed.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/groupCall.js +521 -594
- package/node_modules/matrix-js-sdk/lib/webrtc/groupCall.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/groupCallEventHandler.js +58 -61
- package/node_modules/matrix-js-sdk/lib/webrtc/groupCallEventHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/mediaHandler.js +203 -233
- package/node_modules/matrix-js-sdk/lib/webrtc/mediaHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callFeedStatsReporter.js +16 -20
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callFeedStatsReporter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callStatsReportGatherer.js +65 -70
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callStatsReportGatherer.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/callStatsReportSummary.js +3 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStats.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsBuilder.js +2 -2
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsBuilder.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsReportBuilder.js +20 -24
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/connectionStatsReportBuilder.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/groupCallStats.js +4 -5
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/groupCallStats.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaSsrcHandler.js +7 -8
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaSsrcHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackHandler.js +7 -9
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackStats.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackStatsHandler.js +6 -6
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/statsReport.js +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/statsReport.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/statsReportEmitter.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/summaryStatsReportGatherer.js +14 -14
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/summaryStatsReportGatherer.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/trackStatsBuilder.js +32 -34
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/trackStatsBuilder.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/transportStats.js +3 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/transportStatsBuilder.js +9 -9
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/transportStatsBuilder.js.map +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/valueFormatter.js +1 -1
- package/node_modules/matrix-js-sdk/lib/webrtc/stats/valueFormatter.js.map +1 -1
- package/node_modules/matrix-js-sdk/package.json +110 -138
- package/node_modules/matrix-js-sdk/src/@types/event.ts +9 -0
- package/node_modules/matrix-js-sdk/src/@types/global.d.ts +2 -2
- package/node_modules/matrix-js-sdk/src/@types/retention.ts +16 -0
- package/node_modules/matrix-js-sdk/src/ToDeviceMessageQueue.ts +2 -2
- package/node_modules/matrix-js-sdk/src/browser-index.ts +4 -4
- package/node_modules/matrix-js-sdk/src/capabilityPoller.ts +102 -0
- package/node_modules/matrix-js-sdk/src/client.ts +37 -25
- package/node_modules/matrix-js-sdk/src/crypto-api/index.ts +17 -6
- package/node_modules/matrix-js-sdk/src/embedded.ts +4 -6
- package/node_modules/matrix-js-sdk/src/filter-component.ts +1 -0
- package/node_modules/matrix-js-sdk/src/http-api/utils.ts +5 -10
- package/node_modules/matrix-js-sdk/src/interactive-auth.ts +11 -5
- package/node_modules/matrix-js-sdk/src/matrix.ts +1 -0
- package/node_modules/matrix-js-sdk/src/matrixrtc/LivekitTransport.ts +1 -1
- package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +5 -4
- package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManager.ts +2 -0
- package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManagerActionScheduler.ts +4 -1
- package/node_modules/matrix-js-sdk/src/models/MSC3089Branch.ts +1 -1
- package/node_modules/matrix-js-sdk/src/models/room-retention.ts +230 -0
- package/node_modules/matrix-js-sdk/src/models/room-sticky-events.ts +1 -0
- package/node_modules/matrix-js-sdk/src/models/room.ts +26 -12
- package/node_modules/matrix-js-sdk/src/receipt-accumulator.ts +2 -0
- package/node_modules/matrix-js-sdk/src/rendezvous/index.ts +1 -1
- package/node_modules/matrix-js-sdk/src/rendezvous/transports/MSC4108RendezvousSession.ts +2 -2
- package/node_modules/matrix-js-sdk/src/retentionPolicy.ts +65 -0
- package/node_modules/matrix-js-sdk/src/rust-crypto/PerSessionKeyBackupDownloader.ts +1 -1
- package/node_modules/matrix-js-sdk/src/rust-crypto/backup.ts +15 -4
- package/node_modules/matrix-js-sdk/src/rust-crypto/index.ts +6 -6
- package/node_modules/matrix-js-sdk/src/rust-crypto/rust-crypto.ts +31 -7
- package/node_modules/matrix-js-sdk/src/rust-crypto/verification.ts +1 -1
- package/node_modules/matrix-js-sdk/src/serverCapabilities.ts +8 -67
- package/node_modules/matrix-js-sdk/src/sliding-sync-sdk.ts +5 -7
- package/node_modules/matrix-js-sdk/src/store/index.ts +8 -0
- package/node_modules/matrix-js-sdk/src/store/indexeddb-local-backend.ts +12 -2
- package/node_modules/matrix-js-sdk/src/store/indexeddb-remote-backend.ts +24 -5
- package/node_modules/matrix-js-sdk/src/store/indexeddb.ts +20 -8
- package/node_modules/matrix-js-sdk/src/store/memory.ts +4 -0
- package/node_modules/matrix-js-sdk/src/store/stub.ts +3 -0
- package/node_modules/matrix-js-sdk/src/sync-accumulator.ts +9 -0
- package/node_modules/matrix-js-sdk/src/sync.ts +11 -9
- package/node_modules/media-typer/README.md +19 -33
- package/node_modules/media-typer/dist/index.d.ts +29 -0
- package/node_modules/media-typer/dist/index.js +64 -0
- package/node_modules/media-typer/dist/index.js.map +1 -0
- package/node_modules/media-typer/package.json +37 -22
- package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +2 -2
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +65 -13
- package/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +10 -0
- package/node_modules/music-metadata/lib/wav/WaveChunk.js +13 -3
- package/node_modules/music-metadata/lib/wav/WaveParser.d.ts +1 -0
- package/node_modules/music-metadata/lib/wav/WaveParser.js +6 -5
- package/node_modules/music-metadata/package.json +5 -5
- package/node_modules/typebox/build/compile/validator.d.mts +2 -7
- package/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/node_modules/typebox/build/format/_idna.mjs +36 -6
- package/node_modules/typebox/build/format/_puny.mjs +4 -1
- package/node_modules/typebox/build/format/uuid.d.mts +2 -2
- package/node_modules/typebox/build/format/uuid.mjs +3 -3
- package/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/node_modules/typebox/build/guard/guard.d.mts +4 -8
- package/node_modules/typebox/build/guard/guard.mjs +5 -13
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
- package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
- package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
- package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
- package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
- package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
- package/node_modules/typebox/build/type/action/index.d.mts +7 -4
- package/node_modules/typebox/build/type/action/index.mjs +7 -4
- package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
- package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
- package/node_modules/typebox/build/type/action/module.d.mts +8 -7
- package/node_modules/typebox/build/type/action/module.mjs +7 -6
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
- package/node_modules/typebox/build/type/action/with.d.mts +11 -0
- package/node_modules/typebox/build/type/action/with.mjs +11 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/index.mjs +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
- package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
- package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
- package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
- package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
- package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
- package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
- package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
- package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
- package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
- package/node_modules/typebox/build/type/extends/object.mjs +25 -3
- package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
- package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/record.mjs +23 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
- package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
- package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
- package/node_modules/typebox/build/type/extends/union.mjs +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
- package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
- package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
- package/node_modules/typebox/build/type/script/parser.mjs +22 -22
- package/node_modules/typebox/build/type/script/script.d.mts +3 -4
- package/node_modules/typebox/build/type/script/script.mjs +3 -2
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
- package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
- package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
- package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
- package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
- package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
- package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/node_modules/typebox/build/type/types/call.d.mts +3 -3
- package/node_modules/typebox/build/type/types/call.mjs +3 -2
- package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
- package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
- package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
- package/node_modules/typebox/build/type/types/enum.mjs +5 -0
- package/node_modules/typebox/build/type/types/index.d.mts +1 -4
- package/node_modules/typebox/build/type/types/index.mjs +1 -4
- package/node_modules/typebox/build/type/types/number.d.mts +1 -1
- package/node_modules/typebox/build/type/types/number.mjs +1 -1
- package/node_modules/typebox/build/type/types/record.d.mts +13 -7
- package/node_modules/typebox/build/type/types/record.mjs +15 -9
- package/node_modules/typebox/build/type/types/static.d.mts +2 -5
- package/node_modules/typebox/build/typebox.d.mts +4 -8
- package/node_modules/typebox/build/typebox.mjs +4 -8
- package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
- package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
- package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
- package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
- package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/index.d.mts +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
- package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
- package/node_modules/typebox/build/value/value.d.mts +0 -1
- package/node_modules/typebox/build/value/value.mjs +0 -1
- package/node_modules/typebox/package.json +25 -25
- package/node_modules/typebox/readme.md +97 -80
- package/npm-shrinkwrap.json +59 -54
- package/package.json +10 -10
- package/dist/probe.runtime-BED7DXis.js +0 -3
- package/node_modules/@babel/runtime/helpers/AwaitValue.js +0 -4
- package/node_modules/@babel/runtime/helpers/applyDecs.js +0 -236
- package/node_modules/@babel/runtime/helpers/applyDecs2203.js +0 -184
- package/node_modules/@babel/runtime/helpers/applyDecs2203R.js +0 -191
- package/node_modules/@babel/runtime/helpers/applyDecs2301.js +0 -222
- package/node_modules/@babel/runtime/helpers/applyDecs2305.js +0 -133
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +0 -10
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +0 -4
- package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +0 -5
- package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -4
- package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +0 -5
- package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +0 -5
- package/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +0 -4
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +0 -4
- package/node_modules/@babel/runtime/helpers/decorate.js +0 -250
- package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +0 -12
- package/node_modules/@babel/runtime/helpers/dispose.js +0 -28
- package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +0 -236
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +0 -184
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +0 -191
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +0 -222
- package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +0 -133
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +0 -10
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +0 -5
- package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -7
- package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +0 -4
- package/node_modules/@babel/runtime/helpers/esm/decorate.js +0 -250
- package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +0 -12
- package/node_modules/@babel/runtime/helpers/esm/dispose.js +0 -28
- package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +0 -14
- package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +0 -77
- package/node_modules/@babel/runtime/helpers/esm/using.js +0 -12
- package/node_modules/@babel/runtime/helpers/objectSpread.js +0 -14
- package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +0 -77
- package/node_modules/@babel/runtime/helpers/using.js +0 -12
- package/node_modules/@babel/runtime/regenerator/index.js +0 -15
- package/node_modules/content-type/HISTORY.md +0 -29
- package/node_modules/content-type/index.js +0 -225
- package/node_modules/media-typer/HISTORY.md +0 -50
- package/node_modules/media-typer/index.js +0 -143
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
- package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
- package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/node_modules/typebox/build/type/action/options.d.mts +0 -11
- package/node_modules/typebox/build/type/action/options.mjs +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
- package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
1
|
/*
|
|
4
2
|
Copyright 2017 - 2021 The Matrix.org Foundation C.I.C.
|
|
5
3
|
|
|
@@ -27,14 +25,14 @@ import { MigrationState, SESSION_BATCH_SIZE } from "./base.js";
|
|
|
27
25
|
* history".
|
|
28
26
|
*/
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
const E2E_PREFIX = "crypto.";
|
|
29
|
+
const KEY_END_TO_END_MIGRATION_STATE = E2E_PREFIX + "migration";
|
|
30
|
+
const KEY_END_TO_END_ACCOUNT = E2E_PREFIX + "account";
|
|
31
|
+
const KEY_CROSS_SIGNING_KEYS = E2E_PREFIX + "cross_signing_keys";
|
|
32
|
+
const KEY_INBOUND_SESSION_PREFIX = E2E_PREFIX + "inboundgroupsessions/";
|
|
33
|
+
const KEY_INBOUND_SESSION_WITHHELD_PREFIX = E2E_PREFIX + "inboundgroupsessions.withheld/";
|
|
34
|
+
const KEY_ROOMS_PREFIX = E2E_PREFIX + "rooms/";
|
|
35
|
+
const KEY_SESSIONS_NEEDING_BACKUP = E2E_PREFIX + "sessionsneedingbackup";
|
|
38
36
|
function keyEndToEndSessions(deviceKey) {
|
|
39
37
|
return E2E_PREFIX + "sessions/" + deviceKey;
|
|
40
38
|
}
|
|
@@ -49,10 +47,9 @@ function keyEndToEndRoomsPrefix(roomId) {
|
|
|
49
47
|
}
|
|
50
48
|
export class LocalStorageCryptoStore extends MemoryCryptoStore {
|
|
51
49
|
static exists(store) {
|
|
52
|
-
|
|
53
|
-
for (
|
|
54
|
-
|
|
55
|
-
if ((_store$key = store.key(i)) !== null && _store$key !== void 0 && _store$key.startsWith(E2E_PREFIX)) {
|
|
50
|
+
const length = store.length;
|
|
51
|
+
for (let i = 0; i < length; i++) {
|
|
52
|
+
if (store.key(i)?.startsWith(E2E_PREFIX)) {
|
|
56
53
|
return true;
|
|
57
54
|
}
|
|
58
55
|
}
|
|
@@ -70,11 +67,8 @@ export class LocalStorageCryptoStore extends MemoryCryptoStore {
|
|
|
70
67
|
*
|
|
71
68
|
* @internal
|
|
72
69
|
*/
|
|
73
|
-
containsData() {
|
|
74
|
-
|
|
75
|
-
return _asyncToGenerator(function* () {
|
|
76
|
-
return LocalStorageCryptoStore.exists(_this.store);
|
|
77
|
-
})();
|
|
70
|
+
async containsData() {
|
|
71
|
+
return LocalStorageCryptoStore.exists(this.store);
|
|
78
72
|
}
|
|
79
73
|
|
|
80
74
|
/**
|
|
@@ -84,12 +78,8 @@ export class LocalStorageCryptoStore extends MemoryCryptoStore {
|
|
|
84
78
|
*
|
|
85
79
|
* @internal
|
|
86
80
|
*/
|
|
87
|
-
getMigrationState() {
|
|
88
|
-
|
|
89
|
-
return _asyncToGenerator(function* () {
|
|
90
|
-
var _getJsonItem;
|
|
91
|
-
return (_getJsonItem = getJsonItem(_this2.store, KEY_END_TO_END_MIGRATION_STATE)) !== null && _getJsonItem !== void 0 ? _getJsonItem : MigrationState.NOT_STARTED;
|
|
92
|
-
})();
|
|
81
|
+
async getMigrationState() {
|
|
82
|
+
return getJsonItem(this.store, KEY_END_TO_END_MIGRATION_STATE) ?? MigrationState.NOT_STARTED;
|
|
93
83
|
}
|
|
94
84
|
|
|
95
85
|
/**
|
|
@@ -99,22 +89,19 @@ export class LocalStorageCryptoStore extends MemoryCryptoStore {
|
|
|
99
89
|
*
|
|
100
90
|
* @internal
|
|
101
91
|
*/
|
|
102
|
-
setMigrationState(migrationState) {
|
|
103
|
-
|
|
104
|
-
return _asyncToGenerator(function* () {
|
|
105
|
-
setJsonItem(_this3.store, KEY_END_TO_END_MIGRATION_STATE, migrationState);
|
|
106
|
-
})();
|
|
92
|
+
async setMigrationState(migrationState) {
|
|
93
|
+
setJsonItem(this.store, KEY_END_TO_END_MIGRATION_STATE, migrationState);
|
|
107
94
|
}
|
|
108
95
|
|
|
109
96
|
// Olm Sessions
|
|
110
97
|
|
|
111
98
|
countEndToEndSessions(txn, func) {
|
|
112
|
-
|
|
113
|
-
for (
|
|
114
|
-
|
|
115
|
-
if (key
|
|
116
|
-
|
|
117
|
-
count += Object.keys(sessions
|
|
99
|
+
let count = 0;
|
|
100
|
+
for (let i = 0; i < this.store.length; ++i) {
|
|
101
|
+
const key = this.store.key(i);
|
|
102
|
+
if (key?.startsWith(keyEndToEndSessions(""))) {
|
|
103
|
+
const sessions = getJsonItem(this.store, key);
|
|
104
|
+
count += Object.keys(sessions ?? {}).length;
|
|
118
105
|
}
|
|
119
106
|
}
|
|
120
107
|
func(count);
|
|
@@ -122,14 +109,11 @@ export class LocalStorageCryptoStore extends MemoryCryptoStore {
|
|
|
122
109
|
|
|
123
110
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
124
111
|
_getEndToEndSessions(deviceKey) {
|
|
125
|
-
|
|
126
|
-
|
|
112
|
+
const sessions = getJsonItem(this.store, keyEndToEndSessions(deviceKey));
|
|
113
|
+
const fixedSessions = {};
|
|
127
114
|
|
|
128
115
|
// fix up any old sessions to be objects rather than just the base64 pickle
|
|
129
|
-
for (
|
|
130
|
-
var _ref2 = _slicedToArray(_ref3, 2);
|
|
131
|
-
var sid = _ref2[0];
|
|
132
|
-
var val = _ref2[1];
|
|
116
|
+
for (const [sid, val] of Object.entries(sessions || {})) {
|
|
133
117
|
if (typeof val === "string") {
|
|
134
118
|
fixedSessions[sid] = {
|
|
135
119
|
session: val
|
|
@@ -141,16 +125,14 @@ export class LocalStorageCryptoStore extends MemoryCryptoStore {
|
|
|
141
125
|
return fixedSessions;
|
|
142
126
|
}
|
|
143
127
|
getEndToEndSession(deviceKey, sessionId, txn, func) {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
func((_sessions$sessionId = sessions[sessionId]) !== null && _sessions$sessionId !== void 0 ? _sessions$sessionId : {});
|
|
128
|
+
const sessions = this._getEndToEndSessions(deviceKey);
|
|
129
|
+
func(sessions[sessionId] ?? {});
|
|
147
130
|
}
|
|
148
131
|
getEndToEndSessions(deviceKey, txn, func) {
|
|
149
|
-
|
|
150
|
-
func((_this$_getEndToEndSes = this._getEndToEndSessions(deviceKey)) !== null && _this$_getEndToEndSes !== void 0 ? _this$_getEndToEndSes : {});
|
|
132
|
+
func(this._getEndToEndSessions(deviceKey) ?? {});
|
|
151
133
|
}
|
|
152
134
|
storeEndToEndSession(deviceKey, sessionId, sessionInfo, txn) {
|
|
153
|
-
|
|
135
|
+
const sessions = this._getEndToEndSessions(deviceKey) || {};
|
|
154
136
|
sessions[sessionId] = sessionInfo;
|
|
155
137
|
setJsonItem(this.store, keyEndToEndSessions(deviceKey), sessions);
|
|
156
138
|
}
|
|
@@ -162,30 +144,26 @@ export class LocalStorageCryptoStore extends MemoryCryptoStore {
|
|
|
162
144
|
*
|
|
163
145
|
* @internal
|
|
164
146
|
*/
|
|
165
|
-
getEndToEndSessionsBatch() {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
result.push(session);
|
|
175
|
-
if (result.length >= SESSION_BATCH_SIZE) {
|
|
176
|
-
return result;
|
|
177
|
-
}
|
|
147
|
+
async getEndToEndSessionsBatch() {
|
|
148
|
+
const result = [];
|
|
149
|
+
for (let i = 0; i < this.store.length; ++i) {
|
|
150
|
+
if (this.store.key(i)?.startsWith(keyEndToEndSessions(""))) {
|
|
151
|
+
const deviceKey = this.store.key(i).split("/")[1];
|
|
152
|
+
for (const session of Object.values(this._getEndToEndSessions(deviceKey))) {
|
|
153
|
+
result.push(session);
|
|
154
|
+
if (result.length >= SESSION_BATCH_SIZE) {
|
|
155
|
+
return result;
|
|
178
156
|
}
|
|
179
157
|
}
|
|
180
158
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
159
|
+
}
|
|
160
|
+
if (result.length === 0) {
|
|
161
|
+
// No sessions left.
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
185
164
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
})();
|
|
165
|
+
// There are fewer sessions than the batch size; return the final batch of sessions.
|
|
166
|
+
return result;
|
|
189
167
|
}
|
|
190
168
|
|
|
191
169
|
/**
|
|
@@ -195,22 +173,20 @@ export class LocalStorageCryptoStore extends MemoryCryptoStore {
|
|
|
195
173
|
*
|
|
196
174
|
* @internal
|
|
197
175
|
*/
|
|
198
|
-
deleteEndToEndSessionsBatch(sessions) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
setJsonItem(_this5.store, keyEndToEndSessions(deviceKey), deviceSessions);
|
|
211
|
-
}
|
|
176
|
+
async deleteEndToEndSessionsBatch(sessions) {
|
|
177
|
+
for (const {
|
|
178
|
+
deviceKey,
|
|
179
|
+
sessionId
|
|
180
|
+
} of sessions) {
|
|
181
|
+
const deviceSessions = this._getEndToEndSessions(deviceKey) || {};
|
|
182
|
+
delete deviceSessions[sessionId];
|
|
183
|
+
if (Object.keys(deviceSessions).length === 0) {
|
|
184
|
+
// No more sessions for this device.
|
|
185
|
+
this.store.removeItem(keyEndToEndSessions(deviceKey));
|
|
186
|
+
} else {
|
|
187
|
+
setJsonItem(this.store, keyEndToEndSessions(deviceKey), deviceSessions);
|
|
212
188
|
}
|
|
213
|
-
}
|
|
189
|
+
}
|
|
214
190
|
}
|
|
215
191
|
|
|
216
192
|
// Inbound Group Sessions
|
|
@@ -229,18 +205,15 @@ export class LocalStorageCryptoStore extends MemoryCryptoStore {
|
|
|
229
205
|
*
|
|
230
206
|
* @internal
|
|
231
207
|
*/
|
|
232
|
-
countEndToEndInboundGroupSessions() {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
if (key !== null && key !== void 0 && key.startsWith(KEY_INBOUND_SESSION_PREFIX)) {
|
|
239
|
-
count += 1;
|
|
240
|
-
}
|
|
208
|
+
async countEndToEndInboundGroupSessions() {
|
|
209
|
+
let count = 0;
|
|
210
|
+
for (let i = 0; i < this.store.length; ++i) {
|
|
211
|
+
const key = this.store.key(i);
|
|
212
|
+
if (key?.startsWith(KEY_INBOUND_SESSION_PREFIX)) {
|
|
213
|
+
count += 1;
|
|
241
214
|
}
|
|
242
|
-
|
|
243
|
-
|
|
215
|
+
}
|
|
216
|
+
return count;
|
|
244
217
|
}
|
|
245
218
|
|
|
246
219
|
/**
|
|
@@ -250,40 +223,37 @@ export class LocalStorageCryptoStore extends MemoryCryptoStore {
|
|
|
250
223
|
*
|
|
251
224
|
* @internal
|
|
252
225
|
*/
|
|
253
|
-
getEndToEndInboundGroupSessionsBatch() {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
if (key !== null && key !== void 0 && key.startsWith(KEY_INBOUND_SESSION_PREFIX)) {
|
|
261
|
-
var key2 = key.slice(KEY_INBOUND_SESSION_PREFIX.length);
|
|
226
|
+
async getEndToEndInboundGroupSessionsBatch() {
|
|
227
|
+
const sessionsNeedingBackup = getJsonItem(this.store, KEY_SESSIONS_NEEDING_BACKUP) || {};
|
|
228
|
+
const result = [];
|
|
229
|
+
for (let i = 0; i < this.store.length; ++i) {
|
|
230
|
+
const key = this.store.key(i);
|
|
231
|
+
if (key?.startsWith(KEY_INBOUND_SESSION_PREFIX)) {
|
|
232
|
+
const key2 = key.slice(KEY_INBOUND_SESSION_PREFIX.length);
|
|
262
233
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
234
|
+
// we can't use split, as the components we are trying to split out
|
|
235
|
+
// might themselves contain '/' characters. We rely on the
|
|
236
|
+
// senderKey being a (32-byte) curve25519 key, base64-encoded
|
|
237
|
+
// (hence 43 characters long).
|
|
267
238
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
239
|
+
result.push({
|
|
240
|
+
senderKey: key2.slice(0, 43),
|
|
241
|
+
sessionId: key2.slice(44),
|
|
242
|
+
sessionData: getJsonItem(this.store, key),
|
|
243
|
+
needsBackup: key2 in sessionsNeedingBackup
|
|
244
|
+
});
|
|
245
|
+
if (result.length >= SESSION_BATCH_SIZE) {
|
|
246
|
+
return result;
|
|
277
247
|
}
|
|
278
248
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
249
|
+
}
|
|
250
|
+
if (result.length === 0) {
|
|
251
|
+
// No sessions left.
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
283
254
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
})();
|
|
255
|
+
// There are fewer sessions than the batch size; return the final batch of sessions.
|
|
256
|
+
return result;
|
|
287
257
|
}
|
|
288
258
|
|
|
289
259
|
/**
|
|
@@ -293,32 +263,30 @@ export class LocalStorageCryptoStore extends MemoryCryptoStore {
|
|
|
293
263
|
*
|
|
294
264
|
* @internal
|
|
295
265
|
*/
|
|
296
|
-
deleteEndToEndInboundGroupSessionsBatch(sessions) {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
}
|
|
305
|
-
})();
|
|
266
|
+
async deleteEndToEndInboundGroupSessionsBatch(sessions) {
|
|
267
|
+
for (const {
|
|
268
|
+
senderKey,
|
|
269
|
+
sessionId
|
|
270
|
+
} of sessions) {
|
|
271
|
+
const k = keyEndToEndInboundGroupSession(senderKey, sessionId);
|
|
272
|
+
this.store.removeItem(k);
|
|
273
|
+
}
|
|
306
274
|
}
|
|
307
275
|
getEndToEndRooms(txn, func) {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
for (
|
|
311
|
-
|
|
312
|
-
if (key
|
|
313
|
-
|
|
276
|
+
const result = {};
|
|
277
|
+
const prefix = keyEndToEndRoomsPrefix("");
|
|
278
|
+
for (let i = 0; i < this.store.length; ++i) {
|
|
279
|
+
const key = this.store.key(i);
|
|
280
|
+
if (key?.startsWith(prefix)) {
|
|
281
|
+
const roomId = key.slice(prefix.length);
|
|
314
282
|
result[roomId] = getJsonItem(this.store, key);
|
|
315
283
|
}
|
|
316
284
|
}
|
|
317
285
|
func(result);
|
|
318
286
|
}
|
|
319
287
|
markSessionsNeedingBackup(sessions) {
|
|
320
|
-
|
|
321
|
-
for (
|
|
288
|
+
const sessionsNeedingBackup = getJsonItem(this.store, KEY_SESSIONS_NEEDING_BACKUP) || {};
|
|
289
|
+
for (const session of sessions) {
|
|
322
290
|
sessionsNeedingBackup[session.senderKey + "/" + session.sessionId] = true;
|
|
323
291
|
}
|
|
324
292
|
setJsonItem(this.store, KEY_SESSIONS_NEEDING_BACKUP, sessionsNeedingBackup);
|
|
@@ -338,22 +306,22 @@ export class LocalStorageCryptoStore extends MemoryCryptoStore {
|
|
|
338
306
|
// Olm account
|
|
339
307
|
|
|
340
308
|
getAccount(txn, func) {
|
|
341
|
-
|
|
309
|
+
const accountPickle = getJsonItem(this.store, KEY_END_TO_END_ACCOUNT);
|
|
342
310
|
func(accountPickle);
|
|
343
311
|
}
|
|
344
312
|
storeAccount(txn, accountPickle) {
|
|
345
313
|
setJsonItem(this.store, KEY_END_TO_END_ACCOUNT, accountPickle);
|
|
346
314
|
}
|
|
347
315
|
getCrossSigningKeys(txn, func) {
|
|
348
|
-
|
|
316
|
+
const keys = getJsonItem(this.store, KEY_CROSS_SIGNING_KEYS);
|
|
349
317
|
func(keys);
|
|
350
318
|
}
|
|
351
319
|
getSecretStorePrivateKey(txn, func, type) {
|
|
352
|
-
|
|
320
|
+
const key = getJsonItem(this.store, E2E_PREFIX + `ssss_cache.${type}`);
|
|
353
321
|
func(key);
|
|
354
322
|
}
|
|
355
323
|
storeSecretStorePrivateKey(txn, type, key) {
|
|
356
|
-
setJsonItem(this.store, E2E_PREFIX +
|
|
324
|
+
setJsonItem(this.store, E2E_PREFIX + `ssss_cache.${type}`, key);
|
|
357
325
|
}
|
|
358
326
|
doTxn(mode, stores, func) {
|
|
359
327
|
return Promise.resolve(func(null));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localStorage-crypto-store.js","names":["logger","MemoryCryptoStore","MigrationState","SESSION_BATCH_SIZE","E2E_PREFIX","KEY_END_TO_END_MIGRATION_STATE","KEY_END_TO_END_ACCOUNT","KEY_CROSS_SIGNING_KEYS","KEY_INBOUND_SESSION_PREFIX","KEY_INBOUND_SESSION_WITHHELD_PREFIX","KEY_ROOMS_PREFIX","KEY_SESSIONS_NEEDING_BACKUP","keyEndToEndSessions","deviceKey","keyEndToEndInboundGroupSession","senderKey","sessionId","keyEndToEndInboundGroupSessionWithheld","keyEndToEndRoomsPrefix","roomId","LocalStorageCryptoStore","exists","store","length","i","_store$key","key","startsWith","constructor","containsData","_this","_asyncToGenerator","getMigrationState","_this2","_getJsonItem","getJsonItem","NOT_STARTED","setMigrationState","migrationState","_this3","setJsonItem","countEndToEndSessions","txn","func","count","sessions","Object","keys","_getEndToEndSessions","fixedSessions","_ref3","entries","_ref2","_slicedToArray","sid","val","session","getEndToEndSession","_sessions$sessionId","getEndToEndSessions","_this$_getEndToEndSes","storeEndToEndSession","sessionInfo","getEndToEndSessionsBatch","_this4","result","_this4$store$key","split","values","push","deleteEndToEndSessionsBatch","_this5","_ref5","deviceSessions","removeItem","getEndToEndInboundGroupSession","senderCurve25519Key","storeEndToEndInboundGroupSession","sessionData","countEndToEndInboundGroupSessions","_this6","getEndToEndInboundGroupSessionsBatch","_this7","sessionsNeedingBackup","key2","slice","needsBackup","deleteEndToEndInboundGroupSessionsBatch","_this8","_ref7","k","getEndToEndRooms","prefix","markSessionsNeedingBackup","Promise","resolve","deleteAllData","getAccount","accountPickle","storeAccount","getCrossSigningKeys","getSecretStorePrivateKey","type","concat","storeSecretStorePrivateKey","doTxn","mode","stores","JSON","parse","getItem","e","log","message","stack","setItem","stringify"],"sources":["../../../src/crypto/store/localStorage-crypto-store.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 { logger } from \"../../logger.ts\";\nimport { MemoryCryptoStore } from \"./memory-crypto-store.ts\";\nimport {\n type CryptoStore,\n type ISession,\n type SessionExtended,\n type ISessionInfo,\n type IWithheld,\n MigrationState,\n type Mode,\n type SecretStorePrivateKeys,\n SESSION_BATCH_SIZE,\n type InboundGroupSessionData,\n type IRoomEncryption,\n} from \"./base.ts\";\nimport { type CrossSigningKeyInfo } from \"../../crypto-api/index.ts\";\n\n/**\n * Internal module. Partial localStorage backed storage for e2e.\n * This is not a full crypto store, just the in-memory store with\n * some things backed by localStorage. It exists because indexedDB\n * is broken in Firefox private mode or set to, \"will not remember\n * history\".\n */\n\nconst E2E_PREFIX = \"crypto.\";\nconst KEY_END_TO_END_MIGRATION_STATE = E2E_PREFIX + \"migration\";\nconst KEY_END_TO_END_ACCOUNT = E2E_PREFIX + \"account\";\nconst KEY_CROSS_SIGNING_KEYS = E2E_PREFIX + \"cross_signing_keys\";\nconst KEY_INBOUND_SESSION_PREFIX = E2E_PREFIX + \"inboundgroupsessions/\";\nconst KEY_INBOUND_SESSION_WITHHELD_PREFIX = E2E_PREFIX + \"inboundgroupsessions.withheld/\";\nconst KEY_ROOMS_PREFIX = E2E_PREFIX + \"rooms/\";\nconst KEY_SESSIONS_NEEDING_BACKUP = E2E_PREFIX + \"sessionsneedingbackup\";\n\nfunction keyEndToEndSessions(deviceKey: string): string {\n return E2E_PREFIX + \"sessions/\" + deviceKey;\n}\n\nfunction keyEndToEndInboundGroupSession(senderKey: string, sessionId: string): string {\n return KEY_INBOUND_SESSION_PREFIX + senderKey + \"/\" + sessionId;\n}\n\nfunction keyEndToEndInboundGroupSessionWithheld(senderKey: string, sessionId: string): string {\n return KEY_INBOUND_SESSION_WITHHELD_PREFIX + senderKey + \"/\" + sessionId;\n}\n\nfunction keyEndToEndRoomsPrefix(roomId: string): string {\n return KEY_ROOMS_PREFIX + roomId;\n}\n\nexport class LocalStorageCryptoStore extends MemoryCryptoStore implements CryptoStore {\n public static exists(store: Storage): boolean {\n const length = store.length;\n for (let i = 0; i < length; i++) {\n if (store.key(i)?.startsWith(E2E_PREFIX)) {\n return true;\n }\n }\n return false;\n }\n\n public constructor(private readonly store: Storage) {\n super();\n }\n\n /**\n * Returns true if this CryptoStore has ever been initialised (ie, it might contain data).\n *\n * Implementation of {@link CryptoStore.containsData}.\n *\n * @internal\n */\n public async containsData(): Promise<boolean> {\n return LocalStorageCryptoStore.exists(this.store);\n }\n\n /**\n * Get data on how much of the libolm to Rust Crypto migration has been done.\n *\n * Implementation of {@link CryptoStore.getMigrationState}.\n *\n * @internal\n */\n public async getMigrationState(): Promise<MigrationState> {\n return getJsonItem(this.store, KEY_END_TO_END_MIGRATION_STATE) ?? MigrationState.NOT_STARTED;\n }\n\n /**\n * Set data on how much of the libolm to Rust Crypto migration has been done.\n *\n * Implementation of {@link CryptoStore.setMigrationState}.\n *\n * @internal\n */\n public async setMigrationState(migrationState: MigrationState): Promise<void> {\n setJsonItem(this.store, KEY_END_TO_END_MIGRATION_STATE, migrationState);\n }\n\n // Olm Sessions\n\n public countEndToEndSessions(txn: unknown, func: (count: number) => void): void {\n let count = 0;\n for (let i = 0; i < this.store.length; ++i) {\n const key = this.store.key(i);\n if (key?.startsWith(keyEndToEndSessions(\"\"))) {\n const sessions = getJsonItem(this.store, key);\n count += Object.keys(sessions ?? {}).length;\n }\n }\n func(count);\n }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private _getEndToEndSessions(deviceKey: string): Record<string, ISessionInfo> {\n const sessions = getJsonItem(this.store, keyEndToEndSessions(deviceKey));\n const fixedSessions: Record<string, ISessionInfo> = {};\n\n // fix up any old sessions to be objects rather than just the base64 pickle\n for (const [sid, val] of Object.entries(sessions || {})) {\n if (typeof val === \"string\") {\n fixedSessions[sid] = {\n session: val,\n };\n } else {\n fixedSessions[sid] = val;\n }\n }\n\n return fixedSessions;\n }\n\n public getEndToEndSession(\n deviceKey: string,\n sessionId: string,\n txn: unknown,\n func: (session: ISessionInfo) => void,\n ): void {\n const sessions = this._getEndToEndSessions(deviceKey);\n func(sessions[sessionId] ?? {});\n }\n\n public getEndToEndSessions(\n deviceKey: string,\n txn: unknown,\n func: (sessions: { [sessionId: string]: ISessionInfo }) => void,\n ): void {\n func(this._getEndToEndSessions(deviceKey) ?? {});\n }\n\n public storeEndToEndSession(deviceKey: string, sessionId: string, sessionInfo: ISessionInfo, txn: unknown): void {\n const sessions = this._getEndToEndSessions(deviceKey) || {};\n sessions[sessionId] = sessionInfo;\n setJsonItem(this.store, keyEndToEndSessions(deviceKey), sessions);\n }\n\n /**\n * Fetch a batch of Olm sessions from the database.\n *\n * Implementation of {@link CryptoStore.getEndToEndSessionsBatch}.\n *\n * @internal\n */\n public async getEndToEndSessionsBatch(): Promise<null | ISessionInfo[]> {\n const result: ISessionInfo[] = [];\n for (let i = 0; i < this.store.length; ++i) {\n if (this.store.key(i)?.startsWith(keyEndToEndSessions(\"\"))) {\n const deviceKey = this.store.key(i)!.split(\"/\")[1];\n for (const session of Object.values(this._getEndToEndSessions(deviceKey))) {\n result.push(session);\n if (result.length >= SESSION_BATCH_SIZE) {\n return result;\n }\n }\n }\n }\n\n if (result.length === 0) {\n // No sessions left.\n return null;\n }\n\n // There are fewer sessions than the batch size; return the final batch of sessions.\n return result;\n }\n\n /**\n * Delete a batch of Olm sessions from the database.\n *\n * Implementation of {@link CryptoStore.deleteEndToEndSessionsBatch}.\n *\n * @internal\n */\n public async deleteEndToEndSessionsBatch(sessions: { deviceKey: string; sessionId: string }[]): Promise<void> {\n for (const { deviceKey, sessionId } of sessions) {\n const deviceSessions = this._getEndToEndSessions(deviceKey) || {};\n delete deviceSessions[sessionId];\n if (Object.keys(deviceSessions).length === 0) {\n // No more sessions for this device.\n this.store.removeItem(keyEndToEndSessions(deviceKey));\n } else {\n setJsonItem(this.store, keyEndToEndSessions(deviceKey), deviceSessions);\n }\n }\n }\n\n // Inbound Group Sessions\n\n public getEndToEndInboundGroupSession(\n senderCurve25519Key: string,\n sessionId: string,\n txn: unknown,\n func: (groupSession: InboundGroupSessionData | null, groupSessionWithheld: IWithheld | null) => void,\n ): void {\n func(\n getJsonItem(this.store, keyEndToEndInboundGroupSession(senderCurve25519Key, sessionId)),\n getJsonItem(this.store, keyEndToEndInboundGroupSessionWithheld(senderCurve25519Key, sessionId)),\n );\n }\n\n public storeEndToEndInboundGroupSession(\n senderCurve25519Key: string,\n sessionId: string,\n sessionData: InboundGroupSessionData,\n txn: unknown,\n ): void {\n setJsonItem(this.store, keyEndToEndInboundGroupSession(senderCurve25519Key, sessionId), sessionData);\n }\n\n /**\n * Count the number of Megolm sessions in the database.\n *\n * Implementation of {@link CryptoStore.countEndToEndInboundGroupSessions}.\n *\n * @internal\n */\n public async countEndToEndInboundGroupSessions(): Promise<number> {\n let count = 0;\n for (let i = 0; i < this.store.length; ++i) {\n const key = this.store.key(i);\n if (key?.startsWith(KEY_INBOUND_SESSION_PREFIX)) {\n count += 1;\n }\n }\n return count;\n }\n\n /**\n * Fetch a batch of Megolm sessions from the database.\n *\n * Implementation of {@link CryptoStore.getEndToEndInboundGroupSessionsBatch}.\n *\n * @internal\n */\n public async getEndToEndInboundGroupSessionsBatch(): Promise<SessionExtended[] | null> {\n const sessionsNeedingBackup = getJsonItem<string[]>(this.store, KEY_SESSIONS_NEEDING_BACKUP) || {};\n const result: SessionExtended[] = [];\n for (let i = 0; i < this.store.length; ++i) {\n const key = this.store.key(i);\n if (key?.startsWith(KEY_INBOUND_SESSION_PREFIX)) {\n const key2 = key.slice(KEY_INBOUND_SESSION_PREFIX.length);\n\n // we can't use split, as the components we are trying to split out\n // might themselves contain '/' characters. We rely on the\n // senderKey being a (32-byte) curve25519 key, base64-encoded\n // (hence 43 characters long).\n\n result.push({\n senderKey: key2.slice(0, 43),\n sessionId: key2.slice(44),\n sessionData: getJsonItem(this.store, key)!,\n needsBackup: key2 in sessionsNeedingBackup,\n });\n\n if (result.length >= SESSION_BATCH_SIZE) {\n return result;\n }\n }\n }\n\n if (result.length === 0) {\n // No sessions left.\n return null;\n }\n\n // There are fewer sessions than the batch size; return the final batch of sessions.\n return result;\n }\n\n /**\n * Delete a batch of Megolm sessions from the database.\n *\n * Implementation of {@link CryptoStore.deleteEndToEndInboundGroupSessionsBatch}.\n *\n * @internal\n */\n public async deleteEndToEndInboundGroupSessionsBatch(\n sessions: { senderKey: string; sessionId: string }[],\n ): Promise<void> {\n for (const { senderKey, sessionId } of sessions) {\n const k = keyEndToEndInboundGroupSession(senderKey, sessionId);\n this.store.removeItem(k);\n }\n }\n\n public getEndToEndRooms(txn: unknown, func: (rooms: Record<string, IRoomEncryption>) => void): void {\n const result: Record<string, IRoomEncryption> = {};\n const prefix = keyEndToEndRoomsPrefix(\"\");\n\n for (let i = 0; i < this.store.length; ++i) {\n const key = this.store.key(i);\n if (key?.startsWith(prefix)) {\n const roomId = key.slice(prefix.length);\n result[roomId] = getJsonItem(this.store, key)!;\n }\n }\n func(result);\n }\n\n public markSessionsNeedingBackup(sessions: ISession[]): Promise<void> {\n const sessionsNeedingBackup =\n getJsonItem<{\n [senderKeySessionId: string]: boolean;\n }>(this.store, KEY_SESSIONS_NEEDING_BACKUP) || {};\n for (const session of sessions) {\n sessionsNeedingBackup[session.senderKey + \"/\" + session.sessionId] = true;\n }\n setJsonItem(this.store, KEY_SESSIONS_NEEDING_BACKUP, sessionsNeedingBackup);\n return Promise.resolve();\n }\n\n /**\n * Delete all data from this store.\n *\n * @returns Promise which resolves when the store has been cleared.\n */\n public deleteAllData(): Promise<void> {\n this.store.removeItem(KEY_END_TO_END_ACCOUNT);\n return Promise.resolve();\n }\n\n // Olm account\n\n public getAccount(txn: unknown, func: (accountPickle: string | null) => void): void {\n const accountPickle = getJsonItem<string>(this.store, KEY_END_TO_END_ACCOUNT);\n func(accountPickle);\n }\n\n public storeAccount(txn: unknown, accountPickle: string): void {\n setJsonItem(this.store, KEY_END_TO_END_ACCOUNT, accountPickle);\n }\n\n public getCrossSigningKeys(txn: unknown, func: (keys: Record<string, CrossSigningKeyInfo> | null) => void): void {\n const keys = getJsonItem<Record<string, CrossSigningKeyInfo>>(this.store, KEY_CROSS_SIGNING_KEYS);\n func(keys);\n }\n\n public getSecretStorePrivateKey<K extends keyof SecretStorePrivateKeys>(\n txn: unknown,\n func: (key: SecretStorePrivateKeys[K] | null) => void,\n type: K,\n ): void {\n const key = getJsonItem<SecretStorePrivateKeys[K]>(this.store, E2E_PREFIX + `ssss_cache.${type}`);\n func(key);\n }\n\n public storeSecretStorePrivateKey<K extends keyof SecretStorePrivateKeys>(\n txn: unknown,\n type: K,\n key: SecretStorePrivateKeys[K],\n ): void {\n setJsonItem(this.store, E2E_PREFIX + `ssss_cache.${type}`, key);\n }\n\n public doTxn<T>(mode: Mode, stores: Iterable<string>, func: (txn: unknown) => T): Promise<T> {\n return Promise.resolve(func(null));\n }\n}\n\nfunction getJsonItem<T>(store: Storage, key: string): T | null {\n try {\n // if the key is absent, store.getItem() returns null, and\n // JSON.parse(null) === null, so this returns null.\n return JSON.parse(store.getItem(key)!);\n } catch (e) {\n logger.log(\"Error: Failed to get key %s: %s\", key, (<Error>e).message);\n logger.log((<Error>e).stack);\n }\n return null;\n}\n\nfunction setJsonItem<T>(store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CAAC;IACtEjH,MAAM,CAACgH,GAAG,CAASD,CAAC,CAAEG,KAAK,CAAC;EAChC;EACA,OAAO,IAAI;AACf;AAEA,SAAS1E,WAAWA,CAAIlB,KAAc,EAAEI,GAAW,EAAE6B,GAAM,EAAQ;EAC/DjC,KAAK,CAAC6F,OAAO,CAACzF,GAAG,EAAEkF,IAAI,CAACQ,SAAS,CAAC7D,GAAG,CAAC,CAAC;AAC3C","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"localStorage-crypto-store.js","names":[],"sources":["../../../src/crypto/store/localStorage-crypto-store.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 { logger } from \"../../logger.ts\";\nimport { MemoryCryptoStore } from \"./memory-crypto-store.ts\";\nimport {\n type CryptoStore,\n type ISession,\n type SessionExtended,\n type ISessionInfo,\n type IWithheld,\n MigrationState,\n type Mode,\n type SecretStorePrivateKeys,\n SESSION_BATCH_SIZE,\n type InboundGroupSessionData,\n type IRoomEncryption,\n} from \"./base.ts\";\nimport { type CrossSigningKeyInfo } from \"../../crypto-api/index.ts\";\n\n/**\n * Internal module. Partial localStorage backed storage for e2e.\n * This is not a full crypto store, just the in-memory store with\n * some things backed by localStorage. It exists because indexedDB\n * is broken in Firefox private mode or set to, \"will not remember\n * history\".\n */\n\nconst E2E_PREFIX = \"crypto.\";\nconst KEY_END_TO_END_MIGRATION_STATE = E2E_PREFIX + \"migration\";\nconst KEY_END_TO_END_ACCOUNT = E2E_PREFIX + \"account\";\nconst KEY_CROSS_SIGNING_KEYS = E2E_PREFIX + \"cross_signing_keys\";\nconst KEY_INBOUND_SESSION_PREFIX = E2E_PREFIX + \"inboundgroupsessions/\";\nconst KEY_INBOUND_SESSION_WITHHELD_PREFIX = E2E_PREFIX + \"inboundgroupsessions.withheld/\";\nconst KEY_ROOMS_PREFIX = E2E_PREFIX + \"rooms/\";\nconst KEY_SESSIONS_NEEDING_BACKUP = E2E_PREFIX + \"sessionsneedingbackup\";\n\nfunction keyEndToEndSessions(deviceKey: string): string {\n return E2E_PREFIX + \"sessions/\" + deviceKey;\n}\n\nfunction keyEndToEndInboundGroupSession(senderKey: string, sessionId: string): string {\n return KEY_INBOUND_SESSION_PREFIX + senderKey + \"/\" + sessionId;\n}\n\nfunction keyEndToEndInboundGroupSessionWithheld(senderKey: string, sessionId: string): string {\n return KEY_INBOUND_SESSION_WITHHELD_PREFIX + senderKey + \"/\" + sessionId;\n}\n\nfunction keyEndToEndRoomsPrefix(roomId: string): string {\n return KEY_ROOMS_PREFIX + roomId;\n}\n\nexport class LocalStorageCryptoStore extends MemoryCryptoStore implements CryptoStore {\n public static exists(store: Storage): boolean {\n const length = store.length;\n for (let i = 0; i < length; i++) {\n if (store.key(i)?.startsWith(E2E_PREFIX)) {\n return true;\n }\n }\n return false;\n }\n\n public constructor(private readonly store: Storage) {\n super();\n }\n\n /**\n * Returns true if this CryptoStore has ever been initialised (ie, it might contain data).\n *\n * Implementation of {@link CryptoStore.containsData}.\n *\n * @internal\n */\n public async containsData(): Promise<boolean> {\n return LocalStorageCryptoStore.exists(this.store);\n }\n\n /**\n * Get data on how much of the libolm to Rust Crypto migration has been done.\n *\n * Implementation of {@link CryptoStore.getMigrationState}.\n *\n * @internal\n */\n public async getMigrationState(): Promise<MigrationState> {\n return getJsonItem(this.store, KEY_END_TO_END_MIGRATION_STATE) ?? MigrationState.NOT_STARTED;\n }\n\n /**\n * Set data on how much of the libolm to Rust Crypto migration has been done.\n *\n * Implementation of {@link CryptoStore.setMigrationState}.\n *\n * @internal\n */\n public async setMigrationState(migrationState: MigrationState): Promise<void> {\n setJsonItem(this.store, KEY_END_TO_END_MIGRATION_STATE, migrationState);\n }\n\n // Olm Sessions\n\n public countEndToEndSessions(txn: unknown, func: (count: number) => void): void {\n let count = 0;\n for (let i = 0; i < this.store.length; ++i) {\n const key = this.store.key(i);\n if (key?.startsWith(keyEndToEndSessions(\"\"))) {\n const sessions = getJsonItem(this.store, key);\n count += Object.keys(sessions ?? {}).length;\n }\n }\n func(count);\n }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private _getEndToEndSessions(deviceKey: string): Record<string, ISessionInfo> {\n const sessions = getJsonItem(this.store, keyEndToEndSessions(deviceKey));\n const fixedSessions: Record<string, ISessionInfo> = {};\n\n // fix up any old sessions to be objects rather than just the base64 pickle\n for (const [sid, val] of Object.entries(sessions || {})) {\n if (typeof val === \"string\") {\n fixedSessions[sid] = {\n session: val,\n };\n } else {\n fixedSessions[sid] = val;\n }\n }\n\n return fixedSessions;\n }\n\n public getEndToEndSession(\n deviceKey: string,\n sessionId: string,\n txn: unknown,\n func: (session: ISessionInfo) => void,\n ): void {\n const sessions = this._getEndToEndSessions(deviceKey);\n func(sessions[sessionId] ?? {});\n }\n\n public getEndToEndSessions(\n deviceKey: string,\n txn: unknown,\n func: (sessions: { [sessionId: string]: ISessionInfo }) => void,\n ): void {\n func(this._getEndToEndSessions(deviceKey) ?? {});\n }\n\n public storeEndToEndSession(deviceKey: string, sessionId: string, sessionInfo: ISessionInfo, txn: unknown): void {\n const sessions = this._getEndToEndSessions(deviceKey) || {};\n sessions[sessionId] = sessionInfo;\n setJsonItem(this.store, keyEndToEndSessions(deviceKey), sessions);\n }\n\n /**\n * Fetch a batch of Olm sessions from the database.\n *\n * Implementation of {@link CryptoStore.getEndToEndSessionsBatch}.\n *\n * @internal\n */\n public async getEndToEndSessionsBatch(): Promise<null | ISessionInfo[]> {\n const result: ISessionInfo[] = [];\n for (let i = 0; i < this.store.length; ++i) {\n if (this.store.key(i)?.startsWith(keyEndToEndSessions(\"\"))) {\n const deviceKey = this.store.key(i)!.split(\"/\")[1];\n for (const session of Object.values(this._getEndToEndSessions(deviceKey))) {\n result.push(session);\n if (result.length >= SESSION_BATCH_SIZE) {\n return result;\n }\n }\n }\n }\n\n if (result.length === 0) {\n // No sessions left.\n return null;\n }\n\n // There are fewer sessions than the batch size; return the final batch of sessions.\n return result;\n }\n\n /**\n * Delete a batch of Olm sessions from the database.\n *\n * Implementation of {@link CryptoStore.deleteEndToEndSessionsBatch}.\n *\n * @internal\n */\n public async deleteEndToEndSessionsBatch(sessions: { deviceKey: string; sessionId: string }[]): Promise<void> {\n for (const { deviceKey, sessionId } of sessions) {\n const deviceSessions = this._getEndToEndSessions(deviceKey) || {};\n delete deviceSessions[sessionId];\n if (Object.keys(deviceSessions).length === 0) {\n // No more sessions for this device.\n this.store.removeItem(keyEndToEndSessions(deviceKey));\n } else {\n setJsonItem(this.store, keyEndToEndSessions(deviceKey), deviceSessions);\n }\n }\n }\n\n // Inbound Group Sessions\n\n public getEndToEndInboundGroupSession(\n senderCurve25519Key: string,\n sessionId: string,\n txn: unknown,\n func: (groupSession: InboundGroupSessionData | null, groupSessionWithheld: IWithheld | null) => void,\n ): void {\n func(\n getJsonItem(this.store, keyEndToEndInboundGroupSession(senderCurve25519Key, sessionId)),\n getJsonItem(this.store, keyEndToEndInboundGroupSessionWithheld(senderCurve25519Key, sessionId)),\n );\n }\n\n public storeEndToEndInboundGroupSession(\n senderCurve25519Key: string,\n sessionId: string,\n sessionData: InboundGroupSessionData,\n txn: unknown,\n ): void {\n setJsonItem(this.store, keyEndToEndInboundGroupSession(senderCurve25519Key, sessionId), sessionData);\n }\n\n /**\n * Count the number of Megolm sessions in the database.\n *\n * Implementation of {@link CryptoStore.countEndToEndInboundGroupSessions}.\n *\n * @internal\n */\n public async countEndToEndInboundGroupSessions(): Promise<number> {\n let count = 0;\n for (let i = 0; i < this.store.length; ++i) {\n const key = this.store.key(i);\n if (key?.startsWith(KEY_INBOUND_SESSION_PREFIX)) {\n count += 1;\n }\n }\n return count;\n }\n\n /**\n * Fetch a batch of Megolm sessions from the database.\n *\n * Implementation of {@link CryptoStore.getEndToEndInboundGroupSessionsBatch}.\n *\n * @internal\n */\n public async getEndToEndInboundGroupSessionsBatch(): Promise<SessionExtended[] | null> {\n const sessionsNeedingBackup = getJsonItem<string[]>(this.store, KEY_SESSIONS_NEEDING_BACKUP) || {};\n const result: SessionExtended[] = [];\n for (let i = 0; i < this.store.length; ++i) {\n const key = this.store.key(i);\n if (key?.startsWith(KEY_INBOUND_SESSION_PREFIX)) {\n const key2 = key.slice(KEY_INBOUND_SESSION_PREFIX.length);\n\n // we can't use split, as the components we are trying to split out\n // might themselves contain '/' characters. We rely on the\n // senderKey being a (32-byte) curve25519 key, base64-encoded\n // (hence 43 characters long).\n\n result.push({\n senderKey: key2.slice(0, 43),\n sessionId: key2.slice(44),\n sessionData: getJsonItem(this.store, key)!,\n needsBackup: key2 in sessionsNeedingBackup,\n });\n\n if (result.length >= SESSION_BATCH_SIZE) {\n return result;\n }\n }\n }\n\n if (result.length === 0) {\n // No sessions left.\n return null;\n }\n\n // There are fewer sessions than the batch size; return the final batch of sessions.\n return result;\n }\n\n /**\n * Delete a batch of Megolm sessions from the database.\n *\n * Implementation of {@link CryptoStore.deleteEndToEndInboundGroupSessionsBatch}.\n *\n * @internal\n */\n public async deleteEndToEndInboundGroupSessionsBatch(\n sessions: { senderKey: string; sessionId: string }[],\n ): Promise<void> {\n for (const { senderKey, sessionId } of sessions) {\n const k = keyEndToEndInboundGroupSession(senderKey, sessionId);\n this.store.removeItem(k);\n }\n }\n\n public getEndToEndRooms(txn: unknown, func: (rooms: Record<string, IRoomEncryption>) => void): void {\n const result: Record<string, IRoomEncryption> = {};\n const prefix = keyEndToEndRoomsPrefix(\"\");\n\n for (let i = 0; i < this.store.length; ++i) {\n const key = this.store.key(i);\n if (key?.startsWith(prefix)) {\n const roomId = key.slice(prefix.length);\n result[roomId] = getJsonItem(this.store, key)!;\n }\n }\n func(result);\n }\n\n public markSessionsNeedingBackup(sessions: ISession[]): Promise<void> {\n const sessionsNeedingBackup =\n getJsonItem<{\n [senderKeySessionId: string]: boolean;\n }>(this.store, KEY_SESSIONS_NEEDING_BACKUP) || {};\n for (const session of sessions) {\n sessionsNeedingBackup[session.senderKey + \"/\" + session.sessionId] = true;\n }\n setJsonItem(this.store, KEY_SESSIONS_NEEDING_BACKUP, sessionsNeedingBackup);\n return Promise.resolve();\n }\n\n /**\n * Delete all data from this store.\n *\n * @returns Promise which resolves when the store has been cleared.\n */\n public deleteAllData(): Promise<void> {\n this.store.removeItem(KEY_END_TO_END_ACCOUNT);\n return Promise.resolve();\n }\n\n // Olm account\n\n public getAccount(txn: unknown, func: (accountPickle: string | null) => void): void {\n const accountPickle = getJsonItem<string>(this.store, KEY_END_TO_END_ACCOUNT);\n func(accountPickle);\n }\n\n public storeAccount(txn: unknown, accountPickle: string): void {\n setJsonItem(this.store, KEY_END_TO_END_ACCOUNT, accountPickle);\n }\n\n public getCrossSigningKeys(txn: unknown, func: (keys: Record<string, CrossSigningKeyInfo> | null) => void): void {\n const keys = getJsonItem<Record<string, CrossSigningKeyInfo>>(this.store, KEY_CROSS_SIGNING_KEYS);\n func(keys);\n }\n\n public getSecretStorePrivateKey<K extends keyof SecretStorePrivateKeys>(\n txn: unknown,\n func: (key: SecretStorePrivateKeys[K] | null) => void,\n type: K,\n ): void {\n const key = getJsonItem<SecretStorePrivateKeys[K]>(this.store, E2E_PREFIX + `ssss_cache.${type}`);\n func(key);\n }\n\n public storeSecretStorePrivateKey<K extends keyof SecretStorePrivateKeys>(\n txn: unknown,\n type: K,\n key: SecretStorePrivateKeys[K],\n ): void {\n setJsonItem(this.store, E2E_PREFIX + `ssss_cache.${type}`, key);\n }\n\n public doTxn<T>(mode: Mode, stores: Iterable<string>, func: (txn: unknown) => T): Promise<T> {\n return Promise.resolve(func(null));\n }\n}\n\nfunction getJsonItem<T>(store: Storage, key: string): T | null {\n try {\n // if the key is absent, store.getItem() returns null, and\n // JSON.parse(null) === null, so this returns null.\n return JSON.parse(store.getItem(key)!);\n } catch (e) {\n logger.log(\"Error: Failed to get key %s: %s\", key, (<Error>e).message);\n logger.log((<Error>e).stack);\n }\n return null;\n}\n\nfunction setJsonItem<T>(store: Storage, key: string, val: T): void {\n store.setItem(key, JSON.stringify(val));\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,MAAM,QAAQ,iBAAiB;AACxC,SAAS,iBAAiB,QAAQ,0BAA0B;AAC5D,SAMI,cAAc,EAGd,kBAAkB,QAGf,WAAW;AAGlB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,UAAU,GAAG,SAAS;AAC5B,MAAM,8BAA8B,GAAG,UAAU,GAAG,WAAW;AAC/D,MAAM,sBAAsB,GAAG,UAAU,GAAG,SAAS;AACrD,MAAM,sBAAsB,GAAG,UAAU,GAAG,oBAAoB;AAChE,MAAM,0BAA0B,GAAG,UAAU,GAAG,uBAAuB;AACvE,MAAM,mCAAmC,GAAG,UAAU,GAAG,gCAAgC;AACzF,MAAM,gBAAgB,GAAG,UAAU,GAAG,QAAQ;AAC9C,MAAM,2BAA2B,GAAG,UAAU,GAAG,uBAAuB;AAExE,SAAS,mBAAmB,CAAC,SAAiB,EAAU;EACpD,OAAO,UAAU,GAAG,WAAW,GAAG,SAAS;AAC/C;AAEA,SAAS,8BAA8B,CAAC,SAAiB,EAAE,SAAiB,EAAU;EAClF,OAAO,0BAA0B,GAAG,SAAS,GAAG,GAAG,GAAG,SAAS;AACnE;AAEA,SAAS,sCAAsC,CAAC,SAAiB,EAAE,SAAiB,EAAU;EAC1F,OAAO,mCAAmC,GAAG,SAAS,GAAG,GAAG,GAAG,SAAS;AAC5E;AAEA,SAAS,sBAAsB,CAAC,MAAc,EAAU;EACpD,OAAO,gBAAgB,GAAG,MAAM;AACpC;AAEA,OAAO,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