text: /*! indexeddbshim - v3.6.3 - 2018-05-08 */
  
  !function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!u&&c)return c(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return o(n||e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){},{}],2:[function(e,t,n){var r,o;r=this,o=function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.ShimDOMException=void 0;var n={NONE:0,CAPTURING_PHASE:1,AT_TARGET:2,BUBBLING_PHASE:3};"undefined"==typeof DOMException?e.ShimDOMException=function(e,t){var n=new Error(e);return n.name=t,n}:e.ShimDOMException=DOMException;var r=new WeakMap,o=new WeakMap,i=function(e){this[Symbol.toStringTag]="Event",this.toString=function(){return"[object Event]"};var t=arguments[1],n=arguments[2];if(!arguments.length)throw new TypeError("Failed to construct 'Event': 1 argument required, but only 0 present.");t=t||{},n=n||{};var i={};"composed"in t&&(i.composed=t.composed),r.set(this,n),o.set(this,i),this.initEvent(e,t.bubbles,t.cancelable),Object.defineProperties(this,["target","currentTarget","eventPhase","defaultPrevented"].reduce(function(e,t){return e[t]={get:function(){return void 0!==i[t]?i[t]:t in n?n[t]:"eventPhase"===t?0:"defaultPrevented"!==t&&null}},e},{}));var a=["type","bubbles","cancelable","isTrusted","timeStamp","initEvent","composedPath","composed"];"[object CustomEvent]"===this.toString()&&a.push("detail","initCustomEvent"),Object.defineProperties(this,a.reduce(function(e,t){return e[t]={get:function(){return t in i?i[t]:t in n?n[t]:!["bubbles","cancelable","composed"].includes(t)&&void 0}},e},{}))};i.prototype.preventDefault=function(){if(!(this instanceof i))throw new TypeError("Illegal invocation");var e=r.get(this),t=o.get(this);this.cancelable&&!t._passive&&(t.defaultPrevented=!0,"function"==typeof e.preventDefault&&e.preventDefault())},i.prototype.stopImmediatePropagation=function(){o.get(this)._stopImmediatePropagation=!0},i.prototype.stopPropagation=function(){o.get(this)._stopPropagation=!0},i.prototype.initEvent=function(e,t,n){var r=o.get(this);r._dispatched||(r.type=e,void 0!==t&&(r.bubbles=t),void 0!==n&&(r.cancelable=n))},["type","target","currentTarget"].forEach(function(e){Object.defineProperty(i.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}})}),["eventPhase","defaultPrevented","bubbles","cancelable","timeStamp"].forEach(function(e){Object.defineProperty(i.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}})}),["NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE"].forEach(function(e,t){Object.defineProperty(i,e,{enumerable:!0,writable:!1,value:t}),Object.defineProperty(i.prototype,e,{writable:!1,value:t})}),i[Symbol.toStringTag]="Function",i.prototype[Symbol.toStringTag]="EventPrototype",Object.defineProperty(i,"prototype",{writable:!1});var a=function(e){var t=arguments[1],n=arguments[2];i.call(this,e,t,n),this[Symbol.toStringTag]="CustomEvent",this.toString=function(){return"[object CustomEvent]"},t=t||{},this.initCustomEvent(e,t.bubbles,t.cancelable,"detail"in t?t.detail:null)};function u(e,t,n){var r=e[t];void 0===r&&(e[t]=r=[]),n="boolean"==typeof n?{capture:n}:n||{};var o=JSON.stringify(n);return{listenersByTypeOptions:r.filter(function(e){return o===JSON.stringify(e.options)}),options:n,listenersByType:r}}Object.defineProperty(a.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:a}),a.prototype.initCustomEvent=function(e,t,n,r){if(!(this instanceof a))throw new TypeError("Illegal invocation");var i=o.get(this);a.call(this,e,{bubbles:t,cancelable:n,detail:r},arguments[4]),i._dispatched||(void 0!==r&&(i.detail=r),Object.defineProperty(this,"detail",{get:function(){return i.detail}}))},a[Symbol.toStringTag]="Function",a.prototype[Symbol.toStringTag]="CustomEventPrototype",Object.defineProperty(a.prototype,"detail",{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}}),Object.defineProperty(a,"prototype",{writable:!1});var c={addListener:function(e,t,n,r){var o=u(e,n,r),i=o.listenersByTypeOptions;r=o.options;var a=o.listenersByType;i.some(function(e){return e.listener===t})||a.push({listener:t,options:r})},removeListener:function(e,t,n,r){var o=u(e,n,r),i=o.listenersByType,a=JSON.stringify(o.options);i.some(function(r,o){if(r.listener===t&&a===JSON.stringify(r.options))return i.splice(o,1),i.length||delete e[n],!0})},hasListener:function(e,t,n,r){return u(e,n,r).listenersByTypeOptions.some(function(e){return e.listener===t})}};function s(){throw new TypeError("Illegal constructor")}Object.assign(s.prototype,["Early","","Late","Default"].reduce(function(t,n){return["add","remove","has"].forEach(function(r){t[r+n+"EventListener"]=function(t,o){var i=arguments[2];if(arguments.length<2)throw new TypeError("2 or more arguments required");if("string"!=typeof t)throw new e.ShimDOMException("UNSPECIFIED_EVENT_TYPE_ERR","UNSPECIFIED_EVENT_TYPE_ERR");o.handleEvent&&(o=o.handleEvent.bind(o));var a="_"+n.toLowerCase()+(""===n?"l":"L")+"isteners";return this[a]||Object.defineProperty(this,a,{value:{}}),c[r+"Listener"](this[a],o,t,i)}}),t},{})),Object.assign(s.prototype,{__setOptions:function(e){e=e||{},this._defaultSync=e.defaultSync,this._extraProperties=e.extraProperties||[],e.legacyOutputDidListenersThrowFlag&&(this._legacyOutputDidListenersThrowCheck=!0,this._extraProperties.push("__legacyOutputDidListenersThrowError"))},dispatchEvent:function(e){return this._dispatchEvent(e,!0)},_dispatchEvent:function(t,r){var u=this;["early","","late","default"].forEach(function(e){var t="_"+e+(""===e?"l":"L")+"isteners";u[t]||Object.defineProperty(u,t,{value:{}})});var c=o.get(t);if(c&&r&&c._dispatched)throw new e.ShimDOMException("The object is in an invalid state.","InvalidStateError");var s=void 0;c?s=t:(s=function(e){return"detail"in e?new a(e.type,{bubbles:e.bubbles,cancelable:e.cancelable,detail:e.detail},e):new i(e.type,{bubbles:e.bubbles,cancelable:e.cancelable},e)}(t),(c=o.get(s))._dispatched=!0,this._extraProperties.forEach(function(e){e in t&&(s[e]=t[e])}));var l=s.type;function f(){c.eventPhase=n.NONE,c.currentTarget=null,delete c._children}function d(){c._stopImmediatePropagation=void 0,c._stopPropagation=void 0,s.defaultPrevented&&c.cancelable||(c.eventPhase=n.AT_TARGET,s.target.invokeCurrentListeners(s.target._defaultListeners,s,l)),f()}var p=function(){return c._stopImmediatePropagation=void 0,c._stopPropagation=void 0,u._defaultSync?d():setTimeout(d,0),c.eventPhase=n.AT_TARGET,c._stopPropagation||(c._stopImmediatePropagation=void 0,c._stopPropagation=void 0,s.target.invokeCurrentListeners(s.target._lateListeners,s,l)),f(),!s.defaultPrevented};switch(r&&(c.target=this),s.eventPhase){default:case n.NONE:if(c.eventPhase=n.AT_TARGET,this.invokeCurrentListeners(this._earlyListeners,s,l),!this.__getParent)return c.eventPhase=n.AT_TARGET,this._dispatchEvent(s,!1);for(var _=this,y=this;_.__getParent&&null!==(_=_.__getParent());)c._children||(c._children=[]),c._children.push(y),y=_;return y._defaultSync=this._defaultSync,c.eventPhase=n.CAPTURING_PHASE,y._dispatchEvent(s,!1);case n.CAPTURING_PHASE:if(c._stopPropagation)return p();this.invokeCurrentListeners(this._listeners,s,l);var h=c._children&&c._children.length&&c._children.pop();return h&&h!==s.target||(c.eventPhase=n.AT_TARGET),h&&(h._defaultSync=this._defaultSync),(h||this)._dispatchEvent(s,!1);case n.AT_TARGET:return c._stopPropagation?p():(this.invokeCurrentListeners(this._listeners,s,l,!0),c.bubbles?(c.eventPhase=n.BUBBLING_PHASE,this._dispatchEvent(s,!1)):p());case n.BUBBLING_PHASE:if(c._stopPropagation)return p();var v=this.__getParent&&this.__getParent();return v?(v.invokeCurrentListeners(v._listeners,s,l,!0),v._defaultSync=this._defaultSync,v._dispatchEvent(s,!1)):p()}},invokeCurrentListeners:function(e,t,r,i){var a=this,c=o.get(t);c.currentTarget=this;var s=u(e,r,{}).listenersByType.concat(),l=s.length?1:0;return s.some(function(e,o){var u=i?a["on"+r]:null;if(c._stopImmediatePropagation)return!0;o===l&&"function"==typeof u&&a.tryCatch(t,function(){!1===u.call(t.currentTarget,t)&&t.preventDefault()});var s=e.options,f=s.once,d=s.passive,p=s.capture;if(c._passive=d,p&&t.target!==t.currentTarget&&t.eventPhase===n.CAPTURING_PHASE||t.eventPhase===n.AT_TARGET||!p&&t.target!==t.currentTarget&&t.eventPhase===n.BUBBLING_PHASE){var _=e.listener;a.tryCatch(t,function(){_.call(t.currentTarget,t)}),f&&a.removeEventListener(r,_,s)}}),this.tryCatch(t,function(){var e=i?a["on"+r]:null;"function"==typeof e&&s.length<2&&(!1===e.call(t.currentTarget,t)&&t.preventDefault())}),!t.defaultPrevented},tryCatch:function(e,t){try{t()}catch(t){this.triggerErrorEvent(t,e)}},triggerErrorEvent:function(e,n){var r=e;"string"==typeof e&&(r=new Error("Uncaught exception: "+e));var o=void 0,i=!1;"undefined"==typeof window||"undefined"==typeof ErrorEvent||window&&"object"===("undefined"==typeof window?"undefined":t(window))&&!window.dispatchEvent?(i=!0,o=function(){setTimeout(function(){throw r})}):o=function(){var t=new ErrorEvent("error",{error:e,message:r.message||"",filename:r.fileName||"",lineno:r.lineNumber||0,colno:r.columnNumber||0});window.dispatchEvent(t)},i&&this._legacyOutputDidListenersThrowCheck||o(),this._legacyOutputDidListenersThrowCheck&&(n.__legacyOutputDidListenersThrowError=r)}}),s.prototype[Symbol.toStringTag]="EventTargetPrototype",Object.defineProperty(s,"prototype",{writable:!1});var l=s,f={createInstance:function(e){function t(){this.__setOptions(e)}return t.prototype=l.prototype,new t}};s.ShimEvent=i,s.ShimCustomEvent=a,s.ShimDOMException=e.ShimDOMException,s.ShimEventTarget=s,s.EventTargetFactory=f,e.setPrototypeOfCustomEvent=function(){Object.setPrototypeOf(a,i),Object.setPrototypeOf(a.prototype,i.prototype)},e.EventTargetFactory=f,e.ShimEventTarget=s,e.ShimEvent=i,e.ShimCustomEvent=a,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof n&&void 0!==t?o(n):"function"==typeof define&&define.amd?define(["exports"],o):o(r.EventTargeter={})},{}],3:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(e){return r.exec(e).slice(1)};function i(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}n.resolve=function(){for(var n="",r=!1,o=arguments.length-1;o>=-1&&!r;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,r="/"===a.charAt(0))}return n=t(i(n.split("/"),function(e){return!!e}),!r).join("/"),(r?"/":"")+n||"."},n.normalize=function(e){var r=n.isAbsolute(e),o="/"===a(e,-1);return(e=t(i(e.split("/"),function(e){return!!e}),!r).join("/"))||r||(e="."),e&&o&&(e+="/"),(r?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(i(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var o=r(e.split("/")),i=r(t.split("/")),a=Math.min(o.length,i.length),u=a,c=0;c<a;c++)if(o[c]!==i[c]){u=c;break}var s=[];for(c=u;c<o.length;c++)s.push("..");return(s=s.concat(i.slice(u))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){var t=o(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(e,t){var n=o(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return o(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:4}],4:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(e){o=u}}();var s,l=[],f=!1,d=-1;function p(){f&&s&&(f=!1,s.length?l=s.concat(l):d=-1,l.length&&_())}function _(){if(!f){var e=c(p);f=!0;for(var t=l.length;t;){for(s=l,l=[];++d<t;)s&&s[d].run();d=-1,t=l.length}s=null,f=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new y(e,t)),1!==l.length||f||c(_)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],5:[function(e,t,n){function r(e){return e&&"function"==typeof e.then}function o(e,t){e.then(null,t)}var i=2,a=0,u=1;function c(e){var t=this;function n(e,n){t.v=e,t.s=n,t.c[n].forEach(function(t){t(e)}),t.c[n].length&&(t.c=null)}function c(e){t.c&&(r(e)?o(e.then(c),c):n(e,u))}t.v=0,t.s=i,t.c=[[],[]];try{e(function e(i){t.c&&(r(i)?o(i.then(e),c):n(i,a))},c)}catch(e){c(e)}}var s=c.prototype;s.then=function(e,t){var n=this;return new c(function(r,o){var i="function"==typeof t?t:o;function c(){try{r(e?e(n.v):n.v)}catch(e){i(e)}}n.s===a?c():n.s===u?i(n.v):(n.c[a].push(c),n.c[u].push(i))})},s.catch=function(e){var t=this;return new c(function(n,r){function o(){try{n(e(t.v))}catch(e){r(e)}}t.s===u?o():t.s===a?n(t.v):(t.c[u].push(o),t.c[a].push(n))})},c.all=function(e){return new c(function(t,n,i){var a=[];(i=e.length)?e.forEach(function(u,c){r(u)?o(u.then(function(e){a[c]=e,--i||t(a)}),n):(a[c]=u,--i||t(e))}):t(a)})},c.race=function(e){var t=!1;return new c(function(n,i){e.some(function(e,a){if(!r(e))return n(e),t=!0,!0;o(e.then(function(e){t||(n(e),t=!0)}),i)})})},c.resolve=function(e){return new c(function(t,n){t(e)})},c.reject=function(e){return new c(function(t,n){n(e)})},t.exports=c},{}],6:[function(e,t,n){(function(e){var r,o;r=this,o=function(){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},o=Object.keys,i=Array.isArray,a={}.toString,u=Object.getPrototypeOf,c={}.hasOwnProperty,s=c.toString,l=["type","replaced","iterateIn","iterateUnsetNumeric"];function f(e,t){return h.isObject(e)&&"function"==typeof e.then&&(!t||"function"==typeof e.catch)}function d(e){return a.call(e).slice(8,-1)}function p(e,n){if(!e||"object"!==(void 0===e?"undefined":t(e)))return!1;var r=u(e);if(!r)return!1;var o=c.call(r,"constructor")&&r.constructor;return"function"!=typeof o?null===n:"function"==typeof o&&null!==n&&s.call(o)===s.call(n)}function _(e){return!(!e||"Object"!==d(e))&&(!u(e)||p(e,Object))}function y(e){return e&&"object"===(void 0===e?"undefined":t(e))}function h(e){var a=[],u=[],c={},s=this.types={},d=this.stringify=function(t,n,r,o){o=Object.assign({},e,o,{stringification:!0});var a=D(t,null,o);return i(a)?JSON.stringify(a[0],n,r):a.then(function(e){return JSON.stringify(e,n,r)})};this.stringifySync=function(e,t,n,r){return d(e,t,n,Object.assign({},{throwOnBadSyncType:!0},r,{sync:!0}))},this.stringifyAsync=function(e,t,n,r){return d(e,t,n,Object.assign({},{throwOnBadSyncType:!0},r,{sync:!1}))};var b=this.parse=function(t,n,r){return r=Object.assign({},e,r,{parse:!0}),w(JSON.parse(t,n),r)};this.parseSync=function(e,t,n){return b(e,t,Object.assign({},{throwOnBadSyncType:!0},n,{sync:!0}))},this.parseAsync=function(e,t,n){return b(e,t,Object.assign({},{throwOnBadSyncType:!0},n,{sync:!1}))},this.specialTypeNames=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.returnTypeNames=!0,this.encapsulate(e,t,n)},this.rootTypeName=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.iterateNone=!0,this.encapsulate(e,t,n)};var D=this.encapsulate=function(s,f,d){var v=(d=Object.assign({sync:!0},e,d)).sync,b={},m=[],E=[],D=[],w=!(d&&"cyclic"in d)||d.cyclic,O=d.encapsulateObserver,I=B("",s,w,f||{},D);function T(e){var t=Object.values(b);if(d.iterateNone)return t.length?t[0]:h.getJSONType(e);if(t.length){if(d.returnTypeNames)return[].concat(r(new Set(t)));e&&_(e)&&!e.hasOwnProperty("$types")?e.$types=b:e={$:e,$types:{$:b}}}else y(e)&&e.hasOwnProperty("$types")&&(e={$:e,$types:!0});return!d.returnTypeNames&&e}return D.length?v&&d.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():Promise.resolve(function e(t,r){return Promise.all(r.map(function(e){return e[1].p})).then(function(o){return Promise.all(o.map(function(o){var i=[],a=r.splice(0,1)[0],u=n(a,7),c=u[0],s=u[2],l=u[3],f=u[4],d=u[5],_=u[6],y=B(c,o,s,l,i,!0,_),h=p(y,S);return c&&h?y.p.then(function(n){return f[d]=n,e(t,i)}):(c?f[d]=y:t=h?y.p:y,e(t,i))}))}).then(function(){return t})}(I,D)).then(T):!v&&d.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():d.stringification&&v?[T(I)]:v?T(I):Promise.resolve(T(I));function x(e,t,n){Object.assign(e,t);var r=l.map(function(t){var n=e[t];return delete e[t],n});n(),l.forEach(function(t,n){e[t]=r[n]})}function B(e,n,r,u,c,s,l){var f=void 0,y={},v=void 0===n?"undefined":t(n),D=O?function(t){var o=l||u.type||h.getJSONType(n);O(Object.assign(t||y,{keypath:e,value:n,cyclic:r,stateObj:u,promisesData:c,resolvingTypesonPromise:s,awaitingTypesonPromise:p(n,S)},void 0!==o?{type:o}:{}))}:null;if(v in{string:1,boolean:1,number:1,undefined:1})return void 0===n||"number"===v&&(isNaN(n)||n===-1/0||n===1/0)?(f=A(e,n,u,c,!1,s,D))!==n&&(y={replaced:f}):f=n,D&&D(),f;if(null===n)return D&&D(),n;if(r&&!u.iterateIn&&!u.iterateUnsetNumeric){var w=m.indexOf(n);if(!(w<0))return b[e]="#",D&&D({cyclicKeypath:E[w]}),"#"+E[w];!0===r&&(m.push(n),E.push(e))}var I=_(n),T=i(n),N=(I||T)&&(!a.length||u.replaced)||u.iterateIn?n:A(e,n,u,c,I||T,null,D),C=void 0;if(N!==n?(f=N,y={replaced:N}):T||"array"===u.iterateIn?(C=new Array(n.length),y={clone:C}):I||"object"===u.iterateIn?y={clone:C={}}:""===e&&p(n,S)?(c.push([e,n,r,u,void 0,void 0,u.type]),f=n):f=n,D&&D(),d.iterateNone)return C||f;if(!C)return f;if(u.iterateIn){var j=function(t){var o={ownKeys:n.hasOwnProperty(t)};x(u,o,function(){var o=e+(e?".":"")+g(t),i=B(o,n[t],!!r,u,c,s);p(i,S)?c.push([o,i,!!r,u,C,t,u.type]):void 0!==i&&(C[t]=i)})};for(var P in n)j(P);D&&D({endIterateIn:!0,end:!0})}else o(n).forEach(function(t){var o=e+(e?".":"")+g(t);x(u,{ownKeys:!0},function(){var e=B(o,n[t],!!r,u,c,s);p(e,S)?c.push([o,e,!!r,u,C,t,u.type]):void 0!==e&&(C[t]=e)})}),D&&D({endIterateOwn:!0,end:!0});if(u.iterateUnsetNumeric){for(var F=n.length,R=function(t){if(!(t in n)){var o=e+(e?".":"")+t;x(u,{ownKeys:!1},function(){var e=B(o,void 0,!!r,u,c,s);p(e,S)?c.push([o,e,!!r,u,C,t,u.type]):void 0!==e&&(C[t]=e)})}},L=0;L<F;L++)R(L);D&&D({endIterateUnsetNumeric:!0,end:!0})}return C}function A(e,t,n,r,o,i,s){for(var l=o?a:u,f=l.length;f--;){var d=l[f];if(d.test(t,n)){var p=d.type;if(c[p]){var _=b[e];b[e]=_?[p].concat(_):p}return Object.assign(n,{type:p,replaced:!0}),!v&&d.replaceAsync||d.replace?(s&&s({replacing:!0}),B(e,d[v||!d.replaceAsync?"replace":"replaceAsync"](t,n),w&&"readonly",n,r,i,p)):(s&&s({typeDetected:!0}),B(e,t,w&&"readonly",n,r,i,p))}}return t}};this.encapsulateSync=function(e,t,n){return D(e,t,Object.assign({},{throwOnBadSyncType:!0},n,{sync:!0}))},this.encapsulateAsync=function(e,t,n){return D(e,t,Object.assign({},{throwOnBadSyncType:!0},n,{sync:!1}))};var w=this.revive=function(t,r){var a=(r=Object.assign({sync:!0},e,r)).sync,u=t&&t.$types,s=!0;if(!u)return t;if(!0===u)return t.$;u.$&&_(u.$)&&(t=t.$,u=u.$,s=!1);var l=[],d={},y=function e(t,r,a,f,y,h){if(!s||"$types"!==t){var v=u[t];if(i(r)||_(r)){var b=i(r)?new Array(r.length):{};for(o(r).forEach(function(n){var o=e(t+(t?".":"")+g(n),r[n],a||b,f,b,n);p(o,E)?b[n]=void 0:void 0!==o&&(b[n]=o)}),r=b;l.length;){var S=n(l[0],4),D=S[0],w=S[1],O=S[2],I=S[3],T=m(D,w);if(p(T,E))O[I]=void 0;else{if(void 0===T)break;O[I]=T}l.splice(0,1)}}if(!v)return r;if("#"===v){var x=m(a,r.substr(1));return void 0===x&&l.push([a,r.substr(1),y,h]),x}var B=f.sync;return[].concat(v).reduce(function(e,t){var n=c[t];if(!n)throw new Error("Unregistered type: "+t);return n[B&&n.revive?"revive":!B&&n.reviveAsync?"reviveAsync":"revive"](e,d)},r)}}("",t,null,r);return f(y=p(y,E)?void 0:y)?a&&r.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():y:!a&&r.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():a?y:Promise.resolve(y)};this.reviveSync=function(e,t){return w(e,Object.assign({},{throwOnBadSyncType:!0},t,{sync:!0}))},this.reviveAsync=function(e,t){return w(e,Object.assign({},{throwOnBadSyncType:!0},t,{sync:!1}))},this.register=function(e,t){return t=t||{},[].concat(e).forEach(function e(n){if(i(n))return n.map(e);n&&o(n).forEach(function(e){if("#"===e)throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(h.JSON_TYPES.includes(e))throw new TypeError("Plain JSON object types are reserved as type names");var r=n[e],o=r.testPlainObjects?a:u,l=o.filter(function(t){return t.type===e});if(l.length&&(o.splice(o.indexOf(l[0]),1),delete c[e],delete s[e]),r){if("function"==typeof r){var f=r;r={test:function(e){return e&&e.constructor===f},replace:function(e){return v({},e)},revive:function(e){return v(Object.create(f.prototype),e)}}}else i(r)&&(r={test:r[0],replace:r[1],revive:r[2]});var d={type:e,test:r.test.bind(r)};r.replace&&(d.replace=r.replace.bind(r)),r.replaceAsync&&(d.replaceAsync=r.replaceAsync.bind(r));var p="number"==typeof t.fallback?t.fallback:t.fallback?0:1/0;if(r.testPlainObjects?a.splice(p,0,d):u.splice(p,0,d),r.revive||r.reviveAsync){var _={};r.revive&&(_.revive=r.revive.bind(r)),r.reviveAsync&&(_.reviveAsync=r.reviveAsync.bind(r)),c[e]=_}s[e]=r}})}),this}}function v(e,t){return o(t).map(function(n){e[n]=t[n]}),e}function g(e){return e.replace(/~/g,"~0").replace(/\./g,"~1")}function b(e){return e.replace(/~1/g,".").replace(/~0/g,"~")}function m(e,t){if(""===t)return e;var n=t.indexOf(".");if(n>-1){var r=e[b(t.substr(0,n))];return void 0===r?void 0:m(r,t.substr(n+1))}return e[b(t)]}function E(){}function S(e){this.p=new Promise(e)}S.prototype.then=function(e,t){var n=this;return new S(function(r,o){n.p.then(function(t){r(e?e(t):t)},function(e){n.p.catch(function(e){return t?t(e):Promise.reject(e)}).then(r,o)})})},S.prototype.catch=function(e){return this.then(null,e)},S.resolve=function(e){return new S(function(t){t(e)})},S.reject=function(e){return new S(function(t,n){n(e)})},["all","race"].map(function(e){S[e]=function(t){return new S(function(n,r){Promise[e](t.map(function(e){return e.p})).then(n,r)})}}),h.Undefined=E,h.Promise=S,h.isThenable=f,h.toStringTag=d,h.hasConstructorOf=p,h.isObject=y,h.isPlainObject=_,h.isUserObject=function e(t){if(!t||"Object"!==d(t))return!1;var n=u(t);return!n||p(t,Object)||e(n)},h.escapeKeyPathComponent=g,h.unescapeKeyPathComponent=b,h.getByKeyPath=m,h.getJSONType=function(e){return null===e?"null":i(e)?"array":void 0===e?"undefined":t(e)},h.JSON_TYPES=["null","boolean","number","string","array","object"];for(var D={userObject:{test:function(e,t){return h.isUserObject(e)},replace:function(e){return Object.assign({},e)},revive:function(e){return e}}},w=[[{sparseArrays:{testPlainObjects:!0,test:function(e){return Array.isArray(e)},replace:function(e,t){return t.iterateUnsetNumeric=!0,e}}},{sparseUndefined:{test:function(e,t){return void 0===e&&!1===t.ownKeys},replace:function(e){return null},revive:function(e){}}}],{undef:{test:function(e,t){return void 0===e&&(t.ownKeys||!("ownKeys"in t))},replace:function(e){return null},revive:function(e){return new h.Undefined}}}],O={StringObject:{test:function(e){return"String"===h.toStringTag(e)&&"object"===(void 0===e?"undefined":t(e))},replace:function(e){return String(e)},revive:function(e){return new String(e)}},BooleanObject:{test:function(e){return"Boolean"===h.toStringTag(e)&&"object"===(void 0===e?"undefined":t(e))},replace:function(e){return Boolean(e)},revive:function(e){return new Boolean(e)}},NumberObject:{test:function(e){return"Number"===h.toStringTag(e)&&"object"===(void 0===e?"undefined":t(e))},replace:function(e){return Number(e)},revive:function(e){return new Number(e)}}},I=[{nan:{test:function(e){return"number"==typeof e&&isNaN(e)},replace:function(e){return"NaN"},revive:function(e){return NaN}}},{infinity:{test:function(e){return e===1/0},replace:function(e){return"Infinity"},revive:function(e){return 1/0}}},{negativeInfinity:{test:function(e){return e===-1/0},replace:function(e){return"-Infinity"},revive:function(e){return-1/0}}}],T={date:{test:function(e){return"Date"===h.toStringTag(e)},replace:function(e){var t=e.getTime();return isNaN(t)?"NaN":t},revive:function(e){return"NaN"===e?new Date(NaN):new Date(e)}}},x={regexp:{test:function(e){return"RegExp"===h.toStringTag(e)},replace:function(e){return{source:e.source,flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")}},revive:function(e){var t=e.source,n=e.flags;return new RegExp(t,n)}}},B={map:{test:function(e){return"Map"===h.toStringTag(e)},replace:function(e){return Array.from(e.entries())},revive:function(e){return new Map(e)}}},A={set:{test:function(e){return"Set"===h.toStringTag(e)},replace:function(e){return Array.from(e.values())},revive:function(e){return new Set(e)}}},N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C=new Uint8Array(256),j=0;j<N.length;j++)C[N.charCodeAt(j)]=j;var P=function(e,t,n){for(var r=new Uint8Array(e,t,n),o=r.length,i="",a=0;a<o;a+=3)i+=N[r[a]>>2],i+=N[(3&r[a])<<4|r[a+1]>>4],i+=N[(15&r[a+1])<<2|r[a+2]>>6],i+=N[63&r[a+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},F=function(e){var t=e.length,n=.75*e.length,r=0,o=void 0,i=void 0,a=void 0,u=void 0;"="===e[e.length-1]&&(n--,"="===e[e.length-2]&&n--);for(var c=new ArrayBuffer(n),s=new Uint8Array(c),l=0;l<t;l+=4)o=C[e.charCodeAt(l)],i=C[e.charCodeAt(l+1)],a=C[e.charCodeAt(l+2)],u=C[e.charCodeAt(l+3)],s[r++]=o<<2|i>>4,s[r++]=(15&i)<<4|a>>2,s[r++]=(3&a)<<6|63&u;return c},R={arraybuffer:{test:function(e){return"ArrayBuffer"===h.toStringTag(e)},replace:function(e,t){t.buffers||(t.buffers=[]);var n=t.buffers.indexOf(e);return n>-1?{index:n}:(t.buffers.push(e),P(e))},revive:function(e,n){if(n.buffers||(n.buffers=[]),"object"===(void 0===e?"undefined":t(e)))return n.buffers[e.index];var r=F(e);return n.buffers.push(r),r}}},L="undefined"==typeof self?e:self,M={};["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"].forEach(function(e){var t=e,n=L[t];n&&(M[e.toLowerCase()]={test:function(e){return h.toStringTag(e)===t},replace:function(e,t){var n=e.buffer,r=e.byteOffset,o=e.length;t.buffers||(t.buffers=[]);var i=t.buffers.indexOf(n);return i>-1?{index:i,byteOffset:r,length:o}:(t.buffers.push(n),{encoded:P(n),byteOffset:r,length:o})},revive:function(e,t){t.buffers||(t.buffers=[]);var r=e.byteOffset,o=e.length,i=e.encoded,a=e.index,u=void 0;return"index"in e?u=t.buffers[a]:(u=F(i),t.buffers.push(u)),new n(u,r,o)}})});var q={dataview:{test:function(e){return"DataView"===h.toStringTag(e)},replace:function(e,t){var n=e.buffer,r=e.byteOffset,o=e.byteLength;t.buffers||(t.buffers=[]);var i=t.buffers.indexOf(n);return i>-1?{index:i,byteOffset:r,byteLength:o}:(t.buffers.push(n),{encoded:P(n),byteOffset:r,byteLength:o})},revive:function(e,t){t.buffers||(t.buffers=[]);var n=e.byteOffset,r=e.byteLength,o=e.encoded,i=e.index,a=void 0;return"index"in e?a=t.buffers[i]:(a=F(o),t.buffers.push(a)),new DataView(a,n,r)}}},k={IntlCollator:{test:function(e){return h.hasConstructorOf(e,Intl.Collator)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.Collator(e.locale,e)}},IntlDateTimeFormat:{test:function(e){return h.hasConstructorOf(e,Intl.DateTimeFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.DateTimeFormat(e.locale,e)}},IntlNumberFormat:{test:function(e){return h.hasConstructorOf(e,Intl.NumberFormat)},replace:function(e){return e.resolvedOptions()},revive:function(e){return new Intl.NumberFormat(e.locale,e)}}},K={file:{test:function(e){return"File"===h.toStringTag(e)},replace:function(e){var t=new XMLHttpRequest;if(t.open("GET",URL.createObjectURL(e),!1),200!==t.status&&0!==t.status)throw new Error("Bad Blob access: "+t.status);return t.send(),{type:e.type,stringContents:t.responseText,name:e.name,lastModified:e.lastModified}},revive:function(e){var t=e.name,n=e.type,r=e.stringContents,o=e.lastModified;return new File([r],t,{type:n,lastModified:o})},replaceAsync:function(e){return new h.Promise(function(t,n){if(e.isClosed)n(new Error("The File is closed"));else{var r=new FileReader;r.addEventListener("load",function(){t({type:e.type,stringContents:r.result,name:e.name,lastModified:e.lastModified})}),r.addEventListener("error",function(){n(r.error)}),r.readAsText(e)}})}}};return[D,w,O,I,T,x,{imagedata:{test:function(e){return"ImageData"===h.toStringTag(e)},replace:function(e){return{array:Array.from(e.data),width:e.width,height:e.height}},revive:function(e){return new ImageData(new Uint8ClampedArray(e.array),e.width,e.height)}}},{imagebitmap:{test:function(e){return"ImageBitmap"===h.toStringTag(e)||e&&e.dataset&&"ImageBitmap"===e.dataset.toStringTag},replace:function(e){var t=document.createElement("canvas");return t.getContext("2d").drawImage(e,0,0),t.toDataURL()},revive:function(e){var t=document.createElement("canvas"),n=t.getContext("2d"),r=document.createElement("img");return r.onload=function(){n.drawImage(r,0,0)},r.src=e,t},reviveAsync:function(e){var t=document.createElement("canvas"),n=t.getContext("2d"),r=document.createElement("img");return r.onload=function(){n.drawImage(r,0,0)},r.src=e,createImageBitmap(t)}}},K,{file:K.file,filelist:{test:function(e){return"FileList"===h.toStringTag(e)},replace:function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e.item(n);return t},revive:function(e){function t(){this._files=arguments[0],this.length=this._files.length}return t.prototype.item=function(e){return this._files[e]},t.prototype[Symbol.toStringTag]="FileList",new t(e)}}},{blob:{test:function(e){return"Blob"===h.toStringTag(e)},replace:function(e){var t=new XMLHttpRequest;if(t.open("GET",URL.createObjectURL(e),!1),200!==t.status&&0!==t.status)throw new Error("Bad Blob access: "+t.status);return t.send(),{type:e.type,stringContents:t.responseText}},revive:function(e){var t=e.type,n=e.stringContents;return new Blob([n],{type:t})},replaceAsync:function(e){return new h.Promise(function(t,n){if(e.isClosed)n(new Error("The Blob is closed"));else{var r=new FileReader;r.addEventListener("load",function(){t({type:e.type,stringContents:r.result})}),r.addEventListener("error",function(){n(r.error)}),r.readAsText(e)}})}}}].concat("function"==typeof Map?B:[],"function"==typeof Set?A:[],"function"==typeof ArrayBuffer?R:[],"function"==typeof Uint8Array?M:[],"function"==typeof DataView?q:[],"undefined"!=typeof Intl?k:[]).concat({checkDataCloneException:[function(e){var n={}.toString.call(e).slice(8,-1);if(["symbol","function"].includes(void 0===e?"undefined":t(e))||["Arguments","Module","Error","Promise","WeakMap","WeakSet"].includes(n)||e===Object.prototype||("Blob"===n||"File"===n)&&e.isClosed||e&&"object"===(void 0===e?"undefined":t(e))&&"number"==typeof e.nodeType&&"function"==typeof e.insertBefore)throw new DOMException("The object cannot be cloned.","DataCloneError");return!1}]})},"object"==typeof n&&void 0!==t?t.exports=o():"function"==typeof define&&define.amd?define(o):(r.Typeson=r.Typeson||{},r.Typeson.presets=r.Typeson.presets||{},r.Typeson.presets.structuredCloningThrowing=o())}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],7:[function(e,t,n){var r,o;r=this,o=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},n=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},r=Object.keys,o=Array.isArray,i={}.toString,a=Object.getPrototypeOf,u={}.hasOwnProperty,c=u.toString,s=["type","replaced","iterateIn","iterateUnsetNumeric"];function l(e,t){return y.isObject(e)&&"function"==typeof e.then&&(!t||"function"==typeof e.catch)}function f(e){return i.call(e).slice(8,-1)}function d(t,n){if(!t||"object"!==(void 0===t?"undefined":e(t)))return!1;var r=a(t);if(!r)return!1;var o=u.call(r,"constructor")&&r.constructor;return"function"!=typeof o?null===n:"function"==typeof o&&null!==n&&c.call(o)===c.call(n)}function p(e){return!(!e||"Object"!==f(e))&&(!a(e)||d(e,Object))}function _(t){return t&&"object"===(void 0===t?"undefined":e(t))}function y(i){var a=[],u=[],c={},f=this.types={},g=this.stringify=function(e,t,n,r){r=Object.assign({},i,r,{stringification:!0});var a=D(e,null,r);return o(a)?JSON.stringify(a[0],t,n):a.then(function(e){return JSON.stringify(e,t,n)})};this.stringifySync=function(e,t,n,r){return g(e,t,n,Object.assign({},{throwOnBadSyncType:!0},r,{sync:!0}))},this.stringifyAsync=function(e,t,n,r){return g(e,t,n,Object.assign({},{throwOnBadSyncType:!0},r,{sync:!1}))};var S=this.parse=function(e,t,n){return n=Object.assign({},i,n,{parse:!0}),w(JSON.parse(e,t),n)};this.parseSync=function(e,t,n){return S(e,t,Object.assign({},{throwOnBadSyncType:!0},n,{sync:!0}))},this.parseAsync=function(e,t,n){return S(e,t,Object.assign({},{throwOnBadSyncType:!0},n,{sync:!1}))},this.specialTypeNames=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.returnTypeNames=!0,this.encapsulate(e,t,n)},this.rootTypeName=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.iterateNone=!0,this.encapsulate(e,t,n)};var D=this.encapsulate=function(l,f,h){var g=(h=Object.assign({sync:!0},i,h)).sync,b={},m=[],S=[],D=[],w=!(h&&"cyclic"in h)||h.cyclic,O=h.encapsulateObserver,I=B("",l,w,f||{},D);function T(e){var t=Object.values(b);if(h.iterateNone)return t.length?t[0]:y.getJSONType(e);if(t.length){if(h.returnTypeNames)return[].concat(n(new Set(t)));e&&p(e)&&!e.hasOwnProperty("$types")?e.$types=b:e={$:e,$types:{$:b}}}else _(e)&&e.hasOwnProperty("$types")&&(e={$:e,$types:!0});return!h.returnTypeNames&&e}return D.length?g&&h.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():Promise.resolve(function e(n,r){return Promise.all(r.map(function(e){return e[1].p})).then(function(o){return Promise.all(o.map(function(o){var i=[],a=r.splice(0,1)[0],u=t(a,7),c=u[0],s=u[2],l=u[3],f=u[4],p=u[5],_=u[6],y=B(c,o,s,l,i,!0,_),h=d(y,E);return c&&h?y.p.then(function(t){return f[p]=t,e(n,i)}):(c?f[p]=y:n=h?y.p:y,e(n,i))}))}).then(function(){return n})}(I,D)).then(T):!g&&h.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():h.stringification&&g?[T(I)]:g?T(I):Promise.resolve(T(I));function x(e,t,n){Object.assign(e,t);var r=s.map(function(t){var n=e[t];return delete e[t],n});n(),s.forEach(function(t,n){e[t]=r[n]})}function B(t,n,i,u,c,s,l){var f=void 0,_={},g=void 0===n?"undefined":e(n),D=O?function(e){var r=l||u.type||y.getJSONType(n);O(Object.assign(e||_,{keypath:t,value:n,cyclic:i,stateObj:u,promisesData:c,resolvingTypesonPromise:s,awaitingTypesonPromise:d(n,E)},void 0!==r?{type:r}:{}))}:null;if(g in{string:1,boolean:1,number:1,undefined:1})return void 0===n||"number"===g&&(isNaN(n)||n===-1/0||n===1/0)?(f=A(t,n,u,c,!1,s,D))!==n&&(_={replaced:f}):f=n,D&&D(),f;if(null===n)return D&&D(),n;if(i&&!u.iterateIn&&!u.iterateUnsetNumeric){var w=m.indexOf(n);if(!(w<0))return b[t]="#",D&&D({cyclicKeypath:S[w]}),"#"+S[w];!0===i&&(m.push(n),S.push(t))}var I=p(n),T=o(n),N=(I||T)&&(!a.length||u.replaced)||u.iterateIn?n:A(t,n,u,c,I||T,null,D),C=void 0;if(N!==n?(f=N,_={replaced:N}):T||"array"===u.iterateIn?(C=new Array(n.length),_={clone:C}):I||"object"===u.iterateIn?_={clone:C={}}:""===t&&d(n,E)?(c.push([t,n,i,u,void 0,void 0,u.type]),f=n):f=n,D&&D(),h.iterateNone)return C||f;if(!C)return f;if(u.iterateIn){var j=function(e){var r={ownKeys:n.hasOwnProperty(e)};x(u,r,function(){var r=t+(t?".":"")+v(e),o=B(r,n[e],!!i,u,c,s);d(o,E)?c.push([r,o,!!i,u,C,e,u.type]):void 0!==o&&(C[e]=o)})};for(var P in n)j(P);D&&D({endIterateIn:!0,end:!0})}else r(n).forEach(function(e){var r=t+(t?".":"")+v(e);x(u,{ownKeys:!0},function(){var t=B(r,n[e],!!i,u,c,s);d(t,E)?c.push([r,t,!!i,u,C,e,u.type]):void 0!==t&&(C[e]=t)})}),D&&D({endIterateOwn:!0,end:!0});if(u.iterateUnsetNumeric){for(var F=n.length,R=function(e){if(!(e in n)){var r=t+(t?".":"")+e;x(u,{ownKeys:!1},function(){var t=B(r,void 0,!!i,u,c,s);d(t,E)?c.push([r,t,!!i,u,C,e,u.type]):void 0!==t&&(C[e]=t)})}},L=0;L<F;L++)R(L);D&&D({endIterateUnsetNumeric:!0,end:!0})}return C}function A(e,t,n,r,o,i,s){for(var l=o?a:u,f=l.length;f--;){var d=l[f];if(d.test(t,n)){var p=d.type;if(c[p]){var _=b[e];b[e]=_?[p].concat(_):p}return Object.assign(n,{type:p,replaced:!0}),!g&&d.replaceAsync||d.replace?(s&&s({replacing:!0}),B(e,d[g||!d.replaceAsync?"replace":"replaceAsync"](t,n),w&&"readonly",n,r,i,p)):(s&&s({typeDetected:!0}),B(e,t,w&&"readonly",n,r,i,p))}}return t}};this.encapsulateSync=function(e,t,n){return D(e,t,Object.assign({},{throwOnBadSyncType:!0},n,{sync:!0}))},this.encapsulateAsync=function(e,t,n){return D(e,t,Object.assign({},{throwOnBadSyncType:!0},n,{sync:!1}))};var w=this.revive=function(e,n){var a=(n=Object.assign({sync:!0},i,n)).sync,u=e&&e.$types,s=!0;if(!u)return e;if(!0===u)return e.$;u.$&&p(u.$)&&(e=e.$,u=u.$,s=!1);var f=[],_={},y=function e(n,i,a,l,y,h){if(!s||"$types"!==n){var g=u[n];if(o(i)||p(i)){var E=o(i)?new Array(i.length):{};for(r(i).forEach(function(t){var r=e(n+(n?".":"")+v(t),i[t],a||E,l,E,t);d(r,m)?E[t]=void 0:void 0!==r&&(E[t]=r)}),i=E;f.length;){var S=t(f[0],4),D=S[0],w=S[1],O=S[2],I=S[3],T=b(D,w);if(d(T,m))O[I]=void 0;else{if(void 0===T)break;O[I]=T}f.splice(0,1)}}if(!g)return i;if("#"===g){var x=b(a,i.substr(1));return void 0===x&&f.push([a,i.substr(1),y,h]),x}var B=l.sync;return[].concat(g).reduce(function(e,t){var n=c[t];if(!n)throw new Error("Unregistered type: "+t);return n[B&&n.revive?"revive":!B&&n.reviveAsync?"reviveAsync":"revive"](e,_)},i)}}("",e,null,n);return l(y=d(y,m)?void 0:y)?a&&n.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():y:!a&&n.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():a?y:Promise.resolve(y)};this.reviveSync=function(e,t){return w(e,Object.assign({},{throwOnBadSyncType:!0},t,{sync:!0}))},this.reviveAsync=function(e,t){return w(e,Object.assign({},{throwOnBadSyncType:!0},t,{sync:!1}))},this.register=function(e,t){return t=t||{},[].concat(e).forEach(function e(n){if(o(n))return n.map(e);n&&r(n).forEach(function(e){if("#"===e)throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(y.JSON_TYPES.includes(e))throw new TypeError("Plain JSON object types are reserved as type names");var r=n[e],i=r.testPlainObjects?a:u,s=i.filter(function(t){return t.type===e});if(s.length&&(i.splice(i.indexOf(s[0]),1),delete c[e],delete f[e]),r){if("function"==typeof r){var l=r;r={test:function(e){return e&&e.constructor===l},replace:function(e){return h({},e)},revive:function(e){return h(Object.create(l.prototype),e)}}}else o(r)&&(r={test:r[0],replace:r[1],revive:r[2]});var d={type:e,test:r.test.bind(r)};r.replace&&(d.replace=r.replace.bind(r)),r.replaceAsync&&(d.replaceAsync=r.replaceAsync.bind(r));var p="number"==typeof t.fallback?t.fallback:t.fallback?0:1/0;if(r.testPlainObjects?a.splice(p,0,d):u.splice(p,0,d),r.revive||r.reviveAsync){var _={};r.revive&&(_.revive=r.revive.bind(r)),r.reviveAsync&&(_.reviveAsync=r.reviveAsync.bind(r)),c[e]=_}f[e]=r}})}),this}}function h(e,t){return r(t).map(function(n){e[n]=t[n]}),e}function v(e){return e.replace(/~/g,"~0").replace(/\./g,"~1")}function g(e){return e.replace(/~1/g,".").replace(/~0/g,"~")}function b(e,t){if(""===t)return e;var n=t.indexOf(".");if(n>-1){var r=e[g(t.substr(0,n))];return void 0===r?void 0:b(r,t.substr(n+1))}return e[g(t)]}function m(){}function E(e){this.p=new Promise(e)}return E.prototype.then=function(e,t){var n=this;return new E(function(r,o){n.p.then(function(t){r(e?e(t):t)},function(e){n.p.catch(function(e){return t?t(e):Promise.reject(e)}).then(r,o)})})},E.prototype.catch=function(e){return this.then(null,e)},E.resolve=function(e){return new E(function(t){t(e)})},E.reject=function(e){return new E(function(t,n){n(e)})},["all","race"].map(function(e){E[e]=function(t){return new E(function(n,r){Promise[e](t.map(function(e){return e.p})).then(n,r)})}}),y.Undefined=m,y.Promise=E,y.isThenable=l,y.toStringTag=f,y.hasConstructorOf=d,y.isObject=_,y.isPlainObject=p,y.isUserObject=function e(t){if(!t||"Object"!==f(t))return!1;var n=a(t);return!n||d(t,Object)||e(n)},y.escapeKeyPathComponent=v,y.unescapeKeyPathComponent=g,y.getByKeyPath=b,y.getJSONType=function(t){return null===t?"null":o(t)?"array":void 0===t?"undefined":e(t)},y.JSON_TYPES=["null","boolean","number","string","array","object"],y},"object"==typeof n&&void 0!==t?t.exports=o():"function"==typeof define&&define.amd?define(o):r.Typeson=o()},{}],8:[function(e,t,n){t.exports=/[\xC0-\xC5\xC7-\xCF\xD1-\xD6\xD9-\xDD\xE0-\xE5\xE7-\xEF\xF1-\xF6\xF9-\xFD\xFF-\u010F\u0112-\u0125\u0128-\u0130\u0134-\u0137\u0139-\u013E\u0143-\u0148\u014C-\u0151\u0154-\u0165\u0168-\u017E\u01A0\u01A1\u01AF\u01B0\u01CD-\u01DC\u01DE-\u01E3\u01E6-\u01F0\u01F4\u01F5\u01F8-\u021B\u021E\u021F\u0226-\u0233\u0344\u0385\u0386\u0388-\u038A\u038C\u038E-\u0390\u03AA-\u03B0\u03CA-\u03CE\u03D3\u03D4\u0400\u0401\u0403\u0407\u040C-\u040E\u0419\u0439\u0450\u0451\u0453\u0457\u045C-\u045E\u0476\u0477\u04C1\u04C2\u04D0-\u04D3\u04D6\u04D7\u04DA-\u04DF\u04E2-\u04E7\u04EA-\u04F5\u04F8\u04F9\u0622-\u0626\u06C0\u06C2\u06D3\u0929\u0931\u0934\u0958-\u095F\u09CB\u09CC\u09DC\u09DD\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B48\u0B4B\u0B4C\u0B5C\u0B5D\u0B94\u0BCA-\u0BCC\u0C48\u0CC0\u0CC7\u0CC8\u0CCA\u0CCB\u0D4A-\u0D4C\u0DDA\u0DDC-\u0DDE\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u0F73\u0F75\u0F76\u0F78\u0F81\u0F93\u0F9D\u0FA2\u0FA7\u0FAC\u0FB9\u1026\u1B06\u1B08\u1B0A\u1B0C\u1B0E\u1B12\u1B3B\u1B3D\u1B40\u1B41\u1B43\u1E00-\u1E99\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FC1-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEE\u1FF2-\u1FF4\u1FF6-\u1FFC\u212B\u219A\u219B\u21AE\u21CD-\u21CF\u2204\u2209\u220C\u2224\u2226\u2241\u2244\u2247\u2249\u2260\u2262\u226D-\u2271\u2274\u2275\u2278\u2279\u2280\u2281\u2284\u2285\u2288\u2289\u22AC-\u22AF\u22E0-\u22E3\u22EA-\u22ED\u2ADC\u304C\u304E\u3050\u3052\u3054\u3056\u3058\u305A\u305C\u305E\u3060\u3062\u3065\u3067\u3069\u3070\u3071\u3073\u3074\u3076\u3077\u3079\u307A\u307C\u307D\u3094\u309E\u30AC\u30AE\u30B0\u30B2\u30B4\u30B6\u30B8\u30BA\u30BC\u30BE\u30C0\u30C2\u30C5\u30C7\u30C9\u30D0\u30D1\u30D3\u30D4\u30D6\u30D7\u30D9\u30DA\u30DC\u30DD\u30F4\u30F7-\u30FA\u30FE\uAC00-\uD7A3\uFB1D\uFB1F\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4E]|\uD804[\uDC9A\uDC9C\uDCAB\uDD2E\uDD2F\uDF4B\uDF4C]|\uD805[\uDCBB\uDCBC\uDCBE\uDDBA\uDDBB]|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/},{}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={},o={};["DEBUG","cacheDatabaseInstances","autoName","fullIDLSupport","checkOrigin","cursorPreloadPackSize","UnicodeIDStart","UnicodeIDContinue","avoidAutoShim","win","DEFAULT_DB_SIZE","useSQLiteIndexes","addNonIDBGlobals","replaceNonIDBGlobals","escapeDatabaseName","unescapeDatabaseName","databaseCharacterEscapeList","databaseNameLengthLimit","escapeNFDForDatabaseNames","addSQLiteExtension",["memoryDatabase",function(e){if(!/^(?::memory:|file::memory:(\?[^#]*)?(#.*)?)?$/.test(e))throw new TypeError('`memoryDatabase` must be the empty string, ":memory:", or a "file::memory:[?queryString][#hash] URL".')}],"deleteDatabaseFiles","databaseBasePath","sysDatabaseBasePath","sqlBusyTimeout","sqlTrace","sqlProfile","origin"].forEach(function(e){var t=void 0;Array.isArray(e)&&(t=e[1],e=e[0]),Object.defineProperty(o,e,{get:function(){return r[e]},set:function(n){t&&t(n),r[e]=n}})}),n.default=o,t.exports=n.default},{}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.webSQLErrback=n.createDOMException=n.ShimDOMException=n.findError=n.logError=void 0;var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./CFG"),a=(r=i)&&r.__esModule?r:{default:r};function u(e,t){return new DOMException.prototype.constructor(t,e||"DOMException")}var c={IndexSizeError:1,HierarchyRequestError:3,WrongDocumentError:4,InvalidCharacterError:5,NoModificationAllowedError:7,NotFoundError:8,NotSupportedError:9,InUseAttributeError:10,InvalidStateError:11,SyntaxError:12,InvalidModificationError:13,NamespaceError:14,InvalidAccessError:15,TypeMismatchError:17,SecurityError:18,NetworkError:19,AbortError:20,URLMismatchError:21,QuotaExceededError:22,TimeoutError:23,InvalidNodeTypeError:24,DataCloneError:25,EncodingError:0,NotReadableError:0,UnknownError:0,ConstraintError:0,DataError:0,TransactionInactiveError:0,ReadOnlyError:0,VersionError:0,OperationError:0,NotAllowedError:0},s={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};var l=function(){function e(e,t){this[Symbol.toStringTag]="DOMException",this._code=t in c?c[t]:s[t]||0,this._name=t||"Error",this._message=void 0===e?"":""+e,Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,writable:!0,value:this._code}),void 0!==t&&Object.defineProperty(this,"name",{configurable:!0,enumerable:!0,writable:!0,value:this._name}),void 0!==e&&Object.defineProperty(this,"message",{configurable:!0,enumerable:!1,writable:!0,value:this._message})}var t=function(){};return t.prototype=Object.create(Error.prototype),["name","message"].forEach(function(n){Object.defineProperty(t.prototype,n,{enumerable:!0,get:function(){if(!(this instanceof e||this instanceof t||this instanceof Error))throw new TypeError("Illegal invocation");return this["_"+n]}})}),Object.defineProperty(t.prototype,"code",{configurable:!0,enumerable:!0,get:function(){throw new TypeError("Illegal invocation")}}),e.prototype=new t,e.prototype[Symbol.toStringTag]="DOMExceptionPrototype",Object.defineProperty(e,"prototype",{writable:!1}),Object.keys(c).forEach(function(t){Object.defineProperty(e.prototype,t,{enumerable:!0,configurable:!1,value:c[t]}),Object.defineProperty(e,t,{enumerable:!0,configurable:!1,value:c[t]})}),Object.keys(s).forEach(function(t){Object.defineProperty(e.prototype,t,{enumerable:!0,configurable:!1,value:s[t]}),Object.defineProperty(e,t,{enumerable:!0,configurable:!1,value:s[t]})}),Object.defineProperty(e.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:e}),e}();function f(e,t,n){if(a.default.DEBUG){n&&n.message&&(n=n.message);var r="function"==typeof console.error?"error":"log";console[r](e+": "+t+". "+(n||"")),console.trace&&console.trace()}}function d(e){return e&&"object"===(void 0===e?"undefined":o(e))&&"string"==typeof e.name}var p=void 0,_=!1;try{d(p=u("test name","test message"))&&"test name"===p.name&&"test message"===p.message&&(_=!0)}catch(e){}var y=void 0,h=void 0;_?(n.ShimDOMException=h=DOMException,n.createDOMException=y=function(e,t,n){return f(e,t,n),u(e,t)}):(n.ShimDOMException=h=l,n.createDOMException=y=function(e,t,n){return f(e,t,n),function(e,t){return new l(t,e)}(e,t)}),n.logError=f,n.findError=function(e){var t=void 0;if(e){if(1===e.length)return e[0];for(var n=0;n<e.length;n++){var r=e[n];if(d(r))return r;r&&"string"==typeof r.message&&(t=r)}}return t},n.ShimDOMException=h,n.createDOMException=y,n.webSQLErrback=function(e){var t=void 0,n=void 0;switch(e.code){case 4:t="QuotaExceededError",n="The operation failed because there was not enough remaining storage space, or the storage quota was reached and the user declined to give more space to the database.";break;default:t="UnknownError",n="The operation failed for reasons unrelated to the database itself and not covered by any other errors."}n+=" ("+e.message+")--("+e.code+")";var r=y(t,n);return r.sqlError=e,r}},{"./CFG":9}],11:[function(e,t,n){"use strict";var r;function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(n,"__esModule",{value:!0});var i=!1,a={test:!0};if(Object.defineProperty)try{Object.defineProperty(a,"test",{enumerable:!1}),a.test&&(i=!0)}catch(e){}var u=function(){throw new TypeError("Illegal constructor")};u.prototype=(o(r={constructor:u,contains:function(e){if(!arguments.length)throw new TypeError("DOMStringList.contains must be supplied a value");return this._items.includes(e)},item:function(e){if(!arguments.length)throw new TypeError("DOMStringList.item must be supplied a value");return e<0||e>=this.length||!Number.isInteger(e)?null:this._items[e]},clone:function(){var e=u.__createInstance();return e._items=this._items.slice(),e._length=this.length,e.addIndexes(),e},addIndexes:function(){for(var e=0;e<this._items.length;e++)this[e]=this._items[e]},sortList:function(){return this._items.sort(),this.addIndexes(),this._items},forEach:function(e,t){this._items.forEach(e,t)},map:function(e,t){return this._items.map(e,t)},indexOf:function(e){return this._items.indexOf(e)},push:function(e){this._items.push(e),this._length++,this.sortList()},splice:function(){var e;for(var t in(e=this._items).splice.apply(e,arguments),this._length=this._items.length,this)t===String(parseInt(t,10))&&delete this[t];this.sortList()}},Symbol.toStringTag,"DOMStringListPrototype"),o(r,Symbol.iterator,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t<this._items.length)){e.next=6;break}return e.next=4,this._items[t++];case 4:e.next=1;break;case 6:case"end":return e.stop()}},e,this)})),r),Object.defineProperty(u,Symbol.hasInstance,{value:function(e){return"DOMStringListPrototype"==={}.toString.call(e)}});var c=u;if(Object.defineProperty(u,"__createInstance",{value:function(){var e=function(){this.toString=function(){return"[object DOMStringList]"},Object.defineProperty(this,"length",{enumerable:!0,get:function(){return this._length}}),this._items=[],this._length=0};return e.prototype=c.prototype,new e}}),i){Object.defineProperty(u,"prototype",{writable:!1});["addIndexes","sortList","forEach","map","indexOf","push","splice","constructor","__createInstance"].forEach(function(e){Object.defineProperty(u.prototype,e,{enumerable:!1})}),Object.defineProperty(u.prototype,"length",{configurable:!0,enumerable:!0,get:function(){throw new TypeError("Illegal invocation")}});["_items","_length"].forEach(function(e){Object.defineProperty(u.prototype,e,{enumerable:!1,writable:!0})})}n.default=u,t.exports=n.default},{}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ShimEventTarget=n.ShimCustomEvent=n.ShimEvent=n.createEvent=void 0;var r=e("eventtargeter"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("./util"));Object.defineProperty(r.ShimEvent,Symbol.hasInstance,{value:function(e){return o.isObj(e)&&"target"in e&&"boolean"==typeof e.bubbles}}),n.createEvent=function(e,t,n){var o=new r.ShimEvent(e,n);return o.debug=t,o},n.ShimEvent=r.ShimEvent,n.ShimCustomEvent=r.ShimCustomEvent,n.ShimEventTarget=r.ShimEventTarget},{"./util":27,eventtargeter:2}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.IDBCursorWithValue=n.IDBCursor=void 0;var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=e("./IDBRequest"),i=h(e("./IDBObjectStore")),a=e("./DOMException"),u=e("./IDBKeyRange"),c=e("./IDBFactory"),s=y(e("./util")),l=h(e("./IDBTransaction")),f=y(e("./Key")),d=y(e("./Sca")),p=h(e("./IDBIndex")),_=h(e("./CFG"));function y(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function h(e){return e&&e.__esModule?e:{default:e}}function v(){throw new TypeError("Illegal constructor")}var g=v;function b(){throw new TypeError("Illegal constructor")}v.__super=function(e,t,n,r,a,c,_){this[Symbol.toStringTag]="IDBCursor",s.defineReadonlyProperties(this,["key","primaryKey"]),i.default.__invalidStateIfDeleted(n),this.__indexSource=s.instanceOf(r,p.default),this.__indexSource&&p.default.__invalidStateIfDeleted(r),l.default.__assertActive(n.transaction);var y=(0,u.convertValueToKeyRange)(e);if(void 0!==t&&!["next","prev","nextunique","prevunique"].includes(t))throw new TypeError(t+"is not a valid cursor direction");Object.defineProperties(this,{source:{writable:!1,value:r},direction:{writable:!1,value:t||"next"}}),this.__key=void 0,this.__primaryKey=void 0,this.__store=n,this.__range=y,this.__req=o.IDBRequest.__createInstance(),this.__req.__source=r,this.__req.__transaction=this.__store.transaction,this.__keyColumnName=a,this.__valueColumnName=c,this.__keyOnly="key"===c,this.__valueDecoder=this.__keyOnly?f:d,this.__count=_,this.__prefetchedIndex=-1,this.__multiEntryIndex=!!this.__indexSource&&r.multiEntry,this.__unique=this.direction.includes("unique"),this.__sqlDirection=["prev","prevunique"].includes(this.direction)?"DESC":"ASC",void 0!==y&&(y.__lowerCached=void 0!==y.lower&&f.encode(y.lower,this.__multiEntryIndex),y.__upperCached=void 0!==y.upper&&f.encode(y.upper,this.__multiEntryIndex)),this.__gotValue=!0,this.continue()},v.__createInstance=function(){var e=g.__super;e.prototype=g.prototype;for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return new(Function.prototype.bind.apply(e,[null].concat(n)))},v.prototype.__find=function(){this.__multiEntryIndex?this.__findMultiEntry.apply(this,arguments):this.__findBasic.apply(this,arguments)},v.prototype.__findBasic=function(e,t,n,r,o,i){var a=void 0!==i;i=i||1;var c=this,l=s.sqlQuote(c.__keyColumnName),d=s.sqlQuote("key"),p=["SELECT * FROM",s.escapeStoreNameForSQL(c.__store.__currentName)],y=[];p.push("WHERE",l,"NOT NULL"),(0,u.setSQLForKeyRange)(c.__range,l,p,y,!0,!0);var h=c.__sqlDirection,v="ASC"===h?">":"<";void 0!==t&&(p.push("AND",d,v+"= ?"),y.push(f.encode(t))),void 0!==e?(p.push("AND",l,v+"= ?"),y.push(f.encode(e))):a&&void 0!==c.__key&&(p.push("AND",l,v+" ?"),y.push(f.encode(c.__key))),c.__count||(p.push("ORDER BY",l,h),"key"!==c.__keyColumnName&&(c.__unique?"prevunique"===c.direction&&p.push(",",d,"ASC"):p.push(",",d,h)),!c.__unique&&c.__indexSource&&p.push(",",s.sqlQuote(c.__valueColumnName),h),p.push("LIMIT",i)),p=p.join(" "),_.default.DEBUG&&console.log(p,y),n.executeSql(p,y,function(e,t){c.__count?r(void 0,t.rows.length,void 0):t.rows.length>1?(c.__prefetchedIndex=0,c.__prefetchedData=t.rows,_.default.DEBUG&&console.log("Preloaded "+c.__prefetchedData.length+" records for cursor"),c.__decode(t.rows.item(0),r)):1===t.rows.length?c.__decode(t.rows.item(0),r):(_.default.DEBUG&&console.log("Reached end of cursors"),r(void 0,void 0,void 0))},function(e,t){_.default.DEBUG&&console.log("Could not execute Cursor.continue",p,y),o(t)})},v.prototype.__findMultiEntry=function(e,t,n,r,o){var i=this;if(i.__prefetchedData&&i.__prefetchedData.length===i.__prefetchedIndex)return _.default.DEBUG&&console.log("Reached end of multiEntry cursor"),void r(void 0,void 0,void 0);var a=s.sqlQuote(i.__keyColumnName),u=["SELECT * FROM",s.escapeStoreNameForSQL(i.__store.__currentName)],c=[];u.push("WHERE",a,"NOT NULL"),i.__range&&void 0!==i.__range.lower&&Array.isArray(i.__range.upper)&&0===i.__range.upper.indexOf(i.__range.lower)&&(u.push("AND",a,"LIKE ? ESCAPE '^'"),c.push("%"+s.sqlLIKEEscape(i.__range.__lowerCached.slice(0,-1))+"%"));var l=i.__sqlDirection,d="ASC"===l?">":"<",p=s.sqlQuote("key");void 0!==t&&(u.push("AND",p,d+"= ?"),c.push(f.encode(t))),void 0!==e?(u.push("AND",a,d+"= ?"),c.push(f.encode(e))):void 0!==i.__key&&(u.push("AND",a,d+" ?"),c.push(f.encode(i.__key))),i.__count||(u.push("ORDER BY",a,l),i.__unique||"key"===i.__keyColumnName||u.push(",",s.sqlQuote("key"),l),!i.__unique&&i.__indexSource&&u.push(",",s.sqlQuote(i.__valueColumnName),l)),u=u.join(" "),_.default.DEBUG&&console.log(u,c),n.executeSql(u,c,function(e,t){if(t.rows.length>0){if(i.__count){for(var n=0,o=0;o<t.rows.length;o++){var a=t.rows.item(o),u=f.decode(a[i.__keyColumnName],!0);n+=f.findMultiEntryMatches(u,i.__range).length}return void r(void 0,n,void 0)}for(var c=[],s=0;s<t.rows.length;s++)for(var l=t.rows.item(s),d=f.decode(l[i.__keyColumnName],!0),p=f.findMultiEntryMatches(d,i.__range),y=0;y<p.length;y++){var h=p[y],v={matchingKey:f.encode(h,!0),key:l.key};v[i.__keyColumnName]=l[i.__keyColumnName],v[i.__valueColumnName]=l[i.__valueColumnName],c.push(v)}var g=0===i.direction.indexOf("prev");c.sort(function(e,t){return e.matchingKey.replace("[","z")<t.matchingKey.replace("[","z")?g?1:-1:e.matchingKey.replace("[","z")>t.matchingKey.replace("[","z")?g?-1:1:e.key<t.key?"prev"===i.direction?1:-1:e.key>t.key?"prev"===i.direction?-1:1:0}),c.length>1?(i.__prefetchedIndex=0,i.__prefetchedData={data:c,length:c.length,item:function(e){return this.data[e]}},_.default.DEBUG&&console.log("Preloaded "+i.__prefetchedData.length+" records for multiEntry cursor"),i.__decode(c[0],r)):1===c.length?(_.default.DEBUG&&console.log("Reached end of multiEntry cursor"),i.__decode(c[0],r)):(_.default.DEBUG&&console.log("Reached end of multiEntry cursor"),r(void 0,void 0,void 0))}else _.default.DEBUG&&console.log("Reached end of multiEntry cursor"),r(void 0,void 0,void 0)},function(e,t){_.default.DEBUG&&console.log("Could not execute Cursor.continue",u,c),o(t)})},v.prototype.__onsuccess=function(e){var t=this;return function(n,r,o){t.__count?e(r,t.__req):(void 0!==n&&(t.__gotValue=!0),t.__key=void 0===n?null:n,t.__primaryKey=void 0===o?null:o,t.__value=void 0===r?null:r,e(void 0===n?null:t,t.__req))}},v.prototype.__decode=function(e,t){var n=this;if(n.__multiEntryIndex&&n.__unique){if(n.__matchedKeys||(n.__matchedKeys={}),n.__matchedKeys[e.matchingKey])return void t(void 0,void 0,void 0);n.__matchedKeys[e.matchingKey]=!0}var r=s.unescapeSQLiteResponse(n.__multiEntryIndex?e.matchingKey:e[n.__keyColumnName]),o=s.unescapeSQLiteResponse(e[n.__valueColumnName]),i=s.unescapeSQLiteResponse(e.key);t(f.decode(r,n.__multiEntryIndex),n.__valueDecoder.decode(o),f.decode(i),r)},v.prototype.__sourceOrEffectiveObjStoreDeleted=function(){i.default.__invalidStateIfDeleted(this.__store,"The cursor's effective object store has been deleted"),this.__indexSource&&p.default.__invalidStateIfDeleted(this.source,"The cursor's index source has been deleted")},v.prototype.__invalidateCache=function(){this.__prefetchedData=null},v.prototype.__continue=function(e,t){var n=this,r=void 0!==n.__advanceCount;if(l.default.__assertActive(n.__store.transaction),n.__sourceOrEffectiveObjStoreDeleted(),!n.__gotValue&&!t)throw(0,a.createDOMException)("InvalidStateError","The cursor is being iterated or has iterated past its end.");if(void 0!==e){f.convertValueToKeyRethrowingAndIfInvalid(e);var o=(0,c.cmp)(e,n.key);if(0===o||n.direction.includes("next")&&-1===o||n.direction.includes("prev")&&1===o)throw(0,a.createDOMException)("DataError","Cannot "+(r?"advance":"continue")+" the cursor in an unexpected direction")}this.__continueFinish(e,void 0,r)},v.prototype.__continueFinish=function(e,t,n){var r=this,o=r.__advanceCount||_.default.cursorPreloadPackSize||100;r.__gotValue=!1,r.__req.__readyState="pending",r.__store.transaction.__pushToQueue(r.__req,function i(a,u,s,l,d){function p(e,t,o){if(n){if(r.__advanceCount>=2&&void 0!==e)return r.__advanceCount--,r.__key=e,r.__continue(void 0,!0),void d();r.__advanceCount=void 0}r.__onsuccess(s)(e,t,o)}r.__prefetchedData&&(r.__prefetchedIndex++,r.__prefetchedIndex<r.__prefetchedData.length)?r.__decode(r.__prefetchedData.item(r.__prefetchedIndex),function(n,o,d,_){var y;!r.__unique||r.__multiEntryIndex||_!==f.encode(r.key,r.__multiEntryIndex)?(y=void 0===e||(0,c.cmp)(n,e))>0||0===y&&(r.__unique||void 0===t||(0,c.cmp)(d,t)>=0)?p(n,o,d):i(a,u,s,l):i(a,u,s,l)}):r.__find(e,t,a,p,function(){r.__advanceCount=void 0,l.apply(void 0,arguments)},o)})},v.prototype.continue=function(){this.__continue(arguments[0])},v.prototype.continuePrimaryKey=function(e,t){var n=this;if(l.default.__assertActive(n.__store.transaction),n.__sourceOrEffectiveObjStoreDeleted(),!n.__indexSource)throw(0,a.createDOMException)("InvalidAccessError","`continuePrimaryKey` may only be called on an index source.");if(!["next","prev"].includes(n.direction))throw(0,a.createDOMException)("InvalidAccessError","`continuePrimaryKey` may not be called with unique cursors.");if(!n.__gotValue)throw(0,a.createDOMException)("InvalidStateError","The cursor is being iterated or has iterated past its end.");f.convertValueToKeyRethrowingAndIfInvalid(e),f.convertValueToKeyRethrowingAndIfInvalid(t);var r=(0,c.cmp)(e,n.key);if("next"===n.direction&&-1===r||"prev"===n.direction&&1===r)throw(0,a.createDOMException)("DataError","Cannot continue the cursor in an unexpected direction");function o(){n.__continueFinish(e,t,!1)}0===r?d.encode(t,function(e){d.encode(n.primaryKey,function(t){if(e===t||"next"===n.direction&&e<t||"prev"===n.direction&&e>t)throw(0,a.createDOMException)("DataError","Cannot continue the cursor in an unexpected direction");o()})}):o()},v.prototype.advance=function(e){if(0===(e=s.enforceRange(e,"unsigned long")))throw new TypeError("Calling advance() with count argument 0");this.__gotValue&&(this.__advanceCount=e),this.__continue()},v.prototype.update=function(e){var t=this;if(!arguments.length)throw new TypeError("A value must be passed to update()");if(l.default.__assertActive(t.__store.transaction),t.__store.transaction.__assertWritable(),t.__sourceOrEffectiveObjStoreDeleted(),!t.__gotValue)throw(0,a.createDOMException)("InvalidStateError","The cursor is being iterated or has iterated past its end.");if(t.__keyOnly)throw(0,a.createDOMException)("InvalidStateError","This cursor method cannot be called when the key only flag has been set.");var n=t.__store.transaction.__createRequest(t),o=t.primaryKey;function u(e){i.default.__storingRecordObjectStore(n,t.__store,!1,e,!1,o)}if(null!==t.__store.keyPath){var s=t.__store.__validateKeyAndValueAndCloneValue(e,void 0,!0),f=r(s,2),p=f[0],_=f[1];if(0!==(0,c.cmp)(t.primaryKey,p))throw(0,a.createDOMException)("DataError","The key of the supplied value to `update` is not equal to the cursor's effective key");u(_)}else{u(d.clone(e))}return n},v.prototype.delete=function(){var e=this;if(l.default.__assertActive(e.__store.transaction),e.__store.transaction.__assertWritable(),e.__sourceOrEffectiveObjStoreDeleted(),!e.__gotValue)throw(0,a.createDOMException)("InvalidStateError","The cursor is being iterated or has iterated past its end.");if(e.__keyOnly)throw(0,a.createDOMException)("InvalidStateError","This cursor method cannot be called when the key only flag has been set.");return this.__store.transaction.__addToTransactionQueue(function(t,n,r,o){e.__find(void 0,void 0,t,function(n,i,a){var u="DELETE FROM  "+s.escapeStoreNameForSQL(e.__store.__currentName)+' WHERE "key" = ?';_.default.DEBUG&&console.log(u,n,a),t.executeSql(u,[s.escapeSQLiteStatement(f.encode(a))],function(e,t){1===t.rowsAffected?r(void 0):o("No rows with key found"+n)},function(e,t){o(t)})},o)},void 0,e)},v.prototype[Symbol.toStringTag]="IDBCursorPrototype",["source","direction","key","primaryKey"].forEach(function(e){Object.defineProperty(v.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}})}),Object.defineProperty(v,"prototype",{writable:!1}),b.prototype=Object.create(v.prototype),Object.defineProperty(b.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:b});var m=b;b.__createInstance=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];function r(){var e;(e=v.__super).call.apply(e,[this].concat(t)),this[Symbol.toStringTag]="IDBCursorWithValue",s.defineReadonlyProperties(this,"value")}return r.prototype=m.prototype,new r},Object.defineProperty(b.prototype,"value",{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}}),b.prototype[Symbol.toStringTag]="IDBCursorWithValuePrototype",Object.defineProperty(b,"prototype",{writable:!1}),n.IDBCursor=v,n.IDBCursorWithValue=b},{"./CFG":9,"./DOMException":10,"./IDBFactory":15,"./IDBIndex":16,"./IDBKeyRange":17,"./IDBObjectStore":18,"./IDBRequest":19,"./IDBTransaction":20,"./Key":22,"./Sca":23,"./util":27}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./DOMException"),o=e("./Event"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("./util")),a=f(e("./DOMStringList")),u=f(e("./IDBObjectStore")),c=f(e("./IDBTransaction")),s=f(e("./CFG")),l=e("eventtargeter");function f(e){return e&&e.__esModule?e:{default:e}}var d=["onabort","onclose","onerror","onversionchange"],p=["name","version","objectStoreNames"];function _(){throw new TypeError("Illegal constructor")}var y=_;_.__createInstance=function(e,t,n,r,o){function c(){var c=this;this[Symbol.toStringTag]="IDBDatabase",i.defineReadonlyProperties(this,p),this.__db=e,this.__closed=!1,this.__oldVersion=n,this.__version=r,this.__name=t,this.__upgradeTransaction=null,d.forEach(function(e){Object.defineProperty(c,e,{enumerable:!0,configurable:!0,get:function(){return this["__"+e]},set:function(t){this["__"+e]=t}})}),d.forEach(function(e){c[e]=null}),this.__setOptions({legacyOutputDidListenersThrowFlag:!0}),this.__transactions=[],this.__objectStores={},this.__objectStoreNames=a.default.__createInstance();for(var s={},l=function(e){var t=o.rows.item(e);s.name=t.name,s.keyPath=JSON.parse(t.keyPath),["autoInc","indexList"].forEach(function(e){s[e]=JSON.parse(t[e])}),s.idbdb=c;var n=u.default.__createInstance(s);c.__objectStores[n.name]=n,c.objectStoreNames.push(n.name)},f=0;f<o.rows.length;f++)l(f);this.__oldObjectStoreNames=this.objectStoreNames.clone()}return c.prototype=y.prototype,new c},_.prototype=l.EventTargetFactory.createInstance(),_.prototype[Symbol.toStringTag]="IDBDatabasePrototype",_.prototype.createObjectStore=function(e){var t=arguments[1];if(e=String(e),!(this instanceof _))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No object store name was specified");c.default.__assertVersionChange(this.__versionTransaction),this.throwIfUpgradeTransactionNull(),c.default.__assertActive(this.__versionTransaction);var n=(t=Object.assign({},t)).keyPath;if(null!==(n=void 0===n?null:n=i.convertToSequenceDOMString(n))&&!i.isValidKeyPath(n))throw(0,r.createDOMException)("SyntaxError","The keyPath argument contains an invalid key path.");if(this.__objectStores[e]&&!this.__objectStores[e].__pendingDelete)throw(0,r.createDOMException)("ConstraintError",'Object store "'+e+'" already exists in '+this.name);var o=t.autoIncrement;if(o&&(""===n||Array.isArray(n)))throw(0,r.createDOMException)("InvalidAccessError","With autoIncrement set, the keyPath argument must not be an array or empty string.");var a={name:e,keyPath:n,autoInc:o,indexList:{},idbdb:this},s=u.default.__createInstance(a,this.__versionTransaction);return u.default.__createObjectStore(this,s)},_.prototype.deleteObjectStore=function(e){if(!(this instanceof _))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No object store name was specified");c.default.__assertVersionChange(this.__versionTransaction),this.throwIfUpgradeTransactionNull(),c.default.__assertActive(this.__versionTransaction);var t=this.__objectStores[e];if(!t)throw(0,r.createDOMException)("NotFoundError",'Object store "'+e+'" does not exist in '+this.name);u.default.__deleteObjectStore(this,t)},_.prototype.close=function(){if(!(this instanceof _))throw new TypeError("Illegal invocation");this.__closed=!0,this.__unblocking&&this.__unblocking.check()},_.prototype.transaction=function(e){var t=this;if(0===arguments.length)throw new TypeError("You must supply a valid `storeNames` to `IDBDatabase.transaction`");var n=arguments[1];if(e=i.isIterable(e)?[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(new Set(i.convertToSequenceDOMString(e)))).sort():[i.convertToDOMString(e)],"number"==typeof n?(n=1===n?"readwrite":"readonly",s.default.DEBUG&&console.log("Mode should be a string, but was specified as ",n)):n=n||"readonly",c.default.__assertNotVersionChange(this.__versionTransaction),this.__closed)throw(0,r.createDOMException)("InvalidStateError","An attempt was made to start a new transaction on a database connection that is not open");var o=a.default.__createInstance();if(e.forEach(function(e){if(!t.objectStoreNames.contains(e))throw(0,r.createDOMException)("NotFoundError",'The "'+e+'" object store does not exist');o.push(e)}),0===e.length)throw(0,r.createDOMException)("InvalidAccessError","No valid object store names were specified");if("readonly"!==n&&"readwrite"!==n)throw new TypeError("Invalid transaction mode: "+n);var u=c.default.__createInstance(this,o,n);return this.__transactions.push(u),u},_.prototype.throwIfUpgradeTransactionNull=function(){if(null===this.__upgradeTransaction)throw(0,r.createDOMException)("InvalidStateError","No upgrade transaction associated with database.")},_.prototype.__forceClose=function(e){var t=this;t.close();var n=0;t.__transactions.forEach(function(i){i.on__abort=function(){if(++n===t.__transactions.length){var e=(0,o.createEvent)("close");setTimeout(function(){t.dispatchEvent(e)})}},i.__abortTransaction((0,r.createDOMException)("AbortError","The connection was force-closed: "+(e||"")))})},d.forEach(function(e){Object.defineProperty(_.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")},set:function(e){throw new TypeError("Illegal invocation")}})}),p.forEach(function(e){Object.defineProperty(_.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}})}),Object.defineProperty(_.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:_}),Object.defineProperty(_,"prototype",{writable:!1}),n.default=_,t.exports=n.default},{"./CFG":9,"./DOMException":10,"./DOMStringList":11,"./Event":12,"./IDBObjectStore":18,"./IDBTransaction":20,"./util":27,eventtargeter:2}],15:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimIndexedDB=n.cmp=n.IDBFactory=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("./Event"),i=g(e("./IDBVersionChangeEvent")),a=e("./DOMException"),u=e("./IDBRequest"),c=g(e("./cmp")),s=g(e("./DOMStringList")),l=v(e("./util")),f=v(e("./Key")),d=g(e("./IDBTransaction")),p=g(e("./IDBDatabase")),_=g(e("./CFG")),y=g(e("sync-promise")),h=g(e("path"));function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}var b=function(){return _.default.origin||("object"===("undefined"==typeof location?"undefined":r(location))&&location?location.origin:"null")},m=function(){return!1!==_.default.checkOrigin&&"null"===b()},E={};function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b(),r=arguments[3];E[n][t]||(E[n][t]=[]),E[n][t].push({req:e,cb:r}),1===E[n][t].length&&function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b(),r=E[n][t];if(r[0]){var o=r[0],i=o.req,a=o.cb;i.addEventListener("success",u),i.addEventListener("error",u),a(i)}function u(){r.shift(),e(t,n)}}(t,n)}function D(e,t,n,r){var o=function(e){return e.__closed},a=function(){return e.every(o)};return e.reduce(function(e,t){return o(t)?e:e.then(function(){if(!o(t)){var e=new i.default("versionchange",{oldVersion:n,newVersion:r});return new y.default(function(n){setTimeout(function(){t.dispatchEvent(e),n()})})}})},y.default.resolve()).then(function(){if(!a())return new y.default(function(u){var c={check:function(){a()&&u()}},s=new i.default("blocked",{oldVersion:n,newVersion:r});setTimeout(function(){t.dispatchEvent(s),a()?u():e.forEach(function(e){o(e)||(e.__unblocking=c)})})})})}var w={},O=void 0,I=0;function T(e){return Object.keys(w[e]).map(Number).reduce(function(e,t){return t>e?t:e},0)}function x(n,r,o,i,a){if("string"==typeof _.default.memoryDatabase){var u=w[r]?function(e){return w[e]&&w[e][T(e)]}(r):null;if(!u)return console.warn("Could not find a memory database instance to delete."),void i();var c=u._db&&u._db._db;return c&&c.close?void c.close(function(e){e?console.warn("Error closing (destroying) memory database"):i()}):void console.error("The `openDatabase` implementation does not have the expected `._db._db.close` method for closing the database")}!1===_.default.deleteDatabaseFiles||"[object process]"!=={}.toString.call(t)?n(h.default.join(_.default.databaseBasePath||"",o),1,r,_.default.DEFAULT_DB_SIZE).transaction(function(e){e.executeSql('SELECT "name" FROM __sys__',[],function(e,t){var n=t.rows;!function t(r){r>=n.length?e.executeSql("DROP TABLE IF EXISTS __sys__",[],function(){i()},a):e.executeSql("DROP TABLE "+l.escapeStoreNameForSQL(l.unescapeSQLiteResponse(n.item(r).name)),[],function(){t(r+1)},function(){t(r+1)})}(0)},function(e){i()})}):e("fs").unlink(h.default.join(_.default.databaseBasePath||"",o),function(e){e&&"ENOENT"!==e.code?a({code:0,message:"Error removing database file: "+o+" "+e}):i()})}function B(e,t,n){function r(e,t){t=(0,a.webSQLErrback)(t||e),_.default.DEBUG&&console.log("Error in sysdb transaction - when creating dbVersions",t),n(t)}O?t():(O=e("string"==typeof _.default.memoryDatabase?_.default.memoryDatabase:h.default.join("string"==typeof _.default.sysDatabaseBasePath?_.default.sysDatabaseBasePath:_.default.databaseBasePath||"","__sysdb__"+(!1!==_.default.addSQLiteExtension?".sqlite":"")),1,"System Database",_.default.DEFAULT_DB_SIZE)).transaction(function(e){e.executeSql("CREATE TABLE IF NOT EXISTS dbVersions (name BLOB, version INT);",[],function(e){_.default.useSQLiteIndexes?e.executeSql("CREATE INDEX IF NOT EXISTS dbvname ON dbVersions(name)",[],t,r):t()},r)},r)}function A(){throw new TypeError("Illegal constructor")}var N=A;A.__createInstance=function(){function e(){this[Symbol.toStringTag]="IDBFactory",this.modules={Event:"undefined"!=typeof Event?Event:o.ShimEvent,Error:Error,ShimEvent:o.ShimEvent,ShimCustomEvent:o.ShimCustomEvent,ShimEventTarget:o.ShimEventTarget,ShimDOMException:a.ShimDOMException,ShimDOMStringList:s.default,IDBFactory:N},this.utils={createDOMException:a.createDOMException},this.__connections={}}return e.prototype=N.prototype,new e},A.prototype.open=function(e){var t=this;if(!(t instanceof A))throw new TypeError("Illegal invocation");var n=arguments[1];if(0===arguments.length)throw new TypeError("Database name is required");if(void 0!==n&&0===(n=l.enforceRange(n,"unsigned long long")))throw new TypeError("Version cannot be 0");if(m())throw(0,a.createDOMException)("SecurityError","Cannot open an IndexedDB database from an opaque origin.");var r=u.IDBOpenDBRequest.__createInstance(),c=!1;_.default.autoName&&""===e&&(e="autoNamedDatabase_"+I++),e=String(e);var s=l.escapeSQLiteStatement(e),f="string"==typeof _.default.memoryDatabase,y=!1!==_.default.cacheDatabaseInstances||f,v=void 0;try{v=l.escapeDatabaseNameForSQLAndFiles(e)}catch(e){throw e}function g(e,t){if(!c){t=t?(0,a.webSQLErrback)(t):e,c=!0;var n=(0,o.createEvent)("error",t,{bubbles:!0,cancelable:!0});r.__readyState="done",r.__error=t,r.__result=void 0,r.dispatchEvent(n)}}function b(u){var c=void 0;if((f||y)&&e in w&&w[e][n]?c=w[e][n]:(c=t.__openDatabase(f?_.default.memoryDatabase:h.default.join(_.default.databaseBasePath||"",v),1,e,_.default.DEFAULT_DB_SIZE),y&&(w[e][n]=c)),void 0===n&&(n=u||1),u>n){var l=(0,a.createDOMException)("VersionError","An attempt was made to open a database using a lower version than the existing version.",n);y?setTimeout(function(){g(l)}):g(l)}else c.transaction(function(l){l.executeSql("CREATE TABLE IF NOT EXISTS __sys__ (name BLOB, keyPath BLOB, autoInc BOOLEAN, indexList BLOB, currNum INTEGER)",[],function(){function f(){!function(u,c,l){u.executeSql('SELECT "name", "keyPath", "autoInc", "indexList" FROM __sys__',[],function(u,f){function _(){r.__result=h,r.__readyState="done"}var h=p.default.__createInstance(c,e,l,n,f);if(t.__connections[e]||(t.__connections[e]=[]),t.__connections[e].push(h),l<n)D(t.__connections[e].slice(0,-1),r,l,n).then(function(){var u=function(e,t,n){if(t)try{e.executeSql("ROLLBACK",[],n,n)}catch(e){O.transaction(function(e){function t(e){throw new Error("Unable to roll back upgrade transaction!"+(e||""))}0===l?e.executeSql('DELETE FROM dbVersions WHERE "name" = ?',[s],function(){n(t)},t):e.executeSql('UPDATE dbVersions SET "version" = ? WHERE "name" = ?',[l,s],n,t)})}else n()};O.transaction(function(c){function f(){var s=new i.default("upgradeneeded",{oldVersion:l,newVersion:n});r.__result=h,h.__upgradeTransaction=r.__transaction=r.__result.__versionTransaction=d.default.__createInstance(r.__result,r.__result.objectStoreNames,"versionchange"),r.__readyState="done",r.transaction.__addNonRequestToTransactionQueue(function(e,t,n,o){if(r.dispatchEvent(s),s.__legacyOutputDidListenersThrowError)return(0,a.logError)("Error","An error occurred in an upgradeneeded handler attached to request chain",s.__legacyOutputDidListenersThrowError),void r.transaction.__abortTransaction((0,a.createDOMException)("AbortError","A request was aborted."));n()}),r.transaction.on__beforecomplete=function(e){h.__upgradeTransaction=null,r.__result.__versionTransaction=null,u(c,!1,function(){r.transaction.__transFinishedCb(!1,function(){e.complete(),r.__transaction=null})})},r.transaction.on__preabort=function(){h.__upgradeTransaction=null,y&&e in w&&delete w[e][n]},r.transaction.on__abort=function(){r.__transaction=null,r.__result=void 0,r.__readyState="pending",h.close(),setTimeout(function(){var n=(0,a.createDOMException)("AbortError","The upgrade transaction was aborted.");u(c,n,function(r){0!==l?g(n):x(t.__openDatabase,e,v,g.bind(null,n),r||g)})})},r.transaction.on__complete=function(){if(r.__result.__closed)return r.__transaction=null,void g((0,a.createDOMException)("AbortError","The connection has been closed."));_(),r.__transaction=null;var e=(0,o.createEvent)("success");r.dispatchEvent(e)}}0===l?c.executeSql("INSERT INTO dbVersions VALUES (?,?)",[s,n],f,g):c.executeSql('UPDATE dbVersions SET "version" = ? WHERE "name" = ?',[n,s],f,g)},g,null,function(e,t,n,r,o){return!(!e.readOnly&&!t&&(u=function(e,t,n){t?r(t,n):o(n)},1))})});else{_();var b=(0,o.createEvent)("success");r.dispatchEvent(b)}},g)}(l,c,u)}_.default.createIndexes?l.executeSql("CREATE INDEX IF NOT EXISTS sysname ON __sys__(name)",[],f,g):f()},g)},g)}return S(r,e,void 0,function(n){var r=void 0;y&&(e in w||(w[e]={}),r=T(e)),r?b(r):B(t.__openDatabase,function(){O.readTransaction(function(e){e.executeSql('SELECT "version" FROM dbVersions WHERE "name" = ?',[s],function(e,t){0===t.rows.length?b(0):b(t.rows.item(0).version)},g)},g)},g)}),r},A.prototype.deleteDatabase=function(e){var t=this;if(!(t instanceof A))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("Database name is required");if(m())throw(0,a.createDOMException)("SecurityError","Cannot delete an IndexedDB database from an opaque origin.");e=String(e);var n=l.escapeSQLiteStatement(e),r=void 0;try{r=l.escapeDatabaseNameForSQLAndFiles(e)}catch(e){throw e}var c="string"==typeof _.default.memoryDatabase,s=!1!==_.default.cacheDatabaseInstances||c,f=u.IDBOpenDBRequest.__createInstance(),d=!1,p=0,y=function(e,t){t(e)};function h(e,t){d||!0===t||(t=(0,a.webSQLErrback)(t||e),y(!0,function(){f.__readyState="done",f.__error=t,f.__result=void 0;var e=(0,o.createEvent)("error",t,{bubbles:!0,cancelable:!0});f.dispatchEvent(e),d=!0}))}return S(f,e,void 0,function(o){B(t.__openDatabase,function(){function a(){o.__result=void 0,o.__readyState="done";var e=new i.default("success",{oldVersion:p,newVersion:null});o.dispatchEvent(e)}function u(){y(!1,function(){s&&e in w&&delete w[e],delete t.__connections[e],a()})}O.readTransaction(function(i){i.executeSql('SELECT "version" FROM dbVersions WHERE "name" = ?',[n],function(i,c){0!==c.rows.length?(p=c.rows.item(0).version,D(t.__connections[e]||[],o,p,null).then(function(){O.transaction(function(o){o.executeSql('DELETE FROM dbVersions WHERE "name" = ? ',[n],function(){x(t.__openDatabase,e,r,u,h)},h)},h,null,function(e,t,n,r,o){return!(!e.readOnly&&!t)||(y=function(e,t){e?r(e,t):o(t)},!1)})},h)):a()},h)})},h)}),f},A.prototype.cmp=function(e,t){if(!(this instanceof A))throw new TypeError("Illegal invocation");if(arguments.length<2)throw new TypeError("You must provide two keys to be compared");return f.convertValueToKeyRethrowingAndIfInvalid(e),f.convertValueToKeyRethrowingAndIfInvalid(t),(0,c.default)(e,t)},A.prototype.webkitGetDatabaseNames=function(){if(!(this instanceof A))throw new TypeError("Illegal invocation");if(m())throw(0,a.createDOMException)("SecurityError","Cannot get IndexedDB database names from an opaque origin.");var e=!1;function t(t,r){if(!e){r=r?(0,a.webSQLErrback)(r):t,e=!0;var i=(0,o.createEvent)("error",r,{bubbles:!0,cancelable:!0});n.__readyState="done",n.__error=r,n.__result=void 0,n.dispatchEvent(i)}}var n=u.IDBRequest.__createInstance();return B(this.__openDatabase,function(){O.readTransaction(function(e){e.executeSql('SELECT "name" FROM dbVersions',[],function(e,t){for(var r=s.default.__createInstance(),i=0;i<t.rows.length;i++)r.push(l.unescapeSQLiteResponse(t.rows.item(i).name));n.__result=r,n.__readyState="done";var a=(0,o.createEvent)("success");n.dispatchEvent(a)},t)},t)},t),n},A.prototype.__forceClose=function(e,t,n){var r=this;function o(e){e.__forceClose(n)}if(null==e)Object.values(r.__connections).forEach(function(e){return e.forEach(o)});else if(r.__connections[e])if(null==t)r.__connections[e].forEach(o);else{if(!Number.isInteger(t)||t<0||t>r.__connections[e].length-1)throw new TypeError("If providing an argument, __forceClose must be called with a numeric index to indicate a specific connection to lose");o(r.__connections[e][t])}else console.log("No database connections with that name to force close")},A.prototype.__setConnectionQueueOrigin=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b();E[e]={}},A.prototype[Symbol.toStringTag]="IDBFactoryPrototype",Object.defineProperty(A,"prototype",{writable:!1});var C=A.__createInstance();n.IDBFactory=A,n.cmp=c.default,n.shimIndexedDB=C}).call(this,e("_process"))},{"./CFG":9,"./DOMException":10,"./DOMStringList":11,"./Event":12,"./IDBDatabase":14,"./IDBRequest":19,"./IDBTransaction":20,"./IDBVersionChangeEvent":21,"./Key":22,"./cmp":25,"./util":27,_process:4,fs:1,path:3,"sync-promise":5}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.IDBIndex=n.executeFetchIndexData=n.buildFetchIndexDataSQL=void 0;var r=e("./DOMException"),o=e("./IDBCursor"),i=_(e("./util")),a=_(e("./Key")),u=e("./IDBKeyRange"),c=p(e("./IDBTransaction")),s=_(e("./Sca")),l=p(e("./CFG")),f=p(e("./IDBObjectStore")),d=p(e("sync-promise"));function p(e){return e&&e.__esModule?e:{default:e}}function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function y(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var h=["objectStore","keyPath","multiEntry","unique"];function v(){throw new TypeError("Illegal constructor")}var g=v;function b(e,t,n,r,o,u,c,f,d,p,_,y,h){t&&(e=1),e&&f.push("LIMIT",e);var v="count"===u;l.default.DEBUG&&console.log("Trying to fetch data for Index",f.join(" "),d),p.executeSql(f.join(" "),d,function(e,l){var f=[],d=0,p=v?function(){}:"key"===u?function(e){return a.decode(i.unescapeSQLiteResponse(e.key))}:function(e){return s.decode(i.unescapeSQLiteResponse(e.value))};if(n.multiEntry)for(var _=i.escapeIndexNameForSQLKeyColumn(n.name),h=a.encode(o,n.multiEntry),g=function(e){var n=l.rows.item(e),i=a.decode(n[_]),u=void 0;if(r&&(c&&o.some(function(e){return i.includes(e)})||a.isMultiEntryMatch(h,n[_]))?(d++,u=n):r||c||void 0!==i&&(d+=Array.isArray(i)?i.length:1,u=n),u&&(f.push(p(u)),t))return"break"},b=0;b<l.rows.length;b++){if("break"===g(b))break}else{for(b=0;b<l.rows.length;b++){var m=l.rows.item(b);m&&f.push(p(m))}d=f.length}y(v?d:0===d?t?void 0:[]:t?f[0]:f)},h)}function m(e,t,n,r,o){var c=e||null!=n,s="count"===r?"key":r,l=["SELECT",i.sqlQuote(s)+(t.multiEntry?", "+i.escapeIndexNameForSQL(t.name):""),"FROM",i.escapeStoreNameForSQL(t.objectStore.__currentName),"WHERE",i.escapeIndexNameForSQL(t.name),"NOT NULL"],f=[];if(c)if(o)l.push("AND ("),n.forEach(function(e,n){n>0&&l.push("OR"),l.push(i.escapeIndexNameForSQL(t.name),"LIKE ? ESCAPE '^' "),f.push("%"+i.sqlLIKEEscape(a.encode(e,t.multiEntry))+"%")}),l.push(")");else if(t.multiEntry)l.push("AND",i.escapeIndexNameForSQL(t.name),"LIKE ? ESCAPE '^'"),f.push("%"+i.sqlLIKEEscape(a.encode(n,t.multiEntry))+"%");else{var d=(0,u.convertValueToKeyRange)(n,e);(0,u.setSQLForKeyRange)(d,i.escapeIndexNameForSQL(t.name),l,f,!0,!1)}return[e,t,c,n,r,o,l,f]}v.__createInstance=function(e,t){function n(){var n=this;n[Symbol.toStringTag]="IDBIndex",i.defineReadonlyProperties(n,h),n.__objectStore=e,n.__name=n.__originalName=t.columnName,n.__keyPath=Array.isArray(t.keyPath)?t.keyPath.slice():t.keyPath;var o=t.optionalParams;n.__multiEntry=!(!o||!o.multiEntry),n.__unique=!(!o||!o.unique),n.__deleted=!!t.__deleted,n.__objectStore.__cursors=t.cursors||[],Object.defineProperty(n,"__currentName",{get:function(){return"__pendingName"in n?n.__pendingName:n.name}}),Object.defineProperty(n,"name",{enumerable:!1,configurable:!1,get:function(){return this.__name},set:function(t){var n=this;t=i.convertToDOMString(t);var o=n.name;if(c.default.__assertVersionChange(n.objectStore.transaction),c.default.__assertActive(n.objectStore.transaction),g.__invalidStateIfDeleted(n),f.default.__invalidStateIfDeleted(n),t!==o){if(n.objectStore.__indexes[t]&&!n.objectStore.__indexes[t].__deleted&&!n.objectStore.__indexes[t].__pendingDelete)throw(0,r.createDOMException)("ConstraintError",'Index "'+t+'" already exists on '+n.objectStore.__currentName);n.__name=t;var a=n.objectStore;delete a.__indexes[o],a.__indexes[t]=n,a.indexNames.splice(a.indexNames.indexOf(o),1,t);var u=a.transaction.__storeHandles[a.name],s=u.__indexHandles[o];s.__name=t,u.__indexHandles[t]=s,n.__pendingName=o;var l=[["key","BLOB "+(a.autoIncrement?"UNIQUE, inc INTEGER PRIMARY KEY AUTOINCREMENT":"PRIMARY KEY")],["value","BLOB"]].concat([].concat(y(a.indexNames)).filter(function(e){return e!==t}).map(function(e){return[i.escapeIndexNameForSQL(e),"BLOB"]}));n.__renameIndex(a,o,t,l,function(t,n){g.__updateIndexList(e,t,function(e){delete u.__pendingName,n(e)})})}}})}return n.prototype=g.prototype,new n},v.__invalidStateIfDeleted=function(e,t){if(e.__deleted||e.__pendingDelete||e.__pendingCreate&&e.objectStore.transaction&&e.objectStore.transaction.__errored)throw(0,r.createDOMException)("InvalidStateError",t||"This index has been deleted")},v.__clone=function(e,t){var n=v.__createInstance(t,{columnName:e.name,keyPath:e.keyPath,optionalParams:{multiEntry:e.multiEntry,unique:e.unique}});return["__pendingCreate","__pendingDelete","__deleted","__originalName","__recreated"].forEach(function(t){n[t]=e[t]}),n},v.__createIndex=function(e,t){var n=t.name,o=e.__currentName,u=e.__indexes[n];t.__pendingCreate=!0,e.indexNames.push(n),e.__indexes[n]=t;var c=e.__indexHandles[n];(!c||t.__pendingDelete||t.__deleted||c.__pendingDelete||c.__deleted)&&(c=e.__indexHandles[n]=v.__clone(t,e)),e.transaction.__addNonRequestToTransactionQueue(function(f,d,p,_){var y=u&&(u.__deleted||u.__recreated),h={};function g(e,t){_((0,r.createDOMException)("UnknownError",'Could not create index "'+n+'"'+t.code+"::"+t.message,t))}function b(u){v.__updateIndexList(e,u,function(){u.executeSql('SELECT "key", "value" FROM '+i.escapeStoreNameForSQL(o),[],function(u,f){l.default.DEBUG&&console.log("Adding existing "+o+" records to the "+n+" index"),function l(d){if(d<f.rows.length)try{var y=s.decode(i.unescapeSQLiteResponse(f.rows.item(d).value)),v=a.extractKeyValueDecodedFromValueUsingKeyPath(y,t.keyPath,t.multiEntry);if(v.invalid||v.failure)throw new Error("Go to catch; ignore bad indexKey");if(v=a.encode(v.value,t.multiEntry),t.unique){if(h[v])return h={},void _((0,r.createDOMException)("ConstraintError","Duplicate values already exist within the store"));h[v]=!0}u.executeSql("UPDATE "+i.escapeStoreNameForSQL(o)+" SET "+i.escapeIndexNameForSQL(n)+' = ? WHERE "key" = ?',[i.escapeSQLiteStatement(v),f.rows.item(d).key],function(e,t){l(d+1)},g)}catch(e){l(d+1)}else delete t.__pendingCreate,delete c.__pendingCreate,t.__deleted&&(delete t.__deleted,delete c.__deleted,t.__recreated=!0,c.__recreated=!0),h={},p(e)}(0)},g)},g)}var m=i.escapeStoreNameForSQL(o),E=i.escapeIndexNameForSQL(t.name);if(y)b(f);else{var S=["ALTER TABLE",m,"ADD",E,"BLOB"].join(" ");l.default.DEBUG&&console.log(S),f.executeSql(S,[],function(e){l.default.useSQLiteIndexes?e.executeSql('CREATE INDEX IF NOT EXISTS "'+m.slice(1,-1)+"^5"+E.slice(1,-1)+'" ON '+m+"("+E+")",[],b,g):b(e)},g)}},void 0,e)},v.__deleteIndex=function(e,t){t.__pendingDelete=!0;var n=e.__indexHandles[t.name];n&&(n.__pendingDelete=!0),e.indexNames.splice(e.indexNames.indexOf(t.name),1),e.transaction.__addNonRequestToTransactionQueue(function(o,a,u,c){function s(e,n){c((0,r.createDOMException)("UnknownError",'Could not delete index "'+t.name+'"',n))}function f(){v.__updateIndexList(e,o,function(e){delete t.__pendingDelete,delete t.__recreated,t.__deleted=!0,n&&(n.__deleted=!0,delete n.__pendingDelete),u(e)},s)}l.default.useSQLiteIndexes?o.executeSql("DROP INDEX IF EXISTS "+i.sqlQuote(i.escapeStoreNameForSQL(e.name).slice(1,-1)+"^5"+i.escapeIndexNameForSQL(t.name).slice(1,-1)),[],f,s):f()},void 0,e)},v.__updateIndexList=function(e,t,n,r){for(var o={},a=0;a<e.indexNames.length;a++){var u=e.__indexes[e.indexNames[a]];o[u.name]={columnName:u.name,keyPath:u.keyPath,optionalParams:{unique:u.unique,multiEntry:u.multiEntry},deleted:!!u.deleted}}l.default.DEBUG&&console.log("Updating the index list for "+e.__currentName,o),t.executeSql('UPDATE __sys__ SET "indexList" = ? WHERE "name" = ?',[JSON.stringify(o),i.escapeSQLiteStatement(e.__currentName)],function(){n(e)},r)},v.prototype.__fetchIndexData=function(e,t,n,o){var a=this;if(void 0!==o&&(o=i.enforceRange(o,"unsigned long")),v.__invalidStateIfDeleted(a),f.default.__invalidStateIfDeleted(a.objectStore),a.objectStore.__deleted)throw(0,r.createDOMException)("InvalidStateError","This index's object store has been deleted");if(c.default.__assertActive(a.objectStore.transaction),n&&null==e)throw(0,r.createDOMException)("DataError","No key or range was specified");var u=m(n,a,e,t,!1);return a.objectStore.transaction.__addToTransactionQueue(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];b.apply(void 0,[o].concat(y(u),t))},void 0,a)},v.prototype.openCursor=function(){var e=Array.prototype.slice.call(arguments),t=e[0],n=e[1],r=o.IDBCursorWithValue.__createInstance(t,n,this.objectStore,this,i.escapeIndexNameForSQLKeyColumn(this.name),"value");return this.__objectStore.__cursors.push(r),r.__req},v.prototype.openKeyCursor=function(){var e=Array.prototype.slice.call(arguments),t=e[0],n=e[1],r=o.IDBCursor.__createInstance(t,n,this.objectStore,this,i.escapeIndexNameForSQLKeyColumn(this.name),"key");return this.__objectStore.__cursors.push(r),r.__req},v.prototype.get=function(e){if(!arguments.length)throw new TypeError("A parameter was missing for `IDBIndex.get`.");return this.__fetchIndexData(e,"value",!0)},v.prototype.getKey=function(e){if(!arguments.length)throw new TypeError("A parameter was missing for `IDBIndex.getKey`.");return this.__fetchIndexData(e,"key",!0)},v.prototype.getAll=function(){var e=Array.prototype.slice.call(arguments),t=e[0],n=e[1];return this.__fetchIndexData(t,"value",!1,n)},v.prototype.getAllKeys=function(){var e=Array.prototype.slice.call(arguments),t=e[0],n=e[1];return this.__fetchIndexData(t,"key",!1,n)},v.prototype.count=function(){var e=arguments[0];return i.instanceOf(e,u.IDBKeyRange)?o.IDBCursorWithValue.__createInstance(e,"next",this.objectStore,this,i.escapeIndexNameForSQLKeyColumn(this.name),"value",!0).__req:this.__fetchIndexData(e,"count",!1)},v.prototype.__renameIndex=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=e.__currentName,u=i.escapeStoreNameForSQL(a),c=i.escapeIndexNameForSQL(n),s=i.sqlQuote("tmp_"+i.escapeStoreNameForSQL(a).slice(1,-1)),f=r.map(function(e){return e[0]}),p=r.map(function(e){return e.join(" ")}),_=p.length?p.join(", ")+", ":"",y=f.length?f.join(", ")+", ":"";e.transaction.__addNonRequestToTransactionQueue(function(e,n,r,a){function p(e,t){a(t)}function h(){o?o(e,r):r()}var v="CREATE TABLE "+s+"("+_+c+" BLOB)";l.default.DEBUG&&console.log(v),e.executeSql(v,[],function(){var n="INSERT INTO "+s+"("+y+c+") SELECT "+y+i.escapeIndexNameForSQL(t)+" FROM "+u;l.default.DEBUG&&console.log(n),e.executeSql(n,[],function(){var t="DROP TABLE "+u;l.default.DEBUG&&console.log(t),e.executeSql(t,[],function(){var t="ALTER TABLE "+s+" RENAME TO "+u;l.default.DEBUG&&console.log(t),e.executeSql(t,[],function(e,t){if(l.default.useSQLiteIndexes){var n=f.slice(2).map(function(t){return new d.default(function(n,r){var o="CREATE INDEX "+i.sqlQuote(u.slice(1,-1)+"^5"+t.slice(1,-1))+" ON "+u+"("+t+")";l.default.DEBUG&&console.log(o),e.executeSql(o,[],n,function(e,t){r(t)})})});n.push(new d.default(function(t,n){var r=i.sqlQuote("sk_"+u.slice(1,-1)),o="DROP INDEX IF EXISTS "+r;l.default.DEBUG&&console.log(o),e.executeSql(o,[],function(){var o="CREATE INDEX "+r+" ON "+u+'("key")';l.default.DEBUG&&console.log(o),e.executeSql(o,[],t,function(e,t){n(t)})},function(e,t){n(t)})})),d.default.all(n).then(h,a)}else h()},p)},p)},p)},p)})},Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return i.isObj(e)&&"function"==typeof e.openCursor&&"boolean"==typeof e.multiEntry}}),h.forEach(function(e){Object.defineProperty(v.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}})}),Object.defineProperty(v.prototype,"name",{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")},set:function(e){throw new TypeError("Illegal invocation")}}),v.prototype[Symbol.toStringTag]="IDBIndexPrototype",Object.defineProperty(v,"prototype",{writable:!1}),n.buildFetchIndexDataSQL=m,n.executeFetchIndexData=b,n.IDBIndex=v,n.default=v},{"./CFG":9,"./DOMException":10,"./IDBCursor":13,"./IDBKeyRange":17,"./IDBObjectStore":18,"./IDBTransaction":20,"./Key":22,"./Sca":23,"./util":27,"sync-promise":5}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.convertValueToKeyRange=n.IDBKeyRange=n.setSQLForKeyRange=void 0;var r=e("./DOMException"),o=a(e("./Key")),i=a(e("./util"));function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function u(){throw new TypeError("Illegal constructor")}var c=u;u.__createInstance=function(e,t,n,i){function a(){if(this[Symbol.toStringTag]="IDBKeyRange",void 0===e&&void 0===t)throw(0,r.createDOMException)("DataError","Both arguments to the key range method cannot be undefined");var a=void 0,u=void 0;if(void 0!==e&&(a=o.roundTrip(e),o.convertValueToKeyRethrowingAndIfInvalid(e)),void 0!==t&&(u=o.roundTrip(t),o.convertValueToKeyRethrowingAndIfInvalid(t)),void 0!==e&&void 0!==t&&e!==t&&o.encode(e)>o.encode(t))throw(0,r.createDOMException)("DataError","`lower` must not be greater than `upper` argument in `bound()` call.");this.__lower=a,this.__upper=u,this.__lowerOpen=!!n,this.__upperOpen=!!i}return a.prototype=c.prototype,new a},u.prototype.includes=function(e){if(!i.isObj(this)||"boolean"!=typeof this.__lowerOpen)throw new TypeError("Illegal invocation");if(!arguments.length)throw new TypeError("IDBKeyRange.includes requires a key argument");return o.convertValueToKeyRethrowingAndIfInvalid(e),o.isKeyInRange(e,this)},u.only=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.only requires a value argument");return u.__createInstance(e,e,!1,!1)},u.lowerBound=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.lowerBound requires a value argument");return u.__createInstance(e,void 0,arguments[1],!0)},u.upperBound=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.upperBound requires a value argument");return u.__createInstance(void 0,e,!0,arguments[1])},u.bound=function(e,t){if(arguments.length<=1)throw new TypeError("IDBKeyRange.bound requires lower and upper arguments");return u.__createInstance(e,t,arguments[2],arguments[3])},u.prototype[Symbol.toStringTag]="IDBKeyRangePrototype",["lower","upper","lowerOpen","upperOpen"].forEach(function(e){Object.defineProperty(u.prototype,"__"+e,{enumerable:!1,configurable:!1,writable:!0}),Object.defineProperty(u.prototype,e,{enumerable:!0,configurable:!0,get:function(){if(!i.isObj(this)||"boolean"!=typeof this.__lowerOpen)throw new TypeError("Illegal invocation");return this["__"+e]}})}),Object.defineProperty(u,Symbol.hasInstance,{value:function(e){return i.isObj(e)&&"upper"in e&&"boolean"==typeof e.lowerOpen}}),Object.defineProperty(u,"prototype",{writable:!1}),n.setSQLForKeyRange=function(e,t,n,r,a,u){if(e&&(void 0!==e.lower||void 0!==e.upper)){a&&n.push("AND");var c=void 0,s=void 0,l=void 0!==e.lower,f=void 0!==e.upper;if(l&&(c=u?e.__lowerCached:o.encode(e.lower)),f&&(s=u?e.__upperCached:o.encode(e.upper)),l){if(r.push(i.escapeSQLiteStatement(c)),f&&c===s&&!e.lowerOpen&&!e.upperOpen)return void n.push(t,"=","?");n.push(t,e.lowerOpen?">":">=","?")}l&&f&&n.push("AND"),f&&(n.push(t,e.upperOpen?"<":"<=","?"),r.push(i.escapeSQLiteStatement(s)))}},n.IDBKeyRange=u,n.convertValueToKeyRange=function(e,t){if(i.instanceOf(e,u))return"[object IDBKeyRange]"!==!e.toString()?u.__createInstance(e.lower,e.upper,e.lowerOpen,e.upperOpen):e;if(null!=e)return o.convertValueToKeyRethrowingAndIfInvalid(e),u.only(e);if(t)throw(0,r.createDOMException)("DataError","No key or range was specified")},n.default=u},{"./DOMException":10,"./Key":22,"./util":27}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=e("./DOMException"),i=e("./IDBCursor"),a=e("./IDBKeyRange"),u=h(e("./DOMStringList")),c=y(e("./util")),s=y(e("./Key")),l=e("./IDBIndex"),f=h(e("./IDBTransaction")),d=y(e("./Sca")),p=h(e("./CFG")),_=h(e("sync-promise"));function y(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function h(e){return e&&e.__esModule?e:{default:e}}var v=["keyPath","indexNames","transaction","autoIncrement"];function g(){throw new TypeError("Illegal constructor")}var b=g;g.__createInstance=function(e,t){function n(){var n=this;n[Symbol.toStringTag]="IDBObjectStore",c.defineReadonlyProperties(this,v),n.__name=n.__originalName=e.name,n.__keyPath=Array.isArray(e.keyPath)?e.keyPath.slice():e.keyPath,n.__transaction=t,n.__idbdb=e.idbdb,n.__cursors=e.cursors||[],n.__autoIncrement=!!e.autoInc,n.__indexes={},n.__indexHandles={},n.__indexNames=u.default.__createInstance();var r=e.indexList;for(var i in r)if(r.hasOwnProperty(i)){var a=l.IDBIndex.__createInstance(n,r[i]);n.__indexes[a.name]=a,a.__deleted||n.indexNames.push(a.name)}n.__oldIndexNames=n.indexNames.clone(),Object.defineProperty(this,"__currentName",{get:function(){return"__pendingName"in this?this.__pendingName:this.name}}),Object.defineProperty(this,"name",{enumerable:!1,configurable:!1,get:function(){return this.__name},set:function(e){var t=this;e=c.convertToDOMString(e);var n=t.name;if(b.__invalidStateIfDeleted(t),f.default.__assertVersionChange(t.transaction),f.default.__assertActive(t.transaction),n!==e){if(t.__idbdb.__objectStores[e]&&!t.__idbdb.__objectStores[e].__pendingDelete)throw(0,o.createDOMException)("ConstraintError",'Object store "'+e+'" already exists in '+t.__idbdb.name);t.__name=e;var r=t.__idbdb.__objectStores[n];r.__name=e,t.__idbdb.__objectStores[e]=r,delete t.__idbdb.__objectStores[n],t.__idbdb.objectStoreNames.splice(t.__idbdb.objectStoreNames.indexOf(n),1,e);var i=t.transaction.__storeHandles[n];i.__name=e,t.transaction.__storeHandles[e]=i,t.__pendingName=n;var a='UPDATE __sys__ SET "name" = ? WHERE "name" = ?',u=[c.escapeSQLiteStatement(e),c.escapeSQLiteStatement(n)];p.default.DEBUG&&console.log(a,u),t.transaction.__addNonRequestToTransactionQueue(function(r,o,i,s){r.executeSql(a,u,function(r,o){var a="ALTER TABLE "+c.escapeStoreNameForSQL(n)+" RENAME TO "+c.escapeStoreNameForSQL(e);p.default.DEBUG&&console.log(a),r.executeSql(a,[],function(e,n){delete t.__pendingName,i()})},function(e,t){s(t)})})}}})}return n.prototype=b.prototype,new n},g.__clone=function(e,t){var n=g.__createInstance({name:e.__currentName,keyPath:Array.isArray(e.keyPath)?e.keyPath.slice():e.keyPath,autoInc:e.autoIncrement,indexList:{},idbdb:e.__idbdb,cursors:e.__cursors},t);return["__indexes","__indexNames","__oldIndexNames","__deleted","__pendingDelete","__pendingCreate","__originalName"].forEach(function(t){n[t]=e[t]}),n},g.__invalidStateIfDeleted=function(e,t){if(e.__deleted||e.__pendingDelete||e.__pendingCreate&&e.transaction&&e.transaction.__errored)throw(0,o.createDOMException)("InvalidStateError",t||"This store has been deleted")},g.__createObjectStore=function(e,t){var n=t.__currentName;t.__pendingCreate=!0,e.__objectStores[n]=t,e.objectStoreNames.push(n);var r=e.__versionTransaction,i=r.__storeHandles;return(!i[n]||i[n].__pendingDelete||i[n].__deleted)&&(i[n]=g.__clone(t,r)),r.__addNonRequestToTransactionQueue(function(e,r,i,a){function u(e,t){p.default.DEBUG&&console.log(t),a((0,o.createDOMException)("UnknownError",'Could not create object store "'+n+'"',t))}var s=c.escapeStoreNameForSQL(n),l=["CREATE TABLE",s,"(key BLOB",t.autoIncrement?"UNIQUE, inc INTEGER PRIMARY KEY AUTOINCREMENT":"PRIMARY KEY",", value BLOB)"].join(" ");p.default.DEBUG&&console.log(l),e.executeSql(l,[],function(e,r){function o(){var r=JSON.stringify(t.keyPath);e.executeSql("INSERT INTO __sys__ VALUES (?,?,?,?,?)",[c.escapeSQLiteStatement(n),r,t.autoIncrement,"{}",1],function(){delete t.__pendingCreate,delete t.__deleted,i(t)},u)}p.default.useSQLiteIndexes?e.executeSql("CREATE INDEX IF NOT EXISTS "+c.sqlQuote("sk_"+s.slice(1,-1))+" ON "+s+'("key")',[],o,u):o()},u)}),i[n]},g.__deleteObjectStore=function(e,t){t.__pendingDelete=!0,t.__indexNames=u.default.__createInstance(),e.objectStoreNames.splice(e.objectStoreNames.indexOf(t.__currentName),1);var n=e.__versionTransaction.__storeHandles[t.__currentName];n&&(n.__indexNames=u.default.__createInstance(),n.__pendingDelete=!0),e.__versionTransaction.__addNonRequestToTransactionQueue(function(e,r,i,a){function u(e,t){p.default.DEBUG&&console.log(t),a((0,o.createDOMException)("UnknownError","Could not delete ObjectStore",t))}e.executeSql('SELECT "name" FROM __sys__ WHERE "name" = ?',[c.escapeSQLiteStatement(t.__currentName)],function(e,r){r.rows.length>0&&e.executeSql("DROP TABLE "+c.escapeStoreNameForSQL(t.__currentName),[],function(){e.executeSql('DELETE FROM __sys__ WHERE "name" = ?',[c.escapeSQLiteStatement(t.__currentName)],function(){delete t.__pendingDelete,t.__deleted=!0,n&&(delete n.__pendingDelete,n.__deleted=!0),i()},u)},u)})})},g.prototype.__validateKeyAndValueAndCloneValue=function(e,t,n){var r=this;if(null!==r.keyPath){if(void 0!==t)throw(0,o.createDOMException)("DataError","The object store uses in-line keys and the key parameter was provided",r);var i=d.clone(e);if((t=s.extractKeyValueDecodedFromValueUsingKeyPath(i,r.keyPath)).invalid)throw(0,o.createDOMException)("DataError","KeyPath was specified, but key was invalid.");if(t.failure){if(!n){if(!r.autoIncrement)throw(0,o.createDOMException)("DataError","Could not evaluate a key from keyPath and there is no key generator");if(!s.checkKeyCouldBeInjectedIntoValue(i,r.keyPath))throw(0,o.createDOMException)("DataError","A key could not be injected into a value");return[void 0,i]}throw(0,o.createDOMException)("DataError","Could not evaluate a key from keyPath")}return[t.value,i]}if(void 0===t){if(!r.autoIncrement)throw(0,o.createDOMException)("DataError","The object store uses out-of-line keys and has no key generator and the key parameter was not provided.",r);t=void 0}else s.convertValueToKeyRethrowingAndIfInvalid(t);return[t,d.clone(e)]},g.prototype.__deriveKey=function(e,t,n,r,i){var a=this;function u(e){d.encode(n,function(t){t=d.decode(t),r(t,e)})}a.autoIncrement?void 0===n?s.generateKeyForStore(e,a,function(e,n,u){e?i((0,o.createDOMException)("ConstraintError","The key generator's current number has reached the maximum safe integer limit")):(null!==a.keyPath&&s.injectKeyIntoValueUsingKeyPath(t,n,a.keyPath),r(n,u))},i):s.possiblyUpdateKeyGenerator(e,a,n,u,i):u()},g.prototype.__insertData=function(e,t,n,r,i,a,u){var f=this,d={},y=Object.keys(f.__indexes).map(function(t){return new _.default(function(r,i){var a=f.__indexes[t];if(a.__pendingCreate||a.__deleted)r();else{var u=void 0;try{if((u=s.extractKeyValueDecodedFromValueUsingKeyPath(n,a.keyPath,a.multiEntry)).invalid||u.failure)throw new Error("Go to catch")}catch(e){return void r()}if(u=u.value,a.unique){var c=a.multiEntry&&Array.isArray(u),p=(0,l.buildFetchIndexDataSQL)(!0,a,u,"key",c);l.executeFetchIndexData.apply(void 0,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(p),[e,null,function(e){if(void 0===e)return _(a),void r();i((0,o.createDOMException)("ConstraintError","Index already contains a record equal to "+(c?"one of the subkeys of":"")+"`indexKey`"))},i]))}else _(a),r()}function _(e){void 0!==u&&(d[e.__currentName]=s.encode(u,e.multiEntry))}})});_.default.all(y).then(function(){var n=["INSERT INTO",c.escapeStoreNameForSQL(f.__currentName),"("],i=[" VALUES ("],l=[];for(var _ in void 0!==r&&(n.push(c.sqlQuote("key"),","),i.push("?,"),l.push(c.escapeSQLiteStatement(s.encode(r)))),d)n.push(c.escapeIndexNameForSQL(_)+","),i.push("?,"),l.push(c.escapeSQLiteStatement(d[_]));n.push(c.sqlQuote("value")+" )"),i.push("?)"),l.push(c.escapeSQLiteStatement(t));var y=n.join(" ")+i.join(" ");p.default.DEBUG&&console.log("SQL for adding",y,l),e.executeSql(y,l,function(e,t){a(r)},function(e,t){u((0,o.createDOMException)("ConstraintError",t.message,t))})}).catch(function(t){function n(){u(t)}"number"!=typeof i?n():s.assignCurrentNumber(e,f,i,n,n)})},g.prototype.add=function(e){var t=this,n=arguments[1];if(!(t instanceof g))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No value was specified");g.__invalidStateIfDeleted(t),f.default.__assertActive(t.transaction),t.transaction.__assertWritable();var o=t.transaction.__createRequest(t),i=t.__validateKeyAndValueAndCloneValue(e,n,!1),a=r(i,2),u=a[0],c=a[1];return g.__storingRecordObjectStore(o,t,!0,c,!0,u),o},g.prototype.put=function(e){var t=this,n=arguments[1];if(!(t instanceof g))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No value was specified");g.__invalidStateIfDeleted(t),f.default.__assertActive(t.transaction),t.transaction.__assertWritable();var o=t.transaction.__createRequest(t),i=t.__validateKeyAndValueAndCloneValue(e,n,!1),a=r(i,2),u=a[0],c=a[1];return g.__storingRecordObjectStore(o,t,!0,c,!1,u),o},g.prototype.__overwrite=function(e,t,n,r){var o="DELETE FROM "+c.escapeStoreNameForSQL(this.__currentName)+' WHERE "key" = ?',i=s.encode(t);e.executeSql(o,[c.escapeSQLiteStatement(i)],function(e,r){p.default.DEBUG&&console.log("Did the row with the",t,"exist? ",r.rowsAffected),n(e)},function(e,t){r(t)})},g.__storingRecordObjectStore=function(e,t,n,r,o){var i=arguments[5];t.transaction.__pushToQueue(e,function(e,a,u,c){t.__deriveKey(e,r,i,function(i,a){d.encode(r,function(s){function l(e){t.__insertData(e,s,r,i,a,function(){n&&t.__cursors.forEach(function(e){e.__invalidateCache()}),u.apply(void 0,arguments)},c)}o?l(e):t.__overwrite(e,i,l,c)})},c)})},g.prototype.__get=function(e,t,n,r){var o=this;void 0!==r&&(r=c.enforceRange(r,"unsigned long")),g.__invalidStateIfDeleted(o),f.default.__assertActive(o.transaction);var i=(0,a.convertValueToKeyRange)(e,!n),u=t?"key":"value",l=["SELECT",c.sqlQuote(u),"FROM",c.escapeStoreNameForSQL(o.__currentName)],_=[];if(void 0!==i&&(l.push("WHERE"),(0,a.setSQLForKeyRange)(i,c.sqlQuote("key"),l,_)),n||(r=1),r){if("number"!=typeof r||isNaN(r)||!isFinite(r))throw new TypeError("The count parameter must be a finite number");l.push("LIMIT",r)}return l=l.join(" "),o.transaction.__addToTransactionQueue(function(e,r,i,a){p.default.DEBUG&&console.log("Fetching",o.__currentName,_),e.executeSql(l,_,function(e,r){p.default.DEBUG&&console.log("Fetched data",r);var o=void 0;try{if(0===r.rows.length)return n?i([]):i();if(o=[],t)for(var a=0;a<r.rows.length;a++)o.push(s.decode(c.unescapeSQLiteResponse(r.rows.item(a).key),!1));else for(var u=0;u<r.rows.length;u++)o.push(d.decode(c.unescapeSQLiteResponse(r.rows.item(u).value)));n||(o=o[0])}catch(e){p.default.DEBUG&&console.log(e)}i(o)},function(e,t){a(t)})},void 0,o)},g.prototype.get=function(e){if(!arguments.length)throw new TypeError("A parameter was missing for `IDBObjectStore.get`.");return this.__get(e)},g.prototype.getKey=function(e){if(!arguments.length)throw new TypeError("A parameter was missing for `IDBObjectStore.getKey`.");return this.__get(e,!0)},g.prototype.getAll=function(){var e=Array.prototype.slice.call(arguments),t=e[0],n=e[1];return this.__get(t,!1,!0,n)},g.prototype.getAllKeys=function(){var e=Array.prototype.slice.call(arguments),t=e[0],n=e[1];return this.__get(t,!0,!0,n)},g.prototype.delete=function(e){var t=this;if(!(this instanceof g))throw new TypeError("Illegal invocation");if(!arguments.length)throw new TypeError("A parameter was missing for `IDBObjectStore.delete`.");g.__invalidStateIfDeleted(t),f.default.__assertActive(t.transaction),t.transaction.__assertWritable();var n=(0,a.convertValueToKeyRange)(e,!0),r=["DELETE FROM",c.escapeStoreNameForSQL(t.__currentName),"WHERE"],o=[];(0,a.setSQLForKeyRange)(n,c.sqlQuote("key"),r,o);var i=r.join(" ");return t.transaction.__addToTransactionQueue(function(e,n,r,a){p.default.DEBUG&&console.log("Deleting",t.__currentName,o),e.executeSql(i,o,function(e,n){p.default.DEBUG&&console.log("Deleted from database",n.rowsAffected),t.__cursors.forEach(function(e){e.__invalidateCache()}),r()},function(e,t){a(t)})},void 0,t)},g.prototype.clear=function(){var e=this;if(!(this instanceof g))throw new TypeError("Illegal invocation");return g.__invalidStateIfDeleted(e),f.default.__assertActive(e.transaction),e.transaction.__assertWritable(),e.transaction.__addToTransactionQueue(function(t,n,r,o){t.executeSql("DELETE FROM "+c.escapeStoreNameForSQL(e.__currentName),[],function(t,n){p.default.DEBUG&&console.log("Cleared all records from database",n.rowsAffected),e.__cursors.forEach(function(e){e.__invalidateCache()}),r()},function(e,t){o(t)})},void 0,e)},g.prototype.count=function(){var e=this,t=arguments[0];if(!(e instanceof g))throw new TypeError("Illegal invocation");return g.__invalidStateIfDeleted(e),f.default.__assertActive(e.transaction),i.IDBCursorWithValue.__createInstance(t,"next",e,e,"key","value",!0).__req},g.prototype.openCursor=function(){var e=this,t=Array.prototype.slice.call(arguments),n=t[0],r=t[1];if(!(e instanceof g))throw new TypeError("Illegal invocation");g.__invalidStateIfDeleted(e);var o=i.IDBCursorWithValue.__createInstance(n,r,e,e,"key","value");return e.__cursors.push(o),o.__req},g.prototype.openKeyCursor=function(){var e=this;if(!(e instanceof g))throw new TypeError("Illegal invocation");g.__invalidStateIfDeleted(e);var t=Array.prototype.slice.call(arguments),n=t[0],r=t[1],o=i.IDBCursor.__createInstance(n,r,e,e,"key","key");return e.__cursors.push(o),o.__req},g.prototype.index=function(e){var t=this;if(!(t instanceof g))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No index name was specified");g.__invalidStateIfDeleted(t),f.default.__assertNotFinished(t.transaction);var n=t.__indexes[e];if(!n||n.__deleted)throw(0,o.createDOMException)("NotFoundError",'Index "'+e+'" does not exist on '+t.__currentName);return(!t.__indexHandles[e]||t.__indexes[e].__pendingDelete||t.__indexes[e].__deleted)&&(t.__indexHandles[e]=l.IDBIndex.__clone(n,t)),t.__indexHandles[e]},g.prototype.createIndex=function(e,t){var n=this,r=arguments[2];if(!(n instanceof g))throw new TypeError("Illegal invocation");if(e=String(e),0===arguments.length)throw new TypeError("No index name was specified");if(1===arguments.length)throw new TypeError("No key path was specified");if(f.default.__assertVersionChange(n.transaction),g.__invalidStateIfDeleted(n),f.default.__assertActive(n.transaction),n.__indexes[e]&&!n.__indexes[e].__deleted&&!n.__indexes[e].__pendingDelete)throw(0,o.createDOMException)("ConstraintError",'Index "'+e+'" already exists on '+n.__currentName);if(t=c.convertToSequenceDOMString(t),!c.isValidKeyPath(t))throw(0,o.createDOMException)("SyntaxError","A valid keyPath must be supplied");if(Array.isArray(t)&&r&&r.multiEntry)throw(0,o.createDOMException)("InvalidAccessError","The keyPath argument was an array and the multiEntry option is true.");var i={columnName:e,keyPath:t,optionalParams:{unique:!!(r=r||{}).unique,multiEntry:!!r.multiEntry}},a=l.IDBIndex.__createInstance(n,i);return l.IDBIndex.__createIndex(n,a),a},g.prototype.deleteIndex=function(e){var t=this;if(!(t instanceof g))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No index name was specified");f.default.__assertVersionChange(t.transaction),g.__invalidStateIfDeleted(t),f.default.__assertActive(t.transaction);var n=t.__indexes[e];if(!n)throw(0,o.createDOMException)("NotFoundError",'Index "'+e+'" does not exist on '+t.__currentName);l.IDBIndex.__deleteIndex(t,n)},v.forEach(function(e){Object.defineProperty(g.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}})}),Object.defineProperty(g.prototype,"name",{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")},set:function(e){throw new TypeError("Illegal invocation")}}),g.prototype[Symbol.toStringTag]="IDBObjectStorePrototype",Object.defineProperty(g,"prototype",{writable:!1}),n.default=g,t.exports=n.default},{"./CFG":9,"./DOMException":10,"./DOMStringList":11,"./IDBCursor":13,"./IDBIndex":16,"./IDBKeyRange":17,"./IDBTransaction":20,"./Key":22,"./Sca":23,"./util":27,"sync-promise":5}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.IDBOpenDBRequest=n.IDBRequest=void 0;var r=e("./DOMException"),o=e("eventtargeter"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("./util"));var a=["onsuccess","onerror"],u=["source","transaction","readyState"],c=["result","error"];function s(){throw new TypeError("Illegal constructor")}s.__super=function(){var e=this;this[Symbol.toStringTag]="IDBRequest",this.__setOptions({legacyOutputDidListenersThrowFlag:!0}),c.forEach(function(e){Object.defineProperty(this,"__"+e,{enumerable:!1,configurable:!1,writable:!0}),Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:function(){if("done"!==this.__readyState)throw(0,r.createDOMException)("InvalidStateError","Can't get "+e+"; the request is still pending.");return this["__"+e]}})},this),i.defineReadonlyProperties(this,u),a.forEach(function(t){Object.defineProperty(e,t,{configurable:!0,get:function(){return this["__"+t]},set:function(e){this["__"+t]=e}})},this),a.forEach(function(t){e[t]=null}),this.__result=void 0,this.__error=this.__source=this.__transaction=null,this.__readyState="pending"},s.__createInstance=function(){return new s.__super},s.prototype=o.EventTargetFactory.createInstance({extraProperties:["debug"]}),s.prototype[Symbol.toStringTag]="IDBRequestPrototype",s.prototype.__getParent=function(){return"[object IDBOpenDBRequest]"===this.toString()?null:this.__transaction},u.forEach(function(e){Object.defineProperty(s.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}})}),c.forEach(function(e){Object.defineProperty(s.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}})}),a.forEach(function(e){Object.defineProperty(s.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")},set:function(e){throw new TypeError("Illegal invocation")}})}),Object.defineProperty(s.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:s}),s.__super.prototype=s.prototype,Object.defineProperty(s,"prototype",{writable:!1});var l=["onblocked","onupgradeneeded"];function f(){throw new TypeError("Illegal constructor")}f.prototype=Object.create(s.prototype),Object.defineProperty(f.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:f});var d=f;f.__createInstance=function(){function e(){var e=this;s.__super.call(this),this[Symbol.toStringTag]="IDBOpenDBRequest",this.__setOptions({legacyOutputDidListenersThrowFlag:!0,extraProperties:["oldVersion","newVersion","debug"]}),l.forEach(function(t){Object.defineProperty(e,t,{configurable:!0,get:function(){return this["__"+t]},set:function(e){this["__"+t]=e}})},this),l.forEach(function(t){e[t]=null})}return e.prototype=d.prototype,new e},l.forEach(function(e){Object.defineProperty(f.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")},set:function(e){throw new TypeError("Illegal invocation")}})}),f.prototype[Symbol.toStringTag]="IDBOpenDBRequestPrototype",Object.defineProperty(f,"prototype",{writable:!1}),n.IDBRequest=s,n.IDBOpenDBRequest=f},{"./DOMException":10,"./util":27,eventtargeter:2}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./Event"),o=e("./DOMException"),i=e("./IDBRequest"),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("./util")),u=f(e("./IDBObjectStore")),c=f(e("./CFG")),s=e("eventtargeter"),l=f(e("sync-promise"));function f(e){return e&&e.__esModule?e:{default:e}}var d=0,p=["onabort","oncomplete","onerror"],_=["objectStoreNames","mode","db","error"];function y(){throw new TypeError("Illegal constructor")}var h=y;y.__createInstance=function(e,t,n){function r(){var r=this,o=this;o[Symbol.toStringTag]="IDBTransaction",a.defineReadonlyProperties(o,_),o.__id=++d,o.__active=!0,o.__running=!1,o.__errored=!1,o.__requests=[],o.__objectStoreNames=t,o.__mode=n,o.__db=e,o.__error=null,o.__setOptions({legacyOutputDidListenersThrowFlag:!0}),_.forEach(function(e){Object.defineProperty(r,e,{configurable:!0})}),p.forEach(function(e){Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:function(){return this["__"+e]},set:function(t){this["__"+e]=t}})}),p.forEach(function(e){r[e]=null}),o.__storeHandles={},setTimeout(function(){o.__executeRequests()},0)}return r.prototype=h.prototype,new r},y.prototype=s.EventTargetFactory.createInstance({defaultSync:!0,extraProperties:["complete"]}),y.prototype.__transFinishedCb=function(e,t){e?t(!0):t()},y.prototype.__executeRequests=function(){var e=this;e.__running?c.default.DEBUG&&console.log("Looks like the request set is already running",e.mode):(e.__running=!0,e.db.__db["readonly"===e.mode?"readTransaction":"transaction"](function(t){e.__tx=t;var n=null,i=-1;function a(t,i){if(!e.__errored&&!e.__requestsFinished&&(i&&(n.req=i),"done"!==n.req.__readyState)){n.req.__readyState="done",n.req.__result=t,n.req.__error=null,e.__active=!0;var a=(0,r.createEvent)("success");if(n.req.dispatchEvent(a),a.__legacyOutputDidListenersThrowError)return(0,o.logError)("Error","An error occurred in a success handler attached to request chain",a.__legacyOutputDidListenersThrowError),void e.__abortTransaction((0,o.createDOMException)("AbortError","A request was aborted (in user handler after success)."));s()}}function u(){if(!(e.__errored||e.__requestsFinished||n.req&&"done"===n.req.__readyState)){for(var t=arguments.length,i=Array(t),a=0;a<t;a++)i[a]=arguments[a];var u=(0,o.findError)(i);if(n.req){n.req.__readyState="done",n.req.__error=u,n.req.__result=void 0,n.req.addLateEventListener("error",function(e){e.cancelable&&e.defaultPrevented&&!e.__legacyOutputDidListenersThrowError&&s()}),n.req.addDefaultEventListener("error",function(){e.__abortTransaction(n.req.__error)}),e.__active=!0;var c=(0,r.createEvent)("error",u,{bubbles:!0,cancelable:!0});n.req.dispatchEvent(c),c.__legacyOutputDidListenersThrowError&&((0,o.logError)("Error","An error occurred in an error handler attached to request chain",c.__legacyOutputDidListenersThrowError),c.preventDefault(),e.__abortTransaction((0,o.createDOMException)("AbortError","A request was aborted (in user handler after error).")))}else e.__abortTransaction(u)}}function s(){if(!e.__errored&&!e.__requestsFinished)if(++i>=e.__requests.length)e.__requests=[],e.__active&&function(){function t(){e.__completed=!0,c.default.DEBUG&&console.log("Transaction completed");var t=(0,r.createEvent)("complete");try{e.__internal=!0,e.dispatchEvent(t),e.__internal=!1,e.dispatchEvent((0,r.createEvent)("__complete"))}catch(t){throw e.__internal=!1,e.__errored=!0,t}finally{e.__storeHandles={}}}if(e.__active=!1,e.__requestsFinished=!0,"readwrite"===e.mode)return e.__transactionFinished?void t():void(e.__transactionEndCallback=t);if("readonly"===e.mode)return void t();var n=(0,r.createEvent)("__beforecomplete");n.complete=t,e.dispatchEvent(n)}();else try{if(!(n=e.__requests[i]).req)return void n.op(t,n.args,s,u);if("done"===n.req.__readyState)return;n.op(t,n.args,a,u,s)}catch(e){u(e)}}s()},function(t){if(!0!==t){var n=(0,o.webSQLErrback)(t);e.__abortTransaction(n)}},function(){e.__transFinishedCb===y.prototype.__transFinishedCb&&(e.__transactionEndCallback||e.__requestsFinished?e.__transactionEndCallback&&!e.__completed&&e.__transFinishedCb(e.__errored,e.__transactionEndCallback):e.__transactionFinished=!0)},function(t,n,r,o,i){return!(!t.readOnly&&!n)||(e.__transFinishedCb=function(e,t){e?o(e,t):i(t)},e.__transactionEndCallback&&!e.__completed&&e.__transFinishedCb(e.__errored,e.__transactionEndCallback),!1)}))},y.prototype.__createRequest=function(e){var t=i.IDBRequest.__createInstance();return t.__source=void 0!==e?e:this.db,t.__transaction=this,t},y.prototype.__addToTransactionQueue=function(e,t,n){var r=this.__createRequest(n);return this.__pushToQueue(r,e,t),r},y.prototype.__addNonRequestToTransactionQueue=function(e,t,n){this.__pushToQueue(null,e,t)},y.prototype.__pushToQueue=function(e,t,n){this.__assertActive(),this.__requests.push({op:t,args:n,req:e})},y.prototype.__assertActive=function(){if(!this.__active)throw(0,o.createDOMException)("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished")},y.prototype.__assertWritable=function(){if("readonly"===this.mode)throw(0,o.createDOMException)("ReadOnlyError","The transaction is read only")},y.prototype.__assertVersionChange=function(){y.__assertVersionChange(this)},y.prototype.objectStore=function(e){var t=this;if(!(t instanceof y))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No object store name was specified");if(y.__assertNotFinished(t),-1===t.__objectStoreNames.indexOf(e))throw(0,o.createDOMException)("NotFoundError",e+" is not participating in this transaction");var n=t.db.__objectStores[e];if(!n)throw(0,o.createDOMException)("NotFoundError",e+" does not exist in "+t.db.name);return(!t.__storeHandles[e]||t.__storeHandles[e].__pendingDelete||t.__storeHandles[e].__deleted)&&(t.__storeHandles[e]=u.default.__clone(n,t)),t.__storeHandles[e]},y.prototype.__abortTransaction=function(e){var t=this;function n(n,i){n?i&&"number"==typeof i.code?c.default.DEBUG&&console.log("Rollback erred; feature is probably not supported as per WebSQL",t):c.default.DEBUG&&console.log("Rollback succeeded",t):c.default.DEBUG&&console.log("Rollback not possible due to missing transaction",t),t.dispatchEvent((0,r.createEvent)("__preabort")),t.__requests.filter(function(e,t,n){return e.req&&"done"!==e.req.__readyState&&[t,-1].includes(n.map(function(e){return e.req}).lastIndexOf(e.req))}).reduce(function(e,t){return e.then(function(){t.req.__readyState="done",t.req.__result=void 0,t.req.__error=(0,o.createDOMException)("AbortError","A request was aborted (an unfinished request).");var e=(0,r.createEvent)("error",t.req.__error,{bubbles:!0,cancelable:!0});return new l.default(function(n){setTimeout(function(){t.req.dispatchEvent(e),n()})})})},l.default.resolve()).then(function(){var n=(0,r.createEvent)("abort",e,{bubbles:!0,cancelable:!1});setTimeout(function(){t.__abortFinished=!0,t.dispatchEvent(n),t.__storeHandles={},t.dispatchEvent((0,r.createEvent)("__abort"))})})}(0,o.logError)("Error","An error occurred in a transaction",e),t.__errored||(t.__errored=!0,"versionchange"===t.mode&&(t.db.__version=t.db.__oldVersion,t.db.__objectStoreNames=t.db.__oldObjectStoreNames,t.__objectStoreNames=t.db.__oldObjectStoreNames,Object.values(t.db.__objectStores).concat(Object.values(t.__storeHandles)).forEach(function(e){"__pendingName"in e&&t.db.__oldObjectStoreNames.indexOf(e.__pendingName)>-1&&(e.__name=e.__originalName),e.__indexNames=e.__oldIndexNames,delete e.__pendingDelete,Object.values(e.__indexes).concat(Object.values(e.__indexHandles)).forEach(function(t){"__pendingName"in t&&e.__oldIndexNames.indexOf(t.__pendingName)>-1&&(t.__name=t.__originalName),delete t.__pendingDelete})})),t.__active=!1,null!==e&&(t.__error=e),t.__requestsFinished&&setTimeout(function(){throw e},0),t.__transFinishedCb(!0,function(e){if(e&&t.__tx){if("readwrite"===t.mode)return t.__transactionFinished?void n():void(t.__transactionEndCallback=n);try{t.__tx.executeSql("ROLLBACK",[],n,n)}catch(e){n()}}else n(null,{code:0})}))},y.prototype.abort=function(){if(!(this instanceof y))throw new TypeError("Illegal invocation");c.default.DEBUG&&console.log("The transaction was aborted",this),y.__assertNotFinished(this),this.__abortTransaction(null)},y.prototype[Symbol.toStringTag]="IDBTransactionPrototype",y.__assertVersionChange=function(e){if(!e||"versionchange"!==e.mode)throw(0,o.createDOMException)("InvalidStateError","Not a version transaction")},y.__assertNotVersionChange=function(e){if(e&&"versionchange"===e.mode)throw(0,o.createDOMException)("InvalidStateError","Cannot be called during a version transaction")},y.__assertNotFinished=function(e){if(!e||e.__completed||e.__abortFinished||e.__errored)throw(0,o.createDOMException)("InvalidStateError","Transaction finished by commit or abort")},y.__assertNotFinishedObjectStoreMethod=function(e){try{y.__assertNotFinished(e)}catch(t){if(e&&!e.__completed&&!e.__abortFinished)throw(0,o.createDOMException)("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished");throw t}},y.__assertActive=function(e){if(!e||!e.__active)throw(0,o.createDOMException)("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished")},y.prototype.__getParent=function(){return this.db},p.forEach(function(e){Object.defineProperty(y.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")},set:function(e){throw new TypeError("Illegal invocation")}})}),_.forEach(function(e){Object.defineProperty(y.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}})}),Object.defineProperty(y.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:y}),Object.defineProperty(y,"prototype",{writable:!1}),n.default=y,t.exports=n.default},{"./CFG":9,"./DOMException":10,"./Event":12,"./IDBObjectStore":18,"./IDBRequest":19,"./util":27,eventtargeter:2,"sync-promise":5}],21:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./Event"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("./util"));function i(e){r.ShimEvent.call(this,e),this[Symbol.toStringTag]="IDBVersionChangeEvent",this.toString=function(){return"[object IDBVersionChangeEvent]"},this.__eventInitDict=arguments[1]||{}}i.prototype=Object.create(r.ShimEvent.prototype),i.prototype[Symbol.toStringTag]="IDBVersionChangeEventPrototype",["oldVersion","newVersion"].forEach(function(e){Object.defineProperty(i.prototype,e,{enumerable:!0,configurable:!0,get:function(){if(!(this instanceof i))throw new TypeError("Illegal invocation");return this.__eventInitDict&&this.__eventInitDict[e]||("oldVersion"===e?0:null)}})}),Object.defineProperty(i,Symbol.hasInstance,{value:function(e){return o.isObj(e)&&"oldVersion"in e&&"boolean"==typeof e.defaultPrevented}}),Object.defineProperty(i.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:i}),Object.defineProperty(i,"prototype",{writable:!1}),n.default=i,t.exports=n.default},{"./Event":12,"./util":27}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.possiblyUpdateKeyGenerator=n.generateKeyForStore=n.assignCurrentNumber=n.findMultiEntryMatches=n.isKeyInRange=n.isMultiEntryMatch=n.checkKeyCouldBeInjectedIntoValue=n.injectKeyIntoValueUsingKeyPath=n.extractKeyValueDecodedFromValueUsingKeyPath=n.evaluateKeyPathOnValue=n.extractKeyFromValueUsingKeyPath=n.convertValueToKeyRethrowingAndIfInvalid=n.convertValueToMultiEntryKey=n.convertValueToKey=n.convertValueToMultiEntryKeyDecoded=n.convertValueToKeyValueDecoded=n.convertKeyToValue=n.roundTrip=n.decode=n.encode=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("./DOMException"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("./util")),a=c(e("./cmp")),u=c(e("./CFG"));function c(e){return e&&e.__esModule?e:{default:e}}var s={invalid:100,number:200,date:300,string:400,binary:500,array:600},l=Object.keys(s);l.forEach(function(e){s[e]=String.fromCharCode(s[e])});var f=l.reduce(function(e,t){return e[s[t]]=t,e},{}),d=["negativeInfinity","bigNegative","smallNegative","smallPositive","bigPositive","positiveInfinity"],p={invalid:{encode:function(e){return s.invalid+"-"},decode:function(e){}},number:{encode:function(e){var t=e===Number.MIN_VALUE?"0."+"0".repeat(214)+"2":Math.abs(e).toString(32),n=t.indexOf("."),r=(t=-1!==n?t.replace(".",""):t).search(/[^0]/);t=t.slice(r);var o=void 0,i=void 0,a=void 0;return isFinite(e)?e<0?e>-1?(o=d.indexOf("smallNegative"),i=_(r),a=h(y(t))):(o=d.indexOf("bigNegative"),i=h(_(-1!==n?n:t.length)),a=h(y(t))):e<1?(o=d.indexOf("smallPositive"),i=h(_(r)),a=y(t)):(o=d.indexOf("bigPositive"),i=_(-1!==n?n:t.length),a=y(t)):(i=b(2),a=b(11),o=d.indexOf(e>0?"positiveInfinity":"negativeInfinity")),s.number+"-"+o+i+a},decode:function(e){var t=+e.substr(2,1),n=e.substr(3,2),r=e.substr(5,11);switch(d[t]){case"negativeInfinity":return-1/0;case"positiveInfinity":return 1/0;case"bigPositive":return v(r,n);case"smallPositive":return v(r,n=m(h(n)));case"smallNegative":return n=m(n),-v(r=h(r),n);case"bigNegative":return n=h(n),-v(r=h(r),n);default:throw new Error("Invalid number.")}}},string:{encode:function(e,t){return t&&(e=e.replace(/(.)/g,"-$1")+" "),s.string+"-"+e},decode:function(e,t){return e=e.slice(2),t&&(e=e.substr(0,e.length-1).replace(/-(.)/g,"$1")),e}},array:{encode:function(e){for(var t=[],n=0;n<e.length;n++){var r=B(e[n],!0);t[n]=r}return t.push(s.invalid+"-"),s.array+"-"+JSON.stringify(t)},decode:function(e){var t=JSON.parse(e.slice(2));t.pop();for(var n=0;n<t.length;n++){var r=A(t[n],!0);t[n]=r}return t}},date:{encode:function(e){return s.date+"-"+e.toJSON()},decode:function(e){return new Date(e.slice(2))}},binary:{encode:function(e){return s.binary+"-"+(e.byteLength?[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(D(e))).map(function(e){return i.padStart(e,3,"0")}):"")},decode:function(e){var t=e.slice(2),n=t.length?t.split(",").map(function(e){return parseInt(e,10)}):[],r=new ArrayBuffer(n.length);return new Uint8Array(r).set(n),r}}};function _(e){return 1===(e=e.toString(32)).length?"0"+e:e}function y(e){return(e+b(11)).slice(0,11)}function h(e){for(var t="",n=0;n<e.length;n++)t+=(31-parseInt(e[n],32)).toString(32);return t}function v(e,t){if((t=parseInt(t,32))<0)return g(parseInt(e,32)*Math.pow(32,t-10));if(t<11){var n=e.slice(0,t);n=parseInt(n,32);var r=e.slice(t);return g(n+(r=parseInt(r,32)*Math.pow(32,t-11)))}var o=e+b(t-11);return parseInt(o,32)}function g(e,t){return t=t||16,parseFloat(e.toPrecision(t))}function b(e){return"0".repeat(e)}function m(e){return"-"+e}function E(e){if(Array.isArray(e))return"array";if(i.isDate(e))return"date";if(i.isBinary(e))return"binary";var t=void 0===e?"undefined":r(e);return["string","number"].includes(t)?t:"invalid"}function S(e,t){return w(e,t,!1,!0)}function D(e){var t=0,n=0;if(ArrayBuffer.isView(e)){if(void 0===e.buffer)throw new TypeError("Could not copy the bytes held by a buffer source as the buffer was undefined.");t=e.byteOffset,n=e.byteLength}else n=e.byteLength;return new Uint8Array(e.buffer||e,t,n)}function w(e,t,n,o){if((t=t||[]).includes(e))return{type:"array",invalid:!0,message:"An array key cannot be circular"};var i=E(e),u={type:i,value:e};switch(i){case"number":return Number.isNaN(e)?{type:"NaN",invalid:!0}:u;case"string":return u;case"binary":return{type:"binary",value:D(e)};case"array":var c=e.length;t.push(e);for(var s=[],l=0;l<c;l++){if(!n&&!Object.prototype.hasOwnProperty.call(e,l))return{type:i,invalid:!0,message:"Does not have own index property"};try{var f=function(){var r=w(e[l],t,!1,o);if(r.invalid)return n?"continue":{v:{type:i,invalid:!0,message:"Bad array entry value-to-key conversion"}};(!n||!o&&s.every(function(e){return 0!==(0,a.default)(e,r.value)})||o&&s.every(function(e){return 0!==(0,a.default)(e,r)}))&&s.push(o?r:r.value)}();switch(f){case"continue":continue;default:if("object"===(void 0===f?"undefined":r(f)))return f.v}}catch(e){if(!n)throw e}}return{type:i,value:s};case"date":return Number.isNaN(e.getTime())?{type:i,invalid:!0,message:"Not a valid date"}:o?{type:i,value:e.getTime()}:{type:i,value:new Date(e.getTime())};case"invalid":default:var d=null===e?"null":void 0===e?"undefined":r(e);return{type:d,invalid:!0,message:"Not a valid key; type "+d}}}function O(e,t){return w(e,null,!0,t)}function I(e,t,n,r){var o=T(e,t,n,r);return o.failure?o:n?O(o.value,r):w(o.value,null,!1,r)}function T(e,t,n,r){if(Array.isArray(t)){var o=[];return t.some(function(t){var i=T(e,t,n,r);if(i.failure)return!0;o.push(i.value)},[])?{failure:!0}:{value:o}}return""===t?{value:e}:t.split(".").some(function(t,n){if("length"!==t||"string"!=typeof e&&!Array.isArray(e))if(i.isBlob(e))switch(t){case"size":case"type":e=e[t]}else{if(!i.isFile(e))return!i.isObj(e)||!Object.prototype.hasOwnProperty.call(e,t)||void 0===(e=e[t]);switch(t){case"name":case"lastModified":e=e[t];break;case"lastModifiedDate":e=new Date(e.lastModified)}}else e=e.length})?{failure:!0}:{value:e}}function x(e,t,n){var r=void 0===t.lower,o=void 0===t.upper,i=B(e,!0),a=n?t.__lowerCached:B(t.lower,!0),u=n?t.__upperCached:B(t.upper,!0);return void 0!==t.lower&&(t.lowerOpen&&i>a&&(r=!0),!t.lowerOpen&&i>=a&&(r=!0)),void 0!==t.upper&&(t.upperOpen&&i<u&&(o=!0),!t.upperOpen&&i<=u&&(o=!0)),r&&o}function B(e,t){return void 0===e?null:p[E(e)].encode(e,t)}function A(e,t){if("string"==typeof e)return p[f[e.slice(0,1)]].decode(e,t)}var N=9007199254740992;function C(e,t,n,r){e.executeSql('SELECT "currNum" FROM __sys__ WHERE "name" = ?',[i.escapeSQLiteStatement(t.__currentName)],function(e,t){1!==t.rows.length?n(1):n(t.rows.item(0).currNum)},function(e,t){r((0,o.createDOMException)("DataError","Could not get the auto increment value for key",t))})}function j(e,t,n,r,a){var c='UPDATE __sys__ SET "currNum" = ? WHERE "name" = ?',s=[n,i.escapeSQLiteStatement(t.__currentName)];u.default.DEBUG&&console.log(c,s),e.executeSql(c,s,function(e,t){r(n)},function(e,t){a((0,o.createDOMException)("UnknownError","Could not set the auto increment value for key",t))})}function P(e,t,n,r,o){return j(e,t,n=n===N?n+2:n+1,r,o)}n.encode=B,n.decode=A,n.roundTrip=function(e,t){return A(B(e,t),t)},n.convertKeyToValue=function e(t){var n=t.type,r=t.value;switch(n){case"number":case"string":return r;case"array":for(var o=[],i=r.length,a=0;a<i;){var u=e(r[a]);o[a]=u,a++}return o;case"date":return new Date(r);case"binary":var c=r.length,s=new ArrayBuffer(c);return new Uint8Array(s,r.byteOffset||0,r.byteLength).set(r),s;case"invalid":default:throw new Error("Bad key")}},n.convertValueToKeyValueDecoded=w,n.convertValueToMultiEntryKeyDecoded=O,n.convertValueToKey=S,n.convertValueToMultiEntryKey=function(e){return w(e,null,!0,!0)},n.convertValueToKeyRethrowingAndIfInvalid=function(e,t){var n=S(e,t);if(n.invalid)throw(0,o.createDOMException)("DataError",n.message||"Not a valid key; type: "+n.type);return n},n.extractKeyFromValueUsingKeyPath=function(e,t,n){return I(e,t,n,!0)},n.evaluateKeyPathOnValue=function(e,t,n){return T(e,t,n,!0)},n.extractKeyValueDecodedFromValueUsingKeyPath=I,n.injectKeyIntoValueUsingKeyPath=function(e,t,n){for(var r=n.split("."),o=r.pop(),i=0;i<r.length;i++){var a=r[i];Object.prototype.hasOwnProperty.call(e,a)||(e[a]={}),e=e[a]}e[o]=t},n.checkKeyCouldBeInjectedIntoValue=function(e,t){var n=t.split(".");n.pop();for(var r=0;r<n.length;r++){if(!i.isObj(e))return!1;var o=n[r];if(!Object.prototype.hasOwnProperty.call(e,o))return!0;e=e[o]}return i.isObj(e)},n.isMultiEntryMatch=function(e,t){return"array"===f[t.slice(0,1)]?t.indexOf(e)>1:t===e},n.isKeyInRange=x,n.findMultiEntryMatches=function e(t,n){var r=[];if(Array.isArray(t))for(var o=0;o<t.length;o++){var i=t[o];if(Array.isArray(i)){if(n&&n.lower===n.upper)continue;if(1!==i.length){e(i,n).length>0&&r.push(i);continue}i=i[0]}(null==n||x(i,n,!0))&&r.push(i)}else(null==n||x(t,n,!0))&&r.push(t);return r},n.assignCurrentNumber=j,n.generateKeyForStore=function(e,t,n,r){C(e,t,function(o){if(o>N)return n("failure");P(e,t,o,function(){n(null,o,o)},r)},r)},n.possiblyUpdateKeyGenerator=function(e,t,n,r,o){"number"!=typeof n||n<1?r():C(e,t,function(i){var a=Math.floor(Math.min(n,N));a>=i?P(e,t,a,function(){r(i)},o):r()},o)}},{"./CFG":9,"./DOMException":10,"./cmp":25,"./util":27}],23:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.clone=n.decode=n.encode=void 0;var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=c(e("typeson")),a=c(e("typeson-registry/dist/presets/structured-cloning-throwing")),u=e("./DOMException");function c(e){return e&&e.__esModule?e:{default:e}}var s=a.default,l={IntlCollator:"Intl.Collator",IntlDateTimeFormat:"Intl.DateTimeFormat",IntlNumberFormat:"Intl.NumberFormat",userObject:"userObjects",undef:"undefined",negativeInfinity:"NegativeInfinity",nonbuiltinIgnore:"nonBuiltInIgnore",arraybuffer:"ArrayBuffer",blob:"Blob",dataview:"DataView",date:"Date",error:"Error",file:"File",filelist:"FileList",imagebitmap:"ImageBitmap",imagedata:"ImageData",infinity:"Infinity",map:"Map",nan:"NaN",regexp:"RegExp",set:"Set",int8array:"Int8Array",uint8array:"Uint8Array",uint8clampedarray:"Uint8ClampedArray",int16array:"Int16Array",uint16array:"Uint16Array",int32array:"Int32Array",uint32array:"Uint32Array",float32array:"Float32Array",float64array:"Float64Array"};!function e(t){if(Array.isArray(t))return t.forEach(e);t&&"object"===(void 0===t?"undefined":o(t))&&Object.entries(t).forEach(function(e){var n=r(e,2),o=n[0],i=n[1];if(o in l){var a=l[o];delete t[o],t[a]=i}})}(s);var f=(new i.default).register(s);function d(e,t){var n=void 0;try{n=f.stringifySync(e)}catch(e){if(i.default.hasConstructorOf(e,ReferenceError)||i.default.hasConstructorOf(e,u.ShimDOMException))throw(0,u.createDOMException)("DataCloneError","The object cannot be cloned.");throw e}return t&&t(n),n}function p(e){return f.parse(e)}n.encode=d,n.decode=p,n.clone=function(e){return p(d(e))}},{"./DOMException":10,typeson:7,"typeson-registry/dist/presets/structured-cloning-throwing":6}],24:[function(e,t,n){"use strict";var r=o(e("./setGlobalVars"));function o(e){return e&&e.__esModule?e:{default:e}}o(e("./CFG")).default.win="undefined"!=typeof window?window:self,(0,r.default)()},{"./CFG":9,"./setGlobalVars":26}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./CFG"),a=(r=i)&&r.__esModule?r:{default:r},u=e("./Key");n.default=function(e,t){var n=(0,u.encode)(e),r=(0,u.encode)(t),i=n>r?1:n===r?0:-1;if(a.default.DEBUG){var c=(0,u.decode)(n),s=(0,u.decode)(r);"object"===(void 0===e?"undefined":o(e))&&(e=JSON.stringify(e),c=JSON.stringify(c)),"object"===(void 0===t?"undefined":o(t))&&(t=JSON.stringify(t),s=JSON.stringify(s)),c!==e&&console.warn(e+" was incorrectly encoded as "+c),s!==t&&console.warn(t+" was incorrectly encoded as "+s)}return i},t.exports=n.default},{"./CFG":9,"./Key":22}],26:[function(e,t,n){(function(r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e("eventtargeter"),u=g(e("./IDBVersionChangeEvent")),c=e("./IDBCursor"),s=e("./IDBRequest"),l=e("./DOMException"),f=e("./IDBFactory"),d=g(e("./IDBKeyRange")),p=g(e("./IDBObjectStore")),_=g(e("./IDBIndex")),y=g(e("./IDBTransaction")),h=g(e("./IDBDatabase")),v=g(e("./CFG"));function g(e){return e&&e.__esModule?e:{default:e}}function b(e,t){if(e&&"object"===(void 0===e?"undefined":i(e)))for(var n in e)b(n,e[n]);else{if(!(e in v.default))throw new Error(e+" is not a valid configuration property");v.default[e]=t}}n.default=function(e,t){t&&b(t);var n=e||("undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==r?r:{});function i(e,t,r){if(!r||!Object.defineProperty)try{n[e]=t}catch(e){console.log(e)}if(n[e]!==t&&Object.defineProperty)try{var o=r||{};"get"in o||("value"in o||(o.value=t),"writable"in o||(o.writable=!0)),Object.defineProperty(n,e,o)}catch(e){}n[e]!==t&&"undefined"!=typeof console&&console.warn&&console.warn("Unable to shim "+e)}void 0!==v.default.win.openDatabase&&i("shimIndexedDB",f.shimIndexedDB,{enumerable:!1,configurable:!0}),n.shimIndexedDB?(n.shimIndexedDB.__useShim=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";i(e+"DOMException",n.indexedDB.modules.ShimDOMException),i(e+"DOMStringList",n.indexedDB.modules.ShimDOMStringList,{enumerable:!1,configurable:!0,writable:!0,value:n.indexedDB.modules.ShimDOMStringList}),i(e+"Event",n.indexedDB.modules.ShimEvent,{configurable:!0,writable:!0,value:n.indexedDB.modules.ShimEvent,enumerable:!1}),i(e+"CustomEvent",n.indexedDB.modules.ShimCustomEvent,{configurable:!0,writable:!0,value:n.indexedDB.modules.ShimCustomEvent,enumerable:!1}),i(e+"EventTarget",n.indexedDB.modules.ShimEventTarget,{configurable:!0,writable:!0,value:n.indexedDB.modules.ShimEventTarget,enumerable:!1})}var t=n.shimIndexedDB.modules.IDBFactory;if(void 0!==v.default.win.openDatabase){if(f.shimIndexedDB.__openDatabase=v.default.win.openDatabase.bind(v.default.win),i("indexedDB",f.shimIndexedDB,{enumerable:!0,configurable:!0,get:function(){if(this!==n&&null!=this&&!this.shimNS)throw new TypeError("Illegal invocation");return f.shimIndexedDB}}),[["IDBFactory",t],["IDBDatabase",h.default],["IDBObjectStore",p.default],["IDBIndex",_.default],["IDBTransaction",y.default],["IDBCursor",c.IDBCursor],["IDBCursorWithValue",c.IDBCursorWithValue],["IDBKeyRange",d.default],["IDBRequest",s.IDBRequest],["IDBOpenDBRequest",s.IDBOpenDBRequest],["IDBVersionChangeEvent",u.default]].forEach(function(e){var t=o(e,2);i(t[0],t[1],{enumerable:!1,configurable:!0})}),v.default.fullIDLSupport){Object.setPrototypeOf(n.IDBOpenDBRequest,n.IDBRequest),Object.setPrototypeOf(n.IDBCursorWithValue,n.IDBCursor);var r=n.shimIndexedDB.modules.ShimEvent,g=n.shimIndexedDB.modules.ShimEventTarget;Object.setPrototypeOf(h.default,g),Object.setPrototypeOf(s.IDBRequest,g),Object.setPrototypeOf(y.default,g),Object.setPrototypeOf(u.default,r),Object.setPrototypeOf(l.ShimDOMException,Error),Object.setPrototypeOf(l.ShimDOMException.prototype,Error.prototype),(0,a.setPrototypeOfCustomEvent)()}n.indexedDB&&n.indexedDB.modules&&(v.default.addNonIDBGlobals&&e("Shim"),v.default.replaceNonIDBGlobals&&e()),n.shimIndexedDB.__setConnectionQueueOrigin()}},n.shimIndexedDB.__debug=function(e){v.default.DEBUG=e},n.shimIndexedDB.__setConfig=b,n.shimIndexedDB.__getConfig=function(e){if(!(e in v.default))throw new Error(e+" is not a valid configuration property");return v.default[e]},n.shimIndexedDB.__setUnicodeIdentifiers=function(e){b({UnicodeIDStart:e.UnicodeIDStart,UnicodeIDContinue:e.UnicodeIDContinue})}):(n.shimIndexedDB={modules:["DOMException","DOMStringList","Event","CustomEvent","EventTarget"].reduce(function(e,t){return e["Shim"+t]=n[t],e},{})},["__useShim","__debug","__setConfig","__getConfig","__setUnicodeIdentifiers"].forEach(function(e){n.shimIndexedDB[e]=function(){console.warn("This browser does not have WebSQL to shim.")}})),"indexedDB"in n||"undefined"==typeof window||(n.indexedDB=n.indexedDB||n.webkitIndexedDB||n.mozIndexedDB||n.oIndexedDB||n.msIndexedDB);var g=!1;return"undefined"!=typeof navigator&&navigator.userAgent&&(/Android (?:2|3|4\.[0-3])/.test(navigator.userAgent)&&!navigator.userAgent.includes("Chrome")||(!navigator.userAgent.includes("Safari")||navigator.userAgent.includes("Chrome"))&&/(iPad|iPhone|iPod).* os 9_/i.test(navigator.userAgent)&&!window.MSStream)&&(g=!0),v.default.DEFAULT_DB_SIZE||(v.default.DEFAULT_DB_SIZE=1024*("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")?25:4)*1024),v.default.avoidAutoShim||n.indexedDB&&!g||void 0===v.default.win.openDatabase?(n.IDBDatabase=n.IDBDatabase||n.webkitIDBDatabase,n.IDBTransaction=n.IDBTransaction||n.webkitIDBTransaction||{},n.IDBCursor=n.IDBCursor||n.webkitIDBCursor,n.IDBKeyRange=n.IDBKeyRange||n.webkitIDBKeyRange):n.shimIndexedDB.__useShim(),n},t.exports=n.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./CFG":9,"./DOMException":10,"./IDBCursor":13,"./IDBDatabase":14,"./IDBFactory":15,"./IDBIndex":16,"./IDBKeyRange":17,"./IDBObjectStore":18,"./IDBRequest":19,"./IDBTransaction":20,"./IDBVersionChangeEvent":21,eventtargeter:2}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.padStart=n.convertToSequenceDOMString=n.convertToDOMString=n.enforceRange=n.isValidKeyPath=n.defineReadonlyProperties=n.isIterable=n.isBinary=n.isFile=n.isRegExp=n.isBlob=n.isDate=n.isObj=n.instanceOf=n.sqlQuote=n.sqlLIKEEscape=n.escapeIndexNameForSQLKeyColumn=n.escapeIndexNameForSQL=n.escapeStoreNameForSQL=n.unescapeDatabaseNameForSQLAndFiles=n.escapeDatabaseNameForSQLAndFiles=n.unescapeSQLiteResponse=n.escapeSQLiteStatement=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=a(e("./CFG")),i=a(e("unicode-10.0.0/Binary_Property/Expands_On_NFD/regex"));function a(e){return e&&e.__esModule?e:{default:e}}function u(e){return e.replace(/([\uD800-\uDBFF])(?![\uDC00-\uDFFF])|(^|[^\uD800-\uDBFF])([\uDC00-\uDFFF])/g,function(e,t,n,r){return t?"^2"+b(t.charCodeAt().toString(16),4,"0"):(n||"")+"^3"+b(r.charCodeAt().toString(16),4,"0")})}function c(e){return"_"+u(e.replace(/\^/g,"^^").replace(/\0/g,"^0").replace(/([A-Z])/g,"^$1"))}function s(e){return u(e.replace(/\^/g,"^^").replace(/\0/g,"^0"))}function l(e){return p(e).replace(/\^0/g,"\0").replace(/\^\^/g,"^")}function f(e){return e.replace(/"/g,'""')}function d(e){return'"'+f(e)+'"'}function p(e){return e.replace(/(\^+)3(d[0-9a-f]{3})/g,function(e,t,n){return t.length%2?t.slice(1)+String.fromCharCode(parseInt(n,16)):e}).replace(/(\^+)2(d[0-9a-f]{3})/g,function(e,t,n){return t.length%2?t.slice(1)+String.fromCharCode(parseInt(n,16)):e})}function _(e){return e&&"object"===(void 0===e?"undefined":r(e))}function y(e){return _(e)&&"function"==typeof e[Symbol.iterator]}function h(e){var t=o.default.UnicodeIDStart||"[$A-Z_a-z]",n=o.default.UnicodeIDContinue||"[$0-9A-Z_a-z]";return new RegExp("^"+("(?:"+t+"|[$_])")+("(?:"+n+"|[$_‌‍])")+"*$").test(e)}function v(e){return"string"==typeof e&&(""===e||h(e)||e.split(".").every(h))}function g(e){return""+e}function b(e,t,n){return new Array(t-String(e).length+1).join(n)+e}n.escapeSQLiteStatement=s,n.unescapeSQLiteResponse=l,n.escapeDatabaseNameForSQLAndFiles=function(e){if(o.default.escapeDatabaseName)return o.default.escapeDatabaseName(s(e));if(e="D"+c(e),!1!==o.default.escapeNFDForDatabaseNames&&(e=e.replace(new RegExp(i.default.source,"g"),function(e){return"^4"+b(e.codePointAt().toString(16),6,"0")})),!1!==o.default.databaseCharacterEscapeList&&(e=e.replace(o.default.databaseCharacterEscapeList?new RegExp(o.default.databaseCharacterEscapeList,"g"):/[\u0000-\u001F\u007F"*/:<>?\\|]/g,function(e){return"^1"+b(e.charCodeAt().toString(16),2,"0")})),!1!==o.default.databaseNameLengthLimit&&e.length>=(o.default.databaseNameLengthLimit||254)-(!1!==o.default.addSQLiteExtension?7:0))throw new Error("Unexpectedly long database name supplied; length limit required for Node compatibility; passed length: "+e.length+"; length limit setting: "+(o.default.databaseNameLengthLimit||254)+".");return e+(!1!==o.default.addSQLiteExtension?".sqlite":"")},n.unescapeDatabaseNameForSQLAndFiles=function(e){return o.default.unescapeDatabaseName?o.default.unescapeDatabaseName(l(e)):p(e.slice(2).replace(/(\^+)1([0-9a-f]{2})/g,function(e,t,n){return t.length%2?t.slice(1)+String.fromCharCode(parseInt(n,16)):e}).replace(/(\^+)4([0-9a-f]{6})/g,function(e,t,n){return t.length%2?t.slice(1)+String.fromCodePoint(parseInt(n,16)):e})).replace(/(\^+)([A-Z])/g,function(e,t,n){return t.length%2?t.slice(1)+n:e}).replace(/(\^+)0/g,function(e,t){return t.length%2?t.slice(1)+"\0":e}).replace(/\^\^/g,"^")},n.escapeStoreNameForSQL=function(e){return d("S"+c(e))},n.escapeIndexNameForSQL=function(e){return d("I"+c(e))},n.escapeIndexNameForSQLKeyColumn=function(e){return"I"+c(e)},n.sqlLIKEEscape=function(e){return f(e).replace(/\^/g,"^^")},n.sqlQuote=d,n.instanceOf=function(e,t){return t[Symbol.hasInstance](e)},n.isObj=_,n.isDate=function(e){return _(e)&&"function"==typeof e.getDate},n.isBlob=function(e){return _(e)&&"number"==typeof e.size&&"function"==typeof e.slice&&!("lastModified"in e)},n.isRegExp=function(e){return _(e)&&"string"==typeof e.flags&&"function"==typeof e.exec},n.isFile=function(e){return _(e)&&"string"==typeof e.name&&"function"==typeof e.slice&&"lastModified"in e},n.isBinary=function(e){return _(e)&&"number"==typeof e.byteLength&&("function"==typeof e.slice||"function"==typeof e.getFloat64)},n.isIterable=y,n.defineReadonlyProperties=function(e,t){(t="string"==typeof t?[t]:t).forEach(function(t){Object.defineProperty(e,"__"+t,{enumerable:!1,configurable:!1,writable:!0}),Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){return this["__"+t]}})})},n.isValidKeyPath=function(e){return v(e)||Array.isArray(e)&&e.length&&Array.apply(null,e).every(function(e){return v(e)})},n.enforceRange=function(e,t){e=Math.floor(Number(e));var n=void 0,r=void 0;switch(t){case"unsigned long long":n=9007199254740991,r=0;break;case"unsigned long":n=4294967295,r=0;break;default:throw new Error("Unrecognized type supplied to enforceRange")}if(isNaN(e)||!isFinite(e)||e>n||e<r)throw new TypeError("Invalid range: "+e);return e},n.convertToDOMString=function(e,t){return null===e&&t?"":g(e)},n.convertToSequenceDOMString=function(e){return y(e)?[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e)).map(g):g(e)},n.padStart=b},{"./CFG":9,"unicode-10.0.0/Binary_Property/Expands_On_NFD/regex":8}]},{},[24]);
  //# sourceMappingURL=indexeddbshim.min.js.map