0d012ebea1
This reverts commit6b3842cf50
, reversing changes made to6b1282a829
.
1 line
No EOL
239 KiB
Text
1 line
No EOL
239 KiB
Text
{"version":3,"sources":["webpack:///sw.js","webpack:///webpack/bootstrap 6bafe90012b3388a3304","webpack:///./src/sw.js","webpack:///./~/localforage/dist/localforage.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","isEnabled","localForage","getItem","then","data","config","webPushNotifications","getWindowClients","clients","matchAll","includeUncontrolled","clientList","filter","_ref","type","_localforage","_localforage2","self","addEventListener","event","waitUntil","list","json","length","registration","showNotification","title","notification","close","i","client","url","focus","openWindow","f","define","amd","g","window","global","this","localforage","e","t","n","r","s","o","u","a","require","Error","code","l","1","_dereq_","nextTick","draining","oldQueue","len","queue","immediate","task","push","scheduleDrain","Mutation","MutationObserver","WebKitMutationObserver","called","observer","element","document","createTextNode","observe","characterData","setImmediate","MessageChannel","createElement","scriptEl","onreadystatechange","parentNode","removeChild","documentElement","appendChild","setTimeout","channel","port1","onmessage","port2","postMessage","2","INTERNAL","Promise","resolver","TypeError","state","PENDING","outcome","safelyResolveThenable","QueueItem","promise","onFulfilled","onRejected","callFulfilled","otherCallFulfilled","callRejected","otherCallRejected","unwrap","func","value","returnValue","handlers","reject","resolve","getThen","apply","arguments","thenable","onError","onSuccess","tryToUnwrap","result","tryCatch","status","out","reason","all","iterable","allResolver","resolveFromAll","outValue","values","resolved","error","Object","prototype","toString","Array","race","response","REJECTED","FULFILLED","constructor","3","4","_classCallCheck","instance","Constructor","getIDB","indexedDB","webkitIndexedDB","mozIndexedDB","OIndexedDB","msIndexedDB","isIndexedDBValid","idb","isSafari","openDatabase","test","navigator","userAgent","platform","hasFetch","fetch","indexOf","IDBKeyRange","createBlob","parts","properties","Blob","name","Builder","BlobBuilder","MSBlobBuilder","MozBlobBuilder","WebKitBlobBuilder","builder","append","getBlob","executeCallback","callback","executeTwoCallbacks","errorCallback","normalizeKey","key","console","warn","String","getCallback","_binStringToArrayBuffer","bin","buf","ArrayBuffer","arr","Uint8Array","charCodeAt","_checkBlobSupportWithoutCaching","Promise$1","txn","transaction","DETECT_BLOB_SUPPORT_STORE","READ_WRITE","blob","objectStore","put","onabort","preventDefault","stopPropagation","oncomplete","matchedChrome","match","matchedEdge","parseInt","_checkBlobSupport","supportsBlobs","_deferReadiness","dbInfo","dbContext","dbContexts","deferredOperation","deferredOperations","dbReady","_advanceReadiness","pop","_rejectReadiness","err","_getConnection","upgradeNeeded","createDbContext","db","dbArgs","version","openreq","open","onupgradeneeded","createObjectStore","storeName","oldVersion","ex","newVersion","onerror","onsuccess","_getOriginalConnection","_getUpgradedConnection","_isUpgradeNeeded","defaultVersion","isNewStore","objectStoreNames","contains","isDowngrade","isUpgrade","incVersion","_encodeBlob","reader","FileReader","onloadend","base64","btoa","target","__local_forage_encoded_blob","readAsBinaryString","_decodeBlob","encodedBlob","arrayBuff","atob","_isEncodedBlob","_fullyReady","_initReady","_dbInfo","_tryReconnect","forages","forage","createTransaction","mode","retries","undefined","tx","_initStorage","options","ignoreErrors","ready","initPromises","j","slice","_defaultConfig","k","READ_ONLY","store","req","get","iterate","iterator","openCursor","iterationNumber","cursor","setItem","blobSupport","removeItem","clear","count","advanced","advance","keys","dropInstance","currentConfig","isCurrentDb","dbPromise","dropObjectPromise","deleteObjectStore","_forage2","dropDBPromise","deleteDatabase","onblocked","_forage","isWebSQLValid","stringToBuffer","serializedString","encoded1","encoded2","encoded3","encoded4","bufferLength","buffer","bytes","BASE_CHARS","bufferToString","base64String","substring","serialize","valueType","toString$1","marker","SERIALIZED_MARKER","TYPE_ARRAYBUFFER","TYPE_INT8ARRAY","TYPE_UINT8ARRAY","TYPE_UINT8CLAMPEDARRAY","TYPE_INT16ARRAY","TYPE_UINT16ARRAY","TYPE_INT32ARRAY","TYPE_UINT32ARRAY","TYPE_FLOAT32ARRAY","TYPE_FLOAT64ARRAY","fileReader","onload","str","BLOB_TYPE_PREFIX","TYPE_BLOB","readAsArrayBuffer","JSON","stringify","deserialize","SERIALIZED_MARKER_LENGTH","parse","blobType","TYPE_SERIALIZED_MARKER_LENGTH","BLOB_TYPE_PREFIX_REGEX","matcher","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","createDbTable","executeSql","_initStorage$1","dbInfoPromise","description","size","serializer","localforageSerializer","tryExecuteSql","sqlStatement","args","SYNTAX_ERR","results","rows","getItem$1","item","iterate$1","_setItem","retriesLeft","originalValue","sqlError","QUOTA_ERR","setItem$1","removeItem$1","clear$1","length$1","key$1","keys$1","getAllStoreNames","storeNames","dropInstance$1","operationInfo","dropTable","operations","isLocalStorageValid","localStorage","_getKeyPrefix","defaultConfig","keyPrefix","checkIfLocalStorageThrows","localStorageTestKey","_isLocalStorageUsable","_initStorage$2","clear$2","getItem$2","iterate$2","keyPrefixLength","key$2","keys$2","itemKey","length$2","removeItem$2","setItem$2","dropInstance$2","callWhenReady","localForageInstance","libraryMethod","_args","extend","arg","_key","hasOwnProperty","isArray","_typeof","Symbol","asyncStorage","_driver","_support","webSQLStorage","localStorageWrapper","sameValue","x","y","isNaN","includes","array","searchElement","DefinedDrivers","DriverSupport","DefaultDrivers","INDEXEDDB","WEBSQL","LOCALSTORAGE","DefaultDriverOrder","OptionalDriverMethods","LibraryMethods","concat","DefaultConfig","driver","LocalForage","driverTypeKey","driverName","defineDriver","_config","_driverSet","_initDriver","_ready","_wrapLibraryMethodsWithReady","setDriver","replace","driverObject","complianceError","driverMethods","driverMethodName","isRequired","configureMissingMethods","methodNotImplementedFactory","methodName","_i","_len","optionalDriverMethod","setDriverSupport","support","info","getDriver","getDriverPromise","getSerializer","serializerPromise","drivers","setDriverToConfig","extendSelfWithDriver","_extend","initDriver","supportedDrivers","driverPromiseLoop","currentDriverIndex","_getSupportedDrivers","oldDriverSetDone","supports","libraryMethodsAndProperties","createInstance","localforage_js"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAA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U,UAAAyW,eAAA,SAAA1N,GACA,UAAAiL,GAAAjL,IAGAiL,KAOA0C,GAAA,GAAA1C,GAEAld,GAAAD,QAAA6f,KAEGlW,EAAA,SAAW","file":"sw.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _localforage = __webpack_require__(1);\n\t\n\tvar _localforage2 = _interopRequireDefault(_localforage);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction isEnabled() {\n\t return _localforage2.default.getItem('vuex-lz').then(function (data) {\n\t return data.config.webPushNotifications;\n\t });\n\t}\n\t\n\tfunction getWindowClients() {\n\t return clients.matchAll({ includeUncontrolled: true }).then(function (clientList) {\n\t return clientList.filter(function (_ref) {\n\t var type = _ref.type;\n\t return type === 'window';\n\t });\n\t });\n\t}\n\t\n\tself.addEventListener('push', function (event) {\n\t if (event.data) {\n\t event.waitUntil(isEnabled().then(function (isEnabled) {\n\t return isEnabled && getWindowClients().then(function (list) {\n\t var data = event.data.json();\n\t\n\t if (list.length === 0) return self.registration.showNotification(data.title, data);\n\t });\n\t }));\n\t }\n\t});\n\t\n\tself.addEventListener('notificationclick', function (event) {\n\t event.notification.close();\n\t\n\t event.waitUntil(getWindowClients().then(function (list) {\n\t for (var i = 0; i < list.length; i++) {\n\t var client = list[i];\n\t if (client.url === '/' && 'focus' in client) {\n\t return client.focus();\n\t }\n\t }\n\t\n\t if (clients.openWindow) return clients.openWindow('/');\n\t }));\n\t});\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\n\t/*!\n\t localForage -- Offline Storage, Improved\n\t Version 1.7.3\n\t https://localforage.github.io/localForage\n\t (c) 2013-2017 Mozilla, Apache License 2.0\n\t*/\n\t(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw (f.code=\"MODULE_NOT_FOUND\", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){\n\t(function (global){\n\t'use strict';\n\tvar Mutation = global.MutationObserver || global.WebKitMutationObserver;\n\t\n\tvar scheduleDrain;\n\t\n\t{\n\t if (Mutation) {\n\t var called = 0;\n\t var observer = new Mutation(nextTick);\n\t var element = global.document.createTextNode('');\n\t observer.observe(element, {\n\t characterData: true\n\t });\n\t scheduleDrain = function () {\n\t element.data = (called = ++called % 2);\n\t };\n\t } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {\n\t var channel = new global.MessageChannel();\n\t channel.port1.onmessage = nextTick;\n\t scheduleDrain = function () {\n\t channel.port2.postMessage(0);\n\t };\n\t } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {\n\t scheduleDrain = function () {\n\t\n\t // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n\t // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n\t var scriptEl = global.document.createElement('script');\n\t scriptEl.onreadystatechange = function () {\n\t nextTick();\n\t\n\t scriptEl.onreadystatechange = null;\n\t scriptEl.parentNode.removeChild(scriptEl);\n\t scriptEl = null;\n\t };\n\t global.document.documentElement.appendChild(scriptEl);\n\t };\n\t } else {\n\t scheduleDrain = function () {\n\t setTimeout(nextTick, 0);\n\t };\n\t }\n\t}\n\t\n\tvar draining;\n\tvar queue = [];\n\t//named nextTick for less confusing stack traces\n\tfunction nextTick() {\n\t draining = true;\n\t var i, oldQueue;\n\t var len = queue.length;\n\t while (len) {\n\t oldQueue = queue;\n\t queue = [];\n\t i = -1;\n\t while (++i < len) {\n\t oldQueue[i]();\n\t }\n\t len = queue.length;\n\t }\n\t draining = false;\n\t}\n\t\n\tmodule.exports = immediate;\n\tfunction immediate(task) {\n\t if (queue.push(task) === 1 && !draining) {\n\t scheduleDrain();\n\t }\n\t}\n\t\n\t}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\t},{}],2:[function(_dereq_,module,exports){\n\t'use strict';\n\tvar immediate = _dereq_(1);\n\t\n\t/* istanbul ignore next */\n\tfunction INTERNAL() {}\n\t\n\tvar handlers = {};\n\t\n\tvar REJECTED = ['REJECTED'];\n\tvar FULFILLED = ['FULFILLED'];\n\tvar PENDING = ['PENDING'];\n\t\n\tmodule.exports = Promise;\n\t\n\tfunction Promise(resolver) {\n\t if (typeof resolver !== 'function') {\n\t throw new TypeError('resolver must be a function');\n\t }\n\t this.state = PENDING;\n\t this.queue = [];\n\t this.outcome = void 0;\n\t if (resolver !== INTERNAL) {\n\t safelyResolveThenable(this, resolver);\n\t }\n\t}\n\t\n\tPromise.prototype[\"catch\"] = function (onRejected) {\n\t return this.then(null, onRejected);\n\t};\n\tPromise.prototype.then = function (onFulfilled, onRejected) {\n\t if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n\t typeof onRejected !== 'function' && this.state === REJECTED) {\n\t return this;\n\t }\n\t var promise = new this.constructor(INTERNAL);\n\t if (this.state !== PENDING) {\n\t var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n\t unwrap(promise, resolver, this.outcome);\n\t } else {\n\t this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n\t }\n\t\n\t return promise;\n\t};\n\tfunction QueueItem(promise, onFulfilled, onRejected) {\n\t this.promise = promise;\n\t if (typeof onFulfilled === 'function') {\n\t this.onFulfilled = onFulfilled;\n\t this.callFulfilled = this.otherCallFulfilled;\n\t }\n\t if (typeof onRejected === 'function') {\n\t this.onRejected = onRejected;\n\t this.callRejected = this.otherCallRejected;\n\t }\n\t}\n\tQueueItem.prototype.callFulfilled = function (value) {\n\t handlers.resolve(this.promise, value);\n\t};\n\tQueueItem.prototype.otherCallFulfilled = function (value) {\n\t unwrap(this.promise, this.onFulfilled, value);\n\t};\n\tQueueItem.prototype.callRejected = function (value) {\n\t handlers.reject(this.promise, value);\n\t};\n\tQueueItem.prototype.otherCallRejected = function (value) {\n\t unwrap(this.promise, this.onRejected, value);\n\t};\n\t\n\tfunction unwrap(promise, func, value) {\n\t immediate(function () {\n\t var returnValue;\n\t try {\n\t returnValue = func(value);\n\t } catch (e) {\n\t return handlers.reject(promise, e);\n\t }\n\t if (returnValue === promise) {\n\t handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n\t } else {\n\t handlers.resolve(promise, returnValue);\n\t }\n\t });\n\t}\n\t\n\thandlers.resolve = function (self, value) {\n\t var result = tryCatch(getThen, value);\n\t if (result.status === 'error') {\n\t return handlers.reject(self, result.value);\n\t }\n\t var thenable = result.value;\n\t\n\t if (thenable) {\n\t safelyResolveThenable(self, thenable);\n\t } else {\n\t self.state = FULFILLED;\n\t self.outcome = value;\n\t var i = -1;\n\t var len = self.queue.length;\n\t while (++i < len) {\n\t self.queue[i].callFulfilled(value);\n\t }\n\t }\n\t return self;\n\t};\n\thandlers.reject = function (self, error) {\n\t self.state = REJECTED;\n\t self.outcome = error;\n\t var i = -1;\n\t var len = self.queue.length;\n\t while (++i < len) {\n\t self.queue[i].callRejected(error);\n\t }\n\t return self;\n\t};\n\t\n\tfunction getThen(obj) {\n\t // Make sure we only access the accessor once as required by the spec\n\t var then = obj && obj.then;\n\t if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n\t return function appyThen() {\n\t then.apply(obj, arguments);\n\t };\n\t }\n\t}\n\t\n\tfunction safelyResolveThenable(self, thenable) {\n\t // Either fulfill, reject or reject with error\n\t var called = false;\n\t function onError(value) {\n\t if (called) {\n\t return;\n\t }\n\t called = true;\n\t handlers.reject(self, value);\n\t }\n\t\n\t function onSuccess(value) {\n\t if (called) {\n\t return;\n\t }\n\t called = true;\n\t handlers.resolve(self, value);\n\t }\n\t\n\t function tryToUnwrap() {\n\t thenable(onSuccess, onError);\n\t }\n\t\n\t var result = tryCatch(tryToUnwrap);\n\t if (result.status === 'error') {\n\t onError(result.value);\n\t }\n\t}\n\t\n\tfunction tryCatch(func, value) {\n\t var out = {};\n\t try {\n\t out.value = func(value);\n\t out.status = 'success';\n\t } catch (e) {\n\t out.status = 'error';\n\t out.value = e;\n\t }\n\t return out;\n\t}\n\t\n\tPromise.resolve = resolve;\n\tfunction resolve(value) {\n\t if (value instanceof this) {\n\t return value;\n\t }\n\t return handlers.resolve(new this(INTERNAL), value);\n\t}\n\t\n\tPromise.reject = reject;\n\tfunction reject(reason) {\n\t var promise = new this(INTERNAL);\n\t return handlers.reject(promise, reason);\n\t}\n\t\n\tPromise.all = all;\n\tfunction all(iterable) {\n\t var self = this;\n\t if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n\t return this.reject(new TypeError('must be an array'));\n\t }\n\t\n\t var len = iterable.length;\n\t var called = false;\n\t if (!len) {\n\t return this.resolve([]);\n\t }\n\t\n\t var values = new Array(len);\n\t var resolved = 0;\n\t var i = -1;\n\t var promise = new this(INTERNAL);\n\t\n\t while (++i < len) {\n\t allResolver(iterable[i], i);\n\t }\n\t return promise;\n\t function allResolver(value, i) {\n\t self.resolve(value).then(resolveFromAll, function (error) {\n\t if (!called) {\n\t called = true;\n\t handlers.reject(promise, error);\n\t }\n\t });\n\t function resolveFromAll(outValue) {\n\t values[i] = outValue;\n\t if (++resolved === len && !called) {\n\t called = true;\n\t handlers.resolve(promise, values);\n\t }\n\t }\n\t }\n\t}\n\t\n\tPromise.race = race;\n\tfunction race(iterable) {\n\t var self = this;\n\t if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n\t return this.reject(new TypeError('must be an array'));\n\t }\n\t\n\t var len = iterable.length;\n\t var called = false;\n\t if (!len) {\n\t return this.resolve([]);\n\t }\n\t\n\t var i = -1;\n\t var promise = new this(INTERNAL);\n\t\n\t while (++i < len) {\n\t resolver(iterable[i]);\n\t }\n\t return promise;\n\t function resolver(value) {\n\t self.resolve(value).then(function (response) {\n\t if (!called) {\n\t called = true;\n\t handlers.resolve(promise, response);\n\t }\n\t }, function (error) {\n\t if (!called) {\n\t called = true;\n\t handlers.reject(promise, error);\n\t }\n\t });\n\t }\n\t}\n\t\n\t},{\"1\":1}],3:[function(_dereq_,module,exports){\n\t(function (global){\n\t'use strict';\n\tif (typeof global.Promise !== 'function') {\n\t global.Promise = _dereq_(2);\n\t}\n\t\n\t}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\t},{\"2\":2}],4:[function(_dereq_,module,exports){\n\t'use strict';\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction getIDB() {\n\t /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */\n\t try {\n\t if (typeof indexedDB !== 'undefined') {\n\t return indexedDB;\n\t }\n\t if (typeof webkitIndexedDB !== 'undefined') {\n\t return webkitIndexedDB;\n\t }\n\t if (typeof mozIndexedDB !== 'undefined') {\n\t return mozIndexedDB;\n\t }\n\t if (typeof OIndexedDB !== 'undefined') {\n\t return OIndexedDB;\n\t }\n\t if (typeof msIndexedDB !== 'undefined') {\n\t return msIndexedDB;\n\t }\n\t } catch (e) {\n\t return;\n\t }\n\t}\n\t\n\tvar idb = getIDB();\n\t\n\tfunction isIndexedDBValid() {\n\t try {\n\t // Initialize IndexedDB; fall back to vendor-prefixed versions\n\t // if needed.\n\t if (!idb) {\n\t return false;\n\t }\n\t // We mimic PouchDB here;\n\t //\n\t // We test for openDatabase because IE Mobile identifies itself\n\t // as Safari. Oh the lulz...\n\t var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n\t\n\t var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;\n\t\n\t // Safari <10.1 does not meet our requirements for IDB support (#5572)\n\t // since Safari 10.1 shipped with fetch, we can use that to detect it\n\t return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&\n\t // some outdated implementations of IDB that appear on Samsung\n\t // and HTC Android devices <4.4 are missing IDBKeyRange\n\t // See: https://github.com/mozilla/localForage/issues/128\n\t // See: https://github.com/mozilla/localForage/issues/272\n\t typeof IDBKeyRange !== 'undefined';\n\t } catch (e) {\n\t return false;\n\t }\n\t}\n\t\n\t// Abstracts constructing a Blob object, so it also works in older\n\t// browsers that don't support the native Blob constructor. (i.e.\n\t// old QtWebKit versions, at least).\n\t// Abstracts constructing a Blob object, so it also works in older\n\t// browsers that don't support the native Blob constructor. (i.e.\n\t// old QtWebKit versions, at least).\n\tfunction createBlob(parts, properties) {\n\t /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */\n\t parts = parts || [];\n\t properties = properties || {};\n\t try {\n\t return new Blob(parts, properties);\n\t } catch (e) {\n\t if (e.name !== 'TypeError') {\n\t throw e;\n\t }\n\t var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;\n\t var builder = new Builder();\n\t for (var i = 0; i < parts.length; i += 1) {\n\t builder.append(parts[i]);\n\t }\n\t return builder.getBlob(properties.type);\n\t }\n\t}\n\t\n\t// This is CommonJS because lie is an external dependency, so Rollup\n\t// can just ignore it.\n\tif (typeof Promise === 'undefined') {\n\t // In the \"nopromises\" build this will just throw if you don't have\n\t // a global promise object, but it would throw anyway later.\n\t _dereq_(3);\n\t}\n\tvar Promise$1 = Promise;\n\t\n\tfunction executeCallback(promise, callback) {\n\t if (callback) {\n\t promise.then(function (result) {\n\t callback(null, result);\n\t }, function (error) {\n\t callback(error);\n\t });\n\t }\n\t}\n\t\n\tfunction executeTwoCallbacks(promise, callback, errorCallback) {\n\t if (typeof callback === 'function') {\n\t promise.then(callback);\n\t }\n\t\n\t if (typeof errorCallback === 'function') {\n\t promise[\"catch\"](errorCallback);\n\t }\n\t}\n\t\n\tfunction normalizeKey(key) {\n\t // Cast the key to a string, as that's all we can set as a key.\n\t if (typeof key !== 'string') {\n\t console.warn(key + ' used as a key, but it is not a string.');\n\t key = String(key);\n\t }\n\t\n\t return key;\n\t}\n\t\n\tfunction getCallback() {\n\t if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {\n\t return arguments[arguments.length - 1];\n\t }\n\t}\n\t\n\t// Some code originally from async_storage.js in\n\t// [Gaia](https://github.com/mozilla-b2g/gaia).\n\t\n\tvar DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';\n\tvar supportsBlobs = void 0;\n\tvar dbContexts = {};\n\tvar toString = Object.prototype.toString;\n\t\n\t// Transaction Modes\n\tvar READ_ONLY = 'readonly';\n\tvar READ_WRITE = 'readwrite';\n\t\n\t// Transform a binary string to an array buffer, because otherwise\n\t// weird stuff happens when you try to work with the binary string directly.\n\t// It is known.\n\t// From http://stackoverflow.com/questions/14967647/ (continues on next line)\n\t// encode-decode-image-with-base64-breaks-image (2013-04-21)\n\tfunction _binStringToArrayBuffer(bin) {\n\t var length = bin.length;\n\t var buf = new ArrayBuffer(length);\n\t var arr = new Uint8Array(buf);\n\t for (var i = 0; i < length; i++) {\n\t arr[i] = bin.charCodeAt(i);\n\t }\n\t return buf;\n\t}\n\t\n\t//\n\t// Blobs are not supported in all versions of IndexedDB, notably\n\t// Chrome <37 and Android <5. In those versions, storing a blob will throw.\n\t//\n\t// Various other blob bugs exist in Chrome v37-42 (inclusive).\n\t// Detecting them is expensive and confusing to users, and Chrome 37-42\n\t// is at very low usage worldwide, so we do a hacky userAgent check instead.\n\t//\n\t// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120\n\t// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916\n\t// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836\n\t//\n\t// Code borrowed from PouchDB. See:\n\t// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js\n\t//\n\tfunction _checkBlobSupportWithoutCaching(idb) {\n\t return new Promise$1(function (resolve) {\n\t var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE);\n\t var blob = createBlob(['']);\n\t txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\t\n\t txn.onabort = function (e) {\n\t // If the transaction aborts now its due to not being able to\n\t // write to the database, likely due to the disk being full\n\t e.preventDefault();\n\t e.stopPropagation();\n\t resolve(false);\n\t };\n\t\n\t txn.oncomplete = function () {\n\t var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n\t var matchedEdge = navigator.userAgent.match(/Edge\\//);\n\t // MS Edge pretends to be Chrome 42:\n\t // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n\t resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n\t };\n\t })[\"catch\"](function () {\n\t return false; // error, so assume unsupported\n\t });\n\t}\n\t\n\tfunction _checkBlobSupport(idb) {\n\t if (typeof supportsBlobs === 'boolean') {\n\t return Promise$1.resolve(supportsBlobs);\n\t }\n\t return _checkBlobSupportWithoutCaching(idb).then(function (value) {\n\t supportsBlobs = value;\n\t return supportsBlobs;\n\t });\n\t}\n\t\n\tfunction _deferReadiness(dbInfo) {\n\t var dbContext = dbContexts[dbInfo.name];\n\t\n\t // Create a deferred object representing the current database operation.\n\t var deferredOperation = {};\n\t\n\t deferredOperation.promise = new Promise$1(function (resolve, reject) {\n\t deferredOperation.resolve = resolve;\n\t deferredOperation.reject = reject;\n\t });\n\t\n\t // Enqueue the deferred operation.\n\t dbContext.deferredOperations.push(deferredOperation);\n\t\n\t // Chain its promise to the database readiness.\n\t if (!dbContext.dbReady) {\n\t dbContext.dbReady = deferredOperation.promise;\n\t } else {\n\t dbContext.dbReady = dbContext.dbReady.then(function () {\n\t return deferredOperation.promise;\n\t });\n\t }\n\t}\n\t\n\tfunction _advanceReadiness(dbInfo) {\n\t var dbContext = dbContexts[dbInfo.name];\n\t\n\t // Dequeue a deferred operation.\n\t var deferredOperation = dbContext.deferredOperations.pop();\n\t\n\t // Resolve its promise (which is part of the database readiness\n\t // chain of promises).\n\t if (deferredOperation) {\n\t deferredOperation.resolve();\n\t return deferredOperation.promise;\n\t }\n\t}\n\t\n\tfunction _rejectReadiness(dbInfo, err) {\n\t var dbContext = dbContexts[dbInfo.name];\n\t\n\t // Dequeue a deferred operation.\n\t var deferredOperation = dbContext.deferredOperations.pop();\n\t\n\t // Reject its promise (which is part of the database readiness\n\t // chain of promises).\n\t if (deferredOperation) {\n\t deferredOperation.reject(err);\n\t return deferredOperation.promise;\n\t }\n\t}\n\t\n\tfunction _getConnection(dbInfo, upgradeNeeded) {\n\t return new Promise$1(function (resolve, reject) {\n\t dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext();\n\t\n\t if (dbInfo.db) {\n\t if (upgradeNeeded) {\n\t _deferReadiness(dbInfo);\n\t dbInfo.db.close();\n\t } else {\n\t return resolve(dbInfo.db);\n\t }\n\t }\n\t\n\t var dbArgs = [dbInfo.name];\n\t\n\t if (upgradeNeeded) {\n\t dbArgs.push(dbInfo.version);\n\t }\n\t\n\t var openreq = idb.open.apply(idb, dbArgs);\n\t\n\t if (upgradeNeeded) {\n\t openreq.onupgradeneeded = function (e) {\n\t var db = openreq.result;\n\t try {\n\t db.createObjectStore(dbInfo.storeName);\n\t if (e.oldVersion <= 1) {\n\t // Added when support for blob shims was added\n\t db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n\t }\n\t } catch (ex) {\n\t if (ex.name === 'ConstraintError') {\n\t console.warn('The database \"' + dbInfo.name + '\"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage \"' + dbInfo.storeName + '\" already exists.');\n\t } else {\n\t throw ex;\n\t }\n\t }\n\t };\n\t }\n\t\n\t openreq.onerror = function (e) {\n\t e.preventDefault();\n\t reject(openreq.error);\n\t };\n\t\n\t openreq.onsuccess = function () {\n\t resolve(openreq.result);\n\t _advanceReadiness(dbInfo);\n\t };\n\t });\n\t}\n\t\n\tfunction _getOriginalConnection(dbInfo) {\n\t return _getConnection(dbInfo, false);\n\t}\n\t\n\tfunction _getUpgradedConnection(dbInfo) {\n\t return _getConnection(dbInfo, true);\n\t}\n\t\n\tfunction _isUpgradeNeeded(dbInfo, defaultVersion) {\n\t if (!dbInfo.db) {\n\t return true;\n\t }\n\t\n\t var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);\n\t var isDowngrade = dbInfo.version < dbInfo.db.version;\n\t var isUpgrade = dbInfo.version > dbInfo.db.version;\n\t\n\t if (isDowngrade) {\n\t // If the version is not the default one\n\t // then warn for impossible downgrade.\n\t if (dbInfo.version !== defaultVersion) {\n\t console.warn('The database \"' + dbInfo.name + '\"' + \" can't be downgraded from version \" + dbInfo.db.version + ' to version ' + dbInfo.version + '.');\n\t }\n\t // Align the versions to prevent errors.\n\t dbInfo.version = dbInfo.db.version;\n\t }\n\t\n\t if (isUpgrade || isNewStore) {\n\t // If the store is new then increment the version (if needed).\n\t // This will trigger an \"upgradeneeded\" event which is required\n\t // for creating a store.\n\t if (isNewStore) {\n\t var incVersion = dbInfo.db.version + 1;\n\t if (incVersion > dbInfo.version) {\n\t dbInfo.version = incVersion;\n\t }\n\t }\n\t\n\t return true;\n\t }\n\t\n\t return false;\n\t}\n\t\n\t// encode a blob for indexeddb engines that don't support blobs\n\tfunction _encodeBlob(blob) {\n\t return new Promise$1(function (resolve, reject) {\n\t var reader = new FileReader();\n\t reader.onerror = reject;\n\t reader.onloadend = function (e) {\n\t var base64 = btoa(e.target.result || '');\n\t resolve({\n\t __local_forage_encoded_blob: true,\n\t data: base64,\n\t type: blob.type\n\t });\n\t };\n\t reader.readAsBinaryString(blob);\n\t });\n\t}\n\t\n\t// decode an encoded blob\n\tfunction _decodeBlob(encodedBlob) {\n\t var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));\n\t return createBlob([arrayBuff], { type: encodedBlob.type });\n\t}\n\t\n\t// is this one of our fancy encoded blobs?\n\tfunction _isEncodedBlob(value) {\n\t return value && value.__local_forage_encoded_blob;\n\t}\n\t\n\t// Specialize the default `ready()` function by making it dependent\n\t// on the current database operations. Thus, the driver will be actually\n\t// ready when it's been initialized (default) *and* there are no pending\n\t// operations on the database (initiated by some other instances).\n\tfunction _fullyReady(callback) {\n\t var self = this;\n\t\n\t var promise = self._initReady().then(function () {\n\t var dbContext = dbContexts[self._dbInfo.name];\n\t\n\t if (dbContext && dbContext.dbReady) {\n\t return dbContext.dbReady;\n\t }\n\t });\n\t\n\t executeTwoCallbacks(promise, callback, callback);\n\t return promise;\n\t}\n\t\n\t// Try to establish a new db connection to replace the\n\t// current one which is broken (i.e. experiencing\n\t// InvalidStateError while creating a transaction).\n\tfunction _tryReconnect(dbInfo) {\n\t _deferReadiness(dbInfo);\n\t\n\t var dbContext = dbContexts[dbInfo.name];\n\t var forages = dbContext.forages;\n\t\n\t for (var i = 0; i < forages.length; i++) {\n\t var forage = forages[i];\n\t if (forage._dbInfo.db) {\n\t forage._dbInfo.db.close();\n\t forage._dbInfo.db = null;\n\t }\n\t }\n\t dbInfo.db = null;\n\t\n\t return _getOriginalConnection(dbInfo).then(function (db) {\n\t dbInfo.db = db;\n\t if (_isUpgradeNeeded(dbInfo)) {\n\t // Reopen the database for upgrading.\n\t return _getUpgradedConnection(dbInfo);\n\t }\n\t return db;\n\t }).then(function (db) {\n\t // store the latest db reference\n\t // in case the db was upgraded\n\t dbInfo.db = dbContext.db = db;\n\t for (var i = 0; i < forages.length; i++) {\n\t forages[i]._dbInfo.db = db;\n\t }\n\t })[\"catch\"](function (err) {\n\t _rejectReadiness(dbInfo, err);\n\t throw err;\n\t });\n\t}\n\t\n\t// FF doesn't like Promises (micro-tasks) and IDDB store operations,\n\t// so we have to do it with callbacks\n\tfunction createTransaction(dbInfo, mode, callback, retries) {\n\t if (retries === undefined) {\n\t retries = 1;\n\t }\n\t\n\t try {\n\t var tx = dbInfo.db.transaction(dbInfo.storeName, mode);\n\t callback(null, tx);\n\t } catch (err) {\n\t if (retries > 0 && (!dbInfo.db || err.name === 'InvalidStateError' || err.name === 'NotFoundError')) {\n\t return Promise$1.resolve().then(function () {\n\t if (!dbInfo.db || err.name === 'NotFoundError' && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) {\n\t // increase the db version, to create the new ObjectStore\n\t if (dbInfo.db) {\n\t dbInfo.version = dbInfo.db.version + 1;\n\t }\n\t // Reopen the database for upgrading.\n\t return _getUpgradedConnection(dbInfo);\n\t }\n\t }).then(function () {\n\t return _tryReconnect(dbInfo).then(function () {\n\t createTransaction(dbInfo, mode, callback, retries - 1);\n\t });\n\t })[\"catch\"](callback);\n\t }\n\t\n\t callback(err);\n\t }\n\t}\n\t\n\tfunction createDbContext() {\n\t return {\n\t // Running localForages sharing a database.\n\t forages: [],\n\t // Shared database.\n\t db: null,\n\t // Database readiness (promise).\n\t dbReady: null,\n\t // Deferred operations on the database.\n\t deferredOperations: []\n\t };\n\t}\n\t\n\t// Open the IndexedDB database (automatically creates one if one didn't\n\t// previously exist), using any options set in the config.\n\tfunction _initStorage(options) {\n\t var self = this;\n\t var dbInfo = {\n\t db: null\n\t };\n\t\n\t if (options) {\n\t for (var i in options) {\n\t dbInfo[i] = options[i];\n\t }\n\t }\n\t\n\t // Get the current context of the database;\n\t var dbContext = dbContexts[dbInfo.name];\n\t\n\t // ...or create a new context.\n\t if (!dbContext) {\n\t dbContext = createDbContext();\n\t // Register the new context in the global container.\n\t dbContexts[dbInfo.name] = dbContext;\n\t }\n\t\n\t // Register itself as a running localForage in the current context.\n\t dbContext.forages.push(self);\n\t\n\t // Replace the default `ready()` function with the specialized one.\n\t if (!self._initReady) {\n\t self._initReady = self.ready;\n\t self.ready = _fullyReady;\n\t }\n\t\n\t // Create an array of initialization states of the related localForages.\n\t var initPromises = [];\n\t\n\t function ignoreErrors() {\n\t // Don't handle errors here,\n\t // just makes sure related localForages aren't pending.\n\t return Promise$1.resolve();\n\t }\n\t\n\t for (var j = 0; j < dbContext.forages.length; j++) {\n\t var forage = dbContext.forages[j];\n\t if (forage !== self) {\n\t // Don't wait for itself...\n\t initPromises.push(forage._initReady()[\"catch\"](ignoreErrors));\n\t }\n\t }\n\t\n\t // Take a snapshot of the related localForages.\n\t var forages = dbContext.forages.slice(0);\n\t\n\t // Initialize the connection process only when\n\t // all the related localForages aren't pending.\n\t return Promise$1.all(initPromises).then(function () {\n\t dbInfo.db = dbContext.db;\n\t // Get the connection or open a new one without upgrade.\n\t return _getOriginalConnection(dbInfo);\n\t }).then(function (db) {\n\t dbInfo.db = db;\n\t if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {\n\t // Reopen the database for upgrading.\n\t return _getUpgradedConnection(dbInfo);\n\t }\n\t return db;\n\t }).then(function (db) {\n\t dbInfo.db = dbContext.db = db;\n\t self._dbInfo = dbInfo;\n\t // Share the final connection amongst related localForages.\n\t for (var k = 0; k < forages.length; k++) {\n\t var forage = forages[k];\n\t if (forage !== self) {\n\t // Self is already up-to-date.\n\t forage._dbInfo.db = dbInfo.db;\n\t forage._dbInfo.version = dbInfo.version;\n\t }\n\t }\n\t });\n\t}\n\t\n\tfunction getItem(key, callback) {\n\t var self = this;\n\t\n\t key = normalizeKey(key);\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n\t if (err) {\n\t return reject(err);\n\t }\n\t\n\t try {\n\t var store = transaction.objectStore(self._dbInfo.storeName);\n\t var req = store.get(key);\n\t\n\t req.onsuccess = function () {\n\t var value = req.result;\n\t if (value === undefined) {\n\t value = null;\n\t }\n\t if (_isEncodedBlob(value)) {\n\t value = _decodeBlob(value);\n\t }\n\t resolve(value);\n\t };\n\t\n\t req.onerror = function () {\n\t reject(req.error);\n\t };\n\t } catch (e) {\n\t reject(e);\n\t }\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\t// Iterate over all items stored in database.\n\tfunction iterate(iterator, callback) {\n\t var self = this;\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n\t if (err) {\n\t return reject(err);\n\t }\n\t\n\t try {\n\t var store = transaction.objectStore(self._dbInfo.storeName);\n\t var req = store.openCursor();\n\t var iterationNumber = 1;\n\t\n\t req.onsuccess = function () {\n\t var cursor = req.result;\n\t\n\t if (cursor) {\n\t var value = cursor.value;\n\t if (_isEncodedBlob(value)) {\n\t value = _decodeBlob(value);\n\t }\n\t var result = iterator(value, cursor.key, iterationNumber++);\n\t\n\t // when the iterator callback retuns any\n\t // (non-`undefined`) value, then we stop\n\t // the iteration immediately\n\t if (result !== void 0) {\n\t resolve(result);\n\t } else {\n\t cursor[\"continue\"]();\n\t }\n\t } else {\n\t resolve();\n\t }\n\t };\n\t\n\t req.onerror = function () {\n\t reject(req.error);\n\t };\n\t } catch (e) {\n\t reject(e);\n\t }\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t\n\t return promise;\n\t}\n\t\n\tfunction setItem(key, value, callback) {\n\t var self = this;\n\t\n\t key = normalizeKey(key);\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t var dbInfo;\n\t self.ready().then(function () {\n\t dbInfo = self._dbInfo;\n\t if (toString.call(value) === '[object Blob]') {\n\t return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {\n\t if (blobSupport) {\n\t return value;\n\t }\n\t return _encodeBlob(value);\n\t });\n\t }\n\t return value;\n\t }).then(function (value) {\n\t createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n\t if (err) {\n\t return reject(err);\n\t }\n\t\n\t try {\n\t var store = transaction.objectStore(self._dbInfo.storeName);\n\t\n\t // The reason we don't _save_ null is because IE 10 does\n\t // not support saving the `null` type in IndexedDB. How\n\t // ironic, given the bug below!\n\t // See: https://github.com/mozilla/localForage/issues/161\n\t if (value === null) {\n\t value = undefined;\n\t }\n\t\n\t var req = store.put(value, key);\n\t\n\t transaction.oncomplete = function () {\n\t // Cast to undefined so the value passed to\n\t // callback/promise is the same as what one would get out\n\t // of `getItem()` later. This leads to some weirdness\n\t // (setItem('foo', undefined) will return `null`), but\n\t // it's not my fault localStorage is our baseline and that\n\t // it's weird.\n\t if (value === undefined) {\n\t value = null;\n\t }\n\t\n\t resolve(value);\n\t };\n\t transaction.onabort = transaction.onerror = function () {\n\t var err = req.error ? req.error : req.transaction.error;\n\t reject(err);\n\t };\n\t } catch (e) {\n\t reject(e);\n\t }\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tfunction removeItem(key, callback) {\n\t var self = this;\n\t\n\t key = normalizeKey(key);\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n\t if (err) {\n\t return reject(err);\n\t }\n\t\n\t try {\n\t var store = transaction.objectStore(self._dbInfo.storeName);\n\t // We use a Grunt task to make this safe for IE and some\n\t // versions of Android (including those used by Cordova).\n\t // Normally IE won't like `.delete()` and will insist on\n\t // using `['delete']()`, but we have a build step that\n\t // fixes this for us now.\n\t var req = store[\"delete\"](key);\n\t transaction.oncomplete = function () {\n\t resolve();\n\t };\n\t\n\t transaction.onerror = function () {\n\t reject(req.error);\n\t };\n\t\n\t // The request will be also be aborted if we've exceeded our storage\n\t // space.\n\t transaction.onabort = function () {\n\t var err = req.error ? req.error : req.transaction.error;\n\t reject(err);\n\t };\n\t } catch (e) {\n\t reject(e);\n\t }\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tfunction clear(callback) {\n\t var self = this;\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n\t if (err) {\n\t return reject(err);\n\t }\n\t\n\t try {\n\t var store = transaction.objectStore(self._dbInfo.storeName);\n\t var req = store.clear();\n\t\n\t transaction.oncomplete = function () {\n\t resolve();\n\t };\n\t\n\t transaction.onabort = transaction.onerror = function () {\n\t var err = req.error ? req.error : req.transaction.error;\n\t reject(err);\n\t };\n\t } catch (e) {\n\t reject(e);\n\t }\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tfunction length(callback) {\n\t var self = this;\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n\t if (err) {\n\t return reject(err);\n\t }\n\t\n\t try {\n\t var store = transaction.objectStore(self._dbInfo.storeName);\n\t var req = store.count();\n\t\n\t req.onsuccess = function () {\n\t resolve(req.result);\n\t };\n\t\n\t req.onerror = function () {\n\t reject(req.error);\n\t };\n\t } catch (e) {\n\t reject(e);\n\t }\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tfunction key(n, callback) {\n\t var self = this;\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t if (n < 0) {\n\t resolve(null);\n\t\n\t return;\n\t }\n\t\n\t self.ready().then(function () {\n\t createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n\t if (err) {\n\t return reject(err);\n\t }\n\t\n\t try {\n\t var store = transaction.objectStore(self._dbInfo.storeName);\n\t var advanced = false;\n\t var req = store.openCursor();\n\t\n\t req.onsuccess = function () {\n\t var cursor = req.result;\n\t if (!cursor) {\n\t // this means there weren't enough keys\n\t resolve(null);\n\t\n\t return;\n\t }\n\t\n\t if (n === 0) {\n\t // We have the first key, return it if that's what they\n\t // wanted.\n\t resolve(cursor.key);\n\t } else {\n\t if (!advanced) {\n\t // Otherwise, ask the cursor to skip ahead n\n\t // records.\n\t advanced = true;\n\t cursor.advance(n);\n\t } else {\n\t // When we get here, we've got the nth key.\n\t resolve(cursor.key);\n\t }\n\t }\n\t };\n\t\n\t req.onerror = function () {\n\t reject(req.error);\n\t };\n\t } catch (e) {\n\t reject(e);\n\t }\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tfunction keys(callback) {\n\t var self = this;\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n\t if (err) {\n\t return reject(err);\n\t }\n\t\n\t try {\n\t var store = transaction.objectStore(self._dbInfo.storeName);\n\t var req = store.openCursor();\n\t var keys = [];\n\t\n\t req.onsuccess = function () {\n\t var cursor = req.result;\n\t\n\t if (!cursor) {\n\t resolve(keys);\n\t return;\n\t }\n\t\n\t keys.push(cursor.key);\n\t cursor[\"continue\"]();\n\t };\n\t\n\t req.onerror = function () {\n\t reject(req.error);\n\t };\n\t } catch (e) {\n\t reject(e);\n\t }\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tfunction dropInstance(options, callback) {\n\t callback = getCallback.apply(this, arguments);\n\t\n\t var currentConfig = this.config();\n\t options = typeof options !== 'function' && options || {};\n\t if (!options.name) {\n\t options.name = options.name || currentConfig.name;\n\t options.storeName = options.storeName || currentConfig.storeName;\n\t }\n\t\n\t var self = this;\n\t var promise;\n\t if (!options.name) {\n\t promise = Promise$1.reject('Invalid arguments');\n\t } else {\n\t var isCurrentDb = options.name === currentConfig.name && self._dbInfo.db;\n\t\n\t var dbPromise = isCurrentDb ? Promise$1.resolve(self._dbInfo.db) : _getOriginalConnection(options).then(function (db) {\n\t var dbContext = dbContexts[options.name];\n\t var forages = dbContext.forages;\n\t dbContext.db = db;\n\t for (var i = 0; i < forages.length; i++) {\n\t forages[i]._dbInfo.db = db;\n\t }\n\t return db;\n\t });\n\t\n\t if (!options.storeName) {\n\t promise = dbPromise.then(function (db) {\n\t _deferReadiness(options);\n\t\n\t var dbContext = dbContexts[options.name];\n\t var forages = dbContext.forages;\n\t\n\t db.close();\n\t for (var i = 0; i < forages.length; i++) {\n\t var forage = forages[i];\n\t forage._dbInfo.db = null;\n\t }\n\t\n\t var dropDBPromise = new Promise$1(function (resolve, reject) {\n\t var req = idb.deleteDatabase(options.name);\n\t\n\t req.onerror = req.onblocked = function (err) {\n\t var db = req.result;\n\t if (db) {\n\t db.close();\n\t }\n\t reject(err);\n\t };\n\t\n\t req.onsuccess = function () {\n\t var db = req.result;\n\t if (db) {\n\t db.close();\n\t }\n\t resolve(db);\n\t };\n\t });\n\t\n\t return dropDBPromise.then(function (db) {\n\t dbContext.db = db;\n\t for (var i = 0; i < forages.length; i++) {\n\t var _forage = forages[i];\n\t _advanceReadiness(_forage._dbInfo);\n\t }\n\t })[\"catch\"](function (err) {\n\t (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n\t throw err;\n\t });\n\t });\n\t } else {\n\t promise = dbPromise.then(function (db) {\n\t if (!db.objectStoreNames.contains(options.storeName)) {\n\t return;\n\t }\n\t\n\t var newVersion = db.version + 1;\n\t\n\t _deferReadiness(options);\n\t\n\t var dbContext = dbContexts[options.name];\n\t var forages = dbContext.forages;\n\t\n\t db.close();\n\t for (var i = 0; i < forages.length; i++) {\n\t var forage = forages[i];\n\t forage._dbInfo.db = null;\n\t forage._dbInfo.version = newVersion;\n\t }\n\t\n\t var dropObjectPromise = new Promise$1(function (resolve, reject) {\n\t var req = idb.open(options.name, newVersion);\n\t\n\t req.onerror = function (err) {\n\t var db = req.result;\n\t db.close();\n\t reject(err);\n\t };\n\t\n\t req.onupgradeneeded = function () {\n\t var db = req.result;\n\t db.deleteObjectStore(options.storeName);\n\t };\n\t\n\t req.onsuccess = function () {\n\t var db = req.result;\n\t db.close();\n\t resolve(db);\n\t };\n\t });\n\t\n\t return dropObjectPromise.then(function (db) {\n\t dbContext.db = db;\n\t for (var j = 0; j < forages.length; j++) {\n\t var _forage2 = forages[j];\n\t _forage2._dbInfo.db = db;\n\t _advanceReadiness(_forage2._dbInfo);\n\t }\n\t })[\"catch\"](function (err) {\n\t (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n\t throw err;\n\t });\n\t });\n\t }\n\t }\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tvar asyncStorage = {\n\t _driver: 'asyncStorage',\n\t _initStorage: _initStorage,\n\t _support: isIndexedDBValid(),\n\t iterate: iterate,\n\t getItem: getItem,\n\t setItem: setItem,\n\t removeItem: removeItem,\n\t clear: clear,\n\t length: length,\n\t key: key,\n\t keys: keys,\n\t dropInstance: dropInstance\n\t};\n\t\n\tfunction isWebSQLValid() {\n\t return typeof openDatabase === 'function';\n\t}\n\t\n\t// Sadly, the best way to save binary data in WebSQL/localStorage is serializing\n\t// it to Base64, so this is how we store it to prevent very strange errors with less\n\t// verbose ways of binary <-> string data storage.\n\tvar BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t\n\tvar BLOB_TYPE_PREFIX = '~~local_forage_type~';\n\tvar BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;\n\t\n\tvar SERIALIZED_MARKER = '__lfsc__:';\n\tvar SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;\n\t\n\t// OMG the serializations!\n\tvar TYPE_ARRAYBUFFER = 'arbf';\n\tvar TYPE_BLOB = 'blob';\n\tvar TYPE_INT8ARRAY = 'si08';\n\tvar TYPE_UINT8ARRAY = 'ui08';\n\tvar TYPE_UINT8CLAMPEDARRAY = 'uic8';\n\tvar TYPE_INT16ARRAY = 'si16';\n\tvar TYPE_INT32ARRAY = 'si32';\n\tvar TYPE_UINT16ARRAY = 'ur16';\n\tvar TYPE_UINT32ARRAY = 'ui32';\n\tvar TYPE_FLOAT32ARRAY = 'fl32';\n\tvar TYPE_FLOAT64ARRAY = 'fl64';\n\tvar TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;\n\t\n\tvar toString$1 = Object.prototype.toString;\n\t\n\tfunction stringToBuffer(serializedString) {\n\t // Fill the string into a ArrayBuffer.\n\t var bufferLength = serializedString.length * 0.75;\n\t var len = serializedString.length;\n\t var i;\n\t var p = 0;\n\t var encoded1, encoded2, encoded3, encoded4;\n\t\n\t if (serializedString[serializedString.length - 1] === '=') {\n\t bufferLength--;\n\t if (serializedString[serializedString.length - 2] === '=') {\n\t bufferLength--;\n\t }\n\t }\n\t\n\t var buffer = new ArrayBuffer(bufferLength);\n\t var bytes = new Uint8Array(buffer);\n\t\n\t for (i = 0; i < len; i += 4) {\n\t encoded1 = BASE_CHARS.indexOf(serializedString[i]);\n\t encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);\n\t encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);\n\t encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);\n\t\n\t /*jslint bitwise: true */\n\t bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n\t bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n\t bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n\t }\n\t return buffer;\n\t}\n\t\n\t// Converts a buffer to a string to store, serialized, in the backend\n\t// storage library.\n\tfunction bufferToString(buffer) {\n\t // base64-arraybuffer\n\t var bytes = new Uint8Array(buffer);\n\t var base64String = '';\n\t var i;\n\t\n\t for (i = 0; i < bytes.length; i += 3) {\n\t /*jslint bitwise: true */\n\t base64String += BASE_CHARS[bytes[i] >> 2];\n\t base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n\t base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n\t base64String += BASE_CHARS[bytes[i + 2] & 63];\n\t }\n\t\n\t if (bytes.length % 3 === 2) {\n\t base64String = base64String.substring(0, base64String.length - 1) + '=';\n\t } else if (bytes.length % 3 === 1) {\n\t base64String = base64String.substring(0, base64String.length - 2) + '==';\n\t }\n\t\n\t return base64String;\n\t}\n\t\n\t// Serialize a value, afterwards executing a callback (which usually\n\t// instructs the `setItem()` callback/promise to be executed). This is how\n\t// we store binary data with localStorage.\n\tfunction serialize(value, callback) {\n\t var valueType = '';\n\t if (value) {\n\t valueType = toString$1.call(value);\n\t }\n\t\n\t // Cannot use `value instanceof ArrayBuffer` or such here, as these\n\t // checks fail when running the tests using casper.js...\n\t //\n\t // TODO: See why those tests fail and use a better solution.\n\t if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {\n\t // Convert binary arrays to a string and prefix the string with\n\t // a special marker.\n\t var buffer;\n\t var marker = SERIALIZED_MARKER;\n\t\n\t if (value instanceof ArrayBuffer) {\n\t buffer = value;\n\t marker += TYPE_ARRAYBUFFER;\n\t } else {\n\t buffer = value.buffer;\n\t\n\t if (valueType === '[object Int8Array]') {\n\t marker += TYPE_INT8ARRAY;\n\t } else if (valueType === '[object Uint8Array]') {\n\t marker += TYPE_UINT8ARRAY;\n\t } else if (valueType === '[object Uint8ClampedArray]') {\n\t marker += TYPE_UINT8CLAMPEDARRAY;\n\t } else if (valueType === '[object Int16Array]') {\n\t marker += TYPE_INT16ARRAY;\n\t } else if (valueType === '[object Uint16Array]') {\n\t marker += TYPE_UINT16ARRAY;\n\t } else if (valueType === '[object Int32Array]') {\n\t marker += TYPE_INT32ARRAY;\n\t } else if (valueType === '[object Uint32Array]') {\n\t marker += TYPE_UINT32ARRAY;\n\t } else if (valueType === '[object Float32Array]') {\n\t marker += TYPE_FLOAT32ARRAY;\n\t } else if (valueType === '[object Float64Array]') {\n\t marker += TYPE_FLOAT64ARRAY;\n\t } else {\n\t callback(new Error('Failed to get type for BinaryArray'));\n\t }\n\t }\n\t\n\t callback(marker + bufferToString(buffer));\n\t } else if (valueType === '[object Blob]') {\n\t // Conver the blob to a binaryArray and then to a string.\n\t var fileReader = new FileReader();\n\t\n\t fileReader.onload = function () {\n\t // Backwards-compatible prefix for the blob type.\n\t var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);\n\t\n\t callback(SERIALIZED_MARKER + TYPE_BLOB + str);\n\t };\n\t\n\t fileReader.readAsArrayBuffer(value);\n\t } else {\n\t try {\n\t callback(JSON.stringify(value));\n\t } catch (e) {\n\t console.error(\"Couldn't convert value into a JSON string: \", value);\n\t\n\t callback(null, e);\n\t }\n\t }\n\t}\n\t\n\t// Deserialize data we've inserted into a value column/field. We place\n\t// special markers into our strings to mark them as encoded; this isn't\n\t// as nice as a meta field, but it's the only sane thing we can do whilst\n\t// keeping localStorage support intact.\n\t//\n\t// Oftentimes this will just deserialize JSON content, but if we have a\n\t// special marker (SERIALIZED_MARKER, defined above), we will extract\n\t// some kind of arraybuffer/binary data/typed array out of the string.\n\tfunction deserialize(value) {\n\t // If we haven't marked this string as being specially serialized (i.e.\n\t // something other than serialized JSON), we can just return it and be\n\t // done with it.\n\t if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {\n\t return JSON.parse(value);\n\t }\n\t\n\t // The following code deals with deserializing some kind of Blob or\n\t // TypedArray. First we separate out the type of data we're dealing\n\t // with from the data itself.\n\t var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);\n\t var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);\n\t\n\t var blobType;\n\t // Backwards-compatible blob type serialization strategy.\n\t // DBs created with older versions of localForage will simply not have the blob type.\n\t if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {\n\t var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);\n\t blobType = matcher[1];\n\t serializedString = serializedString.substring(matcher[0].length);\n\t }\n\t var buffer = stringToBuffer(serializedString);\n\t\n\t // Return the right type based on the code/type set during\n\t // serialization.\n\t switch (type) {\n\t case TYPE_ARRAYBUFFER:\n\t return buffer;\n\t case TYPE_BLOB:\n\t return createBlob([buffer], { type: blobType });\n\t case TYPE_INT8ARRAY:\n\t return new Int8Array(buffer);\n\t case TYPE_UINT8ARRAY:\n\t return new Uint8Array(buffer);\n\t case TYPE_UINT8CLAMPEDARRAY:\n\t return new Uint8ClampedArray(buffer);\n\t case TYPE_INT16ARRAY:\n\t return new Int16Array(buffer);\n\t case TYPE_UINT16ARRAY:\n\t return new Uint16Array(buffer);\n\t case TYPE_INT32ARRAY:\n\t return new Int32Array(buffer);\n\t case TYPE_UINT32ARRAY:\n\t return new Uint32Array(buffer);\n\t case TYPE_FLOAT32ARRAY:\n\t return new Float32Array(buffer);\n\t case TYPE_FLOAT64ARRAY:\n\t return new Float64Array(buffer);\n\t default:\n\t throw new Error('Unkown type: ' + type);\n\t }\n\t}\n\t\n\tvar localforageSerializer = {\n\t serialize: serialize,\n\t deserialize: deserialize,\n\t stringToBuffer: stringToBuffer,\n\t bufferToString: bufferToString\n\t};\n\t\n\t/*\n\t * Includes code from:\n\t *\n\t * base64-arraybuffer\n\t * https://github.com/niklasvh/base64-arraybuffer\n\t *\n\t * Copyright (c) 2012 Niklas von Hertzen\n\t * Licensed under the MIT license.\n\t */\n\t\n\tfunction createDbTable(t, dbInfo, callback, errorCallback) {\n\t t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback);\n\t}\n\t\n\t// Open the WebSQL database (automatically creates one if one didn't\n\t// previously exist), using any options set in the config.\n\tfunction _initStorage$1(options) {\n\t var self = this;\n\t var dbInfo = {\n\t db: null\n\t };\n\t\n\t if (options) {\n\t for (var i in options) {\n\t dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];\n\t }\n\t }\n\t\n\t var dbInfoPromise = new Promise$1(function (resolve, reject) {\n\t // Open the database; the openDatabase API will automatically\n\t // create it for us if it doesn't exist.\n\t try {\n\t dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);\n\t } catch (e) {\n\t return reject(e);\n\t }\n\t\n\t // Create our key/value table if it doesn't exist.\n\t dbInfo.db.transaction(function (t) {\n\t createDbTable(t, dbInfo, function () {\n\t self._dbInfo = dbInfo;\n\t resolve();\n\t }, function (t, error) {\n\t reject(error);\n\t });\n\t }, reject);\n\t });\n\t\n\t dbInfo.serializer = localforageSerializer;\n\t return dbInfoPromise;\n\t}\n\t\n\tfunction tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) {\n\t t.executeSql(sqlStatement, args, callback, function (t, error) {\n\t if (error.code === error.SYNTAX_ERR) {\n\t t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name = ?\", [dbInfo.storeName], function (t, results) {\n\t if (!results.rows.length) {\n\t // if the table is missing (was deleted)\n\t // re-create it table and retry\n\t createDbTable(t, dbInfo, function () {\n\t t.executeSql(sqlStatement, args, callback, errorCallback);\n\t }, errorCallback);\n\t } else {\n\t errorCallback(t, error);\n\t }\n\t }, errorCallback);\n\t } else {\n\t errorCallback(t, error);\n\t }\n\t }, errorCallback);\n\t}\n\t\n\tfunction getItem$1(key, callback) {\n\t var self = this;\n\t\n\t key = normalizeKey(key);\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t var dbInfo = self._dbInfo;\n\t dbInfo.db.transaction(function (t) {\n\t tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {\n\t var result = results.rows.length ? results.rows.item(0).value : null;\n\t\n\t // Check to see if this is serialized content we need to\n\t // unpack.\n\t if (result) {\n\t result = dbInfo.serializer.deserialize(result);\n\t }\n\t\n\t resolve(result);\n\t }, function (t, error) {\n\t reject(error);\n\t });\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tfunction iterate$1(iterator, callback) {\n\t var self = this;\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t var dbInfo = self._dbInfo;\n\t\n\t dbInfo.db.transaction(function (t) {\n\t tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {\n\t var rows = results.rows;\n\t var length = rows.length;\n\t\n\t for (var i = 0; i < length; i++) {\n\t var item = rows.item(i);\n\t var result = item.value;\n\t\n\t // Check to see if this is serialized content\n\t // we need to unpack.\n\t if (result) {\n\t result = dbInfo.serializer.deserialize(result);\n\t }\n\t\n\t result = iterator(result, item.key, i + 1);\n\t\n\t // void(0) prevents problems with redefinition\n\t // of `undefined`.\n\t if (result !== void 0) {\n\t resolve(result);\n\t return;\n\t }\n\t }\n\t\n\t resolve();\n\t }, function (t, error) {\n\t reject(error);\n\t });\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tfunction _setItem(key, value, callback, retriesLeft) {\n\t var self = this;\n\t\n\t key = normalizeKey(key);\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t // The localStorage API doesn't return undefined values in an\n\t // \"expected\" way, so undefined is always cast to null in all\n\t // drivers. See: https://github.com/mozilla/localForage/pull/42\n\t if (value === undefined) {\n\t value = null;\n\t }\n\t\n\t // Save the original value to pass to the callback.\n\t var originalValue = value;\n\t\n\t var dbInfo = self._dbInfo;\n\t dbInfo.serializer.serialize(value, function (value, error) {\n\t if (error) {\n\t reject(error);\n\t } else {\n\t dbInfo.db.transaction(function (t) {\n\t tryExecuteSql(t, dbInfo, 'INSERT OR REPLACE INTO ' + dbInfo.storeName + ' ' + '(key, value) VALUES (?, ?)', [key, value], function () {\n\t resolve(originalValue);\n\t }, function (t, error) {\n\t reject(error);\n\t });\n\t }, function (sqlError) {\n\t // The transaction failed; check\n\t // to see if it's a quota error.\n\t if (sqlError.code === sqlError.QUOTA_ERR) {\n\t // We reject the callback outright for now, but\n\t // it's worth trying to re-run the transaction.\n\t // Even if the user accepts the prompt to use\n\t // more storage on Safari, this error will\n\t // be called.\n\t //\n\t // Try to re-run the transaction.\n\t if (retriesLeft > 0) {\n\t resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));\n\t return;\n\t }\n\t reject(sqlError);\n\t }\n\t });\n\t }\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tfunction setItem$1(key, value, callback) {\n\t return _setItem.apply(this, [key, value, callback, 1]);\n\t}\n\t\n\tfunction removeItem$1(key, callback) {\n\t var self = this;\n\t\n\t key = normalizeKey(key);\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t var dbInfo = self._dbInfo;\n\t dbInfo.db.transaction(function (t) {\n\t tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {\n\t resolve();\n\t }, function (t, error) {\n\t reject(error);\n\t });\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\t// Deletes every item in the table.\n\t// TODO: Find out if this resets the AUTO_INCREMENT number.\n\tfunction clear$1(callback) {\n\t var self = this;\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t var dbInfo = self._dbInfo;\n\t dbInfo.db.transaction(function (t) {\n\t tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName, [], function () {\n\t resolve();\n\t }, function (t, error) {\n\t reject(error);\n\t });\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\t// Does a simple `COUNT(key)` to get the number of items stored in\n\t// localForage.\n\tfunction length$1(callback) {\n\t var self = this;\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t var dbInfo = self._dbInfo;\n\t dbInfo.db.transaction(function (t) {\n\t // Ahhh, SQL makes this one soooooo easy.\n\t tryExecuteSql(t, dbInfo, 'SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {\n\t var result = results.rows.item(0).c;\n\t resolve(result);\n\t }, function (t, error) {\n\t reject(error);\n\t });\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\t// Return the key located at key index X; essentially gets the key from a\n\t// `WHERE id = ?`. This is the most efficient way I can think to implement\n\t// this rarely-used (in my experience) part of the API, but it can seem\n\t// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so\n\t// the ID of each key will change every time it's updated. Perhaps a stored\n\t// procedure for the `setItem()` SQL would solve this problem?\n\t// TODO: Don't change ID on `setItem()`.\n\tfunction key$1(n, callback) {\n\t var self = this;\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t var dbInfo = self._dbInfo;\n\t dbInfo.db.transaction(function (t) {\n\t tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {\n\t var result = results.rows.length ? results.rows.item(0).key : null;\n\t resolve(result);\n\t }, function (t, error) {\n\t reject(error);\n\t });\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tfunction keys$1(callback) {\n\t var self = this;\n\t\n\t var promise = new Promise$1(function (resolve, reject) {\n\t self.ready().then(function () {\n\t var dbInfo = self._dbInfo;\n\t dbInfo.db.transaction(function (t) {\n\t tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {\n\t var keys = [];\n\t\n\t for (var i = 0; i < results.rows.length; i++) {\n\t keys.push(results.rows.item(i).key);\n\t }\n\t\n\t resolve(keys);\n\t }, function (t, error) {\n\t reject(error);\n\t });\n\t });\n\t })[\"catch\"](reject);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\t// https://www.w3.org/TR/webdatabase/#databases\n\t// > There is no way to enumerate or delete the databases available for an origin from this API.\n\tfunction getAllStoreNames(db) {\n\t return new Promise$1(function (resolve, reject) {\n\t db.transaction(function (t) {\n\t t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'\", [], function (t, results) {\n\t var storeNames = [];\n\t\n\t for (var i = 0; i < results.rows.length; i++) {\n\t storeNames.push(results.rows.item(i).name);\n\t }\n\t\n\t resolve({\n\t db: db,\n\t storeNames: storeNames\n\t });\n\t }, function (t, error) {\n\t reject(error);\n\t });\n\t }, function (sqlError) {\n\t reject(sqlError);\n\t });\n\t });\n\t}\n\t\n\tfunction dropInstance$1(options, callback) {\n\t callback = getCallback.apply(this, arguments);\n\t\n\t var currentConfig = this.config();\n\t options = typeof options !== 'function' && options || {};\n\t if (!options.name) {\n\t options.name = options.name || currentConfig.name;\n\t options.storeName = options.storeName || currentConfig.storeName;\n\t }\n\t\n\t var self = this;\n\t var promise;\n\t if (!options.name) {\n\t promise = Promise$1.reject('Invalid arguments');\n\t } else {\n\t promise = new Promise$1(function (resolve) {\n\t var db;\n\t if (options.name === currentConfig.name) {\n\t // use the db reference of the current instance\n\t db = self._dbInfo.db;\n\t } else {\n\t db = openDatabase(options.name, '', '', 0);\n\t }\n\t\n\t if (!options.storeName) {\n\t // drop all database tables\n\t resolve(getAllStoreNames(db));\n\t } else {\n\t resolve({\n\t db: db,\n\t storeNames: [options.storeName]\n\t });\n\t }\n\t }).then(function (operationInfo) {\n\t return new Promise$1(function (resolve, reject) {\n\t operationInfo.db.transaction(function (t) {\n\t function dropTable(storeName) {\n\t return new Promise$1(function (resolve, reject) {\n\t t.executeSql('DROP TABLE IF EXISTS ' + storeName, [], function () {\n\t resolve();\n\t }, function (t, error) {\n\t reject(error);\n\t });\n\t });\n\t }\n\t\n\t var operations = [];\n\t for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) {\n\t operations.push(dropTable(operationInfo.storeNames[i]));\n\t }\n\t\n\t Promise$1.all(operations).then(function () {\n\t resolve();\n\t })[\"catch\"](function (e) {\n\t reject(e);\n\t });\n\t }, function (sqlError) {\n\t reject(sqlError);\n\t });\n\t });\n\t });\n\t }\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tvar webSQLStorage = {\n\t _driver: 'webSQLStorage',\n\t _initStorage: _initStorage$1,\n\t _support: isWebSQLValid(),\n\t iterate: iterate$1,\n\t getItem: getItem$1,\n\t setItem: setItem$1,\n\t removeItem: removeItem$1,\n\t clear: clear$1,\n\t length: length$1,\n\t key: key$1,\n\t keys: keys$1,\n\t dropInstance: dropInstance$1\n\t};\n\t\n\tfunction isLocalStorageValid() {\n\t try {\n\t return typeof localStorage !== 'undefined' && 'setItem' in localStorage &&\n\t // in IE8 typeof localStorage.setItem === 'object'\n\t !!localStorage.setItem;\n\t } catch (e) {\n\t return false;\n\t }\n\t}\n\t\n\tfunction _getKeyPrefix(options, defaultConfig) {\n\t var keyPrefix = options.name + '/';\n\t\n\t if (options.storeName !== defaultConfig.storeName) {\n\t keyPrefix += options.storeName + '/';\n\t }\n\t return keyPrefix;\n\t}\n\t\n\t// Check if localStorage throws when saving an item\n\tfunction checkIfLocalStorageThrows() {\n\t var localStorageTestKey = '_localforage_support_test';\n\t\n\t try {\n\t localStorage.setItem(localStorageTestKey, true);\n\t localStorage.removeItem(localStorageTestKey);\n\t\n\t return false;\n\t } catch (e) {\n\t return true;\n\t }\n\t}\n\t\n\t// Check if localStorage is usable and allows to save an item\n\t// This method checks if localStorage is usable in Safari Private Browsing\n\t// mode, or in any other case where the available quota for localStorage\n\t// is 0 and there wasn't any saved items yet.\n\tfunction _isLocalStorageUsable() {\n\t return !checkIfLocalStorageThrows() || localStorage.length > 0;\n\t}\n\t\n\t// Config the localStorage backend, using options set in the config.\n\tfunction _initStorage$2(options) {\n\t var self = this;\n\t var dbInfo = {};\n\t if (options) {\n\t for (var i in options) {\n\t dbInfo[i] = options[i];\n\t }\n\t }\n\t\n\t dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig);\n\t\n\t if (!_isLocalStorageUsable()) {\n\t return Promise$1.reject();\n\t }\n\t\n\t self._dbInfo = dbInfo;\n\t dbInfo.serializer = localforageSerializer;\n\t\n\t return Promise$1.resolve();\n\t}\n\t\n\t// Remove all keys from the datastore, effectively destroying all data in\n\t// the app's key/value store!\n\tfunction clear$2(callback) {\n\t var self = this;\n\t var promise = self.ready().then(function () {\n\t var keyPrefix = self._dbInfo.keyPrefix;\n\t\n\t for (var i = localStorage.length - 1; i >= 0; i--) {\n\t var key = localStorage.key(i);\n\t\n\t if (key.indexOf(keyPrefix) === 0) {\n\t localStorage.removeItem(key);\n\t }\n\t }\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\t// Retrieve an item from the store. Unlike the original async_storage\n\t// library in Gaia, we don't modify return values at all. If a key's value\n\t// is `undefined`, we pass that value to the callback function.\n\tfunction getItem$2(key, callback) {\n\t var self = this;\n\t\n\t key = normalizeKey(key);\n\t\n\t var promise = self.ready().then(function () {\n\t var dbInfo = self._dbInfo;\n\t var result = localStorage.getItem(dbInfo.keyPrefix + key);\n\t\n\t // If a result was found, parse it from the serialized\n\t // string into a JS object. If result isn't truthy, the key\n\t // is likely undefined and we'll pass it straight to the\n\t // callback.\n\t if (result) {\n\t result = dbInfo.serializer.deserialize(result);\n\t }\n\t\n\t return result;\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\t// Iterate over all items in the store.\n\tfunction iterate$2(iterator, callback) {\n\t var self = this;\n\t\n\t var promise = self.ready().then(function () {\n\t var dbInfo = self._dbInfo;\n\t var keyPrefix = dbInfo.keyPrefix;\n\t var keyPrefixLength = keyPrefix.length;\n\t var length = localStorage.length;\n\t\n\t // We use a dedicated iterator instead of the `i` variable below\n\t // so other keys we fetch in localStorage aren't counted in\n\t // the `iterationNumber` argument passed to the `iterate()`\n\t // callback.\n\t //\n\t // See: github.com/mozilla/localForage/pull/435#discussion_r38061530\n\t var iterationNumber = 1;\n\t\n\t for (var i = 0; i < length; i++) {\n\t var key = localStorage.key(i);\n\t if (key.indexOf(keyPrefix) !== 0) {\n\t continue;\n\t }\n\t var value = localStorage.getItem(key);\n\t\n\t // If a result was found, parse it from the serialized\n\t // string into a JS object. If result isn't truthy, the\n\t // key is likely undefined and we'll pass it straight\n\t // to the iterator.\n\t if (value) {\n\t value = dbInfo.serializer.deserialize(value);\n\t }\n\t\n\t value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);\n\t\n\t if (value !== void 0) {\n\t return value;\n\t }\n\t }\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\t// Same as localStorage's key() method, except takes a callback.\n\tfunction key$2(n, callback) {\n\t var self = this;\n\t var promise = self.ready().then(function () {\n\t var dbInfo = self._dbInfo;\n\t var result;\n\t try {\n\t result = localStorage.key(n);\n\t } catch (error) {\n\t result = null;\n\t }\n\t\n\t // Remove the prefix from the key, if a key is found.\n\t if (result) {\n\t result = result.substring(dbInfo.keyPrefix.length);\n\t }\n\t\n\t return result;\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tfunction keys$2(callback) {\n\t var self = this;\n\t var promise = self.ready().then(function () {\n\t var dbInfo = self._dbInfo;\n\t var length = localStorage.length;\n\t var keys = [];\n\t\n\t for (var i = 0; i < length; i++) {\n\t var itemKey = localStorage.key(i);\n\t if (itemKey.indexOf(dbInfo.keyPrefix) === 0) {\n\t keys.push(itemKey.substring(dbInfo.keyPrefix.length));\n\t }\n\t }\n\t\n\t return keys;\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\t// Supply the number of keys in the datastore to the callback function.\n\tfunction length$2(callback) {\n\t var self = this;\n\t var promise = self.keys().then(function (keys) {\n\t return keys.length;\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\t// Remove an item from the store, nice and simple.\n\tfunction removeItem$2(key, callback) {\n\t var self = this;\n\t\n\t key = normalizeKey(key);\n\t\n\t var promise = self.ready().then(function () {\n\t var dbInfo = self._dbInfo;\n\t localStorage.removeItem(dbInfo.keyPrefix + key);\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\t// Set a key's value and run an optional callback once the value is set.\n\t// Unlike Gaia's implementation, the callback function is passed the value,\n\t// in case you want to operate on that value only after you're sure it\n\t// saved, or something like that.\n\tfunction setItem$2(key, value, callback) {\n\t var self = this;\n\t\n\t key = normalizeKey(key);\n\t\n\t var promise = self.ready().then(function () {\n\t // Convert undefined values to null.\n\t // https://github.com/mozilla/localForage/pull/42\n\t if (value === undefined) {\n\t value = null;\n\t }\n\t\n\t // Save the original value to pass to the callback.\n\t var originalValue = value;\n\t\n\t return new Promise$1(function (resolve, reject) {\n\t var dbInfo = self._dbInfo;\n\t dbInfo.serializer.serialize(value, function (value, error) {\n\t if (error) {\n\t reject(error);\n\t } else {\n\t try {\n\t localStorage.setItem(dbInfo.keyPrefix + key, value);\n\t resolve(originalValue);\n\t } catch (e) {\n\t // localStorage capacity exceeded.\n\t // TODO: Make this a specific error/event.\n\t if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n\t reject(e);\n\t }\n\t reject(e);\n\t }\n\t }\n\t });\n\t });\n\t });\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tfunction dropInstance$2(options, callback) {\n\t callback = getCallback.apply(this, arguments);\n\t\n\t options = typeof options !== 'function' && options || {};\n\t if (!options.name) {\n\t var currentConfig = this.config();\n\t options.name = options.name || currentConfig.name;\n\t options.storeName = options.storeName || currentConfig.storeName;\n\t }\n\t\n\t var self = this;\n\t var promise;\n\t if (!options.name) {\n\t promise = Promise$1.reject('Invalid arguments');\n\t } else {\n\t promise = new Promise$1(function (resolve) {\n\t if (!options.storeName) {\n\t resolve(options.name + '/');\n\t } else {\n\t resolve(_getKeyPrefix(options, self._defaultConfig));\n\t }\n\t }).then(function (keyPrefix) {\n\t for (var i = localStorage.length - 1; i >= 0; i--) {\n\t var key = localStorage.key(i);\n\t\n\t if (key.indexOf(keyPrefix) === 0) {\n\t localStorage.removeItem(key);\n\t }\n\t }\n\t });\n\t }\n\t\n\t executeCallback(promise, callback);\n\t return promise;\n\t}\n\t\n\tvar localStorageWrapper = {\n\t _driver: 'localStorageWrapper',\n\t _initStorage: _initStorage$2,\n\t _support: isLocalStorageValid(),\n\t iterate: iterate$2,\n\t getItem: getItem$2,\n\t setItem: setItem$2,\n\t removeItem: removeItem$2,\n\t clear: clear$2,\n\t length: length$2,\n\t key: key$2,\n\t keys: keys$2,\n\t dropInstance: dropInstance$2\n\t};\n\t\n\tvar sameValue = function sameValue(x, y) {\n\t return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y);\n\t};\n\t\n\tvar includes = function includes(array, searchElement) {\n\t var len = array.length;\n\t var i = 0;\n\t while (i < len) {\n\t if (sameValue(array[i], searchElement)) {\n\t return true;\n\t }\n\t i++;\n\t }\n\t\n\t return false;\n\t};\n\t\n\tvar isArray = Array.isArray || function (arg) {\n\t return Object.prototype.toString.call(arg) === '[object Array]';\n\t};\n\t\n\t// Drivers are stored here when `defineDriver()` is called.\n\t// They are shared across all instances of localForage.\n\tvar DefinedDrivers = {};\n\t\n\tvar DriverSupport = {};\n\t\n\tvar DefaultDrivers = {\n\t INDEXEDDB: asyncStorage,\n\t WEBSQL: webSQLStorage,\n\t LOCALSTORAGE: localStorageWrapper\n\t};\n\t\n\tvar DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver];\n\t\n\tvar OptionalDriverMethods = ['dropInstance'];\n\t\n\tvar LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'].concat(OptionalDriverMethods);\n\t\n\tvar DefaultConfig = {\n\t description: '',\n\t driver: DefaultDriverOrder.slice(),\n\t name: 'localforage',\n\t // Default DB size is _JUST UNDER_ 5MB, as it's the highest size\n\t // we can use without a prompt.\n\t size: 4980736,\n\t storeName: 'keyvaluepairs',\n\t version: 1.0\n\t};\n\t\n\tfunction callWhenReady(localForageInstance, libraryMethod) {\n\t localForageInstance[libraryMethod] = function () {\n\t var _args = arguments;\n\t return localForageInstance.ready().then(function () {\n\t return localForageInstance[libraryMethod].apply(localForageInstance, _args);\n\t });\n\t };\n\t}\n\t\n\tfunction extend() {\n\t for (var i = 1; i < arguments.length; i++) {\n\t var arg = arguments[i];\n\t\n\t if (arg) {\n\t for (var _key in arg) {\n\t if (arg.hasOwnProperty(_key)) {\n\t if (isArray(arg[_key])) {\n\t arguments[0][_key] = arg[_key].slice();\n\t } else {\n\t arguments[0][_key] = arg[_key];\n\t }\n\t }\n\t }\n\t }\n\t }\n\t\n\t return arguments[0];\n\t}\n\t\n\tvar LocalForage = function () {\n\t function LocalForage(options) {\n\t _classCallCheck(this, LocalForage);\n\t\n\t for (var driverTypeKey in DefaultDrivers) {\n\t if (DefaultDrivers.hasOwnProperty(driverTypeKey)) {\n\t var driver = DefaultDrivers[driverTypeKey];\n\t var driverName = driver._driver;\n\t this[driverTypeKey] = driverName;\n\t\n\t if (!DefinedDrivers[driverName]) {\n\t // we don't need to wait for the promise,\n\t // since the default drivers can be defined\n\t // in a blocking manner\n\t this.defineDriver(driver);\n\t }\n\t }\n\t }\n\t\n\t this._defaultConfig = extend({}, DefaultConfig);\n\t this._config = extend({}, this._defaultConfig, options);\n\t this._driverSet = null;\n\t this._initDriver = null;\n\t this._ready = false;\n\t this._dbInfo = null;\n\t\n\t this._wrapLibraryMethodsWithReady();\n\t this.setDriver(this._config.driver)[\"catch\"](function () {});\n\t }\n\t\n\t // Set any config values for localForage; can be called anytime before\n\t // the first API call (e.g. `getItem`, `setItem`).\n\t // We loop through options so we don't overwrite existing config\n\t // values.\n\t\n\t\n\t LocalForage.prototype.config = function config(options) {\n\t // If the options argument is an object, we use it to set values.\n\t // Otherwise, we return either a specified config value or all\n\t // config values.\n\t if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n\t // If localforage is ready and fully initialized, we can't set\n\t // any new configuration values. Instead, we return an error.\n\t if (this._ready) {\n\t return new Error(\"Can't call config() after localforage \" + 'has been used.');\n\t }\n\t\n\t for (var i in options) {\n\t if (i === 'storeName') {\n\t options[i] = options[i].replace(/\\W/g, '_');\n\t }\n\t\n\t if (i === 'version' && typeof options[i] !== 'number') {\n\t return new Error('Database version must be a number.');\n\t }\n\t\n\t this._config[i] = options[i];\n\t }\n\t\n\t // after all config options are set and\n\t // the driver option is used, try setting it\n\t if ('driver' in options && options.driver) {\n\t return this.setDriver(this._config.driver);\n\t }\n\t\n\t return true;\n\t } else if (typeof options === 'string') {\n\t return this._config[options];\n\t } else {\n\t return this._config;\n\t }\n\t };\n\t\n\t // Used to define a custom driver, shared across all instances of\n\t // localForage.\n\t\n\t\n\t LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {\n\t var promise = new Promise$1(function (resolve, reject) {\n\t try {\n\t var driverName = driverObject._driver;\n\t var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');\n\t\n\t // A driver name should be defined and not overlap with the\n\t // library-defined, default drivers.\n\t if (!driverObject._driver) {\n\t reject(complianceError);\n\t return;\n\t }\n\t\n\t var driverMethods = LibraryMethods.concat('_initStorage');\n\t for (var i = 0, len = driverMethods.length; i < len; i++) {\n\t var driverMethodName = driverMethods[i];\n\t\n\t // when the property is there,\n\t // it should be a method even when optional\n\t var isRequired = !includes(OptionalDriverMethods, driverMethodName);\n\t if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== 'function') {\n\t reject(complianceError);\n\t return;\n\t }\n\t }\n\t\n\t var configureMissingMethods = function configureMissingMethods() {\n\t var methodNotImplementedFactory = function methodNotImplementedFactory(methodName) {\n\t return function () {\n\t var error = new Error('Method ' + methodName + ' is not implemented by the current driver');\n\t var promise = Promise$1.reject(error);\n\t executeCallback(promise, arguments[arguments.length - 1]);\n\t return promise;\n\t };\n\t };\n\t\n\t for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) {\n\t var optionalDriverMethod = OptionalDriverMethods[_i];\n\t if (!driverObject[optionalDriverMethod]) {\n\t driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod);\n\t }\n\t }\n\t };\n\t\n\t configureMissingMethods();\n\t\n\t var setDriverSupport = function setDriverSupport(support) {\n\t if (DefinedDrivers[driverName]) {\n\t console.info('Redefining LocalForage driver: ' + driverName);\n\t }\n\t DefinedDrivers[driverName] = driverObject;\n\t DriverSupport[driverName] = support;\n\t // don't use a then, so that we can define\n\t // drivers that have simple _support methods\n\t // in a blocking manner\n\t resolve();\n\t };\n\t\n\t if ('_support' in driverObject) {\n\t if (driverObject._support && typeof driverObject._support === 'function') {\n\t driverObject._support().then(setDriverSupport, reject);\n\t } else {\n\t setDriverSupport(!!driverObject._support);\n\t }\n\t } else {\n\t setDriverSupport(true);\n\t }\n\t } catch (e) {\n\t reject(e);\n\t }\n\t });\n\t\n\t executeTwoCallbacks(promise, callback, errorCallback);\n\t return promise;\n\t };\n\t\n\t LocalForage.prototype.driver = function driver() {\n\t return this._driver || null;\n\t };\n\t\n\t LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {\n\t var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error('Driver not found.'));\n\t\n\t executeTwoCallbacks(getDriverPromise, callback, errorCallback);\n\t return getDriverPromise;\n\t };\n\t\n\t LocalForage.prototype.getSerializer = function getSerializer(callback) {\n\t var serializerPromise = Promise$1.resolve(localforageSerializer);\n\t executeTwoCallbacks(serializerPromise, callback);\n\t return serializerPromise;\n\t };\n\t\n\t LocalForage.prototype.ready = function ready(callback) {\n\t var self = this;\n\t\n\t var promise = self._driverSet.then(function () {\n\t if (self._ready === null) {\n\t self._ready = self._initDriver();\n\t }\n\t\n\t return self._ready;\n\t });\n\t\n\t executeTwoCallbacks(promise, callback, callback);\n\t return promise;\n\t };\n\t\n\t LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {\n\t var self = this;\n\t\n\t if (!isArray(drivers)) {\n\t drivers = [drivers];\n\t }\n\t\n\t var supportedDrivers = this._getSupportedDrivers(drivers);\n\t\n\t function setDriverToConfig() {\n\t self._config.driver = self.driver();\n\t }\n\t\n\t function extendSelfWithDriver(driver) {\n\t self._extend(driver);\n\t setDriverToConfig();\n\t\n\t self._ready = self._initStorage(self._config);\n\t return self._ready;\n\t }\n\t\n\t function initDriver(supportedDrivers) {\n\t return function () {\n\t var currentDriverIndex = 0;\n\t\n\t function driverPromiseLoop() {\n\t while (currentDriverIndex < supportedDrivers.length) {\n\t var driverName = supportedDrivers[currentDriverIndex];\n\t currentDriverIndex++;\n\t\n\t self._dbInfo = null;\n\t self._ready = null;\n\t\n\t return self.getDriver(driverName).then(extendSelfWithDriver)[\"catch\"](driverPromiseLoop);\n\t }\n\t\n\t setDriverToConfig();\n\t var error = new Error('No available storage method found.');\n\t self._driverSet = Promise$1.reject(error);\n\t return self._driverSet;\n\t }\n\t\n\t return driverPromiseLoop();\n\t };\n\t }\n\t\n\t // There might be a driver initialization in progress\n\t // so wait for it to finish in order to avoid a possible\n\t // race condition to set _dbInfo\n\t var oldDriverSetDone = this._driverSet !== null ? this._driverSet[\"catch\"](function () {\n\t return Promise$1.resolve();\n\t }) : Promise$1.resolve();\n\t\n\t this._driverSet = oldDriverSetDone.then(function () {\n\t var driverName = supportedDrivers[0];\n\t self._dbInfo = null;\n\t self._ready = null;\n\t\n\t return self.getDriver(driverName).then(function (driver) {\n\t self._driver = driver._driver;\n\t setDriverToConfig();\n\t self._wrapLibraryMethodsWithReady();\n\t self._initDriver = initDriver(supportedDrivers);\n\t });\n\t })[\"catch\"](function () {\n\t setDriverToConfig();\n\t var error = new Error('No available storage method found.');\n\t self._driverSet = Promise$1.reject(error);\n\t return self._driverSet;\n\t });\n\t\n\t executeTwoCallbacks(this._driverSet, callback, errorCallback);\n\t return this._driverSet;\n\t };\n\t\n\t LocalForage.prototype.supports = function supports(driverName) {\n\t return !!DriverSupport[driverName];\n\t };\n\t\n\t LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {\n\t extend(this, libraryMethodsAndProperties);\n\t };\n\t\n\t LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {\n\t var supportedDrivers = [];\n\t for (var i = 0, len = drivers.length; i < len; i++) {\n\t var driverName = drivers[i];\n\t if (this.supports(driverName)) {\n\t supportedDrivers.push(driverName);\n\t }\n\t }\n\t return supportedDrivers;\n\t };\n\t\n\t LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {\n\t // Add a stub for each driver API method that delays the call to the\n\t // corresponding driver method until localForage is ready. These stubs\n\t // will be replaced by the driver methods as soon as the driver is\n\t // loaded, so there is no performance impact.\n\t for (var i = 0, len = LibraryMethods.length; i < len; i++) {\n\t callWhenReady(this, LibraryMethods[i]);\n\t }\n\t };\n\t\n\t LocalForage.prototype.createInstance = function createInstance(options) {\n\t return new LocalForage(options);\n\t };\n\t\n\t return LocalForage;\n\t}();\n\t\n\t// The actual localForage object that we expose as a module or via a\n\t// global. It's extended by pulling in one of our other libraries.\n\t\n\t\n\tvar localforage_js = new LocalForage();\n\t\n\tmodule.exports = localforage_js;\n\t\n\t},{\"3\":3}]},{},[4])(4)\n\t});\n\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// sw.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6bafe90012b3388a3304","/* eslint-env serviceworker */\n\nimport localForage from 'localforage'\n\nfunction isEnabled () {\n return localForage.getItem('vuex-lz')\n .then(data => data.config.webPushNotifications)\n}\n\nfunction getWindowClients () {\n return clients.matchAll({ includeUncontrolled: true })\n .then((clientList) => clientList.filter(({ type }) => type === 'window'))\n}\n\nself.addEventListener('push', (event) => {\n if (event.data) {\n event.waitUntil(isEnabled().then((isEnabled) => {\n return isEnabled && getWindowClients().then((list) => {\n const data = event.data.json()\n\n if (list.length === 0) return self.registration.showNotification(data.title, data)\n })\n }))\n }\n})\n\nself.addEventListener('notificationclick', (event) => {\n event.notification.close()\n\n event.waitUntil(getWindowClients().then((list) => {\n for (var i = 0; i < list.length; i++) {\n var client = list[i]\n if (client.url === '/' && 'focus' in client) { return client.focus() }\n }\n\n if (clients.openWindow) return clients.openWindow('/')\n }))\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/sw.js","/*!\n localForage -- Offline Storage, Improved\n Version 1.7.3\n https://localforage.github.io/localForage\n (c) 2013-2017 Mozilla, Apache License 2.0\n*/\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.localforage = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw (f.code=\"MODULE_NOT_FOUND\", f)}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nvar Mutation = global.MutationObserver || global.WebKitMutationObserver;\n\nvar scheduleDrain;\n\n{\n if (Mutation) {\n var called = 0;\n var observer = new Mutation(nextTick);\n var element = global.document.createTextNode('');\n observer.observe(element, {\n characterData: true\n });\n scheduleDrain = function () {\n element.data = (called = ++called % 2);\n };\n } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') {\n var channel = new global.MessageChannel();\n channel.port1.onmessage = nextTick;\n scheduleDrain = function () {\n channel.port2.postMessage(0);\n };\n } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) {\n scheduleDrain = function () {\n\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var scriptEl = global.document.createElement('script');\n scriptEl.onreadystatechange = function () {\n nextTick();\n\n scriptEl.onreadystatechange = null;\n scriptEl.parentNode.removeChild(scriptEl);\n scriptEl = null;\n };\n global.document.documentElement.appendChild(scriptEl);\n };\n } else {\n scheduleDrain = function () {\n setTimeout(nextTick, 0);\n };\n }\n}\n\nvar draining;\nvar queue = [];\n//named nextTick for less confusing stack traces\nfunction nextTick() {\n draining = true;\n var i, oldQueue;\n var len = queue.length;\n while (len) {\n oldQueue = queue;\n queue = [];\n i = -1;\n while (++i < len) {\n oldQueue[i]();\n }\n len = queue.length;\n }\n draining = false;\n}\n\nmodule.exports = immediate;\nfunction immediate(task) {\n if (queue.push(task) === 1 && !draining) {\n scheduleDrain();\n }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],2:[function(_dereq_,module,exports){\n'use strict';\nvar immediate = _dereq_(1);\n\n/* istanbul ignore next */\nfunction INTERNAL() {}\n\nvar handlers = {};\n\nvar REJECTED = ['REJECTED'];\nvar FULFILLED = ['FULFILLED'];\nvar PENDING = ['PENDING'];\n\nmodule.exports = Promise;\n\nfunction Promise(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('resolver must be a function');\n }\n this.state = PENDING;\n this.queue = [];\n this.outcome = void 0;\n if (resolver !== INTERNAL) {\n safelyResolveThenable(this, resolver);\n }\n}\n\nPromise.prototype[\"catch\"] = function (onRejected) {\n return this.then(null, onRejected);\n};\nPromise.prototype.then = function (onFulfilled, onRejected) {\n if (typeof onFulfilled !== 'function' && this.state === FULFILLED ||\n typeof onRejected !== 'function' && this.state === REJECTED) {\n return this;\n }\n var promise = new this.constructor(INTERNAL);\n if (this.state !== PENDING) {\n var resolver = this.state === FULFILLED ? onFulfilled : onRejected;\n unwrap(promise, resolver, this.outcome);\n } else {\n this.queue.push(new QueueItem(promise, onFulfilled, onRejected));\n }\n\n return promise;\n};\nfunction QueueItem(promise, onFulfilled, onRejected) {\n this.promise = promise;\n if (typeof onFulfilled === 'function') {\n this.onFulfilled = onFulfilled;\n this.callFulfilled = this.otherCallFulfilled;\n }\n if (typeof onRejected === 'function') {\n this.onRejected = onRejected;\n this.callRejected = this.otherCallRejected;\n }\n}\nQueueItem.prototype.callFulfilled = function (value) {\n handlers.resolve(this.promise, value);\n};\nQueueItem.prototype.otherCallFulfilled = function (value) {\n unwrap(this.promise, this.onFulfilled, value);\n};\nQueueItem.prototype.callRejected = function (value) {\n handlers.reject(this.promise, value);\n};\nQueueItem.prototype.otherCallRejected = function (value) {\n unwrap(this.promise, this.onRejected, value);\n};\n\nfunction unwrap(promise, func, value) {\n immediate(function () {\n var returnValue;\n try {\n returnValue = func(value);\n } catch (e) {\n return handlers.reject(promise, e);\n }\n if (returnValue === promise) {\n handlers.reject(promise, new TypeError('Cannot resolve promise with itself'));\n } else {\n handlers.resolve(promise, returnValue);\n }\n });\n}\n\nhandlers.resolve = function (self, value) {\n var result = tryCatch(getThen, value);\n if (result.status === 'error') {\n return handlers.reject(self, result.value);\n }\n var thenable = result.value;\n\n if (thenable) {\n safelyResolveThenable(self, thenable);\n } else {\n self.state = FULFILLED;\n self.outcome = value;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callFulfilled(value);\n }\n }\n return self;\n};\nhandlers.reject = function (self, error) {\n self.state = REJECTED;\n self.outcome = error;\n var i = -1;\n var len = self.queue.length;\n while (++i < len) {\n self.queue[i].callRejected(error);\n }\n return self;\n};\n\nfunction getThen(obj) {\n // Make sure we only access the accessor once as required by the spec\n var then = obj && obj.then;\n if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {\n return function appyThen() {\n then.apply(obj, arguments);\n };\n }\n}\n\nfunction safelyResolveThenable(self, thenable) {\n // Either fulfill, reject or reject with error\n var called = false;\n function onError(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.reject(self, value);\n }\n\n function onSuccess(value) {\n if (called) {\n return;\n }\n called = true;\n handlers.resolve(self, value);\n }\n\n function tryToUnwrap() {\n thenable(onSuccess, onError);\n }\n\n var result = tryCatch(tryToUnwrap);\n if (result.status === 'error') {\n onError(result.value);\n }\n}\n\nfunction tryCatch(func, value) {\n var out = {};\n try {\n out.value = func(value);\n out.status = 'success';\n } catch (e) {\n out.status = 'error';\n out.value = e;\n }\n return out;\n}\n\nPromise.resolve = resolve;\nfunction resolve(value) {\n if (value instanceof this) {\n return value;\n }\n return handlers.resolve(new this(INTERNAL), value);\n}\n\nPromise.reject = reject;\nfunction reject(reason) {\n var promise = new this(INTERNAL);\n return handlers.reject(promise, reason);\n}\n\nPromise.all = all;\nfunction all(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var values = new Array(len);\n var resolved = 0;\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n allResolver(iterable[i], i);\n }\n return promise;\n function allResolver(value, i) {\n self.resolve(value).then(resolveFromAll, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n function resolveFromAll(outValue) {\n values[i] = outValue;\n if (++resolved === len && !called) {\n called = true;\n handlers.resolve(promise, values);\n }\n }\n }\n}\n\nPromise.race = race;\nfunction race(iterable) {\n var self = this;\n if (Object.prototype.toString.call(iterable) !== '[object Array]') {\n return this.reject(new TypeError('must be an array'));\n }\n\n var len = iterable.length;\n var called = false;\n if (!len) {\n return this.resolve([]);\n }\n\n var i = -1;\n var promise = new this(INTERNAL);\n\n while (++i < len) {\n resolver(iterable[i]);\n }\n return promise;\n function resolver(value) {\n self.resolve(value).then(function (response) {\n if (!called) {\n called = true;\n handlers.resolve(promise, response);\n }\n }, function (error) {\n if (!called) {\n called = true;\n handlers.reject(promise, error);\n }\n });\n }\n}\n\n},{\"1\":1}],3:[function(_dereq_,module,exports){\n(function (global){\n'use strict';\nif (typeof global.Promise !== 'function') {\n global.Promise = _dereq_(2);\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"2\":2}],4:[function(_dereq_,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction getIDB() {\n /* global indexedDB,webkitIndexedDB,mozIndexedDB,OIndexedDB,msIndexedDB */\n try {\n if (typeof indexedDB !== 'undefined') {\n return indexedDB;\n }\n if (typeof webkitIndexedDB !== 'undefined') {\n return webkitIndexedDB;\n }\n if (typeof mozIndexedDB !== 'undefined') {\n return mozIndexedDB;\n }\n if (typeof OIndexedDB !== 'undefined') {\n return OIndexedDB;\n }\n if (typeof msIndexedDB !== 'undefined') {\n return msIndexedDB;\n }\n } catch (e) {\n return;\n }\n}\n\nvar idb = getIDB();\n\nfunction isIndexedDBValid() {\n try {\n // Initialize IndexedDB; fall back to vendor-prefixed versions\n // if needed.\n if (!idb) {\n return false;\n }\n // We mimic PouchDB here;\n //\n // We test for openDatabase because IE Mobile identifies itself\n // as Safari. Oh the lulz...\n var isSafari = typeof openDatabase !== 'undefined' && /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n\n var hasFetch = typeof fetch === 'function' && fetch.toString().indexOf('[native code') !== -1;\n\n // Safari <10.1 does not meet our requirements for IDB support (#5572)\n // since Safari 10.1 shipped with fetch, we can use that to detect it\n return (!isSafari || hasFetch) && typeof indexedDB !== 'undefined' &&\n // some outdated implementations of IDB that appear on Samsung\n // and HTC Android devices <4.4 are missing IDBKeyRange\n // See: https://github.com/mozilla/localForage/issues/128\n // See: https://github.com/mozilla/localForage/issues/272\n typeof IDBKeyRange !== 'undefined';\n } catch (e) {\n return false;\n }\n}\n\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\n// Abstracts constructing a Blob object, so it also works in older\n// browsers that don't support the native Blob constructor. (i.e.\n// old QtWebKit versions, at least).\nfunction createBlob(parts, properties) {\n /* global BlobBuilder,MSBlobBuilder,MozBlobBuilder,WebKitBlobBuilder */\n parts = parts || [];\n properties = properties || {};\n try {\n return new Blob(parts, properties);\n } catch (e) {\n if (e.name !== 'TypeError') {\n throw e;\n }\n var Builder = typeof BlobBuilder !== 'undefined' ? BlobBuilder : typeof MSBlobBuilder !== 'undefined' ? MSBlobBuilder : typeof MozBlobBuilder !== 'undefined' ? MozBlobBuilder : WebKitBlobBuilder;\n var builder = new Builder();\n for (var i = 0; i < parts.length; i += 1) {\n builder.append(parts[i]);\n }\n return builder.getBlob(properties.type);\n }\n}\n\n// This is CommonJS because lie is an external dependency, so Rollup\n// can just ignore it.\nif (typeof Promise === 'undefined') {\n // In the \"nopromises\" build this will just throw if you don't have\n // a global promise object, but it would throw anyway later.\n _dereq_(3);\n}\nvar Promise$1 = Promise;\n\nfunction executeCallback(promise, callback) {\n if (callback) {\n promise.then(function (result) {\n callback(null, result);\n }, function (error) {\n callback(error);\n });\n }\n}\n\nfunction executeTwoCallbacks(promise, callback, errorCallback) {\n if (typeof callback === 'function') {\n promise.then(callback);\n }\n\n if (typeof errorCallback === 'function') {\n promise[\"catch\"](errorCallback);\n }\n}\n\nfunction normalizeKey(key) {\n // Cast the key to a string, as that's all we can set as a key.\n if (typeof key !== 'string') {\n console.warn(key + ' used as a key, but it is not a string.');\n key = String(key);\n }\n\n return key;\n}\n\nfunction getCallback() {\n if (arguments.length && typeof arguments[arguments.length - 1] === 'function') {\n return arguments[arguments.length - 1];\n }\n}\n\n// Some code originally from async_storage.js in\n// [Gaia](https://github.com/mozilla-b2g/gaia).\n\nvar DETECT_BLOB_SUPPORT_STORE = 'local-forage-detect-blob-support';\nvar supportsBlobs = void 0;\nvar dbContexts = {};\nvar toString = Object.prototype.toString;\n\n// Transaction Modes\nvar READ_ONLY = 'readonly';\nvar READ_WRITE = 'readwrite';\n\n// Transform a binary string to an array buffer, because otherwise\n// weird stuff happens when you try to work with the binary string directly.\n// It is known.\n// From http://stackoverflow.com/questions/14967647/ (continues on next line)\n// encode-decode-image-with-base64-breaks-image (2013-04-21)\nfunction _binStringToArrayBuffer(bin) {\n var length = bin.length;\n var buf = new ArrayBuffer(length);\n var arr = new Uint8Array(buf);\n for (var i = 0; i < length; i++) {\n arr[i] = bin.charCodeAt(i);\n }\n return buf;\n}\n\n//\n// Blobs are not supported in all versions of IndexedDB, notably\n// Chrome <37 and Android <5. In those versions, storing a blob will throw.\n//\n// Various other blob bugs exist in Chrome v37-42 (inclusive).\n// Detecting them is expensive and confusing to users, and Chrome 37-42\n// is at very low usage worldwide, so we do a hacky userAgent check instead.\n//\n// content-type bug: https://code.google.com/p/chromium/issues/detail?id=408120\n// 404 bug: https://code.google.com/p/chromium/issues/detail?id=447916\n// FileReader bug: https://code.google.com/p/chromium/issues/detail?id=447836\n//\n// Code borrowed from PouchDB. See:\n// https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-adapter-idb/src/blobSupport.js\n//\nfunction _checkBlobSupportWithoutCaching(idb) {\n return new Promise$1(function (resolve) {\n var txn = idb.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE);\n var blob = createBlob(['']);\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n txn.onabort = function (e) {\n // If the transaction aborts now its due to not being able to\n // write to the database, likely due to the disk being full\n e.preventDefault();\n e.stopPropagation();\n resolve(false);\n };\n\n txn.oncomplete = function () {\n var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n var matchedEdge = navigator.userAgent.match(/Edge\\//);\n // MS Edge pretends to be Chrome 42:\n // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n };\n })[\"catch\"](function () {\n return false; // error, so assume unsupported\n });\n}\n\nfunction _checkBlobSupport(idb) {\n if (typeof supportsBlobs === 'boolean') {\n return Promise$1.resolve(supportsBlobs);\n }\n return _checkBlobSupportWithoutCaching(idb).then(function (value) {\n supportsBlobs = value;\n return supportsBlobs;\n });\n}\n\nfunction _deferReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Create a deferred object representing the current database operation.\n var deferredOperation = {};\n\n deferredOperation.promise = new Promise$1(function (resolve, reject) {\n deferredOperation.resolve = resolve;\n deferredOperation.reject = reject;\n });\n\n // Enqueue the deferred operation.\n dbContext.deferredOperations.push(deferredOperation);\n\n // Chain its promise to the database readiness.\n if (!dbContext.dbReady) {\n dbContext.dbReady = deferredOperation.promise;\n } else {\n dbContext.dbReady = dbContext.dbReady.then(function () {\n return deferredOperation.promise;\n });\n }\n}\n\nfunction _advanceReadiness(dbInfo) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Resolve its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.resolve();\n return deferredOperation.promise;\n }\n}\n\nfunction _rejectReadiness(dbInfo, err) {\n var dbContext = dbContexts[dbInfo.name];\n\n // Dequeue a deferred operation.\n var deferredOperation = dbContext.deferredOperations.pop();\n\n // Reject its promise (which is part of the database readiness\n // chain of promises).\n if (deferredOperation) {\n deferredOperation.reject(err);\n return deferredOperation.promise;\n }\n}\n\nfunction _getConnection(dbInfo, upgradeNeeded) {\n return new Promise$1(function (resolve, reject) {\n dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext();\n\n if (dbInfo.db) {\n if (upgradeNeeded) {\n _deferReadiness(dbInfo);\n dbInfo.db.close();\n } else {\n return resolve(dbInfo.db);\n }\n }\n\n var dbArgs = [dbInfo.name];\n\n if (upgradeNeeded) {\n dbArgs.push(dbInfo.version);\n }\n\n var openreq = idb.open.apply(idb, dbArgs);\n\n if (upgradeNeeded) {\n openreq.onupgradeneeded = function (e) {\n var db = openreq.result;\n try {\n db.createObjectStore(dbInfo.storeName);\n if (e.oldVersion <= 1) {\n // Added when support for blob shims was added\n db.createObjectStore(DETECT_BLOB_SUPPORT_STORE);\n }\n } catch (ex) {\n if (ex.name === 'ConstraintError') {\n console.warn('The database \"' + dbInfo.name + '\"' + ' has been upgraded from version ' + e.oldVersion + ' to version ' + e.newVersion + ', but the storage \"' + dbInfo.storeName + '\" already exists.');\n } else {\n throw ex;\n }\n }\n };\n }\n\n openreq.onerror = function (e) {\n e.preventDefault();\n reject(openreq.error);\n };\n\n openreq.onsuccess = function () {\n resolve(openreq.result);\n _advanceReadiness(dbInfo);\n };\n });\n}\n\nfunction _getOriginalConnection(dbInfo) {\n return _getConnection(dbInfo, false);\n}\n\nfunction _getUpgradedConnection(dbInfo) {\n return _getConnection(dbInfo, true);\n}\n\nfunction _isUpgradeNeeded(dbInfo, defaultVersion) {\n if (!dbInfo.db) {\n return true;\n }\n\n var isNewStore = !dbInfo.db.objectStoreNames.contains(dbInfo.storeName);\n var isDowngrade = dbInfo.version < dbInfo.db.version;\n var isUpgrade = dbInfo.version > dbInfo.db.version;\n\n if (isDowngrade) {\n // If the version is not the default one\n // then warn for impossible downgrade.\n if (dbInfo.version !== defaultVersion) {\n console.warn('The database \"' + dbInfo.name + '\"' + \" can't be downgraded from version \" + dbInfo.db.version + ' to version ' + dbInfo.version + '.');\n }\n // Align the versions to prevent errors.\n dbInfo.version = dbInfo.db.version;\n }\n\n if (isUpgrade || isNewStore) {\n // If the store is new then increment the version (if needed).\n // This will trigger an \"upgradeneeded\" event which is required\n // for creating a store.\n if (isNewStore) {\n var incVersion = dbInfo.db.version + 1;\n if (incVersion > dbInfo.version) {\n dbInfo.version = incVersion;\n }\n }\n\n return true;\n }\n\n return false;\n}\n\n// encode a blob for indexeddb engines that don't support blobs\nfunction _encodeBlob(blob) {\n return new Promise$1(function (resolve, reject) {\n var reader = new FileReader();\n reader.onerror = reject;\n reader.onloadend = function (e) {\n var base64 = btoa(e.target.result || '');\n resolve({\n __local_forage_encoded_blob: true,\n data: base64,\n type: blob.type\n });\n };\n reader.readAsBinaryString(blob);\n });\n}\n\n// decode an encoded blob\nfunction _decodeBlob(encodedBlob) {\n var arrayBuff = _binStringToArrayBuffer(atob(encodedBlob.data));\n return createBlob([arrayBuff], { type: encodedBlob.type });\n}\n\n// is this one of our fancy encoded blobs?\nfunction _isEncodedBlob(value) {\n return value && value.__local_forage_encoded_blob;\n}\n\n// Specialize the default `ready()` function by making it dependent\n// on the current database operations. Thus, the driver will be actually\n// ready when it's been initialized (default) *and* there are no pending\n// operations on the database (initiated by some other instances).\nfunction _fullyReady(callback) {\n var self = this;\n\n var promise = self._initReady().then(function () {\n var dbContext = dbContexts[self._dbInfo.name];\n\n if (dbContext && dbContext.dbReady) {\n return dbContext.dbReady;\n }\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n}\n\n// Try to establish a new db connection to replace the\n// current one which is broken (i.e. experiencing\n// InvalidStateError while creating a transaction).\nfunction _tryReconnect(dbInfo) {\n _deferReadiness(dbInfo);\n\n var dbContext = dbContexts[dbInfo.name];\n var forages = dbContext.forages;\n\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n if (forage._dbInfo.db) {\n forage._dbInfo.db.close();\n forage._dbInfo.db = null;\n }\n }\n dbInfo.db = null;\n\n return _getOriginalConnection(dbInfo).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n // store the latest db reference\n // in case the db was upgraded\n dbInfo.db = dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n })[\"catch\"](function (err) {\n _rejectReadiness(dbInfo, err);\n throw err;\n });\n}\n\n// FF doesn't like Promises (micro-tasks) and IDDB store operations,\n// so we have to do it with callbacks\nfunction createTransaction(dbInfo, mode, callback, retries) {\n if (retries === undefined) {\n retries = 1;\n }\n\n try {\n var tx = dbInfo.db.transaction(dbInfo.storeName, mode);\n callback(null, tx);\n } catch (err) {\n if (retries > 0 && (!dbInfo.db || err.name === 'InvalidStateError' || err.name === 'NotFoundError')) {\n return Promise$1.resolve().then(function () {\n if (!dbInfo.db || err.name === 'NotFoundError' && !dbInfo.db.objectStoreNames.contains(dbInfo.storeName) && dbInfo.version <= dbInfo.db.version) {\n // increase the db version, to create the new ObjectStore\n if (dbInfo.db) {\n dbInfo.version = dbInfo.db.version + 1;\n }\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n }).then(function () {\n return _tryReconnect(dbInfo).then(function () {\n createTransaction(dbInfo, mode, callback, retries - 1);\n });\n })[\"catch\"](callback);\n }\n\n callback(err);\n }\n}\n\nfunction createDbContext() {\n return {\n // Running localForages sharing a database.\n forages: [],\n // Shared database.\n db: null,\n // Database readiness (promise).\n dbReady: null,\n // Deferred operations on the database.\n deferredOperations: []\n };\n}\n\n// Open the IndexedDB database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n // Get the current context of the database;\n var dbContext = dbContexts[dbInfo.name];\n\n // ...or create a new context.\n if (!dbContext) {\n dbContext = createDbContext();\n // Register the new context in the global container.\n dbContexts[dbInfo.name] = dbContext;\n }\n\n // Register itself as a running localForage in the current context.\n dbContext.forages.push(self);\n\n // Replace the default `ready()` function with the specialized one.\n if (!self._initReady) {\n self._initReady = self.ready;\n self.ready = _fullyReady;\n }\n\n // Create an array of initialization states of the related localForages.\n var initPromises = [];\n\n function ignoreErrors() {\n // Don't handle errors here,\n // just makes sure related localForages aren't pending.\n return Promise$1.resolve();\n }\n\n for (var j = 0; j < dbContext.forages.length; j++) {\n var forage = dbContext.forages[j];\n if (forage !== self) {\n // Don't wait for itself...\n initPromises.push(forage._initReady()[\"catch\"](ignoreErrors));\n }\n }\n\n // Take a snapshot of the related localForages.\n var forages = dbContext.forages.slice(0);\n\n // Initialize the connection process only when\n // all the related localForages aren't pending.\n return Promise$1.all(initPromises).then(function () {\n dbInfo.db = dbContext.db;\n // Get the connection or open a new one without upgrade.\n return _getOriginalConnection(dbInfo);\n }).then(function (db) {\n dbInfo.db = db;\n if (_isUpgradeNeeded(dbInfo, self._defaultConfig.version)) {\n // Reopen the database for upgrading.\n return _getUpgradedConnection(dbInfo);\n }\n return db;\n }).then(function (db) {\n dbInfo.db = dbContext.db = db;\n self._dbInfo = dbInfo;\n // Share the final connection amongst related localForages.\n for (var k = 0; k < forages.length; k++) {\n var forage = forages[k];\n if (forage !== self) {\n // Self is already up-to-date.\n forage._dbInfo.db = dbInfo.db;\n forage._dbInfo.version = dbInfo.version;\n }\n }\n });\n}\n\nfunction getItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.get(key);\n\n req.onsuccess = function () {\n var value = req.result;\n if (value === undefined) {\n value = null;\n }\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n resolve(value);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items stored in database.\nfunction iterate(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openCursor();\n var iterationNumber = 1;\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (cursor) {\n var value = cursor.value;\n if (_isEncodedBlob(value)) {\n value = _decodeBlob(value);\n }\n var result = iterator(value, cursor.key, iterationNumber++);\n\n // when the iterator callback retuns any\n // (non-`undefined`) value, then we stop\n // the iteration immediately\n if (result !== void 0) {\n resolve(result);\n } else {\n cursor[\"continue\"]();\n }\n } else {\n resolve();\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n\n return promise;\n}\n\nfunction setItem(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n var dbInfo;\n self.ready().then(function () {\n dbInfo = self._dbInfo;\n if (toString.call(value) === '[object Blob]') {\n return _checkBlobSupport(dbInfo.db).then(function (blobSupport) {\n if (blobSupport) {\n return value;\n }\n return _encodeBlob(value);\n });\n }\n return value;\n }).then(function (value) {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n\n // The reason we don't _save_ null is because IE 10 does\n // not support saving the `null` type in IndexedDB. How\n // ironic, given the bug below!\n // See: https://github.com/mozilla/localForage/issues/161\n if (value === null) {\n value = undefined;\n }\n\n var req = store.put(value, key);\n\n transaction.oncomplete = function () {\n // Cast to undefined so the value passed to\n // callback/promise is the same as what one would get out\n // of `getItem()` later. This leads to some weirdness\n // (setItem('foo', undefined) will return `null`), but\n // it's not my fault localStorage is our baseline and that\n // it's weird.\n if (value === undefined) {\n value = null;\n }\n\n resolve(value);\n };\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction removeItem(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n // We use a Grunt task to make this safe for IE and some\n // versions of Android (including those used by Cordova).\n // Normally IE won't like `.delete()` and will insist on\n // using `['delete']()`, but we have a build step that\n // fixes this for us now.\n var req = store[\"delete\"](key);\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onerror = function () {\n reject(req.error);\n };\n\n // The request will be also be aborted if we've exceeded our storage\n // space.\n transaction.onabort = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction clear(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_WRITE, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.clear();\n\n transaction.oncomplete = function () {\n resolve();\n };\n\n transaction.onabort = transaction.onerror = function () {\n var err = req.error ? req.error : req.transaction.error;\n reject(err);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction length(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.count();\n\n req.onsuccess = function () {\n resolve(req.result);\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction key(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n if (n < 0) {\n resolve(null);\n\n return;\n }\n\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var advanced = false;\n var req = store.openCursor();\n\n req.onsuccess = function () {\n var cursor = req.result;\n if (!cursor) {\n // this means there weren't enough keys\n resolve(null);\n\n return;\n }\n\n if (n === 0) {\n // We have the first key, return it if that's what they\n // wanted.\n resolve(cursor.key);\n } else {\n if (!advanced) {\n // Otherwise, ask the cursor to skip ahead n\n // records.\n advanced = true;\n cursor.advance(n);\n } else {\n // When we get here, we've got the nth key.\n resolve(cursor.key);\n }\n }\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n createTransaction(self._dbInfo, READ_ONLY, function (err, transaction) {\n if (err) {\n return reject(err);\n }\n\n try {\n var store = transaction.objectStore(self._dbInfo.storeName);\n var req = store.openCursor();\n var keys = [];\n\n req.onsuccess = function () {\n var cursor = req.result;\n\n if (!cursor) {\n resolve(keys);\n return;\n }\n\n keys.push(cursor.key);\n cursor[\"continue\"]();\n };\n\n req.onerror = function () {\n reject(req.error);\n };\n } catch (e) {\n reject(e);\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n var isCurrentDb = options.name === currentConfig.name && self._dbInfo.db;\n\n var dbPromise = isCurrentDb ? Promise$1.resolve(self._dbInfo.db) : _getOriginalConnection(options).then(function (db) {\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n forages[i]._dbInfo.db = db;\n }\n return db;\n });\n\n if (!options.storeName) {\n promise = dbPromise.then(function (db) {\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n }\n\n var dropDBPromise = new Promise$1(function (resolve, reject) {\n var req = idb.deleteDatabase(options.name);\n\n req.onerror = req.onblocked = function (err) {\n var db = req.result;\n if (db) {\n db.close();\n }\n reject(err);\n };\n\n req.onsuccess = function () {\n var db = req.result;\n if (db) {\n db.close();\n }\n resolve(db);\n };\n });\n\n return dropDBPromise.then(function (db) {\n dbContext.db = db;\n for (var i = 0; i < forages.length; i++) {\n var _forage = forages[i];\n _advanceReadiness(_forage._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n } else {\n promise = dbPromise.then(function (db) {\n if (!db.objectStoreNames.contains(options.storeName)) {\n return;\n }\n\n var newVersion = db.version + 1;\n\n _deferReadiness(options);\n\n var dbContext = dbContexts[options.name];\n var forages = dbContext.forages;\n\n db.close();\n for (var i = 0; i < forages.length; i++) {\n var forage = forages[i];\n forage._dbInfo.db = null;\n forage._dbInfo.version = newVersion;\n }\n\n var dropObjectPromise = new Promise$1(function (resolve, reject) {\n var req = idb.open(options.name, newVersion);\n\n req.onerror = function (err) {\n var db = req.result;\n db.close();\n reject(err);\n };\n\n req.onupgradeneeded = function () {\n var db = req.result;\n db.deleteObjectStore(options.storeName);\n };\n\n req.onsuccess = function () {\n var db = req.result;\n db.close();\n resolve(db);\n };\n });\n\n return dropObjectPromise.then(function (db) {\n dbContext.db = db;\n for (var j = 0; j < forages.length; j++) {\n var _forage2 = forages[j];\n _forage2._dbInfo.db = db;\n _advanceReadiness(_forage2._dbInfo);\n }\n })[\"catch\"](function (err) {\n (_rejectReadiness(options, err) || Promise$1.resolve())[\"catch\"](function () {});\n throw err;\n });\n });\n }\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar asyncStorage = {\n _driver: 'asyncStorage',\n _initStorage: _initStorage,\n _support: isIndexedDBValid(),\n iterate: iterate,\n getItem: getItem,\n setItem: setItem,\n removeItem: removeItem,\n clear: clear,\n length: length,\n key: key,\n keys: keys,\n dropInstance: dropInstance\n};\n\nfunction isWebSQLValid() {\n return typeof openDatabase === 'function';\n}\n\n// Sadly, the best way to save binary data in WebSQL/localStorage is serializing\n// it to Base64, so this is how we store it to prevent very strange errors with less\n// verbose ways of binary <-> string data storage.\nvar BASE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\nvar BLOB_TYPE_PREFIX = '~~local_forage_type~';\nvar BLOB_TYPE_PREFIX_REGEX = /^~~local_forage_type~([^~]+)~/;\n\nvar SERIALIZED_MARKER = '__lfsc__:';\nvar SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER.length;\n\n// OMG the serializations!\nvar TYPE_ARRAYBUFFER = 'arbf';\nvar TYPE_BLOB = 'blob';\nvar TYPE_INT8ARRAY = 'si08';\nvar TYPE_UINT8ARRAY = 'ui08';\nvar TYPE_UINT8CLAMPEDARRAY = 'uic8';\nvar TYPE_INT16ARRAY = 'si16';\nvar TYPE_INT32ARRAY = 'si32';\nvar TYPE_UINT16ARRAY = 'ur16';\nvar TYPE_UINT32ARRAY = 'ui32';\nvar TYPE_FLOAT32ARRAY = 'fl32';\nvar TYPE_FLOAT64ARRAY = 'fl64';\nvar TYPE_SERIALIZED_MARKER_LENGTH = SERIALIZED_MARKER_LENGTH + TYPE_ARRAYBUFFER.length;\n\nvar toString$1 = Object.prototype.toString;\n\nfunction stringToBuffer(serializedString) {\n // Fill the string into a ArrayBuffer.\n var bufferLength = serializedString.length * 0.75;\n var len = serializedString.length;\n var i;\n var p = 0;\n var encoded1, encoded2, encoded3, encoded4;\n\n if (serializedString[serializedString.length - 1] === '=') {\n bufferLength--;\n if (serializedString[serializedString.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n var buffer = new ArrayBuffer(bufferLength);\n var bytes = new Uint8Array(buffer);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = BASE_CHARS.indexOf(serializedString[i]);\n encoded2 = BASE_CHARS.indexOf(serializedString[i + 1]);\n encoded3 = BASE_CHARS.indexOf(serializedString[i + 2]);\n encoded4 = BASE_CHARS.indexOf(serializedString[i + 3]);\n\n /*jslint bitwise: true */\n bytes[p++] = encoded1 << 2 | encoded2 >> 4;\n bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;\n bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;\n }\n return buffer;\n}\n\n// Converts a buffer to a string to store, serialized, in the backend\n// storage library.\nfunction bufferToString(buffer) {\n // base64-arraybuffer\n var bytes = new Uint8Array(buffer);\n var base64String = '';\n var i;\n\n for (i = 0; i < bytes.length; i += 3) {\n /*jslint bitwise: true */\n base64String += BASE_CHARS[bytes[i] >> 2];\n base64String += BASE_CHARS[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n base64String += BASE_CHARS[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n base64String += BASE_CHARS[bytes[i + 2] & 63];\n }\n\n if (bytes.length % 3 === 2) {\n base64String = base64String.substring(0, base64String.length - 1) + '=';\n } else if (bytes.length % 3 === 1) {\n base64String = base64String.substring(0, base64String.length - 2) + '==';\n }\n\n return base64String;\n}\n\n// Serialize a value, afterwards executing a callback (which usually\n// instructs the `setItem()` callback/promise to be executed). This is how\n// we store binary data with localStorage.\nfunction serialize(value, callback) {\n var valueType = '';\n if (value) {\n valueType = toString$1.call(value);\n }\n\n // Cannot use `value instanceof ArrayBuffer` or such here, as these\n // checks fail when running the tests using casper.js...\n //\n // TODO: See why those tests fail and use a better solution.\n if (value && (valueType === '[object ArrayBuffer]' || value.buffer && toString$1.call(value.buffer) === '[object ArrayBuffer]')) {\n // Convert binary arrays to a string and prefix the string with\n // a special marker.\n var buffer;\n var marker = SERIALIZED_MARKER;\n\n if (value instanceof ArrayBuffer) {\n buffer = value;\n marker += TYPE_ARRAYBUFFER;\n } else {\n buffer = value.buffer;\n\n if (valueType === '[object Int8Array]') {\n marker += TYPE_INT8ARRAY;\n } else if (valueType === '[object Uint8Array]') {\n marker += TYPE_UINT8ARRAY;\n } else if (valueType === '[object Uint8ClampedArray]') {\n marker += TYPE_UINT8CLAMPEDARRAY;\n } else if (valueType === '[object Int16Array]') {\n marker += TYPE_INT16ARRAY;\n } else if (valueType === '[object Uint16Array]') {\n marker += TYPE_UINT16ARRAY;\n } else if (valueType === '[object Int32Array]') {\n marker += TYPE_INT32ARRAY;\n } else if (valueType === '[object Uint32Array]') {\n marker += TYPE_UINT32ARRAY;\n } else if (valueType === '[object Float32Array]') {\n marker += TYPE_FLOAT32ARRAY;\n } else if (valueType === '[object Float64Array]') {\n marker += TYPE_FLOAT64ARRAY;\n } else {\n callback(new Error('Failed to get type for BinaryArray'));\n }\n }\n\n callback(marker + bufferToString(buffer));\n } else if (valueType === '[object Blob]') {\n // Conver the blob to a binaryArray and then to a string.\n var fileReader = new FileReader();\n\n fileReader.onload = function () {\n // Backwards-compatible prefix for the blob type.\n var str = BLOB_TYPE_PREFIX + value.type + '~' + bufferToString(this.result);\n\n callback(SERIALIZED_MARKER + TYPE_BLOB + str);\n };\n\n fileReader.readAsArrayBuffer(value);\n } else {\n try {\n callback(JSON.stringify(value));\n } catch (e) {\n console.error(\"Couldn't convert value into a JSON string: \", value);\n\n callback(null, e);\n }\n }\n}\n\n// Deserialize data we've inserted into a value column/field. We place\n// special markers into our strings to mark them as encoded; this isn't\n// as nice as a meta field, but it's the only sane thing we can do whilst\n// keeping localStorage support intact.\n//\n// Oftentimes this will just deserialize JSON content, but if we have a\n// special marker (SERIALIZED_MARKER, defined above), we will extract\n// some kind of arraybuffer/binary data/typed array out of the string.\nfunction deserialize(value) {\n // If we haven't marked this string as being specially serialized (i.e.\n // something other than serialized JSON), we can just return it and be\n // done with it.\n if (value.substring(0, SERIALIZED_MARKER_LENGTH) !== SERIALIZED_MARKER) {\n return JSON.parse(value);\n }\n\n // The following code deals with deserializing some kind of Blob or\n // TypedArray. First we separate out the type of data we're dealing\n // with from the data itself.\n var serializedString = value.substring(TYPE_SERIALIZED_MARKER_LENGTH);\n var type = value.substring(SERIALIZED_MARKER_LENGTH, TYPE_SERIALIZED_MARKER_LENGTH);\n\n var blobType;\n // Backwards-compatible blob type serialization strategy.\n // DBs created with older versions of localForage will simply not have the blob type.\n if (type === TYPE_BLOB && BLOB_TYPE_PREFIX_REGEX.test(serializedString)) {\n var matcher = serializedString.match(BLOB_TYPE_PREFIX_REGEX);\n blobType = matcher[1];\n serializedString = serializedString.substring(matcher[0].length);\n }\n var buffer = stringToBuffer(serializedString);\n\n // Return the right type based on the code/type set during\n // serialization.\n switch (type) {\n case TYPE_ARRAYBUFFER:\n return buffer;\n case TYPE_BLOB:\n return createBlob([buffer], { type: blobType });\n case TYPE_INT8ARRAY:\n return new Int8Array(buffer);\n case TYPE_UINT8ARRAY:\n return new Uint8Array(buffer);\n case TYPE_UINT8CLAMPEDARRAY:\n return new Uint8ClampedArray(buffer);\n case TYPE_INT16ARRAY:\n return new Int16Array(buffer);\n case TYPE_UINT16ARRAY:\n return new Uint16Array(buffer);\n case TYPE_INT32ARRAY:\n return new Int32Array(buffer);\n case TYPE_UINT32ARRAY:\n return new Uint32Array(buffer);\n case TYPE_FLOAT32ARRAY:\n return new Float32Array(buffer);\n case TYPE_FLOAT64ARRAY:\n return new Float64Array(buffer);\n default:\n throw new Error('Unkown type: ' + type);\n }\n}\n\nvar localforageSerializer = {\n serialize: serialize,\n deserialize: deserialize,\n stringToBuffer: stringToBuffer,\n bufferToString: bufferToString\n};\n\n/*\n * Includes code from:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n */\n\nfunction createDbTable(t, dbInfo, callback, errorCallback) {\n t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + ' ' + '(id INTEGER PRIMARY KEY, key unique, value)', [], callback, errorCallback);\n}\n\n// Open the WebSQL database (automatically creates one if one didn't\n// previously exist), using any options set in the config.\nfunction _initStorage$1(options) {\n var self = this;\n var dbInfo = {\n db: null\n };\n\n if (options) {\n for (var i in options) {\n dbInfo[i] = typeof options[i] !== 'string' ? options[i].toString() : options[i];\n }\n }\n\n var dbInfoPromise = new Promise$1(function (resolve, reject) {\n // Open the database; the openDatabase API will automatically\n // create it for us if it doesn't exist.\n try {\n dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);\n } catch (e) {\n return reject(e);\n }\n\n // Create our key/value table if it doesn't exist.\n dbInfo.db.transaction(function (t) {\n createDbTable(t, dbInfo, function () {\n self._dbInfo = dbInfo;\n resolve();\n }, function (t, error) {\n reject(error);\n });\n }, reject);\n });\n\n dbInfo.serializer = localforageSerializer;\n return dbInfoPromise;\n}\n\nfunction tryExecuteSql(t, dbInfo, sqlStatement, args, callback, errorCallback) {\n t.executeSql(sqlStatement, args, callback, function (t, error) {\n if (error.code === error.SYNTAX_ERR) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name = ?\", [dbInfo.storeName], function (t, results) {\n if (!results.rows.length) {\n // if the table is missing (was deleted)\n // re-create it table and retry\n createDbTable(t, dbInfo, function () {\n t.executeSql(sqlStatement, args, callback, errorCallback);\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n } else {\n errorCallback(t, error);\n }\n }, errorCallback);\n}\n\nfunction getItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName + ' WHERE key = ? LIMIT 1', [key], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).value : null;\n\n // Check to see if this is serialized content we need to\n // unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction iterate$1(iterator, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT * FROM ' + dbInfo.storeName, [], function (t, results) {\n var rows = results.rows;\n var length = rows.length;\n\n for (var i = 0; i < length; i++) {\n var item = rows.item(i);\n var result = item.value;\n\n // Check to see if this is serialized content\n // we need to unpack.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n result = iterator(result, item.key, i + 1);\n\n // void(0) prevents problems with redefinition\n // of `undefined`.\n if (result !== void 0) {\n resolve(result);\n return;\n }\n }\n\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction _setItem(key, value, callback, retriesLeft) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n // The localStorage API doesn't return undefined values in an\n // \"expected\" way, so undefined is always cast to null in all\n // drivers. See: https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'INSERT OR REPLACE INTO ' + dbInfo.storeName + ' ' + '(key, value) VALUES (?, ?)', [key, value], function () {\n resolve(originalValue);\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n // The transaction failed; check\n // to see if it's a quota error.\n if (sqlError.code === sqlError.QUOTA_ERR) {\n // We reject the callback outright for now, but\n // it's worth trying to re-run the transaction.\n // Even if the user accepts the prompt to use\n // more storage on Safari, this error will\n // be called.\n //\n // Try to re-run the transaction.\n if (retriesLeft > 0) {\n resolve(_setItem.apply(self, [key, originalValue, callback, retriesLeft - 1]));\n return;\n }\n reject(sqlError);\n }\n });\n }\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction setItem$1(key, value, callback) {\n return _setItem.apply(this, [key, value, callback, 1]);\n}\n\nfunction removeItem$1(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName + ' WHERE key = ?', [key], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Deletes every item in the table.\n// TODO: Find out if this resets the AUTO_INCREMENT number.\nfunction clear$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'DELETE FROM ' + dbInfo.storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Does a simple `COUNT(key)` to get the number of items stored in\n// localForage.\nfunction length$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n // Ahhh, SQL makes this one soooooo easy.\n tryExecuteSql(t, dbInfo, 'SELECT COUNT(key) as c FROM ' + dbInfo.storeName, [], function (t, results) {\n var result = results.rows.item(0).c;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Return the key located at key index X; essentially gets the key from a\n// `WHERE id = ?`. This is the most efficient way I can think to implement\n// this rarely-used (in my experience) part of the API, but it can seem\n// inconsistent, because we do `INSERT OR REPLACE INTO` on `setItem()`, so\n// the ID of each key will change every time it's updated. Perhaps a stored\n// procedure for the `setItem()` SQL would solve this problem?\n// TODO: Don't change ID on `setItem()`.\nfunction key$1(n, callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName + ' WHERE id = ? LIMIT 1', [n + 1], function (t, results) {\n var result = results.rows.length ? results.rows.item(0).key : null;\n resolve(result);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$1(callback) {\n var self = this;\n\n var promise = new Promise$1(function (resolve, reject) {\n self.ready().then(function () {\n var dbInfo = self._dbInfo;\n dbInfo.db.transaction(function (t) {\n tryExecuteSql(t, dbInfo, 'SELECT key FROM ' + dbInfo.storeName, [], function (t, results) {\n var keys = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n keys.push(results.rows.item(i).key);\n }\n\n resolve(keys);\n }, function (t, error) {\n reject(error);\n });\n });\n })[\"catch\"](reject);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// https://www.w3.org/TR/webdatabase/#databases\n// > There is no way to enumerate or delete the databases available for an origin from this API.\nfunction getAllStoreNames(db) {\n return new Promise$1(function (resolve, reject) {\n db.transaction(function (t) {\n t.executeSql('SELECT name FROM sqlite_master ' + \"WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'\", [], function (t, results) {\n var storeNames = [];\n\n for (var i = 0; i < results.rows.length; i++) {\n storeNames.push(results.rows.item(i).name);\n }\n\n resolve({\n db: db,\n storeNames: storeNames\n });\n }, function (t, error) {\n reject(error);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n}\n\nfunction dropInstance$1(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n var currentConfig = this.config();\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n var db;\n if (options.name === currentConfig.name) {\n // use the db reference of the current instance\n db = self._dbInfo.db;\n } else {\n db = openDatabase(options.name, '', '', 0);\n }\n\n if (!options.storeName) {\n // drop all database tables\n resolve(getAllStoreNames(db));\n } else {\n resolve({\n db: db,\n storeNames: [options.storeName]\n });\n }\n }).then(function (operationInfo) {\n return new Promise$1(function (resolve, reject) {\n operationInfo.db.transaction(function (t) {\n function dropTable(storeName) {\n return new Promise$1(function (resolve, reject) {\n t.executeSql('DROP TABLE IF EXISTS ' + storeName, [], function () {\n resolve();\n }, function (t, error) {\n reject(error);\n });\n });\n }\n\n var operations = [];\n for (var i = 0, len = operationInfo.storeNames.length; i < len; i++) {\n operations.push(dropTable(operationInfo.storeNames[i]));\n }\n\n Promise$1.all(operations).then(function () {\n resolve();\n })[\"catch\"](function (e) {\n reject(e);\n });\n }, function (sqlError) {\n reject(sqlError);\n });\n });\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar webSQLStorage = {\n _driver: 'webSQLStorage',\n _initStorage: _initStorage$1,\n _support: isWebSQLValid(),\n iterate: iterate$1,\n getItem: getItem$1,\n setItem: setItem$1,\n removeItem: removeItem$1,\n clear: clear$1,\n length: length$1,\n key: key$1,\n keys: keys$1,\n dropInstance: dropInstance$1\n};\n\nfunction isLocalStorageValid() {\n try {\n return typeof localStorage !== 'undefined' && 'setItem' in localStorage &&\n // in IE8 typeof localStorage.setItem === 'object'\n !!localStorage.setItem;\n } catch (e) {\n return false;\n }\n}\n\nfunction _getKeyPrefix(options, defaultConfig) {\n var keyPrefix = options.name + '/';\n\n if (options.storeName !== defaultConfig.storeName) {\n keyPrefix += options.storeName + '/';\n }\n return keyPrefix;\n}\n\n// Check if localStorage throws when saving an item\nfunction checkIfLocalStorageThrows() {\n var localStorageTestKey = '_localforage_support_test';\n\n try {\n localStorage.setItem(localStorageTestKey, true);\n localStorage.removeItem(localStorageTestKey);\n\n return false;\n } catch (e) {\n return true;\n }\n}\n\n// Check if localStorage is usable and allows to save an item\n// This method checks if localStorage is usable in Safari Private Browsing\n// mode, or in any other case where the available quota for localStorage\n// is 0 and there wasn't any saved items yet.\nfunction _isLocalStorageUsable() {\n return !checkIfLocalStorageThrows() || localStorage.length > 0;\n}\n\n// Config the localStorage backend, using options set in the config.\nfunction _initStorage$2(options) {\n var self = this;\n var dbInfo = {};\n if (options) {\n for (var i in options) {\n dbInfo[i] = options[i];\n }\n }\n\n dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig);\n\n if (!_isLocalStorageUsable()) {\n return Promise$1.reject();\n }\n\n self._dbInfo = dbInfo;\n dbInfo.serializer = localforageSerializer;\n\n return Promise$1.resolve();\n}\n\n// Remove all keys from the datastore, effectively destroying all data in\n// the app's key/value store!\nfunction clear$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var keyPrefix = self._dbInfo.keyPrefix;\n\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Retrieve an item from the store. Unlike the original async_storage\n// library in Gaia, we don't modify return values at all. If a key's value\n// is `undefined`, we pass that value to the callback function.\nfunction getItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result = localStorage.getItem(dbInfo.keyPrefix + key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the key\n // is likely undefined and we'll pass it straight to the\n // callback.\n if (result) {\n result = dbInfo.serializer.deserialize(result);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Iterate over all items in the store.\nfunction iterate$2(iterator, callback) {\n var self = this;\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var keyPrefix = dbInfo.keyPrefix;\n var keyPrefixLength = keyPrefix.length;\n var length = localStorage.length;\n\n // We use a dedicated iterator instead of the `i` variable below\n // so other keys we fetch in localStorage aren't counted in\n // the `iterationNumber` argument passed to the `iterate()`\n // callback.\n //\n // See: github.com/mozilla/localForage/pull/435#discussion_r38061530\n var iterationNumber = 1;\n\n for (var i = 0; i < length; i++) {\n var key = localStorage.key(i);\n if (key.indexOf(keyPrefix) !== 0) {\n continue;\n }\n var value = localStorage.getItem(key);\n\n // If a result was found, parse it from the serialized\n // string into a JS object. If result isn't truthy, the\n // key is likely undefined and we'll pass it straight\n // to the iterator.\n if (value) {\n value = dbInfo.serializer.deserialize(value);\n }\n\n value = iterator(value, key.substring(keyPrefixLength), iterationNumber++);\n\n if (value !== void 0) {\n return value;\n }\n }\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Same as localStorage's key() method, except takes a callback.\nfunction key$2(n, callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var result;\n try {\n result = localStorage.key(n);\n } catch (error) {\n result = null;\n }\n\n // Remove the prefix from the key, if a key is found.\n if (result) {\n result = result.substring(dbInfo.keyPrefix.length);\n }\n\n return result;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction keys$2(callback) {\n var self = this;\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n var length = localStorage.length;\n var keys = [];\n\n for (var i = 0; i < length; i++) {\n var itemKey = localStorage.key(i);\n if (itemKey.indexOf(dbInfo.keyPrefix) === 0) {\n keys.push(itemKey.substring(dbInfo.keyPrefix.length));\n }\n }\n\n return keys;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Supply the number of keys in the datastore to the callback function.\nfunction length$2(callback) {\n var self = this;\n var promise = self.keys().then(function (keys) {\n return keys.length;\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Remove an item from the store, nice and simple.\nfunction removeItem$2(key, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n var dbInfo = self._dbInfo;\n localStorage.removeItem(dbInfo.keyPrefix + key);\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\n// Set a key's value and run an optional callback once the value is set.\n// Unlike Gaia's implementation, the callback function is passed the value,\n// in case you want to operate on that value only after you're sure it\n// saved, or something like that.\nfunction setItem$2(key, value, callback) {\n var self = this;\n\n key = normalizeKey(key);\n\n var promise = self.ready().then(function () {\n // Convert undefined values to null.\n // https://github.com/mozilla/localForage/pull/42\n if (value === undefined) {\n value = null;\n }\n\n // Save the original value to pass to the callback.\n var originalValue = value;\n\n return new Promise$1(function (resolve, reject) {\n var dbInfo = self._dbInfo;\n dbInfo.serializer.serialize(value, function (value, error) {\n if (error) {\n reject(error);\n } else {\n try {\n localStorage.setItem(dbInfo.keyPrefix + key, value);\n resolve(originalValue);\n } catch (e) {\n // localStorage capacity exceeded.\n // TODO: Make this a specific error/event.\n if (e.name === 'QuotaExceededError' || e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {\n reject(e);\n }\n reject(e);\n }\n }\n });\n });\n });\n\n executeCallback(promise, callback);\n return promise;\n}\n\nfunction dropInstance$2(options, callback) {\n callback = getCallback.apply(this, arguments);\n\n options = typeof options !== 'function' && options || {};\n if (!options.name) {\n var currentConfig = this.config();\n options.name = options.name || currentConfig.name;\n options.storeName = options.storeName || currentConfig.storeName;\n }\n\n var self = this;\n var promise;\n if (!options.name) {\n promise = Promise$1.reject('Invalid arguments');\n } else {\n promise = new Promise$1(function (resolve) {\n if (!options.storeName) {\n resolve(options.name + '/');\n } else {\n resolve(_getKeyPrefix(options, self._defaultConfig));\n }\n }).then(function (keyPrefix) {\n for (var i = localStorage.length - 1; i >= 0; i--) {\n var key = localStorage.key(i);\n\n if (key.indexOf(keyPrefix) === 0) {\n localStorage.removeItem(key);\n }\n }\n });\n }\n\n executeCallback(promise, callback);\n return promise;\n}\n\nvar localStorageWrapper = {\n _driver: 'localStorageWrapper',\n _initStorage: _initStorage$2,\n _support: isLocalStorageValid(),\n iterate: iterate$2,\n getItem: getItem$2,\n setItem: setItem$2,\n removeItem: removeItem$2,\n clear: clear$2,\n length: length$2,\n key: key$2,\n keys: keys$2,\n dropInstance: dropInstance$2\n};\n\nvar sameValue = function sameValue(x, y) {\n return x === y || typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y);\n};\n\nvar includes = function includes(array, searchElement) {\n var len = array.length;\n var i = 0;\n while (i < len) {\n if (sameValue(array[i], searchElement)) {\n return true;\n }\n i++;\n }\n\n return false;\n};\n\nvar isArray = Array.isArray || function (arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n};\n\n// Drivers are stored here when `defineDriver()` is called.\n// They are shared across all instances of localForage.\nvar DefinedDrivers = {};\n\nvar DriverSupport = {};\n\nvar DefaultDrivers = {\n INDEXEDDB: asyncStorage,\n WEBSQL: webSQLStorage,\n LOCALSTORAGE: localStorageWrapper\n};\n\nvar DefaultDriverOrder = [DefaultDrivers.INDEXEDDB._driver, DefaultDrivers.WEBSQL._driver, DefaultDrivers.LOCALSTORAGE._driver];\n\nvar OptionalDriverMethods = ['dropInstance'];\n\nvar LibraryMethods = ['clear', 'getItem', 'iterate', 'key', 'keys', 'length', 'removeItem', 'setItem'].concat(OptionalDriverMethods);\n\nvar DefaultConfig = {\n description: '',\n driver: DefaultDriverOrder.slice(),\n name: 'localforage',\n // Default DB size is _JUST UNDER_ 5MB, as it's the highest size\n // we can use without a prompt.\n size: 4980736,\n storeName: 'keyvaluepairs',\n version: 1.0\n};\n\nfunction callWhenReady(localForageInstance, libraryMethod) {\n localForageInstance[libraryMethod] = function () {\n var _args = arguments;\n return localForageInstance.ready().then(function () {\n return localForageInstance[libraryMethod].apply(localForageInstance, _args);\n });\n };\n}\n\nfunction extend() {\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n\n if (arg) {\n for (var _key in arg) {\n if (arg.hasOwnProperty(_key)) {\n if (isArray(arg[_key])) {\n arguments[0][_key] = arg[_key].slice();\n } else {\n arguments[0][_key] = arg[_key];\n }\n }\n }\n }\n }\n\n return arguments[0];\n}\n\nvar LocalForage = function () {\n function LocalForage(options) {\n _classCallCheck(this, LocalForage);\n\n for (var driverTypeKey in DefaultDrivers) {\n if (DefaultDrivers.hasOwnProperty(driverTypeKey)) {\n var driver = DefaultDrivers[driverTypeKey];\n var driverName = driver._driver;\n this[driverTypeKey] = driverName;\n\n if (!DefinedDrivers[driverName]) {\n // we don't need to wait for the promise,\n // since the default drivers can be defined\n // in a blocking manner\n this.defineDriver(driver);\n }\n }\n }\n\n this._defaultConfig = extend({}, DefaultConfig);\n this._config = extend({}, this._defaultConfig, options);\n this._driverSet = null;\n this._initDriver = null;\n this._ready = false;\n this._dbInfo = null;\n\n this._wrapLibraryMethodsWithReady();\n this.setDriver(this._config.driver)[\"catch\"](function () {});\n }\n\n // Set any config values for localForage; can be called anytime before\n // the first API call (e.g. `getItem`, `setItem`).\n // We loop through options so we don't overwrite existing config\n // values.\n\n\n LocalForage.prototype.config = function config(options) {\n // If the options argument is an object, we use it to set values.\n // Otherwise, we return either a specified config value or all\n // config values.\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\n // If localforage is ready and fully initialized, we can't set\n // any new configuration values. Instead, we return an error.\n if (this._ready) {\n return new Error(\"Can't call config() after localforage \" + 'has been used.');\n }\n\n for (var i in options) {\n if (i === 'storeName') {\n options[i] = options[i].replace(/\\W/g, '_');\n }\n\n if (i === 'version' && typeof options[i] !== 'number') {\n return new Error('Database version must be a number.');\n }\n\n this._config[i] = options[i];\n }\n\n // after all config options are set and\n // the driver option is used, try setting it\n if ('driver' in options && options.driver) {\n return this.setDriver(this._config.driver);\n }\n\n return true;\n } else if (typeof options === 'string') {\n return this._config[options];\n } else {\n return this._config;\n }\n };\n\n // Used to define a custom driver, shared across all instances of\n // localForage.\n\n\n LocalForage.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {\n var promise = new Promise$1(function (resolve, reject) {\n try {\n var driverName = driverObject._driver;\n var complianceError = new Error('Custom driver not compliant; see ' + 'https://mozilla.github.io/localForage/#definedriver');\n\n // A driver name should be defined and not overlap with the\n // library-defined, default drivers.\n if (!driverObject._driver) {\n reject(complianceError);\n return;\n }\n\n var driverMethods = LibraryMethods.concat('_initStorage');\n for (var i = 0, len = driverMethods.length; i < len; i++) {\n var driverMethodName = driverMethods[i];\n\n // when the property is there,\n // it should be a method even when optional\n var isRequired = !includes(OptionalDriverMethods, driverMethodName);\n if ((isRequired || driverObject[driverMethodName]) && typeof driverObject[driverMethodName] !== 'function') {\n reject(complianceError);\n return;\n }\n }\n\n var configureMissingMethods = function configureMissingMethods() {\n var methodNotImplementedFactory = function methodNotImplementedFactory(methodName) {\n return function () {\n var error = new Error('Method ' + methodName + ' is not implemented by the current driver');\n var promise = Promise$1.reject(error);\n executeCallback(promise, arguments[arguments.length - 1]);\n return promise;\n };\n };\n\n for (var _i = 0, _len = OptionalDriverMethods.length; _i < _len; _i++) {\n var optionalDriverMethod = OptionalDriverMethods[_i];\n if (!driverObject[optionalDriverMethod]) {\n driverObject[optionalDriverMethod] = methodNotImplementedFactory(optionalDriverMethod);\n }\n }\n };\n\n configureMissingMethods();\n\n var setDriverSupport = function setDriverSupport(support) {\n if (DefinedDrivers[driverName]) {\n console.info('Redefining LocalForage driver: ' + driverName);\n }\n DefinedDrivers[driverName] = driverObject;\n DriverSupport[driverName] = support;\n // don't use a then, so that we can define\n // drivers that have simple _support methods\n // in a blocking manner\n resolve();\n };\n\n if ('_support' in driverObject) {\n if (driverObject._support && typeof driverObject._support === 'function') {\n driverObject._support().then(setDriverSupport, reject);\n } else {\n setDriverSupport(!!driverObject._support);\n }\n } else {\n setDriverSupport(true);\n }\n } catch (e) {\n reject(e);\n }\n });\n\n executeTwoCallbacks(promise, callback, errorCallback);\n return promise;\n };\n\n LocalForage.prototype.driver = function driver() {\n return this._driver || null;\n };\n\n LocalForage.prototype.getDriver = function getDriver(driverName, callback, errorCallback) {\n var getDriverPromise = DefinedDrivers[driverName] ? Promise$1.resolve(DefinedDrivers[driverName]) : Promise$1.reject(new Error('Driver not found.'));\n\n executeTwoCallbacks(getDriverPromise, callback, errorCallback);\n return getDriverPromise;\n };\n\n LocalForage.prototype.getSerializer = function getSerializer(callback) {\n var serializerPromise = Promise$1.resolve(localforageSerializer);\n executeTwoCallbacks(serializerPromise, callback);\n return serializerPromise;\n };\n\n LocalForage.prototype.ready = function ready(callback) {\n var self = this;\n\n var promise = self._driverSet.then(function () {\n if (self._ready === null) {\n self._ready = self._initDriver();\n }\n\n return self._ready;\n });\n\n executeTwoCallbacks(promise, callback, callback);\n return promise;\n };\n\n LocalForage.prototype.setDriver = function setDriver(drivers, callback, errorCallback) {\n var self = this;\n\n if (!isArray(drivers)) {\n drivers = [drivers];\n }\n\n var supportedDrivers = this._getSupportedDrivers(drivers);\n\n function setDriverToConfig() {\n self._config.driver = self.driver();\n }\n\n function extendSelfWithDriver(driver) {\n self._extend(driver);\n setDriverToConfig();\n\n self._ready = self._initStorage(self._config);\n return self._ready;\n }\n\n function initDriver(supportedDrivers) {\n return function () {\n var currentDriverIndex = 0;\n\n function driverPromiseLoop() {\n while (currentDriverIndex < supportedDrivers.length) {\n var driverName = supportedDrivers[currentDriverIndex];\n currentDriverIndex++;\n\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(extendSelfWithDriver)[\"catch\"](driverPromiseLoop);\n }\n\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n }\n\n return driverPromiseLoop();\n };\n }\n\n // There might be a driver initialization in progress\n // so wait for it to finish in order to avoid a possible\n // race condition to set _dbInfo\n var oldDriverSetDone = this._driverSet !== null ? this._driverSet[\"catch\"](function () {\n return Promise$1.resolve();\n }) : Promise$1.resolve();\n\n this._driverSet = oldDriverSetDone.then(function () {\n var driverName = supportedDrivers[0];\n self._dbInfo = null;\n self._ready = null;\n\n return self.getDriver(driverName).then(function (driver) {\n self._driver = driver._driver;\n setDriverToConfig();\n self._wrapLibraryMethodsWithReady();\n self._initDriver = initDriver(supportedDrivers);\n });\n })[\"catch\"](function () {\n setDriverToConfig();\n var error = new Error('No available storage method found.');\n self._driverSet = Promise$1.reject(error);\n return self._driverSet;\n });\n\n executeTwoCallbacks(this._driverSet, callback, errorCallback);\n return this._driverSet;\n };\n\n LocalForage.prototype.supports = function supports(driverName) {\n return !!DriverSupport[driverName];\n };\n\n LocalForage.prototype._extend = function _extend(libraryMethodsAndProperties) {\n extend(this, libraryMethodsAndProperties);\n };\n\n LocalForage.prototype._getSupportedDrivers = function _getSupportedDrivers(drivers) {\n var supportedDrivers = [];\n for (var i = 0, len = drivers.length; i < len; i++) {\n var driverName = drivers[i];\n if (this.supports(driverName)) {\n supportedDrivers.push(driverName);\n }\n }\n return supportedDrivers;\n };\n\n LocalForage.prototype._wrapLibraryMethodsWithReady = function _wrapLibraryMethodsWithReady() {\n // Add a stub for each driver API method that delays the call to the\n // corresponding driver method until localForage is ready. These stubs\n // will be replaced by the driver methods as soon as the driver is\n // loaded, so there is no performance impact.\n for (var i = 0, len = LibraryMethods.length; i < len; i++) {\n callWhenReady(this, LibraryMethods[i]);\n }\n };\n\n LocalForage.prototype.createInstance = function createInstance(options) {\n return new LocalForage(options);\n };\n\n return LocalForage;\n}();\n\n// The actual localForage object that we expose as a module or via a\n// global. It's extended by pulling in one of our other libraries.\n\n\nvar localforage_js = new LocalForage();\n\nmodule.exports = localforage_js;\n\n},{\"3\":3}]},{},[4])(4)\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/localforage/dist/localforage.js\n// module id = 1\n// module chunks = 0"],"sourceRoot":""} |