e.onsuccess=function(){t()},e.onerror=function(e){t(e)}}catch(n){t(n)}},e.prototype.get=function(t,e){try{varn=this.objectStore.get(t);n.onsuccess=function(t){varn=t.target.result;e(null,n)},n.onerror=function(t){e(t)}}catch(r){e(r)}},e.prototype.put=function(t,e,n){try{varr=this.objectStore.put(e,t);r.onsuccess=function(t){vare=t.target.result;n(null,e)},r.onerror=function(t){n(t)}}catch(i){n(i)}},e.prototype.delete=function(t,e){try{varn=this.objectStore.delete(t);n.onsuccess=function(t){varn=t.target.result;e(null,n)},n.onerror=function(t){e(t)}}catch(r){e(r)}},n.isSupported=function(){return!!o},n.prototype.open=function(t){vare=this;if(e.db)returnt(null,!1),void0;varn=!1,r=o.open(e.name);r.onupgradeneeded=function(t){vare=t.target.result;e.objectStoreNames.contains(i)&&e.deleteObjectStore(i),e.createObjectStore(i),n=!0},r.onsuccess=function(r){e.db=r.target.result,t(null,n)},r.onerror=function(e){t(e)}},n.prototype.getReadOnlyContext=function(){returnnewe(this.db,a)},n.prototype.getReadWriteContext=function(){returnnewe(this.db,s)},n}),n("src/providers/websql",["require","../constants","../constants","../constants","../constants","../constants"],function(t){functione(t,e){varn=this;this.getTransaction=function(r){returnn.transaction?(r(n.transaction),void0):(t[e?"readTransaction":"transaction"](function(t){n.transaction=t,r(t)}),void0)}}functionn(t){this.name=t||r,this.db=null}varr=t("../constants").FILE_SYSTEM_NAME,i=t("../constants").FILE_STORE_NAME,o=t("../constants").WSQL_VERSION,s=t("../constants").WSQL_SIZE,a=t("../constants").WSQL_DESC;returne.prototype.clear=function(t){functione(e,n){t(n)}functionn(){t(null)}this.getTransaction(function(t){t.executeSql("DELETE FROM "+i,[],n,e)})},e.prototype.get=function(t,e){functionn(t,n){varr=0===n.rows.length?null:n.rows.item(0).data;e(null,r)}functionr(t,n){e(n)}this.getTransaction(function(e){e.executeSql("SELECT data FROM "+i+" WHERE id = ?",[t],n,r)})},e.prototype.put=function(t,e,n){functionr(){n(null)}functiono(t,e){n(e)}this.getTransaction(function(n){n.executeSql("INSERT OR REPLACE INTO "+i+" (id, data) VALUES (?, ?)",[t,e],r,o)})},e.prototype.delete=function(t,e){functionn(){e(null)}functionr(t,n){e(n)}this.getTransaction(function(e){e.executeSql("DELETE FROM "+i+" WHERE id = ?",[t],n,r)})},n.isSupported=function(){return!!window.openDatabase},n.prototype.open=function(t){functione(e,n){t(n)}functionn(e){functionn(e,n){varr=0===n.rows.item(0).count;t(null,r)}functiono(e,n){t(n)}r.db=u,e.executeSql("SELECT COUNT(id) AS count FROM "+i+";",[],n,o)}varr=this;if(r.db)returnt(null,!1),void0;varu=window.openDatabase(r.name,o,a,s);returnu?(u.transaction(function(t){t.executeSql("CREATE TABLE IF NOT EXISTS "+i+" (id unique, data)",[],n,e)}),void0):(t("[WebSQL] Unable to open database."),void0)},n.prototype.getReadOnlyContext=function(){returnnewe(this.db,!0)},n.prototype.getReadWriteContext=function(){returnnewe(this.db,!1)},n}),n("src/providers/memory",["require","../constants"],function(t){functione(t,e){this.readOnly=e,this.objectStore=t}functionn(t){this.name=t||r,this.db={}}varr=t("../constants").FILE_SYSTEM_NAME;returne.prototype.clear=function(t){if(this.readOnly)returnt("[MemoryContext] Error: write operation on read only context");vare=this.objectStore;Object.keys(e).forEach(function(t){deletee[t]}),t(null)},e.prototype.get=function(t,e){e(null,this.objectStore[t])},e.prototype.put=function(t,e,n){returnthis.readOnly?n("[MemoryContext] Error: write operation on read only context"):(this.objectStore[t]=e,n(null),void0)},e.prototype.delete=function(t,e){returnthis.readOnly?e("[MemoryContext] Error: write operation on read only context"):(deletethis.objectStore[t],e(null),void0)},n.isSupported=function(){return!0},n.prototype.open=function(t){t(null,!0)},n.prototype.getReadOnlyContext=function(){returnnewe(this.db,!0)},n.prototype.getReadWriteContext=function(){returnnewe(this.db,!1)},n}),n("src/providers/providers",["require","./indexeddb","./websql","./memory"],function(t){vare=t("./indexeddb"),n=