JavaScript
(function(n,t,i,r){"use strict";function h(n,t){return typeof t!="object"&&(t=t()),Object.keys(t).forEach(function(i){n[i]=t[i]}),n}function p(n){return{from:function(t){return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,{extend:function(i){h(n.prototype,typeof i!="object"?i(t.prototype):i)}}}}}function w(n,t){return t(n)}function f(t,b){function ar(){if(i)nt.on("versionchange",function(t){nt.close();t.newVersion&&n.location.reload(!0)})}function nr(n){this._cfg={version:n,storesSource:null,dbschema:{},tables:{},contentUpgrade:null};this.stores({})}function vr(n,t,i,r){var e,f,o,h,l,c;if(n===0)Object.keys(kt).forEach(function(n){tr(t,n,kt[n].primKey,kt[n].indexes)}),e=nt._createTransaction(ni,ei,kt),e.idbtrans=t,e.idbtrans.onerror=s(i,["populating database"]),e.on("error").subscribe(i),u.newPSD(function(){u.PSD.trans=e;try{nt.on("populate").fire(e)}catch(n){r.onerror=t.onerror=function(n){n.preventDefault()};try{t.abort()}catch(f){}t.db.close();i(n)}});else{if(f=[],o=fi.filter(function(t){return t._cfg.version===n})[0],!o)throw new st("Dexie specification of currently installed DB version is missing");kt=nt._dbSchema=o._cfg.dbschema;h=!1;l=fi.filter(function(t){return t._cfg.version>n});l.forEach(function(n){var e=kt,r=n._cfg.dbschema,u;or(e,t);or(r,t);kt=nt._dbSchema=r;u=yr(e,r);u.add.forEach(function(n){f.push(function(t,i){tr(t,n[0],n[1].primKey,n[1].indexes);i()})});u.change.forEach(function(n){if(n.recreate)throw new st("Not yet support for changing primary key");else f.push(function(t,i){var r=t.objectStore(n.name);n.add.forEach(function(n){ir(r,n)});n.change.forEach(function(n){r.deleteIndex(n.name);ir(r,n)});n.del.forEach(function(n){r.deleteIndex(n)});i()})});n._cfg.contentUpgrade&&f.push(function(t,u){var f,e;h=!0;f=nt._createTransaction(ni,[].slice.call(t.db.objectStoreNames,0),r);f.idbtrans=t;e=0;f._promise=w(f._promise,function(n){return function(t,i,r){function f(n){return...