Your IP : 18.226.163.23


Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/dexie/dist/
Upload File :
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/dexie/dist/dexie3.bundle.js.map

{"version":3,"file":"dexie3.bundle.js","sources":["../src/dexie3.js"],"sourcesContent":["/*\n * Dexie.js - a minimalistic wrapper for IndexedDB\n * ===============================================\n *\n * By David Fahlander, david.fahlander@gmail.com\n *\n * Version 3.2.2, Wed Apr 27 2022\n *\n * https://dexie.org\n *\n * Apache License Version 2.0, January 2004, http://www.apache.org/licenses/\n */\n\n/**\n * Modify list for integration with Bitrix Framework:\n * - removed integration with third-party package builders;\n * - add check variables before using them, see tags: 28122018;\n * - add alternative Promise check for Bitrix Cli, see tags: 02032020;\n * - add export for work in Bitrix CoreJS extensions;\n * - add export BX.Dexie for backward compatibility;\n */\n\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nvar __assign = function() {\n\t__assign = Object.assign || function __assign(t) {\n\t\tfor (var s, i = 1, n = arguments.length; i < n; i++) {\n\t\t\ts = arguments[i];\n\t\t\tfor (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n\t\t}\n\t\treturn t;\n\t};\n\treturn __assign.apply(this, arguments);\n};\nfunction __spreadArray(to, from, pack) {\n\tif (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n\t\tif (ar || !(i in from)) {\n\t\t\tif (!ar) ar = Array.prototype.slice.call(from, 0, i);\n\t\t\tar[i] = from[i];\n\t\t}\n\t}\n\treturn to.concat(ar || Array.prototype.slice.call(from));\n}\n\nvar _global = typeof globalThis !== 'undefined' ? globalThis :\n\ttypeof self !== 'undefined' ? self :\n\t\ttypeof window !== 'undefined' ? window :\n\t\t\tglobal;\n\nvar keys = Object.keys;\nvar isArray = Array.isArray;\nif (typeof Promise !== 'undefined' && !_global.Promise) {\n\t_global.Promise = Promise;\n}\nfunction extend(obj, extension) {\n\tif (typeof extension !== 'object')\n\t\treturn obj;\n\tkeys(extension).forEach(function (key) {\n\t\tobj[key] = extension[key];\n\t});\n\treturn obj;\n}\nvar getProto = Object.getPrototypeOf;\nvar _hasOwn = {}.hasOwnProperty;\nfunction hasOwn(obj, prop) {\n\treturn _hasOwn.call(obj, prop);\n}\nfunction props(proto, extension) {\n\tif (typeof extension === 'function')\n\t\textension = extension(getProto(proto));\n\t// tag start 28122018\n\tif (typeof extension !== 'object')\n\t\treturn;\n\t// tag end 28122018\n\t(typeof Reflect === \"undefined\" ? keys : Reflect.ownKeys)(extension).forEach(function (key) {\n\t\tsetProp(proto, key, extension[key]);\n\t});\n}\nvar defineProperty = Object.defineProperty;\nfunction setProp(obj, prop, functionOrGetSet, options) {\n\tdefineProperty(obj, prop, extend(functionOrGetSet && hasOwn(functionOrGetSet, \"get\") && typeof functionOrGetSet.get === 'function' ?\n\t\t{ get: functionOrGetSet.get, set: functionOrGetSet.set, configurable: true } :\n\t\t{ value: functionOrGetSet, configurable: true, writable: true }, options));\n}\nfunction derive(Child) {\n\treturn {\n\t\tfrom: function (Parent) {\n\t\t\tChild.prototype = Object.create(Parent.prototype);\n\t\t\tsetProp(Child.prototype, \"constructor\", Child);\n\t\t\treturn {\n\t\t\t\textend: props.bind(null, Child.prototype)\n\t\t\t};\n\t\t}\n\t};\n}\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nfunction getPropertyDescriptor(obj, prop) {\n\tvar pd = getOwnPropertyDescriptor(obj, prop);\n\tvar proto;\n\treturn pd || (proto = getProto(obj)) && getPropertyDescriptor(proto, prop);\n}\nvar _slice = [].slice;\nfunction slice(args, start, end) {\n\treturn _slice.call(args, start, end);\n}\nfunction override(origFunc, overridedFactory) {\n\treturn overridedFactory(origFunc);\n}\nfunction assert(b) {\n\tif (!b)\n\t\tthrow new Error(\"Assertion Failed\");\n}\nfunction asap$1(fn) {\n\tif (_global.setImmediate)\n\t\tsetImmediate(fn);\n\telse\n\t\tsetTimeout(fn, 0);\n}\nfunction arrayToObject(array, extractor) {\n\treturn array.reduce(function (result, item, i) {\n\t\tvar nameAndValue = extractor(item, i);\n\t\tif (nameAndValue)\n\t\t\tresult[nameAndValue[0]] = nameAndValue[1];\n\t\treturn result;\n\t}, {});\n}\nfunction tryCatch(fn, onerror, args) {\n\ttry {\n\t\tfn.apply(null, args);\n\t}\n\tcatch (ex) {\n\t\tonerror && onerror(ex);\n\t}\n}\nfunction getByKeyPath(obj, keyPath) {\n\tif (hasOwn(obj, keyPath))\n\t\treturn obj[keyPath];\n\tif (!keyPath)\n\t\treturn obj;\n\tif (typeof keyPath !== 'string') {\n\t\tvar rv = [];\n\t\tfor (var i = 0, l = keyPath.length; i < l; ++i) {\n\t\t\tvar val = getByKeyPath(obj, keyPath[i]);\n\t\t\trv.push(val);\n\t\t}\n\t\treturn rv;\n\t}\n\tvar period = keyPath.indexOf('.');\n\tif (period !== -1) {\n\t\tvar innerObj = obj[keyPath.substr(0, period)];\n\t\treturn innerObj === undefined ? undefined : getByKeyPath(innerObj, keyPath.substr(period + 1));\n\t}\n\treturn undefined;\n}\nfunction setByKeyPath(obj, keyPath, value) {\n\tif (!obj || keyPath === undefined)\n\t\treturn;\n\tif ('isFrozen' in Object && Object.isFrozen(obj))\n\t\treturn;\n\tif (typeof keyPath !== 'string' && 'length' in keyPath) {\n\t\tassert(typeof value !== 'string' && 'length' in value);\n\t\tfor (var i = 0, l = keyPath.length; i < l; ++i) {\n\t\t\tsetByKeyPath(obj, keyPath[i], value[i]);\n\t\t}\n\t}\n\telse {\n\t\tvar period = keyPath.indexOf('.');\n\t\tif (period !== -1) {\n\t\t\tvar currentKeyPath = keyPath.substr(0, period);\n\t\t\tvar remainingKeyPath = keyPath.substr(period + 1);\n\t\t\tif (remainingKeyPath === \"\")\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\tif (isArray(obj) && !isNaN(parseInt(currentKeyPath)))\n\t\t\t\t\t\tobj.splice(currentKeyPath, 1);\n\t\t\t\t\telse\n\t\t\t\t\t\tdelete obj[currentKeyPath];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tobj[currentKeyPath] = value;\n\t\t\telse {\n\t\t\t\tvar innerObj = obj[currentKeyPath];\n\t\t\t\tif (!innerObj || !hasOwn(obj, currentKeyPath))\n\t\t\t\t\tinnerObj = (obj[currentKeyPath] = {});\n\t\t\t\tsetByKeyPath(innerObj, remainingKeyPath, value);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (value === undefined) {\n\t\t\t\tif (isArray(obj) && !isNaN(parseInt(keyPath)))\n\t\t\t\t\tobj.splice(keyPath, 1);\n\t\t\t\telse\n\t\t\t\t\tdelete obj[keyPath];\n\t\t\t}\n\t\t\telse\n\t\t\t\tobj[keyPath] = value;\n\t\t}\n\t}\n}\nfunction delByKeyPath(obj, keyPath) {\n\tif (typeof keyPath === 'string')\n\t\tsetByKeyPath(obj, keyPath, undefined);\n\telse if ('length' in keyPath)\n\t\t[].map.call(keyPath, function (kp) {\n\t\t\tsetByKeyPath(obj, kp, undefined);\n\t\t});\n}\nfunction shallowClone(obj) {\n\tvar rv = {};\n\tfor (var m in obj) {\n\t\tif (hasOwn(obj, m))\n\t\t\trv[m] = obj[m];\n\t}\n\treturn rv;\n}\nvar concat = [].concat;\nfunction flatten(a) {\n\treturn concat.apply([], a);\n}\nvar intrinsicTypeNames = \"Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey\"\n\t.split(',').concat(flatten([8, 16, 32, 64].map(function (num) { return [\"Int\", \"Uint\", \"Float\"].map(function (t) { return t + num + \"Array\"; }); }))).filter(function (t) { return _global[t]; });\nvar intrinsicTypes = intrinsicTypeNames.map(function (t) { return _global[t]; });\narrayToObject(intrinsicTypeNames, function (x) { return [x, true]; });\nvar circularRefs = null;\nfunction deepClone(any) {\n\tcircularRefs = typeof WeakMap !== 'undefined' && new WeakMap();\n\tvar rv = innerDeepClone(any);\n\tcircularRefs = null;\n\treturn rv;\n}\nfunction innerDeepClone(any) {\n\tif (!any || typeof any !== 'object')\n\t\treturn any;\n\tvar rv = circularRefs && circularRefs.get(any);\n\tif (rv)\n\t\treturn rv;\n\tif (isArray(any)) {\n\t\trv = [];\n\t\tcircularRefs && circularRefs.set(any, rv);\n\t\tfor (var i = 0, l = any.length; i < l; ++i) {\n\t\t\trv.push(innerDeepClone(any[i]));\n\t\t}\n\t}\n\telse if (intrinsicTypes.indexOf(any.constructor) >= 0) {\n\t\trv = any;\n\t}\n\telse {\n\t\tvar proto = getProto(any);\n\t\trv = proto === Object.prototype ? {} : Object.create(proto);\n\t\tcircularRefs && circularRefs.set(any, rv);\n\t\tfor (var prop in any) {\n\t\t\tif (hasOwn(any, prop)) {\n\t\t\t\trv[prop] = innerDeepClone(any[prop]);\n\t\t\t}\n\t\t}\n\t}\n\treturn rv;\n}\nvar toString = {}.toString;\nfunction toStringTag(o) {\n\treturn toString.call(o).slice(8, -1);\n}\nvar iteratorSymbol = typeof Symbol !== 'undefined' ?\n\tSymbol.iterator :\n\t'@@iterator';\nvar getIteratorOf = typeof iteratorSymbol === \"symbol\" ? function (x) {\n\tvar i;\n\treturn x != null && (i = x[iteratorSymbol]) && i.apply(x);\n} : function () { return null; };\nvar NO_CHAR_ARRAY = {};\nfunction getArrayOf(arrayLike) {\n\tvar i, a, x, it;\n\tif (arguments.length === 1) {\n\t\tif (isArray(arrayLike))\n\t\t\treturn arrayLike.slice();\n\t\tif (this === NO_CHAR_ARRAY && typeof arrayLike === 'string')\n\t\t\treturn [arrayLike];\n\t\tif ((it = getIteratorOf(arrayLike))) {\n\t\t\ta = [];\n\t\t\twhile ((x = it.next()), !x.done)\n\t\t\t\ta.push(x.value);\n\t\t\treturn a;\n\t\t}\n\t\tif (arrayLike == null)\n\t\t\treturn [arrayLike];\n\t\ti = arrayLike.length;\n\t\tif (typeof i === 'number') {\n\t\t\ta = new Array(i);\n\t\t\twhile (i--)\n\t\t\t\ta[i] = arrayLike[i];\n\t\t\treturn a;\n\t\t}\n\t\treturn [arrayLike];\n\t}\n\ti = arguments.length;\n\ta = new Array(i);\n\twhile (i--)\n\t\ta[i] = arguments[i];\n\treturn a;\n}\nvar isAsyncFunction = typeof Symbol !== 'undefined'\n\t? function (fn) { return fn[Symbol.toStringTag] === 'AsyncFunction'; }\n\t: function () { return false; };\n\nvar debug = typeof location !== 'undefined' &&\n\t/^(http|https):\\/\\/(localhost|127\\.0\\.0\\.1)/.test(location.href);\nfunction setDebug(value, filter) {\n\tdebug = value;\n\tlibraryFilter = filter;\n}\nvar libraryFilter = function () { return true; };\nvar NEEDS_THROW_FOR_STACK = !new Error(\"\").stack;\nfunction getErrorWithStack() {\n\tif (NEEDS_THROW_FOR_STACK)\n\t\ttry {\n\t\t\tgetErrorWithStack.arguments;\n\t\t\tthrow new Error();\n\t\t}\n\t\tcatch (e) {\n\t\t\treturn e;\n\t\t}\n\treturn new Error();\n}\nfunction prettyStack(exception, numIgnoredFrames) {\n\tvar stack = exception.stack;\n\tif (!stack)\n\t\treturn \"\";\n\tnumIgnoredFrames = (numIgnoredFrames || 0);\n\tif (stack.indexOf(exception.name) === 0)\n\t\tnumIgnoredFrames += (exception.name + exception.message).split('\\n').length;\n\treturn stack.split('\\n')\n\t\t.slice(numIgnoredFrames)\n\t\t.filter(libraryFilter)\n\t\t.map(function (frame) { return \"\\n\" + frame; })\n\t\t.join('');\n}\n\nvar dexieErrorNames = [\n\t'Modify',\n\t'Bulk',\n\t'OpenFailed',\n\t'VersionChange',\n\t'Schema',\n\t'Upgrade',\n\t'InvalidTable',\n\t'MissingAPI',\n\t'NoSuchDatabase',\n\t'InvalidArgument',\n\t'SubTransaction',\n\t'Unsupported',\n\t'Internal',\n\t'DatabaseClosed',\n\t'PrematureCommit',\n\t'ForeignAwait'\n];\nvar idbDomErrorNames = [\n\t'Unknown',\n\t'Constraint',\n\t'Data',\n\t'TransactionInactive',\n\t'ReadOnly',\n\t'Version',\n\t'NotFound',\n\t'InvalidState',\n\t'InvalidAccess',\n\t'Abort',\n\t'Timeout',\n\t'QuotaExceeded',\n\t'Syntax',\n\t'DataClone'\n];\nvar errorList = dexieErrorNames.concat(idbDomErrorNames);\nvar defaultTexts = {\n\tVersionChanged: \"Database version changed by other database connection\",\n\tDatabaseClosed: \"Database has been closed\",\n\tAbort: \"Transaction aborted\",\n\tTransactionInactive: \"Transaction has already completed or failed\",\n\tMissingAPI: \"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb\"\n};\nfunction DexieError(name, msg) {\n\tthis._e = getErrorWithStack();\n\tthis.name = name;\n\tthis.message = msg;\n}\nderive(DexieError).from(Error).extend({\n\tstack: {\n\t\tget: function () {\n\t\t\treturn this._stack ||\n\t\t\t\t(this._stack = this.name + \": \" + this.message + prettyStack(this._e, 2));\n\t\t}\n\t},\n\ttoString: function () { return this.name + \": \" + this.message; }\n});\nfunction getMultiErrorMessage(msg, failures) {\n\treturn msg + \". Errors: \" + Object.keys(failures)\n\t\t.map(function (key) { return failures[key].toString(); })\n\t\t.filter(function (v, i, s) { return s.indexOf(v) === i; })\n\t\t.join('\\n');\n}\nfunction ModifyError(msg, failures, successCount, failedKeys) {\n\tthis._e = getErrorWithStack();\n\tthis.failures = failures;\n\tthis.failedKeys = failedKeys;\n\tthis.successCount = successCount;\n\tthis.message = getMultiErrorMessage(msg, failures);\n}\nderive(ModifyError).from(DexieError);\nfunction BulkError(msg, failures) {\n\tthis._e = getErrorWithStack();\n\tthis.name = \"BulkError\";\n\tthis.failures = Object.keys(failures).map(function (pos) { return failures[pos]; });\n\tthis.failuresByPos = failures;\n\tthis.message = getMultiErrorMessage(msg, failures);\n}\nderive(BulkError).from(DexieError);\nvar errnames = errorList.reduce(function (obj, name) { return (obj[name] = name + \"Error\", obj); }, {});\nvar BaseException = DexieError;\nvar exceptions = errorList.reduce(function (obj, name) {\n\tvar fullName = name + \"Error\";\n\tfunction DexieError(msgOrInner, inner) {\n\t\tthis._e = getErrorWithStack();\n\t\tthis.name = fullName;\n\t\tif (!msgOrInner) {\n\t\t\tthis.message = defaultTexts[name] || fullName;\n\t\t\tthis.inner = null;\n\t\t}\n\t\telse if (typeof msgOrInner === 'string') {\n\t\t\tthis.message = \"\" + msgOrInner + (!inner ? '' : '\\n ' + inner);\n\t\t\tthis.inner = inner || null;\n\t\t}\n\t\telse if (typeof msgOrInner === 'object') {\n\t\t\tthis.message = msgOrInner.name + \" \" + msgOrInner.message;\n\t\t\tthis.inner = msgOrInner;\n\t\t}\n\t}\n\tderive(DexieError).from(BaseException);\n\tobj[name] = DexieError;\n\treturn obj;\n}, {});\nexceptions.Syntax = SyntaxError;\nexceptions.Type = TypeError;\nexceptions.Range = RangeError;\nvar exceptionMap = idbDomErrorNames.reduce(function (obj, name) {\n\tobj[name + \"Error\"] = exceptions[name];\n\treturn obj;\n}, {});\nfunction mapError(domError, message) {\n\tif (!domError || domError instanceof DexieError || domError instanceof TypeError || domError instanceof SyntaxError || !domError.name || !exceptionMap[domError.name])\n\t\treturn domError;\n\tvar rv = new exceptionMap[domError.name](message || domError.message, domError);\n\tif (\"stack\" in domError) {\n\t\tsetProp(rv, \"stack\", { get: function () {\n\t\t\t\treturn this.inner.stack;\n\t\t\t} });\n\t}\n\treturn rv;\n}\nvar fullNameExceptions = errorList.reduce(function (obj, name) {\n\tif ([\"Syntax\", \"Type\", \"Range\"].indexOf(name) === -1)\n\t\tobj[name + \"Error\"] = exceptions[name];\n\treturn obj;\n}, {});\nfullNameExceptions.ModifyError = ModifyError;\nfullNameExceptions.DexieError = DexieError;\nfullNameExceptions.BulkError = BulkError;\n\nfunction nop() { }\nfunction mirror(val) { return val; }\nfunction pureFunctionChain(f1, f2) {\n\tif (f1 == null || f1 === mirror)\n\t\treturn f2;\n\treturn function (val) {\n\t\treturn f2(f1(val));\n\t};\n}\nfunction callBoth(on1, on2) {\n\treturn function () {\n\t\ton1.apply(this, arguments);\n\t\ton2.apply(this, arguments);\n\t};\n}\nfunction hookCreatingChain(f1, f2) {\n\tif (f1 === nop)\n\t\treturn f2;\n\treturn function () {\n\t\tvar res = f1.apply(this, arguments);\n\t\tif (res !== undefined)\n\t\t\targuments[0] = res;\n\t\tvar onsuccess = this.onsuccess,\n\t\t\tonerror = this.onerror;\n\t\tthis.onsuccess = null;\n\t\tthis.onerror = null;\n\t\tvar res2 = f2.apply(this, arguments);\n\t\tif (onsuccess)\n\t\t\tthis.onsuccess = this.onsuccess ? callBoth(onsuccess, this.onsuccess) : onsuccess;\n\t\tif (onerror)\n\t\t\tthis.onerror = this.onerror ? callBoth(onerror, this.onerror) : onerror;\n\t\treturn res2 !== undefined ? res2 : res;\n\t};\n}\nfunction hookDeletingChain(f1, f2) {\n\tif (f1 === nop)\n\t\treturn f2;\n\treturn function () {\n\t\tf1.apply(this, arguments);\n\t\tvar onsuccess = this.onsuccess,\n\t\t\tonerror = this.onerror;\n\t\tthis.onsuccess = this.onerror = null;\n\t\tf2.apply(this, arguments);\n\t\tif (onsuccess)\n\t\t\tthis.onsuccess = this.onsuccess ? callBoth(onsuccess, this.onsuccess) : onsuccess;\n\t\tif (onerror)\n\t\t\tthis.onerror = this.onerror ? callBoth(onerror, this.onerror) : onerror;\n\t};\n}\nfunction hookUpdatingChain(f1, f2) {\n\tif (f1 === nop)\n\t\treturn f2;\n\treturn function (modifications) {\n\t\tvar res = f1.apply(this, arguments);\n\t\textend(modifications, res);\n\t\tvar onsuccess = this.onsuccess,\n\t\t\tonerror = this.onerror;\n\t\tthis.onsuccess = null;\n\t\tthis.onerror = null;\n\t\tvar res2 = f2.apply(this, arguments);\n\t\tif (onsuccess)\n\t\t\tthis.onsuccess = this.onsuccess ? callBoth(onsuccess, this.onsuccess) : onsuccess;\n\t\tif (onerror)\n\t\t\tthis.onerror = this.onerror ? callBoth(onerror, this.onerror) : onerror;\n\t\treturn res === undefined ?\n\t\t\t(res2 === undefined ? undefined : res2) :\n\t\t\t(extend(res, res2));\n\t};\n}\nfunction reverseStoppableEventChain(f1, f2) {\n\tif (f1 === nop)\n\t\treturn f2;\n\treturn function () {\n\t\tif (f2.apply(this, arguments) === false)\n\t\t\treturn false;\n\t\treturn f1.apply(this, arguments);\n\t};\n}\nfunction promisableChain(f1, f2) {\n\tif (f1 === nop)\n\t\treturn f2;\n\treturn function () {\n\t\tvar res = f1.apply(this, arguments);\n\t\tif (res && typeof res.then === 'function') {\n\t\t\tvar thiz = this, i = arguments.length, args = new Array(i);\n\t\t\twhile (i--)\n\t\t\t\targs[i] = arguments[i];\n\t\t\treturn res.then(function () {\n\t\t\t\treturn f2.apply(thiz, args);\n\t\t\t});\n\t\t}\n\t\treturn f2.apply(this, arguments);\n\t};\n}\n\nvar INTERNAL = {};\nvar LONG_STACKS_CLIP_LIMIT = 100,\n\tMAX_LONG_STACKS = 20, ZONE_ECHO_LIMIT = 100, _a$1 = typeof Promise === 'undefined' ?\n\t\t[] :\n\t\t(function () {\n\t\t\tvar globalP = Promise.resolve();\n\t\t\tif (typeof crypto === 'undefined' || !crypto.subtle)\n\t\t\t\treturn [globalP, getProto(globalP), globalP];\n\t\t\tvar nativeP = crypto.subtle.digest(\"SHA-512\", new Uint8Array([0]));\n\t\t\treturn [\n\t\t\t\tnativeP,\n\t\t\t\tgetProto(nativeP),\n\t\t\t\tglobalP\n\t\t\t];\n\t\t})(), resolvedNativePromise = _a$1[0], nativePromiseProto = _a$1[1], resolvedGlobalPromise = _a$1[2], nativePromiseThen = nativePromiseProto && nativePromiseProto.then;\nvar NativePromise = resolvedNativePromise && resolvedNativePromise.constructor;\nvar patchGlobalPromise = !!resolvedGlobalPromise;\nvar stack_being_generated = false;\nvar schedulePhysicalTick = resolvedGlobalPromise ?\n\tfunction () { resolvedGlobalPromise.then(physicalTick); }\n\t:\n\t_global.setImmediate ?\n\t\tsetImmediate.bind(null, physicalTick) :\n\t\t_global.MutationObserver ?\n\t\t\tfunction () {\n\t\t\t\tvar hiddenDiv = document.createElement(\"div\");\n\t\t\t\t(new MutationObserver(function () {\n\t\t\t\t\tphysicalTick();\n\t\t\t\t\thiddenDiv = null;\n\t\t\t\t})).observe(hiddenDiv, { attributes: true });\n\t\t\t\thiddenDiv.setAttribute('i', '1');\n\t\t\t} :\n\t\t\tfunction () { setTimeout(physicalTick, 0); };\nvar asap = function (callback, args) {\n\tmicrotickQueue.push([callback, args]);\n\tif (needsNewPhysicalTick) {\n\t\tschedulePhysicalTick();\n\t\tneedsNewPhysicalTick = false;\n\t}\n};\nvar isOutsideMicroTick = true,\n\tneedsNewPhysicalTick = true,\n\tunhandledErrors = [],\n\trejectingErrors = [],\n\tcurrentFulfiller = null, rejectionMapper = mirror;\nvar globalPSD = {\n\tid: 'global',\n\tglobal: true,\n\tref: 0,\n\tunhandleds: [],\n\tonunhandled: globalError,\n\tpgp: false,\n\tenv: {},\n\tfinalize: function () {\n\t\tthis.unhandleds.forEach(function (uh) {\n\t\t\ttry {\n\t\t\t\tglobalError(uh[0], uh[1]);\n\t\t\t}\n\t\t\tcatch (e) { }\n\t\t});\n\t}\n};\nvar PSD = globalPSD;\nvar microtickQueue = [];\nvar numScheduledCalls = 0;\nvar tickFinalizers = [];\nfunction DexiePromise(fn) {\n\tif (typeof this !== 'object')\n\t\tthrow new TypeError('Promises must be constructed via new');\n\tthis._listeners = [];\n\tthis.onuncatched = nop;\n\tthis._lib = false;\n\tvar psd = (this._PSD = PSD);\n\tif (debug) {\n\t\tthis._stackHolder = getErrorWithStack();\n\t\tthis._prev = null;\n\t\tthis._numPrev = 0;\n\t}\n\tif (typeof fn !== 'function') {\n\t\tif (fn !== INTERNAL)\n\t\t\tthrow new TypeError('Not a function');\n\t\tthis._state = arguments[1];\n\t\tthis._value = arguments[2];\n\t\tif (this._state === false)\n\t\t\thandleRejection(this, this._value);\n\t\treturn;\n\t}\n\tthis._state = null;\n\tthis._value = null;\n\t++psd.ref;\n\texecutePromiseTask(this, fn);\n}\nvar thenProp = {\n\tget: function () {\n\t\tvar psd = PSD, microTaskId = totalEchoes;\n\t\tfunction then(onFulfilled, onRejected) {\n\t\t\tvar _this = this;\n\t\t\tvar possibleAwait = !psd.global && (psd !== PSD || microTaskId !== totalEchoes);\n\t\t\tvar cleanup = possibleAwait && !decrementExpectedAwaits();\n\t\t\tvar rv = new DexiePromise(function (resolve, reject) {\n\t\t\t\tpropagateToListener(_this, new Listener(nativeAwaitCompatibleWrap(onFulfilled, psd, possibleAwait, cleanup), nativeAwaitCompatibleWrap(onRejected, psd, possibleAwait, cleanup), resolve, reject, psd));\n\t\t\t});\n\t\t\tdebug && linkToPreviousPromise(rv, this);\n\t\t\treturn rv;\n\t\t}\n\t\tthen.prototype = INTERNAL;\n\t\treturn then;\n\t},\n\tset: function (value) {\n\t\tsetProp(this, 'then', value && value.prototype === INTERNAL ?\n\t\t\tthenProp :\n\t\t\t{\n\t\t\t\tget: function () {\n\t\t\t\t\treturn value;\n\t\t\t\t},\n\t\t\t\tset: thenProp.set\n\t\t\t});\n\t}\n};\nprops(DexiePromise.prototype, {\n\tthen: thenProp,\n\t_then: function (onFulfilled, onRejected) {\n\t\tpropagateToListener(this, new Listener(null, null, onFulfilled, onRejected, PSD));\n\t},\n\tcatch: function (onRejected) {\n\t\tif (arguments.length === 1)\n\t\t\treturn this.then(null, onRejected);\n\t\tvar type = arguments[0], handler = arguments[1];\n\t\treturn typeof type === 'function' ? this.then(null, function (err) {\n\t\t\t\treturn err instanceof type ? handler(err) : PromiseReject(err);\n\t\t\t})\n\t\t\t: this.then(null, function (err) {\n\t\t\t\treturn err && err.name === type ? handler(err) : PromiseReject(err);\n\t\t\t});\n\t},\n\tfinally: function (onFinally) {\n\t\treturn this.then(function (value) {\n\t\t\tonFinally();\n\t\t\treturn value;\n\t\t}, function (err) {\n\t\t\tonFinally();\n\t\t\treturn PromiseReject(err);\n\t\t});\n\t},\n\tstack: {\n\t\tget: function () {\n\t\t\tif (this._stack)\n\t\t\t\treturn this._stack;\n\t\t\ttry {\n\t\t\t\tstack_being_generated = true;\n\t\t\t\tvar stacks = getStack(this, [], MAX_LONG_STACKS);\n\t\t\t\tvar stack = stacks.join(\"\\nFrom previous: \");\n\t\t\t\tif (this._state !== null)\n\t\t\t\t\tthis._stack = stack;\n\t\t\t\treturn stack;\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tstack_being_generated = false;\n\t\t\t}\n\t\t}\n\t},\n\ttimeout: function (ms, msg) {\n\t\tvar _this = this;\n\t\treturn ms < Infinity ?\n\t\t\tnew DexiePromise(function (resolve, reject) {\n\t\t\t\tvar handle = setTimeout(function () { return reject(new exceptions.Timeout(msg)); }, ms);\n\t\t\t\t_this.then(resolve, reject).finally(clearTimeout.bind(null, handle));\n\t\t\t}) : this;\n\t}\n});\nif (typeof Symbol !== 'undefined' && Symbol.toStringTag)\n\tsetProp(DexiePromise.prototype, Symbol.toStringTag, 'Dexie.Promise');\nglobalPSD.env = snapShot();\nfunction Listener(onFulfilled, onRejected, resolve, reject, zone) {\n\tthis.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n\tthis.onRejected = typeof onRejected === 'function' ? onRejected : null;\n\tthis.resolve = resolve;\n\tthis.reject = reject;\n\tthis.psd = zone;\n}\nprops(DexiePromise, {\n\tall: function () {\n\t\tvar values = getArrayOf.apply(null, arguments)\n\t\t\t.map(onPossibleParallellAsync);\n\t\treturn new DexiePromise(function (resolve, reject) {\n\t\t\tif (values.length === 0)\n\t\t\t\tresolve([]);\n\t\t\tvar remaining = values.length;\n\t\t\tvalues.forEach(function (a, i) { return DexiePromise.resolve(a).then(function (x) {\n\t\t\t\tvalues[i] = x;\n\t\t\t\tif (!--remaining)\n\t\t\t\t\tresolve(values);\n\t\t\t}, reject); });\n\t\t});\n\t},\n\tresolve: function (value) {\n\t\tif (value instanceof DexiePromise)\n\t\t\treturn value;\n\t\tif (value && typeof value.then === 'function')\n\t\t\treturn new DexiePromise(function (resolve, reject) {\n\t\t\t\tvalue.then(resolve, reject);\n\t\t\t});\n\t\tvar rv = new DexiePromise(INTERNAL, true, value);\n\t\tlinkToPreviousPromise(rv, currentFulfiller);\n\t\treturn rv;\n\t},\n\treject: PromiseReject,\n\trace: function () {\n\t\tvar values = getArrayOf.apply(null, arguments).map(onPossibleParallellAsync);\n\t\treturn new DexiePromise(function (resolve, reject) {\n\t\t\tvalues.map(function (value) { return DexiePromise.resolve(value).then(resolve, reject); });\n\t\t});\n\t},\n\tPSD: {\n\t\tget: function () { return PSD; },\n\t\tset: function (value) { return PSD = value; }\n\t},\n\ttotalEchoes: { get: function () { return totalEchoes; } },\n\tnewPSD: newScope,\n\tusePSD: usePSD,\n\tscheduler: {\n\t\tget: function () { return asap; },\n\t\tset: function (value) { asap = value; }\n\t},\n\trejectionMapper: {\n\t\tget: function () { return rejectionMapper; },\n\t\tset: function (value) { rejectionMapper = value; }\n\t},\n\tfollow: function (fn, zoneProps) {\n\t\treturn new DexiePromise(function (resolve, reject) {\n\t\t\treturn newScope(function (resolve, reject) {\n\t\t\t\tvar psd = PSD;\n\t\t\t\tpsd.unhandleds = [];\n\t\t\t\tpsd.onunhandled = reject;\n\t\t\t\tpsd.finalize = callBoth(function () {\n\t\t\t\t\tvar _this = this;\n\t\t\t\t\trun_at_end_of_this_or_next_physical_tick(function () {\n\t\t\t\t\t\t_this.unhandleds.length === 0 ? resolve() : reject(_this.unhandleds[0]);\n\t\t\t\t\t});\n\t\t\t\t}, psd.finalize);\n\t\t\t\tfn();\n\t\t\t}, zoneProps, resolve, reject);\n\t\t});\n\t}\n});\nif (NativePromise) {\n\tif (NativePromise.allSettled)\n\t\tsetProp(DexiePromise, \"allSettled\", function () {\n\t\t\tvar possiblePromises = getArrayOf.apply(null, arguments).map(onPossibleParallellAsync);\n\t\t\treturn new DexiePromise(function (resolve) {\n\t\t\t\tif (possiblePromises.length === 0)\n\t\t\t\t\tresolve([]);\n\t\t\t\tvar remaining = possiblePromises.length;\n\t\t\t\tvar results = new Array(remaining);\n\t\t\t\tpossiblePromises.forEach(function (p, i) { return DexiePromise.resolve(p).then(function (value) { return results[i] = { status: \"fulfilled\", value: value }; }, function (reason) { return results[i] = { status: \"rejected\", reason: reason }; })\n\t\t\t\t\t.then(function () { return --remaining || resolve(results); }); });\n\t\t\t});\n\t\t});\n\tif (NativePromise.any && typeof AggregateError !== 'undefined')\n\t\tsetProp(DexiePromise, \"any\", function () {\n\t\t\tvar possiblePromises = getArrayOf.apply(null, arguments).map(onPossibleParallellAsync);\n\t\t\treturn new DexiePromise(function (resolve, reject) {\n\t\t\t\tif (possiblePromises.length === 0)\n\t\t\t\t\treject(new AggregateError([]));\n\t\t\t\tvar remaining = possiblePromises.length;\n\t\t\t\tvar failures = new Array(remaining);\n\t\t\t\tpossiblePromises.forEach(function (p, i) { return DexiePromise.resolve(p).then(function (value) { return resolve(value); }, function (failure) {\n\t\t\t\t\tfailures[i] = failure;\n\t\t\t\t\tif (!--remaining)\n\t\t\t\t\t\treject(new AggregateError(failures));\n\t\t\t\t}); });\n\t\t\t});\n\t\t});\n}\nfunction executePromiseTask(promise, fn) {\n\ttry {\n\t\tfn(function (value) {\n\t\t\tif (promise._state !== null)\n\t\t\t\treturn;\n\t\t\tif (value === promise)\n\t\t\t\tthrow new TypeError('A promise cannot be resolved with itself.');\n\t\t\tvar shouldExecuteTick = promise._lib && beginMicroTickScope();\n\t\t\tif (value && typeof value.then === 'function') {\n\t\t\t\texecutePromiseTask(promise, function (resolve, reject) {\n\t\t\t\t\tvalue instanceof DexiePromise ?\n\t\t\t\t\t\tvalue._then(resolve, reject) :\n\t\t\t\t\t\tvalue.then(resolve, reject);\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpromise._state = true;\n\t\t\t\tpromise._value = value;\n\t\t\t\tpropagateAllListeners(promise);\n\t\t\t}\n\t\t\tif (shouldExecuteTick)\n\t\t\t\tendMicroTickScope();\n\t\t}, handleRejection.bind(null, promise));\n\t}\n\tcatch (ex) {\n\t\thandleRejection(promise, ex);\n\t}\n}\nfunction handleRejection(promise, reason) {\n\trejectingErrors.push(reason);\n\tif (promise._state !== null)\n\t\treturn;\n\tvar shouldExecuteTick = promise._lib && beginMicroTickScope();\n\treason = rejectionMapper(reason);\n\tpromise._state = false;\n\tpromise._value = reason;\n\tdebug && reason !== null && typeof reason === 'object' && !reason._promise && tryCatch(function () {\n\t\tvar origProp = getPropertyDescriptor(reason, \"stack\");\n\t\treason._promise = promise;\n\t\tsetProp(reason, \"stack\", {\n\t\t\tget: function () {\n\t\t\t\treturn stack_being_generated ?\n\t\t\t\t\torigProp && (origProp.get ?\n\t\t\t\t\t\torigProp.get.apply(reason) :\n\t\t\t\t\t\torigProp.value) :\n\t\t\t\t\tpromise.stack;\n\t\t\t}\n\t\t});\n\t});\n\taddPossiblyUnhandledError(promise);\n\tpropagateAllListeners(promise);\n\tif (shouldExecuteTick)\n\t\tendMicroTickScope();\n}\nfunction propagateAllListeners(promise) {\n\tvar listeners = promise._listeners;\n\tpromise._listeners = [];\n\tfor (var i = 0, len = listeners.length; i < len; ++i) {\n\t\tpropagateToListener(promise, listeners[i]);\n\t}\n\tvar psd = promise._PSD;\n\t--psd.ref || psd.finalize();\n\tif (numScheduledCalls === 0) {\n\t\t++numScheduledCalls;\n\t\tasap(function () {\n\t\t\tif (--numScheduledCalls === 0)\n\t\t\t\tfinalizePhysicalTick();\n\t\t}, []);\n\t}\n}\nfunction propagateToListener(promise, listener) {\n\tif (promise._state === null) {\n\t\tpromise._listeners.push(listener);\n\t\treturn;\n\t}\n\tvar cb = promise._state ? listener.onFulfilled : listener.onRejected;\n\tif (cb === null) {\n\t\treturn (promise._state ? listener.resolve : listener.reject)(promise._value);\n\t}\n\t++listener.psd.ref;\n\t++numScheduledCalls;\n\tasap(callListener, [cb, promise, listener]);\n}\nfunction callListener(cb, promise, listener) {\n\ttry {\n\t\tcurrentFulfiller = promise;\n\t\tvar ret, value = promise._value;\n\t\tif (promise._state) {\n\t\t\tret = cb(value);\n\t\t}\n\t\telse {\n\t\t\tif (rejectingErrors.length)\n\t\t\t\trejectingErrors = [];\n\t\t\tret = cb(value);\n\t\t\tif (rejectingErrors.indexOf(value) === -1)\n\t\t\t\tmarkErrorAsHandled(promise);\n\t\t}\n\t\tlistener.resolve(ret);\n\t}\n\tcatch (e) {\n\t\tlistener.reject(e);\n\t}\n\tfinally {\n\t\tcurrentFulfiller = null;\n\t\tif (--numScheduledCalls === 0)\n\t\t\tfinalizePhysicalTick();\n\t\t--listener.psd.ref || listener.psd.finalize();\n\t}\n}\nfunction getStack(promise, stacks, limit) {\n\tif (stacks.length === limit)\n\t\treturn stacks;\n\tvar stack = \"\";\n\tif (promise._state === false) {\n\t\tvar failure = promise._value, errorName, message;\n\t\tif (failure != null) {\n\t\t\terrorName = failure.name || \"Error\";\n\t\t\tmessage = failure.message || failure;\n\t\t\tstack = prettyStack(failure, 0);\n\t\t}\n\t\telse {\n\t\t\terrorName = failure;\n\t\t\tmessage = \"\";\n\t\t}\n\t\tstacks.push(errorName + (message ? \": \" + message : \"\") + stack);\n\t}\n\tif (debug) {\n\t\tstack = prettyStack(promise._stackHolder, 2);\n\t\tif (stack && stacks.indexOf(stack) === -1)\n\t\t\tstacks.push(stack);\n\t\tif (promise._prev)\n\t\t\tgetStack(promise._prev, stacks, limit);\n\t}\n\treturn stacks;\n}\nfunction linkToPreviousPromise(promise, prev) {\n\tvar numPrev = prev ? prev._numPrev + 1 : 0;\n\tif (numPrev < LONG_STACKS_CLIP_LIMIT) {\n\t\tpromise._prev = prev;\n\t\tpromise._numPrev = numPrev;\n\t}\n}\nfunction physicalTick() {\n\tbeginMicroTickScope() && endMicroTickScope();\n}\nfunction beginMicroTickScope() {\n\tvar wasRootExec = isOutsideMicroTick;\n\tisOutsideMicroTick = false;\n\tneedsNewPhysicalTick = false;\n\treturn wasRootExec;\n}\nfunction endMicroTickScope() {\n\tvar callbacks, i, l;\n\tdo {\n\t\twhile (microtickQueue.length > 0) {\n\t\t\tcallbacks = microtickQueue;\n\t\t\tmicrotickQueue = [];\n\t\t\tl = callbacks.length;\n\t\t\tfor (i = 0; i < l; ++i) {\n\t\t\t\tvar item = callbacks[i];\n\t\t\t\titem[0].apply(null, item[1]);\n\t\t\t}\n\t\t}\n\t} while (microtickQueue.length > 0);\n\tisOutsideMicroTick = true;\n\tneedsNewPhysicalTick = true;\n}\nfunction finalizePhysicalTick() {\n\tvar unhandledErrs = unhandledErrors;\n\tunhandledErrors = [];\n\tunhandledErrs.forEach(function (p) {\n\t\tp._PSD.onunhandled.call(null, p._value, p);\n\t});\n\tvar finalizers = tickFinalizers.slice(0);\n\tvar i = finalizers.length;\n\twhile (i)\n\t\tfinalizers[--i]();\n}\nfunction run_at_end_of_this_or_next_physical_tick(fn) {\n\tfunction finalizer() {\n\t\tfn();\n\t\ttickFinalizers.splice(tickFinalizers.indexOf(finalizer), 1);\n\t}\n\ttickFinalizers.push(finalizer);\n\t++numScheduledCalls;\n\tasap(function () {\n\t\tif (--numScheduledCalls === 0)\n\t\t\tfinalizePhysicalTick();\n\t}, []);\n}\nfunction addPossiblyUnhandledError(promise) {\n\tif (!unhandledErrors.some(function (p) { return p._value === promise._value; }))\n\t\tunhandledErrors.push(promise);\n}\nfunction markErrorAsHandled(promise) {\n\tvar i = unhandledErrors.length;\n\twhile (i)\n\t\tif (unhandledErrors[--i]._value === promise._value) {\n\t\t\tunhandledErrors.splice(i, 1);\n\t\t\treturn;\n\t\t}\n}\nfunction PromiseReject(reason) {\n\treturn new DexiePromise(INTERNAL, false, reason);\n}\nfunction wrap(fn, errorCatcher) {\n\tvar psd = PSD;\n\treturn function () {\n\t\tvar wasRootExec = beginMicroTickScope(), outerScope = PSD;\n\t\ttry {\n\t\t\tswitchToZone(psd, true);\n\t\t\treturn fn.apply(this, arguments);\n\t\t}\n\t\tcatch (e) {\n\t\t\terrorCatcher && errorCatcher(e);\n\t\t}\n\t\tfinally {\n\t\t\tswitchToZone(outerScope, false);\n\t\t\tif (wasRootExec)\n\t\t\t\tendMicroTickScope();\n\t\t}\n\t};\n}\nvar task = { awaits: 0, echoes: 0, id: 0 };\nvar taskCounter = 0;\nvar zoneStack = [];\nvar zoneEchoes = 0;\nvar totalEchoes = 0;\nvar zone_id_counter = 0;\nfunction newScope(fn, props, a1, a2) {\n\tvar parent = PSD, psd = Object.create(parent);\n\tpsd.parent = parent;\n\tpsd.ref = 0;\n\tpsd.global = false;\n\tpsd.id = ++zone_id_counter;\n\tvar globalEnv = globalPSD.env;\n\tpsd.env = patchGlobalPromise ? {\n\t\tPromise: DexiePromise,\n\t\tPromiseProp: { value: DexiePromise, configurable: true, writable: true },\n\t\tall: DexiePromise.all,\n\t\trace: DexiePromise.race,\n\t\tallSettled: DexiePromise.allSettled,\n\t\tany: DexiePromise.any,\n\t\tresolve: DexiePromise.resolve,\n\t\treject: DexiePromise.reject,\n\t\tnthen: getPatchedPromiseThen(globalEnv.nthen, psd),\n\t\tgthen: getPatchedPromiseThen(globalEnv.gthen, psd)\n\t} : {};\n\tif (props)\n\t\textend(psd, props);\n\t++parent.ref;\n\tpsd.finalize = function () {\n\t\t--this.parent.ref || this.parent.finalize();\n\t};\n\tvar rv = usePSD(psd, fn, a1, a2);\n\tif (psd.ref === 0)\n\t\tpsd.finalize();\n\treturn rv;\n}\nfunction incrementExpectedAwaits() {\n\tif (!task.id)\n\t\ttask.id = ++taskCounter;\n\t++task.awaits;\n\ttask.echoes += ZONE_ECHO_LIMIT;\n\treturn task.id;\n}\nfunction decrementExpectedAwaits() {\n\tif (!task.awaits)\n\t\treturn false;\n\tif (--task.awaits === 0)\n\t\ttask.id = 0;\n\ttask.echoes = task.awaits * ZONE_ECHO_LIMIT;\n\treturn true;\n}\nif (('' + nativePromiseThen).indexOf('[native code]') === -1) {\n\tincrementExpectedAwaits = decrementExpectedAwaits = nop;\n}\nfunction onPossibleParallellAsync(possiblePromise) {\n\tif (task.echoes && possiblePromise && possiblePromise.constructor === NativePromise) {\n\t\tincrementExpectedAwaits();\n\t\treturn possiblePromise.then(function (x) {\n\t\t\tdecrementExpectedAwaits();\n\t\t\treturn x;\n\t\t}, function (e) {\n\t\t\tdecrementExpectedAwaits();\n\t\t\treturn rejection(e);\n\t\t});\n\t}\n\treturn possiblePromise;\n}\nfunction zoneEnterEcho(targetZone) {\n\t++totalEchoes;\n\tif (!task.echoes || --task.echoes === 0) {\n\t\ttask.echoes = task.id = 0;\n\t}\n\tzoneStack.push(PSD);\n\tswitchToZone(targetZone, true);\n}\nfunction zoneLeaveEcho() {\n\tvar zone = zoneStack[zoneStack.length - 1];\n\tzoneStack.pop();\n\tswitchToZone(zone, false);\n}\nfunction switchToZone(targetZone, bEnteringZone) {\n\tvar currentZone = PSD;\n\tif (bEnteringZone ? task.echoes && (!zoneEchoes++ || targetZone !== PSD) : zoneEchoes && (!--zoneEchoes || targetZone !== PSD)) {\n\t\tenqueueNativeMicroTask(bEnteringZone ? zoneEnterEcho.bind(null, targetZone) : zoneLeaveEcho);\n\t}\n\tif (targetZone === PSD)\n\t\treturn;\n\tPSD = targetZone;\n\tif (currentZone === globalPSD)\n\t\tglobalPSD.env = snapShot();\n\tif (patchGlobalPromise) {\n\t\tvar GlobalPromise_1 = globalPSD.env.Promise;\n\t\tvar targetEnv = targetZone.env;\n\t\tnativePromiseProto.then = targetEnv.nthen;\n\t\tGlobalPromise_1.prototype.then = targetEnv.gthen;\n\t\tif (currentZone.global || targetZone.global) {\n\t\t\tObject.defineProperty(_global, 'Promise', targetEnv.PromiseProp);\n\t\t\tGlobalPromise_1.all = targetEnv.all;\n\t\t\tGlobalPromise_1.race = targetEnv.race;\n\t\t\tGlobalPromise_1.resolve = targetEnv.resolve;\n\t\t\tGlobalPromise_1.reject = targetEnv.reject;\n\t\t\tif (targetEnv.allSettled)\n\t\t\t\tGlobalPromise_1.allSettled = targetEnv.allSettled;\n\t\t\tif (targetEnv.any)\n\t\t\t\tGlobalPromise_1.any = targetEnv.any;\n\t\t}\n\t}\n}\nfunction snapShot() {\n\tvar GlobalPromise = _global.Promise || Promise; // tag 02032020\n\treturn patchGlobalPromise ? {\n\t\tPromise: GlobalPromise,\n\t\tPromiseProp: Object.getOwnPropertyDescriptor(_global, \"Promise\"),\n\t\tall: GlobalPromise.all,\n\t\trace: GlobalPromise.race,\n\t\tallSettled: GlobalPromise.allSettled,\n\t\tany: GlobalPromise.any,\n\t\tresolve: GlobalPromise.resolve,\n\t\treject: GlobalPromise.reject,\n\t\tnthen: nativePromiseProto.then,\n\t\tgthen: GlobalPromise.prototype.then\n\t} : {};\n}\nfunction usePSD(psd, fn, a1, a2, a3) {\n\tvar outerScope = PSD;\n\ttry {\n\t\tswitchToZone(psd, true);\n\t\treturn fn(a1, a2, a3);\n\t}\n\tfinally {\n\t\tswitchToZone(outerScope, false);\n\t}\n}\nfunction enqueueNativeMicroTask(job) {\n\tnativePromiseThen.call(resolvedNativePromise, job);\n}\nfunction nativeAwaitCompatibleWrap(fn, zone, possibleAwait, cleanup) {\n\treturn typeof fn !== 'function' ? fn : function () {\n\t\tvar outerZone = PSD;\n\t\tif (possibleAwait)\n\t\t\tincrementExpectedAwaits();\n\t\tswitchToZone(zone, true);\n\t\ttry {\n\t\t\treturn fn.apply(this, arguments);\n\t\t}\n\t\tfinally {\n\t\t\tswitchToZone(outerZone, false);\n\t\t\tif (cleanup)\n\t\t\t\tenqueueNativeMicroTask(decrementExpectedAwaits);\n\t\t}\n\t};\n}\nfunction getPatchedPromiseThen(origThen, zone) {\n\treturn function (onResolved, onRejected) {\n\t\treturn origThen.call(this, nativeAwaitCompatibleWrap(onResolved, zone), nativeAwaitCompatibleWrap(onRejected, zone));\n\t};\n}\nvar UNHANDLEDREJECTION = \"unhandledrejection\";\nfunction globalError(err, promise) {\n\tvar rv;\n\ttry {\n\t\trv = promise.onuncatched(err);\n\t}\n\tcatch (e) { }\n\tif (rv !== false)\n\t\ttry {\n\t\t\tvar event, eventData = { promise: promise, reason: err };\n\t\t\tif (_global.document && document.createEvent) {\n\t\t\t\tevent = document.createEvent('Event');\n\t\t\t\tevent.initEvent(UNHANDLEDREJECTION, true, true);\n\t\t\t\textend(event, eventData);\n\t\t\t}\n\t\t\telse if (_global.CustomEvent) {\n\t\t\t\tevent = new CustomEvent(UNHANDLEDREJECTION, { detail: eventData });\n\t\t\t\textend(event, eventData);\n\t\t\t}\n\t\t\tif (event && _global.dispatchEvent) {\n\t\t\t\tdispatchEvent(event);\n\t\t\t\tif (!_global.PromiseRejectionEvent && _global.onunhandledrejection)\n\t\t\t\t\ttry {\n\t\t\t\t\t\t_global.onunhandledrejection(event);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (_) { }\n\t\t\t}\n\t\t\tif (debug && event && !event.defaultPrevented) {\n\t\t\t\tconsole.warn(\"Unhandled rejection: \" + (err.stack || err));\n\t\t\t}\n\t\t}\n\t\tcatch (e) { }\n}\nvar rejection = DexiePromise.reject;\n\nfunction tempTransaction(db, mode, storeNames, fn) {\n\tif (!db.idbdb || (!db._state.openComplete && (!PSD.letThrough && !db._vip))) {\n\t\tif (db._state.openComplete) {\n\t\t\treturn rejection(new exceptions.DatabaseClosed(db._state.dbOpenError));\n\t\t}\n\t\tif (!db._state.isBeingOpened) {\n\t\t\tif (!db._options.autoOpen)\n\t\t\t\treturn rejection(new exceptions.DatabaseClosed());\n\t\t\tdb.open().catch(nop);\n\t\t}\n\t\treturn db._state.dbReadyPromise.then(function () { return tempTransaction(db, mode, storeNames, fn); });\n\t}\n\telse {\n\t\tvar trans = db._createTransaction(mode, storeNames, db._dbSchema);\n\t\ttry {\n\t\t\ttrans.create();\n\t\t\tdb._state.PR1398_maxLoop = 3;\n\t\t}\n\t\tcatch (ex) {\n\t\t\tif (ex.name === errnames.InvalidState && db.isOpen() && --db._state.PR1398_maxLoop > 0) {\n\t\t\t\tconsole.warn('Dexie: Need to reopen db');\n\t\t\t\tdb._close();\n\t\t\t\treturn db.open().then(function () { return tempTransaction(db, mode, storeNames, fn); });\n\t\t\t}\n\t\t\treturn rejection(ex);\n\t\t}\n\t\treturn trans._promise(mode, function (resolve, reject) {\n\t\t\treturn newScope(function () {\n\t\t\t\tPSD.trans = trans;\n\t\t\t\treturn fn(resolve, reject, trans);\n\t\t\t});\n\t\t}).then(function (result) {\n\t\t\treturn trans._completion.then(function () { return result; });\n\t\t});\n\t}\n}\n\nvar DEXIE_VERSION = '3.2.2';\nvar maxString = String.fromCharCode(65535);\nvar minKey = -Infinity;\nvar INVALID_KEY_ARGUMENT = \"Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.\";\nvar STRING_EXPECTED = \"String expected.\";\nvar connections = [];\nvar isIEOrEdge = typeof navigator !== 'undefined' && /(MSIE|Trident|Edge)/.test(navigator.userAgent);\nvar hasIEDeleteObjectStoreBug = isIEOrEdge;\nvar hangsOnDeleteLargeKeyRange = isIEOrEdge;\nvar dexieStackFrameFilter = function (frame) { return !/(dexie\\.js|dexie\\.min\\.js)/.test(frame); };\nvar DBNAMES_DB = '__dbnames';\nvar READONLY = 'readonly';\nvar READWRITE = 'readwrite';\n\nfunction combine(filter1, filter2) {\n\treturn filter1 ?\n\t\tfilter2 ?\n\t\t\tfunction () { return filter1.apply(this, arguments) && filter2.apply(this, arguments); } :\n\t\t\tfilter1 :\n\t\tfilter2;\n}\n\nvar AnyRange = {\n\ttype: 3 ,\n\tlower: -Infinity,\n\tlowerOpen: false,\n\tupper: [[]],\n\tupperOpen: false\n};\n\nfunction workaroundForUndefinedPrimKey(keyPath) {\n\treturn typeof keyPath === \"string\" && !/\\./.test(keyPath)\n\t\t? function (obj) {\n\t\t\tif (obj[keyPath] === undefined && (keyPath in obj)) {\n\t\t\t\tobj = deepClone(obj);\n\t\t\t\tdelete obj[keyPath];\n\t\t\t}\n\t\t\treturn obj;\n\t\t}\n\t\t: function (obj) { return obj; };\n}\n\nvar Table =  (function () {\n\tfunction Table() {\n\t}\n\tTable.prototype._trans = function (mode, fn, writeLocked) {\n\t\tvar trans = this._tx || PSD.trans;\n\t\tvar tableName = this.name;\n\t\tfunction checkTableInTransaction(resolve, reject, trans) {\n\t\t\tif (!trans.schema[tableName])\n\t\t\t\tthrow new exceptions.NotFound(\"Table \" + tableName + \" not part of transaction\");\n\t\t\treturn fn(trans.idbtrans, trans);\n\t\t}\n\t\tvar wasRootExec = beginMicroTickScope();\n\t\ttry {\n\t\t\treturn trans && trans.db === this.db ?\n\t\t\t\ttrans === PSD.trans ?\n\t\t\t\t\ttrans._promise(mode, checkTableInTransaction, writeLocked) :\n\t\t\t\t\tnewScope(function () { return trans._promise(mode, checkTableInTransaction, writeLocked); }, { trans: trans, transless: PSD.transless || PSD }) :\n\t\t\t\ttempTransaction(this.db, mode, [this.name], checkTableInTransaction);\n\t\t}\n\t\tfinally {\n\t\t\tif (wasRootExec)\n\t\t\t\tendMicroTickScope();\n\t\t}\n\t};\n\tTable.prototype.get = function (keyOrCrit, cb) {\n\t\tvar _this = this;\n\t\tif (keyOrCrit && keyOrCrit.constructor === Object)\n\t\t\treturn this.where(keyOrCrit).first(cb);\n\t\treturn this._trans('readonly', function (trans) {\n\t\t\treturn _this.core.get({ trans: trans, key: keyOrCrit })\n\t\t\t\t.then(function (res) { return _this.hook.reading.fire(res); });\n\t\t}).then(cb);\n\t};\n\tTable.prototype.where = function (indexOrCrit) {\n\t\tif (typeof indexOrCrit === 'string')\n\t\t\treturn new this.db.WhereClause(this, indexOrCrit);\n\t\tif (isArray(indexOrCrit))\n\t\t\treturn new this.db.WhereClause(this, \"[\" + indexOrCrit.join('+') + \"]\");\n\t\tvar keyPaths = keys(indexOrCrit);\n\t\tif (keyPaths.length === 1)\n\t\t\treturn this\n\t\t\t\t.where(keyPaths[0])\n\t\t\t\t.equals(indexOrCrit[keyPaths[0]]);\n\t\tvar compoundIndex = this.schema.indexes.concat(this.schema.primKey).filter(function (ix) {\n\t\t\treturn ix.compound &&\n\t\t\t\tkeyPaths.every(function (keyPath) { return ix.keyPath.indexOf(keyPath) >= 0; }) &&\n\t\t\t\tix.keyPath.every(function (keyPath) { return keyPaths.indexOf(keyPath) >= 0; });\n\t\t})[0];\n\t\tif (compoundIndex && this.db._maxKey !== maxString)\n\t\t\treturn this\n\t\t\t\t.where(compoundIndex.name)\n\t\t\t\t.equals(compoundIndex.keyPath.map(function (kp) { return indexOrCrit[kp]; }));\n\t\tif (!compoundIndex && debug)\n\t\t\tconsole.warn(\"The query \" + JSON.stringify(indexOrCrit) + \" on \" + this.name + \" would benefit of a \" +\n\t\t\t\t(\"compound index [\" + keyPaths.join('+') + \"]\"));\n\t\tvar idxByName = this.schema.idxByName;\n\t\tvar idb = this.db._deps.indexedDB;\n\t\tfunction equals(a, b) {\n\t\t\ttry {\n\t\t\t\treturn idb.cmp(a, b) === 0;\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tvar _a = keyPaths.reduce(function (_a, keyPath) {\n\t\t\tvar prevIndex = _a[0], prevFilterFn = _a[1];\n\t\t\tvar index = idxByName[keyPath];\n\t\t\tvar value = indexOrCrit[keyPath];\n\t\t\treturn [\n\t\t\t\tprevIndex || index,\n\t\t\t\tprevIndex || !index ?\n\t\t\t\t\tcombine(prevFilterFn, index && index.multi ?\n\t\t\t\t\t\tfunction (x) {\n\t\t\t\t\t\t\tvar prop = getByKeyPath(x, keyPath);\n\t\t\t\t\t\t\treturn isArray(prop) && prop.some(function (item) { return equals(value, item); });\n\t\t\t\t\t\t} : function (x) { return equals(value, getByKeyPath(x, keyPath)); })\n\t\t\t\t\t: prevFilterFn\n\t\t\t];\n\t\t}, [null, null]), idx = _a[0], filterFunction = _a[1];\n\t\treturn idx ?\n\t\t\tthis.where(idx.name).equals(indexOrCrit[idx.keyPath])\n\t\t\t\t.filter(filterFunction) :\n\t\t\tcompoundIndex ?\n\t\t\t\tthis.filter(filterFunction) :\n\t\t\t\tthis.where(keyPaths).equals('');\n\t};\n\tTable.prototype.filter = function (filterFunction) {\n\t\treturn this.toCollection().and(filterFunction);\n\t};\n\tTable.prototype.count = function (thenShortcut) {\n\t\treturn this.toCollection().count(thenShortcut);\n\t};\n\tTable.prototype.offset = function (offset) {\n\t\treturn this.toCollection().offset(offset);\n\t};\n\tTable.prototype.limit = function (numRows) {\n\t\treturn this.toCollection().limit(numRows);\n\t};\n\tTable.prototype.each = function (callback) {\n\t\treturn this.toCollection().each(callback);\n\t};\n\tTable.prototype.toArray = function (thenShortcut) {\n\t\treturn this.toCollection().toArray(thenShortcut);\n\t};\n\tTable.prototype.toCollection = function () {\n\t\treturn new this.db.Collection(new this.db.WhereClause(this));\n\t};\n\tTable.prototype.orderBy = function (index) {\n\t\treturn new this.db.Collection(new this.db.WhereClause(this, isArray(index) ?\n\t\t\t\"[\" + index.join('+') + \"]\" :\n\t\t\tindex));\n\t};\n\tTable.prototype.reverse = function () {\n\t\treturn this.toCollection().reverse();\n\t};\n\tTable.prototype.mapToClass = function (constructor) {\n\t\tthis.schema.mappedClass = constructor;\n\t\tvar readHook = function (obj) {\n\t\t\tif (!obj)\n\t\t\t\treturn obj;\n\t\t\tvar res = Object.create(constructor.prototype);\n\t\t\tfor (var m in obj)\n\t\t\t\tif (hasOwn(obj, m))\n\t\t\t\t\ttry {\n\t\t\t\t\t\tres[m] = obj[m];\n\t\t\t\t\t}\n\t\t\t\t\tcatch (_) { }\n\t\t\treturn res;\n\t\t};\n\t\tif (this.schema.readHook) {\n\t\t\tthis.hook.reading.unsubscribe(this.schema.readHook);\n\t\t}\n\t\tthis.schema.readHook = readHook;\n\t\tthis.hook(\"reading\", readHook);\n\t\treturn constructor;\n\t};\n\tTable.prototype.defineClass = function () {\n\t\tfunction Class(content) {\n\t\t\textend(this, content);\n\t\t}\n\t\treturn this.mapToClass(Class);\n\t};\n\tTable.prototype.add = function (obj, key) {\n\t\tvar _this = this;\n\t\tvar _a = this.schema.primKey, auto = _a.auto, keyPath = _a.keyPath;\n\t\tvar objToAdd = obj;\n\t\tif (keyPath && auto) {\n\t\t\tobjToAdd = workaroundForUndefinedPrimKey(keyPath)(obj);\n\t\t}\n\t\treturn this._trans('readwrite', function (trans) {\n\t\t\treturn _this.core.mutate({ trans: trans, type: 'add', keys: key != null ? [key] : null, values: [objToAdd] });\n\t\t}).then(function (res) { return res.numFailures ? DexiePromise.reject(res.failures[0]) : res.lastResult; })\n\t\t\t.then(function (lastResult) {\n\t\t\t\tif (keyPath) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsetByKeyPath(obj, keyPath, lastResult);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (_) { }\n\t\t\t\t}\n\t\t\t\treturn lastResult;\n\t\t\t});\n\t};\n\tTable.prototype.update = function (keyOrObject, modifications) {\n\t\tif (typeof keyOrObject === 'object' && !isArray(keyOrObject)) {\n\t\t\tvar key = getByKeyPath(keyOrObject, this.schema.primKey.keyPath);\n\t\t\tif (key === undefined)\n\t\t\t\treturn rejection(new exceptions.InvalidArgument(\"Given object does not contain its primary key\"));\n\t\t\ttry {\n\t\t\t\tif (typeof modifications !== \"function\") {\n\t\t\t\t\tkeys(modifications).forEach(function (keyPath) {\n\t\t\t\t\t\tsetByKeyPath(keyOrObject, keyPath, modifications[keyPath]);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmodifications(keyOrObject, { value: keyOrObject, primKey: key });\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (_a) {\n\t\t\t}\n\t\t\treturn this.where(\":id\").equals(key).modify(modifications);\n\t\t}\n\t\telse {\n\t\t\treturn this.where(\":id\").equals(keyOrObject).modify(modifications);\n\t\t}\n\t};\n\tTable.prototype.put = function (obj, key) {\n\t\tvar _this = this;\n\t\tvar _a = this.schema.primKey, auto = _a.auto, keyPath = _a.keyPath;\n\t\tvar objToAdd = obj;\n\t\tif (keyPath && auto) {\n\t\t\tobjToAdd = workaroundForUndefinedPrimKey(keyPath)(obj);\n\t\t}\n\t\treturn this._trans('readwrite', function (trans) { return _this.core.mutate({ trans: trans, type: 'put', values: [objToAdd], keys: key != null ? [key] : null }); })\n\t\t\t.then(function (res) { return res.numFailures ? DexiePromise.reject(res.failures[0]) : res.lastResult; })\n\t\t\t.then(function (lastResult) {\n\t\t\t\tif (keyPath) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsetByKeyPath(obj, keyPath, lastResult);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (_) { }\n\t\t\t\t}\n\t\t\t\treturn lastResult;\n\t\t\t});\n\t};\n\tTable.prototype.delete = function (key) {\n\t\tvar _this = this;\n\t\treturn this._trans('readwrite', function (trans) { return _this.core.mutate({ trans: trans, type: 'delete', keys: [key] }); })\n\t\t\t.then(function (res) { return res.numFailures ? DexiePromise.reject(res.failures[0]) : undefined; });\n\t};\n\tTable.prototype.clear = function () {\n\t\tvar _this = this;\n\t\treturn this._trans('readwrite', function (trans) { return _this.core.mutate({ trans: trans, type: 'deleteRange', range: AnyRange }); })\n\t\t\t.then(function (res) { return res.numFailures ? DexiePromise.reject(res.failures[0]) : undefined; });\n\t};\n\tTable.prototype.bulkGet = function (keys) {\n\t\tvar _this = this;\n\t\treturn this._trans('readonly', function (trans) {\n\t\t\treturn _this.core.getMany({\n\t\t\t\tkeys: keys,\n\t\t\t\ttrans: trans\n\t\t\t}).then(function (result) { return result.map(function (res) { return _this.hook.reading.fire(res); }); });\n\t\t});\n\t};\n\tTable.prototype.bulkAdd = function (objects, keysOrOptions, options) {\n\t\tvar _this = this;\n\t\tvar keys = Array.isArray(keysOrOptions) ? keysOrOptions : undefined;\n\t\toptions = options || (keys ? undefined : keysOrOptions);\n\t\tvar wantResults = options ? options.allKeys : undefined;\n\t\treturn this._trans('readwrite', function (trans) {\n\t\t\tvar _a = _this.schema.primKey, auto = _a.auto, keyPath = _a.keyPath;\n\t\t\tif (keyPath && keys)\n\t\t\t\tthrow new exceptions.InvalidArgument(\"bulkAdd(): keys argument invalid on tables with inbound keys\");\n\t\t\tif (keys && keys.length !== objects.length)\n\t\t\t\tthrow new exceptions.InvalidArgument(\"Arguments objects and keys must have the same length\");\n\t\t\tvar numObjects = objects.length;\n\t\t\tvar objectsToAdd = keyPath && auto ?\n\t\t\t\tobjects.map(workaroundForUndefinedPrimKey(keyPath)) :\n\t\t\t\tobjects;\n\t\t\treturn _this.core.mutate({ trans: trans, type: 'add', keys: keys, values: objectsToAdd, wantResults: wantResults })\n\t\t\t\t.then(function (_a) {\n\t\t\t\t\tvar numFailures = _a.numFailures, results = _a.results, lastResult = _a.lastResult, failures = _a.failures;\n\t\t\t\t\tvar result = wantResults ? results : lastResult;\n\t\t\t\t\tif (numFailures === 0)\n\t\t\t\t\t\treturn result;\n\t\t\t\t\tthrow new BulkError(_this.name + \".bulkAdd(): \" + numFailures + \" of \" + numObjects + \" operations failed\", failures);\n\t\t\t\t});\n\t\t});\n\t};\n\tTable.prototype.bulkPut = function (objects, keysOrOptions, options) {\n\t\tvar _this = this;\n\t\tvar keys = Array.isArray(keysOrOptions) ? keysOrOptions : undefined;\n\t\toptions = options || (keys ? undefined : keysOrOptions);\n\t\tvar wantResults = options ? options.allKeys : undefined;\n\t\treturn this._trans('readwrite', function (trans) {\n\t\t\tvar _a = _this.schema.primKey, auto = _a.auto, keyPath = _a.keyPath;\n\t\t\tif (keyPath && keys)\n\t\t\t\tthrow new exceptions.InvalidArgument(\"bulkPut(): keys argument invalid on tables with inbound keys\");\n\t\t\tif (keys && keys.length !== objects.length)\n\t\t\t\tthrow new exceptions.InvalidArgument(\"Arguments objects and keys must have the same length\");\n\t\t\tvar numObjects = objects.length;\n\t\t\tvar objectsToPut = keyPath && auto ?\n\t\t\t\tobjects.map(workaroundForUndefinedPrimKey(keyPath)) :\n\t\t\t\tobjects;\n\t\t\treturn _this.core.mutate({ trans: trans, type: 'put', keys: keys, values: objectsToPut, wantResults: wantResults })\n\t\t\t\t.then(function (_a) {\n\t\t\t\t\tvar numFailures = _a.numFailures, results = _a.results, lastResult = _a.lastResult, failures = _a.failures;\n\t\t\t\t\tvar result = wantResults ? results : lastResult;\n\t\t\t\t\tif (numFailures === 0)\n\t\t\t\t\t\treturn result;\n\t\t\t\t\tthrow new BulkError(_this.name + \".bulkPut(): \" + numFailures + \" of \" + numObjects + \" operations failed\", failures);\n\t\t\t\t});\n\t\t});\n\t};\n\tTable.prototype.bulkDelete = function (keys) {\n\t\tvar _this = this;\n\t\tvar numKeys = keys.length;\n\t\treturn this._trans('readwrite', function (trans) {\n\t\t\treturn _this.core.mutate({ trans: trans, type: 'delete', keys: keys });\n\t\t}).then(function (_a) {\n\t\t\tvar numFailures = _a.numFailures, lastResult = _a.lastResult, failures = _a.failures;\n\t\t\tif (numFailures === 0)\n\t\t\t\treturn lastResult;\n\t\t\tthrow new BulkError(_this.name + \".bulkDelete(): \" + numFailures + \" of \" + numKeys + \" operations failed\", failures);\n\t\t});\n\t};\n\treturn Table;\n}());\n\nfunction Events(ctx) {\n\tvar evs = {};\n\tvar rv = function (eventName, subscriber) {\n\t\tif (subscriber) {\n\t\t\tvar i = arguments.length, args = new Array(i - 1);\n\t\t\twhile (--i)\n\t\t\t\targs[i - 1] = arguments[i];\n\t\t\tevs[eventName].subscribe.apply(null, args);\n\t\t\treturn ctx;\n\t\t}\n\t\telse if (typeof (eventName) === 'string') {\n\t\t\treturn evs[eventName];\n\t\t}\n\t};\n\trv.addEventType = add;\n\tfor (var i = 1, l = arguments.length; i < l; ++i) {\n\t\tadd(arguments[i]);\n\t}\n\treturn rv;\n\tfunction add(eventName, chainFunction, defaultFunction) {\n\t\tif (typeof eventName === 'object')\n\t\t\treturn addConfiguredEvents(eventName);\n\t\tif (!chainFunction)\n\t\t\tchainFunction = reverseStoppableEventChain;\n\t\tif (!defaultFunction)\n\t\t\tdefaultFunction = nop;\n\t\tvar context = {\n\t\t\tsubscribers: [],\n\t\t\tfire: defaultFunction,\n\t\t\tsubscribe: function (cb) {\n\t\t\t\tif (context.subscribers.indexOf(cb) === -1) {\n\t\t\t\t\tcontext.subscribers.push(cb);\n\t\t\t\t\tcontext.fire = chainFunction(context.fire, cb);\n\t\t\t\t}\n\t\t\t},\n\t\t\tunsubscribe: function (cb) {\n\t\t\t\tcontext.subscribers = context.subscribers.filter(function (fn) { return fn !== cb; });\n\t\t\t\tcontext.fire = context.subscribers.reduce(chainFunction, defaultFunction);\n\t\t\t}\n\t\t};\n\t\tevs[eventName] = rv[eventName] = context;\n\t\treturn context;\n\t}\n\tfunction addConfiguredEvents(cfg) {\n\t\tkeys(cfg).forEach(function (eventName) {\n\t\t\tvar args = cfg[eventName];\n\t\t\tif (isArray(args)) {\n\t\t\t\tadd(eventName, cfg[eventName][0], cfg[eventName][1]);\n\t\t\t}\n\t\t\telse if (args === 'asap') {\n\t\t\t\tvar context = add(eventName, mirror, function fire() {\n\t\t\t\t\tvar i = arguments.length, args = new Array(i);\n\t\t\t\t\twhile (i--)\n\t\t\t\t\t\targs[i] = arguments[i];\n\t\t\t\t\tcontext.subscribers.forEach(function (fn) {\n\t\t\t\t\t\tasap$1(function fireEvent() {\n\t\t\t\t\t\t\tfn.apply(null, args);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new exceptions.InvalidArgument(\"Invalid event config\");\n\t\t});\n\t}\n}\n\nfunction makeClassConstructor(prototype, constructor) {\n\tderive(constructor).from({ prototype: prototype });\n\treturn constructor;\n}\n\nfunction createTableConstructor(db) {\n\treturn makeClassConstructor(Table.prototype, function Table(name, tableSchema, trans) {\n\t\tthis.db = db;\n\t\tthis._tx = trans;\n\t\tthis.name = name;\n\t\tthis.schema = tableSchema;\n\t\tthis.hook = db._allTables[name] ? db._allTables[name].hook : Events(null, {\n\t\t\t\"creating\": [hookCreatingChain, nop],\n\t\t\t\"reading\": [pureFunctionChain, mirror],\n\t\t\t\"updating\": [hookUpdatingChain, nop],\n\t\t\t\"deleting\": [hookDeletingChain, nop]\n\t\t});\n\t});\n}\n\nfunction isPlainKeyRange(ctx, ignoreLimitFilter) {\n\treturn !(ctx.filter || ctx.algorithm || ctx.or) &&\n\t\t(ignoreLimitFilter ? ctx.justLimit : !ctx.replayFilter);\n}\nfunction addFilter(ctx, fn) {\n\tctx.filter = combine(ctx.filter, fn);\n}\nfunction addReplayFilter(ctx, factory, isLimitFilter) {\n\tvar curr = ctx.replayFilter;\n\tctx.replayFilter = curr ? function () { return combine(curr(), factory()); } : factory;\n\tctx.justLimit = isLimitFilter && !curr;\n}\nfunction addMatchFilter(ctx, fn) {\n\tctx.isMatch = combine(ctx.isMatch, fn);\n}\nfunction getIndexOrStore(ctx, coreSchema) {\n\tif (ctx.isPrimKey)\n\t\treturn coreSchema.primaryKey;\n\tvar index = coreSchema.getIndexByKeyPath(ctx.index);\n\tif (!index)\n\t\tthrow new exceptions.Schema(\"KeyPath \" + ctx.index + \" on object store \" + coreSchema.name + \" is not indexed\");\n\treturn index;\n}\nfunction openCursor(ctx, coreTable, trans) {\n\tvar index = getIndexOrStore(ctx, coreTable.schema);\n\treturn coreTable.openCursor({\n\t\ttrans: trans,\n\t\tvalues: !ctx.keysOnly,\n\t\treverse: ctx.dir === 'prev',\n\t\tunique: !!ctx.unique,\n\t\tquery: {\n\t\t\tindex: index,\n\t\t\trange: ctx.range\n\t\t}\n\t});\n}\nfunction iter(ctx, fn, coreTrans, coreTable) {\n\tvar filter = ctx.replayFilter ? combine(ctx.filter, ctx.replayFilter()) : ctx.filter;\n\tif (!ctx.or) {\n\t\treturn iterate(openCursor(ctx, coreTable, coreTrans), combine(ctx.algorithm, filter), fn, !ctx.keysOnly && ctx.valueMapper);\n\t}\n\telse {\n\t\tvar set_1 = {};\n\t\tvar union = function (item, cursor, advance) {\n\t\t\tif (!filter || filter(cursor, advance, function (result) { return cursor.stop(result); }, function (err) { return cursor.fail(err); })) {\n\t\t\t\tvar primaryKey = cursor.primaryKey;\n\t\t\t\tvar key = '' + primaryKey;\n\t\t\t\tif (key === '[object ArrayBuffer]')\n\t\t\t\t\tkey = '' + new Uint8Array(primaryKey);\n\t\t\t\tif (!hasOwn(set_1, key)) {\n\t\t\t\t\tset_1[key] = true;\n\t\t\t\t\tfn(item, cursor, advance);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn Promise.all([\n\t\t\tctx.or._iterate(union, coreTrans),\n\t\t\titerate(openCursor(ctx, coreTable, coreTrans), ctx.algorithm, union, !ctx.keysOnly && ctx.valueMapper)\n\t\t]);\n\t}\n}\nfunction iterate(cursorPromise, filter, fn, valueMapper) {\n\tvar mappedFn = valueMapper ? function (x, c, a) { return fn(valueMapper(x), c, a); } : fn;\n\tvar wrappedFn = wrap(mappedFn);\n\treturn cursorPromise.then(function (cursor) {\n\t\tif (cursor) {\n\t\t\treturn cursor.start(function () {\n\t\t\t\tvar c = function () { return cursor.continue(); };\n\t\t\t\tif (!filter || filter(cursor, function (advancer) { return c = advancer; }, function (val) { cursor.stop(val); c = nop; }, function (e) { cursor.fail(e); c = nop; }))\n\t\t\t\t\twrappedFn(cursor.value, cursor, function (advancer) { return c = advancer; });\n\t\t\t\tc();\n\t\t\t});\n\t\t}\n\t});\n}\n\nfunction cmp(a, b) {\n\ttry {\n\t\tvar ta = type(a);\n\t\tvar tb = type(b);\n\t\tif (ta !== tb) {\n\t\t\tif (ta === 'Array')\n\t\t\t\treturn 1;\n\t\t\tif (tb === 'Array')\n\t\t\t\treturn -1;\n\t\t\tif (ta === 'binary')\n\t\t\t\treturn 1;\n\t\t\tif (tb === 'binary')\n\t\t\t\treturn -1;\n\t\t\tif (ta === 'string')\n\t\t\t\treturn 1;\n\t\t\tif (tb === 'string')\n\t\t\t\treturn -1;\n\t\t\tif (ta === 'Date')\n\t\t\t\treturn 1;\n\t\t\tif (tb !== 'Date')\n\t\t\t\treturn NaN;\n\t\t\treturn -1;\n\t\t}\n\t\tswitch (ta) {\n\t\t\tcase 'number':\n\t\t\tcase 'Date':\n\t\t\tcase 'string':\n\t\t\t\treturn a > b ? 1 : a < b ? -1 : 0;\n\t\t\tcase 'binary': {\n\t\t\t\treturn compareUint8Arrays(getUint8Array(a), getUint8Array(b));\n\t\t\t}\n\t\t\tcase 'Array':\n\t\t\t\treturn compareArrays(a, b);\n\t\t}\n\t}\n\tcatch (_a) { }\n\treturn NaN;\n}\nfunction compareArrays(a, b) {\n\tvar al = a.length;\n\tvar bl = b.length;\n\tvar l = al < bl ? al : bl;\n\tfor (var i = 0; i < l; ++i) {\n\t\tvar res = cmp(a[i], b[i]);\n\t\tif (res !== 0)\n\t\t\treturn res;\n\t}\n\treturn al === bl ? 0 : al < bl ? -1 : 1;\n}\nfunction compareUint8Arrays(a, b) {\n\tvar al = a.length;\n\tvar bl = b.length;\n\tvar l = al < bl ? al : bl;\n\tfor (var i = 0; i < l; ++i) {\n\t\tif (a[i] !== b[i])\n\t\t\treturn a[i] < b[i] ? -1 : 1;\n\t}\n\treturn al === bl ? 0 : al < bl ? -1 : 1;\n}\nfunction type(x) {\n\tvar t = typeof x;\n\tif (t !== 'object')\n\t\treturn t;\n\tif (ArrayBuffer.isView(x))\n\t\treturn 'binary';\n\tvar tsTag = toStringTag(x);\n\treturn tsTag === 'ArrayBuffer' ? 'binary' : tsTag;\n}\nfunction getUint8Array(a) {\n\tif (a instanceof Uint8Array)\n\t\treturn a;\n\tif (ArrayBuffer.isView(a))\n\t\treturn new Uint8Array(a.buffer, a.byteOffset, a.byteLength);\n\treturn new Uint8Array(a);\n}\n\nvar Collection =  (function () {\n\tfunction Collection() {\n\t}\n\tCollection.prototype._read = function (fn, cb) {\n\t\tvar ctx = this._ctx;\n\t\treturn ctx.error ?\n\t\t\tctx.table._trans(null, rejection.bind(null, ctx.error)) :\n\t\t\tctx.table._trans('readonly', fn).then(cb);\n\t};\n\tCollection.prototype._write = function (fn) {\n\t\tvar ctx = this._ctx;\n\t\treturn ctx.error ?\n\t\t\tctx.table._trans(null, rejection.bind(null, ctx.error)) :\n\t\t\tctx.table._trans('readwrite', fn, \"locked\");\n\t};\n\tCollection.prototype._addAlgorithm = function (fn) {\n\t\tvar ctx = this._ctx;\n\t\tctx.algorithm = combine(ctx.algorithm, fn);\n\t};\n\tCollection.prototype._iterate = function (fn, coreTrans) {\n\t\treturn iter(this._ctx, fn, coreTrans, this._ctx.table.core);\n\t};\n\tCollection.prototype.clone = function (props) {\n\t\tvar rv = Object.create(this.constructor.prototype), ctx = Object.create(this._ctx);\n\t\tif (props)\n\t\t\textend(ctx, props);\n\t\trv._ctx = ctx;\n\t\treturn rv;\n\t};\n\tCollection.prototype.raw = function () {\n\t\tthis._ctx.valueMapper = null;\n\t\treturn this;\n\t};\n\tCollection.prototype.each = function (fn) {\n\t\tvar ctx = this._ctx;\n\t\treturn this._read(function (trans) { return iter(ctx, fn, trans, ctx.table.core); });\n\t};\n\tCollection.prototype.count = function (cb) {\n\t\tvar _this = this;\n\t\treturn this._read(function (trans) {\n\t\t\tvar ctx = _this._ctx;\n\t\t\tvar coreTable = ctx.table.core;\n\t\t\tif (isPlainKeyRange(ctx, true)) {\n\t\t\t\treturn coreTable.count({\n\t\t\t\t\ttrans: trans,\n\t\t\t\t\tquery: {\n\t\t\t\t\t\tindex: getIndexOrStore(ctx, coreTable.schema),\n\t\t\t\t\t\trange: ctx.range\n\t\t\t\t\t}\n\t\t\t\t}).then(function (count) { return Math.min(count, ctx.limit); });\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar count = 0;\n\t\t\t\treturn iter(ctx, function () { ++count; return false; }, trans, coreTable)\n\t\t\t\t\t.then(function () { return count; });\n\t\t\t}\n\t\t}).then(cb);\n\t};\n\tCollection.prototype.sortBy = function (keyPath, cb) {\n\t\tvar parts = keyPath.split('.').reverse(), lastPart = parts[0], lastIndex = parts.length - 1;\n\t\tfunction getval(obj, i) {\n\t\t\tif (i)\n\t\t\t\treturn getval(obj[parts[i]], i - 1);\n\t\t\treturn obj[lastPart];\n\t\t}\n\t\tvar order = this._ctx.dir === \"next\" ? 1 : -1;\n\t\tfunction sorter(a, b) {\n\t\t\tvar aVal = getval(a, lastIndex), bVal = getval(b, lastIndex);\n\t\t\treturn aVal < bVal ? -order : aVal > bVal ? order : 0;\n\t\t}\n\t\treturn this.toArray(function (a) {\n\t\t\treturn a.sort(sorter);\n\t\t}).then(cb);\n\t};\n\tCollection.prototype.toArray = function (cb) {\n\t\tvar _this = this;\n\t\treturn this._read(function (trans) {\n\t\t\tvar ctx = _this._ctx;\n\t\t\tif (ctx.dir === 'next' && isPlainKeyRange(ctx, true) && ctx.limit > 0) {\n\t\t\t\tvar valueMapper_1 = ctx.valueMapper;\n\t\t\t\tvar index = getIndexOrStore(ctx, ctx.table.core.schema);\n\t\t\t\treturn ctx.table.core.query({\n\t\t\t\t\ttrans: trans,\n\t\t\t\t\tlimit: ctx.limit,\n\t\t\t\t\tvalues: true,\n\t\t\t\t\tquery: {\n\t\t\t\t\t\tindex: index,\n\t\t\t\t\t\trange: ctx.range\n\t\t\t\t\t}\n\t\t\t\t}).then(function (_a) {\n\t\t\t\t\tvar result = _a.result;\n\t\t\t\t\treturn valueMapper_1 ? result.map(valueMapper_1) : result;\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar a_1 = [];\n\t\t\t\treturn iter(ctx, function (item) { return a_1.push(item); }, trans, ctx.table.core).then(function () { return a_1; });\n\t\t\t}\n\t\t}, cb);\n\t};\n\tCollection.prototype.offset = function (offset) {\n\t\tvar ctx = this._ctx;\n\t\tif (offset <= 0)\n\t\t\treturn this;\n\t\tctx.offset += offset;\n\t\tif (isPlainKeyRange(ctx)) {\n\t\t\taddReplayFilter(ctx, function () {\n\t\t\t\tvar offsetLeft = offset;\n\t\t\t\treturn function (cursor, advance) {\n\t\t\t\t\tif (offsetLeft === 0)\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tif (offsetLeft === 1) {\n\t\t\t\t\t\t--offsetLeft;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tadvance(function () {\n\t\t\t\t\t\tcursor.advance(offsetLeft);\n\t\t\t\t\t\toffsetLeft = 0;\n\t\t\t\t\t});\n\t\t\t\t\treturn false;\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\taddReplayFilter(ctx, function () {\n\t\t\t\tvar offsetLeft = offset;\n\t\t\t\treturn function () { return (--offsetLeft < 0); };\n\t\t\t});\n\t\t}\n\t\treturn this;\n\t};\n\tCollection.prototype.limit = function (numRows) {\n\t\tthis._ctx.limit = Math.min(this._ctx.limit, numRows);\n\t\taddReplayFilter(this._ctx, function () {\n\t\t\tvar rowsLeft = numRows;\n\t\t\treturn function (cursor, advance, resolve) {\n\t\t\t\tif (--rowsLeft <= 0)\n\t\t\t\t\tadvance(resolve);\n\t\t\t\treturn rowsLeft >= 0;\n\t\t\t};\n\t\t}, true);\n\t\treturn this;\n\t};\n\tCollection.prototype.until = function (filterFunction, bIncludeStopEntry) {\n\t\taddFilter(this._ctx, function (cursor, advance, resolve) {\n\t\t\tif (filterFunction(cursor.value)) {\n\t\t\t\tadvance(resolve);\n\t\t\t\treturn bIncludeStopEntry;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\t\treturn this;\n\t};\n\tCollection.prototype.first = function (cb) {\n\t\treturn this.limit(1).toArray(function (a) { return a[0]; }).then(cb);\n\t};\n\tCollection.prototype.last = function (cb) {\n\t\treturn this.reverse().first(cb);\n\t};\n\tCollection.prototype.filter = function (filterFunction) {\n\t\taddFilter(this._ctx, function (cursor) {\n\t\t\treturn filterFunction(cursor.value);\n\t\t});\n\t\taddMatchFilter(this._ctx, filterFunction);\n\t\treturn this;\n\t};\n\tCollection.prototype.and = function (filter) {\n\t\treturn this.filter(filter);\n\t};\n\tCollection.prototype.or = function (indexName) {\n\t\treturn new this.db.WhereClause(this._ctx.table, indexName, this);\n\t};\n\tCollection.prototype.reverse = function () {\n\t\tthis._ctx.dir = (this._ctx.dir === \"prev\" ? \"next\" : \"prev\");\n\t\tif (this._ondirectionchange)\n\t\t\tthis._ondirectionchange(this._ctx.dir);\n\t\treturn this;\n\t};\n\tCollection.prototype.desc = function () {\n\t\treturn this.reverse();\n\t};\n\tCollection.prototype.eachKey = function (cb) {\n\t\tvar ctx = this._ctx;\n\t\tctx.keysOnly = !ctx.isMatch;\n\t\treturn this.each(function (val, cursor) { cb(cursor.key, cursor); });\n\t};\n\tCollection.prototype.eachUniqueKey = function (cb) {\n\t\tthis._ctx.unique = \"unique\";\n\t\treturn this.eachKey(cb);\n\t};\n\tCollection.prototype.eachPrimaryKey = function (cb) {\n\t\tvar ctx = this._ctx;\n\t\tctx.keysOnly = !ctx.isMatch;\n\t\treturn this.each(function (val, cursor) { cb(cursor.primaryKey, cursor); });\n\t};\n\tCollection.prototype.keys = function (cb) {\n\t\tvar ctx = this._ctx;\n\t\tctx.keysOnly = !ctx.isMatch;\n\t\tvar a = [];\n\t\treturn this.each(function (item, cursor) {\n\t\t\ta.push(cursor.key);\n\t\t}).then(function () {\n\t\t\treturn a;\n\t\t}).then(cb);\n\t};\n\tCollection.prototype.primaryKeys = function (cb) {\n\t\tvar ctx = this._ctx;\n\t\tif (ctx.dir === 'next' && isPlainKeyRange(ctx, true) && ctx.limit > 0) {\n\t\t\treturn this._read(function (trans) {\n\t\t\t\tvar index = getIndexOrStore(ctx, ctx.table.core.schema);\n\t\t\t\treturn ctx.table.core.query({\n\t\t\t\t\ttrans: trans,\n\t\t\t\t\tvalues: false,\n\t\t\t\t\tlimit: ctx.limit,\n\t\t\t\t\tquery: {\n\t\t\t\t\t\tindex: index,\n\t\t\t\t\t\trange: ctx.range\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}).then(function (_a) {\n\t\t\t\tvar result = _a.result;\n\t\t\t\treturn result;\n\t\t\t}).then(cb);\n\t\t}\n\t\tctx.keysOnly = !ctx.isMatch;\n\t\tvar a = [];\n\t\treturn this.each(function (item, cursor) {\n\t\t\ta.push(cursor.primaryKey);\n\t\t}).then(function () {\n\t\t\treturn a;\n\t\t}).then(cb);\n\t};\n\tCollection.prototype.uniqueKeys = function (cb) {\n\t\tthis._ctx.unique = \"unique\";\n\t\treturn this.keys(cb);\n\t};\n\tCollection.prototype.firstKey = function (cb) {\n\t\treturn this.limit(1).keys(function (a) { return a[0]; }).then(cb);\n\t};\n\tCollection.prototype.lastKey = function (cb) {\n\t\treturn this.reverse().firstKey(cb);\n\t};\n\tCollection.prototype.distinct = function () {\n\t\tvar ctx = this._ctx, idx = ctx.index && ctx.table.schema.idxByName[ctx.index];\n\t\tif (!idx || !idx.multi)\n\t\t\treturn this;\n\t\tvar set = {};\n\t\taddFilter(this._ctx, function (cursor) {\n\t\t\tvar strKey = cursor.primaryKey.toString();\n\t\t\tvar found = hasOwn(set, strKey);\n\t\t\tset[strKey] = true;\n\t\t\treturn !found;\n\t\t});\n\t\treturn this;\n\t};\n\tCollection.prototype.modify = function (changes) {\n\t\tvar _this = this;\n\t\tvar ctx = this._ctx;\n\t\treturn this._write(function (trans) {\n\t\t\tvar modifyer;\n\t\t\tif (typeof changes === 'function') {\n\t\t\t\tmodifyer = changes;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar keyPaths = keys(changes);\n\t\t\t\tvar numKeys = keyPaths.length;\n\t\t\t\tmodifyer = function (item) {\n\t\t\t\t\tvar anythingModified = false;\n\t\t\t\t\tfor (var i = 0; i < numKeys; ++i) {\n\t\t\t\t\t\tvar keyPath = keyPaths[i], val = changes[keyPath];\n\t\t\t\t\t\tif (getByKeyPath(item, keyPath) !== val) {\n\t\t\t\t\t\t\tsetByKeyPath(item, keyPath, val);\n\t\t\t\t\t\t\tanythingModified = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn anythingModified;\n\t\t\t\t};\n\t\t\t}\n\t\t\tvar coreTable = ctx.table.core;\n\t\t\tvar _a = coreTable.schema.primaryKey, outbound = _a.outbound, extractKey = _a.extractKey;\n\t\t\tvar limit = _this.db._options.modifyChunkSize || 200;\n\t\t\tvar totalFailures = [];\n\t\t\tvar successCount = 0;\n\t\t\tvar failedKeys = [];\n\t\t\tvar applyMutateResult = function (expectedCount, res) {\n\t\t\t\tvar failures = res.failures, numFailures = res.numFailures;\n\t\t\t\tsuccessCount += expectedCount - numFailures;\n\t\t\t\tfor (var _i = 0, _a = keys(failures); _i < _a.length; _i++) {\n\t\t\t\t\tvar pos = _a[_i];\n\t\t\t\t\ttotalFailures.push(failures[pos]);\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn _this.clone().primaryKeys().then(function (keys) {\n\t\t\t\tvar nextChunk = function (offset) {\n\t\t\t\t\tvar count = Math.min(limit, keys.length - offset);\n\t\t\t\t\treturn coreTable.getMany({\n\t\t\t\t\t\ttrans: trans,\n\t\t\t\t\t\tkeys: keys.slice(offset, offset + count),\n\t\t\t\t\t\tcache: \"immutable\"\n\t\t\t\t\t}).then(function (values) {\n\t\t\t\t\t\tvar addValues = [];\n\t\t\t\t\t\tvar putValues = [];\n\t\t\t\t\t\tvar putKeys = outbound ? [] : null;\n\t\t\t\t\t\tvar deleteKeys = [];\n\t\t\t\t\t\tfor (var i = 0; i < count; ++i) {\n\t\t\t\t\t\t\tvar origValue = values[i];\n\t\t\t\t\t\t\tvar ctx_1 = {\n\t\t\t\t\t\t\t\tvalue: deepClone(origValue),\n\t\t\t\t\t\t\t\tprimKey: keys[offset + i]\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tif (modifyer.call(ctx_1, ctx_1.value, ctx_1) !== false) {\n\t\t\t\t\t\t\t\tif (ctx_1.value == null) {\n\t\t\t\t\t\t\t\t\tdeleteKeys.push(keys[offset + i]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (!outbound && cmp(extractKey(origValue), extractKey(ctx_1.value)) !== 0) {\n\t\t\t\t\t\t\t\t\tdeleteKeys.push(keys[offset + i]);\n\t\t\t\t\t\t\t\t\taddValues.push(ctx_1.value);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tputValues.push(ctx_1.value);\n\t\t\t\t\t\t\t\t\tif (outbound)\n\t\t\t\t\t\t\t\t\t\tputKeys.push(keys[offset + i]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar criteria = isPlainKeyRange(ctx) &&\n\t\t\t\t\t\t\tctx.limit === Infinity &&\n\t\t\t\t\t\t\t(typeof changes !== 'function' || changes === deleteCallback) && {\n\t\t\t\t\t\t\t\tindex: ctx.index,\n\t\t\t\t\t\t\t\trange: ctx.range\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\treturn Promise.resolve(addValues.length > 0 &&\n\t\t\t\t\t\t\tcoreTable.mutate({ trans: trans, type: 'add', values: addValues })\n\t\t\t\t\t\t\t\t.then(function (res) {\n\t\t\t\t\t\t\t\t\tfor (var pos in res.failures) {\n\t\t\t\t\t\t\t\t\t\tdeleteKeys.splice(parseInt(pos), 1);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tapplyMutateResult(addValues.length, res);\n\t\t\t\t\t\t\t\t})).then(function () { return (putValues.length > 0 || (criteria && typeof changes === 'object')) &&\n\t\t\t\t\t\t\tcoreTable.mutate({\n\t\t\t\t\t\t\t\ttrans: trans,\n\t\t\t\t\t\t\t\ttype: 'put',\n\t\t\t\t\t\t\t\tkeys: putKeys,\n\t\t\t\t\t\t\t\tvalues: putValues,\n\t\t\t\t\t\t\t\tcriteria: criteria,\n\t\t\t\t\t\t\t\tchangeSpec: typeof changes !== 'function'\n\t\t\t\t\t\t\t\t\t&& changes\n\t\t\t\t\t\t\t}).then(function (res) { return applyMutateResult(putValues.length, res); }); }).then(function () { return (deleteKeys.length > 0 || (criteria && changes === deleteCallback)) &&\n\t\t\t\t\t\t\tcoreTable.mutate({\n\t\t\t\t\t\t\t\ttrans: trans,\n\t\t\t\t\t\t\t\ttype: 'delete',\n\t\t\t\t\t\t\t\tkeys: deleteKeys,\n\t\t\t\t\t\t\t\tcriteria: criteria\n\t\t\t\t\t\t\t}).then(function (res) { return applyMutateResult(deleteKeys.length, res); }); }).then(function () {\n\t\t\t\t\t\t\treturn keys.length > offset + count && nextChunk(offset + limit);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t\treturn nextChunk(0).then(function () {\n\t\t\t\t\tif (totalFailures.length > 0)\n\t\t\t\t\t\tthrow new ModifyError(\"Error modifying one or more objects\", totalFailures, successCount, failedKeys);\n\t\t\t\t\treturn keys.length;\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n\tCollection.prototype.delete = function () {\n\t\tvar ctx = this._ctx, range = ctx.range;\n\t\tif (isPlainKeyRange(ctx) &&\n\t\t\t((ctx.isPrimKey && !hangsOnDeleteLargeKeyRange) || range.type === 3 ))\n\t\t{\n\t\t\treturn this._write(function (trans) {\n\t\t\t\tvar primaryKey = ctx.table.core.schema.primaryKey;\n\t\t\t\tvar coreRange = range;\n\t\t\t\treturn ctx.table.core.count({ trans: trans, query: { index: primaryKey, range: coreRange } }).then(function (count) {\n\t\t\t\t\treturn ctx.table.core.mutate({ trans: trans, type: 'deleteRange', range: coreRange })\n\t\t\t\t\t\t.then(function (_a) {\n\t\t\t\t\t\t\tvar failures = _a.failures; _a.lastResult; _a.results; var numFailures = _a.numFailures;\n\t\t\t\t\t\t\tif (numFailures)\n\t\t\t\t\t\t\t\tthrow new ModifyError(\"Could not delete some values\", Object.keys(failures).map(function (pos) { return failures[pos]; }), count - numFailures);\n\t\t\t\t\t\t\treturn count - numFailures;\n\t\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\treturn this.modify(deleteCallback);\n\t};\n\treturn Collection;\n}());\nvar deleteCallback = function (value, ctx) { return ctx.value = null; };\n\nfunction createCollectionConstructor(db) {\n\treturn makeClassConstructor(Collection.prototype, function Collection(whereClause, keyRangeGenerator) {\n\t\tthis.db = db;\n\t\tvar keyRange = AnyRange, error = null;\n\t\tif (keyRangeGenerator)\n\t\t\ttry {\n\t\t\t\tkeyRange = keyRangeGenerator();\n\t\t\t}\n\t\t\tcatch (ex) {\n\t\t\t\terror = ex;\n\t\t\t}\n\t\tvar whereCtx = whereClause._ctx;\n\t\tvar table = whereCtx.table;\n\t\tvar readingHook = table.hook.reading.fire;\n\t\tthis._ctx = {\n\t\t\ttable: table,\n\t\t\tindex: whereCtx.index,\n\t\t\tisPrimKey: (!whereCtx.index || (table.schema.primKey.keyPath && whereCtx.index === table.schema.primKey.name)),\n\t\t\trange: keyRange,\n\t\t\tkeysOnly: false,\n\t\t\tdir: \"next\",\n\t\t\tunique: \"\",\n\t\t\talgorithm: null,\n\t\t\tfilter: null,\n\t\t\treplayFilter: null,\n\t\t\tjustLimit: true,\n\t\t\tisMatch: null,\n\t\t\toffset: 0,\n\t\t\tlimit: Infinity,\n\t\t\terror: error,\n\t\t\tor: whereCtx.or,\n\t\t\tvalueMapper: readingHook !== mirror ? readingHook : null\n\t\t};\n\t});\n}\n\nfunction simpleCompare(a, b) {\n\treturn a < b ? -1 : a === b ? 0 : 1;\n}\nfunction simpleCompareReverse(a, b) {\n\treturn a > b ? -1 : a === b ? 0 : 1;\n}\n\nfunction fail(collectionOrWhereClause, err, T) {\n\tvar collection = collectionOrWhereClause instanceof WhereClause ?\n\t\tnew collectionOrWhereClause.Collection(collectionOrWhereClause) :\n\t\tcollectionOrWhereClause;\n\tcollection._ctx.error = T ? new T(err) : new TypeError(err);\n\treturn collection;\n}\nfunction emptyCollection(whereClause) {\n\treturn new whereClause.Collection(whereClause, function () { return rangeEqual(\"\"); }).limit(0);\n}\nfunction upperFactory(dir) {\n\treturn dir === \"next\" ?\n\t\tfunction (s) { return s.toUpperCase(); } :\n\t\tfunction (s) { return s.toLowerCase(); };\n}\nfunction lowerFactory(dir) {\n\treturn dir === \"next\" ?\n\t\tfunction (s) { return s.toLowerCase(); } :\n\t\tfunction (s) { return s.toUpperCase(); };\n}\nfunction nextCasing(key, lowerKey, upperNeedle, lowerNeedle, cmp, dir) {\n\tvar length = Math.min(key.length, lowerNeedle.length);\n\tvar llp = -1;\n\tfor (var i = 0; i < length; ++i) {\n\t\tvar lwrKeyChar = lowerKey[i];\n\t\tif (lwrKeyChar !== lowerNeedle[i]) {\n\t\t\tif (cmp(key[i], upperNeedle[i]) < 0)\n\t\t\t\treturn key.substr(0, i) + upperNeedle[i] + upperNeedle.substr(i + 1);\n\t\t\tif (cmp(key[i], lowerNeedle[i]) < 0)\n\t\t\t\treturn key.substr(0, i) + lowerNeedle[i] + upperNeedle.substr(i + 1);\n\t\t\tif (llp >= 0)\n\t\t\t\treturn key.substr(0, llp) + lowerKey[llp] + upperNeedle.substr(llp + 1);\n\t\t\treturn null;\n\t\t}\n\t\tif (cmp(key[i], lwrKeyChar) < 0)\n\t\t\tllp = i;\n\t}\n\tif (length < lowerNeedle.length && dir === \"next\")\n\t\treturn key + upperNeedle.substr(key.length);\n\tif (length < key.length && dir === \"prev\")\n\t\treturn key.substr(0, upperNeedle.length);\n\treturn (llp < 0 ? null : key.substr(0, llp) + lowerNeedle[llp] + upperNeedle.substr(llp + 1));\n}\nfunction addIgnoreCaseAlgorithm(whereClause, match, needles, suffix) {\n\tvar upper, lower, compare, upperNeedles, lowerNeedles, direction, nextKeySuffix, needlesLen = needles.length;\n\tif (!needles.every(function (s) { return typeof s === 'string'; })) {\n\t\treturn fail(whereClause, STRING_EXPECTED);\n\t}\n\tfunction initDirection(dir) {\n\t\tupper = upperFactory(dir);\n\t\tlower = lowerFactory(dir);\n\t\tcompare = (dir === \"next\" ? simpleCompare : simpleCompareReverse);\n\t\tvar needleBounds = needles.map(function (needle) {\n\t\t\treturn { lower: lower(needle), upper: upper(needle) };\n\t\t}).sort(function (a, b) {\n\t\t\treturn compare(a.lower, b.lower);\n\t\t});\n\t\tupperNeedles = needleBounds.map(function (nb) { return nb.upper; });\n\t\tlowerNeedles = needleBounds.map(function (nb) { return nb.lower; });\n\t\tdirection = dir;\n\t\tnextKeySuffix = (dir === \"next\" ? \"\" : suffix);\n\t}\n\tinitDirection(\"next\");\n\tvar c = new whereClause.Collection(whereClause, function () { return createRange(upperNeedles[0], lowerNeedles[needlesLen - 1] + suffix); });\n\tc._ondirectionchange = function (direction) {\n\t\tinitDirection(direction);\n\t};\n\tvar firstPossibleNeedle = 0;\n\tc._addAlgorithm(function (cursor, advance, resolve) {\n\t\tvar key = cursor.key;\n\t\tif (typeof key !== 'string')\n\t\t\treturn false;\n\t\tvar lowerKey = lower(key);\n\t\tif (match(lowerKey, lowerNeedles, firstPossibleNeedle)) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\tvar lowestPossibleCasing = null;\n\t\t\tfor (var i = firstPossibleNeedle; i < needlesLen; ++i) {\n\t\t\t\tvar casing = nextCasing(key, lowerKey, upperNeedles[i], lowerNeedles[i], compare, direction);\n\t\t\t\tif (casing === null && lowestPossibleCasing === null)\n\t\t\t\t\tfirstPossibleNeedle = i + 1;\n\t\t\t\telse if (lowestPossibleCasing === null || compare(lowestPossibleCasing, casing) > 0) {\n\t\t\t\t\tlowestPossibleCasing = casing;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (lowestPossibleCasing !== null) {\n\t\t\t\tadvance(function () { cursor.continue(lowestPossibleCasing + nextKeySuffix); });\n\t\t\t}\n\t\t\telse {\n\t\t\t\tadvance(resolve);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t});\n\treturn c;\n}\nfunction createRange(lower, upper, lowerOpen, upperOpen) {\n\treturn {\n\t\ttype: 2 ,\n\t\tlower: lower,\n\t\tupper: upper,\n\t\tlowerOpen: lowerOpen,\n\t\tupperOpen: upperOpen\n\t};\n}\nfunction rangeEqual(value) {\n\treturn {\n\t\ttype: 1 ,\n\t\tlower: value,\n\t\tupper: value\n\t};\n}\n\nvar WhereClause =  (function () {\n\tfunction WhereClause() {\n\t}\n\tObject.defineProperty(WhereClause.prototype, \"Collection\", {\n\t\tget: function () {\n\t\t\treturn this._ctx.table.db.Collection;\n\t\t},\n\t\tenumerable: false,\n\t\tconfigurable: true\n\t});\n\tWhereClause.prototype.between = function (lower, upper, includeLower, includeUpper) {\n\t\tincludeLower = includeLower !== false;\n\t\tincludeUpper = includeUpper === true;\n\t\ttry {\n\t\t\tif ((this._cmp(lower, upper) > 0) ||\n\t\t\t\t(this._cmp(lower, upper) === 0 && (includeLower || includeUpper) && !(includeLower && includeUpper)))\n\t\t\t\treturn emptyCollection(this);\n\t\t\treturn new this.Collection(this, function () { return createRange(lower, upper, !includeLower, !includeUpper); });\n\t\t}\n\t\tcatch (e) {\n\t\t\treturn fail(this, INVALID_KEY_ARGUMENT);\n\t\t}\n\t};\n\tWhereClause.prototype.equals = function (value) {\n\t\tif (value == null)\n\t\t\treturn fail(this, INVALID_KEY_ARGUMENT);\n\t\treturn new this.Collection(this, function () { return rangeEqual(value); });\n\t};\n\tWhereClause.prototype.above = function (value) {\n\t\tif (value == null)\n\t\t\treturn fail(this, INVALID_KEY_ARGUMENT);\n\t\treturn new this.Collection(this, function () { return createRange(value, undefined, true); });\n\t};\n\tWhereClause.prototype.aboveOrEqual = function (value) {\n\t\tif (value == null)\n\t\t\treturn fail(this, INVALID_KEY_ARGUMENT);\n\t\treturn new this.Collection(this, function () { return createRange(value, undefined, false); });\n\t};\n\tWhereClause.prototype.below = function (value) {\n\t\tif (value == null)\n\t\t\treturn fail(this, INVALID_KEY_ARGUMENT);\n\t\treturn new this.Collection(this, function () { return createRange(undefined, value, false, true); });\n\t};\n\tWhereClause.prototype.belowOrEqual = function (value) {\n\t\tif (value == null)\n\t\t\treturn fail(this, INVALID_KEY_ARGUMENT);\n\t\treturn new this.Collection(this, function () { return createRange(undefined, value); });\n\t};\n\tWhereClause.prototype.startsWith = function (str) {\n\t\tif (typeof str !== 'string')\n\t\t\treturn fail(this, STRING_EXPECTED);\n\t\treturn this.between(str, str + maxString, true, true);\n\t};\n\tWhereClause.prototype.startsWithIgnoreCase = function (str) {\n\t\tif (str === \"\")\n\t\t\treturn this.startsWith(str);\n\t\treturn addIgnoreCaseAlgorithm(this, function (x, a) { return x.indexOf(a[0]) === 0; }, [str], maxString);\n\t};\n\tWhereClause.prototype.equalsIgnoreCase = function (str) {\n\t\treturn addIgnoreCaseAlgorithm(this, function (x, a) { return x === a[0]; }, [str], \"\");\n\t};\n\tWhereClause.prototype.anyOfIgnoreCase = function () {\n\t\tvar set = getArrayOf.apply(NO_CHAR_ARRAY, arguments);\n\t\tif (set.length === 0)\n\t\t\treturn emptyCollection(this);\n\t\treturn addIgnoreCaseAlgorithm(this, function (x, a) { return a.indexOf(x) !== -1; }, set, \"\");\n\t};\n\tWhereClause.prototype.startsWithAnyOfIgnoreCase = function () {\n\t\tvar set = getArrayOf.apply(NO_CHAR_ARRAY, arguments);\n\t\tif (set.length === 0)\n\t\t\treturn emptyCollection(this);\n\t\treturn addIgnoreCaseAlgorithm(this, function (x, a) { return a.some(function (n) { return x.indexOf(n) === 0; }); }, set, maxString);\n\t};\n\tWhereClause.prototype.anyOf = function () {\n\t\tvar _this = this;\n\t\tvar set = getArrayOf.apply(NO_CHAR_ARRAY, arguments);\n\t\tvar compare = this._cmp;\n\t\ttry {\n\t\t\tset.sort(compare);\n\t\t}\n\t\tcatch (e) {\n\t\t\treturn fail(this, INVALID_KEY_ARGUMENT);\n\t\t}\n\t\tif (set.length === 0)\n\t\t\treturn emptyCollection(this);\n\t\tvar c = new this.Collection(this, function () { return createRange(set[0], set[set.length - 1]); });\n\t\tc._ondirectionchange = function (direction) {\n\t\t\tcompare = (direction === \"next\" ?\n\t\t\t\t_this._ascending :\n\t\t\t\t_this._descending);\n\t\t\tset.sort(compare);\n\t\t};\n\t\tvar i = 0;\n\t\tc._addAlgorithm(function (cursor, advance, resolve) {\n\t\t\tvar key = cursor.key;\n\t\t\twhile (compare(key, set[i]) > 0) {\n\t\t\t\t++i;\n\t\t\t\tif (i === set.length) {\n\t\t\t\t\tadvance(resolve);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (compare(key, set[i]) === 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tadvance(function () { cursor.continue(set[i]); });\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\treturn c;\n\t};\n\tWhereClause.prototype.notEqual = function (value) {\n\t\treturn this.inAnyRange([[minKey, value], [value, this.db._maxKey]], { includeLowers: false, includeUppers: false });\n\t};\n\tWhereClause.prototype.noneOf = function () {\n\t\tvar set = getArrayOf.apply(NO_CHAR_ARRAY, arguments);\n\t\tif (set.length === 0)\n\t\t\treturn new this.Collection(this);\n\t\ttry {\n\t\t\tset.sort(this._ascending);\n\t\t}\n\t\tcatch (e) {\n\t\t\treturn fail(this, INVALID_KEY_ARGUMENT);\n\t\t}\n\t\tvar ranges = set.reduce(function (res, val) { return res ?\n\t\t\tres.concat([[res[res.length - 1][1], val]]) :\n\t\t\t[[minKey, val]]; }, null);\n\t\tranges.push([set[set.length - 1], this.db._maxKey]);\n\t\treturn this.inAnyRange(ranges, { includeLowers: false, includeUppers: false });\n\t};\n\tWhereClause.prototype.inAnyRange = function (ranges, options) {\n\t\tvar _this = this;\n\t\tvar cmp = this._cmp, ascending = this._ascending, descending = this._descending, min = this._min, max = this._max;\n\t\tif (ranges.length === 0)\n\t\t\treturn emptyCollection(this);\n\t\tif (!ranges.every(function (range) {\n\t\t\treturn range[0] !== undefined &&\n\t\t\t\trange[1] !== undefined &&\n\t\t\t\tascending(range[0], range[1]) <= 0;\n\t\t})) {\n\t\t\treturn fail(this, \"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower\", exceptions.InvalidArgument);\n\t\t}\n\t\tvar includeLowers = !options || options.includeLowers !== false;\n\t\tvar includeUppers = options && options.includeUppers === true;\n\t\tfunction addRange(ranges, newRange) {\n\t\t\tvar i = 0, l = ranges.length;\n\t\t\tfor (; i < l; ++i) {\n\t\t\t\tvar range = ranges[i];\n\t\t\t\tif (cmp(newRange[0], range[1]) < 0 && cmp(newRange[1], range[0]) > 0) {\n\t\t\t\t\trange[0] = min(range[0], newRange[0]);\n\t\t\t\t\trange[1] = max(range[1], newRange[1]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i === l)\n\t\t\t\tranges.push(newRange);\n\t\t\treturn ranges;\n\t\t}\n\t\tvar sortDirection = ascending;\n\t\tfunction rangeSorter(a, b) { return sortDirection(a[0], b[0]); }\n\t\tvar set;\n\t\ttry {\n\t\t\tset = ranges.reduce(addRange, []);\n\t\t\tset.sort(rangeSorter);\n\t\t}\n\t\tcatch (ex) {\n\t\t\treturn fail(this, INVALID_KEY_ARGUMENT);\n\t\t}\n\t\tvar rangePos = 0;\n\t\tvar keyIsBeyondCurrentEntry = includeUppers ?\n\t\t\tfunction (key) { return ascending(key, set[rangePos][1]) > 0; } :\n\t\t\tfunction (key) { return ascending(key, set[rangePos][1]) >= 0; };\n\t\tvar keyIsBeforeCurrentEntry = includeLowers ?\n\t\t\tfunction (key) { return descending(key, set[rangePos][0]) > 0; } :\n\t\t\tfunction (key) { return descending(key, set[rangePos][0]) >= 0; };\n\t\tfunction keyWithinCurrentRange(key) {\n\t\t\treturn !keyIsBeyondCurrentEntry(key) && !keyIsBeforeCurrentEntry(key);\n\t\t}\n\t\tvar checkKey = keyIsBeyondCurrentEntry;\n\t\tvar c = new this.Collection(this, function () { return createRange(set[0][0], set[set.length - 1][1], !includeLowers, !includeUppers); });\n\t\tc._ondirectionchange = function (direction) {\n\t\t\tif (direction === \"next\") {\n\t\t\t\tcheckKey = keyIsBeyondCurrentEntry;\n\t\t\t\tsortDirection = ascending;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcheckKey = keyIsBeforeCurrentEntry;\n\t\t\t\tsortDirection = descending;\n\t\t\t}\n\t\t\tset.sort(rangeSorter);\n\t\t};\n\t\tc._addAlgorithm(function (cursor, advance, resolve) {\n\t\t\tvar key = cursor.key;\n\t\t\twhile (checkKey(key)) {\n\t\t\t\t++rangePos;\n\t\t\t\tif (rangePos === set.length) {\n\t\t\t\t\tadvance(resolve);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (keyWithinCurrentRange(key)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse if (_this._cmp(key, set[rangePos][1]) === 0 || _this._cmp(key, set[rangePos][0]) === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tadvance(function () {\n\t\t\t\t\tif (sortDirection === ascending)\n\t\t\t\t\t\tcursor.continue(set[rangePos][0]);\n\t\t\t\t\telse\n\t\t\t\t\t\tcursor.continue(set[rangePos][1]);\n\t\t\t\t});\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\treturn c;\n\t};\n\tWhereClause.prototype.startsWithAnyOf = function () {\n\t\tvar set = getArrayOf.apply(NO_CHAR_ARRAY, arguments);\n\t\tif (!set.every(function (s) { return typeof s === 'string'; })) {\n\t\t\treturn fail(this, \"startsWithAnyOf() only works with strings\");\n\t\t}\n\t\tif (set.length === 0)\n\t\t\treturn emptyCollection(this);\n\t\treturn this.inAnyRange(set.map(function (str) { return [str, str + maxString]; }));\n\t};\n\treturn WhereClause;\n}());\n\nfunction createWhereClauseConstructor(db) {\n\treturn makeClassConstructor(WhereClause.prototype, function WhereClause(table, index, orCollection) {\n\t\tthis.db = db;\n\t\tthis._ctx = {\n\t\t\ttable: table,\n\t\t\tindex: index === \":id\" ? null : index,\n\t\t\tor: orCollection\n\t\t};\n\t\tvar indexedDB = db._deps.indexedDB;\n\t\tif (!indexedDB)\n\t\t\tthrow new exceptions.MissingAPI();\n\t\tthis._cmp = this._ascending = indexedDB.cmp.bind(indexedDB);\n\t\tthis._descending = function (a, b) { return indexedDB.cmp(b, a); };\n\t\tthis._max = function (a, b) { return indexedDB.cmp(a, b) > 0 ? a : b; };\n\t\tthis._min = function (a, b) { return indexedDB.cmp(a, b) < 0 ? a : b; };\n\t\tthis._IDBKeyRange = db._deps.IDBKeyRange;\n\t});\n}\n\nfunction eventRejectHandler(reject) {\n\treturn wrap(function (event) {\n\t\tpreventDefault(event);\n\t\treject(event.target.error);\n\t\treturn false;\n\t});\n}\nfunction preventDefault(event) {\n\tif (event.stopPropagation)\n\t\tevent.stopPropagation();\n\tif (event.preventDefault)\n\t\tevent.preventDefault();\n}\n\nvar DEXIE_STORAGE_MUTATED_EVENT_NAME = 'storagemutated';\nvar STORAGE_MUTATED_DOM_EVENT_NAME = 'x-storagemutated-1';\nvar globalEvents = Events(null, DEXIE_STORAGE_MUTATED_EVENT_NAME);\n\nvar Transaction =  (function () {\n\tfunction Transaction() {\n\t}\n\tTransaction.prototype._lock = function () {\n\t\tassert(!PSD.global);\n\t\t++this._reculock;\n\t\tif (this._reculock === 1 && !PSD.global)\n\t\t\tPSD.lockOwnerFor = this;\n\t\treturn this;\n\t};\n\tTransaction.prototype._unlock = function () {\n\t\tassert(!PSD.global);\n\t\tif (--this._reculock === 0) {\n\t\t\tif (!PSD.global)\n\t\t\t\tPSD.lockOwnerFor = null;\n\t\t\twhile (this._blockedFuncs.length > 0 && !this._locked()) {\n\t\t\t\tvar fnAndPSD = this._blockedFuncs.shift();\n\t\t\t\ttry {\n\t\t\t\t\tusePSD(fnAndPSD[1], fnAndPSD[0]);\n\t\t\t\t}\n\t\t\t\tcatch (e) { }\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t};\n\tTransaction.prototype._locked = function () {\n\t\treturn this._reculock && PSD.lockOwnerFor !== this;\n\t};\n\tTransaction.prototype.create = function (idbtrans) {\n\t\tvar _this = this;\n\t\tif (!this.mode)\n\t\t\treturn this;\n\t\tvar idbdb = this.db.idbdb;\n\t\tvar dbOpenError = this.db._state.dbOpenError;\n\t\tassert(!this.idbtrans);\n\t\tif (!idbtrans && !idbdb) {\n\t\t\tswitch (dbOpenError && dbOpenError.name) {\n\t\t\t\tcase \"DatabaseClosedError\":\n\t\t\t\t\tthrow new exceptions.DatabaseClosed(dbOpenError);\n\t\t\t\tcase \"MissingAPIError\":\n\t\t\t\t\tthrow new exceptions.MissingAPI(dbOpenError.message, dbOpenError);\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new exceptions.OpenFailed(dbOpenError);\n\t\t\t}\n\t\t}\n\t\tif (!this.active)\n\t\t\tthrow new exceptions.TransactionInactive();\n\t\tassert(this._completion._state === null);\n\t\tidbtrans = this.idbtrans = idbtrans ||\n\t\t\t(this.db.core\n\t\t\t\t? this.db.core.transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })\n\t\t\t\t: idbdb.transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability }));\n\t\tidbtrans.onerror = wrap(function (ev) {\n\t\t\tpreventDefault(ev);\n\t\t\t_this._reject(idbtrans.error);\n\t\t});\n\t\tidbtrans.onabort = wrap(function (ev) {\n\t\t\tpreventDefault(ev);\n\t\t\t_this.active && _this._reject(new exceptions.Abort(idbtrans.error));\n\t\t\t_this.active = false;\n\t\t\t_this.on(\"abort\").fire(ev);\n\t\t});\n\t\tidbtrans.oncomplete = wrap(function () {\n\t\t\t_this.active = false;\n\t\t\t_this._resolve();\n\t\t\tif ('mutatedParts' in idbtrans) {\n\t\t\t\tglobalEvents.storagemutated.fire(idbtrans[\"mutatedParts\"]);\n\t\t\t}\n\t\t});\n\t\treturn this;\n\t};\n\tTransaction.prototype._promise = function (mode, fn, bWriteLock) {\n\t\tvar _this = this;\n\t\tif (mode === 'readwrite' && this.mode !== 'readwrite')\n\t\t\treturn rejection(new exceptions.ReadOnly(\"Transaction is readonly\"));\n\t\tif (!this.active)\n\t\t\treturn rejection(new exceptions.TransactionInactive());\n\t\tif (this._locked()) {\n\t\t\treturn new DexiePromise(function (resolve, reject) {\n\t\t\t\t_this._blockedFuncs.push([function () {\n\t\t\t\t\t_this._promise(mode, fn, bWriteLock).then(resolve, reject);\n\t\t\t\t}, PSD]);\n\t\t\t});\n\t\t}\n\t\telse if (bWriteLock) {\n\t\t\treturn newScope(function () {\n\t\t\t\tvar p = new DexiePromise(function (resolve, reject) {\n\t\t\t\t\t_this._lock();\n\t\t\t\t\tvar rv = fn(resolve, reject, _this);\n\t\t\t\t\tif (rv && rv.then)\n\t\t\t\t\t\trv.then(resolve, reject);\n\t\t\t\t});\n\t\t\t\tp.finally(function () { return _this._unlock(); });\n\t\t\t\tp._lib = true;\n\t\t\t\treturn p;\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tvar p = new DexiePromise(function (resolve, reject) {\n\t\t\t\tvar rv = fn(resolve, reject, _this);\n\t\t\t\tif (rv && rv.then)\n\t\t\t\t\trv.then(resolve, reject);\n\t\t\t});\n\t\t\tp._lib = true;\n\t\t\treturn p;\n\t\t}\n\t};\n\tTransaction.prototype._root = function () {\n\t\treturn this.parent ? this.parent._root() : this;\n\t};\n\tTransaction.prototype.waitFor = function (promiseLike) {\n\t\tvar root = this._root();\n\t\tvar promise = DexiePromise.resolve(promiseLike);\n\t\tif (root._waitingFor) {\n\t\t\troot._waitingFor = root._waitingFor.then(function () { return promise; });\n\t\t}\n\t\telse {\n\t\t\troot._waitingFor = promise;\n\t\t\troot._waitingQueue = [];\n\t\t\tvar store = root.idbtrans.objectStore(root.storeNames[0]);\n\t\t\t(function spin() {\n\t\t\t\t++root._spinCount;\n\t\t\t\twhile (root._waitingQueue.length)\n\t\t\t\t\t(root._waitingQueue.shift())();\n\t\t\t\tif (root._waitingFor)\n\t\t\t\t\tstore.get(-Infinity).onsuccess = spin;\n\t\t\t}());\n\t\t}\n\t\tvar currentWaitPromise = root._waitingFor;\n\t\treturn new DexiePromise(function (resolve, reject) {\n\t\t\tpromise.then(function (res) { return root._waitingQueue.push(wrap(resolve.bind(null, res))); }, function (err) { return root._waitingQueue.push(wrap(reject.bind(null, err))); }).finally(function () {\n\t\t\t\tif (root._waitingFor === currentWaitPromise) {\n\t\t\t\t\troot._waitingFor = null;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n\tTransaction.prototype.abort = function () {\n\t\tif (this.active) {\n\t\t\tthis.active = false;\n\t\t\tif (this.idbtrans)\n\t\t\t\tthis.idbtrans.abort();\n\t\t\tthis._reject(new exceptions.Abort());\n\t\t}\n\t};\n\tTransaction.prototype.table = function (tableName) {\n\t\tvar memoizedTables = (this._memoizedTables || (this._memoizedTables = {}));\n\t\tif (hasOwn(memoizedTables, tableName))\n\t\t\treturn memoizedTables[tableName];\n\t\tvar tableSchema = this.schema[tableName];\n\t\tif (!tableSchema) {\n\t\t\tthrow new exceptions.NotFound(\"Table \" + tableName + \" not part of transaction\");\n\t\t}\n\t\tvar transactionBoundTable = new this.db.Table(tableName, tableSchema, this);\n\t\ttransactionBoundTable.core = this.db.core.table(tableName);\n\t\tmemoizedTables[tableName] = transactionBoundTable;\n\t\treturn transactionBoundTable;\n\t};\n\treturn Transaction;\n}());\n\nfunction createTransactionConstructor(db) {\n\treturn makeClassConstructor(Transaction.prototype, function Transaction(mode, storeNames, dbschema, chromeTransactionDurability, parent) {\n\t\tvar _this = this;\n\t\tthis.db = db;\n\t\tthis.mode = mode;\n\t\tthis.storeNames = storeNames;\n\t\tthis.schema = dbschema;\n\t\tthis.chromeTransactionDurability = chromeTransactionDurability;\n\t\tthis.idbtrans = null;\n\t\tthis.on = Events(this, \"complete\", \"error\", \"abort\");\n\t\tthis.parent = parent || null;\n\t\tthis.active = true;\n\t\tthis._reculock = 0;\n\t\tthis._blockedFuncs = [];\n\t\tthis._resolve = null;\n\t\tthis._reject = null;\n\t\tthis._waitingFor = null;\n\t\tthis._waitingQueue = null;\n\t\tthis._spinCount = 0;\n\t\tthis._completion = new DexiePromise(function (resolve, reject) {\n\t\t\t_this._resolve = resolve;\n\t\t\t_this._reject = reject;\n\t\t});\n\t\tthis._completion.then(function () {\n\t\t\t_this.active = false;\n\t\t\t_this.on.complete.fire();\n\t\t}, function (e) {\n\t\t\tvar wasActive = _this.active;\n\t\t\t_this.active = false;\n\t\t\t_this.on.error.fire(e);\n\t\t\t_this.parent ?\n\t\t\t\t_this.parent._reject(e) :\n\t\t\t\twasActive && _this.idbtrans && _this.idbtrans.abort();\n\t\t\treturn rejection(e);\n\t\t});\n\t});\n}\n\nfunction createIndexSpec(name, keyPath, unique, multi, auto, compound, isPrimKey) {\n\treturn {\n\t\tname: name,\n\t\tkeyPath: keyPath,\n\t\tunique: unique,\n\t\tmulti: multi,\n\t\tauto: auto,\n\t\tcompound: compound,\n\t\tsrc: (unique && !isPrimKey ? '&' : '') + (multi ? '*' : '') + (auto ? \"++\" : \"\") + nameFromKeyPath(keyPath)\n\t};\n}\nfunction nameFromKeyPath(keyPath) {\n\treturn typeof keyPath === 'string' ?\n\t\tkeyPath :\n\t\tkeyPath ? ('[' + [].join.call(keyPath, '+') + ']') : \"\";\n}\n\nfunction createTableSchema(name, primKey, indexes) {\n\treturn {\n\t\tname: name,\n\t\tprimKey: primKey,\n\t\tindexes: indexes,\n\t\tmappedClass: null,\n\t\tidxByName: arrayToObject(indexes, function (index) { return [index.name, index]; })\n\t};\n}\n\nfunction safariMultiStoreFix(storeNames) {\n\treturn storeNames.length === 1 ? storeNames[0] : storeNames;\n}\nvar getMaxKey = function (IdbKeyRange) {\n\ttry {\n\t\tIdbKeyRange.only([[]]);\n\t\tgetMaxKey = function () { return [[]]; };\n\t\treturn [[]];\n\t}\n\tcatch (e) {\n\t\tgetMaxKey = function () { return maxString; };\n\t\treturn maxString;\n\t}\n};\n\nfunction getKeyExtractor(keyPath) {\n\tif (keyPath == null) {\n\t\treturn function () { return undefined; };\n\t}\n\telse if (typeof keyPath === 'string') {\n\t\treturn getSinglePathKeyExtractor(keyPath);\n\t}\n\telse {\n\t\treturn function (obj) { return getByKeyPath(obj, keyPath); };\n\t}\n}\nfunction getSinglePathKeyExtractor(keyPath) {\n\tvar split = keyPath.split('.');\n\tif (split.length === 1) {\n\t\treturn function (obj) { return obj[keyPath]; };\n\t}\n\telse {\n\t\treturn function (obj) { return getByKeyPath(obj, keyPath); };\n\t}\n}\n\nfunction arrayify(arrayLike) {\n\treturn [].slice.call(arrayLike);\n}\nvar _id_counter = 0;\nfunction getKeyPathAlias(keyPath) {\n\treturn keyPath == null ?\n\t\t\":id\" :\n\t\ttypeof keyPath === 'string' ?\n\t\t\tkeyPath :\n\t\t\t\"[\" + keyPath.join('+') + \"]\";\n}\nfunction createDBCore(db, IdbKeyRange, tmpTrans) {\n\tfunction extractSchema(db, trans) {\n\t\tvar tables = arrayify(db.objectStoreNames);\n\t\treturn {\n\t\t\tschema: {\n\t\t\t\tname: db.name,\n\t\t\t\ttables: tables.map(function (table) { return trans.objectStore(table); }).map(function (store) {\n\t\t\t\t\tvar keyPath = store.keyPath, autoIncrement = store.autoIncrement;\n\t\t\t\t\tvar compound = isArray(keyPath);\n\t\t\t\t\tvar outbound = keyPath == null;\n\t\t\t\t\tvar indexByKeyPath = {};\n\t\t\t\t\tvar result = {\n\t\t\t\t\t\tname: store.name,\n\t\t\t\t\t\tprimaryKey: {\n\t\t\t\t\t\t\tname: null,\n\t\t\t\t\t\t\tisPrimaryKey: true,\n\t\t\t\t\t\t\toutbound: outbound,\n\t\t\t\t\t\t\tcompound: compound,\n\t\t\t\t\t\t\tkeyPath: keyPath,\n\t\t\t\t\t\t\tautoIncrement: autoIncrement,\n\t\t\t\t\t\t\tunique: true,\n\t\t\t\t\t\t\textractKey: getKeyExtractor(keyPath)\n\t\t\t\t\t\t},\n\t\t\t\t\t\tindexes: arrayify(store.indexNames).map(function (indexName) { return store.index(indexName); })\n\t\t\t\t\t\t\t.map(function (index) {\n\t\t\t\t\t\t\t\tvar name = index.name, unique = index.unique, multiEntry = index.multiEntry, keyPath = index.keyPath;\n\t\t\t\t\t\t\t\tvar compound = isArray(keyPath);\n\t\t\t\t\t\t\t\tvar result = {\n\t\t\t\t\t\t\t\t\tname: name,\n\t\t\t\t\t\t\t\t\tcompound: compound,\n\t\t\t\t\t\t\t\t\tkeyPath: keyPath,\n\t\t\t\t\t\t\t\t\tunique: unique,\n\t\t\t\t\t\t\t\t\tmultiEntry: multiEntry,\n\t\t\t\t\t\t\t\t\textractKey: getKeyExtractor(keyPath)\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tindexByKeyPath[getKeyPathAlias(keyPath)] = result;\n\t\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\tgetIndexByKeyPath: function (keyPath) { return indexByKeyPath[getKeyPathAlias(keyPath)]; }\n\t\t\t\t\t};\n\t\t\t\t\tindexByKeyPath[\":id\"] = result.primaryKey;\n\t\t\t\t\tif (keyPath != null) {\n\t\t\t\t\t\tindexByKeyPath[getKeyPathAlias(keyPath)] = result.primaryKey;\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t})\n\t\t\t},\n\t\t\thasGetAll: tables.length > 0 && ('getAll' in trans.objectStore(tables[0])) &&\n\t\t\t\t!(typeof navigator !== 'undefined' && /Safari/.test(navigator.userAgent) &&\n\t\t\t\t\t!/(Chrome\\/|Edge\\/)/.test(navigator.userAgent) &&\n\t\t\t\t\t[].concat(navigator.userAgent.match(/Safari\\/(\\d*)/))[1] < 604)\n\t\t};\n\t}\n\tfunction makeIDBKeyRange(range) {\n\t\tif (range.type === 3 )\n\t\t\treturn null;\n\t\tif (range.type === 4 )\n\t\t\tthrow new Error(\"Cannot convert never type to IDBKeyRange\");\n\t\tvar lower = range.lower, upper = range.upper, lowerOpen = range.lowerOpen, upperOpen = range.upperOpen;\n\t\tvar idbRange = lower === undefined ?\n\t\t\tupper === undefined ?\n\t\t\t\tnull :\n\t\t\t\tIdbKeyRange.upperBound(upper, !!upperOpen) :\n\t\t\tupper === undefined ?\n\t\t\t\tIdbKeyRange.lowerBound(lower, !!lowerOpen) :\n\t\t\t\tIdbKeyRange.bound(lower, upper, !!lowerOpen, !!upperOpen);\n\t\treturn idbRange;\n\t}\n\tfunction createDbCoreTable(tableSchema) {\n\t\tvar tableName = tableSchema.name;\n\t\tfunction mutate(_a) {\n\t\t\tvar trans = _a.trans, type = _a.type, keys = _a.keys, values = _a.values, range = _a.range;\n\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\tresolve = wrap(resolve);\n\t\t\t\tvar store = trans.objectStore(tableName);\n\t\t\t\tvar outbound = store.keyPath == null;\n\t\t\t\tvar isAddOrPut = type === \"put\" || type === \"add\";\n\t\t\t\tif (!isAddOrPut && type !== 'delete' && type !== 'deleteRange')\n\t\t\t\t\tthrow new Error(\"Invalid operation type: \" + type);\n\t\t\t\tvar length = (keys || values || { length: 1 }).length;\n\t\t\t\tif (keys && values && keys.length !== values.length) {\n\t\t\t\t\tthrow new Error(\"Given keys array must have same length as given values array.\");\n\t\t\t\t}\n\t\t\t\tif (length === 0)\n\t\t\t\t\treturn resolve({ numFailures: 0, failures: {}, results: [], lastResult: undefined });\n\t\t\t\tvar req;\n\t\t\t\tvar reqs = [];\n\t\t\t\tvar failures = [];\n\t\t\t\tvar numFailures = 0;\n\t\t\t\tvar errorHandler = function (event) {\n\t\t\t\t\t++numFailures;\n\t\t\t\t\tpreventDefault(event);\n\t\t\t\t};\n\t\t\t\tif (type === 'deleteRange') {\n\t\t\t\t\tif (range.type === 4 )\n\t\t\t\t\t\treturn resolve({ numFailures: numFailures, failures: failures, results: [], lastResult: undefined });\n\t\t\t\t\tif (range.type === 3 )\n\t\t\t\t\t\treqs.push(req = store.clear());\n\t\t\t\t\telse\n\t\t\t\t\t\treqs.push(req = store.delete(makeIDBKeyRange(range)));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar _a = isAddOrPut ?\n\t\t\t\t\t\toutbound ?\n\t\t\t\t\t\t\t[values, keys] :\n\t\t\t\t\t\t\t[values, null] :\n\t\t\t\t\t\t[keys, null], args1 = _a[0], args2 = _a[1];\n\t\t\t\t\tif (isAddOrPut) {\n\t\t\t\t\t\tfor (var i = 0; i < length; ++i) {\n\t\t\t\t\t\t\treqs.push(req = (args2 && args2[i] !== undefined ?\n\t\t\t\t\t\t\t\tstore[type](args1[i], args2[i]) :\n\t\t\t\t\t\t\t\tstore[type](args1[i])));\n\t\t\t\t\t\t\treq.onerror = errorHandler;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tfor (var i = 0; i < length; ++i) {\n\t\t\t\t\t\t\treqs.push(req = store[type](args1[i]));\n\t\t\t\t\t\t\treq.onerror = errorHandler;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvar done = function (event) {\n\t\t\t\t\tvar lastResult = event.target.result;\n\t\t\t\t\treqs.forEach(function (req, i) { return req.error != null && (failures[i] = req.error); });\n\t\t\t\t\tresolve({\n\t\t\t\t\t\tnumFailures: numFailures,\n\t\t\t\t\t\tfailures: failures,\n\t\t\t\t\t\tresults: type === \"delete\" ? keys : reqs.map(function (req) { return req.result; }),\n\t\t\t\t\t\tlastResult: lastResult\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t\treq.onerror = function (event) {\n\t\t\t\t\terrorHandler(event);\n\t\t\t\t\tdone(event);\n\t\t\t\t};\n\t\t\t\treq.onsuccess = done;\n\t\t\t});\n\t\t}\n\t\tfunction openCursor(_a) {\n\t\t\tvar trans = _a.trans, values = _a.values, query = _a.query, reverse = _a.reverse, unique = _a.unique;\n\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\tresolve = wrap(resolve);\n\t\t\t\tvar index = query.index, range = query.range;\n\t\t\t\tvar store = trans.objectStore(tableName);\n\t\t\t\tvar source = index.isPrimaryKey ?\n\t\t\t\t\tstore :\n\t\t\t\t\tstore.index(index.name);\n\t\t\t\tvar direction = reverse ?\n\t\t\t\t\tunique ?\n\t\t\t\t\t\t\"prevunique\" :\n\t\t\t\t\t\t\"prev\" :\n\t\t\t\t\tunique ?\n\t\t\t\t\t\t\"nextunique\" :\n\t\t\t\t\t\t\"next\";\n\t\t\t\tvar req = values || !('openKeyCursor' in source) ?\n\t\t\t\t\tsource.openCursor(makeIDBKeyRange(range), direction) :\n\t\t\t\t\tsource.openKeyCursor(makeIDBKeyRange(range), direction);\n\t\t\t\treq.onerror = eventRejectHandler(reject);\n\t\t\t\treq.onsuccess = wrap(function (ev) {\n\t\t\t\t\tvar cursor = req.result;\n\t\t\t\t\tif (!cursor) {\n\t\t\t\t\t\tresolve(null);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcursor.___id = ++_id_counter;\n\t\t\t\t\tcursor.done = false;\n\t\t\t\t\tvar _cursorContinue = cursor.continue.bind(cursor);\n\t\t\t\t\tvar _cursorContinuePrimaryKey = cursor.continuePrimaryKey;\n\t\t\t\t\tif (_cursorContinuePrimaryKey)\n\t\t\t\t\t\t_cursorContinuePrimaryKey = _cursorContinuePrimaryKey.bind(cursor);\n\t\t\t\t\tvar _cursorAdvance = cursor.advance.bind(cursor);\n\t\t\t\t\tvar doThrowCursorIsNotStarted = function () { throw new Error(\"Cursor not started\"); };\n\t\t\t\t\tvar doThrowCursorIsStopped = function () { throw new Error(\"Cursor not stopped\"); };\n\t\t\t\t\tcursor.trans = trans;\n\t\t\t\t\tcursor.stop = cursor.continue = cursor.continuePrimaryKey = cursor.advance = doThrowCursorIsNotStarted;\n\t\t\t\t\tcursor.fail = wrap(reject);\n\t\t\t\t\tcursor.next = function () {\n\t\t\t\t\t\tvar _this = this;\n\t\t\t\t\t\tvar gotOne = 1;\n\t\t\t\t\t\treturn this.start(function () { return gotOne-- ? _this.continue() : _this.stop(); }).then(function () { return _this; });\n\t\t\t\t\t};\n\t\t\t\t\tcursor.start = function (callback) {\n\t\t\t\t\t\tvar iterationPromise = new Promise(function (resolveIteration, rejectIteration) {\n\t\t\t\t\t\t\tresolveIteration = wrap(resolveIteration);\n\t\t\t\t\t\t\treq.onerror = eventRejectHandler(rejectIteration);\n\t\t\t\t\t\t\tcursor.fail = rejectIteration;\n\t\t\t\t\t\t\tcursor.stop = function (value) {\n\t\t\t\t\t\t\t\tcursor.stop = cursor.continue = cursor.continuePrimaryKey = cursor.advance = doThrowCursorIsStopped;\n\t\t\t\t\t\t\t\tresolveIteration(value);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t});\n\t\t\t\t\t\tvar guardedCallback = function () {\n\t\t\t\t\t\t\tif (req.result) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tcallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch (err) {\n\t\t\t\t\t\t\t\t\tcursor.fail(err);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tcursor.done = true;\n\t\t\t\t\t\t\t\tcursor.start = function () { throw new Error(\"Cursor behind last entry\"); };\n\t\t\t\t\t\t\t\tcursor.stop();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\treq.onsuccess = wrap(function (ev) {\n\t\t\t\t\t\t\treq.onsuccess = guardedCallback;\n\t\t\t\t\t\t\tguardedCallback();\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcursor.continue = _cursorContinue;\n\t\t\t\t\t\tcursor.continuePrimaryKey = _cursorContinuePrimaryKey;\n\t\t\t\t\t\tcursor.advance = _cursorAdvance;\n\t\t\t\t\t\tguardedCallback();\n\t\t\t\t\t\treturn iterationPromise;\n\t\t\t\t\t};\n\t\t\t\t\tresolve(cursor);\n\t\t\t\t}, reject);\n\t\t\t});\n\t\t}\n\t\tfunction query(hasGetAll) {\n\t\t\treturn function (request) {\n\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\tresolve = wrap(resolve);\n\t\t\t\t\tvar trans = request.trans, values = request.values, limit = request.limit, query = request.query;\n\t\t\t\t\tvar nonInfinitLimit = limit === Infinity ? undefined : limit;\n\t\t\t\t\tvar index = query.index, range = query.range;\n\t\t\t\t\tvar store = trans.objectStore(tableName);\n\t\t\t\t\tvar source = index.isPrimaryKey ? store : store.index(index.name);\n\t\t\t\t\tvar idbKeyRange = makeIDBKeyRange(range);\n\t\t\t\t\tif (limit === 0)\n\t\t\t\t\t\treturn resolve({ result: [] });\n\t\t\t\t\tif (hasGetAll) {\n\t\t\t\t\t\tvar req = values ?\n\t\t\t\t\t\t\tsource.getAll(idbKeyRange, nonInfinitLimit) :\n\t\t\t\t\t\t\tsource.getAllKeys(idbKeyRange, nonInfinitLimit);\n\t\t\t\t\t\treq.onsuccess = function (event) { return resolve({ result: event.target.result }); };\n\t\t\t\t\t\treq.onerror = eventRejectHandler(reject);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar count_1 = 0;\n\t\t\t\t\t\tvar req_1 = values || !('openKeyCursor' in source) ?\n\t\t\t\t\t\t\tsource.openCursor(idbKeyRange) :\n\t\t\t\t\t\t\tsource.openKeyCursor(idbKeyRange);\n\t\t\t\t\t\tvar result_1 = [];\n\t\t\t\t\t\treq_1.onsuccess = function (event) {\n\t\t\t\t\t\t\tvar cursor = req_1.result;\n\t\t\t\t\t\t\tif (!cursor)\n\t\t\t\t\t\t\t\treturn resolve({ result: result_1 });\n\t\t\t\t\t\t\tresult_1.push(values ? cursor.value : cursor.primaryKey);\n\t\t\t\t\t\t\tif (++count_1 === limit)\n\t\t\t\t\t\t\t\treturn resolve({ result: result_1 });\n\t\t\t\t\t\t\tcursor.continue();\n\t\t\t\t\t\t};\n\t\t\t\t\t\treq_1.onerror = eventRejectHandler(reject);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tname: tableName,\n\t\t\tschema: tableSchema,\n\t\t\tmutate: mutate,\n\t\t\tgetMany: function (_a) {\n\t\t\t\tvar trans = _a.trans, keys = _a.keys;\n\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\tresolve = wrap(resolve);\n\t\t\t\t\tvar store = trans.objectStore(tableName);\n\t\t\t\t\tvar length = keys.length;\n\t\t\t\t\tvar result = new Array(length);\n\t\t\t\t\tvar keyCount = 0;\n\t\t\t\t\tvar callbackCount = 0;\n\t\t\t\t\tvar req;\n\t\t\t\t\tvar successHandler = function (event) {\n\t\t\t\t\t\tvar req = event.target;\n\t\t\t\t\t\tif ((result[req._pos] = req.result) != null)\n\t\t\t\t\t\t\t;\n\t\t\t\t\t\tif (++callbackCount === keyCount)\n\t\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t};\n\t\t\t\t\tvar errorHandler = eventRejectHandler(reject);\n\t\t\t\t\tfor (var i = 0; i < length; ++i) {\n\t\t\t\t\t\tvar key = keys[i];\n\t\t\t\t\t\tif (key != null) {\n\t\t\t\t\t\t\treq = store.get(keys[i]);\n\t\t\t\t\t\t\treq._pos = i;\n\t\t\t\t\t\t\treq.onsuccess = successHandler;\n\t\t\t\t\t\t\treq.onerror = errorHandler;\n\t\t\t\t\t\t\t++keyCount;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (keyCount === 0)\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t});\n\t\t\t},\n\t\t\tget: function (_a) {\n\t\t\t\tvar trans = _a.trans, key = _a.key;\n\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\tresolve = wrap(resolve);\n\t\t\t\t\tvar store = trans.objectStore(tableName);\n\t\t\t\t\tvar req = store.get(key);\n\t\t\t\t\treq.onsuccess = function (event) { return resolve(event.target.result); };\n\t\t\t\t\treq.onerror = eventRejectHandler(reject);\n\t\t\t\t});\n\t\t\t},\n\t\t\tquery: query(hasGetAll),\n\t\t\topenCursor: openCursor,\n\t\t\tcount: function (_a) {\n\t\t\t\tvar query = _a.query, trans = _a.trans;\n\t\t\t\tvar index = query.index, range = query.range;\n\t\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\t\tvar store = trans.objectStore(tableName);\n\t\t\t\t\tvar source = index.isPrimaryKey ? store : store.index(index.name);\n\t\t\t\t\tvar idbKeyRange = makeIDBKeyRange(range);\n\t\t\t\t\tvar req = idbKeyRange ? source.count(idbKeyRange) : source.count();\n\t\t\t\t\treq.onsuccess = wrap(function (ev) { return resolve(ev.target.result); });\n\t\t\t\t\treq.onerror = eventRejectHandler(reject);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n\tvar _a = extractSchema(db, tmpTrans), schema = _a.schema, hasGetAll = _a.hasGetAll;\n\tvar tables = schema.tables.map(function (tableSchema) { return createDbCoreTable(tableSchema); });\n\tvar tableMap = {};\n\ttables.forEach(function (table) { return tableMap[table.name] = table; });\n\treturn {\n\t\tstack: \"dbcore\",\n\t\ttransaction: db.transaction.bind(db),\n\t\ttable: function (name) {\n\t\t\tvar result = tableMap[name];\n\t\t\tif (!result)\n\t\t\t\tthrow new Error(\"Table '\" + name + \"' not found\");\n\t\t\treturn tableMap[name];\n\t\t},\n\t\tMIN_KEY: -Infinity,\n\t\tMAX_KEY: getMaxKey(IdbKeyRange),\n\t\tschema: schema\n\t};\n}\n\nfunction createMiddlewareStack(stackImpl, middlewares) {\n\treturn middlewares.reduce(function (down, _a) {\n\t\tvar create = _a.create;\n\t\treturn (__assign(__assign({}, down), create(down)));\n\t}, stackImpl);\n}\nfunction createMiddlewareStacks(middlewares, idbdb, _a, tmpTrans) {\n\tvar IDBKeyRange = _a.IDBKeyRange; _a.indexedDB;\n\tvar dbcore = createMiddlewareStack(createDBCore(idbdb, IDBKeyRange, tmpTrans), middlewares.dbcore);\n\treturn {\n\t\tdbcore: dbcore\n\t};\n}\nfunction generateMiddlewareStacks(_a, tmpTrans) {\n\tvar db = _a._novip;\n\tvar idbdb = tmpTrans.db;\n\tvar stacks = createMiddlewareStacks(db._middlewares, idbdb, db._deps, tmpTrans);\n\tdb.core = stacks.dbcore;\n\tdb.tables.forEach(function (table) {\n\t\tvar tableName = table.name;\n\t\tif (db.core.schema.tables.some(function (tbl) { return tbl.name === tableName; })) {\n\t\t\ttable.core = db.core.table(tableName);\n\t\t\tif (db[tableName] instanceof db.Table) {\n\t\t\t\tdb[tableName].core = table.core;\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction setApiOnPlace(_a, objs, tableNames, dbschema) {\n\tvar db = _a._novip;\n\ttableNames.forEach(function (tableName) {\n\t\tvar schema = dbschema[tableName];\n\t\tobjs.forEach(function (obj) {\n\t\t\tvar propDesc = getPropertyDescriptor(obj, tableName);\n\t\t\tif (!propDesc || (\"value\" in propDesc && propDesc.value === undefined)) {\n\t\t\t\tif (obj === db.Transaction.prototype || obj instanceof db.Transaction) {\n\t\t\t\t\tsetProp(obj, tableName, {\n\t\t\t\t\t\tget: function () { return this.table(tableName); },\n\t\t\t\t\t\tset: function (value) {\n\t\t\t\t\t\t\tdefineProperty(this, tableName, { value: value, writable: true, configurable: true, enumerable: true });\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tobj[tableName] = new db.Table(tableName, schema);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\nfunction removeTablesApi(_a, objs) {\n\tvar db = _a._novip;\n\tobjs.forEach(function (obj) {\n\t\tfor (var key in obj) {\n\t\t\tif (obj[key] instanceof db.Table)\n\t\t\t\tdelete obj[key];\n\t\t}\n\t});\n}\nfunction lowerVersionFirst(a, b) {\n\treturn a._cfg.version - b._cfg.version;\n}\nfunction runUpgraders(db, oldVersion, idbUpgradeTrans, reject) {\n\tvar globalSchema = db._dbSchema;\n\tvar trans = db._createTransaction('readwrite', db._storeNames, globalSchema);\n\ttrans.create(idbUpgradeTrans);\n\ttrans._completion.catch(reject);\n\tvar rejectTransaction = trans._reject.bind(trans);\n\tvar transless = PSD.transless || PSD;\n\tnewScope(function () {\n\t\tPSD.trans = trans;\n\t\tPSD.transless = transless;\n\t\tif (oldVersion === 0) {\n\t\t\tkeys(globalSchema).forEach(function (tableName) {\n\t\t\t\tcreateTable(idbUpgradeTrans, tableName, globalSchema[tableName].primKey, globalSchema[tableName].indexes);\n\t\t\t});\n\t\t\tgenerateMiddlewareStacks(db, idbUpgradeTrans);\n\t\t\tDexiePromise.follow(function () { return db.on.populate.fire(trans); }).catch(rejectTransaction);\n\t\t}\n\t\telse\n\t\t\tupdateTablesAndIndexes(db, oldVersion, trans, idbUpgradeTrans).catch(rejectTransaction);\n\t});\n}\nfunction updateTablesAndIndexes(_a, oldVersion, trans, idbUpgradeTrans) {\n\tvar db = _a._novip;\n\tvar queue = [];\n\tvar versions = db._versions;\n\tvar globalSchema = db._dbSchema = buildGlobalSchema(db, db.idbdb, idbUpgradeTrans);\n\tvar anyContentUpgraderHasRun = false;\n\tvar versToRun = versions.filter(function (v) { return v._cfg.version >= oldVersion; });\n\tversToRun.forEach(function (version) {\n\t\tqueue.push(function () {\n\t\t\tvar oldSchema = globalSchema;\n\t\t\tvar newSchema = version._cfg.dbschema;\n\t\t\tadjustToExistingIndexNames(db, oldSchema, idbUpgradeTrans);\n\t\t\tadjustToExistingIndexNames(db, newSchema, idbUpgradeTrans);\n\t\t\tglobalSchema = db._dbSchema = newSchema;\n\t\t\tvar diff = getSchemaDiff(oldSchema, newSchema);\n\t\t\tdiff.add.forEach(function (tuple) {\n\t\t\t\tcreateTable(idbUpgradeTrans, tuple[0], tuple[1].primKey, tuple[1].indexes);\n\t\t\t});\n\t\t\tdiff.change.forEach(function (change) {\n\t\t\t\tif (change.recreate) {\n\t\t\t\t\tthrow new exceptions.Upgrade(\"Not yet support for changing primary key\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar store_1 = idbUpgradeTrans.objectStore(change.name);\n\t\t\t\t\tchange.add.forEach(function (idx) { return addIndex(store_1, idx); });\n\t\t\t\t\tchange.change.forEach(function (idx) {\n\t\t\t\t\t\tstore_1.deleteIndex(idx.name);\n\t\t\t\t\t\taddIndex(store_1, idx);\n\t\t\t\t\t});\n\t\t\t\t\tchange.del.forEach(function (idxName) { return store_1.deleteIndex(idxName); });\n\t\t\t\t}\n\t\t\t});\n\t\t\tvar contentUpgrade = version._cfg.contentUpgrade;\n\t\t\tif (contentUpgrade && version._cfg.version > oldVersion) {\n\t\t\t\tgenerateMiddlewareStacks(db, idbUpgradeTrans);\n\t\t\t\ttrans._memoizedTables = {};\n\t\t\t\tanyContentUpgraderHasRun = true;\n\t\t\t\tvar upgradeSchema_1 = shallowClone(newSchema);\n\t\t\t\tdiff.del.forEach(function (table) {\n\t\t\t\t\tupgradeSchema_1[table] = oldSchema[table];\n\t\t\t\t});\n\t\t\t\tremoveTablesApi(db, [db.Transaction.prototype]);\n\t\t\t\tsetApiOnPlace(db, [db.Transaction.prototype], keys(upgradeSchema_1), upgradeSchema_1);\n\t\t\t\ttrans.schema = upgradeSchema_1;\n\t\t\t\tvar contentUpgradeIsAsync_1 = isAsyncFunction(contentUpgrade);\n\t\t\t\tif (contentUpgradeIsAsync_1) {\n\t\t\t\t\tincrementExpectedAwaits();\n\t\t\t\t}\n\t\t\t\tvar returnValue_1;\n\t\t\t\tvar promiseFollowed = DexiePromise.follow(function () {\n\t\t\t\t\treturnValue_1 = contentUpgrade(trans);\n\t\t\t\t\tif (returnValue_1) {\n\t\t\t\t\t\tif (contentUpgradeIsAsync_1) {\n\t\t\t\t\t\t\tvar decrementor = decrementExpectedAwaits.bind(null, null);\n\t\t\t\t\t\t\treturnValue_1.then(decrementor, decrementor);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn (returnValue_1 && typeof returnValue_1.then === 'function' ?\n\t\t\t\t\tDexiePromise.resolve(returnValue_1) : promiseFollowed.then(function () { return returnValue_1; }));\n\t\t\t}\n\t\t});\n\t\tqueue.push(function (idbtrans) {\n\t\t\tif (!anyContentUpgraderHasRun || !hasIEDeleteObjectStoreBug) {\n\t\t\t\tvar newSchema = version._cfg.dbschema;\n\t\t\t\tdeleteRemovedTables(newSchema, idbtrans);\n\t\t\t}\n\t\t\tremoveTablesApi(db, [db.Transaction.prototype]);\n\t\t\tsetApiOnPlace(db, [db.Transaction.prototype], db._storeNames, db._dbSchema);\n\t\t\ttrans.schema = db._dbSchema;\n\t\t});\n\t});\n\tfunction runQueue() {\n\t\treturn queue.length ? DexiePromise.resolve(queue.shift()(trans.idbtrans)).then(runQueue) :\n\t\t\tDexiePromise.resolve();\n\t}\n\treturn runQueue().then(function () {\n\t\tcreateMissingTables(globalSchema, idbUpgradeTrans);\n\t});\n}\nfunction getSchemaDiff(oldSchema, newSchema) {\n\tvar diff = {\n\t\tdel: [],\n\t\tadd: [],\n\t\tchange: []\n\t};\n\tvar table;\n\tfor (table in oldSchema) {\n\t\tif (!newSchema[table])\n\t\t\tdiff.del.push(table);\n\t}\n\tfor (table in newSchema) {\n\t\tvar oldDef = oldSchema[table], newDef = newSchema[table];\n\t\tif (!oldDef) {\n\t\t\tdiff.add.push([table, newDef]);\n\t\t}\n\t\telse {\n\t\t\tvar change = {\n\t\t\t\tname: table,\n\t\t\t\tdef: newDef,\n\t\t\t\trecreate: false,\n\t\t\t\tdel: [],\n\t\t\t\tadd: [],\n\t\t\t\tchange: []\n\t\t\t};\n\t\t\tif ((\n\t\t\t\t\t'' + (oldDef.primKey.keyPath || '')) !== ('' + (newDef.primKey.keyPath || '')) ||\n\t\t\t\t(oldDef.primKey.auto !== newDef.primKey.auto && !isIEOrEdge))\n\t\t\t{\n\t\t\t\tchange.recreate = true;\n\t\t\t\tdiff.change.push(change);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar oldIndexes = oldDef.idxByName;\n\t\t\t\tvar newIndexes = newDef.idxByName;\n\t\t\t\tvar idxName = void 0;\n\t\t\t\tfor (idxName in oldIndexes) {\n\t\t\t\t\tif (!newIndexes[idxName])\n\t\t\t\t\t\tchange.del.push(idxName);\n\t\t\t\t}\n\t\t\t\tfor (idxName in newIndexes) {\n\t\t\t\t\tvar oldIdx = oldIndexes[idxName], newIdx = newIndexes[idxName];\n\t\t\t\t\tif (!oldIdx)\n\t\t\t\t\t\tchange.add.push(newIdx);\n\t\t\t\t\telse if (oldIdx.src !== newIdx.src)\n\t\t\t\t\t\tchange.change.push(newIdx);\n\t\t\t\t}\n\t\t\t\tif (change.del.length > 0 || change.add.length > 0 || change.change.length > 0) {\n\t\t\t\t\tdiff.change.push(change);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn diff;\n}\nfunction createTable(idbtrans, tableName, primKey, indexes) {\n\tvar store = idbtrans.db.createObjectStore(tableName, primKey.keyPath ?\n\t\t{ keyPath: primKey.keyPath, autoIncrement: primKey.auto } :\n\t\t{ autoIncrement: primKey.auto });\n\tindexes.forEach(function (idx) { return addIndex(store, idx); });\n\treturn store;\n}\nfunction createMissingTables(newSchema, idbtrans) {\n\tkeys(newSchema).forEach(function (tableName) {\n\t\tif (!idbtrans.db.objectStoreNames.contains(tableName)) {\n\t\t\tcreateTable(idbtrans, tableName, newSchema[tableName].primKey, newSchema[tableName].indexes);\n\t\t}\n\t});\n}\nfunction deleteRemovedTables(newSchema, idbtrans) {\n\t[].slice.call(idbtrans.db.objectStoreNames).forEach(function (storeName) {\n\t\treturn newSchema[storeName] == null && idbtrans.db.deleteObjectStore(storeName);\n\t});\n}\nfunction addIndex(store, idx) {\n\tstore.createIndex(idx.name, idx.keyPath, { unique: idx.unique, multiEntry: idx.multi });\n}\nfunction buildGlobalSchema(db, idbdb, tmpTrans) {\n\tvar globalSchema = {};\n\tvar dbStoreNames = slice(idbdb.objectStoreNames, 0);\n\tdbStoreNames.forEach(function (storeName) {\n\t\tvar store = tmpTrans.objectStore(storeName);\n\t\tvar keyPath = store.keyPath;\n\t\tvar primKey = createIndexSpec(nameFromKeyPath(keyPath), keyPath || \"\", false, false, !!store.autoIncrement, keyPath && typeof keyPath !== \"string\", true);\n\t\tvar indexes = [];\n\t\tfor (var j = 0; j < store.indexNames.length; ++j) {\n\t\t\tvar idbindex = store.index(store.indexNames[j]);\n\t\t\tkeyPath = idbindex.keyPath;\n\t\t\tvar index = createIndexSpec(idbindex.name, keyPath, !!idbindex.unique, !!idbindex.multiEntry, false, keyPath && typeof keyPath !== \"string\", false);\n\t\t\tindexes.push(index);\n\t\t}\n\t\tglobalSchema[storeName] = createTableSchema(storeName, primKey, indexes);\n\t});\n\treturn globalSchema;\n}\nfunction readGlobalSchema(_a, idbdb, tmpTrans) {\n\tvar db = _a._novip;\n\tdb.verno = idbdb.version / 10;\n\tvar globalSchema = db._dbSchema = buildGlobalSchema(db, idbdb, tmpTrans);\n\tdb._storeNames = slice(idbdb.objectStoreNames, 0);\n\tsetApiOnPlace(db, [db._allTables], keys(globalSchema), globalSchema);\n}\nfunction verifyInstalledSchema(db, tmpTrans) {\n\tvar installedSchema = buildGlobalSchema(db, db.idbdb, tmpTrans);\n\tvar diff = getSchemaDiff(installedSchema, db._dbSchema);\n\treturn !(diff.add.length || diff.change.some(function (ch) { return ch.add.length || ch.change.length; }));\n}\nfunction adjustToExistingIndexNames(_a, schema, idbtrans) {\n\tvar db = _a._novip;\n\tvar storeNames = idbtrans.db.objectStoreNames;\n\tfor (var i = 0; i < storeNames.length; ++i) {\n\t\tvar storeName = storeNames[i];\n\t\tvar store = idbtrans.objectStore(storeName);\n\t\tdb._hasGetAll = 'getAll' in store;\n\t\tfor (var j = 0; j < store.indexNames.length; ++j) {\n\t\t\tvar indexName = store.indexNames[j];\n\t\t\tvar keyPath = store.index(indexName).keyPath;\n\t\t\tvar dexieName = typeof keyPath === 'string' ? keyPath : \"[\" + slice(keyPath).join('+') + \"]\";\n\t\t\tif (schema[storeName]) {\n\t\t\t\tvar indexSpec = schema[storeName].idxByName[dexieName];\n\t\t\t\tif (indexSpec) {\n\t\t\t\t\tindexSpec.name = indexName;\n\t\t\t\t\tdelete schema[storeName].idxByName[dexieName];\n\t\t\t\t\tschema[storeName].idxByName[indexName] = indexSpec;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (typeof navigator !== 'undefined' && /Safari/.test(navigator.userAgent) &&\n\t\t!/(Chrome\\/|Edge\\/)/.test(navigator.userAgent) &&\n\t\t_global.WorkerGlobalScope && _global instanceof _global.WorkerGlobalScope &&\n\t\t[].concat(navigator.userAgent.match(/Safari\\/(\\d*)/))[1] < 604) {\n\t\tdb._hasGetAll = false;\n\t}\n}\nfunction parseIndexSyntax(primKeyAndIndexes) {\n\treturn primKeyAndIndexes.split(',').map(function (index, indexNum) {\n\t\tindex = index.trim();\n\t\tvar name = index.replace(/([&*]|\\+\\+)/g, \"\");\n\t\tvar keyPath = /^\\[/.test(name) ? name.match(/^\\[(.*)\\]$/)[1].split('+') : name;\n\t\treturn createIndexSpec(name, keyPath || null, /\\&/.test(index), /\\*/.test(index), /\\+\\+/.test(index), isArray(keyPath), indexNum === 0);\n\t});\n}\n\nvar Version =  (function () {\n\tfunction Version() {\n\t}\n\tVersion.prototype._parseStoresSpec = function (stores, outSchema) {\n\t\tkeys(stores).forEach(function (tableName) {\n\t\t\tif (stores[tableName] !== null) {\n\t\t\t\tvar indexes = parseIndexSyntax(stores[tableName]);\n\t\t\t\tvar primKey = indexes.shift();\n\t\t\t\tif (primKey.multi)\n\t\t\t\t\tthrow new exceptions.Schema(\"Primary key cannot be multi-valued\");\n\t\t\t\tindexes.forEach(function (idx) {\n\t\t\t\t\tif (idx.auto)\n\t\t\t\t\t\tthrow new exceptions.Schema(\"Only primary key can be marked as autoIncrement (++)\");\n\t\t\t\t\tif (!idx.keyPath)\n\t\t\t\t\t\tthrow new exceptions.Schema(\"Index must have a name and cannot be an empty string\");\n\t\t\t\t});\n\t\t\t\toutSchema[tableName] = createTableSchema(tableName, primKey, indexes);\n\t\t\t}\n\t\t});\n\t};\n\tVersion.prototype.stores = function (stores) {\n\t\tvar db = this.db;\n\t\tthis._cfg.storesSource = this._cfg.storesSource ?\n\t\t\textend(this._cfg.storesSource, stores) :\n\t\t\tstores;\n\t\tvar versions = db._versions;\n\t\tvar storesSpec = {};\n\t\tvar dbschema = {};\n\t\tversions.forEach(function (version) {\n\t\t\textend(storesSpec, version._cfg.storesSource);\n\t\t\tdbschema = (version._cfg.dbschema = {});\n\t\t\tversion._parseStoresSpec(storesSpec, dbschema);\n\t\t});\n\t\tdb._dbSchema = dbschema;\n\t\tremoveTablesApi(db, [db._allTables, db, db.Transaction.prototype]);\n\t\tsetApiOnPlace(db, [db._allTables, db, db.Transaction.prototype, this._cfg.tables], keys(dbschema), dbschema);\n\t\tdb._storeNames = keys(dbschema);\n\t\treturn this;\n\t};\n\tVersion.prototype.upgrade = function (upgradeFunction) {\n\t\tthis._cfg.contentUpgrade = promisableChain(this._cfg.contentUpgrade || nop, upgradeFunction);\n\t\treturn this;\n\t};\n\treturn Version;\n}());\n\nfunction createVersionConstructor(db) {\n\treturn makeClassConstructor(Version.prototype, function Version(versionNumber) {\n\t\tthis.db = db;\n\t\tthis._cfg = {\n\t\t\tversion: versionNumber,\n\t\t\tstoresSource: null,\n\t\t\tdbschema: {},\n\t\t\ttables: {},\n\t\t\tcontentUpgrade: null\n\t\t};\n\t});\n}\n\nfunction getDbNamesTable(indexedDB, IDBKeyRange) {\n\tvar dbNamesDB = indexedDB[\"_dbNamesDB\"];\n\tif (!dbNamesDB) {\n\t\tdbNamesDB = indexedDB[\"_dbNamesDB\"] = new Dexie$1(DBNAMES_DB, {\n\t\t\taddons: [],\n\t\t\tindexedDB: indexedDB,\n\t\t\tIDBKeyRange: IDBKeyRange,\n\t\t});\n\t\tdbNamesDB.version(1).stores({ dbnames: \"name\" });\n\t}\n\treturn dbNamesDB.table(\"dbnames\");\n}\nfunction hasDatabasesNative(indexedDB) {\n\treturn indexedDB && typeof indexedDB.databases === \"function\";\n}\nfunction getDatabaseNames(_a) {\n\tvar indexedDB = _a.indexedDB, IDBKeyRange = _a.IDBKeyRange;\n\treturn hasDatabasesNative(indexedDB)\n\t\t? Promise.resolve(indexedDB.databases()).then(function (infos) {\n\t\t\treturn infos\n\t\t\t\t.map(function (info) { return info.name; })\n\t\t\t\t.filter(function (name) { return name !== DBNAMES_DB; });\n\t\t})\n\t\t: getDbNamesTable(indexedDB, IDBKeyRange).toCollection().primaryKeys();\n}\nfunction _onDatabaseCreated(_a, name) {\n\tvar indexedDB = _a.indexedDB, IDBKeyRange = _a.IDBKeyRange;\n\t!hasDatabasesNative(indexedDB) &&\n\tname !== DBNAMES_DB &&\n\tgetDbNamesTable(indexedDB, IDBKeyRange).put({ name: name }).catch(nop);\n}\nfunction _onDatabaseDeleted(_a, name) {\n\tvar indexedDB = _a.indexedDB, IDBKeyRange = _a.IDBKeyRange;\n\t!hasDatabasesNative(indexedDB) &&\n\tname !== DBNAMES_DB &&\n\tgetDbNamesTable(indexedDB, IDBKeyRange).delete(name).catch(nop);\n}\n\nfunction vip(fn) {\n\treturn newScope(function () {\n\t\tPSD.letThrough = true;\n\t\treturn fn();\n\t});\n}\n\nfunction idbReady() {\n\tvar isSafari = !navigator.userAgentData &&\n\t\t/Safari\\//.test(navigator.userAgent) &&\n\t\t!/Chrom(e|ium)\\//.test(navigator.userAgent);\n\tif (!isSafari || !indexedDB.databases)\n\t\treturn Promise.resolve();\n\tvar intervalId;\n\treturn new Promise(function (resolve) {\n\t\tvar tryIdb = function () { return indexedDB.databases().finally(resolve); };\n\t\tintervalId = setInterval(tryIdb, 100);\n\t\ttryIdb();\n\t}).finally(function () { return clearInterval(intervalId); });\n}\n\nfunction dexieOpen(db) {\n\tvar state = db._state;\n\tvar indexedDB = db._deps.indexedDB;\n\tif (state.isBeingOpened || db.idbdb)\n\t\treturn state.dbReadyPromise.then(function () { return state.dbOpenError ?\n\t\t\trejection(state.dbOpenError) :\n\t\t\tdb; });\n\tdebug && (state.openCanceller._stackHolder = getErrorWithStack());\n\tstate.isBeingOpened = true;\n\tstate.dbOpenError = null;\n\tstate.openComplete = false;\n\tvar openCanceller = state.openCanceller;\n\tfunction throwIfCancelled() {\n\t\tif (state.openCanceller !== openCanceller)\n\t\t\tthrow new exceptions.DatabaseClosed('db.open() was cancelled');\n\t}\n\tvar resolveDbReady = state.dbReadyResolve,\n\t\tupgradeTransaction = null, wasCreated = false;\n\treturn DexiePromise.race([openCanceller, (typeof navigator === 'undefined' ? DexiePromise.resolve() : idbReady()).then(function () { return new DexiePromise(function (resolve, reject) {\n\t\tthrowIfCancelled();\n\t\tif (!indexedDB)\n\t\t\tthrow new exceptions.MissingAPI();\n\t\tvar dbName = db.name;\n\t\tvar req = state.autoSchema ?\n\t\t\tindexedDB.open(dbName) :\n\t\t\tindexedDB.open(dbName, Math.round(db.verno * 10));\n\t\tif (!req)\n\t\t\tthrow new exceptions.MissingAPI();\n\t\treq.onerror = eventRejectHandler(reject);\n\t\treq.onblocked = wrap(db._fireOnBlocked);\n\t\treq.onupgradeneeded = wrap(function (e) {\n\t\t\tupgradeTransaction = req.transaction;\n\t\t\tif (state.autoSchema && !db._options.allowEmptyDB) {\n\t\t\t\treq.onerror = preventDefault;\n\t\t\t\tupgradeTransaction.abort();\n\t\t\t\treq.result.close();\n\t\t\t\tvar delreq = indexedDB.deleteDatabase(dbName);\n\t\t\t\tdelreq.onsuccess = delreq.onerror = wrap(function () {\n\t\t\t\t\treject(new exceptions.NoSuchDatabase(\"Database \" + dbName + \" doesnt exist\"));\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\tupgradeTransaction.onerror = eventRejectHandler(reject);\n\t\t\t\tvar oldVer = e.oldVersion > Math.pow(2, 62) ? 0 : e.oldVersion;\n\t\t\t\twasCreated = oldVer < 1;\n\t\t\t\tdb._novip.idbdb = req.result;\n\t\t\t\trunUpgraders(db, oldVer / 10, upgradeTransaction, reject);\n\t\t\t}\n\t\t}, reject);\n\t\treq.onsuccess = wrap(function () {\n\t\t\tupgradeTransaction = null;\n\t\t\tvar idbdb = db._novip.idbdb = req.result;\n\t\t\tvar objectStoreNames = slice(idbdb.objectStoreNames);\n\t\t\tif (objectStoreNames.length > 0)\n\t\t\t\ttry {\n\t\t\t\t\tvar tmpTrans = idbdb.transaction(safariMultiStoreFix(objectStoreNames), 'readonly');\n\t\t\t\t\tif (state.autoSchema)\n\t\t\t\t\t\treadGlobalSchema(db, idbdb, tmpTrans);\n\t\t\t\t\telse {\n\t\t\t\t\t\tadjustToExistingIndexNames(db, db._dbSchema, tmpTrans);\n\t\t\t\t\t\tif (!verifyInstalledSchema(db, tmpTrans)) {\n\t\t\t\t\t\t\tconsole.warn(\"Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tgenerateMiddlewareStacks(db, tmpTrans);\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t}\n\t\t\tconnections.push(db);\n\t\t\tidbdb.onversionchange = wrap(function (ev) {\n\t\t\t\tstate.vcFired = true;\n\t\t\t\tdb.on(\"versionchange\").fire(ev);\n\t\t\t});\n\t\t\tidbdb.onclose = wrap(function (ev) {\n\t\t\t\tdb.on(\"close\").fire(ev);\n\t\t\t});\n\t\t\tif (wasCreated)\n\t\t\t\t_onDatabaseCreated(db._deps, dbName);\n\t\t\tresolve();\n\t\t}, reject);\n\t}); })]).then(function () {\n\t\tthrowIfCancelled();\n\t\tstate.onReadyBeingFired = [];\n\t\treturn DexiePromise.resolve(vip(function () { return db.on.ready.fire(db.vip); })).then(function fireRemainders() {\n\t\t\tif (state.onReadyBeingFired.length > 0) {\n\t\t\t\tvar remainders_1 = state.onReadyBeingFired.reduce(promisableChain, nop);\n\t\t\t\tstate.onReadyBeingFired = [];\n\t\t\t\treturn DexiePromise.resolve(vip(function () { return remainders_1(db.vip); })).then(fireRemainders);\n\t\t\t}\n\t\t});\n\t}).finally(function () {\n\t\tstate.onReadyBeingFired = null;\n\t\tstate.isBeingOpened = false;\n\t}).then(function () {\n\t\treturn db;\n\t}).catch(function (err) {\n\t\tstate.dbOpenError = err;\n\t\ttry {\n\t\t\tupgradeTransaction && upgradeTransaction.abort();\n\t\t}\n\t\tcatch (_a) { }\n\t\tif (openCanceller === state.openCanceller) {\n\t\t\tdb._close();\n\t\t}\n\t\treturn rejection(err);\n\t}).finally(function () {\n\t\tstate.openComplete = true;\n\t\tresolveDbReady();\n\t});\n}\n\nfunction awaitIterator(iterator) {\n\tvar callNext = function (result) { return iterator.next(result); }, doThrow = function (error) { return iterator.throw(error); }, onSuccess = step(callNext), onError = step(doThrow);\n\tfunction step(getNext) {\n\t\treturn function (val) {\n\t\t\tvar next = getNext(val), value = next.value;\n\t\t\treturn next.done ? value :\n\t\t\t\t(!value || typeof value.then !== 'function' ?\n\t\t\t\t\tisArray(value) ? Promise.all(value).then(onSuccess, onError) : onSuccess(value) :\n\t\t\t\t\tvalue.then(onSuccess, onError));\n\t\t};\n\t}\n\treturn step(callNext)();\n}\n\nfunction extractTransactionArgs(mode, _tableArgs_, scopeFunc) {\n\tvar i = arguments.length;\n\tif (i < 2)\n\t\tthrow new exceptions.InvalidArgument(\"Too few arguments\");\n\tvar args = new Array(i - 1);\n\twhile (--i)\n\t\targs[i - 1] = arguments[i];\n\tscopeFunc = args.pop();\n\tvar tables = flatten(args);\n\treturn [mode, tables, scopeFunc];\n}\nfunction enterTransactionScope(db, mode, storeNames, parentTransaction, scopeFunc) {\n\treturn DexiePromise.resolve().then(function () {\n\t\tvar transless = PSD.transless || PSD;\n\t\tvar trans = db._createTransaction(mode, storeNames, db._dbSchema, parentTransaction);\n\t\tvar zoneProps = {\n\t\t\ttrans: trans,\n\t\t\ttransless: transless\n\t\t};\n\t\tif (parentTransaction) {\n\t\t\ttrans.idbtrans = parentTransaction.idbtrans;\n\t\t}\n\t\telse {\n\t\t\ttry {\n\t\t\t\ttrans.create();\n\t\t\t\tdb._state.PR1398_maxLoop = 3;\n\t\t\t}\n\t\t\tcatch (ex) {\n\t\t\t\tif (ex.name === errnames.InvalidState && db.isOpen() && --db._state.PR1398_maxLoop > 0) {\n\t\t\t\t\tconsole.warn('Dexie: Need to reopen db');\n\t\t\t\t\tdb._close();\n\t\t\t\t\treturn db.open().then(function () { return enterTransactionScope(db, mode, storeNames, null, scopeFunc); });\n\t\t\t\t}\n\t\t\t\treturn rejection(ex);\n\t\t\t}\n\t\t}\n\t\tvar scopeFuncIsAsync = isAsyncFunction(scopeFunc);\n\t\tif (scopeFuncIsAsync) {\n\t\t\tincrementExpectedAwaits();\n\t\t}\n\t\tvar returnValue;\n\t\tvar promiseFollowed = DexiePromise.follow(function () {\n\t\t\treturnValue = scopeFunc.call(trans, trans);\n\t\t\tif (returnValue) {\n\t\t\t\tif (scopeFuncIsAsync) {\n\t\t\t\t\tvar decrementor = decrementExpectedAwaits.bind(null, null);\n\t\t\t\t\treturnValue.then(decrementor, decrementor);\n\t\t\t\t}\n\t\t\t\telse if (typeof returnValue.next === 'function' && typeof returnValue.throw === 'function') {\n\t\t\t\t\treturnValue = awaitIterator(returnValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}, zoneProps);\n\t\treturn (returnValue && typeof returnValue.then === 'function' ?\n\t\t\tDexiePromise.resolve(returnValue).then(function (x) { return trans.active ?\n\t\t\t\tx\n\t\t\t\t: rejection(new exceptions.PrematureCommit(\"Transaction committed too early. See http://bit.ly/2kdckMn\")); })\n\t\t\t: promiseFollowed.then(function () { return returnValue; })).then(function (x) {\n\t\t\tif (parentTransaction)\n\t\t\t\ttrans._resolve();\n\t\t\treturn trans._completion.then(function () { return x; });\n\t\t}).catch(function (e) {\n\t\t\ttrans._reject(e);\n\t\t\treturn rejection(e);\n\t\t});\n\t});\n}\n\nfunction pad(a, value, count) {\n\tvar result = isArray(a) ? a.slice() : [a];\n\tfor (var i = 0; i < count; ++i)\n\t\tresult.push(value);\n\treturn result;\n}\nfunction createVirtualIndexMiddleware(down) {\n\treturn __assign(__assign({}, down), { table: function (tableName) {\n\t\t\tvar table = down.table(tableName);\n\t\t\tvar schema = table.schema;\n\t\t\tvar indexLookup = {};\n\t\t\tvar allVirtualIndexes = [];\n\t\t\tfunction addVirtualIndexes(keyPath, keyTail, lowLevelIndex) {\n\t\t\t\tvar keyPathAlias = getKeyPathAlias(keyPath);\n\t\t\t\tvar indexList = (indexLookup[keyPathAlias] = indexLookup[keyPathAlias] || []);\n\t\t\t\tvar keyLength = keyPath == null ? 0 : typeof keyPath === 'string' ? 1 : keyPath.length;\n\t\t\t\tvar isVirtual = keyTail > 0;\n\t\t\t\tvar virtualIndex = __assign(__assign({}, lowLevelIndex), { isVirtual: isVirtual, keyTail: keyTail, keyLength: keyLength, extractKey: getKeyExtractor(keyPath), unique: !isVirtual && lowLevelIndex.unique });\n\t\t\t\tindexList.push(virtualIndex);\n\t\t\t\tif (!virtualIndex.isPrimaryKey) {\n\t\t\t\t\tallVirtualIndexes.push(virtualIndex);\n\t\t\t\t}\n\t\t\t\tif (keyLength > 1) {\n\t\t\t\t\tvar virtualKeyPath = keyLength === 2 ?\n\t\t\t\t\t\tkeyPath[0] :\n\t\t\t\t\t\tkeyPath.slice(0, keyLength - 1);\n\t\t\t\t\taddVirtualIndexes(virtualKeyPath, keyTail + 1, lowLevelIndex);\n\t\t\t\t}\n\t\t\t\tindexList.sort(function (a, b) { return a.keyTail - b.keyTail; });\n\t\t\t\treturn virtualIndex;\n\t\t\t}\n\t\t\tvar primaryKey = addVirtualIndexes(schema.primaryKey.keyPath, 0, schema.primaryKey);\n\t\t\tindexLookup[\":id\"] = [primaryKey];\n\t\t\tfor (var _i = 0, _a = schema.indexes; _i < _a.length; _i++) {\n\t\t\t\tvar index = _a[_i];\n\t\t\t\taddVirtualIndexes(index.keyPath, 0, index);\n\t\t\t}\n\t\t\tfunction findBestIndex(keyPath) {\n\t\t\t\tvar result = indexLookup[getKeyPathAlias(keyPath)];\n\t\t\t\treturn result && result[0];\n\t\t\t}\n\t\t\tfunction translateRange(range, keyTail) {\n\t\t\t\treturn {\n\t\t\t\t\ttype: range.type === 1  ?\n\t\t\t\t\t\t2  :\n\t\t\t\t\t\trange.type,\n\t\t\t\t\tlower: pad(range.lower, range.lowerOpen ? down.MAX_KEY : down.MIN_KEY, keyTail),\n\t\t\t\t\tlowerOpen: true,\n\t\t\t\t\tupper: pad(range.upper, range.upperOpen ? down.MIN_KEY : down.MAX_KEY, keyTail),\n\t\t\t\t\tupperOpen: true\n\t\t\t\t};\n\t\t\t}\n\t\t\tfunction translateRequest(req) {\n\t\t\t\tvar index = req.query.index;\n\t\t\t\treturn index.isVirtual ? __assign(__assign({}, req), { query: {\n\t\t\t\t\t\tindex: index,\n\t\t\t\t\t\trange: translateRange(req.query.range, index.keyTail)\n\t\t\t\t\t} }) : req;\n\t\t\t}\n\t\t\tvar result = __assign(__assign({}, table), { schema: __assign(__assign({}, schema), { primaryKey: primaryKey, indexes: allVirtualIndexes, getIndexByKeyPath: findBestIndex }), count: function (req) {\n\t\t\t\t\treturn table.count(translateRequest(req));\n\t\t\t\t}, query: function (req) {\n\t\t\t\t\treturn table.query(translateRequest(req));\n\t\t\t\t}, openCursor: function (req) {\n\t\t\t\t\tvar _a = req.query.index, keyTail = _a.keyTail, isVirtual = _a.isVirtual, keyLength = _a.keyLength;\n\t\t\t\t\tif (!isVirtual)\n\t\t\t\t\t\treturn table.openCursor(req);\n\t\t\t\t\tfunction createVirtualCursor(cursor) {\n\t\t\t\t\t\tfunction _continue(key) {\n\t\t\t\t\t\t\tkey != null ?\n\t\t\t\t\t\t\t\tcursor.continue(pad(key, req.reverse ? down.MAX_KEY : down.MIN_KEY, keyTail)) :\n\t\t\t\t\t\t\t\treq.unique ?\n\t\t\t\t\t\t\t\t\tcursor.continue(cursor.key.slice(0, keyLength)\n\t\t\t\t\t\t\t\t\t\t.concat(req.reverse\n\t\t\t\t\t\t\t\t\t\t\t? down.MIN_KEY\n\t\t\t\t\t\t\t\t\t\t\t: down.MAX_KEY, keyTail)) :\n\t\t\t\t\t\t\t\t\tcursor.continue();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar virtualCursor = Object.create(cursor, {\n\t\t\t\t\t\t\tcontinue: { value: _continue },\n\t\t\t\t\t\t\tcontinuePrimaryKey: {\n\t\t\t\t\t\t\t\tvalue: function (key, primaryKey) {\n\t\t\t\t\t\t\t\t\tcursor.continuePrimaryKey(pad(key, down.MAX_KEY, keyTail), primaryKey);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tprimaryKey: {\n\t\t\t\t\t\t\t\tget: function () {\n\t\t\t\t\t\t\t\t\treturn cursor.primaryKey;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tkey: {\n\t\t\t\t\t\t\t\tget: function () {\n\t\t\t\t\t\t\t\t\tvar key = cursor.key;\n\t\t\t\t\t\t\t\t\treturn keyLength === 1 ?\n\t\t\t\t\t\t\t\t\t\tkey[0] :\n\t\t\t\t\t\t\t\t\t\tkey.slice(0, keyLength);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tvalue: {\n\t\t\t\t\t\t\t\tget: function () {\n\t\t\t\t\t\t\t\t\treturn cursor.value;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn virtualCursor;\n\t\t\t\t\t}\n\t\t\t\t\treturn table.openCursor(translateRequest(req))\n\t\t\t\t\t\t.then(function (cursor) { return cursor && createVirtualCursor(cursor); });\n\t\t\t\t} });\n\t\t\treturn result;\n\t\t} });\n}\nvar virtualIndexMiddleware = {\n\tstack: \"dbcore\",\n\tname: \"VirtualIndexMiddleware\",\n\tlevel: 1,\n\tcreate: createVirtualIndexMiddleware\n};\n\nfunction getObjectDiff(a, b, rv, prfx) {\n\trv = rv || {};\n\tprfx = prfx || '';\n\tkeys(a).forEach(function (prop) {\n\t\tif (!hasOwn(b, prop)) {\n\t\t\trv[prfx + prop] = undefined;\n\t\t}\n\t\telse {\n\t\t\tvar ap = a[prop], bp = b[prop];\n\t\t\tif (typeof ap === 'object' && typeof bp === 'object' && ap && bp) {\n\t\t\t\tvar apTypeName = toStringTag(ap);\n\t\t\t\tvar bpTypeName = toStringTag(bp);\n\t\t\t\tif (apTypeName !== bpTypeName) {\n\t\t\t\t\trv[prfx + prop] = b[prop];\n\t\t\t\t}\n\t\t\t\telse if (apTypeName === 'Object') {\n\t\t\t\t\tgetObjectDiff(ap, bp, rv, prfx + prop + '.');\n\t\t\t\t}\n\t\t\t\telse if (ap !== bp) {\n\t\t\t\t\trv[prfx + prop] = b[prop];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (ap !== bp)\n\t\t\t\trv[prfx + prop] = b[prop];\n\t\t}\n\t});\n\tkeys(b).forEach(function (prop) {\n\t\tif (!hasOwn(a, prop)) {\n\t\t\trv[prfx + prop] = b[prop];\n\t\t}\n\t});\n\treturn rv;\n}\n\nfunction getEffectiveKeys(primaryKey, req) {\n\tif (req.type === 'delete')\n\t\treturn req.keys;\n\treturn req.keys || req.values.map(primaryKey.extractKey);\n}\n\nvar hooksMiddleware = {\n\tstack: \"dbcore\",\n\tname: \"HooksMiddleware\",\n\tlevel: 2,\n\tcreate: function (downCore) { return (__assign(__assign({}, downCore), { table: function (tableName) {\n\t\t\tvar downTable = downCore.table(tableName);\n\t\t\tvar primaryKey = downTable.schema.primaryKey;\n\t\t\tvar tableMiddleware = __assign(__assign({}, downTable), { mutate: function (req) {\n\t\t\t\t\tvar dxTrans = PSD.trans;\n\t\t\t\t\tvar _a = dxTrans.table(tableName).hook, deleting = _a.deleting, creating = _a.creating, updating = _a.updating;\n\t\t\t\t\tswitch (req.type) {\n\t\t\t\t\t\tcase 'add':\n\t\t\t\t\t\t\tif (creating.fire === nop)\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\treturn dxTrans._promise('readwrite', function () { return addPutOrDelete(req); }, true);\n\t\t\t\t\t\tcase 'put':\n\t\t\t\t\t\t\tif (creating.fire === nop && updating.fire === nop)\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\treturn dxTrans._promise('readwrite', function () { return addPutOrDelete(req); }, true);\n\t\t\t\t\t\tcase 'delete':\n\t\t\t\t\t\t\tif (deleting.fire === nop)\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\treturn dxTrans._promise('readwrite', function () { return addPutOrDelete(req); }, true);\n\t\t\t\t\t\tcase 'deleteRange':\n\t\t\t\t\t\t\tif (deleting.fire === nop)\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\treturn dxTrans._promise('readwrite', function () { return deleteRange(req); }, true);\n\t\t\t\t\t}\n\t\t\t\t\treturn downTable.mutate(req);\n\t\t\t\t\tfunction addPutOrDelete(req) {\n\t\t\t\t\t\tvar dxTrans = PSD.trans;\n\t\t\t\t\t\tvar keys = req.keys || getEffectiveKeys(primaryKey, req);\n\t\t\t\t\t\tif (!keys)\n\t\t\t\t\t\t\tthrow new Error(\"Keys missing\");\n\t\t\t\t\t\treq = req.type === 'add' || req.type === 'put' ? __assign(__assign({}, req), { keys: keys }) : __assign({}, req);\n\t\t\t\t\t\tif (req.type !== 'delete')\n\t\t\t\t\t\t\treq.values = __spreadArray([], req.values, true);\n\t\t\t\t\t\tif (req.keys)\n\t\t\t\t\t\t\treq.keys = __spreadArray([], req.keys, true);\n\t\t\t\t\t\treturn getExistingValues(downTable, req, keys).then(function (existingValues) {\n\t\t\t\t\t\t\tvar contexts = keys.map(function (key, i) {\n\t\t\t\t\t\t\t\tvar existingValue = existingValues[i];\n\t\t\t\t\t\t\t\tvar ctx = { onerror: null, onsuccess: null };\n\t\t\t\t\t\t\t\tif (req.type === 'delete') {\n\t\t\t\t\t\t\t\t\tdeleting.fire.call(ctx, key, existingValue, dxTrans);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (req.type === 'add' || existingValue === undefined) {\n\t\t\t\t\t\t\t\t\tvar generatedPrimaryKey = creating.fire.call(ctx, key, req.values[i], dxTrans);\n\t\t\t\t\t\t\t\t\tif (key == null && generatedPrimaryKey != null) {\n\t\t\t\t\t\t\t\t\t\tkey = generatedPrimaryKey;\n\t\t\t\t\t\t\t\t\t\treq.keys[i] = key;\n\t\t\t\t\t\t\t\t\t\tif (!primaryKey.outbound) {\n\t\t\t\t\t\t\t\t\t\t\tsetByKeyPath(req.values[i], primaryKey.keyPath, key);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tvar objectDiff = getObjectDiff(existingValue, req.values[i]);\n\t\t\t\t\t\t\t\t\tvar additionalChanges_1 = updating.fire.call(ctx, objectDiff, key, existingValue, dxTrans);\n\t\t\t\t\t\t\t\t\tif (additionalChanges_1) {\n\t\t\t\t\t\t\t\t\t\tvar requestedValue_1 = req.values[i];\n\t\t\t\t\t\t\t\t\t\tObject.keys(additionalChanges_1).forEach(function (keyPath) {\n\t\t\t\t\t\t\t\t\t\t\tif (hasOwn(requestedValue_1, keyPath)) {\n\t\t\t\t\t\t\t\t\t\t\t\trequestedValue_1[keyPath] = additionalChanges_1[keyPath];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tsetByKeyPath(requestedValue_1, keyPath, additionalChanges_1[keyPath]);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn ctx;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn downTable.mutate(req).then(function (_a) {\n\t\t\t\t\t\t\t\tvar failures = _a.failures, results = _a.results, numFailures = _a.numFailures, lastResult = _a.lastResult;\n\t\t\t\t\t\t\t\tfor (var i = 0; i < keys.length; ++i) {\n\t\t\t\t\t\t\t\t\tvar primKey = results ? results[i] : keys[i];\n\t\t\t\t\t\t\t\t\tvar ctx = contexts[i];\n\t\t\t\t\t\t\t\t\tif (primKey == null) {\n\t\t\t\t\t\t\t\t\t\tctx.onerror && ctx.onerror(failures[i]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tctx.onsuccess && ctx.onsuccess(req.type === 'put' && existingValues[i] ?\n\t\t\t\t\t\t\t\t\t\t\treq.values[i] :\n\t\t\t\t\t\t\t\t\t\t\tprimKey\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn { failures: failures, results: results, numFailures: numFailures, lastResult: lastResult };\n\t\t\t\t\t\t\t}).catch(function (error) {\n\t\t\t\t\t\t\t\tcontexts.forEach(function (ctx) { return ctx.onerror && ctx.onerror(error); });\n\t\t\t\t\t\t\t\treturn Promise.reject(error);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tfunction deleteRange(req) {\n\t\t\t\t\t\treturn deleteNextChunk(req.trans, req.range, 10000);\n\t\t\t\t\t}\n\t\t\t\t\tfunction deleteNextChunk(trans, range, limit) {\n\t\t\t\t\t\treturn downTable.query({ trans: trans, values: false, query: { index: primaryKey, range: range }, limit: limit })\n\t\t\t\t\t\t\t.then(function (_a) {\n\t\t\t\t\t\t\t\tvar result = _a.result;\n\t\t\t\t\t\t\t\treturn addPutOrDelete({ type: 'delete', keys: result, trans: trans }).then(function (res) {\n\t\t\t\t\t\t\t\t\tif (res.numFailures > 0)\n\t\t\t\t\t\t\t\t\t\treturn Promise.reject(res.failures[0]);\n\t\t\t\t\t\t\t\t\tif (result.length < limit) {\n\t\t\t\t\t\t\t\t\t\treturn { failures: [], numFailures: 0, lastResult: undefined };\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\treturn deleteNextChunk(trans, __assign(__assign({}, range), { lower: result[result.length - 1], lowerOpen: true }), limit);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} });\n\t\t\treturn tableMiddleware;\n\t\t} })); }\n};\nfunction getExistingValues(table, req, effectiveKeys) {\n\treturn req.type === \"add\"\n\t\t? Promise.resolve([])\n\t\t: table.getMany({ trans: req.trans, keys: effectiveKeys, cache: \"immutable\" });\n}\n\nfunction getFromTransactionCache(keys, cache, clone) {\n\ttry {\n\t\tif (!cache)\n\t\t\treturn null;\n\t\tif (cache.keys.length < keys.length)\n\t\t\treturn null;\n\t\tvar result = [];\n\t\tfor (var i = 0, j = 0; i < cache.keys.length && j < keys.length; ++i) {\n\t\t\tif (cmp(cache.keys[i], keys[j]) !== 0)\n\t\t\t\tcontinue;\n\t\t\tresult.push(clone ? deepClone(cache.values[i]) : cache.values[i]);\n\t\t\t++j;\n\t\t}\n\t\treturn result.length === keys.length ? result : null;\n\t}\n\tcatch (_a) {\n\t\treturn null;\n\t}\n}\nvar cacheExistingValuesMiddleware = {\n\tstack: \"dbcore\",\n\tlevel: -1,\n\tcreate: function (core) {\n\t\treturn {\n\t\t\ttable: function (tableName) {\n\t\t\t\tvar table = core.table(tableName);\n\t\t\t\treturn __assign(__assign({}, table), { getMany: function (req) {\n\t\t\t\t\t\tif (!req.cache) {\n\t\t\t\t\t\t\treturn table.getMany(req);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar cachedResult = getFromTransactionCache(req.keys, req.trans[\"_cache\"], req.cache === \"clone\");\n\t\t\t\t\t\tif (cachedResult) {\n\t\t\t\t\t\t\treturn DexiePromise.resolve(cachedResult);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn table.getMany(req).then(function (res) {\n\t\t\t\t\t\t\treq.trans[\"_cache\"] = {\n\t\t\t\t\t\t\t\tkeys: req.keys,\n\t\t\t\t\t\t\t\tvalues: req.cache === \"clone\" ? deepClone(res) : res,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\treturn res;\n\t\t\t\t\t\t});\n\t\t\t\t\t}, mutate: function (req) {\n\t\t\t\t\t\tif (req.type !== \"add\")\n\t\t\t\t\t\t\treq.trans[\"_cache\"] = null;\n\t\t\t\t\t\treturn table.mutate(req);\n\t\t\t\t\t} });\n\t\t\t},\n\t\t};\n\t},\n};\n\nvar _a;\nfunction isEmptyRange(node) {\n\treturn !(\"from\" in node);\n}\nvar RangeSet = function (fromOrTree, to) {\n\tif (this) {\n\t\textend(this, arguments.length ? { d: 1, from: fromOrTree, to: arguments.length > 1 ? to : fromOrTree } : { d: 0 });\n\t}\n\telse {\n\t\tvar rv = new RangeSet();\n\t\tif (fromOrTree && (\"d\" in fromOrTree)) {\n\t\t\textend(rv, fromOrTree);\n\t\t}\n\t\treturn rv;\n\t}\n};\nprops(RangeSet.prototype, (_a = {\n\tadd: function (rangeSet) {\n\t\tmergeRanges(this, rangeSet);\n\t\treturn this;\n\t},\n\taddKey: function (key) {\n\t\taddRange(this, key, key);\n\t\treturn this;\n\t},\n\taddKeys: function (keys) {\n\t\tvar _this = this;\n\t\tkeys.forEach(function (key) { return addRange(_this, key, key); });\n\t\treturn this;\n\t}\n},\n\t_a[iteratorSymbol] = function () {\n\t\treturn getRangeSetIterator(this);\n\t},\n\t_a));\nfunction addRange(target, from, to) {\n\tvar diff = cmp(from, to);\n\tif (isNaN(diff))\n\t\treturn;\n\tif (diff > 0)\n\t\tthrow RangeError();\n\tif (isEmptyRange(target))\n\t\treturn extend(target, { from: from, to: to, d: 1 });\n\tvar left = target.l;\n\tvar right = target.r;\n\tif (cmp(to, target.from) < 0) {\n\t\tleft\n\t\t\t? addRange(left, from, to)\n\t\t\t: (target.l = { from: from, to: to, d: 1, l: null, r: null });\n\t\treturn rebalance(target);\n\t}\n\tif (cmp(from, target.to) > 0) {\n\t\tright\n\t\t\t? addRange(right, from, to)\n\t\t\t: (target.r = { from: from, to: to, d: 1, l: null, r: null });\n\t\treturn rebalance(target);\n\t}\n\tif (cmp(from, target.from) < 0) {\n\t\ttarget.from = from;\n\t\ttarget.l = null;\n\t\ttarget.d = right ? right.d + 1 : 1;\n\t}\n\tif (cmp(to, target.to) > 0) {\n\t\ttarget.to = to;\n\t\ttarget.r = null;\n\t\ttarget.d = target.l ? target.l.d + 1 : 1;\n\t}\n\tvar rightWasCutOff = !target.r;\n\tif (left && !target.l) {\n\t\tmergeRanges(target, left);\n\t}\n\tif (right && rightWasCutOff) {\n\t\tmergeRanges(target, right);\n\t}\n}\nfunction mergeRanges(target, newSet) {\n\tfunction _addRangeSet(target, _a) {\n\t\tvar from = _a.from, to = _a.to, l = _a.l, r = _a.r;\n\t\taddRange(target, from, to);\n\t\tif (l)\n\t\t\t_addRangeSet(target, l);\n\t\tif (r)\n\t\t\t_addRangeSet(target, r);\n\t}\n\tif (!isEmptyRange(newSet))\n\t\t_addRangeSet(target, newSet);\n}\nfunction rangesOverlap(rangeSet1, rangeSet2) {\n\tvar i1 = getRangeSetIterator(rangeSet2);\n\tvar nextResult1 = i1.next();\n\tif (nextResult1.done)\n\t\treturn false;\n\tvar a = nextResult1.value;\n\tvar i2 = getRangeSetIterator(rangeSet1);\n\tvar nextResult2 = i2.next(a.from);\n\tvar b = nextResult2.value;\n\twhile (!nextResult1.done && !nextResult2.done) {\n\t\tif (cmp(b.from, a.to) <= 0 && cmp(b.to, a.from) >= 0)\n\t\t\treturn true;\n\t\tcmp(a.from, b.from) < 0\n\t\t\t? (a = (nextResult1 = i1.next(b.from)).value)\n\t\t\t: (b = (nextResult2 = i2.next(a.from)).value);\n\t}\n\treturn false;\n}\nfunction getRangeSetIterator(node) {\n\tvar state = isEmptyRange(node) ? null : { s: 0, n: node };\n\treturn {\n\t\tnext: function (key) {\n\t\t\tvar keyProvided = arguments.length > 0;\n\t\t\twhile (state) {\n\t\t\t\tswitch (state.s) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tstate.s = 1;\n\t\t\t\t\t\tif (keyProvided) {\n\t\t\t\t\t\t\twhile (state.n.l && cmp(key, state.n.from) < 0)\n\t\t\t\t\t\t\t\tstate = { up: state, n: state.n.l, s: 1 };\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\twhile (state.n.l)\n\t\t\t\t\t\t\t\tstate = { up: state, n: state.n.l, s: 1 };\n\t\t\t\t\t\t}\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tstate.s = 2;\n\t\t\t\t\t\tif (!keyProvided || cmp(key, state.n.to) <= 0)\n\t\t\t\t\t\t\treturn { value: state.n, done: false };\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tif (state.n.r) {\n\t\t\t\t\t\t\tstate.s = 3;\n\t\t\t\t\t\t\tstate = { up: state, n: state.n.r, s: 0 };\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tstate = state.up;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn { done: true };\n\t\t},\n\t};\n}\nfunction rebalance(target) {\n\tvar _a, _b;\n\tvar diff = (((_a = target.r) === null || _a === void 0 ? void 0 : _a.d) || 0) - (((_b = target.l) === null || _b === void 0 ? void 0 : _b.d) || 0);\n\tvar r = diff > 1 ? \"r\" : diff < -1 ? \"l\" : \"\";\n\tif (r) {\n\t\tvar l = r === \"r\" ? \"l\" : \"r\";\n\t\tvar rootClone = __assign({}, target);\n\t\tvar oldRootRight = target[r];\n\t\ttarget.from = oldRootRight.from;\n\t\ttarget.to = oldRootRight.to;\n\t\ttarget[r] = oldRootRight[r];\n\t\trootClone[r] = oldRootRight[l];\n\t\ttarget[l] = rootClone;\n\t\trootClone.d = computeDepth(rootClone);\n\t}\n\ttarget.d = computeDepth(target);\n}\nfunction computeDepth(_a) {\n\tvar r = _a.r, l = _a.l;\n\treturn (r ? (l ? Math.max(r.d, l.d) : r.d) : l ? l.d : 0) + 1;\n}\n\nvar observabilityMiddleware = {\n\tstack: \"dbcore\",\n\tlevel: 0,\n\tcreate: function (core) {\n\t\tvar dbName = core.schema.name;\n\t\tvar FULL_RANGE = new RangeSet(core.MIN_KEY, core.MAX_KEY);\n\t\treturn __assign(__assign({}, core), { table: function (tableName) {\n\t\t\t\tvar table = core.table(tableName);\n\t\t\t\tvar schema = table.schema;\n\t\t\t\tvar primaryKey = schema.primaryKey;\n\t\t\t\tvar extractKey = primaryKey.extractKey, outbound = primaryKey.outbound;\n\t\t\t\tvar tableClone = __assign(__assign({}, table), { mutate: function (req) {\n\t\t\t\t\t\tvar trans = req.trans;\n\t\t\t\t\t\tvar mutatedParts = trans.mutatedParts || (trans.mutatedParts = {});\n\t\t\t\t\t\tvar getRangeSet = function (indexName) {\n\t\t\t\t\t\t\tvar part = \"idb://\" + dbName + \"/\" + tableName + \"/\" + indexName;\n\t\t\t\t\t\t\treturn (mutatedParts[part] ||\n\t\t\t\t\t\t\t\t(mutatedParts[part] = new RangeSet()));\n\t\t\t\t\t\t};\n\t\t\t\t\t\tvar pkRangeSet = getRangeSet(\"\");\n\t\t\t\t\t\tvar delsRangeSet = getRangeSet(\":dels\");\n\t\t\t\t\t\tvar type = req.type;\n\t\t\t\t\t\tvar _a = req.type === \"deleteRange\"\n\t\t\t\t\t\t\t? [req.range]\n\t\t\t\t\t\t\t: req.type === \"delete\"\n\t\t\t\t\t\t\t\t? [req.keys]\n\t\t\t\t\t\t\t\t: req.values.length < 50\n\t\t\t\t\t\t\t\t\t? [[], req.values]\n\t\t\t\t\t\t\t\t\t: [], keys = _a[0], newObjs = _a[1];\n\t\t\t\t\t\tvar oldCache = req.trans[\"_cache\"];\n\t\t\t\t\t\treturn table.mutate(req).then(function (res) {\n\t\t\t\t\t\t\tif (isArray(keys)) {\n\t\t\t\t\t\t\t\tif (type !== \"delete\")\n\t\t\t\t\t\t\t\t\tkeys = res.results;\n\t\t\t\t\t\t\t\tpkRangeSet.addKeys(keys);\n\t\t\t\t\t\t\t\tvar oldObjs = getFromTransactionCache(keys, oldCache);\n\t\t\t\t\t\t\t\tif (!oldObjs && type !== \"add\") {\n\t\t\t\t\t\t\t\t\tdelsRangeSet.addKeys(keys);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (oldObjs || newObjs) {\n\t\t\t\t\t\t\t\t\ttrackAffectedIndexes(getRangeSet, schema, oldObjs, newObjs);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (keys) {\n\t\t\t\t\t\t\t\tvar range = { from: keys.lower, to: keys.upper };\n\t\t\t\t\t\t\t\tdelsRangeSet.add(range);\n\t\t\t\t\t\t\t\tpkRangeSet.add(range);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tpkRangeSet.add(FULL_RANGE);\n\t\t\t\t\t\t\t\tdelsRangeSet.add(FULL_RANGE);\n\t\t\t\t\t\t\t\tschema.indexes.forEach(function (idx) { return getRangeSet(idx.name).add(FULL_RANGE); });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn res;\n\t\t\t\t\t\t});\n\t\t\t\t\t} });\n\t\t\t\tvar getRange = function (_a) {\n\t\t\t\t\tvar _b, _c;\n\t\t\t\t\tvar _d = _a.query, index = _d.index, range = _d.range;\n\t\t\t\t\treturn [\n\t\t\t\t\t\tindex,\n\t\t\t\t\t\tnew RangeSet((_b = range.lower) !== null && _b !== void 0 ? _b : core.MIN_KEY, (_c = range.upper) !== null && _c !== void 0 ? _c : core.MAX_KEY),\n\t\t\t\t\t];\n\t\t\t\t};\n\t\t\t\tvar readSubscribers = {\n\t\t\t\t\tget: function (req) { return [primaryKey, new RangeSet(req.key)]; },\n\t\t\t\t\tgetMany: function (req) { return [primaryKey, new RangeSet().addKeys(req.keys)]; },\n\t\t\t\t\tcount: getRange,\n\t\t\t\t\tquery: getRange,\n\t\t\t\t\topenCursor: getRange,\n\t\t\t\t};\n\t\t\t\tkeys(readSubscribers).forEach(function (method) {\n\t\t\t\t\ttableClone[method] = function (req) {\n\t\t\t\t\t\tvar subscr = PSD.subscr;\n\t\t\t\t\t\tif (subscr) {\n\t\t\t\t\t\t\tvar getRangeSet = function (indexName) {\n\t\t\t\t\t\t\t\tvar part = \"idb://\" + dbName + \"/\" + tableName + \"/\" + indexName;\n\t\t\t\t\t\t\t\treturn (subscr[part] ||\n\t\t\t\t\t\t\t\t\t(subscr[part] = new RangeSet()));\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tvar pkRangeSet_1 = getRangeSet(\"\");\n\t\t\t\t\t\t\tvar delsRangeSet_1 = getRangeSet(\":dels\");\n\t\t\t\t\t\t\tvar _a = readSubscribers[method](req), queriedIndex = _a[0], queriedRanges = _a[1];\n\t\t\t\t\t\t\tgetRangeSet(queriedIndex.name || \"\").add(queriedRanges);\n\t\t\t\t\t\t\tif (!queriedIndex.isPrimaryKey) {\n\t\t\t\t\t\t\t\tif (method === \"count\") {\n\t\t\t\t\t\t\t\t\tdelsRangeSet_1.add(FULL_RANGE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tvar keysPromise_1 = method === \"query\" &&\n\t\t\t\t\t\t\t\t\t\toutbound &&\n\t\t\t\t\t\t\t\t\t\treq.values &&\n\t\t\t\t\t\t\t\t\t\ttable.query(__assign(__assign({}, req), { values: false }));\n\t\t\t\t\t\t\t\t\treturn table[method].apply(this, arguments).then(function (res) {\n\t\t\t\t\t\t\t\t\t\tif (method === \"query\") {\n\t\t\t\t\t\t\t\t\t\t\tif (outbound && req.values) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn keysPromise_1.then(function (_a) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar resultingKeys = _a.result;\n\t\t\t\t\t\t\t\t\t\t\t\t\tpkRangeSet_1.addKeys(resultingKeys);\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn res;\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tvar pKeys = req.values\n\t\t\t\t\t\t\t\t\t\t\t\t? res.result.map(extractKey)\n\t\t\t\t\t\t\t\t\t\t\t\t: res.result;\n\t\t\t\t\t\t\t\t\t\t\tif (req.values) {\n\t\t\t\t\t\t\t\t\t\t\t\tpkRangeSet_1.addKeys(pKeys);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tdelsRangeSet_1.addKeys(pKeys);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (method === \"openCursor\") {\n\t\t\t\t\t\t\t\t\t\t\tvar cursor_1 = res;\n\t\t\t\t\t\t\t\t\t\t\tvar wantValues_1 = req.values;\n\t\t\t\t\t\t\t\t\t\t\treturn (cursor_1 &&\n\t\t\t\t\t\t\t\t\t\t\t\tObject.create(cursor_1, {\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tget: function () {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdelsRangeSet_1.addKey(cursor_1.primaryKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn cursor_1.key;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\tprimaryKey: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tget: function () {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar pkey = cursor_1.primaryKey;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdelsRangeSet_1.addKey(pkey);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn pkey;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tget: function () {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twantValues_1 && pkRangeSet_1.addKey(cursor_1.primaryKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn cursor_1.value;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn res;\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn table[method].apply(this, arguments);\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t\t\treturn tableClone;\n\t\t\t} });\n\t},\n};\nfunction trackAffectedIndexes(getRangeSet, schema, oldObjs, newObjs) {\n\tfunction addAffectedIndex(ix) {\n\t\tvar rangeSet = getRangeSet(ix.name || \"\");\n\t\tfunction extractKey(obj) {\n\t\t\treturn obj != null ? ix.extractKey(obj) : null;\n\t\t}\n\t\tvar addKeyOrKeys = function (key) { return ix.multiEntry && isArray(key)\n\t\t\t? key.forEach(function (key) { return rangeSet.addKey(key); })\n\t\t\t: rangeSet.addKey(key); };\n\t\t(oldObjs || newObjs).forEach(function (_, i) {\n\t\t\tvar oldKey = oldObjs && extractKey(oldObjs[i]);\n\t\t\tvar newKey = newObjs && extractKey(newObjs[i]);\n\t\t\tif (cmp(oldKey, newKey) !== 0) {\n\t\t\t\tif (oldKey != null)\n\t\t\t\t\taddKeyOrKeys(oldKey);\n\t\t\t\tif (newKey != null)\n\t\t\t\t\taddKeyOrKeys(newKey);\n\t\t\t}\n\t\t});\n\t}\n\tschema.indexes.forEach(addAffectedIndex);\n}\n\nvar Dexie$1 =  (function () {\n\tfunction Dexie(name, options) {\n\t\tvar _this = this;\n\t\tthis._middlewares = {};\n\t\tthis.verno = 0;\n\t\tvar deps = Dexie.dependencies;\n\t\tthis._options = options = __assign({\n\t\t\taddons: Dexie.addons, autoOpen: true,\n\t\t\tindexedDB: deps.indexedDB, IDBKeyRange: deps.IDBKeyRange }, options);\n\t\tthis._deps = {\n\t\t\tindexedDB: options.indexedDB,\n\t\t\tIDBKeyRange: options.IDBKeyRange\n\t\t};\n\t\tvar addons = options.addons;\n\t\tthis._dbSchema = {};\n\t\tthis._versions = [];\n\t\tthis._storeNames = [];\n\t\tthis._allTables = {};\n\t\tthis.idbdb = null;\n\t\tthis._novip = this;\n\t\tvar state = {\n\t\t\tdbOpenError: null,\n\t\t\tisBeingOpened: false,\n\t\t\tonReadyBeingFired: null,\n\t\t\topenComplete: false,\n\t\t\tdbReadyResolve: nop,\n\t\t\tdbReadyPromise: null,\n\t\t\tcancelOpen: nop,\n\t\t\topenCanceller: null,\n\t\t\tautoSchema: true,\n\t\t\tPR1398_maxLoop: 3\n\t\t};\n\t\tstate.dbReadyPromise = new DexiePromise(function (resolve) {\n\t\t\tstate.dbReadyResolve = resolve;\n\t\t});\n\t\tstate.openCanceller = new DexiePromise(function (_, reject) {\n\t\t\tstate.cancelOpen = reject;\n\t\t});\n\t\tthis._state = state;\n\t\tthis.name = name;\n\t\tthis.on = Events(this, \"populate\", \"blocked\", \"versionchange\", \"close\", { ready: [promisableChain, nop] });\n\t\tthis.on.ready.subscribe = override(this.on.ready.subscribe, function (subscribe) {\n\t\t\treturn function (subscriber, bSticky) {\n\t\t\t\tDexie.vip(function () {\n\t\t\t\t\tvar state = _this._state;\n\t\t\t\t\tif (state.openComplete) {\n\t\t\t\t\t\tif (!state.dbOpenError)\n\t\t\t\t\t\t\tDexiePromise.resolve().then(subscriber);\n\t\t\t\t\t\tif (bSticky)\n\t\t\t\t\t\t\tsubscribe(subscriber);\n\t\t\t\t\t}\n\t\t\t\t\telse if (state.onReadyBeingFired) {\n\t\t\t\t\t\tstate.onReadyBeingFired.push(subscriber);\n\t\t\t\t\t\tif (bSticky)\n\t\t\t\t\t\t\tsubscribe(subscriber);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tsubscribe(subscriber);\n\t\t\t\t\t\tvar db_1 = _this;\n\t\t\t\t\t\tif (!bSticky)\n\t\t\t\t\t\t\tsubscribe(function unsubscribe() {\n\t\t\t\t\t\t\t\tdb_1.on.ready.unsubscribe(subscriber);\n\t\t\t\t\t\t\t\tdb_1.on.ready.unsubscribe(unsubscribe);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t});\n\t\tthis.Collection = createCollectionConstructor(this);\n\t\tthis.Table = createTableConstructor(this);\n\t\tthis.Transaction = createTransactionConstructor(this);\n\t\tthis.Version = createVersionConstructor(this);\n\t\tthis.WhereClause = createWhereClauseConstructor(this);\n\t\tthis.on(\"versionchange\", function (ev) {\n\t\t\tif (ev.newVersion > 0)\n\t\t\t\tconsole.warn(\"Another connection wants to upgrade database '\" + _this.name + \"'. Closing db now to resume the upgrade.\");\n\t\t\telse\n\t\t\t\tconsole.warn(\"Another connection wants to delete database '\" + _this.name + \"'. Closing db now to resume the delete request.\");\n\t\t\t_this.close();\n\t\t});\n\t\tthis.on(\"blocked\", function (ev) {\n\t\t\tif (!ev.newVersion || ev.newVersion < ev.oldVersion)\n\t\t\t\tconsole.warn(\"Dexie.delete('\" + _this.name + \"') was blocked\");\n\t\t\telse\n\t\t\t\tconsole.warn(\"Upgrade '\" + _this.name + \"' blocked by other connection holding version \" + ev.oldVersion / 10);\n\t\t});\n\t\tthis._maxKey = getMaxKey(options.IDBKeyRange);\n\t\tthis._createTransaction = function (mode, storeNames, dbschema, parentTransaction) { return new _this.Transaction(mode, storeNames, dbschema, _this._options.chromeTransactionDurability, parentTransaction); };\n\t\tthis._fireOnBlocked = function (ev) {\n\t\t\t_this.on(\"blocked\").fire(ev);\n\t\t\tconnections\n\t\t\t\t.filter(function (c) { return c.name === _this.name && c !== _this && !c._state.vcFired; })\n\t\t\t\t.map(function (c) { return c.on(\"versionchange\").fire(ev); });\n\t\t};\n\t\tthis.use(virtualIndexMiddleware);\n\t\tthis.use(hooksMiddleware);\n\t\tthis.use(observabilityMiddleware);\n\t\tthis.use(cacheExistingValuesMiddleware);\n\t\tthis.vip = Object.create(this, { _vip: { value: true } });\n\t\taddons.forEach(function (addon) { return addon(_this); });\n\t}\n\tDexie.prototype.version = function (versionNumber) {\n\t\tif (isNaN(versionNumber) || versionNumber < 0.1)\n\t\t\tthrow new exceptions.Type(\"Given version is not a positive number\");\n\t\tversionNumber = Math.round(versionNumber * 10) / 10;\n\t\tif (this.idbdb || this._state.isBeingOpened)\n\t\t\tthrow new exceptions.Schema(\"Cannot add version when database is open\");\n\t\tthis.verno = Math.max(this.verno, versionNumber);\n\t\tvar versions = this._versions;\n\t\tvar versionInstance = versions.filter(function (v) { return v._cfg.version === versionNumber; })[0];\n\t\tif (versionInstance)\n\t\t\treturn versionInstance;\n\t\tversionInstance = new this.Version(versionNumber);\n\t\tversions.push(versionInstance);\n\t\tversions.sort(lowerVersionFirst);\n\t\tversionInstance.stores({});\n\t\tthis._state.autoSchema = false;\n\t\treturn versionInstance;\n\t};\n\tDexie.prototype._whenReady = function (fn) {\n\t\tvar _this = this;\n\t\treturn (this.idbdb && (this._state.openComplete || PSD.letThrough || this._vip)) ? fn() : new DexiePromise(function (resolve, reject) {\n\t\t\tif (_this._state.openComplete) {\n\t\t\t\treturn reject(new exceptions.DatabaseClosed(_this._state.dbOpenError));\n\t\t\t}\n\t\t\tif (!_this._state.isBeingOpened) {\n\t\t\t\tif (!_this._options.autoOpen) {\n\t\t\t\t\treject(new exceptions.DatabaseClosed());\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t_this.open().catch(nop);\n\t\t\t}\n\t\t\t_this._state.dbReadyPromise.then(resolve, reject);\n\t\t}).then(fn);\n\t};\n\tDexie.prototype.use = function (_a) {\n\t\tvar stack = _a.stack, create = _a.create, level = _a.level, name = _a.name;\n\t\tif (name)\n\t\t\tthis.unuse({ stack: stack, name: name });\n\t\tvar middlewares = this._middlewares[stack] || (this._middlewares[stack] = []);\n\t\tmiddlewares.push({ stack: stack, create: create, level: level == null ? 10 : level, name: name });\n\t\tmiddlewares.sort(function (a, b) { return a.level - b.level; });\n\t\treturn this;\n\t};\n\tDexie.prototype.unuse = function (_a) {\n\t\tvar stack = _a.stack, name = _a.name, create = _a.create;\n\t\tif (stack && this._middlewares[stack]) {\n\t\t\tthis._middlewares[stack] = this._middlewares[stack].filter(function (mw) {\n\t\t\t\treturn create ? mw.create !== create :\n\t\t\t\t\tname ? mw.name !== name :\n\t\t\t\t\t\tfalse;\n\t\t\t});\n\t\t}\n\t\treturn this;\n\t};\n\tDexie.prototype.open = function () {\n\t\treturn dexieOpen(this);\n\t};\n\tDexie.prototype._close = function () {\n\t\tvar state = this._state;\n\t\tvar idx = connections.indexOf(this);\n\t\tif (idx >= 0)\n\t\t\tconnections.splice(idx, 1);\n\t\tif (this.idbdb) {\n\t\t\ttry {\n\t\t\t\tthis.idbdb.close();\n\t\t\t}\n\t\t\tcatch (e) { }\n\t\t\tthis._novip.idbdb = null;\n\t\t}\n\t\tstate.dbReadyPromise = new DexiePromise(function (resolve) {\n\t\t\tstate.dbReadyResolve = resolve;\n\t\t});\n\t\tstate.openCanceller = new DexiePromise(function (_, reject) {\n\t\t\tstate.cancelOpen = reject;\n\t\t});\n\t};\n\tDexie.prototype.close = function () {\n\t\tthis._close();\n\t\tvar state = this._state;\n\t\tthis._options.autoOpen = false;\n\t\tstate.dbOpenError = new exceptions.DatabaseClosed();\n\t\tif (state.isBeingOpened)\n\t\t\tstate.cancelOpen(state.dbOpenError);\n\t};\n\tDexie.prototype.delete = function () {\n\t\tvar _this = this;\n\t\tvar hasArguments = arguments.length > 0;\n\t\tvar state = this._state;\n\t\treturn new DexiePromise(function (resolve, reject) {\n\t\t\tvar doDelete = function () {\n\t\t\t\t_this.close();\n\t\t\t\tvar req = _this._deps.indexedDB.deleteDatabase(_this.name);\n\t\t\t\treq.onsuccess = wrap(function () {\n\t\t\t\t\t_onDatabaseDeleted(_this._deps, _this.name);\n\t\t\t\t\tresolve();\n\t\t\t\t});\n\t\t\t\treq.onerror = eventRejectHandler(reject);\n\t\t\t\treq.onblocked = _this._fireOnBlocked;\n\t\t\t};\n\t\t\tif (hasArguments)\n\t\t\t\tthrow new exceptions.InvalidArgument(\"Arguments not allowed in db.delete()\");\n\t\t\tif (state.isBeingOpened) {\n\t\t\t\tstate.dbReadyPromise.then(doDelete);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdoDelete();\n\t\t\t}\n\t\t});\n\t};\n\tDexie.prototype.backendDB = function () {\n\t\treturn this.idbdb;\n\t};\n\tDexie.prototype.isOpen = function () {\n\t\treturn this.idbdb !== null;\n\t};\n\tDexie.prototype.hasBeenClosed = function () {\n\t\tvar dbOpenError = this._state.dbOpenError;\n\t\treturn dbOpenError && (dbOpenError.name === 'DatabaseClosed');\n\t};\n\tDexie.prototype.hasFailed = function () {\n\t\treturn this._state.dbOpenError !== null;\n\t};\n\tDexie.prototype.dynamicallyOpened = function () {\n\t\treturn this._state.autoSchema;\n\t};\n\tObject.defineProperty(Dexie.prototype, \"tables\", {\n\t\tget: function () {\n\t\t\tvar _this = this;\n\t\t\treturn keys(this._allTables).map(function (name) { return _this._allTables[name]; });\n\t\t},\n\t\tenumerable: false,\n\t\tconfigurable: true\n\t});\n\tDexie.prototype.transaction = function () {\n\t\tvar args = extractTransactionArgs.apply(this, arguments);\n\t\treturn this._transaction.apply(this, args);\n\t};\n\tDexie.prototype._transaction = function (mode, tables, scopeFunc) {\n\t\tvar _this = this;\n\t\tvar parentTransaction = PSD.trans;\n\t\tif (!parentTransaction || parentTransaction.db !== this || mode.indexOf('!') !== -1)\n\t\t\tparentTransaction = null;\n\t\tvar onlyIfCompatible = mode.indexOf('?') !== -1;\n\t\tmode = mode.replace('!', '').replace('?', '');\n\t\tvar idbMode, storeNames;\n\t\ttry {\n\t\t\tstoreNames = tables.map(function (table) {\n\t\t\t\tvar storeName = table instanceof _this.Table ? table.name : table;\n\t\t\t\tif (typeof storeName !== 'string')\n\t\t\t\t\tthrow new TypeError(\"Invalid table argument to Dexie.transaction(). Only Table or String are allowed\");\n\t\t\t\treturn storeName;\n\t\t\t});\n\t\t\tif (mode == \"r\" || mode === READONLY)\n\t\t\t\tidbMode = READONLY;\n\t\t\telse if (mode == \"rw\" || mode == READWRITE)\n\t\t\t\tidbMode = READWRITE;\n\t\t\telse\n\t\t\t\tthrow new exceptions.InvalidArgument(\"Invalid transaction mode: \" + mode);\n\t\t\tif (parentTransaction) {\n\t\t\t\tif (parentTransaction.mode === READONLY && idbMode === READWRITE) {\n\t\t\t\t\tif (onlyIfCompatible) {\n\t\t\t\t\t\tparentTransaction = null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new exceptions.SubTransaction(\"Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY\");\n\t\t\t\t}\n\t\t\t\tif (parentTransaction) {\n\t\t\t\t\tstoreNames.forEach(function (storeName) {\n\t\t\t\t\t\tif (parentTransaction && parentTransaction.storeNames.indexOf(storeName) === -1) {\n\t\t\t\t\t\t\tif (onlyIfCompatible) {\n\t\t\t\t\t\t\t\tparentTransaction = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tthrow new exceptions.SubTransaction(\"Table \" + storeName +\n\t\t\t\t\t\t\t\t\t\" not included in parent transaction.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (onlyIfCompatible && parentTransaction && !parentTransaction.active) {\n\t\t\t\t\tparentTransaction = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (e) {\n\t\t\treturn parentTransaction ?\n\t\t\t\tparentTransaction._promise(null, function (_, reject) { reject(e); }) :\n\t\t\t\trejection(e);\n\t\t}\n\t\tvar enterTransaction = enterTransactionScope.bind(null, this, idbMode, storeNames, parentTransaction, scopeFunc);\n\t\treturn (parentTransaction ?\n\t\t\tparentTransaction._promise(idbMode, enterTransaction, \"lock\") :\n\t\t\tPSD.trans ?\n\t\t\t\tusePSD(PSD.transless, function () { return _this._whenReady(enterTransaction); }) :\n\t\t\t\tthis._whenReady(enterTransaction));\n\t};\n\tDexie.prototype.table = function (tableName) {\n\t\tif (!hasOwn(this._allTables, tableName)) {\n\t\t\tthrow new exceptions.InvalidTable(\"Table \" + tableName + \" does not exist\");\n\t\t}\n\t\treturn this._allTables[tableName];\n\t};\n\treturn Dexie;\n}());\n\nvar symbolObservable = typeof Symbol !== \"undefined\" && \"observable\" in Symbol\n\t? Symbol.observable\n\t: \"@@observable\";\nvar Observable =  (function () {\n\tfunction Observable(subscribe) {\n\t\tthis._subscribe = subscribe;\n\t}\n\tObservable.prototype.subscribe = function (x, error, complete) {\n\t\treturn this._subscribe(!x || typeof x === \"function\" ? { next: x, error: error, complete: complete } : x);\n\t};\n\tObservable.prototype[symbolObservable] = function () {\n\t\treturn this;\n\t};\n\treturn Observable;\n}());\n\nfunction extendObservabilitySet(target, newSet) {\n\tkeys(newSet).forEach(function (part) {\n\t\tvar rangeSet = target[part] || (target[part] = new RangeSet());\n\t\tmergeRanges(rangeSet, newSet[part]);\n\t});\n\treturn target;\n}\n\nfunction liveQuery(querier) {\n\treturn new Observable(function (observer) {\n\t\tvar scopeFuncIsAsync = isAsyncFunction(querier);\n\t\tfunction execute(subscr) {\n\t\t\tif (scopeFuncIsAsync) {\n\t\t\t\tincrementExpectedAwaits();\n\t\t\t}\n\t\t\tvar exec = function () { return newScope(querier, { subscr: subscr, trans: null }); };\n\t\t\tvar rv = PSD.trans\n\t\t\t\t?\n\t\t\t\tusePSD(PSD.transless, exec)\n\t\t\t\t: exec();\n\t\t\tif (scopeFuncIsAsync) {\n\t\t\t\trv.then(decrementExpectedAwaits, decrementExpectedAwaits);\n\t\t\t}\n\t\t\treturn rv;\n\t\t}\n\t\tvar closed = false;\n\t\tvar accumMuts = {};\n\t\tvar currentObs = {};\n\t\tvar subscription = {\n\t\t\tget closed() {\n\t\t\t\treturn closed;\n\t\t\t},\n\t\t\tunsubscribe: function () {\n\t\t\t\tclosed = true;\n\t\t\t\tglobalEvents.storagemutated.unsubscribe(mutationListener);\n\t\t\t},\n\t\t};\n\t\tobserver.start && observer.start(subscription);\n\t\tvar querying = false, startedListening = false;\n\t\tfunction shouldNotify() {\n\t\t\treturn keys(currentObs).some(function (key) {\n\t\t\t\treturn accumMuts[key] && rangesOverlap(accumMuts[key], currentObs[key]);\n\t\t\t});\n\t\t}\n\t\tvar mutationListener = function (parts) {\n\t\t\textendObservabilitySet(accumMuts, parts);\n\t\t\tif (shouldNotify()) {\n\t\t\t\tdoQuery();\n\t\t\t}\n\t\t};\n\t\tvar doQuery = function () {\n\t\t\tif (querying || closed)\n\t\t\t\treturn;\n\t\t\taccumMuts = {};\n\t\t\tvar subscr = {};\n\t\t\tvar ret = execute(subscr);\n\t\t\tif (!startedListening) {\n\t\t\t\tglobalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME, mutationListener);\n\t\t\t\tstartedListening = true;\n\t\t\t}\n\t\t\tquerying = true;\n\t\t\tPromise.resolve(ret).then(function (result) {\n\t\t\t\tquerying = false;\n\t\t\t\tif (closed)\n\t\t\t\t\treturn;\n\t\t\t\tif (shouldNotify()) {\n\t\t\t\t\tdoQuery();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\taccumMuts = {};\n\t\t\t\t\tcurrentObs = subscr;\n\t\t\t\t\tobserver.next && observer.next(result);\n\t\t\t\t}\n\t\t\t}, function (err) {\n\t\t\t\tquerying = false;\n\t\t\t\tobserver.error && observer.error(err);\n\t\t\t\tsubscription.unsubscribe();\n\t\t\t});\n\t\t};\n\t\tdoQuery();\n\t\treturn subscription;\n\t});\n}\n\nvar domDeps;\ntry {\n\tdomDeps = {\n\t\tindexedDB: _global.indexedDB || _global.mozIndexedDB || _global.webkitIndexedDB || _global.msIndexedDB,\n\t\tIDBKeyRange: _global.IDBKeyRange || _global.webkitIDBKeyRange\n\t};\n}\ncatch (e) {\n\tdomDeps = { indexedDB: null, IDBKeyRange: null };\n}\n\nvar Dexie = Dexie$1;\nprops(Dexie, __assign(__assign({}, fullNameExceptions), {\n\tdelete: function (databaseName) {\n\t\tvar db = new Dexie(databaseName, { addons: [] });\n\t\treturn db.delete();\n\t},\n\texists: function (name) {\n\t\treturn new Dexie(name, { addons: [] }).open().then(function (db) {\n\t\t\tdb.close();\n\t\t\treturn true;\n\t\t}).catch('NoSuchDatabaseError', function () { return false; });\n\t},\n\tgetDatabaseNames: function (cb) {\n\t\ttry {\n\t\t\treturn getDatabaseNames(Dexie.dependencies).then(cb);\n\t\t}\n\t\tcatch (_a) {\n\t\t\treturn rejection(new exceptions.MissingAPI());\n\t\t}\n\t},\n\tdefineClass: function () {\n\t\tfunction Class(content) {\n\t\t\textend(this, content);\n\t\t}\n\t\treturn Class;\n\t}, ignoreTransaction: function (scopeFunc) {\n\t\treturn PSD.trans ?\n\t\t\tusePSD(PSD.transless, scopeFunc) :\n\t\t\tscopeFunc();\n\t}, vip: vip, async: function (generatorFn) {\n\t\treturn function () {\n\t\t\ttry {\n\t\t\t\tvar rv = awaitIterator(generatorFn.apply(this, arguments));\n\t\t\t\tif (!rv || typeof rv.then !== 'function')\n\t\t\t\t\treturn DexiePromise.resolve(rv);\n\t\t\t\treturn rv;\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\treturn rejection(e);\n\t\t\t}\n\t\t};\n\t}, spawn: function (generatorFn, args, thiz) {\n\t\ttry {\n\t\t\tvar rv = awaitIterator(generatorFn.apply(thiz, args || []));\n\t\t\tif (!rv || typeof rv.then !== 'function')\n\t\t\t\treturn DexiePromise.resolve(rv);\n\t\t\treturn rv;\n\t\t}\n\t\tcatch (e) {\n\t\t\treturn rejection(e);\n\t\t}\n\t},\n\tcurrentTransaction: {\n\t\tget: function () { return PSD.trans || null; }\n\t}, waitFor: function (promiseOrFunction, optionalTimeout) {\n\t\tvar promise = DexiePromise.resolve(typeof promiseOrFunction === 'function' ?\n\t\t\t\tDexie.ignoreTransaction(promiseOrFunction) :\n\t\t\t\tpromiseOrFunction)\n\t\t\t.timeout(optionalTimeout || 60000);\n\t\treturn PSD.trans ?\n\t\t\tPSD.trans.waitFor(promise) :\n\t\t\tpromise;\n\t},\n\tPromise: DexiePromise,\n\tdebug: {\n\t\tget: function () { return debug; },\n\t\tset: function (value) {\n\t\t\tsetDebug(value, value === 'dexie' ? function () { return true; } : dexieStackFrameFilter);\n\t\t}\n\t},\n\tderive: derive, extend: extend, props: props, override: override,\n\tEvents: Events, on: globalEvents, liveQuery: liveQuery, extendObservabilitySet: extendObservabilitySet,\n\tgetByKeyPath: getByKeyPath, setByKeyPath: setByKeyPath, delByKeyPath: delByKeyPath, shallowClone: shallowClone, deepClone: deepClone, getObjectDiff: getObjectDiff, cmp: cmp, asap: asap$1,\n\tminKey: minKey,\n\taddons: [],\n\tconnections: connections,\n\terrnames: errnames,\n\tdependencies: domDeps,\n\tsemVer: DEXIE_VERSION, version: DEXIE_VERSION.split('.')\n\t\t.map(function (n) { return parseInt(n); })\n\t\t.reduce(function (p, c, i) { return p + (c / Math.pow(10, i * 2)); }) }));\nDexie.maxKey = getMaxKey(Dexie.dependencies.IDBKeyRange);\n\nif (typeof dispatchEvent !== 'undefined' && typeof addEventListener !== 'undefined') {\n\tglobalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME, function (updatedParts) {\n\t\tif (!propagatingLocally) {\n\t\t\tvar event_1;\n\t\t\tif (isIEOrEdge) {\n\t\t\t\tevent_1 = document.createEvent('CustomEvent');\n\t\t\t\tevent_1.initCustomEvent(STORAGE_MUTATED_DOM_EVENT_NAME, true, true, updatedParts);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tevent_1 = new CustomEvent(STORAGE_MUTATED_DOM_EVENT_NAME, {\n\t\t\t\t\tdetail: updatedParts\n\t\t\t\t});\n\t\t\t}\n\t\t\tpropagatingLocally = true;\n\t\t\tdispatchEvent(event_1);\n\t\t\tpropagatingLocally = false;\n\t\t}\n\t});\n\taddEventListener(STORAGE_MUTATED_DOM_EVENT_NAME, function (_a) {\n\t\tvar detail = _a.detail;\n\t\tif (!propagatingLocally) {\n\t\t\tpropagateLocally(detail);\n\t\t}\n\t});\n}\nfunction propagateLocally(updateParts) {\n\tvar wasMe = propagatingLocally;\n\ttry {\n\t\tpropagatingLocally = true;\n\t\tglobalEvents.storagemutated.fire(updateParts);\n\t}\n\tfinally {\n\t\tpropagatingLocally = wasMe;\n\t}\n}\nvar propagatingLocally = false;\n\nif (typeof BroadcastChannel !== 'undefined') {\n\tvar bc_1 = new BroadcastChannel(STORAGE_MUTATED_DOM_EVENT_NAME);\n\tglobalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME, function (changedParts) {\n\t\tif (!propagatingLocally) {\n\t\t\tbc_1.postMessage(changedParts);\n\t\t}\n\t});\n\tbc_1.onmessage = function (ev) {\n\t\tif (ev.data)\n\t\t\tpropagateLocally(ev.data);\n\t};\n}\nelse if (typeof self !== 'undefined' && typeof navigator !== 'undefined') {\n\tglobalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME, function (changedParts) {\n\t\ttry {\n\t\t\tif (!propagatingLocally) {\n\t\t\t\tif (typeof localStorage !== 'undefined') {\n\t\t\t\t\tlocalStorage.setItem(STORAGE_MUTATED_DOM_EVENT_NAME, JSON.stringify({\n\t\t\t\t\t\ttrig: Math.random(),\n\t\t\t\t\t\tchangedParts: changedParts,\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\tif (typeof self['clients'] === 'object') {\n\t\t\t\t\t__spreadArray([], self['clients'].matchAll({ includeUncontrolled: true }), true).forEach(function (client) {\n\t\t\t\t\t\treturn client.postMessage({\n\t\t\t\t\t\t\ttype: STORAGE_MUTATED_DOM_EVENT_NAME,\n\t\t\t\t\t\t\tchangedParts: changedParts,\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (_a) { }\n\t});\n\tif (typeof addEventListener !== 'undefined') {\n\t\taddEventListener('storage', function (ev) {\n\t\t\tif (ev.key === STORAGE_MUTATED_DOM_EVENT_NAME) {\n\t\t\t\tvar data = JSON.parse(ev.newValue);\n\t\t\t\tif (data)\n\t\t\t\t\tpropagateLocally(data.changedParts);\n\t\t\t}\n\t\t});\n\t}\n\tvar swContainer = self.document && navigator.serviceWorker;\n\tif (swContainer) {\n\t\tswContainer.addEventListener('message', propagateMessageLocally);\n\t}\n}\nfunction propagateMessageLocally(_a) {\n\tvar data = _a.data;\n\tif (data && data.type === STORAGE_MUTATED_DOM_EVENT_NAME) {\n\t\tpropagateLocally(data.changedParts);\n\t}\n}\n\nDexiePromise.rejectionMapper = mapError;\nsetDebug(debug, dexieStackFrameFilter);\n\n// backward compatibility with Dexie 2 usages\nwindow.BX.Dexie = Dexie$1;\n\nexport {\n\tDexie$1 as Dexie,\n\tliveQuery,\n\tRangeSet,\n\tmergeRanges,\n\trangesOverlap\n}"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","__spreadArray","to","from","pack","l","ar","Array","slice","concat","_global","globalThis","self","window","global","keys","isArray","Promise","extend","obj","extension","forEach","key","getProto","getPrototypeOf","_hasOwn","hasOwn","prop","props","proto","Reflect","ownKeys","setProp","defineProperty","functionOrGetSet","options","get","set","configurable","value","writable","derive","Child","Parent","create","bind","getOwnPropertyDescriptor","getPropertyDescriptor","pd","_slice","args","start","end","override","origFunc","overridedFactory","assert","b","Error","asap$1","fn","setImmediate","setTimeout","arrayToObject","array","extractor","reduce","result","item","nameAndValue","tryCatch","onerror","ex","getByKeyPath","keyPath","rv","val","push","period","indexOf","innerObj","substr","undefined","setByKeyPath","isFrozen","currentKeyPath","remainingKeyPath","isNaN","parseInt","splice","delByKeyPath","map","kp","shallowClone","m","flatten","a","intrinsicTypeNames","split","num","filter","intrinsicTypes","x","circularRefs","deepClone","any","WeakMap","innerDeepClone","constructor","toString","toStringTag","o","iteratorSymbol","Symbol","iterator","getIteratorOf","NO_CHAR_ARRAY","getArrayOf","arrayLike","it","next","done","isAsyncFunction","debug","location","test","href","setDebug","libraryFilter","NEEDS_THROW_FOR_STACK","stack","getErrorWithStack","e","prettyStack","exception","numIgnoredFrames","name","message","frame","join","dexieErrorNames","idbDomErrorNames","errorList","defaultTexts","VersionChanged","DatabaseClosed","Abort","TransactionInactive","MissingAPI","DexieError","msg","_e","_stack","getMultiErrorMessage","failures","v","ModifyError","successCount","failedKeys","BulkError","pos","failuresByPos","errnames","BaseException","exceptions","fullName","msgOrInner","inner","Syntax","SyntaxError","Type","TypeError","Range","RangeError","exceptionMap","mapError","domError","fullNameExceptions","nop","mirror","pureFunctionChain","f1","f2","callBoth","on1","on2","hookCreatingChain","res","onsuccess","res2","hookDeletingChain","hookUpdatingChain","modifications","reverseStoppableEventChain","promisableChain","then","thiz","INTERNAL","LONG_STACKS_CLIP_LIMIT","MAX_LONG_STACKS","ZONE_ECHO_LIMIT","_a$1","globalP","resolve","crypto","subtle","nativeP","digest","Uint8Array","resolvedNativePromise","nativePromiseProto","resolvedGlobalPromise","nativePromiseThen","NativePromise","patchGlobalPromise","stack_being_generated","schedulePhysicalTick","physicalTick","MutationObserver","hiddenDiv","document","createElement","observe","attributes","setAttribute","asap","callback","microtickQueue","needsNewPhysicalTick","isOutsideMicroTick","unhandledErrors","rejectingErrors","currentFulfiller","rejectionMapper","globalPSD","id","ref","unhandleds","onunhandled","globalError","pgp","env","finalize","uh","PSD","numScheduledCalls","tickFinalizers","DexiePromise","_listeners","onuncatched","_lib","psd","_PSD","_stackHolder","_prev","_numPrev","_state","_value","handleRejection","executePromiseTask","thenProp","microTaskId","totalEchoes","onFulfilled","onRejected","_this","possibleAwait","cleanup","decrementExpectedAwaits","reject","propagateToListener","Listener","nativeAwaitCompatibleWrap","linkToPreviousPromise","_then","type","handler","err","PromiseReject","onFinally","stacks","getStack","timeout","ms","Infinity","handle","Timeout","clearTimeout","snapShot","zone","all","values","onPossibleParallellAsync","remaining","race","newPSD","newScope","usePSD","scheduler","follow","zoneProps","run_at_end_of_this_or_next_physical_tick","allSettled","possiblePromises","results","status","reason","AggregateError","failure","promise","shouldExecuteTick","beginMicroTickScope","propagateAllListeners","endMicroTickScope","_promise","origProp","addPossiblyUnhandledError","listeners","len","finalizePhysicalTick","listener","cb","callListener","ret","markErrorAsHandled","limit","errorName","prev","numPrev","wasRootExec","callbacks","unhandledErrs","finalizers","finalizer","some","wrap","errorCatcher","outerScope","switchToZone","task","awaits","echoes","taskCounter","zoneStack","zoneEchoes","zone_id_counter","a1","a2","parent","globalEnv","PromiseProp","nthen","getPatchedPromiseThen","gthen","incrementExpectedAwaits","possiblePromise","rejection","zoneEnterEcho","targetZone","zoneLeaveEcho","pop","bEnteringZone","currentZone","enqueueNativeMicroTask","GlobalPromise_1","targetEnv","GlobalPromise","a3","job","outerZone","origThen","onResolved","UNHANDLEDREJECTION","event","eventData","createEvent","initEvent","CustomEvent","detail","dispatchEvent","PromiseRejectionEvent","onunhandledrejection","_","defaultPrevented","console","warn","tempTransaction","db","mode","storeNames","idbdb","openComplete","letThrough","_vip","dbOpenError","isBeingOpened","_options","autoOpen","open","dbReadyPromise","trans","_createTransaction","_dbSchema","PR1398_maxLoop","InvalidState","isOpen","_close","_completion","DEXIE_VERSION","maxString","String","fromCharCode","minKey","INVALID_KEY_ARGUMENT","STRING_EXPECTED","connections","isIEOrEdge","navigator","userAgent","hasIEDeleteObjectStoreBug","hangsOnDeleteLargeKeyRange","dexieStackFrameFilter","DBNAMES_DB","READONLY","READWRITE","combine","filter1","filter2","AnyRange","lower","lowerOpen","upper","upperOpen","workaroundForUndefinedPrimKey","Table","_trans","writeLocked","_tx","tableName","checkTableInTransaction","schema","NotFound","idbtrans","transless","keyOrCrit","where","first","core","hook","reading","fire","indexOrCrit","WhereClause","keyPaths","equals","compoundIndex","indexes","primKey","ix","compound","every","_maxKey","JSON","stringify","idxByName","idb","_deps","indexedDB","cmp","_a","prevIndex","prevFilterFn","index","multi","idx","filterFunction","toCollection","and","count","thenShortcut","offset","numRows","each","toArray","Collection","orderBy","reverse","mapToClass","mappedClass","readHook","unsubscribe","defineClass","Class","content","add","auto","objToAdd","mutate","numFailures","lastResult","update","keyOrObject","InvalidArgument","modify","put","clear","range","bulkGet","getMany","bulkAdd","objects","keysOrOptions","wantResults","allKeys","numObjects","objectsToAdd","bulkPut","objectsToPut","bulkDelete","numKeys","Events","ctx","evs","eventName","subscriber","subscribe","addEventType","chainFunction","defaultFunction","addConfiguredEvents","context","subscribers","cfg","fireEvent","makeClassConstructor","createTableConstructor","tableSchema","_allTables","isPlainKeyRange","ignoreLimitFilter","algorithm","or","justLimit","replayFilter","addFilter","addReplayFilter","factory","isLimitFilter","curr","addMatchFilter","isMatch","getIndexOrStore","coreSchema","isPrimKey","primaryKey","getIndexByKeyPath","Schema","openCursor","coreTable","keysOnly","dir","unique","query","iter","coreTrans","iterate","valueMapper","set_1","union","cursor","advance","stop","fail","_iterate","cursorPromise","mappedFn","c","wrappedFn","advancer","ta","tb","NaN","compareUint8Arrays","getUint8Array","compareArrays","al","bl","ArrayBuffer","isView","tsTag","buffer","byteOffset","byteLength","_read","_ctx","error","table","_write","_addAlgorithm","clone","raw","Math","min","sortBy","parts","lastPart","lastIndex","getval","order","sorter","aVal","bVal","sort","valueMapper_1","a_1","offsetLeft","rowsLeft","until","bIncludeStopEntry","last","indexName","_ondirectionchange","desc","eachKey","eachUniqueKey","eachPrimaryKey","primaryKeys","uniqueKeys","firstKey","lastKey","distinct","strKey","found","changes","modifyer","anythingModified","outbound","extractKey","modifyChunkSize","totalFailures","applyMutateResult","expectedCount","_i","nextChunk","cache","addValues","putValues","putKeys","deleteKeys","origValue","ctx_1","criteria","deleteCallback","changeSpec","coreRange","createCollectionConstructor","whereClause","keyRangeGenerator","keyRange","whereCtx","readingHook","simpleCompare","simpleCompareReverse","collectionOrWhereClause","T","collection","emptyCollection","rangeEqual","upperFactory","toUpperCase","toLowerCase","lowerFactory","nextCasing","lowerKey","upperNeedle","lowerNeedle","llp","lwrKeyChar","addIgnoreCaseAlgorithm","match","needles","suffix","compare","upperNeedles","lowerNeedles","direction","nextKeySuffix","needlesLen","initDirection","needleBounds","needle","nb","createRange","firstPossibleNeedle","lowestPossibleCasing","casing","enumerable","between","includeLower","includeUpper","_cmp","above","aboveOrEqual","below","belowOrEqual","startsWith","str","startsWithIgnoreCase","equalsIgnoreCase","anyOfIgnoreCase","startsWithAnyOfIgnoreCase","anyOf","_ascending","_descending","notEqual","inAnyRange","includeLowers","includeUppers","noneOf","ranges","ascending","descending","_min","max","_max","addRange","newRange","sortDirection","rangeSorter","rangePos","keyIsBeyondCurrentEntry","keyIsBeforeCurrentEntry","keyWithinCurrentRange","checkKey","startsWithAnyOf","createWhereClauseConstructor","orCollection","_IDBKeyRange","IDBKeyRange","eventRejectHandler","preventDefault","target","stopPropagation","DEXIE_STORAGE_MUTATED_EVENT_NAME","STORAGE_MUTATED_DOM_EVENT_NAME","globalEvents","Transaction","_lock","_reculock","lockOwnerFor","_unlock","_blockedFuncs","_locked","fnAndPSD","shift","OpenFailed","active","transaction","durability","chromeTransactionDurability","ev","_reject","onabort","on","oncomplete","_resolve","storagemutated","bWriteLock","ReadOnly","_root","waitFor","promiseLike","root","_waitingFor","_waitingQueue","store","objectStore","spin","_spinCount","currentWaitPromise","abort","memoizedTables","_memoizedTables","transactionBoundTable","createTransactionConstructor","dbschema","complete","wasActive","createIndexSpec","src","nameFromKeyPath","createTableSchema","safariMultiStoreFix","getMaxKey","IdbKeyRange","only","getKeyExtractor","getSinglePathKeyExtractor","arrayify","_id_counter","getKeyPathAlias","createDBCore","tmpTrans","extractSchema","tables","objectStoreNames","autoIncrement","indexByKeyPath","isPrimaryKey","indexNames","multiEntry","hasGetAll","makeIDBKeyRange","idbRange","upperBound","lowerBound","bound","createDbCoreTable","isAddOrPut","req","reqs","errorHandler","args1","args2","source","openKeyCursor","___id","_cursorContinue","_cursorContinuePrimaryKey","continuePrimaryKey","_cursorAdvance","doThrowCursorIsNotStarted","doThrowCursorIsStopped","gotOne","iterationPromise","resolveIteration","rejectIteration","guardedCallback","request","nonInfinitLimit","idbKeyRange","getAll","getAllKeys","count_1","req_1","result_1","keyCount","callbackCount","successHandler","_pos","tableMap","MIN_KEY","MAX_KEY","createMiddlewareStack","stackImpl","middlewares","down","createMiddlewareStacks","dbcore","generateMiddlewareStacks","_novip","_middlewares","tbl","setApiOnPlace","objs","tableNames","propDesc","removeTablesApi","lowerVersionFirst","_cfg","version","runUpgraders","oldVersion","idbUpgradeTrans","globalSchema","_storeNames","rejectTransaction","createTable","populate","updateTablesAndIndexes","queue","versions","_versions","buildGlobalSchema","anyContentUpgraderHasRun","versToRun","oldSchema","newSchema","adjustToExistingIndexNames","diff","getSchemaDiff","tuple","change","recreate","Upgrade","store_1","addIndex","deleteIndex","del","idxName","contentUpgrade","upgradeSchema_1","contentUpgradeIsAsync_1","returnValue_1","promiseFollowed","decrementor","deleteRemovedTables","runQueue","createMissingTables","oldDef","newDef","def","oldIndexes","newIndexes","oldIdx","newIdx","createObjectStore","contains","storeName","deleteObjectStore","createIndex","dbStoreNames","j","idbindex","readGlobalSchema","verno","verifyInstalledSchema","installedSchema","ch","_hasGetAll","dexieName","indexSpec","WorkerGlobalScope","parseIndexSyntax","primKeyAndIndexes","indexNum","trim","replace","Version","_parseStoresSpec","stores","outSchema","storesSource","storesSpec","upgrade","upgradeFunction","createVersionConstructor","versionNumber","getDbNamesTable","dbNamesDB","Dexie$1","addons","dbnames","hasDatabasesNative","databases","getDatabaseNames","infos","info","_onDatabaseCreated","_onDatabaseDeleted","vip","idbReady","isSafari","userAgentData","intervalId","tryIdb","setInterval","clearInterval","dexieOpen","state","openCanceller","throwIfCancelled","resolveDbReady","dbReadyResolve","upgradeTransaction","wasCreated","dbName","autoSchema","round","onblocked","_fireOnBlocked","onupgradeneeded","allowEmptyDB","close","delreq","deleteDatabase","NoSuchDatabase","oldVer","pow","onversionchange","vcFired","onclose","onReadyBeingFired","ready","fireRemainders","remainders_1","awaitIterator","callNext","doThrow","onSuccess","step","onError","getNext","extractTransactionArgs","_tableArgs_","scopeFunc","enterTransactionScope","parentTransaction","scopeFuncIsAsync","returnValue","PrematureCommit","pad","createVirtualIndexMiddleware","indexLookup","allVirtualIndexes","addVirtualIndexes","keyTail","lowLevelIndex","keyPathAlias","indexList","keyLength","isVirtual","virtualIndex","virtualKeyPath","findBestIndex","translateRange","translateRequest","createVirtualCursor","_continue","virtualCursor","virtualIndexMiddleware","level","getObjectDiff","prfx","ap","bp","apTypeName","bpTypeName","getEffectiveKeys","hooksMiddleware","downCore","downTable","tableMiddleware","dxTrans","deleting","creating","updating","addPutOrDelete","deleteRange","getExistingValues","existingValues","contexts","existingValue","generatedPrimaryKey","objectDiff","additionalChanges_1","requestedValue_1","deleteNextChunk","effectiveKeys","getFromTransactionCache","cacheExistingValuesMiddleware","cachedResult","isEmptyRange","node","RangeSet","fromOrTree","d","rangeSet","mergeRanges","addKey","addKeys","getRangeSetIterator","left","right","r","rebalance","rightWasCutOff","newSet","_addRangeSet","rangesOverlap","rangeSet1","rangeSet2","i1","nextResult1","i2","nextResult2","keyProvided","up","_b","rootClone","oldRootRight","computeDepth","observabilityMiddleware","FULL_RANGE","tableClone","mutatedParts","getRangeSet","part","pkRangeSet","delsRangeSet","newObjs","oldCache","oldObjs","trackAffectedIndexes","getRange","_c","_d","readSubscribers","method","subscr","pkRangeSet_1","delsRangeSet_1","queriedIndex","queriedRanges","keysPromise_1","resultingKeys","pKeys","cursor_1","wantValues_1","pkey","addAffectedIndex","addKeyOrKeys","oldKey","newKey","Dexie","deps","dependencies","cancelOpen","bSticky","db_1","newVersion","use","addon","versionInstance","_whenReady","unuse","mw","hasArguments","doDelete","backendDB","hasBeenClosed","hasFailed","dynamicallyOpened","_transaction","onlyIfCompatible","idbMode","SubTransaction","enterTransaction","InvalidTable","symbolObservable","observable","Observable","_subscribe","extendObservabilitySet","liveQuery","querier","observer","execute","exec","closed","accumMuts","currentObs","subscription","mutationListener","querying","startedListening","shouldNotify","doQuery","domDeps","mozIndexedDB","webkitIndexedDB","msIndexedDB","webkitIDBKeyRange","databaseName","exists","ignoreTransaction","async","generatorFn","spawn","currentTransaction","promiseOrFunction","optionalTimeout","semVer","maxKey","addEventListener","updatedParts","propagatingLocally","event_1","initCustomEvent","propagateLocally","updateParts","wasMe","BroadcastChannel","bc_1","changedParts","postMessage","onmessage","data","localStorage","setItem","trig","random","matchAll","includeUncontrolled","client","parse","newValue","swContainer","serviceWorker","propagateMessageLocally","BX"],"mappings":";;;;;CAAA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,IAAIA,OAAQ,GAAG,oBAAW;GACzBA,OAAQ,GAAGC,MAAM,CAACC,MAAM,IAAI,SAASF,QAAQ,CAACG,CAAC,EAAE;KAChD,KAAK,IAAIC,CAAC,EAAEC,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAGC,SAAS,CAACC,MAAM,EAAEH,CAAC,GAAGC,CAAC,EAAED,CAAC,EAAE,EAAE;OACpDD,CAAC,GAAGG,SAAS,CAACF,CAAC,CAAC;OAChB,KAAK,IAAII,CAAC,IAAIL,CAAC,EAAE,IAAIH,MAAM,CAACS,SAAS,CAACC,cAAc,CAACC,IAAI,CAACR,CAAC,EAAEK,CAAC,CAAC,EAAEN,CAAC,CAACM,CAAC,CAAC,GAAGL,CAAC,CAACK,CAAC,CAAC;;KAE7E,OAAON,CAAC;IACR;GACD,OAAOH,OAAQ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