summaryrefslogtreecommitdiff
path: root/includes/external/matrix/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js.map
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-04-24 14:03:36 +0200
committerRaindropsSys <contact@minteck.org>2023-04-24 14:03:36 +0200
commit633c92eae865e957121e08de634aeee11a8b3992 (patch)
tree09d881bee1dae0b6eee49db1dfaf0f500240606c /includes/external/matrix/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js.map
parentc4657e4509733699c0f26a3c900bab47e915d5a0 (diff)
downloadpluralconnect-633c92eae865e957121e08de634aeee11a8b3992.tar.gz
pluralconnect-633c92eae865e957121e08de634aeee11a8b3992.tar.bz2
pluralconnect-633c92eae865e957121e08de634aeee11a8b3992.zip
Updated 18 files, added 1692 files and deleted includes/system/compare.inc (automated)
Diffstat (limited to 'includes/external/matrix/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js.map')
-rw-r--r--includes/external/matrix/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js.map1
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/external/matrix/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js.map b/includes/external/matrix/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js.map
new file mode 100644
index 0000000..33a8ca1
--- /dev/null
+++ b/includes/external/matrix/node_modules/matrix-js-sdk/lib/indexeddb-helpers.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"indexeddb-helpers.js","names":["exists","indexedDB","dbName","Promise","resolve","reject","req","open","onupgradeneeded","onblocked","error","onsuccess","db","result","close","deleteDatabase","onerror"],"sources":["../src/indexeddb-helpers.ts"],"sourcesContent":["/*\nCopyright 2019 New Vector Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n/**\n * Check if an IndexedDB database exists. The only way to do so is to try opening it, so\n * we do that and then delete it did not exist before.\n *\n * @param indexedDB - The `indexedDB` interface\n * @param dbName - The database name to test for\n * @returns Whether the database exists\n */\nexport function exists(indexedDB: IDBFactory, dbName: string): Promise<boolean> {\n return new Promise<boolean>((resolve, reject) => {\n let exists = true;\n const req = indexedDB.open(dbName);\n req.onupgradeneeded = (): void => {\n // Since we did not provide an explicit version when opening, this event\n // should only fire if the DB did not exist before at any version.\n exists = false;\n };\n req.onblocked = (): void => reject(req.error);\n req.onsuccess = (): void => {\n const db = req.result;\n db.close();\n if (!exists) {\n // The DB did not exist before, but has been created as part of this\n // existence check. Delete it now to restore previous state. Delete can\n // actually take a while to complete in some browsers, so don't wait for\n // it. This won't block future open calls that a store might issue next to\n // properly set up the DB.\n indexedDB.deleteDatabase(dbName);\n }\n resolve(exists);\n };\n req.onerror = (): void => reject(req.error);\n });\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,MAAMA,CAACC,SAAqB,EAAEC,MAAc,EAAoB;EAC5E,OAAO,IAAIC,OAAO,CAAU,CAACC,OAAO,EAAEC,MAAM,KAAK;IAC7C,IAAIL,MAAM,GAAG,IAAI;IACjB,MAAMM,GAAG,GAAGL,SAAS,CAACM,IAAI,CAACL,MAAM,CAAC;IAClCI,GAAG,CAACE,eAAe,GAAG,MAAY;MAC9B;MACA;MACAR,MAAM,GAAG,KAAK;IAClB,CAAC;IACDM,GAAG,CAACG,SAAS,GAAG,MAAYJ,MAAM,CAACC,GAAG,CAACI,KAAK,CAAC;IAC7CJ,GAAG,CAACK,SAAS,GAAG,MAAY;MACxB,MAAMC,EAAE,GAAGN,GAAG,CAACO,MAAM;MACrBD,EAAE,CAACE,KAAK,EAAE;MACV,IAAI,CAACd,MAAM,EAAE;QACT;QACA;QACA;QACA;QACA;QACAC,SAAS,CAACc,cAAc,CAACb,MAAM,CAAC;MACpC;MACAE,OAAO,CAACJ,MAAM,CAAC;IACnB,CAAC;IACDM,GAAG,CAACU,OAAO,GAAG,MAAYX,MAAM,CAACC,GAAG,CAACI,KAAK,CAAC;EAC/C,CAAC,CAAC;AACN"} \ No newline at end of file