indexeddbshim 8.0.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- /*! indexeddbshim - v7.1.0 - 6/15/2021 */
1
+ /*! indexeddbshim - v9.0.0 - 1/5/2022 */
2
2
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).setGlobalVars=t()}(this,(function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return(n="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)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){for(var n in t){(o=t[n]).configurable=o.enumerable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n,o)}if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(t),u=0;u<r.length;u++){var o,i=r[u];(o=t[i]).configurable=o.enumerable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i,o)}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return(s=c()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var u=new(Function.bind.apply(e,r));return n&&a(u,n.prototype),u}).apply(null,arguments)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,u,o=[],i=!0,a=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){a=!0,u=e}finally{try{i||null==n.return||n.return()}finally{if(a)throw u}}return o}(e,t)||D(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||D(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=D(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}var p=void 0!==y?y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},y=void 0!==p?p:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function h(e){return(h="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)}var E=0,v=1,b=2,g=3,F="undefined"==typeof DOMException?function(e,t){var n=new Error(e);return n.name=t,n}:DOMException,A=new WeakMap,C=new WeakMap,m=function(e){this[Symbol.toStringTag]="Event",this.toString=function(){return"[object Event]"};var t=Array.prototype.slice.call(arguments),n=t[1],r=t[2];if(!arguments.length)throw new TypeError("Failed to construct 'Event': 1 argument required, but only 0 present.");r=r||{};var u={};"composed"in(n=n||{})&&(u.composed=n.composed),A.set(this,r),C.set(this,u),this.initEvent(e,n.bubbles,n.cancelable),Object.defineProperties(this,["target","currentTarget","eventPhase","defaultPrevented"].reduce((function(e,t){return e[t]={get:function(){return void 0!==u[t]?u[t]:t in r?r[t]:"eventPhase"===t?0:"defaultPrevented"!==t&&null}},e}),{}));var o=["type","bubbles","cancelable","isTrusted","timeStamp","initEvent","composedPath","composed"];"[object CustomEvent]"===this.toString()&&o.push("detail","initCustomEvent"),Object.defineProperties(this,o.reduce((function(e,t){return e[t]={get:function(){return t in u?u[t]:t in r?r[t]:!["bubbles","cancelable","composed"].includes(t)&&void 0}},e}),{}))};m.prototype.preventDefault=function(){if(!(this instanceof m))throw new TypeError("Illegal invocation");var e=A.get(this),t=C.get(this);this.cancelable&&!t._passive&&(t.defaultPrevented=!0,"function"==typeof e.preventDefault&&e.preventDefault())},m.prototype.stopImmediatePropagation=function(){C.get(this)._stopImmediatePropagation=!0},m.prototype.stopPropagation=function(){C.get(this)._stopPropagation=!0},m.prototype.initEvent=function(e,t,n){var r=C.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(m.prototype,e,{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}})})),["eventPhase","defaultPrevented","bubbles","cancelable","timeStamp"].forEach((function(e){Object.defineProperty(m.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(m,e,{enumerable:!0,writable:!1,value:t}),Object.defineProperty(m.prototype,e,{writable:!1,value:t})})),m[Symbol.toStringTag]="Function",m.prototype[Symbol.toStringTag]="EventPrototype",Object.defineProperty(m,"prototype",{writable:!1});var B=function(e){var t=Array.prototype.slice.call(arguments),n=t[1],r=t[2];m.call(this,e,n,r),this[Symbol.toStringTag]="CustomEvent",this.toString=function(){return"[object CustomEvent]"},n=n||{},this.initCustomEvent(e,n.bubbles,n.cancelable,"detail"in n?n.detail:null)};function w(e,t,n){var r=e[t];void 0===r&&(e[t]=r=[]),n="boolean"==typeof n?{capture:n}:n||{};var u=JSON.stringify(n);return{listenersByTypeOptions:r.filter((function(e){return u===JSON.stringify(e.options)})),options:n,listenersByType:r}}Object.defineProperty(B.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:B}),B.prototype.initCustomEvent=function(e,t,n,r){if(!(this instanceof B))throw new TypeError("Illegal invocation");var u=C.get(this);B.call(this,e,{bubbles:t,cancelable:n,detail:r},arguments[4]),u._dispatched||(void 0!==r&&(u.detail=r),Object.defineProperty(this,"detail",{get:function(){return u.detail}}))},B[Symbol.toStringTag]="Function",B.prototype[Symbol.toStringTag]="CustomEventPrototype",Object.defineProperty(B.prototype,"detail",{enumerable:!0,configurable:!0,get:function(){throw new TypeError("Illegal invocation")}}),Object.defineProperty(B,"prototype",{writable:!1});var I={addListener:function(e,t,n,r){var u=w(e,n,r),o=u.listenersByTypeOptions;r=u.options;var i=u.listenersByType;o.some((function(e){return e.listener===t}))||i.push({listener:t,options:r})},removeListener:function(e,t,n,r){var u=w(e,n,r),o=u.listenersByType,i=JSON.stringify(u.options);o.some((function(r,u){return r.listener===t&&i===JSON.stringify(r.options)&&(o.splice(u,1),o.length||delete e[n],!0)}))},hasListener:function(e,t,n,r){return w(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(e,t){return["add","remove","has"].forEach((function(n){e[n+t+"EventListener"]=function(e,r){var u=arguments[2];if(arguments.length<2)throw new TypeError("2 or more arguments required");if("string"!=typeof e)throw new F("UNSPECIFIED_EVENT_TYPE_ERR","UNSPECIFIED_EVENT_TYPE_ERR");try{r.handleEvent&&r.handleEvent.bind&&(r=r.handleEvent.bind(r))}catch(e){console.log("Uncaught `handleEvent` error",e)}var o="_"+t.toLowerCase()+(""===t?"l":"L")+"isteners";return this[o]||Object.defineProperty(this,o,{value:{}}),I[n+"Listener"](this[o],r,e,u)}})),e}),{})),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(e,t){var n=this;["early","","late","default"].forEach((function(e){var t="_"+e+(""===e?"l":"L")+"isteners";n[t]||Object.defineProperty(n,t,{value:{}})}));var r,u=C.get(e);if(u&&t&&u._dispatched)throw new F("The object is in an invalid state.","InvalidStateError");u?r=e:(r=function(e){var t=e.bubbles,n=e.cancelable,r=e.detail,u=e.type;return"detail"in e?new B(u,{bubbles:t,cancelable:n,detail:r},e):new m(u,{bubbles:t,cancelable:n},e)}(e),(u=C.get(r))._dispatched=!0,this._extraProperties.forEach((function(t){t in e&&(r[t]=e[t])})));var o=r.type;function i(){u.eventPhase=E,u.currentTarget=null,delete u._children}function a(){u._stopImmediatePropagation=void 0,u._stopPropagation=void 0,r.defaultPrevented&&u.cancelable||(u.eventPhase=b,r.target.invokeCurrentListeners(r.target._defaultListeners,r,o)),i()}var c=function(){return u._stopImmediatePropagation=void 0,u._stopPropagation=void 0,n._defaultSync?a():setTimeout(a,0),u.eventPhase=b,u._stopPropagation||(u._stopImmediatePropagation=void 0,u._stopPropagation=void 0,r.target.invokeCurrentListeners(r.target._lateListeners,r,o)),i(),!r.defaultPrevented};switch(t&&(u.target=this),r.eventPhase){default:case E:if(u.eventPhase=b,this.invokeCurrentListeners(this._earlyListeners,r,o),!this.__getParent)return u.eventPhase=b,this._dispatchEvent(r,!1);for(var s=this,l=this;s.__getParent&&null!==(s=s.__getParent());)u._children||(u._children=[]),u._children.push(l),l=s;return l._defaultSync=this._defaultSync,u.eventPhase=v,l._dispatchEvent(r,!1);case v:if(u._stopPropagation)return c();this.invokeCurrentListeners(this._listeners,r,o);var f=u._children&&u._children.length&&u._children.pop();return f&&f!==r.target||(u.eventPhase=b),f&&(f._defaultSync=this._defaultSync),(f||this)._dispatchEvent(r,!1);case b:return u._stopPropagation?c():(this.invokeCurrentListeners(this._listeners,r,o,!0),u.bubbles?(u.eventPhase=g,this._dispatchEvent(r,!1)):c());case g:if(u._stopPropagation)return c();var D=this.__getParent&&this.__getParent();return D?(D.invokeCurrentListeners(D._listeners,r,o,!0),D._defaultSync=this._defaultSync,D._dispatchEvent(r,!1)):c()}},invokeCurrentListeners:function(e,t,n,r){var u=this,o=C.get(t);o.currentTarget=this;var i=w(e,n,{}).listenersByType.concat(),a=i.length?1:0;return i.some((function(e,i){var c=r?u["on"+n]:null;if(o._stopImmediatePropagation)return!0;i===a&&"function"==typeof c&&u.tryCatch(t,(function(){!1===c.call(t.currentTarget,t)&&t.preventDefault()}));var s=e.options,l=s.once,f=s.passive,D=s.capture;if(o._passive=f,D&&t.target!==t.currentTarget&&t.eventPhase===v||t.eventPhase===b||!D&&t.target!==t.currentTarget&&t.eventPhase===g){var d=e.listener;u.tryCatch(t,(function(){d.call(t.currentTarget,t)})),l&&u.removeEventListener(n,d,s)}return!1})),this.tryCatch(t,(function(){var e=r?u["on"+n]:null;"function"==typeof e&&i.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,t){var n,r=e;"string"==typeof e&&(r=new Error("Uncaught exception: "+e));var u=!1;"undefined"==typeof window||"undefined"==typeof ErrorEvent||window&&"object"===("undefined"==typeof window?"undefined":h(window))&&!window.dispatchEvent?(u=!0,n=function(){setTimeout((function(){throw r}))}):n=function(){var t=new ErrorEvent("error",{error:e,message:r.message||"",
3
3
  // We can't get the actually useful user's values!
4
- filename:r.fileName||"",lineno:r.lineNumber||0,colno:r.columnNumber||0});window.dispatchEvent(t)},u&&this._legacyOutputDidListenersThrowCheck||n(),this._legacyOutputDidListenersThrowCheck&&(t.__legacyOutputDidListenersThrowError=r)}}),S.prototype[Symbol.toStringTag]="EventTargetPrototype",Object.defineProperty(S,"prototype",{writable:!1});var O=S,T={createInstance:function(e){function t(){this.__setOptions(e)}return t.prototype=O.prototype,new t}};S.ShimEvent=m,S.ShimCustomEvent=B,S.ShimDOMException=F,S.ShimEventTarget=S,S.EventTargetFactory=T;var x={},N={};["DEBUG","cacheDatabaseInstances","autoName","fullIDLSupport","checkOrigin","cursorPreloadPackSize","UnicodeIDStart","UnicodeIDContinue","registerSCA","avoidAutoShim","win","DEFAULT_DB_SIZE","useSQLiteIndexes","fs","addNonIDBGlobals","replaceNonIDBGlobals","escapeDatabaseName","unescapeDatabaseName","databaseCharacterEscapeList","databaseNameLengthLimit","escapeNFDForDatabaseNames","addSQLiteExtension",["memoryDatabase",function(e){if(!/^(?::memory:|file::memory:(\?(?:(?!#)[\s\S])*)?(#(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?)?$/.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"].forEach((function(e){var t;if(Array.isArray(e)){var n=l(e,2);e=n[0],t=n[1]}Object.defineProperty(N,e,{get:function(){return x[e]},set:function(n){t&&t(n),x[e]=n}})}));var j=/[\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]|\uD806\uDD38|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;function P(e){return e.replace(/((?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])))(?!(?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))|(^|(?:(?![\uD800-\uDBFF](?![\uDC00-\uDFFF]))[\s\S]))((?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g,(function(e,t,n,r){return t?"^2"+t.charCodeAt().toString(16).padStart(4,"0"):(n||"")+"^3"+r.charCodeAt().toString(16).padStart(4,"0")}))}function k(e){return"_"+P(e.replace(/\^/g,"^^").replace(/\0/g,"^0").replace(/([A-Z])/g,"^$1"))}function R(e){return P(e.replace(/\^/g,"^^").replace(/\0/g,"^0"))}function L(e){return function(e){return e.replace(/(\^+)3(d[0-9a-f]{3})/g,(function(e,t,n){return t.length%2?t.slice(1)+String.fromCharCode(Number.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(Number.parseInt(n,16)):e}))}(e).replace(/(\^+)0/g,(function(e,t){return t.length%2?t.slice(1)+"\0":e})).replace(/\^\^/g,"^")}function q(e){return e.replace(/"/g,'""')}function U(e){return'"'+q(e)+'"'}function M(e){if(N.escapeDatabaseName)return N.escapeDatabaseName(R(e));if(e="D"+k(e),!1!==N.escapeNFDForDatabaseNames&&(e=e.replace(new RegExp(j,"gu"),(function(e){return"^4"+e.codePointAt().toString(16).padStart(6,"0")}))),!1!==N.databaseCharacterEscapeList&&(e=e.replace(N.databaseCharacterEscapeList?new RegExp(N.databaseCharacterEscapeList,"gu"):/[\0-\x1F"\*\/:<>\?\\\|\x7F]/g,(function(e){return"^1"+e.charCodeAt().toString(16).padStart(2,"0")}))),!1!==N.databaseNameLengthLimit&&e.length>=(N.databaseNameLengthLimit||254)-(!1!==N.addSQLiteExtension?7:0))throw new Error("Unexpectedly long database name supplied; length limit required for Node compatibility; passed length: "+e.length+"; length limit setting: "+(N.databaseNameLengthLimit||254)+".");return e+(!1!==N.addSQLiteExtension?".sqlite":"")}function V(e){return U("S"+k(e))}function K(e){return U("I"+k(e))}function G(e){return"I"+k(e)}function H(e){return q(e).replace(/\^/g,"^^")}function W(e,t){return t[Symbol.hasInstance](e)}function Q(e){return e&&"object"===n(e)}function Y(e){return Q(e)&&"function"==typeof e[Symbol.iterator]}function $(e,t){t.forEach((function(t){var n,r,u=(n={},(r={})[t]=r[t]||{},r[t].get=function(){throw new TypeError("Illegal invocation")},r[t]=r[t]||{},r[t].set=function(e){throw new TypeError("Illegal invocation")},o(n,r),n),i=Object.getOwnPropertyDescriptor(u,t);Object.defineProperty(e,t,i)}))}function J(e,t){t.forEach((function(t){var n,r,u=(n={},(r={})[t]=r[t]||{},r[t].get=function(){throw new TypeError("Illegal invocation")},o(n,r),n),i=Object.getOwnPropertyDescriptor(u,t);Object.defineProperty(e,t,i)}))}function X(e,t){(t="string"==typeof t?[t]:t).forEach((function(t){var n,r,u=(n={},(r={})[t]=r[t]||{},r[t].get=function(){return e["__"+t]},r[t]=r[t]||{},r[t].set=function(n){e["__"+t]=n},o(n,r),n),i=Object.getOwnPropertyDescriptor(u,t);Object.defineProperty(e,t,i)})),t.forEach((function(t){e[t]=null}))}function z(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(t="string"==typeof t?[t]:t).forEach((function(t){var r,u,i;n&&t in n?r=n[t]:(Object.defineProperty(e,"__"+t,{enumerable:!1,configurable:!1,writable:!0}),u={},(i={})[t]=i[t]||{},i[t].get=function(){return this["__"+t]},o(u,i),r=u);var a=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,a)}))}function Z(e){var t=N.UnicodeIDStart||"[$A-Z_a-z]",n=N.UnicodeIDContinue||"[$0-9A-Z_a-z]";return new RegExp("^"+("(?:"+t+"|[$_])")+("(?:"+n+"|[$_‌‍])")+"*$","u").test(e)}function ee(e){return"string"==typeof e&&(""===e||Z(e)||e.split(".").every((function(e){return Z(e)})))}function te(e){return ee(e)||Array.isArray(e)&&e.length&&f(e).every((function(e){return ee(e)}))}function ne(e,t){var n,r;switch(e=Math.floor(Number(e)),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(!Number.isFinite(e)||e>n||e<r)throw new TypeError("Invalid range: "+e);return e}function re(e,t){return null===e&&t?"":ue(e)}function ue(e){return""+e}function oe(e){return Y(e)?f(e).map((function(e){return ue(e)})):ue(e)}function ie(e){return null==e}function ae(e,t,n){var r=new m(e,n);return r.debug=t,r}Object.defineProperty(m,Symbol.hasInstance,{value:function(e){return Q(e)&&"target"in e&&"boolean"==typeof e.bubbles}});function ce(e){m.call(this,e),this[Symbol.toStringTag]="IDBVersionChangeEvent",this.toString=function(){return"[object IDBVersionChangeEvent]"},this.__eventInitDict=arguments[1]||{}}function se(e,t){return new DOMException.prototype.constructor(t,e||"DOMException")}ce.prototype=Object.create(m.prototype),ce.prototype[Symbol.toStringTag]="IDBVersionChangeEventPrototype",["oldVersion","newVersion"].forEach((function(e){var t,n,r=(t={},(n={})[e]=n[e]||{},n[e].get=function(){if(!(this instanceof ce))throw new TypeError("Illegal invocation");return this.__eventInitDict&&this.__eventInitDict[e]||("oldVersion"===e?0:null)},o(t,n),t),u=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(ce.prototype,e,u)})),Object.defineProperty(ce,Symbol.hasInstance,{value:function(e){return Q(e)&&"oldVersion"in e&&"boolean"==typeof e.defaultPrevented}}),Object.defineProperty(ce.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:ce}),Object.defineProperty(ce,"prototype",{writable:!1});var le={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},fe={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 De=function(){function e(e,t){this[Symbol.toStringTag]="DOMException",this._code=t in le?le[t]:fe[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(le).forEach((function(t){Object.defineProperty(e.prototype,t,{enumerable:!0,configurable:!1,value:le[t]}),Object.defineProperty(e,t,{enumerable:!0,configurable:!1,value:le[t]})})),Object.keys(fe).forEach((function(t){Object.defineProperty(e.prototype,t,{enumerable:!0,configurable:!1,value:fe[t]}),Object.defineProperty(e,t,{enumerable:!0,configurable:!1,value:fe[t]})})),Object.defineProperty(e.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:e}),e}();function de(e,t,n){if(N.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 _e(e){return e&&"object"===n(e)&&"string"==typeof e.name}function pe(e){var t;if(e){if(1===e.length)return e[0];var n,r=_(e);try{for(r.s();!(n=r.n()).done;){var u=n.value;if(_e(u))return u;u&&"string"==typeof u.message&&(t=u)}}catch(t){r.e(t)}finally{r.f()}}return t}function ye(e){var t,n;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=ve(t,n);return r.sqlError=e,r}var he,Ee=!1;try{_e(he=se("test name","test message"))&&"test name"===he.name&&"test message"===he.message&&(Ee=!0)}catch(e){}var ve=Ee?function(e,t,n){return de(e,t,n),se(e,t)}:function(e,t,n){return de(e,t,n),function(e,t){return new De(t,e)}(e,t)},be=Ee?DOMException:De,ge=["onsuccess","onerror"],Fe=["source","transaction","readyState"],Ae=["result","error"];function Ce(){throw new TypeError("Illegal constructor")}Ce.__super=function(){this[Symbol.toStringTag]="IDBRequest",this.__setOptions({legacyOutputDidListenersThrowFlag:!0}),Ae.forEach((function(e){Object.defineProperty(this,"__"+e,{enumerable:!1,configurable:!1,writable:!0}),Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:function(){if(!this.__done)throw ve("InvalidStateError","Can't get "+e+"; the request is still pending.");return this["__"+e]}})}),this),z(this,Fe,{readyState:{get readyState(){return this.__done?"done":"pending"}}}),X(this,ge),this.__result=void 0,this.__error=this.__source=this.__transaction=null,this.__done=!1},Ce.__createInstance=function(){return new Ce.__super},Ce.prototype=T.createInstance({extraProperties:["debug"]}),Ce.prototype[Symbol.toStringTag]="IDBRequestPrototype",Ce.prototype.__getParent=function(){return"[object IDBOpenDBRequest]"===this.toString()?null:this.__transaction},J(Ce.prototype,Fe),J(Ce.prototype,Ae),$(Ce.prototype,ge),Object.defineProperty(Ce.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:Ce}),Ce.__super.prototype=Ce.prototype,Object.defineProperty(Ce,"prototype",{writable:!1});var me=["onblocked","onupgradeneeded"];function Be(){throw new TypeError("Illegal constructor")}Be.prototype=Object.create(Ce.prototype),Object.defineProperty(Be.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:Be});var we=Be;Be.__createInstance=function(){function e(){Ce.__super.call(this),this[Symbol.toStringTag]="IDBOpenDBRequest",this.__setOptions({legacyOutputDidListenersThrowFlag:!0,extraProperties:["oldVersion","newVersion","debug"]}),X(this,me)}return e.prototype=we.prototype,new e},$(Be.prototype,me),Be.prototype[Symbol.toStringTag]="IDBOpenDBRequestPrototype",Object.defineProperty(Be,"prototype",{writable:!1});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Ie(e){return e&&"function"==typeof e.then}function Se(e,t){e.then(null,t)}function Oe(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 r(e){t.c&&(Ie(e)?Se(e.then(r),r):n(e,1))}t.v=0,t.s=2,t.c=[[],[]];try{e((function e(u){t.c&&(Ie(u)?Se(u.then(e),r):n(u,0))}),r)}catch(e){r(e)}}var Te=Oe.prototype;Te.then=function(e,t){var n=this;return new Oe((function(r,u){var o="function"==typeof t?t:u;function i(){try{r(e?e(n.v):n.v)}catch(e){o(e)}}0===n.s?i():1===n.s?o(n.v):(n.c[0].push(i),n.c[1].push(o))}))},Te.catch=function(e){var t=this;return new Oe((function(n,r){function u(){try{n(e(t.v))}catch(e){r(e)}}1===t.s?u():0===t.s?n(t.v):(t.c[1].push(u),t.c[0].push(n))}))},Oe.all=function(e){return new Oe((function(t,n,r){r=e.length;var u=[];r?e.forEach((function(o,i){Ie(o)?Se(o.then((function(e){u[i]=e,--r||t(u)})),n):(u[i]=o,--r||t(e))})):t(u)}))},Oe.race=function(e){var t=!1;return new Oe((function(n,r){e.some((function(e,u){if(!Ie(e))return n(e),t=!0,!0;Se(e.then((function(e){t||(n(e),t=!0)})),r)}))}))},Oe.resolve=function(e){return new Oe((function(t,n){t(e)}))},Oe.reject=function(e){return new Oe((function(t,n){n(e)}))};var xe=Oe;function Ne(e,t){var r=ot(e),u=ot(t),o=r>u?1:r===u?0:-1;if(N.DEBUG){var i=it(r),a=it(u);"object"===n(e)&&(e=JSON.stringify(e),i=JSON.stringify(i)),"object"===n(t)&&(t=JSON.stringify(t),a=JSON.stringify(a)),i!==e&&console.warn(e+" was incorrectly encoded as "+i),a!==t&&console.warn(t+" was incorrectly encoded as "+a)}return o}var je={invalid:100,number:200,date:300,string:400,binary:500,array:600},Pe=Object.keys(je);Pe.forEach((function(e){je[e]=String.fromCharCode(je[e])}));var ke=Pe.reduce((function(e,t){return e[je[t]]=t,e}),{}),Re=["negativeInfinity","bigNegative","smallNegative","smallPositive","bigPositive","positiveInfinity"],Le={invalid:{encode:function(e){return je.invalid+"-"},decode:function(e){}},number:{encode:function(e){var t,n,r,u=e===Number.MIN_VALUE?"0."+"0".repeat(214)+"2":Math.abs(e).toString(32),o=u.indexOf("."),i=(u=-1!==o?u.replace(".",""):u).search(/(?:(?!0)[\s\S])/);return u=u.slice(i),Number.isFinite(Number(e))?e<0?e>-1?(t=Re.indexOf("smallNegative"),n=qe(i),r=Me(Ue(u))):(t=Re.indexOf("bigNegative"),n=Me(qe(-1!==o?o:u.length)),r=Me(Ue(u))):e<1?(t=Re.indexOf("smallPositive"),n=Me(qe(i)),r=Ue(u)):(t=Re.indexOf("bigPositive"),n=qe(-1!==o?o:u.length),r=Ue(u)):(n=Ge(2),r=Ge(11),t=Re.indexOf(e>0?"positiveInfinity":"negativeInfinity")),je.number+"-"+t+n+r},decode:function(e){var t=Number(e.slice(2,3)),n=e.slice(3,5),r=e.slice(5,16);switch(Re[t]){case"negativeInfinity":return Number.NEGATIVE_INFINITY;case"positiveInfinity":return Number.POSITIVE_INFINITY;case"bigPositive":return Ve(r,n);case"smallPositive":return Ve(r,n=He(Me(n)));case"smallNegative":return n=He(n),-Ve(r=Me(r),n);case"bigNegative":return n=Me(n),-Ve(r=Me(r),n);default:throw new Error("Invalid number.")}}},string:{encode:function(e,t){return t&&(e=e.replace(/((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g,"-$1")+" "),je.string+"-"+e},decode:function(e,t){return e=e.slice(2),t&&(e=e.slice(0,-1).replace(/\x2D((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g,"$1")),e}},array:{encode:function(e){var t,n=[],r=_(e.entries());try{for(r.s();!(t=r.n()).done;){var u=l(t.value,2),o=u[0],i=ot(u[1],!0);n[o]=i}}catch(e){r.e(e)}finally{r.f()}return n.push(je.invalid+"-"),je.array+"-"+JSON.stringify(n)},decode:function(e){var t=JSON.parse(e.slice(2));t.pop();for(var n=0;n<t.length;n++){var r=it(t[n],!0);t[n]=r}return t}},date:{encode:function(e){return je.date+"-"+e.toJSON()},decode:function(e){return new Date(e.slice(2))}},binary:{encode:function(e){return je.binary+"-"+(e.byteLength?f(Ye(e)).map((function(e){return String(e).padStart(3,"0")})):"")},decode:function(e){var t=e.slice(2),n=t.length?t.split(",").map((function(e){return Number.parseInt(e)})):[],r=new ArrayBuffer(n.length);return new Uint8Array(r).set(n),r}}};function qe(e){return 1===(e=e.toString(32)).length?"0"+e:e}function Ue(e){return(e+Ge(11)).slice(0,11)}function Me(e){var t,n="",r=_(e);try{for(r.s();!(t=r.n()).done;){var u=t.value;n+=(31-Number.parseInt(u,32)).toString(32)}}catch(e){r.e(e)}finally{r.f()}return n}function Ve(e,t){if((t=Number.parseInt(t,32))<0)return Ke(Number.parseInt(e,32)*Math.pow(32,t-10));if(t<11){var n=e.slice(0,t);n=Number.parseInt(n,32);var r=e.slice(t);return Ke(n+(r=Number.parseInt(r,32)*Math.pow(32,t-11)))}var u=e+Ge(t-11);return Number.parseInt(u,32)}function Ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;return Number.parseFloat(e.toPrecision(t))}function Ge(e){return"0".repeat(e)}function He(e){return"-"+e}function We(e){if(Array.isArray(e))return"array";if(Q(t=e)&&"function"==typeof t.getDate)return"date";var t;if(function(e){return Q(e)&&"number"==typeof e.byteLength&&("function"==typeof e.slice||"function"==typeof e.getFloat64)}(e))return"binary";var r=n(e);return["string","number"].includes(r)?r:"invalid"}function Qe(e,t){return $e(e,t,!1,!0)}function Ye(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 $e(e,t,r,u){if((t=t||[]).includes(e))return{type:"array",invalid:!0,message:"An array key cannot be circular"};var o=We(e),i={type:o,value:e};switch(o){case"number":return Number.isNaN(e)?{type:"NaN",invalid:!0}:i;case"string":return i;case"binary":return{type:"binary",value:Ye(e)};case"array":var a=e.length;t.push(e);for(var c=[],s=0;s<a;s++){if(!r&&!Object.prototype.hasOwnProperty.call(e,s))return{type:o,invalid:!0,message:"Does not have own index property"};try{var l=function(){var n=$e(e[s],t,!1,u);if(n.invalid)return r?"continue":{v:{type:o,invalid:!0,message:"Bad array entry value-to-key conversion"}};(!r||!u&&c.every((function(e){return 0!==Ne(e,n.value)}))||u&&c.every((function(e){return 0!==Ne(e,n)})))&&c.push(u?n:n.value)}();if("continue"===l)continue;if("object"===n(l))return l.v}catch(e){if(!r)throw e}}return{type:o,value:c};case"date":return Number.isNaN(e.getTime())?{type:o,invalid:!0,message:"Not a valid date"}:u?{type:o,value:e.getTime()}:{type:o,value:new Date(e.getTime())};case"invalid":default:var f=null===e?"null":n(e);return{type:f,invalid:!0,message:"Not a valid key; type "+f}}}function Je(e,t){return $e(e,null,!0,t)}function Xe(e,t){var n=Qe(e,t);if(n.invalid)throw ve("DataError",n.message||"Not a valid key; type: "+n.type);return n}function ze(e,t,n,r){var u=Ze(e,t);return u.failure?u:n?Je(u.value,r):$e(u.value,null,!1,r)}function Ze(e,t,n,r){if(Array.isArray(t)){var u=[];return t.some((function(t){var n=Ze(e,t);return!!n.failure||(u.push(n.value),!1)}))?{failure:!0}:{value:u}}return""===t?{value:e}:t.split(".").some((function(t,n){if("length"!==t||"string"!=typeof e&&!Array.isArray(e))if(Q(r=e)&&"number"==typeof r.size&&"function"==typeof r.slice&&!("lastModified"in r))switch(t){case"size":case"type":e=e[t]}else{if(!function(e){return Q(e)&&"string"==typeof e.name&&"function"==typeof e.slice&&"lastModified"in e}(e))return!Q(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;var r;return!1}))?{failure:!0}:{value:e}}function et(e,t,n){var r=n.split("."),u=r.pop();r.forEach((function(t){Object.prototype.hasOwnProperty.call(e,t)||(e[t]={}),e=e[t]})),e[u]=t}function tt(e,t){var n=t.split(".");n.pop();var r,u=_(n);try{for(u.s();!(r=u.n()).done;){var o=r.value;if(!Q(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,o))return!0;e=e[o]}}catch(e){u.e(e)}finally{u.f()}return Q(e)}function nt(e,t,n){var r=void 0===t.lower,u=void 0===t.upper,o=ot(e,!0),i=n?t.__lowerCached:ot(t.lower,!0),a=n?t.__upperCached:ot(t.upper,!0);return void 0!==t.lower&&(t.lowerOpen&&o>i&&(r=!0),!t.lowerOpen&&o>=i&&(r=!0)),void 0!==t.upper&&(t.upperOpen&&o<a&&(u=!0),!t.upperOpen&&o<=a&&(u=!0)),r&&u}function rt(e,t){return"array"===ke[t.slice(0,1)]?t.indexOf(e)>1:t===e}function ut(e,t){var n=[];if(Array.isArray(e)){var r,u=_(e);try{for(u.s();!(r=u.n()).done;){var o=r.value;if(Array.isArray(o)){if(t&&t.lower===t.upper)continue;if(1!==o.length){ut(o,t).length>0&&n.push(o);continue}o=o[0]}(ie(t)||nt(o,t,!0))&&n.push(o)}}catch(e){u.e(e)}finally{u.f()}}else(ie(t)||nt(e,t,!0))&&n.push(e);return n}function ot(e,t){return void 0===e?null:Le[We(e)].encode(e,t)}function it(e,t){if("string"==typeof e)return Le[ke[e.slice(0,1)]].decode(e,t)}function at(e,t){return it(ot(e,t),t)}var ct=9007199254740992;function st(e,t,n,r){e.executeSql('SELECT "currNum" FROM __sys__ WHERE "name" = ?',[R(t.__currentName)],(function(e,t){1!==t.rows.length?n(1):n(t.rows.item(0).currNum)}),(function(e,t){r(ve("DataError","Could not get the auto increment value for key",t))}))}function lt(e,t,n,r,u){var o='UPDATE __sys__ SET "currNum" = ? WHERE "name" = ?',i=[n,R(t.__currentName)];N.DEBUG&&console.log(o,i),e.executeSql(o,i,(function(e,t){r(n)}),(function(e,t){u(ve("UnknownError","Could not set the auto increment value for key",t))}))}function ft(e,t,n,r,u){return lt(e,t,n=n===ct?n+2:n+1,r,u)}function Dt(e,t,n,r){st(e,t,(function(u){u>ct?n("failure"):ft(e,t,u,(function(){n(null,u,u)}),r)}),r)}function dt(e,t,n,r,u){"number"!=typeof n||n<1?r():st(e,t,(function(o){var i=Math.floor(Math.min(n,ct));i>=o?ft(e,t,i,(function(){r(o)}),u):r()}),u)}var _t=Object.freeze({__proto__:null,encode:ot,decode:it,roundTrip:at,convertKeyToValue:function e(t){var n=t.type,r=t.value;switch(n){case"number":case"string":return r;case"array":for(var u=[],o=r.length,i=0;i<o;){var a=e(r[i]);u[i]=a,i++}return u;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")}},convertValueToKeyValueDecoded:$e,convertValueToMultiEntryKeyDecoded:Je,convertValueToKey:Qe,convertValueToMultiEntryKey:function(e){return $e(e,null,!0,!0)},convertValueToKeyRethrowingAndIfInvalid:Xe,extractKeyFromValueUsingKeyPath:function(e,t,n){return ze(e,t,n,!0)},evaluateKeyPathOnValue:function(e,t,n){return Ze(e,t)},extractKeyValueDecodedFromValueUsingKeyPath:ze,injectKeyIntoValueUsingKeyPath:et,checkKeyCouldBeInjectedIntoValue:tt,isMultiEntryMatch:rt,isKeyInRange:nt,findMultiEntryMatches:ut,assignCurrentNumber:lt,generateKeyForStore:Dt,possiblyUpdateKeyGenerator:dt});function pt(){throw new TypeError("Illegal constructor")}var yt,ht=pt;function Et(e,t,n,r,u,o){if(e&&(void 0!==e.lower||void 0!==e.upper)){var i,a;u&&n.push("AND");var c=void 0!==e.lower,s=void 0!==e.upper;if(c&&(i=o?e.__lowerCached:ot(e.lower)),s&&(a=o?e.__upperCached:ot(e.upper)),c){if(r.push(R(i)),s&&i===a&&!e.lowerOpen&&!e.upperOpen)return void n.push(t,"=","?");n.push(t,e.lowerOpen?">":">=","?")}c&&s&&n.push("AND"),s&&(n.push(t,e.upperOpen?"<":"<=","?"),r.push(R(a)))}}function vt(e,t){if(W(e,pt))return"[object IDBKeyRange]"!==e.toString()?pt.__createInstance(e.lower,e.upper,e.lowerOpen,e.upperOpen):e;if(!ie(e))return Xe(e),pt.only(e);if(t)throw ve("DataError","No key or range was specified")}pt.__createInstance=function(e,t,n,r){function u(){if(this[Symbol.toStringTag]="IDBKeyRange",void 0===e&&void 0===t)throw ve("DataError","Both arguments to the key range method cannot be undefined");var u,o;if(void 0!==e&&(u=at(e),Xe(e)),void 0!==t&&(o=at(t),Xe(t)),void 0!==e&&void 0!==t&&e!==t&&ot(e)>ot(t))throw ve("DataError","`lower` must not be greater than `upper` argument in `bound()` call.");this.__lower=u,this.__upper=o,this.__lowerOpen=Boolean(n),this.__upperOpen=Boolean(r)}return u.prototype=ht.prototype,new u},pt.prototype.includes=function(e){if(!Q(this)||"boolean"!=typeof this.__lowerOpen)throw new TypeError("Illegal invocation");if(!arguments.length)throw new TypeError("IDBKeyRange.includes requires a key argument");return Xe(e),nt(e,this)},pt.only=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.only requires a value argument");return pt.__createInstance(e,e,!1,!1)},pt.lowerBound=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.lowerBound requires a value argument");return pt.__createInstance(e,void 0,arguments[1],!0)},pt.upperBound=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.upperBound requires a value argument");return pt.__createInstance(void 0,e,!0,arguments[1])},pt.bound=function(e,t){if(arguments.length<=1)throw new TypeError("IDBKeyRange.bound requires lower and upper arguments");return pt.__createInstance(e,t,arguments[2],arguments[3])},pt.prototype[Symbol.toStringTag]="IDBKeyRangePrototype",["lower","upper","lowerOpen","upperOpen"].forEach((function(e){var t,n;Object.defineProperty(pt.prototype,"__"+e,{enumerable:!1,configurable:!1,writable:!0});var r=(t={},(n={})[e]=n[e]||{},n[e].get=function(){if(!Q(this)||"boolean"!=typeof this.__lowerOpen)throw new TypeError("Illegal invocation");return this["__"+e]},o(t,n),t),u=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(pt.prototype,e,u)})),Object.defineProperty(pt,Symbol.hasInstance,{value:function(e){return Q(e)&&"upper"in e&&"boolean"==typeof e.lowerOpen}}),Object.defineProperty(pt,"prototype",{writable:!1});var bt=!1,gt={test:!0};if(Object.defineProperty)try{Object.defineProperty(gt,"test",{enumerable:!1}),gt.test&&(bt=!0)}catch(e){}var Ft=function(){throw new TypeError("Illegal constructor")};Ft.prototype=(i(yt={constructor:Ft,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=Ft.__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(Number.parseInt(t))&&delete this[t];this.sortList()}},Symbol.toStringTag,"DOMStringListPrototype"),i(yt,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)}))),yt),Object.defineProperty(Ft,Symbol.hasInstance,{value:function(e){return"DOMStringListPrototype"===Object.prototype.toString.call(e)}});var At=Ft;if(Object.defineProperty(Ft,"__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=At.prototype,new e}}),bt){Object.defineProperty(Ft,"prototype",{writable:!1});["addIndexes","sortList","forEach","map","indexOf","push","splice","constructor","__createInstance"].forEach((function(e){Object.defineProperty(Ft.prototype,e,{enumerable:!1})})),Object.defineProperty(Ft.prototype,"length",{configurable:!0,enumerable:!0,get:function(){throw new TypeError("Illegal invocation")}});["_items","_length"].forEach((function(e){Object.defineProperty(Ft.prototype,e,{enumerable:!1,writable:!0})}))}var Ct=0,mt=["onabort","oncomplete","onerror"],Bt=["objectStoreNames","mode","db","error"];function wt(){throw new TypeError("Illegal constructor")}var It=wt;wt.__createInstance=function(e,t,n){function r(){var r=this,u=this;u[Symbol.toStringTag]="IDBTransaction",z(u,Bt),u.__id=++Ct,u.__active=!0,u.__running=!1,u.__errored=!1,u.__requests=[],u.__objectStoreNames=t,u.__mode=n,u.__db=e,u.__error=null,u.__setOptions({legacyOutputDidListenersThrowFlag:!0}),Bt.forEach((function(e){Object.defineProperty(r,e,{configurable:!0})})),X(this,mt),u.__storeHandles={},setTimeout((function(){u.__executeRequests()}),0)}return r.prototype=It.prototype,new r},wt.prototype=T.createInstance({defaultSync:!0,extraProperties:["complete"]}),wt.prototype.__transFinishedCb=function(e,t){t(Boolean(e))},wt.prototype.__executeRequests=function(){var e=this;e.__running?N.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,r=-1;function u(t,r){if(!e.__errored&&!e.__requestsFinished&&(r&&(n.req=r),!n.req.__done)){n.req.__done=!0,n.req.__result=t,n.req.__error=null,e.__active=!0;var u=ae("success");if(n.req.dispatchEvent(u),u.__legacyOutputDidListenersThrowError)return de("Error","An error occurred in a success handler attached to request chain",u.__legacyOutputDidListenersThrowError),void e.__abortTransaction(ve("AbortError","A request was aborted (in user handler after success)."));i()}}function o(){if(!(e.__errored||e.__requestsFinished||n.req&&n.req.__done)){for(var t=arguments.length,r=new Array(t),u=0;u<t;u++)r[u]=arguments[u];var o=pe(r);if(n.req){n.req.__done=!0,n.req.__error=o,n.req.__result=void 0,n.req.addLateEventListener("error",(function(e){e.cancelable&&e.defaultPrevented&&!e.__legacyOutputDidListenersThrowError&&i()})),n.req.addDefaultEventListener("error",(function(){e.__abortTransaction(n.req.__error)})),e.__active=!0;var a=ae("error",o,{bubbles:!0,cancelable:!0});n.req.dispatchEvent(a),a.__legacyOutputDidListenersThrowError&&(de("Error","An error occurred in an error handler attached to request chain",a.__legacyOutputDidListenersThrowError),a.preventDefault(),e.__abortTransaction(ve("AbortError","A request was aborted (in user handler after error).")))}else e.__abortTransaction(o)}}function i(){if(!e.__errored&&!e.__requestsFinished)if(++r>=e.__requests.length)e.__requests=[],e.__active&&function(){function t(){e.__completed=!0,N.DEBUG&&console.log("Transaction completed");var t=ae("complete");try{e.__internal=!0,e.dispatchEvent(t),e.__internal=!1,e.dispatchEvent(ae("__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=ae("__beforecomplete");n.complete=t,e.dispatchEvent(n)}();else try{if(!(n=e.__requests[r]).req)return void n.op(t,n.args,i,o);if(n.req.__done)return;n.op(t,n.args,u,o,i)}catch(e){o(e)}}i()}),(function(t){if(!0!==t){var n=ye(t);e.__abortTransaction(n)}}),(function(){e.__transFinishedCb===wt.prototype.__transFinishedCb&&(e.__transactionEndCallback||e.__requestsFinished?e.__transactionEndCallback&&!e.__completed&&e.__transFinishedCb(e.__errored,e.__transactionEndCallback):e.__transactionFinished=!0)}),(function(t,n,r,u,o){return!(!t.readOnly&&!n)||(e.__transFinishedCb=function(e,t){e?u(e,t):o(t)},e.__transactionEndCallback&&!e.__completed&&e.__transFinishedCb(e.__errored,e.__transactionEndCallback),!1)})))},wt.prototype.__createRequest=function(e){var t=Ce.__createInstance();return t.__source=void 0!==e?e:this.db,t.__transaction=this,t},wt.prototype.__addToTransactionQueue=function(e,t,n){var r=this.__createRequest(n);return this.__pushToQueue(r,e,t),r},wt.prototype.__addNonRequestToTransactionQueue=function(e,t,n){this.__pushToQueue(null,e,t)},wt.prototype.__pushToQueue=function(e,t,n){this.__assertActive(),this.__requests.push({op:t,args:n,req:e})},wt.prototype.__assertActive=function(){if(!this.__active)throw ve("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished")},wt.prototype.__assertWritable=function(){if("readonly"===this.mode)throw ve("ReadOnlyError","The transaction is read only")},wt.prototype.__assertVersionChange=function(){wt.__assertVersionChange(this)},wt.prototype.objectStore=function(e){var t=this;if(!(t instanceof wt))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No object store name was specified");if(wt.__assertNotFinished(t),-1===t.__objectStoreNames.indexOf(e))throw ve("NotFoundError",e+" is not participating in this transaction");var n=t.db.__objectStores[e];if(!n)throw ve("NotFoundError",e+" does not exist in "+t.db.name);return(!t.__storeHandles[e]||t.__storeHandles[e].__pendingDelete||t.__storeHandles[e].__deleted)&&(t.__storeHandles[e]=Un.__clone(n,t)),t.__storeHandles[e]},wt.prototype.__abortTransaction=function(e){var t=this;function n(n,r){n?r&&"number"==typeof r.code?N.DEBUG&&console.log("Rollback erred; feature is probably not supported as per WebSQL",t):N.DEBUG&&console.log("Rollback succeeded",t):N.DEBUG&&console.log("Rollback not possible due to missing transaction",t),t.dispatchEvent(ae("__preabort")),t.__requests.filter((function(e,t,n){return e.req&&!e.req.__done&&[t,-1].includes(n.map((function(e){return e.req})).lastIndexOf(e.req))})).reduce((function(e,t){return e.then((function(){t.req.__done=!0,t.req.__result=void 0,t.req.__error=ve("AbortError","A request was aborted (an unfinished request).");var e=ae("error",t.req.__error,{bubbles:!0,cancelable:!0});return new xe((function(n){setTimeout((function(){t.req.dispatchEvent(e),n()}))}))}))}),xe.resolve()).then((function(){var n=ae("abort",e,{bubbles:!0,cancelable:!1});setTimeout((function(){t.__abortFinished=!0,t.dispatchEvent(n),t.__storeHandles={},t.dispatchEvent(ae("__abort"))}))})).catch((function(e){throw console.log("Abort error"),e}))}de("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})})))},wt.prototype.abort=function(){var e=this;if(!(e instanceof wt))throw new TypeError("Illegal invocation");N.DEBUG&&console.log("The transaction was aborted",e),wt.__assertNotFinished(e),e.__abortTransaction(null)},wt.prototype[Symbol.toStringTag]="IDBTransactionPrototype",wt.__assertVersionChange=function(e){if(!e||"versionchange"!==e.mode)throw ve("InvalidStateError","Not a version transaction")},wt.__assertNotVersionChange=function(e){if(e&&"versionchange"===e.mode)throw ve("InvalidStateError","Cannot be called during a version transaction")},wt.__assertNotFinished=function(e){if(!e||e.__completed||e.__abortFinished||e.__errored)throw ve("InvalidStateError","Transaction finished by commit or abort")},wt.__assertNotFinishedObjectStoreMethod=function(e){try{wt.__assertNotFinished(e)}catch(t){if(e&&!e.__completed&&!e.__abortFinished)throw ve("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished");throw t}},wt.__assertActive=function(e){if(!e||!e.__active)throw ve("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished")},wt.prototype.__getParent=function(){return this.db},$(wt.prototype,mt),J(wt.prototype,Bt),Object.defineProperty(wt.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:wt}),Object.defineProperty(wt,"prototype",{writable:!1});var St={exports:{}};!function(e,t){e.exports=function(){function e(t){return(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 t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){return l(e)||D(e,t)||d(e,t)||y()}function c(e){return s(e)||f(e)||d(e)||p()}function s(e){if(Array.isArray(e))return _(e)}function l(e){if(Array.isArray(e))return e}function f(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function D(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,u=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){u=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(u)throw o}}return n}}function d(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var h=function e(n){t(this,e),this.p=new Promise(n)};h.__typeson__type__="TypesonPromise","undefined"!=typeof Symbol&&(h.prototype[Symbol.toStringTag]="TypesonPromise"),h.prototype.then=function(e,t){var n=this;return new h((function(r,u){n.p.then((function(t){r(e?e(t):t)})).catch((function(e){return t?t(e):Promise.reject(e)})).then(r,u)}))},h.prototype.catch=function(e){return this.then(null,e)},h.resolve=function(e){return new h((function(t){t(e)}))},h.reject=function(e){return new h((function(t,n){n(e)}))},["all","race","allSettled"].forEach((function(e){h[e]=function(t){return new h((function(n,r){Promise[e](t.map((function(e){return e&&e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e}))).then(n,r)}))}}));var E={}.toString,v={}.hasOwnProperty,b=Object.getPrototypeOf,g=v.toString;function F(e,t){return w(e)&&"function"==typeof e.then&&(!t||"function"==typeof e.catch)}function A(e){return E.call(e).slice(8,-1)}function C(t,n){if(!t||"object"!==e(t))return!1;var r=b(t);if(!r)return null===n;var u=v.call(r,"constructor")&&r.constructor;return"function"!=typeof u?null===n:n===u||null!==n&&g.call(u)===g.call(n)||"function"==typeof n&&"string"==typeof u.__typeson__type__&&u.__typeson__type__===n.__typeson__type__}function m(e){return!(!e||"Object"!==A(e))&&(!b(e)||C(e,Object))}function B(e){if(!e||"Object"!==A(e))return!1;var t=b(e);return!t||C(e,Object)||B(t)}function w(t){return t&&"object"===e(t)}function I(e){return e.replace(/~/g,"~0").replace(/\./g,"~1")}function S(e){return e.replace(/~1/g,".").replace(/~0/g,"~")}function O(e,t){if(""===t)return e;var n=t.indexOf(".");if(n>-1){var r=e[S(t.slice(0,n))];return void 0===r?void 0:O(r,t.slice(n+1))}return e[S(t)]}function T(e,t,n){if(""===t)return n;var r=t.indexOf(".");return r>-1?T(e[S(t.slice(0,r))],t.slice(r+1),n):(e[S(t)]=n,e)}function x(t){return null===t?"null":Array.isArray(t)?"array":e(t)}function N(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var j=Object.keys,P=Array.isArray,k={}.hasOwnProperty,R=["type","replaced","iterateIn","iterateUnsetNumeric"];function L(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function q(e,t){var n=e();return n&&n.then?n.then(t):t(n)}function U(e,t){if(""===e.keypath)return-1;var n=e.keypath.match(/\./g)||0,r=t.keypath.match(/\./g)||0;return n&&(n=n.length),r&&(r=r.length),n>r?-1:n<r?1:e.keypath<t.keypath?-1:e.keypath>t.keypath}var M=function(){function n(e){t(this,n),this.options=e,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return r(n,[{key:"stringify",value:function(e,t,n,r){r=i(i(i({},this.options),r),{},{stringification:!0});var u=this.encapsulate(e,null,r);return P(u)?JSON.stringify(u[0],t,n):u.then((function(e){return JSON.stringify(e,t,n)}))}},{key:"stringifySync",value:function(e,t,n,r){return this.stringify(e,t,n,i(i({throwOnBadSyncType:!0},r),{},{sync:!0}))}},{key:"stringifyAsync",value:function(e,t,n,r){return this.stringify(e,t,n,i(i({throwOnBadSyncType:!0},r),{},{sync:!1}))}},{key:"parse",value:function(e,t,n){return n=i(i(i({},this.options),n),{},{parse:!0}),this.revive(JSON.parse(e,t),n)}},{key:"parseSync",value:function(e,t,n){return this.parse(e,t,i(i({throwOnBadSyncType:!0},n),{},{sync:!0}))}},{key:"parseAsync",value:function(e,t,n){return this.parse(e,t,i(i({throwOnBadSyncType:!0},n),{},{sync:!1}))}},{key:"specialTypeNames",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.returnTypeNames=!0,this.encapsulate(e,t,n)}},{key:"rootTypeName",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.iterateNone=!0,this.encapsulate(e,t,n)}},{key:"encapsulate",value:function(t,r,u){var o=L((function(e,t){return N(Promise.all(t.map((function(e){return e[1].p}))),(function(n){return N(Promise.all(n.map(L((function(n){var r=!1,u=[],i=a(t.splice(0,1),1),c=a(i[0],7),s=c[0],l=c[2],f=c[3],D=c[4],d=c[5],_=c[6],p=g(s,n,l,f,u,!0,_),y=C(p,h);return q((function(){if(s&&y)return N(p.p,(function(t){return D[d]=t,r=!0,o(e,u)}))}),(function(t){return r?t:(s?D[d]=p:e=y?p.p:p,o(e,u))}))})))),(function(){return e}))}))})),s=(u=i(i({sync:!0},this.options),u)).sync,l=this,f={},D=[],d=[],_=[],p=!("cyclic"in u)||u.cyclic,y=u.encapsulateObserver,E=g("",t,p,r||{},_);function v(e){var t=Object.values(f);if(u.iterateNone)return t.length?t[0]:n.getJSONType(e);if(t.length){if(u.returnTypeNames)return c(new Set(t));e&&m(e)&&!k.call(e,"$types")?e.$types=f:e={$:e,$types:{$:f}}}else w(e)&&k.call(e,"$types")&&(e={$:e,$types:!0});return!u.returnTypeNames&&e}function b(e,t,n){Object.assign(e,t);var r=R.map((function(t){var n=e[t];return delete e[t],n}));n(),R.forEach((function(t,n){e[t]=r[n]}))}function g(t,r,o,i,a,c,s){var _,p={},E=e(r),v=y?function(e){var u=s||i.type||n.getJSONType(r);y(Object.assign(e||p,{keypath:t,value:r,cyclic:o,stateObj:i,promisesData:a,resolvingTypesonPromise:c,awaitingTypesonPromise:C(r,h)},{type:u}))}:null;if(["string","boolean","number","undefined"].includes(E))return void 0===r||Number.isNaN(r)||r===Number.NEGATIVE_INFINITY||r===Number.POSITIVE_INFINITY?(_=i.replaced?r:F(t,r,i,a,!1,c,v))!==r&&(p={replaced:_}):_=r,v&&v(),_;if(null===r)return v&&v(),r;if(o&&!i.iterateIn&&!i.iterateUnsetNumeric&&r&&"object"===e(r)){var A=D.indexOf(r);if(!(A<0))return f[t]="#",v&&v({cyclicKeypath:d[A]}),"#"+d[A];!0===o&&(D.push(r),d.push(t))}var B,w=m(r),S=P(r),O=(w||S)&&(!l.plainObjectReplacers.length||i.replaced)||i.iterateIn?r:F(t,r,i,a,w||S,null,v);if(O!==r?(_=O,p={replaced:O}):""===t&&C(r,h)?(a.push([t,r,o,i,void 0,void 0,i.type]),_=r):S&&"object"!==i.iterateIn||"array"===i.iterateIn?(B=new Array(r.length),p={clone:B}):(["function","symbol"].includes(e(r))||"toJSON"in r||C(r,h)||C(r,Promise)||C(r,ArrayBuffer))&&!w&&"object"!==i.iterateIn?_=r:(B={},i.addLength&&(B.length=r.length),p={clone:B}),v&&v(),u.iterateNone)return B||_;if(!B)return _;if(i.iterateIn){var T=function(e){var n={ownKeys:k.call(r,e)};b(i,n,(function(){var n=t+(t?".":"")+I(e),u=g(n,r[e],Boolean(o),i,a,c);C(u,h)?a.push([n,u,Boolean(o),i,B,e,i.type]):void 0!==u&&(B[e]=u)}))};for(var x in r)T(x);v&&v({endIterateIn:!0,end:!0})}else j(r).forEach((function(e){var n=t+(t?".":"")+I(e);b(i,{ownKeys:!0},(function(){var t=g(n,r[e],Boolean(o),i,a,c);C(t,h)?a.push([n,t,Boolean(o),i,B,e,i.type]):void 0!==t&&(B[e]=t)}))})),v&&v({endIterateOwn:!0,end:!0});if(i.iterateUnsetNumeric){for(var N=r.length,R=function(e){if(!(e in r)){var n=t+(t?".":"")+e;b(i,{ownKeys:!1},(function(){var t=g(n,void 0,Boolean(o),i,a,c);C(t,h)?a.push([n,t,Boolean(o),i,B,e,i.type]):void 0!==t&&(B[e]=t)}))}},L=0;L<N;L++)R(L);v&&v({endIterateUnsetNumeric:!0,end:!0})}return B}function F(e,t,n,r,u,o,i){for(var a=u?l.plainObjectReplacers:l.nonplainObjectReplacers,c=a.length;c--;){var D=a[c];if(D.test(t,n)){var d=D.type;if(l.revivers[d]){var _=f[e];f[e]=_?[d].concat(_):d}return Object.assign(n,{type:d,replaced:!0}),!s&&D.replaceAsync||D.replace?(i&&i({replacing:!0}),g(e,D[s||!D.replaceAsync?"replace":"replaceAsync"](t,n),p&&"readonly",n,r,o,d)):(i&&i({typeDetected:!0}),g(e,t,p&&"readonly",n,r,o,d))}}return t}return _.length?s&&u.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():Promise.resolve(o(E,_)).then(v):!s&&u.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():u.stringification&&s?[v(E)]:s?v(E):Promise.resolve(v(E))}},{key:"encapsulateSync",value:function(e,t,n){return this.encapsulate(e,t,i(i({throwOnBadSyncType:!0},n),{},{sync:!0}))}},{key:"encapsulateAsync",value:function(e,t,n){return this.encapsulate(e,t,i(i({throwOnBadSyncType:!0},n),{},{sync:!1}))}},{key:"revive",value:function(e,t){var n=e&&e.$types;if(!n)return e;if(!0===n)return e.$;var r=(t=i(i({sync:!0},this.options),t)).sync,u=[],o={},c=!0;n.$&&m(n.$)&&(e=e.$,n=n.$,c=!1);var s=this;function l(e,t){var n=a(s.revivers[e]||[],1)[0];if(!n)throw new Error("Unregistered type: "+e);return r&&!("revive"in n)?t:n[r&&n.revive?"revive":!r&&n.reviveAsync?"reviveAsync":"revive"](t,o)}function f(){var t=[];if(Object.entries(n).forEach((function(e){var r=a(e,2),u=r[0],o=r[1];"#"!==o&&[].concat(o).forEach((function(e){a(s.revivers[e]||[null,{}],2)[1].plain&&(t.push({keypath:u,type:e}),delete n[u])}))})),t.length)return t.sort(U).reduce((function t(n,r){var u=r.keypath,o=r.type;if(F(n))return n.then((function(e){return t(e,{keypath:u,type:o})}));var i=O(e,u);if(C(i=l(o,i),h))return i.then((function(t){var n=T(e,u,t);n===t&&(e=n)}));var a=T(e,u,i);a===i&&(e=a)}),void 0)}var D=[];function d(e,t,r,o,i){if(!c||"$types"!==e){var s=n[e],f=P(t);if(f||m(t)){var _=f?new Array(t.length):{};for(j(t).forEach((function(n){var u=d(e+(e?".":"")+I(n),t[n],r||_,_,n),o=function(e){return C(e,V)?_[n]=void 0:void 0!==e&&(_[n]=e),e};C(u,h)?D.push(u.then((function(e){return o(e)}))):o(u)})),t=_;u.length;){var p=a(u[0],4),y=p[0],E=p[1],v=p[2],b=p[3],g=O(y,E);if(void 0===g)break;v[b]=g,u.splice(0,1)}}if(!s)return t;if("#"===s){var F=O(r,t.slice(1));return void 0===F&&u.push([r,t.slice(1),o,i]),F}return[].concat(s).reduce((function e(t,n){return C(t,h)?t.then((function(t){return e(t,n)})):l(n,t)}),t)}}function _(e){return C(e,V)?void 0:e}var p,y=f();return C(y,h)?p=y.then((function(){return e})):(p=d("",e,null),D.length&&(p=h.resolve(p).then((function(e){return h.all([e].concat(D))})).then((function(e){return a(e,1)[0]})))),F(p)?r&&t.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():C(p,h)?p.p.then(_):p:!r&&t.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():r?_(p):Promise.resolve(_(p))}},{key:"reviveSync",value:function(e,t){return this.revive(e,i(i({throwOnBadSyncType:!0},t),{},{sync:!0}))}},{key:"reviveAsync",value:function(e,t){return this.revive(e,i(i({throwOnBadSyncType:!0},t),{},{sync:!1}))}},{key:"register",value:function(e,t){return t=t||{},[].concat(e).forEach((function e(r){var u=this;if(P(r))return r.map((function(t){return e.call(u,t)}));r&&j(r).forEach((function(e){if("#"===e)throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(n.JSON_TYPES.includes(e))throw new TypeError("Plain JSON object types are reserved as type names");var u=r[e],o=u&&u.testPlainObjects?this.plainObjectReplacers:this.nonplainObjectReplacers,c=o.filter((function(t){return t.type===e}));if(c.length&&(o.splice(o.indexOf(c[0]),1),delete this.revivers[e],delete this.types[e]),"function"==typeof u){var s=u;u={test:function(e){return e&&e.constructor===s},replace:function(e){return i({},e)},revive:function(e){return Object.assign(Object.create(s.prototype),e)}}}else if(P(u)){var l=a(u,3);u={test:l[0],replace:l[1],revive:l[2]}}if(u&&u.test){var f={type:e,test:u.test.bind(u)};u.replace&&(f.replace=u.replace.bind(u)),u.replaceAsync&&(f.replaceAsync=u.replaceAsync.bind(u));var D="number"==typeof t.fallback?t.fallback:t.fallback?0:Number.POSITIVE_INFINITY;if(u.testPlainObjects?this.plainObjectReplacers.splice(D,0,f):this.nonplainObjectReplacers.splice(D,0,f),u.revive||u.reviveAsync){var d={};u.revive&&(d.revive=u.revive.bind(u)),u.reviveAsync&&(d.reviveAsync=u.reviveAsync.bind(u)),this.revivers[e]=[d,{plain:u.testPlainObjects}]}this.types[e]=u}}),this)}),this),this}}]),n}(),V=function e(){t(this,e)};return V.__typeson__type__="TypesonUndefined",M.Undefined=V,M.Promise=h,M.isThenable=F,M.toStringTag=A,M.hasConstructorOf=C,M.isObject=w,M.isPlainObject=m,M.isUserObject=B,M.escapeKeyPathComponent=I,M.unescapeKeyPathComponent=S,M.getByKeyPath=O,M.getJSONType=x,M.JSON_TYPES=["null","boolean","number","string","array","object"],M}()}(St);for(var Ot=St.exports,Tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xt=new Uint8Array(256),Nt=0;Nt<Tt.length;Nt++)xt[Tt.charCodeAt(Nt)]=Nt;var jt=function(e,t,n){null==n&&(n=e.byteLength);for(var r=new Uint8Array(e,t||0,n),u=r.length,o="",i=0;i<u;i+=3)o+=Tt[r[i]>>2],o+=Tt[(3&r[i])<<4|r[i+1]>>4],o+=Tt[(15&r[i+1])<<2|r[i+2]>>6],o+=Tt[63&r[i+2]];return u%3==2?o=o.slice(0,-1)+"=":u%3==1&&(o=o.slice(0,-2)+"=="),o},Pt=function(e){var t,n,r,u,o=e.length,i=.75*e.length,a=0;"="===e[e.length-1]&&(i--,"="===e[e.length-2]&&i--);for(var c=new ArrayBuffer(i),s=new Uint8Array(c),l=0;l<o;l+=4)t=xt[e.charCodeAt(l)],n=xt[e.charCodeAt(l+1)],r=xt[e.charCodeAt(l+2)],u=xt[e.charCodeAt(l+3)],s[a++]=t<<2|n>>4,s[a++]=(15&n)<<4|r>>2,s[a++]=(3&r)<<6|63&u;return c},kt={arraybuffer:{test:function(e){return"ArrayBuffer"===Ot.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),jt(e))},revive:function(e,t){if(t.buffers||(t.buffers=[]),"object"===n(e))return t.buffers[e.index];var r=Pt(e);return t.buffers.push(r),r}}},Rt={bigintObject:{test:function(e){return"object"===n(e)&&Ot.hasConstructorOf(e,BigInt)},replace:function(e){return String(e)},revive:function(e){return new Object(BigInt(e))}}},Lt={bigint:{test:function(e){return"bigint"==typeof e},replace:function(e){return String(e)},revive:function(e){return BigInt(e)}}};function qt(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}var Ut={blob:{test:function(e){return"Blob"===Ot.toStringTag(e)},replace:function(e){var t=new XMLHttpRequest;if(t.overrideMimeType("text/plain; charset=x-user-defined"),t.open("GET",URL.createObjectURL(e),!1),t.send(),200!==t.status&&0!==t.status)throw new Error("Bad Blob access: "+t.status);return{type:e.type,stringContents:t.responseText}},revive:function(e){var t=e.type,n=e.stringContents;return new Blob([qt(n)],{type:t})},replaceAsync:function(e){return new Ot.Promise((function(t,n){var r=new FileReader;r.addEventListener("load",(function(){t({type:e.type,stringContents:r.result})})),r.addEventListener("error",(function(){n(r.error)})),r.readAsBinaryString(e)}))}}};function Mt(){var e=Date.now()+("undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():0);return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=Math.trunc((e+16*Math.random())%16);return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))}var Vt={},Kt={cloneable:{test:function(e){return e&&"object"===n(e)&&"function"==typeof e[Symbol.for("cloneEncapsulate")]},replace:function(e){var t=e[Symbol.for("cloneEncapsulate")](),n=Mt();return Vt[n]=e,{uuid:n,encapsulated:t}},revive:function(e){var t=e.uuid,n=e.encapsulated;return Vt[t][Symbol.for("cloneRevive")](n)}}},Gt={cryptokey:{test:function(e){return"CryptoKey"===Ot.toStringTag(e)&&e.extractable},replaceAsync:function(e){return new Ot.Promise((function(t,n){crypto.subtle.exportKey("jwk",e).catch((function(e){n(e)})).then((function(n){t({jwk:n,algorithm:e.algorithm,usages:e.usages})}))}))},revive:function(e){var t=e.jwk,n=e.algorithm,r=e.usages;return crypto.subtle.importKey("jwk",t,n,!0,r)}}},Ht={dataview:{test:function(e){return"DataView"===Ot.toStringTag(e)},replace:function(e,t){var n=e.buffer,r=e.byteOffset,u=e.byteLength;t.buffers||(t.buffers=[]);var o=t.buffers.indexOf(n);return o>-1?{index:o,byteOffset:r,byteLength:u}:(t.buffers.push(n),{encoded:jt(n),byteOffset:r,byteLength:u})},revive:function(e,t){t.buffers||(t.buffers=[]);var n,r=e.byteOffset,u=e.byteLength,o=e.encoded,i=e.index;return"index"in e?n=t.buffers[i]:(n=Pt(o),t.buffers.push(n)),new DataView(n,r,u)}}},Wt={date:{test:function(e){return"Date"===Ot.toStringTag(e)},replace:function(e){var t=e.getTime();return Number.isNaN(t)?"NaN":t},revive:function(e){return"NaN"===e?new Date(Number.NaN):new Date(e)}}},Qt={error:{test:function(e){return"Error"===Ot.toStringTag(e)},replace:function(e){return{name:e.name,message:e.message}},revive:function(e){var t=e.name,n=e.message,r=new Error(n);return r.name=t,r}}},Yt="undefined"==typeof self?y:self,$t={};["TypeError","RangeError","SyntaxError","ReferenceError","EvalError","URIError","InternalError"].forEach((function(e){var t=Yt[e];t&&($t[e.toLowerCase()]={test:function(e){return Ot.hasConstructorOf(e,t)},replace:function(e){return e.message},revive:function(e){return new t(e)}})}));var Jt={file:{test:function(e){return"File"===Ot.toStringTag(e)},replace:function(e){var t=new XMLHttpRequest;if(t.overrideMimeType("text/plain; charset=x-user-defined"),t.open("GET",URL.createObjectURL(e),!1),t.send(),200!==t.status&&0!==t.status)throw new Error("Bad File access: "+t.status);return{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,u=e.lastModified;return new File([qt(r)],t,{type:n,lastModified:u})},replaceAsync:function(e){return new Ot.Promise((function(t,n){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.readAsBinaryString(e)}))}}},Xt={file:Jt.file,filelist:{test:function(e){return"FileList"===Ot.toStringTag(e)},replace:function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e.item(n);return t},revive:function(e){return new(function(){function e(){r(this,e),this._files=arguments[0],this.length=this._files.length}var t,n,o;return t=e,(n=[{key:"item",value:function(e){return this._files[e]}},{key:Symbol.toStringTag,get:function(){return"FileList"}}])&&u(t.prototype,n),o&&u(t,o),e}())(e)}}},zt={imagebitmap:{test:function(e){return"ImageBitmap"===Ot.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){
4
+ filename:r.fileName||"",lineno:r.lineNumber||0,colno:r.columnNumber||0});window.dispatchEvent(t)},u&&this._legacyOutputDidListenersThrowCheck||n(),this._legacyOutputDidListenersThrowCheck&&(t.__legacyOutputDidListenersThrowError=r)}}),S.prototype[Symbol.toStringTag]="EventTargetPrototype",Object.defineProperty(S,"prototype",{writable:!1});var O=S,T={createInstance:function(e){function t(){this.__setOptions(e)}return t.prototype=O.prototype,new t}};S.ShimEvent=m,S.ShimCustomEvent=B,S.ShimDOMException=F,S.ShimEventTarget=S,S.EventTargetFactory=T;var x={},N={};["DEBUG","cacheDatabaseInstances","autoName","fullIDLSupport","checkOrigin","cursorPreloadPackSize","UnicodeIDStart","UnicodeIDContinue","registerSCA","avoidAutoShim","win","DEFAULT_DB_SIZE","useSQLiteIndexes","fs","addNonIDBGlobals","replaceNonIDBGlobals","escapeDatabaseName","unescapeDatabaseName","databaseCharacterEscapeList","databaseNameLengthLimit","escapeNFDForDatabaseNames","addSQLiteExtension",["memoryDatabase",function(e){if(!/^(?::memory:|file::memory:(\?(?:(?!#)[\s\S])*)?(#(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?)?$/.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"].forEach((function(e){var t;if(Array.isArray(e)){var n=l(e,2);e=n[0],t=n[1]}Object.defineProperty(N,e,{get:function(){return x[e]},set:function(n){t&&t(n),x[e]=n}})}));var j=/[\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]|\uD806\uDD38|\uD834[\uDD5E-\uDD64\uDDBB-\uDDC0]/;function P(e){return e.replace(/((?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])))(?!(?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))|(^|(?:(?![\uD800-\uDBFF](?![\uDC00-\uDFFF]))[\s\S]))((?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g,(function(e,t,n,r){return t?"^2"+t.codePointAt().toString(16).padStart(4,"0"):(n||"")+"^3"+r.codePointAt().toString(16).padStart(4,"0")}))}function k(e){return"_"+P(e.replace(/\^/g,"^^").replace(/\0/g,"^0").replace(/([A-Z])/g,"^$1"))}function R(e){return P(e.replace(/\^/g,"^^").replace(/\0/g,"^0"))}function L(e){return function(e){return e.replace(/(\^+)3(d[0-9a-f]{3})/g,(function(e,t,n){return t.length%2?t.slice(1)+String.fromCodePoint(Number.parseInt(n,16)):e})).replace(/(\^+)2(d[0-9a-f]{3})/g,(function(e,t,n){return t.length%2?t.slice(1)+String.fromCodePoint(Number.parseInt(n,16)):e}))}(e).replace(/(\^+)0/g,(function(e,t){return t.length%2?t.slice(1)+"\0":e})).replace(/\^\^/g,"^")}function q(e){return e.replace(/"/g,'""')}function U(e){return'"'+q(e)+'"'}function M(e){if(N.escapeDatabaseName)return N.escapeDatabaseName(R(e));if(e="D"+k(e),!1!==N.escapeNFDForDatabaseNames&&(e=e.replace(new RegExp(j,"gu"),(function(e){return"^4"+e.codePointAt().toString(16).padStart(6,"0")}))),!1!==N.databaseCharacterEscapeList&&(e=e.replace(N.databaseCharacterEscapeList?new RegExp(N.databaseCharacterEscapeList,"gu"):/[\0-\x1F"\*\/:<>\?\\\|\x7F]/g,(function(e){return"^1"+e.charCodeAt().toString(16).padStart(2,"0")}))),!1!==N.databaseNameLengthLimit&&e.length>=(N.databaseNameLengthLimit||254)-(!1!==N.addSQLiteExtension?7:0))throw new Error("Unexpectedly long database name supplied; length limit required for Node compatibility; passed length: "+e.length+"; length limit setting: "+(N.databaseNameLengthLimit||254)+".");return e+(!1!==N.addSQLiteExtension?".sqlite":"")}function V(e){return U("S"+k(e))}function K(e){return U("I"+k(e))}function G(e){return"I"+k(e)}function H(e){return q(e).replace(/\^/g,"^^")}function W(e,t){return t[Symbol.hasInstance](e)}function Q(e){return e&&"object"===n(e)}function Y(e){return Q(e)&&"function"==typeof e[Symbol.iterator]}function $(e,t){t.forEach((function(t){var n,r,u=(n={},(r={})[t]=r[t]||{},r[t].get=function(){throw new TypeError("Illegal invocation")},r[t]=r[t]||{},r[t].set=function(e){throw new TypeError("Illegal invocation")},o(n,r),n),i=Object.getOwnPropertyDescriptor(u,t);Object.defineProperty(e,t,i)}))}function J(e,t){t.forEach((function(t){var n,r,u=(n={},(r={})[t]=r[t]||{},r[t].get=function(){throw new TypeError("Illegal invocation")},o(n,r),n),i=Object.getOwnPropertyDescriptor(u,t);Object.defineProperty(e,t,i)}))}function X(e,t){(t="string"==typeof t?[t]:t).forEach((function(t){var n,r,u=(n={},(r={})[t]=r[t]||{},r[t].get=function(){return e["__"+t]},r[t]=r[t]||{},r[t].set=function(n){e["__"+t]=n},o(n,r),n),i=Object.getOwnPropertyDescriptor(u,t);Object.defineProperty(e,t,i)})),t.forEach((function(t){e[t]=null}))}function z(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(t="string"==typeof t?[t]:t).forEach((function(t){var r,u,i;n&&t in n?r=n[t]:(Object.defineProperty(e,"__"+t,{enumerable:!1,configurable:!1,writable:!0}),u={},(i={})[t]=i[t]||{},i[t].get=function(){return this["__"+t]},o(u,i),r=u);var a=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,a)}))}function Z(e){var t=N.UnicodeIDStart||"[$A-Z_a-z]",n=N.UnicodeIDContinue||"[$0-9A-Z_a-z]";return new RegExp("^"+("(?:"+t+"|[$_])")+("(?:"+n+"|[$_‌‍])")+"*$","u").test(e)}function ee(e){return"string"==typeof e&&(""===e||Z(e)||e.split(".").every((function(e){return Z(e)})))}function te(e){return ee(e)||Array.isArray(e)&&e.length&&f(e).every((function(e){return ee(e)}))}function ne(e,t){var n,r;switch(e=Math.floor(Number(e)),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(!Number.isFinite(e)||e>n||e<r)throw new TypeError("Invalid range: "+e);return e}function re(e,t){return null===e&&t?"":ue(e)}function ue(e){return""+e}function oe(e){return Y(e)?f(e).map((function(e){return ue(e)})):ue(e)}function ie(e){return null==e}function ae(e,t,n){var r=new m(e,n);return r.debug=t,r}Object.defineProperty(m,Symbol.hasInstance,{value:function(e){return Q(e)&&"target"in e&&"boolean"==typeof e.bubbles}});function ce(e){m.call(this,e),this[Symbol.toStringTag]="IDBVersionChangeEvent",this.toString=function(){return"[object IDBVersionChangeEvent]"},this.__eventInitDict=arguments[1]||{}}function se(e,t){return new DOMException.prototype.constructor(t,e||"DOMException")}ce.prototype=Object.create(m.prototype),ce.prototype[Symbol.toStringTag]="IDBVersionChangeEventPrototype",["oldVersion","newVersion"].forEach((function(e){var t,n,r=(t={},(n={})[e]=n[e]||{},n[e].get=function(){if(!(this instanceof ce))throw new TypeError("Illegal invocation");return this.__eventInitDict&&this.__eventInitDict[e]||("oldVersion"===e?0:null)},o(t,n),t),u=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(ce.prototype,e,u)})),Object.defineProperty(ce,Symbol.hasInstance,{value:function(e){return Q(e)&&"oldVersion"in e&&"boolean"==typeof e.defaultPrevented}}),Object.defineProperty(ce.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:ce}),Object.defineProperty(ce,"prototype",{writable:!1});var le={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},fe={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 De=function(){function e(e,t){this[Symbol.toStringTag]="DOMException",this._code=t in le?le[t]:fe[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(le).forEach((function(t){Object.defineProperty(e.prototype,t,{enumerable:!0,configurable:!1,value:le[t]}),Object.defineProperty(e,t,{enumerable:!0,configurable:!1,value:le[t]})})),Object.keys(fe).forEach((function(t){Object.defineProperty(e.prototype,t,{enumerable:!0,configurable:!1,value:fe[t]}),Object.defineProperty(e,t,{enumerable:!0,configurable:!1,value:fe[t]})})),Object.defineProperty(e.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:e}),e}();function de(e,t,n){if(N.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 _e(e){return e&&"object"===n(e)&&"string"==typeof e.name}function pe(e){var t;if(e){if(1===e.length)return e[0];var n,r=_(e);try{for(r.s();!(n=r.n()).done;){var u=n.value;if(_e(u))return u;u&&"string"==typeof u.message&&(t=u)}}catch(t){r.e(t)}finally{r.f()}}return t}function ye(e){var t,n;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=ve(t,n);return r.sqlError=e,r}var he,Ee=!1;try{_e(he=se("test name","test message"))&&"test name"===he.name&&"test message"===he.message&&(Ee=!0)}catch(e){}var ve=Ee?function(e,t,n){return de(e,t,n),se(e,t)}:function(e,t,n){return de(e,t,n),function(e,t){return new De(t,e)}(e,t)},be=Ee?DOMException:De,ge=["onsuccess","onerror"],Fe=["source","transaction","readyState"],Ae=["result","error"];function Ce(){throw new TypeError("Illegal constructor")}Ce.__super=function(){var e=this;this[Symbol.toStringTag]="IDBRequest",this.__setOptions({legacyOutputDidListenersThrowFlag:!0}),Ae.forEach((function(t){Object.defineProperty(e,"__"+t,{enumerable:!1,configurable:!1,writable:!0}),Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){if(!this.__done)throw ve("InvalidStateError","Can't get "+t+"; the request is still pending.");return this["__"+t]}})})),z(this,Fe,{readyState:{get readyState(){return this.__done?"done":"pending"}}}),X(this,ge),this.__result=void 0,this.__error=this.__source=this.__transaction=null,this.__done=!1},Ce.__createInstance=function(){return new Ce.__super},Ce.prototype=T.createInstance({extraProperties:["debug"]}),Ce.prototype[Symbol.toStringTag]="IDBRequestPrototype",Ce.prototype.__getParent=function(){return"[object IDBOpenDBRequest]"===this.toString()?null:this.__transaction},J(Ce.prototype,Fe),J(Ce.prototype,Ae),$(Ce.prototype,ge),Object.defineProperty(Ce.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:Ce}),Ce.__super.prototype=Ce.prototype,Object.defineProperty(Ce,"prototype",{writable:!1});var me=["onblocked","onupgradeneeded"];function Be(){throw new TypeError("Illegal constructor")}Be.prototype=Object.create(Ce.prototype),Object.defineProperty(Be.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:Be});var we=Be;Be.__createInstance=function(){function e(){Ce.__super.call(this),this[Symbol.toStringTag]="IDBOpenDBRequest",this.__setOptions({legacyOutputDidListenersThrowFlag:!0,extraProperties:["oldVersion","newVersion","debug"]}),X(this,me)}return e.prototype=we.prototype,new e},$(Be.prototype,me),Be.prototype[Symbol.toStringTag]="IDBOpenDBRequestPrototype",Object.defineProperty(Be,"prototype",{writable:!1});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Ie(e){return e&&"function"==typeof e.then}function Se(e,t){e.then(null,t)}function Oe(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 r(e){t.c&&(Ie(e)?Se(e.then(r),r):n(e,1))}t.v=0,t.s=2,t.c=[[],[]];try{e((function e(u){t.c&&(Ie(u)?Se(u.then(e),r):n(u,0))}),r)}catch(e){r(e)}}var Te=Oe.prototype;Te.then=function(e,t){var n=this;return new Oe((function(r,u){var o="function"==typeof t?t:u;function i(){try{r(e?e(n.v):n.v)}catch(e){o(e)}}0===n.s?i():1===n.s?o(n.v):(n.c[0].push(i),n.c[1].push(o))}))},Te.catch=function(e){var t=this;return new Oe((function(n,r){function u(){try{n(e(t.v))}catch(e){r(e)}}1===t.s?u():0===t.s?n(t.v):(t.c[1].push(u),t.c[0].push(n))}))},Oe.all=function(e){return new Oe((function(t,n,r){r=e.length;var u=[];r?e.forEach((function(o,i){Ie(o)?Se(o.then((function(e){u[i]=e,--r||t(u)})),n):(u[i]=o,--r||t(e))})):t(u)}))},Oe.race=function(e){var t=!1;return new Oe((function(n,r){e.some((function(e,u){if(!Ie(e))return n(e),t=!0,!0;Se(e.then((function(e){t||(n(e),t=!0)})),r)}))}))},Oe.resolve=function(e){return new Oe((function(t,n){t(e)}))},Oe.reject=function(e){return new Oe((function(t,n){n(e)}))};var xe=Oe;function Ne(e,t){var r=ot(e),u=ot(t),o=r>u?1:r===u?0:-1;if(N.DEBUG){var i=it(r),a=it(u);"object"===n(e)&&(e=JSON.stringify(e),i=JSON.stringify(i)),"object"===n(t)&&(t=JSON.stringify(t),a=JSON.stringify(a)),i!==e&&console.warn(e+" was incorrectly encoded as "+i),a!==t&&console.warn(t+" was incorrectly encoded as "+a)}return o}var je={invalid:100,number:200,date:300,string:400,binary:500,array:600},Pe=Object.keys(je);Pe.forEach((function(e){je[e]=String.fromCodePoint(je[e])}));var ke=Pe.reduce((function(e,t){return e[je[t]]=t,e}),{}),Re=["negativeInfinity","bigNegative","smallNegative","smallPositive","bigPositive","positiveInfinity"],Le={invalid:{encode:function(e){return je.invalid+"-"},decode:function(e){}},number:{encode:function(e){var t,n,r,u=e===Number.MIN_VALUE?"0."+"0".repeat(214)+"2":Math.abs(e).toString(32),o=u.indexOf("."),i=(u=-1!==o?u.replace(".",""):u).search(/(?:(?!0)[\s\S])/);return u=u.slice(i),Number.isFinite(Number(e))?e<0?e>-1?(t=Re.indexOf("smallNegative"),n=qe(i),r=Me(Ue(u))):(t=Re.indexOf("bigNegative"),n=Me(qe(-1!==o?o:u.length)),r=Me(Ue(u))):e<1?(t=Re.indexOf("smallPositive"),n=Me(qe(i)),r=Ue(u)):(t=Re.indexOf("bigPositive"),n=qe(-1!==o?o:u.length),r=Ue(u)):(n=Ge(2),r=Ge(11),t=Re.indexOf(e>0?"positiveInfinity":"negativeInfinity")),je.number+"-"+t+n+r},decode:function(e){var t=Number(e.slice(2,3)),n=e.slice(3,5),r=e.slice(5,16);switch(Re[t]){case"negativeInfinity":return Number.NEGATIVE_INFINITY;case"positiveInfinity":return Number.POSITIVE_INFINITY;case"bigPositive":return Ve(r,n);case"smallPositive":return Ve(r,n=He(Me(n)));case"smallNegative":return n=He(n),-Ve(r=Me(r),n);case"bigNegative":return n=Me(n),-Ve(r=Me(r),n);default:throw new Error("Invalid number.")}}},string:{encode:function(e,t){return t&&(e=e.replace(/((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g,"-$1")+" "),je.string+"-"+e},decode:function(e,t){return e=e.slice(2),t&&(e=e.slice(0,-1).replace(/\x2D((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/g,"$1")),e}},array:{encode:function(e){var t,n=[],r=_(e.entries());try{for(r.s();!(t=r.n()).done;){var u=l(t.value,2),o=u[0],i=ot(u[1],!0);n[o]=i}}catch(e){r.e(e)}finally{r.f()}return n.push(je.invalid+"-"),je.array+"-"+JSON.stringify(n)},decode:function(e){var t=JSON.parse(e.slice(2));t.pop();for(var n=0;n<t.length;n++){var r=it(t[n],!0);t[n]=r}return t}},date:{encode:function(e){return je.date+"-"+e.toJSON()},decode:function(e){return new Date(e.slice(2))}},binary:{encode:function(e){return je.binary+"-"+(e.byteLength?f(Ye(e)).map((function(e){return String(e).padStart(3,"0")})):"")},decode:function(e){var t=e.slice(2),n=t.length?t.split(",").map((function(e){return Number.parseInt(e)})):[],r=new ArrayBuffer(n.length);return new Uint8Array(r).set(n),r}}};function qe(e){return 1===(e=e.toString(32)).length?"0"+e:e}function Ue(e){return(e+Ge(11)).slice(0,11)}function Me(e){var t,n="",r=_(e);try{for(r.s();!(t=r.n()).done;){var u=t.value;n+=(31-Number.parseInt(u,32)).toString(32)}}catch(e){r.e(e)}finally{r.f()}return n}function Ve(e,t){if((t=Number.parseInt(t,32))<0)return Ke(Number.parseInt(e,32)*Math.pow(32,t-10));if(t<11){var n=e.slice(0,t);n=Number.parseInt(n,32);var r=e.slice(t);return Ke(n+(r=Number.parseInt(r,32)*Math.pow(32,t-11)))}var u=e+Ge(t-11);return Number.parseInt(u,32)}function Ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;return Number.parseFloat(e.toPrecision(t))}function Ge(e){return"0".repeat(e)}function He(e){return"-"+e}function We(e){if(Array.isArray(e))return"array";if(Q(t=e)&&"function"==typeof t.getDate)return"date";var t;if(function(e){return Q(e)&&"number"==typeof e.byteLength&&("function"==typeof e.slice||"function"==typeof e.getFloat64)}(e))return"binary";var r=n(e);return["string","number"].includes(r)?r:"invalid"}function Qe(e,t){return $e(e,t,!1,!0)}function Ye(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 $e(e,t,r,u){if((t=t||[]).includes(e))return{type:"array",invalid:!0,message:"An array key cannot be circular"};var o=We(e),i={type:o,value:e};switch(o){case"number":return Number.isNaN(e)?{type:"NaN",invalid:!0}:i;case"string":return i;case"binary":return{type:"binary",value:Ye(e)};case"array":var a=e.length;t.push(e);for(var c=[],s=0;s<a;s++){if(!r&&!Object.prototype.hasOwnProperty.call(e,s))return{type:o,invalid:!0,message:"Does not have own index property"};try{var l=function(){var n=$e(e[s],t,!1,u);if(n.invalid)return r?"continue":{v:{type:o,invalid:!0,message:"Bad array entry value-to-key conversion"}};(!r||!u&&c.every((function(e){return 0!==Ne(e,n.value)}))||u&&c.every((function(e){return 0!==Ne(e,n)})))&&c.push(u?n:n.value)}();if("continue"===l)continue;if("object"===n(l))return l.v}catch(e){if(!r)throw e}}return{type:o,value:c};case"date":return Number.isNaN(e.getTime())?{type:o,invalid:!0,message:"Not a valid date"}:u?{type:o,value:e.getTime()}:{type:o,value:new Date(e.getTime())};case"invalid":default:var f=null===e?"null":n(e);return{type:f,invalid:!0,message:"Not a valid key; type "+f}}}function Je(e,t){return $e(e,null,!0,t)}function Xe(e,t){var n=Qe(e,t);if(n.invalid)throw ve("DataError",n.message||"Not a valid key; type: "+n.type);return n}function ze(e,t,n,r){var u=Ze(e,t);return u.failure?u:n?Je(u.value,r):$e(u.value,null,!1,r)}function Ze(e,t,n,r){if(Array.isArray(t)){var u=[];return t.some((function(t){var n=Ze(e,t);return!!n.failure||(u.push(n.value),!1)}))?{failure:!0}:{value:u}}return""===t?{value:e}:t.split(".").some((function(t,n){if("length"!==t||"string"!=typeof e&&!Array.isArray(e))if(Q(r=e)&&"number"==typeof r.size&&"function"==typeof r.slice&&!("lastModified"in r))switch(t){case"size":case"type":e=e[t]}else{if(!function(e){return Q(e)&&"string"==typeof e.name&&"function"==typeof e.slice&&"lastModified"in e}(e))return!Q(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;var r;return!1}))?{failure:!0}:{value:e}}function et(e,t,n){var r=n.split("."),u=r.pop();r.forEach((function(t){Object.prototype.hasOwnProperty.call(e,t)||(e[t]={}),e=e[t]})),e[u]=t}function tt(e,t){var n=t.split(".");n.pop();var r,u=_(n);try{for(u.s();!(r=u.n()).done;){var o=r.value;if(!Q(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,o))return!0;e=e[o]}}catch(e){u.e(e)}finally{u.f()}return Q(e)}function nt(e,t,n){var r=void 0===t.lower,u=void 0===t.upper,o=ot(e,!0),i=n?t.__lowerCached:ot(t.lower,!0),a=n?t.__upperCached:ot(t.upper,!0);return void 0!==t.lower&&(t.lowerOpen&&o>i&&(r=!0),!t.lowerOpen&&o>=i&&(r=!0)),void 0!==t.upper&&(t.upperOpen&&o<a&&(u=!0),!t.upperOpen&&o<=a&&(u=!0)),r&&u}function rt(e,t){return"array"===ke[t.slice(0,1)]?t.indexOf(e)>1:t===e}function ut(e,t){var n=[];if(Array.isArray(e)){var r,u=_(e);try{for(u.s();!(r=u.n()).done;){var o=r.value;if(Array.isArray(o)){if(t&&t.lower===t.upper)continue;if(1!==o.length){ut(o,t).length>0&&n.push(o);continue}o=o[0]}(ie(t)||nt(o,t,!0))&&n.push(o)}}catch(e){u.e(e)}finally{u.f()}}else(ie(t)||nt(e,t,!0))&&n.push(e);return n}function ot(e,t){return void 0===e?null:Le[We(e)].encode(e,t)}function it(e,t){if("string"==typeof e)return Le[ke[e.slice(0,1)]].decode(e,t)}function at(e,t){return it(ot(e,t),t)}var ct=9007199254740992;function st(e,t,n,r){e.executeSql('SELECT "currNum" FROM __sys__ WHERE "name" = ?',[R(t.__currentName)],(function(e,t){1!==t.rows.length?n(1):n(t.rows.item(0).currNum)}),(function(e,t){r(ve("DataError","Could not get the auto increment value for key",t))}))}function lt(e,t,n,r,u){var o='UPDATE __sys__ SET "currNum" = ? WHERE "name" = ?',i=[n,R(t.__currentName)];N.DEBUG&&console.log(o,i),e.executeSql(o,i,(function(e,t){r(n)}),(function(e,t){u(ve("UnknownError","Could not set the auto increment value for key",t))}))}function ft(e,t,n,r,u){return lt(e,t,n=n===ct?n+2:n+1,r,u)}function Dt(e,t,n,r){st(e,t,(function(u){u>ct?n("failure"):ft(e,t,u,(function(){n(null,u,u)}),r)}),r)}function dt(e,t,n,r,u){"number"!=typeof n||n<1?r():st(e,t,(function(o){var i=Math.floor(Math.min(n,ct));i>=o?ft(e,t,i,(function(){r(o)}),u):r()}),u)}var _t=Object.freeze({__proto__:null,encode:ot,decode:it,roundTrip:at,convertKeyToValue:function e(t){var n=t.type,r=t.value;switch(n){case"number":case"string":return r;case"array":for(var u=[],o=r.length,i=0;i<o;){var a=e(r[i]);u[i]=a,i++}return u;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")}},convertValueToKeyValueDecoded:$e,convertValueToMultiEntryKeyDecoded:Je,convertValueToKey:Qe,convertValueToMultiEntryKey:function(e){return $e(e,null,!0,!0)},convertValueToKeyRethrowingAndIfInvalid:Xe,extractKeyFromValueUsingKeyPath:function(e,t,n){return ze(e,t,n,!0)},evaluateKeyPathOnValue:function(e,t,n){return Ze(e,t)},extractKeyValueDecodedFromValueUsingKeyPath:ze,injectKeyIntoValueUsingKeyPath:et,checkKeyCouldBeInjectedIntoValue:tt,isMultiEntryMatch:rt,isKeyInRange:nt,findMultiEntryMatches:ut,assignCurrentNumber:lt,generateKeyForStore:Dt,possiblyUpdateKeyGenerator:dt});function pt(){throw new TypeError("Illegal constructor")}var yt,ht=pt;function Et(e,t,n,r,u,o){if(e&&(void 0!==e.lower||void 0!==e.upper)){var i,a;u&&n.push("AND");var c=void 0!==e.lower,s=void 0!==e.upper;if(c&&(i=o?e.__lowerCached:ot(e.lower)),s&&(a=o?e.__upperCached:ot(e.upper)),c){if(r.push(R(i)),s&&i===a&&!e.lowerOpen&&!e.upperOpen)return void n.push(t,"=","?");n.push(t,e.lowerOpen?">":">=","?")}c&&s&&n.push("AND"),s&&(n.push(t,e.upperOpen?"<":"<=","?"),r.push(R(a)))}}function vt(e,t){if(W(e,pt))return"[object IDBKeyRange]"!==e.toString()?pt.__createInstance(e.lower,e.upper,e.lowerOpen,e.upperOpen):e;if(!ie(e))return Xe(e),pt.only(e);if(t)throw ve("DataError","No key or range was specified")}pt.__createInstance=function(e,t,n,r){function u(){if(this[Symbol.toStringTag]="IDBKeyRange",void 0===e&&void 0===t)throw ve("DataError","Both arguments to the key range method cannot be undefined");var u,o;if(void 0!==e&&(u=at(e),Xe(e)),void 0!==t&&(o=at(t),Xe(t)),void 0!==e&&void 0!==t&&e!==t&&ot(e)>ot(t))throw ve("DataError","`lower` must not be greater than `upper` argument in `bound()` call.");this.__lower=u,this.__upper=o,this.__lowerOpen=Boolean(n),this.__upperOpen=Boolean(r)}return u.prototype=ht.prototype,new u},pt.prototype.includes=function(e){if(!Q(this)||"boolean"!=typeof this.__lowerOpen)throw new TypeError("Illegal invocation");if(!arguments.length)throw new TypeError("IDBKeyRange.includes requires a key argument");return Xe(e),nt(e,this)},pt.only=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.only requires a value argument");return pt.__createInstance(e,e,!1,!1)},pt.lowerBound=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.lowerBound requires a value argument");return pt.__createInstance(e,void 0,arguments[1],!0)},pt.upperBound=function(e){if(!arguments.length)throw new TypeError("IDBKeyRange.upperBound requires a value argument");return pt.__createInstance(void 0,e,!0,arguments[1])},pt.bound=function(e,t){if(arguments.length<=1)throw new TypeError("IDBKeyRange.bound requires lower and upper arguments");return pt.__createInstance(e,t,arguments[2],arguments[3])},pt.prototype[Symbol.toStringTag]="IDBKeyRangePrototype",["lower","upper","lowerOpen","upperOpen"].forEach((function(e){var t,n;Object.defineProperty(pt.prototype,"__"+e,{enumerable:!1,configurable:!1,writable:!0});var r=(t={},(n={})[e]=n[e]||{},n[e].get=function(){if(!Q(this)||"boolean"!=typeof this.__lowerOpen)throw new TypeError("Illegal invocation");return this["__"+e]},o(t,n),t),u=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(pt.prototype,e,u)})),Object.defineProperty(pt,Symbol.hasInstance,{value:function(e){return Q(e)&&"upper"in e&&"boolean"==typeof e.lowerOpen}}),Object.defineProperty(pt,"prototype",{writable:!1});var bt=!1,gt={test:!0};if(Object.defineProperty)try{Object.defineProperty(gt,"test",{enumerable:!1}),gt.test&&(bt=!0)}catch(e){}var Ft=function(){throw new TypeError("Illegal constructor")};Ft.prototype=(i(yt={constructor:Ft,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=Ft.__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(Number.parseInt(t))&&delete this[t];this.sortList()}},Symbol.toStringTag,"DOMStringListPrototype"),i(yt,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)}))),yt),Object.defineProperty(Ft,Symbol.hasInstance,{value:function(e){return"DOMStringListPrototype"===Object.prototype.toString.call(e)}});var At=Ft;if(Object.defineProperty(Ft,"__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=At.prototype,new e}}),bt){Object.defineProperty(Ft,"prototype",{writable:!1});["addIndexes","sortList","forEach","map","indexOf","push","splice","constructor","__createInstance"].forEach((function(e){Object.defineProperty(Ft.prototype,e,{enumerable:!1})})),Object.defineProperty(Ft.prototype,"length",{configurable:!0,enumerable:!0,get:function(){throw new TypeError("Illegal invocation")}});["_items","_length"].forEach((function(e){Object.defineProperty(Ft.prototype,e,{enumerable:!1,writable:!0})}))}var Ct=0,mt=["onabort","oncomplete","onerror"],Bt=["objectStoreNames","mode","db","error"];function wt(){throw new TypeError("Illegal constructor")}var It=wt;wt.__createInstance=function(e,t,n){function r(){var r=this,u=this;u[Symbol.toStringTag]="IDBTransaction",z(u,Bt),u.__id=++Ct,u.__active=!0,u.__running=!1,u.__errored=!1,u.__requests=[],u.__objectStoreNames=t,u.__mode=n,u.__db=e,u.__error=null,u.__setOptions({legacyOutputDidListenersThrowFlag:!0}),Bt.forEach((function(e){Object.defineProperty(r,e,{configurable:!0})})),X(this,mt),u.__storeHandles={},setTimeout((function(){u.__executeRequests()}),0)}return r.prototype=It.prototype,new r},wt.prototype=T.createInstance({defaultSync:!0,extraProperties:["complete"]}),wt.prototype.__transFinishedCb=function(e,t){t(Boolean(e))},wt.prototype.__executeRequests=function(){var e=this;e.__running?N.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,r=-1;function u(t,r){if(!e.__errored&&!e.__requestsFinished&&(r&&(n.req=r),!n.req.__done)){n.req.__done=!0,n.req.__result=t,n.req.__error=null,e.__active=!0;var u=ae("success");if(n.req.dispatchEvent(u),u.__legacyOutputDidListenersThrowError)return de("Error","An error occurred in a success handler attached to request chain",u.__legacyOutputDidListenersThrowError),void e.__abortTransaction(ve("AbortError","A request was aborted (in user handler after success)."));i()}}function o(){if(!(e.__errored||e.__requestsFinished||n.req&&n.req.__done)){for(var t=arguments.length,r=new Array(t),u=0;u<t;u++)r[u]=arguments[u];var o=pe(r);if(n.req){n.req.__done=!0,n.req.__error=o,n.req.__result=void 0,n.req.addLateEventListener("error",(function(e){e.cancelable&&e.defaultPrevented&&!e.__legacyOutputDidListenersThrowError&&i()})),n.req.addDefaultEventListener("error",(function(){e.__abortTransaction(n.req.__error)})),e.__active=!0;var a=ae("error",o,{bubbles:!0,cancelable:!0});n.req.dispatchEvent(a),a.__legacyOutputDidListenersThrowError&&(de("Error","An error occurred in an error handler attached to request chain",a.__legacyOutputDidListenersThrowError),a.preventDefault(),e.__abortTransaction(ve("AbortError","A request was aborted (in user handler after error).")))}else e.__abortTransaction(o)}}function i(){if(!e.__errored&&!e.__requestsFinished)if(++r>=e.__requests.length)e.__requests=[],e.__active&&function(){function t(){e.__completed=!0,N.DEBUG&&console.log("Transaction completed");var t=ae("complete");try{e.__internal=!0,e.dispatchEvent(t),e.__internal=!1,e.dispatchEvent(ae("__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=ae("__beforecomplete");n.complete=t,e.dispatchEvent(n)}();else try{if(!(n=e.__requests[r]).req)return void n.op(t,n.args,i,o);if(n.req.__done)return;n.op(t,n.args,u,o,i)}catch(e){o(e)}}i()}),(function(t){if(!0!==t){var n=ye(t);e.__abortTransaction(n)}}),(function(){e.__transFinishedCb===wt.prototype.__transFinishedCb&&(e.__transactionEndCallback||e.__requestsFinished?e.__transactionEndCallback&&!e.__completed&&e.__transFinishedCb(e.__errored,e.__transactionEndCallback):e.__transactionFinished=!0)}),(function(t,n,r,u,o){return!(!t.readOnly&&!n)||(e.__transFinishedCb=function(e,t){e?u(e,t):o(t)},e.__transactionEndCallback&&!e.__completed&&e.__transFinishedCb(e.__errored,e.__transactionEndCallback),!1)})))},wt.prototype.__createRequest=function(e){var t=Ce.__createInstance();return t.__source=void 0!==e?e:this.db,t.__transaction=this,t},wt.prototype.__addToTransactionQueue=function(e,t,n){var r=this.__createRequest(n);return this.__pushToQueue(r,e,t),r},wt.prototype.__addNonRequestToTransactionQueue=function(e,t,n){this.__pushToQueue(null,e,t)},wt.prototype.__pushToQueue=function(e,t,n){this.__assertActive(),this.__requests.push({op:t,args:n,req:e})},wt.prototype.__assertActive=function(){if(!this.__active)throw ve("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished")},wt.prototype.__assertWritable=function(){if("readonly"===this.mode)throw ve("ReadOnlyError","The transaction is read only")},wt.prototype.__assertVersionChange=function(){wt.__assertVersionChange(this)},wt.prototype.objectStore=function(e){var t=this;if(!(t instanceof wt))throw new TypeError("Illegal invocation");if(0===arguments.length)throw new TypeError("No object store name was specified");if(wt.__assertNotFinished(t),-1===t.__objectStoreNames.indexOf(e))throw ve("NotFoundError",e+" is not participating in this transaction");var n=t.db.__objectStores[e];if(!n)throw ve("NotFoundError",e+" does not exist in "+t.db.name);return(!t.__storeHandles[e]||t.__storeHandles[e].__pendingDelete||t.__storeHandles[e].__deleted)&&(t.__storeHandles[e]=Un.__clone(n,t)),t.__storeHandles[e]},wt.prototype.__abortTransaction=function(e){var t=this;function n(n,r){n?r&&"number"==typeof r.code?N.DEBUG&&console.log("Rollback erred; feature is probably not supported as per WebSQL",t):N.DEBUG&&console.log("Rollback succeeded",t):N.DEBUG&&console.log("Rollback not possible due to missing transaction",t),t.dispatchEvent(ae("__preabort")),t.__requests.filter((function(e,t,n){return e.req&&!e.req.__done&&[t,-1].includes(n.map((function(e){return e.req})).lastIndexOf(e.req))})).reduce((function(e,t){return e.then((function(){t.req.__done=!0,t.req.__result=void 0,t.req.__error=ve("AbortError","A request was aborted (an unfinished request).");var e=ae("error",t.req.__error,{bubbles:!0,cancelable:!0});return new xe((function(n){setTimeout((function(){t.req.dispatchEvent(e),n()}))}))}))}),xe.resolve()).then((function(){var n=ae("abort",e,{bubbles:!0,cancelable:!1});setTimeout((function(){t.__abortFinished=!0,t.dispatchEvent(n),t.__storeHandles={},t.dispatchEvent(ae("__abort"))}))})).catch((function(e){throw console.log("Abort error"),e}))}de("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})})))},wt.prototype.abort=function(){var e=this;if(!(e instanceof wt))throw new TypeError("Illegal invocation");N.DEBUG&&console.log("The transaction was aborted",e),wt.__assertNotFinished(e),e.__abortTransaction(null)},wt.prototype[Symbol.toStringTag]="IDBTransactionPrototype",wt.__assertVersionChange=function(e){if(!e||"versionchange"!==e.mode)throw ve("InvalidStateError","Not a version transaction")},wt.__assertNotVersionChange=function(e){if(e&&"versionchange"===e.mode)throw ve("InvalidStateError","Cannot be called during a version transaction")},wt.__assertNotFinished=function(e){if(!e||e.__completed||e.__abortFinished||e.__errored)throw ve("InvalidStateError","Transaction finished by commit or abort")},wt.__assertNotFinishedObjectStoreMethod=function(e){try{wt.__assertNotFinished(e)}catch(t){if(e&&!e.__completed&&!e.__abortFinished)throw ve("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished");throw t}},wt.__assertActive=function(e){if(!e||!e.__active)throw ve("TransactionInactiveError","A request was placed against a transaction which is currently not active, or which is finished")},wt.prototype.__getParent=function(){return this.db},$(wt.prototype,mt),J(wt.prototype,Bt),Object.defineProperty(wt.prototype,"constructor",{enumerable:!1,writable:!0,configurable:!0,value:wt}),Object.defineProperty(wt,"prototype",{writable:!1});var St={exports:{}};!function(e,t){e.exports=function(){function e(t){return(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 t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){return l(e)||D(e,t)||d(e,t)||y()}function c(e){return s(e)||f(e)||d(e)||p()}function s(e){if(Array.isArray(e))return _(e)}function l(e){if(Array.isArray(e))return e}function f(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function D(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,u=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){u=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(u)throw o}}return n}}function d(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var h=function e(n){t(this,e),this.p=new Promise(n)};h.__typeson__type__="TypesonPromise","undefined"!=typeof Symbol&&(h.prototype[Symbol.toStringTag]="TypesonPromise"),h.prototype.then=function(e,t){var n=this;return new h((function(r,u){n.p.then((function(t){r(e?e(t):t)})).catch((function(e){return t?t(e):Promise.reject(e)})).then(r,u)}))},h.prototype.catch=function(e){return this.then(null,e)},h.resolve=function(e){return new h((function(t){t(e)}))},h.reject=function(e){return new h((function(t,n){n(e)}))},["all","race","allSettled"].forEach((function(e){h[e]=function(t){return new h((function(n,r){Promise[e](t.map((function(e){return e&&e.constructor&&"TypesonPromise"===e.constructor.__typeson__type__?e.p:e}))).then(n,r)}))}}));var E={}.toString,v={}.hasOwnProperty,b=Object.getPrototypeOf,g=v.toString;function F(e,t){return w(e)&&"function"==typeof e.then&&(!t||"function"==typeof e.catch)}function A(e){return E.call(e).slice(8,-1)}function C(t,n){if(!t||"object"!==e(t))return!1;var r=b(t);if(!r)return null===n;var u=v.call(r,"constructor")&&r.constructor;return"function"!=typeof u?null===n:n===u||null!==n&&g.call(u)===g.call(n)||"function"==typeof n&&"string"==typeof u.__typeson__type__&&u.__typeson__type__===n.__typeson__type__}function m(e){return!(!e||"Object"!==A(e))&&(!b(e)||C(e,Object))}function B(e){if(!e||"Object"!==A(e))return!1;var t=b(e);return!t||C(e,Object)||B(t)}function w(t){return t&&"object"===e(t)}function I(e){return e.replace(/~/g,"~0").replace(/\./g,"~1")}function S(e){return e.replace(/~1/g,".").replace(/~0/g,"~")}function O(e,t){if(""===t)return e;var n=t.indexOf(".");if(n>-1){var r=e[S(t.slice(0,n))];return void 0===r?void 0:O(r,t.slice(n+1))}return e[S(t)]}function T(e,t,n){if(""===t)return n;var r=t.indexOf(".");return r>-1?T(e[S(t.slice(0,r))],t.slice(r+1),n):(e[S(t)]=n,e)}function x(t){return null===t?"null":Array.isArray(t)?"array":e(t)}function N(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var j=Object.keys,P=Array.isArray,k={}.hasOwnProperty,R=["type","replaced","iterateIn","iterateUnsetNumeric"];function L(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function q(e,t){var n=e();return n&&n.then?n.then(t):t(n)}function U(e,t){if(""===e.keypath)return-1;var n=e.keypath.match(/\./g)||0,r=t.keypath.match(/\./g)||0;return n&&(n=n.length),r&&(r=r.length),n>r?-1:n<r?1:e.keypath<t.keypath?-1:e.keypath>t.keypath}var M=function(){function n(e){t(this,n),this.options=e,this.plainObjectReplacers=[],this.nonplainObjectReplacers=[],this.revivers={},this.types={}}return r(n,[{key:"stringify",value:function(e,t,n,r){r=i(i(i({},this.options),r),{},{stringification:!0});var u=this.encapsulate(e,null,r);return P(u)?JSON.stringify(u[0],t,n):u.then((function(e){return JSON.stringify(e,t,n)}))}},{key:"stringifySync",value:function(e,t,n,r){return this.stringify(e,t,n,i(i({throwOnBadSyncType:!0},r),{},{sync:!0}))}},{key:"stringifyAsync",value:function(e,t,n,r){return this.stringify(e,t,n,i(i({throwOnBadSyncType:!0},r),{},{sync:!1}))}},{key:"parse",value:function(e,t,n){return n=i(i(i({},this.options),n),{},{parse:!0}),this.revive(JSON.parse(e,t),n)}},{key:"parseSync",value:function(e,t,n){return this.parse(e,t,i(i({throwOnBadSyncType:!0},n),{},{sync:!0}))}},{key:"parseAsync",value:function(e,t,n){return this.parse(e,t,i(i({throwOnBadSyncType:!0},n),{},{sync:!1}))}},{key:"specialTypeNames",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.returnTypeNames=!0,this.encapsulate(e,t,n)}},{key:"rootTypeName",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.iterateNone=!0,this.encapsulate(e,t,n)}},{key:"encapsulate",value:function(t,r,u){var o=L((function(e,t){return N(Promise.all(t.map((function(e){return e[1].p}))),(function(n){return N(Promise.all(n.map(L((function(n){var r=!1,u=[],i=a(t.splice(0,1),1),c=a(i[0],7),s=c[0],l=c[2],f=c[3],D=c[4],d=c[5],_=c[6],p=g(s,n,l,f,u,!0,_),y=C(p,h);return q((function(){if(s&&y)return N(p.p,(function(t){return D[d]=t,r=!0,o(e,u)}))}),(function(t){return r?t:(s?D[d]=p:e=y?p.p:p,o(e,u))}))})))),(function(){return e}))}))})),s=(u=i(i({sync:!0},this.options),u)).sync,l=this,f={},D=[],d=[],_=[],p=!("cyclic"in u)||u.cyclic,y=u.encapsulateObserver,E=g("",t,p,r||{},_);function v(e){var t=Object.values(f);if(u.iterateNone)return t.length?t[0]:n.getJSONType(e);if(t.length){if(u.returnTypeNames)return c(new Set(t));e&&m(e)&&!k.call(e,"$types")?e.$types=f:e={$:e,$types:{$:f}}}else w(e)&&k.call(e,"$types")&&(e={$:e,$types:!0});return!u.returnTypeNames&&e}function b(e,t,n){Object.assign(e,t);var r=R.map((function(t){var n=e[t];return delete e[t],n}));n(),R.forEach((function(t,n){e[t]=r[n]}))}function g(t,r,o,i,a,c,s){var _,p={},E=e(r),v=y?function(e){var u=s||i.type||n.getJSONType(r);y(Object.assign(e||p,{keypath:t,value:r,cyclic:o,stateObj:i,promisesData:a,resolvingTypesonPromise:c,awaitingTypesonPromise:C(r,h)},{type:u}))}:null;if(["string","boolean","number","undefined"].includes(E))return void 0===r||Number.isNaN(r)||r===Number.NEGATIVE_INFINITY||r===Number.POSITIVE_INFINITY?(_=i.replaced?r:F(t,r,i,a,!1,c,v))!==r&&(p={replaced:_}):_=r,v&&v(),_;if(null===r)return v&&v(),r;if(o&&!i.iterateIn&&!i.iterateUnsetNumeric&&r&&"object"===e(r)){var A=D.indexOf(r);if(!(A<0))return f[t]="#",v&&v({cyclicKeypath:d[A]}),"#"+d[A];!0===o&&(D.push(r),d.push(t))}var B,w=m(r),S=P(r),O=(w||S)&&(!l.plainObjectReplacers.length||i.replaced)||i.iterateIn?r:F(t,r,i,a,w||S,null,v);if(O!==r?(_=O,p={replaced:O}):""===t&&C(r,h)?(a.push([t,r,o,i,void 0,void 0,i.type]),_=r):S&&"object"!==i.iterateIn||"array"===i.iterateIn?(B=new Array(r.length),p={clone:B}):(["function","symbol"].includes(e(r))||"toJSON"in r||C(r,h)||C(r,Promise)||C(r,ArrayBuffer))&&!w&&"object"!==i.iterateIn?_=r:(B={},i.addLength&&(B.length=r.length),p={clone:B}),v&&v(),u.iterateNone)return B||_;if(!B)return _;if(i.iterateIn){var T=function(e){var n={ownKeys:k.call(r,e)};b(i,n,(function(){var n=t+(t?".":"")+I(e),u=g(n,r[e],Boolean(o),i,a,c);C(u,h)?a.push([n,u,Boolean(o),i,B,e,i.type]):void 0!==u&&(B[e]=u)}))};for(var x in r)T(x);v&&v({endIterateIn:!0,end:!0})}else j(r).forEach((function(e){var n=t+(t?".":"")+I(e);b(i,{ownKeys:!0},(function(){var t=g(n,r[e],Boolean(o),i,a,c);C(t,h)?a.push([n,t,Boolean(o),i,B,e,i.type]):void 0!==t&&(B[e]=t)}))})),v&&v({endIterateOwn:!0,end:!0});if(i.iterateUnsetNumeric){for(var N=r.length,R=function(e){if(!(e in r)){var n=t+(t?".":"")+e;b(i,{ownKeys:!1},(function(){var t=g(n,void 0,Boolean(o),i,a,c);C(t,h)?a.push([n,t,Boolean(o),i,B,e,i.type]):void 0!==t&&(B[e]=t)}))}},L=0;L<N;L++)R(L);v&&v({endIterateUnsetNumeric:!0,end:!0})}return B}function F(e,t,n,r,u,o,i){for(var a=u?l.plainObjectReplacers:l.nonplainObjectReplacers,c=a.length;c--;){var D=a[c];if(D.test(t,n)){var d=D.type;if(l.revivers[d]){var _=f[e];f[e]=_?[d].concat(_):d}return Object.assign(n,{type:d,replaced:!0}),!s&&D.replaceAsync||D.replace?(i&&i({replacing:!0}),g(e,D[s||!D.replaceAsync?"replace":"replaceAsync"](t,n),p&&"readonly",n,r,o,d)):(i&&i({typeDetected:!0}),g(e,t,p&&"readonly",n,r,o,d))}}return t}return _.length?s&&u.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():Promise.resolve(o(E,_)).then(v):!s&&u.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():u.stringification&&s?[v(E)]:s?v(E):Promise.resolve(v(E))}},{key:"encapsulateSync",value:function(e,t,n){return this.encapsulate(e,t,i(i({throwOnBadSyncType:!0},n),{},{sync:!0}))}},{key:"encapsulateAsync",value:function(e,t,n){return this.encapsulate(e,t,i(i({throwOnBadSyncType:!0},n),{},{sync:!1}))}},{key:"revive",value:function(e,t){var n=e&&e.$types;if(!n)return e;if(!0===n)return e.$;var r=(t=i(i({sync:!0},this.options),t)).sync,u=[],o={},c=!0;n.$&&m(n.$)&&(e=e.$,n=n.$,c=!1);var s=this;function l(e,t){var n=a(s.revivers[e]||[],1)[0];if(!n)throw new Error("Unregistered type: "+e);return r&&!("revive"in n)?t:n[r&&n.revive?"revive":!r&&n.reviveAsync?"reviveAsync":"revive"](t,o)}function f(){var t=[];if(Object.entries(n).forEach((function(e){var r=a(e,2),u=r[0],o=r[1];"#"!==o&&[].concat(o).forEach((function(e){a(s.revivers[e]||[null,{}],2)[1].plain&&(t.push({keypath:u,type:e}),delete n[u])}))})),t.length)return t.sort(U).reduce((function t(n,r){var u=r.keypath,o=r.type;if(F(n))return n.then((function(e){return t(e,{keypath:u,type:o})}));var i=O(e,u);if(C(i=l(o,i),h))return i.then((function(t){var n=T(e,u,t);n===t&&(e=n)}));var a=T(e,u,i);a===i&&(e=a)}),void 0)}var D=[];function d(e,t,r,o,i){if(!c||"$types"!==e){var s=n[e],f=P(t);if(f||m(t)){var _=f?new Array(t.length):{};for(j(t).forEach((function(n){var u=d(e+(e?".":"")+I(n),t[n],r||_,_,n),o=function(e){return C(e,V)?_[n]=void 0:void 0!==e&&(_[n]=e),e};C(u,h)?D.push(u.then((function(e){return o(e)}))):o(u)})),t=_;u.length;){var p=a(u[0],4),y=p[0],E=p[1],v=p[2],b=p[3],g=O(y,E);if(void 0===g)break;v[b]=g,u.splice(0,1)}}if(!s)return t;if("#"===s){var F=O(r,t.slice(1));return void 0===F&&u.push([r,t.slice(1),o,i]),F}return[].concat(s).reduce((function e(t,n){return C(t,h)?t.then((function(t){return e(t,n)})):l(n,t)}),t)}}function _(e){return C(e,V)?void 0:e}var p,y=f();return C(y,h)?p=y.then((function(){return e})):(p=d("",e,null),D.length&&(p=h.resolve(p).then((function(e){return h.all([e].concat(D))})).then((function(e){return a(e,1)[0]})))),F(p)?r&&t.throwOnBadSyncType?function(){throw new TypeError("Sync method requested but async result obtained")}():C(p,h)?p.p.then(_):p:!r&&t.throwOnBadSyncType?function(){throw new TypeError("Async method requested but sync result obtained")}():r?_(p):Promise.resolve(_(p))}},{key:"reviveSync",value:function(e,t){return this.revive(e,i(i({throwOnBadSyncType:!0},t),{},{sync:!0}))}},{key:"reviveAsync",value:function(e,t){return this.revive(e,i(i({throwOnBadSyncType:!0},t),{},{sync:!1}))}},{key:"register",value:function(e,t){return t=t||{},[].concat(e).forEach((function e(r){var u=this;if(P(r))return r.map((function(t){return e.call(u,t)}));r&&j(r).forEach((function(e){if("#"===e)throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");if(n.JSON_TYPES.includes(e))throw new TypeError("Plain JSON object types are reserved as type names");var u=r[e],o=u&&u.testPlainObjects?this.plainObjectReplacers:this.nonplainObjectReplacers,c=o.filter((function(t){return t.type===e}));if(c.length&&(o.splice(o.indexOf(c[0]),1),delete this.revivers[e],delete this.types[e]),"function"==typeof u){var s=u;u={test:function(e){return e&&e.constructor===s},replace:function(e){return i({},e)},revive:function(e){return Object.assign(Object.create(s.prototype),e)}}}else if(P(u)){var l=a(u,3);u={test:l[0],replace:l[1],revive:l[2]}}if(u&&u.test){var f={type:e,test:u.test.bind(u)};u.replace&&(f.replace=u.replace.bind(u)),u.replaceAsync&&(f.replaceAsync=u.replaceAsync.bind(u));var D="number"==typeof t.fallback?t.fallback:t.fallback?0:Number.POSITIVE_INFINITY;if(u.testPlainObjects?this.plainObjectReplacers.splice(D,0,f):this.nonplainObjectReplacers.splice(D,0,f),u.revive||u.reviveAsync){var d={};u.revive&&(d.revive=u.revive.bind(u)),u.reviveAsync&&(d.reviveAsync=u.reviveAsync.bind(u)),this.revivers[e]=[d,{plain:u.testPlainObjects}]}this.types[e]=u}}),this)}),this),this}}]),n}(),V=function e(){t(this,e)};return V.__typeson__type__="TypesonUndefined",M.Undefined=V,M.Promise=h,M.isThenable=F,M.toStringTag=A,M.hasConstructorOf=C,M.isObject=w,M.isPlainObject=m,M.isUserObject=B,M.escapeKeyPathComponent=I,M.unescapeKeyPathComponent=S,M.getByKeyPath=O,M.getJSONType=x,M.JSON_TYPES=["null","boolean","number","string","array","object"],M}()}(St);for(var Ot=St.exports,Tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xt=new Uint8Array(256),Nt=0;Nt<Tt.length;Nt++)xt[Tt.charCodeAt(Nt)]=Nt;var jt=function(e,t,n){null==n&&(n=e.byteLength);for(var r=new Uint8Array(e,t||0,n),u=r.length,o="",i=0;i<u;i+=3)o+=Tt[r[i]>>2],o+=Tt[(3&r[i])<<4|r[i+1]>>4],o+=Tt[(15&r[i+1])<<2|r[i+2]>>6],o+=Tt[63&r[i+2]];return u%3==2?o=o.slice(0,-1)+"=":u%3==1&&(o=o.slice(0,-2)+"=="),o},Pt=function(e){var t,n,r,u,o=e.length,i=.75*e.length,a=0;"="===e[e.length-1]&&(i--,"="===e[e.length-2]&&i--);for(var c=new ArrayBuffer(i),s=new Uint8Array(c),l=0;l<o;l+=4)t=xt[e.charCodeAt(l)],n=xt[e.charCodeAt(l+1)],r=xt[e.charCodeAt(l+2)],u=xt[e.charCodeAt(l+3)],s[a++]=t<<2|n>>4,s[a++]=(15&n)<<4|r>>2,s[a++]=(3&r)<<6|63&u;return c},kt={arraybuffer:{test:function(e){return"ArrayBuffer"===Ot.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),jt(e))},revive:function(e,t){if(t.buffers||(t.buffers=[]),"object"===n(e))return t.buffers[e.index];var r=Pt(e);return t.buffers.push(r),r}}},Rt={bigintObject:{test:function(e){return"object"===n(e)&&Ot.hasConstructorOf(e,BigInt)},replace:function(e){return String(e)},revive:function(e){return new Object(BigInt(e))}}},Lt={bigint:{test:function(e){return"bigint"==typeof e},replace:function(e){return String(e)},revive:function(e){return BigInt(e)}}};function qt(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}var Ut={blob:{test:function(e){return"Blob"===Ot.toStringTag(e)},replace:function(e){var t=new XMLHttpRequest;if(t.overrideMimeType("text/plain; charset=x-user-defined"),t.open("GET",URL.createObjectURL(e),!1),t.send(),200!==t.status&&0!==t.status)throw new Error("Bad Blob access: "+t.status);return{type:e.type,stringContents:t.responseText}},revive:function(e){var t=e.type,n=e.stringContents;return new Blob([qt(n)],{type:t})},replaceAsync:function(e){return new Ot.Promise((function(t,n){var r=new FileReader;r.addEventListener("load",(function(){t({type:e.type,stringContents:r.result})})),r.addEventListener("error",(function(){n(r.error)})),r.readAsBinaryString(e)}))}}};function Mt(){var e=Date.now()+("undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():0);return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=Math.trunc((e+16*Math.random())%16);return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))}var Vt={},Kt={cloneable:{test:function(e){return e&&"object"===n(e)&&"function"==typeof e[Symbol.for("cloneEncapsulate")]},replace:function(e){var t=e[Symbol.for("cloneEncapsulate")](),n=Mt();return Vt[n]=e,{uuid:n,encapsulated:t}},revive:function(e){var t=e.uuid,n=e.encapsulated;return Vt[t][Symbol.for("cloneRevive")](n)}}},Gt={cryptokey:{test:function(e){return"CryptoKey"===Ot.toStringTag(e)&&e.extractable},replaceAsync:function(e){return new Ot.Promise((function(t,n){crypto.subtle.exportKey("jwk",e).catch((function(e){n(e)})).then((function(n){t({jwk:n,algorithm:e.algorithm,usages:e.usages})}))}))},revive:function(e){var t=e.jwk,n=e.algorithm,r=e.usages;return crypto.subtle.importKey("jwk",t,n,!0,r)}}},Ht={dataview:{test:function(e){return"DataView"===Ot.toStringTag(e)},replace:function(e,t){var n=e.buffer,r=e.byteOffset,u=e.byteLength;t.buffers||(t.buffers=[]);var o=t.buffers.indexOf(n);return o>-1?{index:o,byteOffset:r,byteLength:u}:(t.buffers.push(n),{encoded:jt(n),byteOffset:r,byteLength:u})},revive:function(e,t){t.buffers||(t.buffers=[]);var n,r=e.byteOffset,u=e.byteLength,o=e.encoded,i=e.index;return"index"in e?n=t.buffers[i]:(n=Pt(o),t.buffers.push(n)),new DataView(n,r,u)}}},Wt={date:{test:function(e){return"Date"===Ot.toStringTag(e)},replace:function(e){var t=e.getTime();return Number.isNaN(t)?"NaN":t},revive:function(e){return"NaN"===e?new Date(Number.NaN):new Date(e)}}},Qt={error:{test:function(e){return"Error"===Ot.toStringTag(e)},replace:function(e){return{name:e.name,message:e.message}},revive:function(e){var t=e.name,n=e.message,r=new Error(n);return r.name=t,r}}},Yt="undefined"==typeof self?y:self,$t={};["TypeError","RangeError","SyntaxError","ReferenceError","EvalError","URIError","InternalError"].forEach((function(e){var t=Yt[e];t&&($t[e.toLowerCase()]={test:function(e){return Ot.hasConstructorOf(e,t)},replace:function(e){return e.message},revive:function(e){return new t(e)}})}));var Jt={file:{test:function(e){return"File"===Ot.toStringTag(e)},replace:function(e){var t=new XMLHttpRequest;if(t.overrideMimeType("text/plain; charset=x-user-defined"),t.open("GET",URL.createObjectURL(e),!1),t.send(),200!==t.status&&0!==t.status)throw new Error("Bad File access: "+t.status);return{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,u=e.lastModified;return new File([qt(r)],t,{type:n,lastModified:u})},replaceAsync:function(e){return new Ot.Promise((function(t,n){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.readAsBinaryString(e)}))}}},Xt={file:Jt.file,filelist:{test:function(e){return"FileList"===Ot.toStringTag(e)},replace:function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e.item(n);return t},revive:function(e){return new(function(e){function t(){r(this,t),this._files=arguments[0],this.length=this._files.length}var n,o,i;return n=t,(o=[{key:"item",value:function(e){return this._files[e]}},{key:e,get:function(){return"FileList"}}])&&u(n.prototype,o),i&&u(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(Symbol.toStringTag))(e)}}},zt={imagebitmap:{test:function(e){return"ImageBitmap"===Ot.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){
5
5
  /*
6
6
  var req = new XMLHttpRequest();
7
7
  req.open('GET', o, false); // Sync