(function(n){n.fn.idleTimeout=function(t){var r=n("#TimeOutPage").data("url"),f=n("#KeepAliveURL").data("url"),s={inactivity:108e4,noconfirm:12e4,redirect_url:r,click_reset:!0,logout_url:r,activityEvents:"click keypress",dialogTitle:n("#AutoLogoutText").data("auto-logout"),dialogText:n("#AutoLogoutText").data("inactivity-signout-message"),callServerFrequency:3e5},i=n.extend(s,t),h=2e3,w=document.title,c,l,u,a,b=function(){n("body").on(i.activityEvents,function(){o()!==!0&&e()})},k=function(){localforage.getItem("idleTimerInfo").then(function(t){var r=n.now(),u=t.idleTimerLastActivity+i.inactivity;r>u?o()!==!0&&(g(),tt()):t.userLoggedOut===!0?p():o()===!0&&(y(),v())})},e=function(){d();u=n.now();localforage.getItem("idleTimerInfo").then(function(t){var e=t.callServerTimer+i.callServerFrequency;t.idleTimerLastActivity>e?(n.ajax({type:"GET",url:f,global:!1,cache:!1,success:function(){},error:function(n,t){t.status===401&&(window.location=r)}}),localforage.setItem("idleTimerInfo",{userLoggedOut:t.userLoggedOut,idleTimerLastActivity:u,callServerTimer:u}).then(function(){})):localforage.setItem("idleTimerInfo",{userLoggedOut:t.userLoggedOut,idleTimerLastActivity:u,callServerTimer:t.callServerTimer}).then(function(){})});c=setInterval(k,h)},d=function(){clearInterval(c)},g=function(){var t="<div id='idletimer_warning_dialog'><p>"+i.dialogText+"<\/p><p style='display:inline'>"+n("#AutoLogoutText").data("time-remaining")+"<div style='display:inline' id='countdownDisplay'><\/div><\/p><\/div>";n(t).dialog({buttons:[{text:n("#AutoLogoutText").data("stay-logged-in"),click:function(){n.ajax({type:"GET",url:f,global:!1,cache:!1,success:function(){},error:function(n,t){t.status===401&&(window.location=r)}});y();v();e()}}],closeOnEscape:!1,modal:!0,title:i.dialogTitle});n(".ui-dialog-titlebar-close").css("display","none");it();document.title=i.dialogTitle},nt=function(){localforage.getItem("idleTimerInfo").then(function(t){var r=n.now(),u=t.idleTimerLastActivity+i.inactivity+i.noconfirm;(r>u||t.userLoggedOut===!0)&&p()})},tt=function(){a=setInterval(nt,h)},v=function(){clearInterval(a);clearInterval(l)},o=function(){var t=n("#idletimer_warning_dialog").is(":visible");return t===!0?!0:!1},y=function(){n(".ui-dialog-content").dialog("destroy").remove();document.title=w},it=function(){var u=i.noconfirm/1e3,t,r;l=setInterval(function(){t=Math.floor(u/60);t<10&&(t="0"+t);r=u-t*60;r<10&&(r="0"+r);n("#countdownDisplay").html(t+":"+r);u-=1},1e3)},p=function(){i.logout_url&&n.ajax({type:"GET",url:i.logout_url,global:!1,cache:!1,success:function(){},error:function(n,t){t.status===401&&(window.location=r)}});window.location.href=i.redirect_url};return this.each(function(){var t={userLoggedOut:!1,idleTimerLastActivity:n.now(),callServerTimer:n.now()};setInterval(function(){n.ajax({type:"GET",url:f,global:!1,cache:!1,success:function(){},error:function(n,t){t.status===401&&(window.location=r)}})},s.callServerFrequency);localforage.setItem("idleTimerInfo",t).then(function(){b();e()})})}})(jQuery);$(document).ready(function(){$("#TimeOutPage").length&&$(document).idleTimeout()}),function(){var n,t,r,i;(function(){var u={},f={};n=function(n,t,i){u[n]={deps:t,callback:i}};i=r=t=function(n){function v(t){var f,i,r,e,u;if(t.charAt(0)!==".")return t;for(f=t.split("/"),i=n.split("/").slice(0,-1),r=0,e=f.length;r<e;r++)if(u=f[r],u==="..")i.pop();else if(u===".")continue;else i.push(u);return i.join("/")}var r,c,l;if(i._eak_seen=u,f[n])return f[n];if(f[n]={},!u[n])throw new Error("Could not find module "+n);var s=u[n],e=s.deps,a=s.callback,o=[],h;for(r=0,c=e.length;r<c;r++)e[r]==="exports"?o.push(h={}):o.push(t(v(e[r])));return l=a.apply(this,o),f[n]=h||l}})();n("promise/all",["./utils","exports"],function(n,t){"use strict";function u(n){var t=this;if(!i(n))throw new TypeError("You must pass an array to all.");return new t(function(t,i){function h(n){return function(t){s(n,t)}}function s(n,i){e[n]=i;--o==0&&t(e)}var e=[],o=n.length,f,u;for(o===0&&t([]),u=0;u<n.length;u++)f=n[u],f&&r(f.then)?f.then(h(u),i):s(u,f)})}var i=n.isArray,r=n.isFunction;t.all=u});n("promise/asap",["exports"],function(n){"use strict";function o(){return function(){process.nextTick(i)}}function s(){var n=0,r=new u(i),t=document.createTextNode("");return r.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function h(){return function(){e.setTimeout(i,1)}}function i(){for(var n=0;n<t.length;n++){var i=t[n],r=i[0],u=i[1];r(u)}t=[]}function c(n,i){var r=t.push([n,i]);r===1&&f()}var r=typeof window!="undefined"?window:{},u=r.MutationObserver||r.WebKitMutationObserver,e=typeof global!="undefined"?global:this===undefined?window:this,t=[],f;f=typeof process!="undefined"&&{}.toString.call(process)==="[object process]"?o():u?s():h();n.asap=c});n("promise/config",["exports"],function(n){"use strict";function i(n,i){if(arguments.length===2)t[n]=i;else return t[n]}var t={instrument:!1};n.config=t;n.configure=i});n("promise/polyfill",["./promise","./utils","exports"],function(n,t,i){"use strict";function f(){var n,t;n=typeof global!="undefined"?global:typeof window!="undefined"&&window.document?window:self;t="Promise"in n&&"resolve"in n.Promise&&"reject"in n.Promise&&"all"in n.Promise&&"race"in n.Promise&&function(){var t;return new n.Promise(function(n){t=n}),u(t)}();t||(n.Promise=r)}var r=n.Promise,u=t.isFunction;i.polyfill=f});n("promise/promise",["./config","./utils","./all","./race","./resolve","./reject","./asap","exports"],function(n,t,i,r,u,f,e,o){"use strict";function s(n){if(!a(n))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof s))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[];et(n,this)}function et(n,t){function r(n){l(t,n)}function i(n){h(t,n)}try{n(r,i)}catch(u){i(u)}}function w(n,t,i,r){var e=a(i),u,o,f,s;if(e)try{u=i(r);f=!0}catch(c){s=!0;o=c}else u=r,f=!0;g(t,u)||(e&&f?l(t,u):s?h(t,o):n===v?l(t,u):n===y&&h(t,u))}function ot(n,t,i,r){var u=n._subscribers,f=u.length;u[f]=t;u[f+v]=i;u[f+y]=r}function d(n,t){for(var u,f,r=n._subscribers,e=n._detail,i=0;i<r.length;i+=3)u=r[i],f=r[i+t],w(t,u,f,e);n._subscribers=null}function g(n,t){var r=null,i;try{if(n===t)throw new TypeError("A promises callback cannot return that same promise.");if(nt(t)&&(r=t.then,a(r)))return r.call(t,function(r){if(i)return!0;i=!0;t!==r?l(n,r):p(n,r)},function(t){if(i)return!0;i=!0;h(n,t)}),!0}catch(u){return i?!0:(h(n,u),!0)}return!1}function l(n,t){n===t?p(n,t):g(n,t)||p(n,t)}function p(n,t){n._state===b&&(n._state=k,n._detail=t,c.async(st,n))}function h(n,t){n._state===b&&(n._state=k,n._detail=t,c.async(ht,n))}function st(n){d(n,n._state=v)}function ht(n){d(n,n._state=y)}var c=n.config,ct=n.configure,nt=t.objectOrFunction,a=t.isFunction,lt=t.now,tt=i.all,it=r.race,rt=u.resolve,ut=f.reject,ft=e.asap;c.async=ft;var b=void 0,k=0,v=1,y=2;s.prototype={constructor:s,_state:undefined,_detail:undefined,_subscribers:undefined,then:function(n,t){var i=this,r=new this.constructor(function(){}),u;return this._state?(u=arguments,c.async(function(){w(i._state,r,u[i._state-1],i._detail)})):ot(this,r,n,t),r},"catch":function(n){return this.then(null,n)}};s.all=tt;s.race=it;s.resolve=rt;s.reject=ut;o.Promise=s});n("promise/race",["./utils","exports"],function(n,t){"use strict";function r(n){var t=this;if(!i(n))throw new TypeError("You must pass an array to race.");return new t(function(t,i){for(var r,u=0;u<n.length;u++)r=n[u],r&&typeof r.then=="function"?r.then(t,i):t(r)})}var i=n.isArray;t.race=r});n("promise/reject",["exports"],function(n){"use strict";function t(n){var t=this;return new t(function(t,i){i(n)})}n.reject=t});n("promise/resolve",["exports"],function(n){"use strict";function t(n){if(n&&typeof n=="object"&&n.constructor===this)return n;var t=this;return new t(function(t){t(n)})}n.resolve=t});n("promise/utils",["exports"],function(n){"use strict";function i(n){return t(n)||typeof n=="object"&&n!==null}function t(n){return typeof n=="function"}function r(n){return Object.prototype.toString.call(n)==="[object Array]"}var u=Date.now||function(){return(new Date).getTime()};n.objectOrFunction=i;n.isFunction=t;n.isArray=r;n.now=u});t("promise/polyfill").polyfill()}(),function(n,t){typeof exports=="object"&&typeof module=="object"?module.exports=t():typeof define=="function"&&define.amd?define([],t):typeof exports=="object"?exports.localforage=t():n.localforage=t()}(this,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(n,t,i){"use strict";function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}t.__esModule=!0;var u=function(n){function a(n,t){n[t]=function(){var i=arguments;return n.ready().then(function(){return n[t].apply(n,i)})}}function e(){for(var n,t,i=1;i<arguments.length;i++)if(n=arguments[i],n)for(t in n)n.hasOwnProperty(t)&&(arguments[0][t]=s(n[t])?n[t].slice():n[t]);return arguments[0]}function h(n){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===n)return!0;return!1}var u={},t={INDEXEDDB:"asyncStorage",LOCALSTORAGE:"localStorageWrapper",WEBSQL:"webSQLStorage"},c=[t.INDEXEDDB,t.WEBSQL,t.LOCALSTORAGE],f=["clear","getItem","iterate","key","keys","length","removeItem","setItem"],l={description:"",driver:c.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},o=function(n){var i={};return i[t.INDEXEDDB]=!!function(){try{var t=t||n.indexedDB||n.webkitIndexedDB||n.mozIndexedDB||n.OIndexedDB||n.msIndexedDB;return typeof n.openDatabase!="undefined"&&n.navigator&&n.navigator.userAgent&&/Safari/.test(n.navigator.userAgent)&&!/Chrome/.test(n.navigator.userAgent)?!1:t&&typeof t.open=="function"&&typeof n.IDBKeyRange!="undefined"}catch(i){return!1}}(),i[t.WEBSQL]=!!function(){try{return n.openDatabase}catch(t){return!1}}(),i[t.LOCALSTORAGE]=!!function(){try{return n.localStorage&&"setItem"in n.localStorage&&n.localStorage.setItem}catch(t){return!1}}(),i}(n),s=Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"},v=function(){function n(i){r(this,n);this.INDEXEDDB=t.INDEXEDDB;this.LOCALSTORAGE=t.LOCALSTORAGE;this.WEBSQL=t.WEBSQL;this._defaultConfig=e({},l);this._config=e({},this._defaultConfig,i);this._driverSet=null;this._initDriver=null;this._ready=!1;this._dbInfo=null;this._wrapLibraryMethodsWithReady();this.setDriver(this._config.driver)}return n.prototype.config=function(n){if(typeof n=="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in n)t==="storeName"&&(n[t]=n[t].replace(/\W/g,"_")),this._config[t]=n[t];return"driver"in n&&n.driver&&this.setDriver(this._config.driver),!0}return typeof n=="string"?this._config[n]:this._config},n.prototype.defineDriver=function(n,t,i){var r=new Promise(function(t,i){var s,r,e,c;try{var l=n._driver,a=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver"),v=new Error("Custom driver name already in use: "+n._driver);if(!n._driver){i(a);return}if(h(n._driver)){i(v);return}for(s=f.concat("_initStorage"),r=0;r<s.length;r++)if(e=s[r],!e||!n[e]||typeof n[e]!="function"){i(a);return}c=Promise.resolve(!0);"_support"in n&&(c=n._support&&typeof n._support=="function"?n._support():Promise.resolve(!!n._support));c.then(function(i){o[l]=i;u[l]=n;t()},i)}catch(y){i(y)}});return r.then(t,i),r},n.prototype.driver=function(){return this._driver||null},n.prototype.getDriver=function(n,t,r){var f=this,e=function(){if(h(n))switch(n){case f.INDEXEDDB:return new Promise(function(n){n(i(1))});case f.LOCALSTORAGE:return new Promise(function(n){n(i(2))});case f.WEBSQL:return new Promise(function(n){n(i(4))})}else if(u[n])return Promise.resolve(u[n]);return Promise.reject(new Error("Driver not found."))}();return e.then(t,r),e},n.prototype.getSerializer=function(n){var t=new Promise(function(n){n(i(3))});return n&&typeof n=="function"&&t.then(function(t){n(t)}),t},n.prototype.ready=function(n){var t=this,i=t._driverSet.then(function(){return t._ready===null&&(t._ready=t._initDriver()),t._ready});return i.then(n,n),i},n.prototype.setDriver=function(n,t,i){function u(){r._config.driver=r.driver()}function o(n){return function(){function i(){for(var f,e;t<n.length;)return f=n[t],t++,r._dbInfo=null,r._ready=null,r.getDriver(f).then(function(n){return r._extend(n),u(),r._ready=r._initStorage(r._config),r._ready})["catch"](i);return u(),e=new Error("No available storage method found."),r._driverSet=Promise.reject(e),r._driverSet}var t=0;return i()}}var r=this,f,e;return s(n)||(n=[n]),f=this._getSupportedDrivers(n),e=this._driverSet!==null?this._driverSet["catch"](function(){return Promise.resolve()}):Promise.resolve(),this._driverSet=e.then(function(){var n=f[0];return r._dbInfo=null,r._ready=null,r.getDriver(n).then(function(n){r._driver=n._driver;u();r._wrapLibraryMethodsWithReady();r._initDriver=o(f)})})["catch"](function(){u();var n=new Error("No available storage method found.");return r._driverSet=Promise.reject(n),r._driverSet}),this._driverSet.then(t,i),this._driverSet},n.prototype.supports=function(n){return!!o[n]},n.prototype._extend=function(n){e(this,n)},n.prototype._getSupportedDrivers=function(n){for(var i,r=[],t=0,u=n.length;t<u;t++)i=n[t],this.supports(i)&&r.push(i);return r},n.prototype._wrapLibraryMethodsWithReady=function(){for(var n=0;n<f.length;n++)a(this,f[n])},n.prototype.createInstance=function(t){return new n(t)},n}();return new v}(typeof window!="undefined"?window:self);t["default"]=u;n.exports=t["default"]},function(n,t){"use strict";t.__esModule=!0;var i=function(n){function e(t,i){var e,u,r;t=t||[];i=i||{};try{return new Blob(t,i)}catch(f){if(f.name!=="TypeError")throw f;for(e=n.BlobBuilder||n.MSBlobBuilder||n.MozBlobBuilder||n.WebKitBlobBuilder,u=new e,r=0;r<t.length;r+=1)u.append(t[r]);return u.getBlob(i.type)}}function c(n){for(var i=n.length,r=new ArrayBuffer(i),u=new Uint8Array(r),t=0;t<i;t++)u[t]=n.charCodeAt(t);return r}function l(n){return new Promise(function(t,i){var r=new XMLHttpRequest;r.open("GET",n);r.withCredentials=!0;r.responseType="arraybuffer";r.onreadystatechange=function(){if(r.readyState===4){if(r.status===200)return t({response:r.response,type:r.getResponseHeader("Content-Type")});i({status:r.status,response:r.response})}};r.send()})}function a(n){return new Promise(function(t,i){var f=e([""],{type:"image/png"}),u=n.transaction([r],"readwrite");u.objectStore(r).put(f,"key");u.oncomplete=function(){var f=n.transaction([r],"readwrite"),u=f.objectStore(r).get("key");u.onerror=i;u.onsuccess=function(n){var r=n.target.result,i=URL.createObjectURL(r);l(i).then(function(n){t(!!(n&&n.type==="image/png"))},function(){t(!1)}).then(function(){URL.revokeObjectURL(i)})}};u.onerror=u.onabort=i})["catch"](function(){return!1})}function v(n){return typeof f=="boolean"?Promise.resolve(f):a(n).then(function(n){return f=n})}function y(n){return new Promise(function(t,i){var r=new FileReader;r.onerror=i;r.onloadend=function(i){var r=btoa(i.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:n.type})};r.readAsBinaryString(n)})}function o(n){var t=c(atob(n.data));return e([t],{type:n.type})}function s(n){return n&&n.__local_forage_encoded_blob}function p(n){var t=this,r=t._initReady().then(function(){var n=i[t._dbInfo.name];if(n&&n.dbReady)return n.dbReady});return r.then(n,n),r}function w(n){var r=i[n.name],t={};t.promise=new Promise(function(n){t.resolve=n});r.deferredOperations.push(t);r.dbReady=r.dbReady?r.dbReady.then(function(){return t.promise}):t.promise}function b(n){var r=i[n.name],t=r.deferredOperations.pop();t&&t.resolve()}function k(n){function c(){return Promise.resolve()}var u=this,t={db:null},e,r,o,f,s,h;if(n)for(e in n)t[e]=n[e];for(i||(i={}),r=i[t.name],r||(r={forages:[],db:null,dbReady:null,deferredOperations:[]},i[t.name]=r),r.forages.push(u),u._initReady||(u._initReady=u.ready,u.ready=p),o=[],f=0;f<r.forages.length;f++)s=r.forages[f],s!==u&&o.push(s._initReady()["catch"](c));return h=r.forages.slice(0),Promise.all(o).then(function(){return t.db=r.db,d(t)}).then(function(n){return(t.db=n,nt(t,u._defaultConfig.version))?g(t):n}).then(function(n){var i,f;for(t.db=r.db=n,u._dbInfo=t,i=0;i<h.length;i++)f=h[i],f!==u&&(f._dbInfo.db=t.db,f._dbInfo.version=t.version)})}function d(n){return h(n,!1)}function g(n){return h(n,!0)}function h(t,i){return new Promise(function(f,e){var s,o;if(t.db)if(i)w(t),t.db.close();else return f(t.db);s=[t.name];i&&s.push(t.version);o=u.open.apply(u,s);i&&(o.onupgradeneeded=function(i){var u=o.result;try{u.createObjectStore(t.storeName);i.oldVersion<=1&&u.createObjectStore(r)}catch(f){if(f.name==="ConstraintError")n.console.warn('The database "'+t.name+'" has been upgraded from version '+i.oldVersion+" to version "+i.newVersion+', but the storage "'+t.storeName+'" already exists.');else throw f;}});o.onerror=function(){e(o.error)};o.onsuccess=function(){f(o.result);b(t)}})}function nt(t,i){var r;if(!t.db)return!0;var u=!t.db.objectStoreNames.contains(t.storeName),f=t.version<t.db.version,e=t.version>t.db.version;return(f&&(t.version!==i&&n.console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),e||u)?(u&&(r=t.db.version+1,r>t.version&&(t.version=r)),!0):!1}function tt(i,r){var f=this,u;return typeof i!="string"&&(n.console.warn(i+" used as a key, but it is not a string."),i=String(i)),u=new Promise(function(n,t){f.ready().then(function(){var u=f._dbInfo,e=u.db.transaction(u.storeName,"readonly").objectStore(u.storeName),r=e.get(i);r.onsuccess=function(){var t=r.result;t===undefined&&(t=null);s(t)&&(t=o(t));n(t)};r.onerror=function(){t(r.error)}})["catch"](t)}),t(u,r),u}function it(n,i){var r=this,u=new Promise(function(t,i){r.ready().then(function(){var f=r._dbInfo,e=f.db.transaction(f.storeName,"readonly").objectStore(f.storeName),u=e.openCursor(),h=1;u.onsuccess=function(){var r=u.result,i,f;r?(i=r.value,s(i)&&(i=o(i)),f=n(i,r.key,h++),f!==void 0?t(f):r["continue"]()):t()};u.onerror=function(){i(u.error)}})["catch"](i)});return t(u,i),u}function rt(i,r,u){var e=this,f;return typeof i!="string"&&(n.console.warn(i+" used as a key, but it is not a string."),i=String(i)),f=new Promise(function(n,t){var u;e.ready().then(function(){return(u=e._dbInfo,r instanceof Blob)?v(u.db).then(function(n){return n?r:y(r)}):r}).then(function(r){var f=u.db.transaction(u.storeName,"readwrite"),o=f.objectStore(u.storeName),e;r===null&&(r=undefined);f.oncomplete=function(){r===undefined&&(r=null);n(r)};f.onabort=f.onerror=function(){var n=e.error?e.error:e.transaction.error;t(n)};e=o.put(r,i)})["catch"](t)}),t(f,u),f}function ut(i,r){var f=this,u;return typeof i!="string"&&(n.console.warn(i+" used as a key, but it is not a string."),i=String(i)),u=new Promise(function(n,t){f.ready().then(function(){var e=f._dbInfo,r=e.db.transaction(e.storeName,"readwrite"),o=r.objectStore(e.storeName),u=o["delete"](i);r.oncomplete=function(){n()};r.onerror=function(){t(u.error)};r.onabort=function(){var n=u.error?u.error:u.transaction.error;t(n)}})["catch"](t)}),t(u,r),u}function ft(n){var i=this,r=new Promise(function(n,t){i.ready().then(function(){var u=i._dbInfo,r=u.db.transaction(u.storeName,"readwrite"),e=r.objectStore(u.storeName),f=e.clear();r.oncomplete=function(){n()};r.onabort=r.onerror=function(){var n=f.error?f.error:f.transaction.error;t(n)}})["catch"](t)});return t(r,n),r}function et(n){var i=this,r=new Promise(function(n,t){i.ready().then(function(){var u=i._dbInfo,f=u.db.transaction(u.storeName,"readonly").objectStore(u.storeName),r=f.count();r.onsuccess=function(){n(r.result)};r.onerror=function(){t(r.error)}})["catch"](t)});return t(r,n),r}function ot(n,i){var r=this,u=new Promise(function(t,i){if(n<0){t(null);return}r.ready().then(function(){var f=r._dbInfo,o=f.db.transaction(f.storeName,"readonly").objectStore(f.storeName),e=!1,u=o.openCursor();u.onsuccess=function(){var i=u.result;if(!i){t(null);return}n===0?t(i.key):e?t(i.key):(e=!0,i.advance(n))};u.onerror=function(){i(u.error)}})["catch"](i)});return t(u,i),u}function st(n){var i=this,r=new Promise(function(n,t){i.ready().then(function(){var u=i._dbInfo,e=u.db.transaction(u.storeName,"readonly").objectStore(u.storeName),r=e.openCursor(),f=[];r.onsuccess=function(){var t=r.result;if(!t){n(f);return}f.push(t.key);t["continue"]()};r.onerror=function(){t(r.error)}})["catch"](t)});return t(r,n),r}function t(n,t){t&&n.then(function(n){t(null,n)},function(n){t(n)})}var u=u||n.indexedDB||n.webkitIndexedDB||n.mozIndexedDB||n.OIndexedDB||n.msIndexedDB,r,f,i;if(u)return r="local-forage-detect-blob-support",{_driver:"asyncStorage",_initStorage:k,iterate:it,getItem:tt,setItem:rt,removeItem:ut,clear:ft,length:et,key:ot,keys:st}}(typeof window!="undefined"?window:self);t["default"]=i;n.exports=t["default"]},function(n,t,i){"use strict";t.__esModule=!0;var r=function(n){function u(n){var u=this,t={},r;if(n)for(r in n)t[r]=n[r];return t.keyPrefix=t.name+"/",t.storeName!==u._defaultConfig.storeName&&(t.keyPrefix+=t.storeName+"/"),u._dbInfo=t,new Promise(function(n){n(i(3))}).then(function(n){return t.serializer=n,Promise.resolve()})}function f(n){var i=this,u=i.ready().then(function(){for(var r,u=i._dbInfo.keyPrefix,n=t.length-1;n>=0;n--)r=t.key(n),r.indexOf(u)===0&&t.removeItem(r)});return r(u,n),u}function e(i,u){var e=this,f;return typeof i!="string"&&(n.console.warn(i+" used as a key, but it is not a string."),i=String(i)),f=e.ready().then(function(){var r=e._dbInfo,n=t.getItem(r.keyPrefix+i);return n&&(n=r.serializer.deserialize(n)),n}),r(f,u),f}function o(n,i){var u=this,f=u.ready().then(function(){for(var r,i,e=u._dbInfo,o=e.keyPrefix,s=o.length,h=t.length,c=1,f=0;f<h;f++)if((r=t.key(f),r.indexOf(o)===0)&&(i=t.getItem(r),i&&(i=e.serializer.deserialize(i)),i=n(i,r.substring(s),c++),i!==void 0))return i});return r(f,i),f}function s(n,i){var u=this,f=u.ready().then(function(){var r=u._dbInfo,i;try{i=t.key(n)}catch(f){i=null}return i&&(i=i.substring(r.keyPrefix.length)),i});return r(f,i),f}function h(n){var i=this,u=i.ready().then(function(){for(var r=i._dbInfo,f=t.length,u=[],n=0;n<f;n++)t.key(n).indexOf(r.keyPrefix)===0&&u.push(t.key(n).substring(r.keyPrefix.length));return u});return r(u,n),u}function c(n){var i=this,t=i.keys().then(function(n){return n.length});return r(t,n),t}function l(i,u){var e=this,f;return typeof i!="string"&&(n.console.warn(i+" used as a key, but it is not a string."),i=String(i)),f=e.ready().then(function(){var n=e._dbInfo;t.removeItem(n.keyPrefix+i)}),r(f,u),f}function a(i,u,f){var o=this,e;return typeof i!="string"&&(n.console.warn(i+" used as a key, but it is not a string."),i=String(i)),e=o.ready().then(function(){u===undefined&&(u=null);var n=u;return new Promise(function(r,f){var e=o._dbInfo;e.serializer.serialize(u,function(u,o){if(o)f(o);else try{t.setItem(e.keyPrefix+i,u);r(n)}catch(s){(s.name==="QuotaExceededError"||s.name==="NS_ERROR_DOM_QUOTA_REACHED")&&f(s);f(s)}})})}),r(e,f),e}function r(n,t){t&&n.then(function(n){t(null,n)},function(n){t(n)})}var t=null;try{if(!n.localStorage||!("setItem"in n.localStorage))return;t=n.localStorage}catch(v){return}return{_driver:"localStorageWrapper",_initStorage:u,iterate:o,getItem:e,setItem:a,removeItem:l,clear:f,length:c,key:s,keys:h}}(typeof window!="undefined"?window:self);t["default"]=r;n.exports=t["default"]},function(n,t){"use strict";t.__esModule=!0;var i=function(n){function g(t,i){var e,u,r;t=t||[];i=i||{};try{return new Blob(t,i)}catch(f){if(f.name!=="TypeError")throw f;for(e=n.BlobBuilder||n.MSBlobBuilder||n.MozBlobBuilder||n.WebKitBlobBuilder,u=new e,r=0;r<t.length;r+=1)u.append(t[r]);return u.getBlob(i.type)}}function nt(n,t){var o="",b,r,k;if(n&&(o=n.toString()),n&&(n.toString()==="[object ArrayBuffer]"||n.buffer&&n.buffer.toString()==="[object ArrayBuffer]"))r=i,n instanceof ArrayBuffer?(b=n,r+=u):(b=n.buffer,o==="[object Int8Array]"?r+=s:o==="[object Uint8Array]"?r+=h:o==="[object Uint8ClampedArray]"?r+=c:o==="[object Int16Array]"?r+=l:o==="[object Uint16Array]"?r+=v:o==="[object Int32Array]"?r+=a:o==="[object Uint32Array]"?r+=y:o==="[object Float32Array]"?r+=p:o==="[object Float64Array]"?r+=w:t(new Error("Failed to get type for BinaryArray"))),t(r+e(b));else if(o==="[object Blob]")k=new FileReader,k.onload=function(){var r=d+n.type+"~"+e(this.result);t(i+f+r)},k.readAsArrayBuffer(n);else try{t(JSON.stringify(n))}catch(g){console.error("Couldn't convert value into a JSON string: ",n);t(null,g)}}function tt(n){var e,d,tt,nt,t;if(n.substring(0,r)!==i)return JSON.parse(n);e=n.substring(b);d=n.substring(r,b);d===f&&o.test(e)&&(nt=e.match(o),tt=nt[1],e=e.substring(nt[0].length));t=k(e);switch(d){case u:return t;case f:return g([t],{type:tt});case s:return new Int8Array(t);case h:return new Uint8Array(t);case c:return new Uint8ClampedArray(t);case l:return new Int16Array(t);case v:return new Uint16Array(t);case a:return new Int32Array(t);case y:return new Uint32Array(t);case p:return new Float32Array(t);case w:return new Float64Array(t);default:throw new Error("Unkown type: "+d);}}function k(n){var u=n.length*.75,l=n.length,i,f=0,h,e,o,c,s,r;for(n[n.length-1]==="="&&(u--,n[n.length-2]==="="&&u--),s=new ArrayBuffer(u),r=new Uint8Array(s),i=0;i<l;i+=4)h=t.indexOf(n[i]),e=t.indexOf(n[i+1]),o=t.indexOf(n[i+2]),c=t.indexOf(n[i+3]),r[f++]=h<<2|e>>4,r[f++]=(e&15)<<4|o>>2,r[f++]=(o&3)<<6|c&63;return s}function e(n){for(var r=new Uint8Array(n),i="",u=0;u<r.length;u+=3)i+=t[r[u]>>2],i+=t[(r[u]&3)<<4|r[u+1]>>4],i+=t[(r[u+1]&15)<<2|r[u+2]>>6],i+=t[r[u+2]&63];return r.length%3==2?i=i.substring(0,i.length-1)+"=":r.length%3==1&&(i=i.substring(0,i.length-2)+"=="),i}var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d="~~local_forage_type~",o=/^~~local_forage_type~([^~]+)~/,i="__lfsc__:",r=i.length,u="arbf",f="blob",s="si08",h="ui08",c="uic8",l="si16",a="si32",v="ur16",y="ui32",p="fl32",w="fl64",b=r+u.length;return{serialize:nt,deserialize:tt,stringToBuffer:k,bufferToString:e}}(typeof window!="undefined"?window:self);t["default"]=i;n.exports=t["default"]},function(n,t,i){"use strict";t.__esModule=!0;var r=function(n){function u(n){var f=this,t={db:null},u,e;if(n)for(u in n)t[u]=typeof n[u]!="string"?n[u].toString():n[u];return e=new Promise(function(i,u){try{t.db=r(t.name,String(t.version),t.description,t.size)}catch(e){return f.setDriver(f.LOCALSTORAGE).then(function(){return f._initStorage(n)}).then(i)["catch"](u)}t.db.transaction(function(n){n.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){f._dbInfo=t;i()},function(n,t){u(t)})})}),new Promise(function(n){n(i(3))}).then(function(n){return t.serializer=n,e})}function f(i,r){var f=this,u;return typeof i!="string"&&(n.console.warn(i+" used as a key, but it is not a string."),i=String(i)),u=new Promise(function(n,t){f.ready().then(function(){var r=f._dbInfo;r.db.transaction(function(u){u.executeSql("SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[i],function(t,i){var u=i.rows.length?i.rows.item(0).value:null;u&&(u=r.serializer.deserialize(u));n(u)},function(n,i){t(i)})})})["catch"](t)}),t(u,r),u}function e(n,i){var r=this,u=new Promise(function(t,i){r.ready().then(function(){var u=r._dbInfo;u.db.transaction(function(r){r.executeSql("SELECT * FROM "+u.storeName,[],function(i,r){for(var o,f,s=r.rows,h=s.length,e=0;e<h;e++)if(o=s.item(e),f=o.value,f&&(f=u.serializer.deserialize(f)),f=n(f,o.key,e+1),f!==void 0){t(f);return}t()},function(n,t){i(t)})})})["catch"](i)});return t(u,i),u}function o(i,r,u){var e=this,f;return typeof i!="string"&&(n.console.warn(i+" used as a key, but it is not a string."),i=String(i)),f=new Promise(function(n,t){e.ready().then(function(){r===undefined&&(r=null);var f=r,u=e._dbInfo;u.serializer.serialize(r,function(r,e){e?t(e):u.db.transaction(function(e){e.executeSql("INSERT OR REPLACE INTO "+u.storeName+" (key, value) VALUES (?, ?)",[i,r],function(){n(f)},function(n,i){t(i)})},function(n){n.code===n.QUOTA_ERR&&t(n)})})})["catch"](t)}),t(f,u),f}function s(i,r){var f=this,u;return typeof i!="string"&&(n.console.warn(i+" used as a key, but it is not a string."),i=String(i)),u=new Promise(function(n,t){f.ready().then(function(){var r=f._dbInfo;r.db.transaction(function(u){u.executeSql("DELETE FROM "+r.storeName+" WHERE key = ?",[i],function(){n()},function(n,i){t(i)})})})["catch"](t)}),t(u,r),u}function h(n){var i=this,r=new Promise(function(n,t){i.ready().then(function(){var r=i._dbInfo;r.db.transaction(function(i){i.executeSql("DELETE FROM "+r.storeName,[],function(){n()},function(n,i){t(i)})})})["catch"](t)});return t(r,n),r}function c(n){var i=this,r=new Promise(function(n,t){i.ready().then(function(){var r=i._dbInfo;r.db.transaction(function(i){i.executeSql("SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,i){var r=i.rows.item(0).c;n(r)},function(n,i){t(i)})})})["catch"](t)});return t(r,n),r}function l(n,i){var r=this,u=new Promise(function(t,i){r.ready().then(function(){var u=r._dbInfo;u.db.transaction(function(r){r.executeSql("SELECT key FROM "+u.storeName+" WHERE id = ? LIMIT 1",[n+1],function(n,i){var r=i.rows.length?i.rows.item(0).key:null;t(r)},function(n,t){i(t)})})})["catch"](i)});return t(u,i),u}function a(n){var i=this,r=new Promise(function(n,t){i.ready().then(function(){var r=i._dbInfo;r.db.transaction(function(i){i.executeSql("SELECT key FROM "+r.storeName,[],function(t,i){for(var u=[],r=0;r<i.rows.length;r++)u.push(i.rows.item(r).key);n(u)},function(n,i){t(i)})})})["catch"](t)});return t(r,n),r}function t(n,t){t&&n.then(function(n){t(null,n)},function(n){t(n)})}var r=n.openDatabase;if(r)return{_driver:"webSQLStorage",_initStorage:u,iterate:e,getItem:f,setItem:o,removeItem:s,clear:h,length:c,key:l,keys:a}}(typeof window!="undefined"?window:self);t["default"]=r;n.exports=t["default"]}])})