1/* 2 localForage -- Offline Storage, Improved 3 Version 1.10.0 4 https://localforage.github.io/localForage 5 (c) 2013-2017 Mozilla, Apache License 2.0 6*/ 7!function(ea){"object"==typeof exports&&"undefined"!=typeof module?module.exports=ea():"function"==typeof define&&define.amd?define([],ea):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).localforage=ea()}(function(){return function y(G,F,Q){function q(D,E){if(!F[D]){if(!G[D]){var N="function"==typeof require&&require;if(!E&&N)return N(D,!0);if(z)return z(D,!0);E=Error("Cannot find module '"+D+"'");throw E.code="MODULE_NOT_FOUND",E;}E=F[D]={exports:{}}; 8G[D][0].call(E.exports,function(H){return q(G[D][1][H]||H)},E,E.exports,y,G,F,Q)}return F[D].exports}for(var z="function"==typeof require&&require,A=0;A<Q.length;A++)q(Q[A]);return q}({1:[function(G,F,Q){(function(y){function q(){H=!0;for(var C,I,R=v.length;R;){I=v;v=[];for(C=-1;++C<R;)I[C]();R=v.length}H=!1}var z=y.MutationObserver||y.WebKitMutationObserver;if(z){var A=0;z=new z(q);var D=y.document.createTextNode("");z.observe(D,{characterData:!0});var E=function(){D.data=A=++A%2}}else if(y.setImmediate|| 9void 0===y.MessageChannel)E="document"in y&&"onreadystatechange"in y.document.createElement("script")?function(){var C=y.document.createElement("script");C.onreadystatechange=function(){q();C.onreadystatechange=null;C.parentNode.removeChild(C);C=null};y.document.documentElement.appendChild(C)}:function(){setTimeout(q,0)};else{var N=new y.MessageChannel;N.port1.onmessage=q;E=function(){N.port2.postMessage(0)}}var H,v=[];F.exports=function(C){1!==v.push(C)||H||E()}}).call(this,"undefined"!=typeof global? 10global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(G,F,Q){function y(){}function q(m){if("function"!=typeof m)throw new TypeError("resolver must be a function");this.state=R;this.queue=[];this.outcome=void 0;m!==y&&E(this,m)}function z(m,u,t){this.promise=m;"function"==typeof u&&(this.onFulfilled=u,this.callFulfilled=this.otherCallFulfilled);"function"==typeof t&&(this.onRejected=t,this.callRejected=this.otherCallRejected)}function A(m,u,t){H(function(){try{var B= 11u(t)}catch(w){return v.reject(m,w)}B===m?v.reject(m,new TypeError("Cannot resolve promise with itself")):v.resolve(m,B)})}function D(m){var u=m&&m.then;if(m&&("object"==typeof m||"function"==typeof m)&&"function"==typeof u)return function(){u.apply(m,arguments)}}function E(m,u){function t(J){w||(w=!0,v.reject(m,J))}function B(J){w||(w=!0,v.resolve(m,J))}var w=!1,M=N(function(){u(B,t)});"error"===M.status&&t(M.value)}function N(m,u){var t={};try{t.value=m(u),t.status="success"}catch(B){t.status="error", 12t.value=B}return t}var H=G(1),v={},C=["REJECTED"],I=["FULFILLED"],R=["PENDING"];F.exports=q;q.prototype.catch=function(m){return this.then(null,m)};q.prototype.then=function(m,u){if("function"!=typeof m&&this.state===I||"function"!=typeof u&&this.state===C)return this;var t=new this.constructor(y);this.state!==R?A(t,this.state===I?m:u,this.outcome):this.queue.push(new z(t,m,u));return t};z.prototype.callFulfilled=function(m){v.resolve(this.promise,m)};z.prototype.otherCallFulfilled=function(m){A(this.promise, 13this.onFulfilled,m)};z.prototype.callRejected=function(m){v.reject(this.promise,m)};z.prototype.otherCallRejected=function(m){A(this.promise,this.onRejected,m)};v.resolve=function(m,u){var t=N(D,u);if("error"===t.status)return v.reject(m,t.value);if(t=t.value)E(m,t);else{m.state=I;m.outcome=u;t=-1;for(var B=m.queue.length;++t<B;)m.queue[t].callFulfilled(u)}return m};v.reject=function(m,u){m.state=C;m.outcome=u;for(var t=-1,B=m.queue.length;++t<B;)m.queue[t].callRejected(u);return m};q.resolve=function(m){return m instanceof 14this?m:v.resolve(new this(y),m)};q.reject=function(m){var u=new this(y);return v.reject(u,m)};q.all=function(m){function u(O,aa){t.resolve(O).then(function(Y){M[aa]=Y;++J!==B||w||(w=!0,v.resolve(P,M))},function(Y){w||(w=!0,v.reject(P,Y))})}var t=this;if("[object Array]"!==Object.prototype.toString.call(m))return this.reject(new TypeError("must be an array"));var B=m.length,w=!1;if(!B)return this.resolve([]);for(var M=Array(B),J=0,S=-1,P=new this(y);++S<B;)u(m[S],S);return P};q.race=function(m){function u(S){t.resolve(S).then(function(P){w|| 15(w=!0,v.resolve(J,P))},function(P){w||(w=!0,v.reject(J,P))})}var t=this;if("[object Array]"!==Object.prototype.toString.call(m))return this.reject(new TypeError("must be an array"));var B=m.length,w=!1;if(!B)return this.resolve([]);for(var M=-1,J=new this(y);++M<B;)u(m[M]);return J}},{1:1}],3:[function(G,F,Q){F="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};"function"!=typeof F.Promise&&(F.Promise=G(2))},{2:2}],4:[function(G,F,Q){function y(a, 16b){a=a||[];b=b||{};try{return new Blob(a,b)}catch(f){if("TypeError"!==f.name)throw f;for(var c=new ("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),d=0;d<a.length;d+=1)c.append(a[d]);return c.getBlob(b.type)}}function q(a,b){b&&a.then(function(c){b(null,c)},function(c){b(c)})}function z(a,b,c){"function"==typeof b&&a.then(b);"function"==typeof c&&a.catch(c)}function A(a){return"string"!= 17typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a)),a}function D(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}function E(a){return(new p(function(b){var c=a.transaction(fa,ba),d=y([""]);c.objectStore(fa).put(d,"key");c.onabort=function(f){f.preventDefault();f.stopPropagation();b(!1)};c.oncomplete=function(){var f=navigator.userAgent.match(/Chrome\/(\d+)/),e=navigator.userAgent.match(/Edge\//);b(e||!f||43<= 18parseInt(f[1],10))}})).catch(function(){return!1})}function N(a){return"boolean"==typeof ha?p.resolve(ha):E(a).then(function(b){return ha=b})}function H(a){a=K[a.name];var b={};b.promise=new p(function(c,d){b.resolve=c;b.reject=d});a.deferredOperations.push(b);a.dbReady?a.dbReady=a.dbReady.then(function(){return b.promise}):a.dbReady=b.promise}function v(a){if(a=K[a.name].deferredOperations.pop())return a.resolve(),a.promise}function C(a,b){if(a=K[a.name].deferredOperations.pop())return a.reject(b), 19a.promise}function I(a,b){return new p(function(c,d){if(K[a.name]=K[a.name]||M(),a.db){if(!b)return c(a.db);H(a);a.db.close()}var f=[a.name];b&&f.push(a.version);var e=V.open.apply(V,f);b&&(e.onupgradeneeded=function(g){var k=e.result;try{k.createObjectStore(a.storeName),1>=g.oldVersion&&k.createObjectStore(fa)}catch(h){if("ConstraintError"!==h.name)throw h;console.warn('The database "'+a.name+'" has been upgraded from version '+g.oldVersion+" to version "+g.newVersion+', but the storage "'+a.storeName+ 20'" already exists.')}});e.onerror=function(g){g.preventDefault();d(e.error)};e.onsuccess=function(){var g=e.result;g.onversionchange=function(k){k.target.close()};c(g);v(a)}})}function R(a,b){if(!a.db)return!0;var c=!a.db.objectStoreNames.contains(a.storeName),d=a.version>a.db.version;return(a.version<a.db.version&&(a.version!==b&&console.warn('The database "'+a.name+"\" can't be downgraded from version "+a.db.version+" to version "+a.version+"."),a.version=a.db.version),d||c)?(c&&(b=a.db.version+ 211,b>a.version&&(a.version=b)),!0):!1}function m(a){return new p(function(b,c){var d=new FileReader;d.onerror=c;d.onloadend=function(f){f=btoa(f.target.result||"");b({__local_forage_encoded_blob:!0,data:f,type:a.type})};d.readAsBinaryString(a)})}function u(a){for(var b=atob(a.data),c=b.length,d=new ArrayBuffer(c),f=new Uint8Array(d),e=0;e<c;e++)f[e]=b.charCodeAt(e);return y([d],{type:a.type})}function t(a){var b=this,c=b._initReady().then(function(){var d=K[b._dbInfo.name];if(d&&d.dbReady)return d.dbReady}); 22return z(c,a,a),c}function B(a){H(a);for(var b=K[a.name],c=b.forages,d=0;d<c.length;d++){var f=c[d];f._dbInfo.db&&(f._dbInfo.db.close(),f._dbInfo.db=null)}return a.db=null,I(a,!1).then(function(e){return a.db=e,R(a)?I(a,!0):e}).then(function(e){a.db=b.db=e;for(var g=0;g<c.length;g++)c[g]._dbInfo.db=e}).catch(function(e){throw C(a,e),e;})}function w(a,b,c,d){void 0===d&&(d=1);try{var f=a.db.transaction(a.storeName,b);c(null,f)}catch(e){if(0<d&&(!a.db||"InvalidStateError"===e.name||"NotFoundError"=== 23e.name))return p.resolve().then(function(){if(!a.db||"NotFoundError"===e.name&&!
23a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),I(a,!0)}).then(function(){return B(a).then(function(){w(a,b,c,d-1)})}).catch(c);c(e)}}function M(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function J(a){var b=.75*a.length;var c=a.length,d=0;"\x3d"===a[a.length-1]&&(b--,"\x3d"===a[a.length-2]&&b--);var f=new ArrayBuffer(b),e=new Uint8Array(f); 24for(b=0;b<c;b+=4){var g=T.indexOf(a[b]);var k=T.indexOf(a[b+1]);var h=T.indexOf(a[b+2]);var l=T.indexOf(a[b+3]);e[d++]=g<<2|k>>4;e[d++]=(15&k)<<4|h>>2;e[d++]=(3&h)<<6|63&l}return f}function S(a){var b=new Uint8Array(a),c="";for(a=0;a<b.length;a+=3)c+=T[b[a]>>2],c+=T[(3&b[a])<<4|b[a+1]>>4],c+=T[(15&b[a+1])<<2|b[a+2]>>6],c+=T[63&b[a+2]];return 2==b.length%3?c=c.substring(0,c.length-1)+"\x3d":1==b.length%3&&(c=c.substring(0,c.length-2)+"\x3d\x3d"),c}function P(a,b,c,d){a.executeSql("CREATE TABLE IF NOT EXISTS "+ 25b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,d)}function O(a,b,c,d,f,e){a.executeSql(c,d,f,function(g,k){k.code===k.SYNTAX_ERR?g.executeSql("SELECT name FROM sqlite_master WHERE type\x3d'table' AND name \x3d ?",[b.storeName],function(h,l){l.rows.length?e(h,k):P(h,b,function(){h.executeSql(c,d,f,e)},e)},e):e(g,k)},e)}function aa(a,b,c,d){var f=this;a=A(a);var e=new p(function(g,k){f.ready().then(function(){void 0===b&&(b=null);var h=b,l=f._dbInfo;l.serializer.serialize(b,function(n, 26r){r?k(r):l.db.transaction(function(x){O(x,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[a,n],function(){g(h)},function(L,U){k(U)})},function(x){if(x.code===x.QUOTA_ERR){if(0<d)return void g(aa.apply(f,[a,h,c,d-1]));k(x)}})})}).catch(k)});return q(e,c),e}function Y(a){return new p(function(b,c){a.transaction(function(d){d.executeSql("SELECT name FROM sqlite_master WHERE type\x3d'table' AND name \x3c\x3e '__WebKitDatabaseInfoTable__'",[],function(f,e){f=[];for(var g=0;g<e.rows.length;g++)f.push(e.rows.item(g).name); 27b({db:a,storeNames:f})},function(f,e){c(e)})},function(d){c(d)})})}function na(a,b){var c=a.name+"/";return a.storeName!==b.storeName&&(c+=a.storeName+"/"),c}function ta(a,b){a[b]=function(){var c=arguments;return a.ready().then(function(){return a[b].apply(a,c)})}}function ia(){for(var a=1;a<arguments.length;a++){var b=arguments[a];if(b)for(var c in b)b.hasOwnProperty(c)&&(oa(b[c])?arguments[0][c]=b[c].slice():arguments[0][c]=b[c])}return arguments[0]}var ua="function"==typeof Symbol&&"symbol"== 28typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},V=function(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}();"undefined"==typeof Promise&&G(3);var p=Promise, 29fa="local-forage-detect-blob-support",ha=void 0,K={},va=Object.prototype.toString,ba="readwrite";G={_driver:"asyncStorage",_initStorage:function(a){function b(){return p.resolve()}var c=this,d={db:null};if(a)for(var f in a)d[f]=a[f];var e=K[d.name];e||(e=M(),K[d.name]=e);e.forages.push(c);c._initReady||(c._initReady=c.ready,c.ready=t);a=[];for(f=0;f<e.forages.length;f++){var g=e.forages[f];g!==c&&a.push(g._initReady().catch(b))}var k=e.forages.slice(0);return p.all(a).then(function(){return d.db= 30e.db,I(d,!1)}).then(function(h){return d.db=h,R(d,c._defaultConfig.version)?I(d,!0):h}).then(function(h){d.db=e.db=h;c._dbInfo=d;for(h=0;h<k.length;h++){var l=k[h];l!==c&&(l._dbInfo.db=d.db,l._dbInfo.version=d.version)}})},_support:function(){try{if(!V||!V.open)return!1;var a="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),b="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code"); 31return(!a||b)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(c){return!1}}(),iterate:function(a,b){var c=this,d=new p(function(f,e){c.ready().then(function(){w(c._dbInfo,"readonly",function(g,k){if(g)return e(g);try{var h=k.objectStore(c._dbInfo.storeName).openCursor(),l=1;h.onsuccess=function(){var n=h.result;if(n){var r=n.value;r&&r.__local_forage_encoded_blob&&(r=u(r));r=a(r,n.key,l++);void 0!==r?f(r):n.continue()}else f()};h.onerror=function(){e(h.error)}}catch(n){e(n)}})}).catch(e)}); 32return q(d,b),d},getItem:function(a,b){var c=this;a=A(a);var d=new p(function(f,e){c.ready().then(function(){w(c._dbInfo,"readonly",function(g,k){if(g)return e(g);try{var h=k.objectStore(c._dbInfo.storeName).get(a);h.onsuccess=function(){var l=h.result;void 0===l&&(l=null);l&&l.__local_forage_encoded_blob&&(l=u(l));f(l)};h.onerror=function(){e(h.error)}}catch(l){e(l)}})}).catch(e)});return q(d,b),d},setItem:function(a,b,c){var d=this;a=A(a);var f=new p(function(e,g){var k;d.ready().then(function(){return k= 33d._dbInfo,"[object Blob]"===va.call(b)?N(k.db).then(function(h){return h?b:m(b)}):b}).then(function(h){w(d._dbInfo,ba,function(l,n){if(l)return g(l);try{var r=n.objectStore(d._dbInfo.storeName);
33null===h&&(h=void 0);var x=r.put(h,a);n.oncomplete=function(){void 0===h&&(h=null);e(h)};n.onabort=n.onerror=function(){g(x.error?x.error:x.transaction.error)}}catch(L){g(L)}})}).catch(g)});return q(f,c),f},removeItem:function(a,b){var c=this;a=A(a);var d=new p(function(f,e){c.ready().then(function(){w(c._dbInfo, 34ba,function(g,k){if(g)return e(g);try{var h=k.objectStore(c._dbInfo.storeName).delete(a);k.oncomplete=function(){f()};k.onerror=function(){e(h.error)};k.onabort=function(){e(h.error?h.error:h.transaction.error)}}catch(l){e(l)}})}).catch(e)});return q(d,b),d},clear:function(a){var b=this,c=new p(function(d,f){b.ready().then(function(){w(b._dbInfo,ba,function(e,g){if(e)return f(e);try{var k=g.objectStore(b._dbInfo.storeName).clear();g.oncomplete=function(){d()};g.onabort=g.onerror=function(){f(k.error? 35k.error:k.transaction.error)}}catch(h){f(h)}})}).catch(f)});return q(c,a),c},length:function(a){var b=this,c=new p(function(d,f){b.ready().then(function(){w(b._dbInfo,"readonly",function(e,g){if(e)return f(e);try{var k=g.objectStore(b._dbInfo.storeName).count();k.onsuccess=function(){d(k.result)};k.onerror=function(){f(k.error)}}catch(h){f(h)}})}).catch(f)});return q(c,a),c},key:function(a,b){var c=this,d=new p(function(f,e){if(0>a)return void f(null);c.ready().then(function(){w(c._dbInfo,"readonly", 36function(g,k){if(g)return e(g);try{var h=!1,l=k.objectStore(c._dbInfo.storeName).openKeyCursor();l.onsuccess=function(){var n=l.result;if(!n)return void f(null);0===a?f(n.key):h?f(n.key):(h=!0,n.advance(a))};l.onerror=function(){e(l.error)}}catch(n){e(n)}})}).catch(e)});return q(d,b),d},keys:function(a){var b=this,c=new p(function(d,f){b.ready().then(function(){w(b._dbInfo,"readonly",function(e,g){if(e)return f(e);try{var k=g.objectStore(b._dbInfo.storeName).openKeyCursor(),h=[];k.onsuccess=function(){var l= 37k.result;if(!l)return void d(h);h.push(l.key);l.continue()};k.onerror=function(){f(k.error)}}catch(l){f(l)}})}).catch(f)});return q(c,a),c},dropInstance:function(a,b){b=D.apply(this,arguments);var c=this.config();a="function"!=typeof a&&a||{};a.name||(a.name=a.name||c.name,a.storeName=a.storeName||c.storeName);a.name?(c=a.name===c.name&&this._dbInfo.db?p.resolve(this._dbInfo.db):I(a,!1).then(function(d){var f=K[a.name],e=f.forages;f.db=d;for(f=0;f<e.length;f++)e[f]._dbInfo.db=d;return d}),c=a.storeName? 38c.then(function(d){if(d.objectStoreNames.contains(a.storeName)){var f=d.version+1;H(a);var e=K[a.name],g=e.forages;d.close();for(d=0;d<g.length;d++){var k=g[d];k._dbInfo.db=null;k._dbInfo.version=f}return(new p(function(h,l){var n=V.open(a.name,f);n.onerror=function(r){n.result.close();l(r)};n.onupgradeneeded=function(){n.result.deleteObjectStore(a.storeName)};n.onsuccess=function(){var r=n.result;r.close();h(r)}})).then(function(h){e.db=h;for(var l=0;l<g.length;l++){var n=g[l];n._dbInfo.db=h;v(n._dbInfo)}}).catch(function(h){throw(C(a, 39h)||p.resolve()).catch(function(){}),h;})}}):c.then(function(d){H(a);var f=K[a.name],e=f.forages;d.close();for(d=0;d<e.length;d++)e[d]._dbInfo.db=null;return(new p(function(g,k){var h=V.deleteDatabase(a.name);h.onerror=function(){var l=h.result;l&&l.close();k(h.error)};h.onblocked=function(){console.warn('dropInstance blocked for database "'+a.name+'" until all open connections are closed')};h.onsuccess=function(){var l=h.result;l&&l.close();g(l)}})).then(function(g){f.db=g;for(g=0;g<e.length;g++)v(e[g]._dbInfo)}).catch(function(g){throw(C(a, 40g)||p.resolve()).catch(function(){}),g;})})):c=p.reject("Invalid arguments");return q(c,b),c}};var T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pa=/^~~local_forage_type~([^~]+)~/,qa=Object.prototype.toString,ja={serialize:function(a,b){var c="";if(a&&(c=qa.call(a)),a&&("[object ArrayBuffer]"===c||a.buffer&&"[object ArrayBuffer]"===qa.call(a.buffer))){var d,f="__lfsc__:";a instanceof ArrayBuffer?(d=a,f+="arbf"):(d=a.buffer,"[object Int8Array]"===c?f+="si08":"[object Uint8Array]"=== 41c?f+="ui08":"[object Uint8ClampedArray]"===c?f+="uic8":"[object Int16Array]"===c?f+="si16":"[object Uint16Array]"===c?f+="ur16":"[object Int32Array]"===c?f+="si32":"[object Uint32Array]"===c?f+="ui32":"[object Float32Array]"===c?f+="fl32":"[object Float64Array
41]"===c?f+="fl64":b(Error("Failed to get type for BinaryArray")));b(f+S(d))}else if("[object Blob]"===c)c=new FileReader,c.onload=function(){var e="~~local_forage_type~"+a.type+"~"+S(this.result);b("__lfsc__:blob"+e)},c.readAsArrayBuffer(a);else try{b(JSON.stringify(a))}catch(e){console.error("Couldn't convert value into a JSON string: ", 42a),b(null,e)}},deserialize:function(a){if("__lfsc__:"!==a.substring(0,9))return JSON.parse(a);var b=a.substring(13);a=a.substring(9,13);if("blob"===a&&pa.test(b)){var c=b.match(pa);var d=c[1];b=b.substring(c[0].length)}b=J(b);switch(a){case "arbf":return b;case "blob":return y([b],{type:d});case "si08":return new Int8Array(b);case "ui08":return new Uint8Array(b);case "uic8":return new Uint8ClampedArray(b);case "si16":return new Int16Array(b);case "ur16":return new Uint16Array(b);case "si32":return new Int32Array(b); 43case "ui32":return new Uint32Array(b);case "fl32":return new Float32Array(b);case "fl64":return new Float64Array(b);default:throw Error("Unkown type: "+a);}},stringToBuffer:J,bufferToString:S};Q={_driver:"webSQLStorage",_initStorage:function(a){var b=this,c={db:null};if(a)for(var d in a)c[d]="string"!=typeof a[d]?a[d].toString():a[d];a=new p(function(f,e){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(g){return e(g)}c.db.transaction(function(g){P(g,c,function(){b._dbInfo= 44c;f()},function(k,h){e(h)})},e)});return c.serializer=ja,a},_support:"function"==typeof openDatabase,iterate:function(a,b){var c=this,d=new p(function(f,e){c.ready().then(function(){var g=c._dbInfo;g.db.transaction(function(k){O(k,g,"SELECT * FROM "+g.storeName,[],function(h,l){h=l.rows;l=h.length;for(var n=0;n<l;n++){var r=h.item(n),x=r.value;if(x&&(x=g.serializer.deserialize(x)),void 0!==(x=a(x,r.key,n+1)))return void f(x)}f()},function(h,l){e(l)})})}).catch(e)});return q(d,b),d},getItem:function(a, 45b){var c=this;a=A(a);var d=new p(function(f,e){c.ready().then(function(){var g=c._dbInfo;g.db.transaction(function(k){O(k,g,"SELECT * FROM "+g.storeName+" WHERE key \x3d ? LIMIT 1",[a],function(h,l){(h=l.rows.length?l.rows.item(0).value:null)&&(h=g.serializer.deserialize(h));f(h)},function(h,l){e(l)})})}).catch(e)});return q(d,b),d},setItem:function(a,b,c){return aa.apply(this,[a,b,c,1])},removeItem:function(a,b){var c=this;a=A(a);var d=new p(function(f,e){c.ready().then(function(){var g=c._dbInfo; 46g.db.transaction(function(k){O(k,g,"DELETE FROM "+g.storeName+" WHERE key \x3d ?",[a],function(){f()},function(h,l){e(l)})})}).catch(e)});return q(d,b),d},clear:function(a){var b=this,c=new p(function(d,f){b.ready().then(function(){var e=b._dbInfo;e.db.transaction(function(g){O(g,e,"DELETE FROM "+e.storeName,[],function(){d()},function(k,h){f(h)})})}).catch(f)});return q(c,a),c},length:function(a){var b=this,c=new p(function(d,f){b.ready().then(function(){var e=b._dbInfo;e.db.transaction(function(g){O(g, 47e,"SELECT COUNT(key) as c FROM "+e.storeName,[],function(k,h){k=h.rows.item(0).c;d(k)},function(k,h){f(h)})})}).catch(f)});return q(c,a),c},key:function(a,b){var c=this,d=new p(function(f,e){c.ready().then(function(){var g=c._dbInfo;g.db.transaction(function(k){O(k,g,"SELECT key FROM "+g.storeName+" WHERE id \x3d ? LIMIT 1",[a+1],function(h,l){h=l.rows.length?l.rows.item(0).key:null;f(h)},function(h,l){e(l)})})}).catch(e)});return q(d,b),d},keys:function(a){var b=this,c=new p(function(d,f){b.ready().then(function(){var e= 48b._dbInfo;e.db.transaction(function(g){O(g,e,"SELECT key FROM "+e.storeName,[],function(k,h){k=[];for(var l=0;l<h.rows.length;l++)k.push(h.rows.item(l).key);d(k)},function(k,h){f(h)})})}).catch(f)});return q(c,a),c},dropInstance:function(a,b){b=D.apply(this,arguments);var c=this.config();a="function"!=typeof a&&a||{};a.name||(a.name=a.name||c.name,a.storeName=a.storeName||c.storeName);var d,f=this;return d=a.name?(new p(function(e){var g=a.name===c.name?f._dbInfo.db:openDatabase(a.name,"","",0);e(a.storeName? 49{db:g,storeNames:[a.storeName]}:Y(g))})).then(function(e){return new p(function(g,k){e.db.transaction(function(h){function l(L){return new p(function(U,ka){h.executeSql("DROP TABLE IF EXISTS "+L,[],function(){U()},function(ca,la){ka(la)})})}for(var n=[],r=0,x=e.storeNames.length;r<x;r++)n.push(l(e.storeNames[r]));p.all(n).then(function(){g()}).catch(function(L){k(L)})},function(h){k(h)})})}):p.reject("Invalid arguments"),q(d,b),d}};try{var W="undefined"!=typeof localStorage&&"setItem"in localStorage&& 50!!localStorage.setItem}catch(a){W=!1}var wa=function(a,b){for(var c=a.length,d=0;d<c;){var f=a[d],e=b;if(f===e||"number"==typeof f&&"number"==typeof e&&isNaN(f)&&isNaN(e))return!0;d++}return!1},oa=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},Z={},ra={},X={INDEXEDDB:G,WEBSQL:Q,LOCALSTORAGE:{_driver:"localStorageWrapper",_initStorage:function(a){var b={};if(a)for(var c in a)b[c]=a[c];b.keyPrefix=na(a,this._defaultConfig);try{var d=(localStorage.setItem("_localforage_support_test", 51!0),localStorage.removeItem("_localforage_support_test"),!1)}catch(f){d=!0}
51return!d||0<localStorage.length?(this._dbInfo=b,b.serializer=ja,p.resolve()):p.reject()},_support:W,iterate:function(a,b){var c=this,d=c.ready().then(function(){for(var f=c._dbInfo,e=f.keyPrefix,g=e.length,k=localStorage.length,h=1,l=0;l<k;l++){var n=localStorage.key(l);if(0===n.indexOf(e)){var r=localStorage.getItem(n);if(r&&(r=f.serializer.deserialize(r)),void 0!==(r=a(r,n.substring(g),h++)))return r}}});return q(d,b),d}, 52getItem:function(a,b){var c=this;a=A(a);var d=c.ready().then(function(){var f=c._dbInfo,e=localStorage.getItem(f.keyPrefix+a);return e&&(e=f.serializer.deserialize(e)),e});return q(d,b),d},setItem:function(a,b,c){var d=this;a=A(a);var f=d.ready().then(function(){void 0===b&&(b=null);var e=b;return new p(function(g,k){var h=d._dbInfo;h.serializer.serialize(b,function(l,n){if(n)k(n);else try{localStorage.setItem(h.keyPrefix+a,l),g(e)}catch(r){"QuotaExceededError"!==r.name&&"NS_ERROR_DOM_QUOTA_REACHED"!== 53r.name||k(r),k(r)}})})});return q(f,c),f},removeItem:function(a,b){var c=this;a=A(a);var d=c.ready().then(function(){localStorage.removeItem(c._dbInfo.keyPrefix+a)});return q(d,b),d},clear:function(a){var b=this,c=b.ready().then(function(){for(var d=b._dbInfo.keyPrefix,f=localStorage.length-1;0<=f;f--){var e=localStorage.key(f);0===e.indexOf(d)&&localStorage.removeItem(e)}});return q(c,a),c},length:function(a){var b=this.keys().then(function(c){return c.length});return q(b,a),b},key:function(a,b){var c= 54this,d=c.ready().then(function(){var f=c._dbInfo;try{var e=localStorage.key(a)}catch(g){e=null}return e&&(e=e.substring(f.keyPrefix.length)),e});return q(d,b),d},keys:function(a){var b=this,c=b.ready().then(function(){for(var d=b._dbInfo,f=localStorage.length,e=[],g=0;g<f;g++){var k=localStorage.key(g);0===k.indexOf(d.keyPrefix)&&e.push(k.substring(d.keyPrefix.length))}return e});return q(c,a),c},dropInstance:function(a,b){if(b=D.apply(this,arguments),a="function"!=typeof a&&a||{},!a.name){var c= 55this.config();a.name=a.name||c.name;a.storeName=a.storeName||c.storeName}var d,f=this;return d=a.name?(new p(function(e){e(a.storeName?na(a,f._defaultConfig):a.name+"/")})).then(function(e){for(var g=localStorage.length-1;0<=g;g--){var k=localStorage.key(g);0===k.indexOf(e)&&localStorage.removeItem(k)}}):p.reject("Invalid arguments"),q(d,b),d}}};W=[X.INDEXEDDB._driver,X.WEBSQL._driver,X.LOCALSTORAGE._driver];var da=["dropInstance"],ma="clear getItem iterate key keys length removeItem setItem".split(" ").concat(da), 56xa={description:"",driver:W.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};W=new (function(){function a(b){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");for(var c in X)if(X.hasOwnProperty(c)){var d=X[c],f=d._driver;this[c]=f;Z[f]||this.defineDriver(d)}this._defaultConfig=ia({},xa);this._config=ia({},this._defaultConfig,b);this._initDriver=this._driverSet=null;this._ready=!1;this._dbInfo=null;this._wrapLibraryMethodsWithReady();this.setDriver(this._config.driver).catch(function(){})} 57return a.prototype.config=function(b){if("object"===(void 0===b?"undefined":ua(b))){if(this._ready)return Error("Can't call config() after localforage has been used.");for(var c in b){if("storeName"===c&&(b[c]=b[c].replace(/\W/g,"_")),"version"===c&&"number"!=typeof b[c])return Error("Database version must be a number.");this._config[c]=b[c]}return!("driver"in b&&b.driver)||this.setDriver(this._config.driver)}return"string"==typeof b?this._config[b]:this._config},a.prototype.defineDriver=function(b, 58c,d){var f=new p(function(e,g){try{var k=b._driver,h=Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!b._driver)return void g(h);for(var l=ma.concat("_initStorage"),n=0,r=l.length;n<r;n++){var x=l[n];if((!wa(da,x)||b[x])&&"function"!=typeof b[x])return void g(h)}(function(){for(var L=function(la){return function(){var sa=p.reject(Error("Method "+la+" is not implemented by the current driver"));return q(sa,arguments[arguments.length-1]),sa}},U=0,ka= 59da.length;U<ka;U++){var ca=da[U];b[ca]||(b[ca]=L(ca))}})();h=function(L){Z[k]&&console.info("Redefining LocalForage driver: "+k);Z[k]=b;ra[k]=L;e()};"_support"in b?b._support&&"function"==typeof b._support?b._support().then(h,g):h(!!b._support):h(!0)}catch(L){g(L)}});return z(f,c,d),f},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(b,c,d){b=Z[b]?p.resolve(Z[b]):p.reject(Error("Driver not found."));return z(b,c,d),b}
59,a.prototype.getSerializer=function(b){var c= 60p.resolve(ja);return z(c,b),c},a.prototype.ready=function(b){var c=this,d=c._driverSet.then(function(){return null===c._ready&&(c._ready=c._initDriver()),c._ready});return z(d,b,b),d},a.prototype.setDriver=function(b,c,d){function f(){k._config.driver=k.driver()}function e(l){return k._extend(l),f(),k._ready=k._initStorage(k._config),k._ready}function g(l){return function(){function n(){for(;r<l.length;){var x=l[r];return r++,k._dbInfo=null,k._ready=null,k.getDriver(x).then(e).catch(n)}f();return k._driverSet= 61p.reject(Error("No available storage method found.")),k._driverSet}var r=0;return n()}}var k=this;oa(b)||(b=[b]);var h=this._getSupportedDrivers(b);return this._driverSet=(null!==this._driverSet?this._driverSet.catch(function(){return p.resolve()}):p.resolve()).then(function(){var l=h[0];return k._dbInfo=null,k._ready=null,k.getDriver(l).then(function(n){k._driver=n._driver;f();k._wrapLibraryMethodsWithReady();k._initDriver=g(h)})}).catch(function(){f();return k._driverSet=p.reject(Error("No available storage method found.")), 62k._driverSet}),z(this._driverSet,c,d),this._driverSet},a.prototype.supports=function(b){return!!ra[b]},a.prototype._extend=function(b){ia(this,b)},a.prototype._getSupportedDrivers=function(b){for(var c=[],d=0,f=b.length;d<f;d++){var e=b[d];this.supports(e)&&c.push(e)}return c},a.prototype._wrapLibraryMethodsWithReady=function(){for(var b=0,c=ma.length;b<c;b++)ta(this,ma[b])},a.prototype.createInstance=function(b){return new a(b)},a}());F.exports=W},{3:3}]},{},[4])(4)});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.