rod 0.2.4

Distributed graph database that syncs over websockets and multicast
Documentation
1
2
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s="9/Ks")}({"/fks":function(e,t,n){e.exports=n("4J1W")},"2Gk3":function(){"use strict";try{self["workbox:cacheable-response:6.4.1"]&&_()}catch(e){}},"4J1W":function(e,t,n){(function(e,t,r){function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}!function(){function i(e,t){function r(e){return e.split("/").slice(-1).toString().replace(".js","")}return t?n("KNIt")(e):e.slice?i[r(e)]:function(t,n){e(t={exports:{}}),i[r(n)]=t.exports}}var a=e;i((function(e){var t={fn:{is:function(e){return!!e&&"function"==typeof e}}};t.bi={is:function(e){return e instanceof Boolean||"boolean"==typeof e}},t.num={is:function(e){return!n(e)&&(e-parseFloat(e)+1>=0||1/0===e||-1/0===e)}},t.text={is:function(e){return"string"==typeof e}},t.text.ify=function(e){return t.text.is(e)?e:"undefined"!=typeof JSON?JSON.stringify(e):e&&e.toString?e.toString():e},t.text.random=function(e,t){var n="";for(e=e||24,t=t||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxyz";e>0;)n+=t.charAt(Math.floor(Math.random()*t.length)),e--;return n},t.text.match=function(e,t){var n,r;return"string"==typeof e&&("string"==typeof t&&(t={"=":t}),e===(n=(t=t||{})["="]||t["*"]||t[">"]||t["<"])||r===t["="]&&(e.slice(0,((n=t["*"]||t[">"]||t["<"])||"").length)===n||r===t["*"]&&(r!==t[">"]&&r!==t["<"]?e>=t[">"]&&e<=t["<"]:r!==t[">"]&&e>=t[">"]||r!==t["<"]&&e<=t["<"])))},t.text.hash=function(e,t){if("string"==typeof e){if(t=t||0,!e.length)return t;for(var n=0,r=e.length;n<r;++n)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}},t.list={is:function(e){return e instanceof Array}},t.list.slit=Array.prototype.slice,t.list.sort=function(e){return function(t,n){return t&&n?(t=t[e])<(n=n[e])?-1:t>n?1:0:0}},t.list.map=function(e,t,n){return a(e,t,n)},t.list.index=1,t.obj={is:function(e){return!!e&&(e instanceof Object&&e.constructor===Object||"Object"===Object.prototype.toString.call(e).match(/^\[object (\w+)\]$/)[1])}},t.obj.put=function(e,t,n){return(e||{})[t]=n,e},t.obj.has=function(e,t){return e&&Object.prototype.hasOwnProperty.call(e,t)},t.obj.del=function(e,t){if(e)return e[t]=null,delete e[t],e},t.obj.as=function(e,t,n,r){return e[t]=e[t]||(r===n?{}:n)},t.obj.ify=function(e){if(o(e))return e;try{e=JSON.parse(e)}catch(t){e={}}return e},function(){function e(e,t){i(this,t)&&undefined!==this[t]||(this[t]=e)}t.obj.to=function(t,n){return a(t,e,n=n||{}),n}}(),t.obj.copy=function(e){return e?JSON.parse(JSON.stringify(e)):e},function(){function e(e,t){var n=this.n;if(!n||!(t===n||o(n)&&i(n,t)))return undefined!==t||void 0}t.obj.empty=function(t,n){return!t||!a(t,e,{n:n})}}(),function(){function e(t,n){2!==arguments.length?(e.r=e.r||[]).push(t):(e.r=e.r||{})[t]=n}var r,a=Object.keys;Object.keys=Object.keys||function(e){return r(e,(function(e,t,n){n(t)}))},t.obj.map=r=function(r,u,c){var s,f,l,h,p,d=0,y="function"==typeof u;if(e.r=s,a&&o(r)&&(h=a(r),p=!0),c=c||{},n(r)||h)for(f=(h||r).length;d<f;d++){var v=d+t.list.index;if(y){if((l=p?u.call(c,r[h[d]],h[d],e):u.call(c,r[d],v,e))!==s)return l}else if(u===r[p?h[d]:d])return h?h[d]:v}else for(d in r)if(y){if(i(r,d)&&(l=c?u.call(c,r[d],d,e):u(r[d],d,e))!==s)return l}else if(u===r[d])return d;return y?e.r:t.list.index?0:-1}}(),t.time={},t.time.is=function(e){return e?e instanceof Date:+(new Date).getTime()};var n=t.list.is,r=t.obj,o=r.is,i=r.has,a=r.map;e.exports=t}))(i,"./type"),i((function(e){e.exports=function e(t,n,r){if(!t)return{to:e};t=(this.tag||(this.tag={}))[t]||(this.tag[t]={tag:t,to:e._={next:function(e){var t;(t=this.to)&&t.next(e)}}});if("function"==typeof n){var o={off:e.off||(e.off=function(){if(this.next===e._.next)return!0;this===this.the.last&&(this.the.last=this.back),this.to.back=this.back,this.next=e._.next,this.back.to=this.to,this.the.last===this.the&&delete this.on.tag[this.the.tag]}),to:e._,next:n,the:t,on:this,as:r};return(o.back=t.last||t).to=o,t.last=o}return(t=t.to)&&undefined!==n&&t.next(n),t}}))(i,"./onto"),i((function(e){var n=void 0!==t?t:setTimeout,r=[];e.exports=setTimeout.puff=function(e){r.length?r.push(e):(r=[e],n((function e(t){t=t||+new Date;for(var o,i=0;i<9&&(o=r[i++]);)o();if(console.STAT&&console.STAT(t,+new Date-t,"puff"),o&&!(+new Date-t))return e(t);(r=r.slice(i)).length&&n(e,0)}),0))}}))(i,"./puff"),i((function(e){if("undefined"==typeof JSON)throw new Error("JSON is not included in this browser. Please load it first: ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js");var t=JSON.stringify;e.exports=function(e,n,r,o,i){if(e<n)return{defer:!0};if(n<r)return{historical:!0};if(r<n)return{converge:!0,incoming:!0};if(n===r){if((o=t(o)||"")===(i=t(i)||""))return{state:!0};if(o<i)return{converge:!0,current:!0};if(i<o)return{converge:!0,incoming:!0}}return{err:"Invalid CRDT Data: "+o+" to "+i+" at "+n+" to "+r+"!"}}}))(i,"./HAM"),i((function(e){var t=i("./type"),n={is:function(e){return undefined!==e&&(null===e||e!==1/0&&(!!(u(e)||o(e)||a(e))||(n.link.is(e)||!1)))}};n.link=n.rel={_:"#"},function(){function e(e,t){var n=this;return n.id?n.id=!1:t==r&&u(e)?void(n.id=e):n.id=!1}n.link.is=function(t){if(t&&t[r]&&!t._&&s(t)){var n={};if(l(t,e,n),n.id)return n.id}return!1}}(),n.link.ify=function(e){return f({},r,e)},t.obj.has._=".";var r=n.link._,o=t.bi.is,a=t.num.is,u=t.text.is,c=t.obj,s=c.is,f=c.put,l=c.map;e.exports=n}))(i,"./val"),i((function(e){var t=i("./type"),n=i("./val"),r={_:"_",soul:function(e,t){return e&&e._&&e._[t||f]}};r.soul.ify=function(e,t){return t="string"==typeof t?{soul:t}:t||{},(e=e||{})._=e._||{},e._[f]=t.soul||e._[f]||s(),e},r.soul._=n.link._,function(){function e(e,t){if(t!==r._)return!n.is(e)||void(this.cb&&this.cb.call(this.as,e,t,this.n,this.s))}r.is=function(t,n,o){var i;return!!a(t)&&(!!(i=r.soul(t))&&!c(t,e,{as:o,cb:n,s:i,n:t}))}}(),function(){function e(e,t){var r,o=this.o;o.map?undefined===(r=o.map.call(this.as,e,""+t,o.node))?u(o.node,t):o.node&&(o.node[t]=r):n.is(e)&&(o.node[t]=e)}r.ify=function(t,n,o){return n?"string"==typeof n?n={soul:n}:"function"==typeof n&&(n={map:n}):n={},n.map&&(n.node=n.map.call(o,t,undefined,n.node||{})),(n.node=r.soul.ify(n.node||{},n))&&c(t,e,{o:n,as:o}),n.node}}();var o=t.obj,a=o.is,u=o.del,c=o.map,s=t.text.random,f=r.soul._;e.exports=r}))(i,"./node"),i((function(e){function t(){var e;return e=+new Date,o<e?(a=0,o=e+t.drift):o=e+(a+=1)/u+t.drift}var n=i("./type"),r=i("./node"),o=-1/0,a=0,u=1e3,c="undefined"!=typeof performance&&(performance.timing&&performance),s=(c&&c.timing&&c.timing.navigationStart||(c=!1),t._=">");t.drift=0,t.is=function(e,t,n){var r=t&&e&&e[g]&&e[g][s]||n;if(r)return m(r=r[t])?r:-1/0},t.lex=function(){return t().toString(36).replace(".","")},t.ify=function(e,t,n,o,i){if(!e||!e[g]){if(!i)return;e=r.soul.ify(e,i)}var a=h(e[g],s);return f!==t&&t!==g&&(m(n)&&(a[t]=n),f!==o&&(e[t]=o)),e},t.to=function(e,n,o){var i=(e||{})[n];return d(i)&&(i=v(i)),t.ify(o,n,t.is(e,n),i,r.soul(e))},function(){function e(e,n){g!==n&&t.ify(this.o,n,this.s)}t.map=function(n,r,o){var i,a=d(a=n||r)?a:null;return n=b(n=n||r)?n:null,a&&!n?(r=m(r)?r:t(),a[g]=a[g]||{},y(a,e,{o:a,s:r}),a):(o=o||d(r)?r:i,r=m(r)?r:t(),function(t,a,u,c){if(!n)return e.call({o:u,s:r},t,a),t;n.call(o||this||{},t,a,u,c),p(u,a)&&i===u[a]||e.call({o:u,s:r},t,a)})}}();var f,l=n.obj,h=l.as,p=l.has,d=l.is,y=l.map,v=l.copy,m=n.num.is,b=n.fn.is,g=r._;e.exports=t}))(i,"./state"),i((function(e){var t=i("./type"),n=i("./val"),r=i("./node"),o={};!function(){function e(e,n){if(!e||n!==r.soul(e)||!r.is(e,this.fn,this.as))return!0;this.cb&&(t.n=e,this.cb.call(t.as=this.as,e,n,t))}function t(e){e&&r.is(t.n,e,t.as)}o.is=function(t,n,r,o){return!(!t||!c(t)||l(t))&&!p(t,e,{cb:n,fn:r,as:o})}}(),function(){function e(e,t){var o;return(o=function(e,t){var n,r=e.seen,o=r.length;for(;o--;)if(t.obj===(n=r[o]).obj)return n;r.push(t)}(e,t))?o:(t.env=e,t.soul=u,r.ify(t.obj,i,t)&&(t.link=t.link||n.link.ify(r.soul(t.node)),t.obj!==e.shell&&(e.graph[n.link.is(t.link)]=t.node)),t)}function i(t,o,i){var u,c,h=this,p=h.env;if(r._===o&&f(t,n.link._))return i._;if(u=l(t,o,i,h,p)){if(o||(h.node=h.node||i||{},f(t,r._)&&r.soul(t)&&(h.node._=d(t._)),h.node=r.soul.ify(h.node,n.link.is(h.link)),h.link=h.link||n.link.ify(r.soul(h.node))),(c=p.map)&&(c.call(p.as||{},t,o,i,h),f(i,o))){if(a===(t=i[o]))return void s(i,o);if(!(u=l(t,o,i,h,p)))return}if(!o)return h.node;if(!0===u)return t;if((c=e(p,{obj:t,path:h.path.concat(o)})).node)return c.link}}function u(e){var t=this,o=n.link.is(t.link),i=t.env.graph;t.link=t.link||n.link.ify(e),t.link[n.link._]=e,t.node&&t.node[r._]&&(t.node[r._][n.link._]=e),f(i,o)&&(i[e]=i[o],s(i,o))}function l(e,r,o,i,a){var u;return!!n.is(e)||(c(e)?1:(u=a.invalid)?l(e=u.call(a.as||{},e,r,o),r,o,i,a):(a.err="Invalid value at '"+i.path.concat(r).join(".")+"'!",void(t.list.is(e)&&(a.err+=" Use `.set(item)` instead of an Array."))))}o.ify=function(t,r,o){var i={path:[],obj:t};return r?"string"==typeof r?r={soul:r}:"function"==typeof r&&(r.map=r):r={},"string"==typeof o&&(r.soul=r.soul||o,o=a),r.soul&&(i.link=n.link.ify(r.soul)),r.shell=(o||{}).shell,r.graph=r.graph||{},r.seen=r.seen||[],r.as=r.as||o,e(r,i),r.root=i.node,r.graph}}(),o.node=function(e){var t=r.soul(e);if(t)return h({},t,e)},function(){function e(e,t){var i,a;if(r._!==t)this.obj[t]=(i=n.link.is(e))?(a=this.opt.seen[i])?a:this.opt.seen[i]=o.to(this.graph,i,this.opt):e;else{if(l(e,n.link._))return;this.obj[t]=d(e)}}o.to=function(t,n,r){if(t){var o={};return p(t[n],e,{obj:o,graph:t,opt:r=r||{seen:{}}}),o}}}();var a,u=t.obj,c=u.is,s=u.del,f=u.has,l=u.empty,h=u.put,p=u.map,d=u.copy;e.exports=o}))(i,"./graph"),i((function(e){i("./onto"),e.exports=function(e,t){if(this.on){if("function"!=typeof e){if(!e||!t)return;var n=(this.tag||"")[r=e["#"]||e];if(!n)return;return n=this.on(r,t),clearTimeout(n.err),!0}var r=t&&t["#"]||Math.random().toString(36).slice(2);if(!e)return r;var o=this.on(r,e,t);return o.err=o.err||setTimeout((function(){o.next({err:"Error: No ACK yet.",lack:!0}),o.off()}),(this.opt||{}).lack||9e3),r}}}))(i,"./ask"),i((function(e){var t=i("./type");e.exports=function(e){var n={s:{}},r=n.s;e=e||{max:1e3,age:27e3},n.check=function(e){return!!r[e]&&o(e)};var o=n.track=function(t){var o=r[t]||(r[t]={});return o.was=+new Date,n.to||(n.to=setTimeout(n.drop,e.age+9)),o};return n.drop=function(o){var i=+new Date;t.obj.map(r,(function(t,n){t&&(o||e.age)>i-t.was||delete r[n]})),n.to=null,console.STAT&&(o=+new Date-i)>9&&console.STAT(i,o,"dup drop")},n}}))(i,"./dup"),i((function(e){function t(e){return e instanceof t?(this._={$:this}).$:this instanceof t?t.create(this._={$:this,opt:e}):new t(e)}t.is=function(e){return e instanceof t||e&&e._&&e===e._.$||!1},t.version=.202,(t.chain=t.prototype).toJSON=function(){};var n=i("./type");n.obj.to(n,t),t.HAM=i("./HAM"),t.val=i("./val"),t.node=i("./node"),t.state=i("./state"),t.graph=i("./graph"),t.on=i("./onto"),t.ask=i("./ask"),t.dup=i("./dup"),t.puff=i("./puff"),function(){function e(r){if(r)if(r.out!==e){var o,i=this.as,a=i.at||i,u=a.$,c=a.dup,s=r.DBG;(o=r["#"])||(o=r["#"]=l(9)),c.check(o)||(c.track(o),r._="function"==typeof(o=r._)?o:function(){},r.$&&r.$===(r.$._||"").$||(r.$=u),a.ask(r["@"],r)||(s&&(s.u=+new Date),r.get&&t.on._get(r,u),!r.put)?(s&&(s.uc=+new Date),this.to.next(r),s&&(s.ua=+new Date),r.out=e,a.on("out",r),s&&(s.ue=+new Date)):n(r))}else this.to.next(r)}function n(e){if(e){var n,a,f=e._||"",l=f.root=((f.$=e.$||"")._||"").root,h=e.put,p=e["#"],d=f.DBG=e.DBG;if(h["#"]&&h["."])l.on("put",e);else{f.out=e,f.lot={s:0,more:1};var y=+new Date;for(var v in d&&(d.p=y),h){var m,b=h[v];if(!b){n=c+s(v)+"no node.";break}if(!(a=b._)){n=c+s(v)+"no meta.";break}if(v!==a[g]){n=c+s(v)+"soul not same.";break}if(!(m=a[S])){n=c+s(v)+"no state.";break}for(var w in b)if(_!==w){var j=b[w],O=m[w];if(r===O){n=c+s(w)+"on"+s(v)+"no state.";break}if(!k(j)){n=c+s(w)+"on"+s(v)+"bad "+o(j)+s(j);break}i(j,w,v,O,e)}if(n)break}d&&(d.pe=+new Date),console.STAT&&(console.STAT(y,+new Date-y,"mix"),console.STAT(y,f.lot.s,"mix #")),(f.err=n)?l.on("in",{"@":p,err:t.log(n)}):(--f.lot.more||u(f),f.stun||e["@"]||l.on("in",{"@":p,ok:-1}))}}}function i(e,t,n,r,o){var a,u=o._||"",c=u.root,s=c.graph[n]||j,l=b(s,t,1),d=s[t],y=p(),v=f(y,r,l,e,d);if(!v.incoming){if(v.defer){var m=r-y;return setTimeout((function(){i(e,t,n,r,o)}),m>h?h:m),u.to||c.on("in",{"@":o["#"],err:m}),u.to=1,m}if(!u.miss)return}(a=u.lot||"").s++,a.more++,(u.stun||(u.stun={}))[n+t]=1;var g=u.DBG;g&&(g.ph=g.ph||+new Date),c.on("put",{"#":o["#"],"@":o["@"],put:{"#":n,".":t,":":e,">":r},_:u})}function a(e){var t;(t=(e._||"").DBG)&&(t.pa=+new Date,t.pm=t.pm||+new Date);var n,o=this.as.graph,i=e._,a=e.put,c=a["#"],s=a["."],f=a[":"],l=a[">"];o[c]=m(o[c],s,l,f,c),function(e,t,n,r,o){var i,a,u=e.root;if((u.opt||"").super&&u.$.get(t),!(u&&(a=u.next)&&(a=a[t])&&a.$))return;(i=e.put||(e.put={}))[t]=m(i[t],n,o,r,t),a.put=m(a.put,n,o,r,t)}(i,c,s,r!==(n=a["="])?n:f,l),(n=i.out)&&(n=n.put)&&(n[c]=m(n[c],s,l,f,c)),--i.lot.more||u(i),this.to.next(e)}function u(t){if(!t.err){var n,r={},o=((t.$||"")._||"").root,i=(o||"").next||"",a=t.put,u=+new Date;for(var c in a){var s=a[c];(n=i[c])&&n.$&&(o.stop=r,n.on("in",{$:n.$,get:c,put:s}),o.stop=null)}console.STAT&&console.STAT(u,+new Date-u,"fire"),t.DBG&&(t.DBG.f=+new Date),(n=t.out)&&(n.out=e,o.on("out",n))}}t.create=function(n){n.root=n.root||n,n.graph=n.graph||{},n.on=n.on||t.on,n.ask=n.ask||t.ask,n.dup=n.dup||t.dup();var r=n.$.opt(n.opt);return n.once||(n.on("in",e,n),n.on("out",e,n),n.on("put",a,n),t.on("create",n),n.on("create",n)),n.once=1,r},t.on.put=n;var c="Error: Invalid graph!",s=function(e){return" '"+(""+e).slice(0,9)+"...' "},f=t.HAM,h=2147483647,p=t.state}(),function(){function e(e,n,r,o){var i=this,a=t.state.is(r,n);if(!a)return i.err="Error: No state on '"+n+"' in node '"+o+"'!";var u=i.graph[o]||j,c=t.state.is(u,n,!0),s=t.HAM(i.machine,a,c,e,u[n]);s.incoming?(i.put[o]=t.state.to(r,n,i.put[o]),(i.diff||(i.diff={}))[o]=t.state.to(r,n,i.diff[o]),i.souls[o]=!0):s.defer&&(i.defer=a<(i.defer||1/0)?a:i.defer)}function n(e,t){var n=this,r=n.$._,u=(r.next||j)[t];if(!u){if(!(r.opt||j).super)return void(n.souls[t]=!1);u=n.$.get(t)._}var c=n.map[t]={put:e,get:t,$:u.$},s={ctx:n,msg:c};n.async=!!r.tag.node,n.ack&&(c["@"]=n.ack),v(e,o,s),n.async&&(n.and||r.on("node",(function(e){this.to.next(e),e===n.map[e.get]&&(n.souls[e.get]=!1,v(e.put,i,e),v(n.souls,(function(e){if(e)return e}))||n.c||(n.c=1,this.off(),v(n.map,a,n)))})),n.and=!0,r.on("node",c))}function o(e,n){var r=this.ctx,o=r.graph,i=this.msg,a=i.get,u=i.put,c=i.$._;o[a]=t.state.to(u,n,o[a]),r.async||(c.put=t.state.to(u,n,c.put))}function i(e,n){var r=this.$._;r.put=t.state.to(this.put,n,r.put)}function a(e){e.$&&(this.cat.stop=this.stop,e.$._.on("in",e),this.cat.stop=null)}function u(e,t){if(e!==this.graph[t])return!0}t.on._put=function(o,i){var c=i._,s={$:i,graph:c.graph,put:{},map:{},souls:{},machine:t.state(),ack:o["@"],cat:c,stop:{}};if(t.obj.map(o.put,u,s)){if(t.graph.is(o.put,null,e,s)||(s.err="Error: Invalid graph!"),s.err)return c.on("in",{"@":o["#"],err:t.log(s.err)});if(v(s.put,n,s),s.async||v(s.map,a,s),r!==s.defer){var f=s.defer-s.machine;setTimeout((function(){t.on._put(o,i)}),f>MD?MD:f)}s.diff&&c.on("put",y(o,{put:s.diff}))}},t.on._get=function(e,n){var r=n._,o=e.get,i=o[g],a=r.graph[i],u=o[w],c=(r.next||(r.next={}))[i],s=(e._||"").DBG=e.DBG;if(s&&(s.g=+new Date),!a)return r.on("get",e);if(u){if("string"!=typeof u||!d(a,u))return r.on("get",e);a=t.state.to(a,u)}else a=t.window?t.obj.copy(a):a;a=t.graph.node(a);var f=function(){};f.ram=f.faith=!0,f.$=e.$,s&&(s.ga=+new Date),r.on("in",{"@":e["#"],put:a,ram:1,$:n,_:f}),s&&(s.gm=+new Date),r.on("get",e),s&&(s.gd=+new Date)}}(),t.chain.opt=function(e){var n=this._,r=(e=e||{}).peers||e;return p(e)||(e={}),p(n.opt)||(n.opt=e),f(r)&&(r=[r]),c(r)&&(r=v(r,(function(e,t,n){(t={}).id=t.url=e,n(e,t)})),p(n.opt.peers)||(n.opt.peers={}),n.opt.peers=y(r,n.opt.peers)),n.opt.peers=n.opt.peers||{},v(e,(function e(t,n){!d(this,n)||s.is(t)||h.empty(t)?this[n]=t:t&&t.constructor!==Object&&!c(t)||v(t,e,this[n])}),n.opt),t.on("opt",n),t.obj.native(),this},t.obj.native=function(){var e=Object.prototype;for(var t in e)console.log("Native Object.prototype polluted, reverting",t),delete e[t]};var r,u,c=t.list.is,s=t.text,f=s.is,l=s.random,h=t.obj,p=h.is,d=h.has,y=h.to,v=h.map,m=t.state.ify,b=t.state.is,g=t.val.link._,w=".",_=t.node._,k=t.val.is,S=t.state._,j={};(t.log=function(){return!t.log.off&&u.log.apply(u,arguments),[].slice.call(arguments).join(" ")}).once=function(e,n,r){return(r=t.log.once)[e]=r[e]||0,r[e]++||t.log(n)},"undefined"!=typeof window&&((window.GUN=window.Gun=t).window=window);try{void 0!==a&&(a.exports=t)}catch(e){}e.exports=t,(t.window||"").console=(t.window||"").console||{log:function(){}},(u=console).only=function(e,t){return u.only.i&&e===u.only.i&&u.only.i++&&(u.log.apply(u,arguments)||t)},t.log.once("welcome","Hello wonderful person! :) Thanks for using GUN, please ask for help on http://chat.gun.eco if anything takes you longer than 5min to figure out!")}))(i,"./root"),i((function(){var e=i("./root");e.chain.back=function(r,o){if(-1===(r=r||1)||1/0===r)return this._.root.$;if(1===r)return(this._.back||this._).$;var i=this._;if("string"==typeof r&&(r=r.split(".")),r instanceof Array){for(var a=0,u=r.length,c=i;a<u;a++)c=(c||n)[r[a]];return t!==c?o?this:c:(c=i.back)?c.$.back(r,o):void 0}if("function"==typeof r){var s;for(c={back:i};(c=c.back)&&t===(s=r(c,o)););return s}return e.num.is(r)?(i.back||i).$.back(r-1):this};var t,n={}}))(i,"./back"),i((function(){function e(e){var t,n,r=this.as,o=r.back,i=r.root;if(e.$||(e.$=r.$),this.to.next(e),t=e.get){if(r.lex&&(e.get=y(r.lex,e.get)),t["#"]||r.soul){if(t["#"]=t["#"]||r.soul,e["#"]||(e["#"]=m(9)),o=i.$.get(t["#"])._,t=t["."]){if(p(o.put,t)){if((n=(a=o.$.get(t)._).ack)||(a.ack=-1),o.on("in",{$:o.$,put:s.state.to(o.put,t),get:o.get}),n)return}else if("string"!=typeof t){var a={},u=(o.put||{})._;if(s.obj.map(o.put,(function(e,n){s.text.match(n,t)&&(a[n]=e)})),s.obj.empty(a)||(a._=u,o.on("in",{$:o.$,put:a,get:o.get})),n=r.lex){if(n=n._||(n._=function(){}),o.ack<n.ask&&(n.ask=o.ack),n.ask)return;n.ask=1}}}else{if((n=o.ack)||(o.ack=-1),p(o,"put")&&o.on("in",o),n&&f!==o.put)return;e.$=o.$}return i.ask(c,e),i.on("in",e)}if(i.now&&(i.now[r.id]=i.now[r.id]||!0,r.pass={}),t["."])return r.get?(e={get:{".":r.get},$:r.$},o.ask||(o.ask={}),o.ask[r.get]=e.$._,o.on("out",e)):o.on("out",e={get:{},$:r.$});if(r.ack=r.ack||-1,r.get)return e.$=r.$,t["."]=r.get,(o.ask||(o.ask={}))[r.get]=e.$._,o.on("out",e)}return o.on("out",e)}function t(e){var t,o,i=this,c=i.as,h=c.root,m=(e.$||l)._||l,b=e.put;if(c.get&&e.get!==c.get&&(e=y(e,{get:c.get})),c.has&&m!==c&&(e=y(e,{$:c.$}),m.ack&&(c.ack=m.ack)),f===b){if(o=m.put,i.to.next(e),c.soul)return;if(f===o&&f!==m.put)return;return r(c,e,i),c.has&&u(c,e),d(m.echo,c.id),void d(c.map,m.id)}if(c.soul)return i.to.next(e),r(c,e,i),void(c.next&&v(b,a,{msg:e,cat:c}));if(!(t=s.val.link.is(b)))return s.val.is(b)?(c.has||c.soul?u(c,e):(m.has||m.soul)&&((m.echo||(m.echo={}))[c.id]=m.echo[m.id]||c,(c.map||(c.map={}))[m.id]=c.map[m.id]||{at:m}),i.to.next(e),void r(c,e,i)):(c.has&&m!==c&&p(m,"put")&&(c.put=m.put),(t=s.node.soul(b))&&m.has&&(m.put=c.root.$.get(t)._.put),o=(h.stop||{})[m.id],i.to.next(e),n(c,e,m,t),r(c,e,i),void(c.next&&v(b,a,{msg:e,cat:c})));(o=(o=h.stop||{})[m.id]||(o[m.id]={})).is=o.is||m.put,o[c.id]=m.put||!0,i.to.next(e),n(c,e,m,t),r(c,e,i)}function n(e,t,r,o){if(o&&b!==e.get){var i=e.root.$.get(o)._;e.has?r=i:r.has&&n(r,t,r,o),r!==e&&(r.$||(r={}),(r.echo||(r.echo={}))[e.id]=r.echo[e.id]||e,e.has&&!(e.map||l)[r.id]&&u(e,t),(o!==(i=r.id?(e.map||(e.map={}))[r.id]=e.map[r.id]||{at:r}:{}).link||i.pass||e.pass)&&(e.pass&&(s.obj.map(e.map,(function(e){e.pass=!0})),d(e,"pass")),i.pass&&d(i,"pass"),e.has&&(e.link=o),function(e,t){var n=e.root.$.get(t)._,r=e.lex;if((e.ack||r)&&((r=r||{})["#"]=t,n.on("out",{get:r}),!e.ask))return;n=e.ask,s.obj.del(e,"ask"),v(n||e.next,(function(e,n){var r=e.lex||{};r["#"]=t,r["."]=r["."]||n,e.on("out",{get:r})})),s.obj.del(e,"ask")}(e,i.link=o)))}}function r(e,t){e.echo&&v(e.echo,o,t)}function o(e){e&&e.on&&e.on("in",this)}function a(e,t){var n,r,o,i=this.cat.next||l,a=this.msg;(b!==t||i[t])&&(r=i[t])&&(r.has?(f!==r.put&&s.val.link.is(e)||(r.put=e),n=r.$):(o=a.$)&&(o=(n=a.$.get(t))._,f!==o.put&&s.val.link.is(e)||(o.put=e)),r.on("in",{put:e,get:t,$:n,via:a}))}function u(e,t){if(e.has||e.soul){var n=e.map;e.map=null,e.has&&(e.dub&&e.root.stop&&(e.dub=null),e.link=null),(e.pass||t["@"]||null!==n)&&(f===n&&s.val.link.is(e.put)||(v(n,(function(t){(t=t.at)&&d(t.echo,e.id)})),n=e.put,v(e.next,(function(t,r){if(f===n&&f!==e.put)return!0;t.put=f,t.ack&&(t.ack=-1),t.on("in",{get:r,$:t.$,put:f})}))))}}function c(e){var t=this.as,n=t.get||"",r=t.$._,o=(e.put||"")[n["#"]];if(r.ack&&(r.ack=r.ack+1||1),e.put&&("string"!=typeof n["."]||p(o,r.get)))b!=n["."]?(r.$===(e._||"").$&&(e._.miss=r.put===f),s.on.put(e)):r.on("in",{get:r.get,put:s.val.link.ify(n["#"]),$:r.$,"@":e["@"]});else{if(r.put!==f)return;r.on("in",{get:r.get,put:r.put=f,$:r.$,"@":e["@"]})}}var s=i("./root");s.chain.chain=function(n){var r,o=this,i=o._,a=new(n||o).constructor(o),u=a._;return u.root=r=i.root,u.id=++r.once,u.back=o._,u.on=s.on,u.on("in",t,u),u.on("out",e,u),a};var f,l={},h=s.obj,p=h.has,d=h.del,y=h.to,v=h.map,m=s.text.random,b=s.node._}))(i,"./chain"),i((function(){function e(e){var t,o=this,i=o.as,u=i.at.root,s=(e.$||{})._||{},f=e.put||s.put;if((t=u.now)&&o!==t[i.now])return o.to.next(e);if(o.seen&&s.id&&o.seen[s.id])return o.to.next(e);if((t=f)&&t[c._]&&(t=c.is(t))&&(t=(e.$$=s.root.$.get(t))._,r!==t.put&&(e=a(e,{put:f=t.put}))),(t=u.mum)&&s.id){var l=s.id+(o.id||(o.id=n.text.random(9)));if(t[l])return;r===f||c.is(f)||(t[l]=!0)}i.use(e,o),o.stun?o.stun=null:o.to.next(e)}function t(e){var t=this.on;if(!e||t.soul||t.has)return this.off();if(e=(e=(e=e.$||e)._||e).id){var n;if((n=this.seen||(this.seen={}))[e])return!0;n[e]=!0}}var n=i("./root");n.chain.get=function(i,a,l){var h;if("string"!=typeof i){if("function"==typeof i){if(!0===a)return function(e,t,n,o){var i,a=e._,u=0;(i=a.soul||a.link||a.dub)?t(i,o,a):a.jam?a.jam.push([t,o]):(a.jam=[[t,o]],e.get((function(e,t){if(!(r===e.put&&!a.root.opt.super&&(i=Object.keys(a.root.opt.peers).length)&&++u<=i)){t.rid(e);var n,o=(o=e.$)&&o._||{},f=0;for(i=a.jam,delete a.jam;n=i[f++];){var l=n[0];n=n[1],l&&l(o.link||o.soul||c.is(e.put)||s(e.put)||o.dub,n,e,t)}}}),{out:{get:{".":!0}}}))}(this,i,0,l),this;var p,d=(h=this)._,y=d.root,v=y.now;(l=a||{}).at=d,l.use=i,l.out=l.out||{},l.out.get=l.out.get||{},(p=d.on("in",e,l)).rid=t,(y.now={$:1})[l.now=d.id]=p;var m=y.mum;return y.mum={},d.on("out",l.out),y.mum=m,y.now=v,h}return u(i)?this.get(""+i,a,l):(v=c.is(i))?this.get(v,a,l):o.is(i)?(h=this,(v=((v=i["#"])||f)["="]||v)&&(h=h.get(v)),h._.lex=i,h):((l=this.chain())._.err={err:n.log("Invalid get request!",i)},a&&a.call(l,l._.err),l)}if(0==i.length)return(l=this.chain())._.err={err:n.log("Invalid zero length string key!",i)},null;return(h=(this._.next||f)[i])||(h=function(e,t){var n=t._,r=n.next,o=t.chain()._;return r||(r=n.next={}),r[o.get=e]=o,t===n.root.$?o.soul=e:(n.soul||n.has)&&(o.has=e),o}(i,this)),h=h.$,(v=this._.stun)&&(h._.stun=h._.stun||v),a&&"function"==typeof a&&h.get(a,l),h};var r,o=n.obj,a=n.obj.to,u=n.num.is,c=n.val.link,s=n.node.soul,f={}}))(i,"./get"),i((function(){function e(e){e&&e()}function t(){var e=this;e.graph&&h(e.stun)&&(e.res=e.res||function(e){e&&e()},e.res((function(){delete e.via._.stun;var t=e.$.back(-1)._,n=t.ask((function(n){t.root.on("ack",n),n.err&&c.log(n),++r>(e.acks||0)&&this.off(),e.ack&&e.ack(n,this)}),e.opt),r=0,o=t.root.now;s.del(t.root,"now");var i=t.root.mum;t.root.mum={},e.ref._.on("out",{$:e.ref,put:e.out=e.env.graph,opt:e.opt,"#":n}),t.root.mum=i?s.to(i,t.root.mum):i,t.root.now=o,e.via._.on("res",{}),delete e.via._.tag.res}),e),e.res&&e.res())}function n(e,t,n,o){var i=this,a=c.is(e);!t&&o.path.length&&(i.res||y)((function(){for(var t=o.path,n=i.ref,u=0,s=t.length;u<s;u++)n=n.get(t[u]);a&&(n=e);var f=n._.dub;if(f||(f=c.node.soul(o.obj)))return n.back(-1).get(f),void o.soul(f);(i.stun=i.stun||{})[t]=1,n.get(r,!0,{as:{at:o,as:i,p:t,ref:n}})}),{as:i,at:o})}function r(e,t,n,r){t=t.as;var o,i=t.ref,u=t.at,s=[];t=t.as,i.back((function(e){if(o=e.soul||e.link||e.dub)return o;s.push(e.has||e.get)})),s=[o||t.soul].concat(s.reverse());var f=((n||{}).$||{})._||{};e=f.dub=f.dub||e||c.node.soul(u.obj)||c.node.soul(n.put||f.put)||c.val.link.is(n.put||f.put)||s.join("/"),r&&(r.stun=!0),e?a(f,f.dub=e,u,t):t.via.back("opt.uuid")((function(e,n){if(e)return c.log(e);a(f,f.dub=f.dub||n,u,t)}))}function a(e,t,n,r){e.$.back(-1).get(t),n.soul(t),delete r.stun[n.path],r.batch()}function u(e,t,n,r){if(t=t.as,n.$&&n.$._)if(n.err)c.log("Please report this as an issue! Put.any.err");else{var o,i=n.$._,a=i.put,u=t.opt||{};if(!(o=t.ref)||!o._.now){if(r&&(r.stun=!0),t.ref!==t.$){if(!(o=t.$._.get||i.get))return delete t.via._.stun,void c.log("Please report this as an issue! Put.no.get");t.data=l({},o,t.data),o=null}if(undefined===a){if(!i.get)return void delete t.via._.stun;e||(o=i.$.back((function(e){if(e.link||e.soul)return e.link||e.soul;t.data=l({},e.get,t.data)})),t.not=!0),i=(o=o||i.soul||i.link||i.dub)?i.root.$.get(o)._:i,t.soul=o,a=t.data}t.not||(t.soul=t.soul||e)||(t.path&&f(t.data)?t.soul=(u.uuid||t.via.back("opt.uuid")||c.text.random)():(v==i.get&&(t.soul=(i.put||p)["#"]||i.dub),t.soul=t.soul||i.soul||i.link||(u.uuid||t.via.back("opt.uuid")||c.text.random)()),t.soul)?t.ref.put(t.data,t.soul,t):t.via.back("opt.uuid")((function(e,n){if(e)return delete t.via._.stun,c.log(e);t.ref.put(t.data,t.soul=n,t)}))}}}var c=i("./root");c.chain.put=function(r,i,a){var s,h=this,p=h._,y=p.root.$;return(a=a||{}).data=r,a.via=a.$=a.via||a.$||h,"string"==typeof i?a.soul=i:a.ack=a.ack||i,p.soul&&(a.soul=p.soul),a.soul||y===h?f(a.data)?(a.soul=a.soul||(a.not=c.node.soul(a.data)||(a.via.back("opt.uuid")||c.text.random)()),a.via._.stun={},a.soul?(a.$=y.get(a.soul),a.ref=a.$,function(e){e.batch=t;var r=e.env=c.state.map(n,(e.opt||{}).state);if(r.soul=e.soul,e.graph=c.graph.ify(e.data,r,e),r.err)return(e.ack||d).call(e,e.out={err:c.log(r.err)}),void(e.res&&e.res());e.batch()}(a),h):(a.via.back("opt.uuid")((function(e,t){if(e)return c.log(e);(a.ref||a.$).put(a.data,a.soul=t,a)})),h)):((a.ack||d).call(a,a.out={err:c.log("Data saved to the root level of the graph must be a node (an object), not a",o(a.data),'of "'+a.data+'"!')}),a.res&&a.res(),h):(a.via._.stun={},c.is(r)?(r.get((function(e,t,n){if(!e)return delete a.via._.stun,c.log("The reference you are saving is a",o(n.put),'"'+n.put+'", not a node (object)!');h.put(c.val.link.ify(e),i,a)}),!0),h):(p.has&&(s=c.val.link.is(r))&&(p.dub=s),a.ref=a.ref||y._===(s=p.back)?h:s.$,a.ref._.soul&&c.val.is(a.data)&&p.get?(a.data=l({},p.get,a.data),a.ref.put(a.data,a.soul,a),h):(a.ref.get(u,!0,{as:a}),a.out||(a.res=a.res||e,a.$._.stun=a.ref._.stun),h)))};String.fromCharCode(31);var s=c.obj,f=s.is,l=s.put,h=s.empty,p={},d=function(){},y=function(e,t){e.call(t||p)},v=c.node._}))(i,"./put"),i((function(e){var t=i("./root");i("./chain"),i("./back"),i("./put"),i("./get"),e.exports=t}))(i,"./index"),i((function(){function e(e,t){var n,o=this,i=e.$,a=((i||{})._||{}).put||e.put;if(r!==a){if(n=e.$$){if(r===(n=e.$$._).put)return;a=n.put}o.change&&(a=e.put),o.as?o.ok.call(o.as,e,t):o.ok.call(i,a,e.get,e,t)}}function t(e,o,i){if(e.$){var a,u,s=this.as,f=e.$,l=f._,h=l.put||e.put;(u=e.$$)&&(a=u=e.$$._,r!==a.put&&(h=a.put)),(u=o.wait)&&(u=u[l.id])&&clearTimeout(u),o.ack=(o.ack||0)+1,!i&&r===h&&!l.root.opt.super&&o.ack<=(s.acks||Object.keys(l.root.opt.peers).length)||(!i&&(r===h||l.soul||l.link||a&&!(0<a.ack))||r===h&&!l.root.opt.super&&(u=Object.keys(l.root.opt.peers).length)&&!i&&(a||l).ack<u?u=(o.wait={})[l.id]=setTimeout((function(){t.call({as:s},e,o,u||1)}),s.wait||99):(a&&r===a.put&&(u=c.is(h))&&(h=n.node.ify({},u)),o.rid?o.rid(e):o.off(),s.ok.call(f||s.$,h,e.get)))}else o.off()}var n=i("./index");n.chain.on=function(t,n,r,o){var i,a=this,u=a._;if("string"==typeof t)return n?(i=u.on(t,n,r||u,o),r&&r.$&&(r.subs||(r.subs=[])).push(i),a):u.on(t);var c=n;return(c=!0===c?{change:!0}:c||{}).at=u,c.ok=t,a.get(e,c),a},n.chain.val=function(e,t){return n.log.once("onceval","Future Breaking API Change: .val -> .once, apologies unexpected."),this.once(e,t)},n.chain.once=function(e,o){var i=this,a=i._,u=a.put;if(0<a.ack&&r!==u)return(e||s).call(i,u,a.get),i;if(!e){n.log.once("valonce","Chainable val is experimental, its behavior and API may change moving forward. Please play with it and report bugs and ideas on how to improve it.");var c=i.chain();return c._.nix=i.once((function(){c._.on("in",i._)})),c}return(o=o||{}).ok=e,o.at=a,o.out={"#":n.text.random(9)},i.get(t,{as:o}),o.async=!0,i},n.chain.off=function(){var e,t=this._,n=t.back;if(n)return t.ack=0,(e=n.next)&&e[t.get]&&u(e,t.get),(e=n.ask)&&u(e,t.get),(e=n.put)&&u(e,t.get),(e=t.soul)&&u(n.root.graph,e),(e=t.map)&&a(e,(function(e){e.link&&n.root.$.get(e.link).off()})),(e=t.next)&&a(e,(function(e){e.$.off()})),t.on("off",{}),this};var r,o=n.obj,a=o.map,u=o.del,c=n.val.link,s=function(){}}))(i,"./on"),i((function(){function e(e){if(!e.put||n.val.is(e.put))return this.to.next(e);this.as.nix&&this.off(),r(e.put,t,{at:this.as,msg:e}),this.to.next(e)}function t(e,t){if(a!==t){var r=this.msg.$,o=this.at,i=r._.lex;i&&!n.text.match(t,i["."]||i["#"]||i)||(((i=r.get(t)._).echo||(i.echo={}))[o.id]=i.echo[o.id]||o)}}var n=i("./index");n.chain.map=function(t){var r,i=this,a=i._;return t?(n.log.once("mapfn","Map functions are experimental, their behavior and API may change moving forward. Please play with it and report bugs and ideas on how to improve it."),r=i.chain(),i.map().on((function(e,i,a,u){var c=(t||o).call(this,e,i,a,u);if(undefined!==c)return e===c?r._.on("in",a):n.is(c)?r._.on("in",c._):void r._.on("in",{get:i,put:c})})),r):((r=a.each)||(a.each=r=i.chain(),r._.nix=i.back("nix"),i.on("in",e,r._)),r)};var r=n.obj.map,o=function(){},a=n.node._}))(i,"./map"),i((function(){function e(){return t.state.lex()+t.text.random(7)}var t=i("./index");t.chain.set=function(n,r,o){var i,a=this;return r=r||function(){},(o=o||{}).item=o.item||n,(i=t.node.soul(n))&&(n=t.obj.put({},i,t.val.link.ify(i))),t.is(n)?(n.get((function(e,i,u){if(e||!n._.stun)return e?void a.put(t.obj.put({},e,t.val.link.ify(e)),r,o):r.call(a,{err:t.log('Only a node can be linked! Not "'+u.put+'"!')});n._.on("res",(function(){this.off(),a.set(n,r,o)}))}),!0),n):(t.obj.is(n)&&(i=i||t.node.soul(n)||e()),a.get(i||e()).put(n,r,o))}}))(i,"./set"),i((function(){if("undefined"!=typeof Gun){var e;try{e=(Gun.window||function(){}).localStorage}catch(e){}e||(Gun.log("Warning: No localStorage exists to persist data to!"),e={setItem:function(e,t){this[e]=t},removeItem:function(e){delete this[e]},getItem:function(e){return this[e]}}),Gun.on("create",(function(t){function n(e){if(!e.err&&e.ok){var t=e["@"];setTimeout((function(){Gun.obj.map(u,(function(e,n){Gun.obj.map(e,(function(n,r){t===n&&delete e[r]})),c(e)&&delete u[n]})),h()}),o.wait||1)}}var r=this.to,o=t.opt;if(t.once)return r.next(t);if(!1===o.localStorage)return r.next(t);o.prefix=o.file||"gun/";var i,a,u=Gun.obj.ify(e.getItem("gap/"+o.prefix))||{},c=Gun.obj.empty;if(!c(u)){var s=Gun.obj.ify(e.getItem(o.prefix))||{},f={};Gun.obj.map(u,(function(e,t){Gun.obj.map(e,(function(e,n){f[t]=Gun.state.to(s[t],n,f[t])}))})),setTimeout((function(){t.on("out",{put:f,"#":t.ask(n)})}),1)}t.on("out",(function(e){e.lS||(Gun.is(e.$)&&e.put&&!e["@"]&&(i=e["#"],Gun.graph.is(e.put,null,l),a||(a=setTimeout(h,o.wait||1))),this.to.next(e))})),t.on("ack",n),r.next(t);var l=function(e,t,n,r){(u[r]||(u[r]={}))[t]=i},h=function(){clearTimeout(a),a=!1;try{e.setItem("gap/"+o.prefix,JSON.stringify(u))}catch(e){Gun.log(err=e||"localStorage failure")}}})),Gun.on("create",(function(t){this.to.next(t);var n=t.opt;if(!t.once&&!1!==n.localStorage){n.prefix=n.file||"gun/";var r,o={},i=0,a=Gun.obj.ify(e.getItem(n.prefix))||{};t.on("localStorage",a),t.on("put",(function(e){this.to.next(e);var t,c=e.put,s=c["#"];if(a[s]=Gun.state.ify(a[s],c["."],c[">"],c[":"],s),e["@"]||((o[e["#"]]=t=(e._||"").lot||{}).lS=(t.lS||0)+1),(i+=1)>=(n.batch||1e3))return u();r||(r=setTimeout(u,n.wait||1))})),t.on("get",(function(e){function n(){if(i&&(r=i["#"])){var n=i["."];(o=a[r]||undefined)&&n&&(o=Gun.state.to(o,n)),t.on("in",{"@":e["#"],put:Gun.graph.node(o),lS:1})}}this.to.next(e);var r,o,i=e.get;Gun.debug?setTimeout(n,1):n()}));var u=function u(c){var s;i=0,clearTimeout(r),r=!1;var f=o;o={},c&&(a=c);try{e.setItem(n.prefix,JSON.stringify(a))}catch(e){Gun.log(s=(e||"localStorage failure")+" Consider using GUN's IndexedDB plugin for RAD for more storage space, https://gun.eco/docs/RAD#install"),t.on("localStorage:error",{err:s,file:n.prefix,flush:a,retry:u})}(s||Gun.obj.empty(n.peers))&&Gun.obj.map(f,(function(e,n){if(e){if(e.more)return void(o[n]=e);e.s!==e.lS&&(s="localStorage batch not same.")}t.on("in",{"@":n,err:s,ok:0})}))}}}))}}))(i,"./adapters/localStorage"),i((function(e){var t=i("../type");!function(){function e(e,r){var o;if(!(r instanceof Object))return r;var i=+new Date;return t.obj.map(Object.keys(r).sort(),n,{to:o={},on:r}),console.STAT&&console.STAT(i,+new Date-i,"sort"),o}function n(e){this.to[e]=this.on[e]}var r=JSON.stringify;t.obj.hash=function(n,o){if(o||undefined!==(n=r(n,e)))return t.text.hash(o||n||"")},t.obj.hash.sort=e}();var n=t.obj.is;try{e.exports=function(e){function r(e){var t=e.batch,n="string"==typeof t;if(n&&(t+="]"),e.batch=e.tail=null,t&&!(n?3>t.length:!t.length)){if(!n)try{t=1===t.length?t[0]:JSON.stringify(t)}catch(e){return a.log("DAM JSON stringify error",e)}t&&o(t,e)}}function o(e,t){try{var n=t.wire;t.say?t.say(e):n.send&&n.send(e),i.say.d+=e.length||0,++i.say.c}catch(n){(t.queue=t.queue||[]).push(e)}}var i=function(){},a=e.opt||{};a.log=a.log||console.log,a.gap=a.gap||a.wait||0,a.pack=a.pack||.3*(a.memory?1e3*a.memory*1e3:1399e6),a.puff=a.puff||9;var u,c,s,f=setTimeout.puff||setTimeout,l=e.dup,h=l.check,p=l.track,d=i.hear=function(o,u){if(o){if(a.pack<=o.length)return i.say({dam:"!",err:"Message too big!"},u);var c,s,l,y=o[0];if(i===this&&(d.d+=o.length||0,++d.c),"["!==y){if("{"===y||(o["#"]||n(o))&&(c=o)){try{c=c||JSON.parse(o)}catch(e){return a.log("DAM JSON parse error",e)}if(!c)return;if(c.DBG&&(c.DBG=l={DBG:c.DBG}),l&&(l.hp=+new Date),(s=c["#"])||(s=c["#"]=t.text.random(9)),y=h(s))return;if((c._=function(){}).via=i.leap=u,y=c.dam)return(y=i.hear[y])&&y(c,u,e),void p(s);var v,m=+new Date;l&&(l.is=m),e.on("in",c),l&&(l.hd=+new Date),console.STAT&&(v=+new Date-m)>9&&console.STAT(m,v,"msg"),p(s).via=u,i.leap=null}}else{try{c=JSON.parse(o)}catch(e){a.log("DAM JSON parse error",e)}if(o="",!c)return;console.STAT&&console.STAT(+new Date,c.length,"# on hear batch");var b=a.puff;!function e(){for(var t,n=+new Date,o=0;o<b&&(t=c[o++]);)d(t,u);c=c.slice(o),console.STAT&&console.STAT(n,+new Date-n,"hear loop"),r(u),c.length&&f(e,0)}()}}};d.c=d.d=0,c=0,s=i.say=function(e,n){var h,d,y;if((h=this)&&(h=h.to)&&h.next&&h.next(e),!e)return!1;var v=e.DBG;n||(g=+new Date,v&&(v.y=g));var m=e._||(e._=function(){});if((d=e["#"])||(d=e["#"]=t.text.random(9)),(y=m.raw)||(y=i.raw(e)),g&&console.STAT&&console.STAT(g,+new Date-g,"say prep"),!u&&p(d),!n&&(h=e["@"])&&(n=(h=l.s[h])&&(h.via||(h=h.it)&&(h=h._)&&h.via)||i.leap),!n&&e["@"])return console.STAT&&console.STAT(+new Date,++c,"total no peer to ack to"),!1;if(!n&&i.way)return i.way(e);if(n&&n.id){if(!n.wire&&i.wire&&i.wire(n),d!==n.last){if(n.last=d,n===m.via)return!1;if((h=m.to)&&(h[n.url]||h[n.pid]||h[n.id]))return!1;if(n.batch){if(n.tail=(h=n.tail||0)+y.length,n.tail<=a.pack)return void(n.batch+=(h?",":"")+y);r(n)}n.batch="[";var b,g=+new Date;setTimeout((function(){console.STAT&&(b=+new Date-g)>9&&console.STAT(g,b,"0ms TO",d,n.id),r(n)}),a.gap),o(y,n)}}else{if(!t.obj.is(n||a.peers))return!1;var w=a.peers,_=Object.keys(n||a.peers||{});!function t(){var n=+new Date;u=1;var r=m.raw;m.raw=y;for(var o,i=0;i<9&&(o=(_||"")[i++]);)(o=w[o])&&s(e,o);m.raw=r,u=0,_=_.slice(i),console.STAT&&console.STAT(n,+new Date-n,"say loop"),_.length&&(f(t,0),p(e["@"]))}()}},i.say.c=i.say.d=0,function(){i.raw=function(t){if(!t)return"";var n,r=t._||{};if(n=r.raw)return n;if("string"==typeof t)return t;var o=e(t);return r&&(o||"").length<1e5&&(r.raw=o),o};var e=JSON.stringify}(),i.hi=function(n){var r=n.wire||{};n.id?a.peers[n.url||n.id]=n:(r=n.id=n.id||t.text.random(9),i.say({dam:"?",pid:e.opt.pid},a.peers[r]=n),delete l.s[n.last]),n.met=n.met||+new Date,r.hied||e.on(r.hied="hi",n),r=n.queue,n.queue=[],t.obj.map(r,(function(e){o(e,n)})),t.obj.native&&t.obj.native()},i.bye=function(t){e.on("bye",t);var n=+new Date;n-=t.met||n,i.bye.time=((i.bye.time||n)+n)/2},i.hear["!"]=function(e){a.log("Error:",e.err)},i.hear["?"]=function(e,t){e.pid&&(t.pid||(t.pid=e.pid),e["@"])||(i.say({dam:"?",pid:a.pid,"@":e["#"]},t),delete l.s[t.last])},e.on("create",(function(e){e.opt.pid=e.opt.pid||t.text.random(9),this.to.next(e),e.on("out",i.say)})),e.on("bye",(function(e,n){this.to.next(e=a.peers[e.id||e]||e),e.bye?e.bye():(n=e.wire)&&n.close&&n.close(),t.obj.del(a.peers,e.id),e.wire=null}));var y={};return e.on("bye",(function(e,t){this.to.next(e),(t=e.url)&&(y[t]=!0,setTimeout((function(){delete y[t]}),a.lack||9e3))})),e.on("hi",(function(n,r){this.to.next(n),(r=n.url)&&y[r]&&(delete y[r],a.super||t.obj.map(e.next,(function(o,a){(r={})[a]=e.graph[a],i.say({"##":t.obj.hash(r),get:{"#":a}},n)})))})),i}}catch(e){}}))(i,"./adapters/mesh"),i((function(){var e=i("../index");e.Mesh=i("./mesh"),e.on("opt",(function(t){function n(e){try{if(!e||!e.url)return n&&n(e);var t=e.url.replace(/^http/,"ws"),n=e.wire=new i.WebSocket(t);return n.onclose=function(){i.mesh.bye(e),o(e)},n.onerror=function(){o(e)},n.onopen=function(){i.mesh.hi(e)},n.onmessage=function(t){t&&i.mesh.hear(t.data||t,e)},n}catch(e){}}function o(e){clearTimeout(e.defer),s&&e.retry<=0||(e.retry=(e.retry||i.retry||60)-1,e.defer=setTimeout((function t(){if(s&&s.hidden)return setTimeout(t,2e3);n(e)}),2e3))}this.to.next(t);var i=t.opt;if(!t.once&&!1!==i.WebSocket){var a;"undefined"!=typeof window&&(a=window),void 0!==r&&(a=r),a=a||{};var u=i.WebSocket||a.WebSocket||a.webkitWebSocket||a.mozWebSocket;if(u){i.WebSocket=u;var c=i.mesh=i.mesh||e.Mesh(t);c.wire=i.wire=n,setTimeout((function(){t.on("out",{dam:"hi"})}),1);var s="undefined"!=typeof document&&document}}}))}))(i,"./adapters/websocket")}()}).call(this,n("RoC8")(e),n("oPUo").setImmediate,n("pCvA"))},"5IsQ":function(e){function t(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function r(e){if(c===setTimeout)return setTimeout(e,0);if((c===t||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function o(){p&&l&&(p=!1,l.length?h=l.concat(h):d=-1,h.length&&i())}function i(){if(!p){var e=r(o);p=!0;for(var t=h.length;t;){for(l=h,h=[];++d<t;)l&&l[d].run();d=-1,t=h.length}l=null,p=!1,function(e){if(s===clearTimeout)return clearTimeout(e);if((s===n||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}(e)}}function a(e,t){this.fun=e,this.array=t}function u(){}var c,s,f=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:t}catch(e){c=t}try{s="function"==typeof clearTimeout?clearTimeout:n}catch(e){s=n}}();var l,h=[],p=!1,d=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new a(e,t)),1!==h.length||p||r(i)},a.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.prependListener=u,f.prependOnceListener=u,f.listeners=function(){return[]},f.binding=function(){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},"9/Ks":function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(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 i(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){function n(){return u(e,arguments,f(this).constructor)}if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)},a(e)}function u(){return u=c()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&s(o,n.prototype),o},u.apply(null,arguments)}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){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function l(e){return l="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},l(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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 d(e){return d="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},d(e)}function y(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 v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function m(e){var t=function(){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}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function w(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function _(){return _=k()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&S(o,n.prototype),o},_.apply(null,arguments)}function k(){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){return S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},S(e,t)}function j(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(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 O(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}function x(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 T(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 I(e,t,n){var r;if("string"==typeof e){var o=new URL(e,location.href);r=new On((function(e){return e.url.href===o.href}),t,n)}else if(e instanceof RegExp)r=new xn(e,t,n);else if("function"==typeof e)r=new On(e,t,n);else{if(!(e instanceof On))throw new kn("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});r=e}return En().registerRoute(r),r}function E(e,t){var n=t();return e.waitUntil(n),n}function P(e){if(!e)throw new kn("add-to-cache-list-unexpected-type",{entry:e});if("string"==typeof e){var t=new URL(e,location.href);return{cacheKey:t.href,url:t.href}}var n=e.revision,r=e.url;if(!r)throw new kn("add-to-cache-list-unexpected-type",{entry:e});if(!n){var o=new URL(r,location.href);return{cacheKey:o.href,url:o.href}}var i=new URL(r,location.href),a=new URL(r,location.href);return i.searchParams.set("__WB_REVISION__",n),{cacheKey:i.href,url:a.href}}function A(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){A(u,r,o,i,a,"next",e)}function a(e){A(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function D(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 C(e,t,n){return t&&D(e.prototype,t),n&&D(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function q(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 $(e,t,n){return t&&q(e.prototype,t),n&&q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function B(){if(void 0===vn){var e=new Response("");if("body"in e)try{new Response(e.body),vn=!0}catch(e){vn=!1}vn=!1}return vn}function L(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function M(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){L(u,r,o,i,a,"next",e)}function a(e){L(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function U(){return(U=M((function*(e,t){var n=null;e.url&&(n=new URL(e.url).origin);if(n!==self.location.origin)throw new kn("cross-origin-copy-response",{origin:n});var r=e.clone(),o={headers:new Headers(r.headers),status:r.status,statusText:r.statusText},i=t?t(o):o,a=B()?r.body:yield r.blob();return new Response(a,i)}))).apply(this,arguments)}function F(){return F=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F.apply(this,arguments)}function K(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function W(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){K(u,r,o,i,a,"next",e)}function a(e){K(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function G(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function z(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 H(e,t){var n,r=new URL(e),o=G(t);try{for(o.s();!(n=o.n()).done;){r.searchParams.delete(n.value)}}catch(e){o.e(e)}finally{o.f()}return r.href}function J(){return(J=W((function*(e,t,n,r){var o=H(t.url,n);if(t.url===o)return e.match(t,r);var i,a=F(F({},r),{ignoreSearch:!0}),u=G(yield e.keys(t,a));try{for(u.s();!(i=u.n()).done;){var c=i.value;if(o===H(c.url,n))return e.match(c,r)}}catch(e){u.e(e)}finally{u.f()}}))).apply(this,arguments)}function Q(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 V(e,t,n){return t&&Q(e.prototype,t),n&&Q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function X(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Y(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 Z(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function ee(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){Z(u,r,o,i,a,"next",e)}function a(e){Z(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function te(){return(te=ee((function*(){var e,t=X(Mn);try{for(t.s();!(e=t.n()).done;){var n=e.value;yield n()}}catch(e){t.e(e)}finally{t.f()}}))).apply(this,arguments)}function ne(e){return new Promise((function(t){return setTimeout(t,e)}))}function re(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function oe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){re(u,r,o,i,a,"next",e)}function a(e){re(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function ie(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ue(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function ae(e){return function(e){if(Array.isArray(e))return ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ue(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 ue(e,t){if(e){if("string"==typeof e)return ce(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)?ce(e,t):void 0}}function ce(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 se(){return se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},se.apply(this,arguments)}function fe(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 le(e){return"string"==typeof e?new Request(e):e}function he(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ve(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function pe(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function de(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){pe(u,r,o,i,a,"next",e)}function a(e){pe(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function ye(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||ve(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 ve(e,t){if(e){if("string"==typeof e)return me(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)?me(e,t):void 0}}function me(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 be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(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 we(e){return we="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},we(e)}function _e(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||ke(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 ke(e,t){if(e){if("string"==typeof e)return Se(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)?Se(e,t):void 0}}function Se(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 je(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function Oe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){je(u,r,o,i,a,"next",e)}function a(e){je(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function xe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Te(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 Ie(e,t){return Ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ie(e,t)}function Ee(e){var t=function(){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}}();return function(){var n,r=Ae(e);if(t){var o=Ae(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pe(this,n)}}function Pe(e,t){if(t&&("object"===we(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ae(e){return Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ae(e)}function Re(){return Re=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Re.apply(this,arguments)}function De(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||Be(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 Ce(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function Ne(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){Ce(u,r,o,i,a,"next",e)}function a(e){Ce(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function qe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Be(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function $e(e){return function(e){if(Array.isArray(e))return Le(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Be(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 Be(e,t){if(e){if("string"==typeof e)return Le(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)?Le(e,t):void 0}}function Le(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 Me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ue(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 Fe(e){return function(e){if(Array.isArray(e))return Ke(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ke(e,t)}(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 Ke(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 We(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=function(){var n=o[r];t.some((function(e){return e.test(n)}))&&e.searchParams.delete(n)},r=0,o=Fe(e.searchParams.keys());r<o.length;r++)n();return e}function Ge(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ze(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function ze(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 He(e){return He="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},He(e)}function Je(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Qe(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 Ve(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 Xe(e,t){return Xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Xe(e,t)}function Ye(e){var t=function(){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}}();return function(){var n,r=et(e);if(t){var o=et(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ze(this,n)}}function Ze(e,t){if(t&&("object"===He(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function et(e){return et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},et(e)}function tt(e){return Vn().getCacheKeyForURL(e)}function nt(e,t){!function(e){Vn().precache(e)}(e),function(e){var t=Vn();I(new Xn(t,e))}(t)}function rt(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function ot(e){return ot="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},ot(e)}function it(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function at(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){it(u,r,o,i,a,"next",e)}function a(e){it(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function ut(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ct(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 st(e,t){return st=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},st(e,t)}function ft(e){var t=function(){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}}();return function(){var n,r=ht(e);if(t){var o=ht(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return lt(this,n)}}function lt(e,t){if(t&&("object"===ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ht(e){return ht=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ht(e)}function pt(e){return pt="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},pt(e)}function dt(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function yt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vt(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 mt(e,t){return mt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},mt(e,t)}function bt(e){var t=function(){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}}();return function(){var n,r=wt(e);if(t){var o=wt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return gt(this,n)}}function gt(e,t){if(t&&("object"===pt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function wt(e){return wt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wt(e)}function _t(e){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_t(e)}function kt(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function St(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jt(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 Ot(e,t){return Ot=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ot(e,t)}function xt(e){var t=function(){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}}();return function(){var n,r=It(e);if(t){var o=It(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Tt(this,n)}}function Tt(e,t){if(t&&("object"===_t(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function It(e){return It=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},It(e)}function Et(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pt(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 At(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function Rt(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 Dt(e,t,n){return t&&Rt(e.prototype,t),n&&Rt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ct(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Jn||(Jn=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(dr(this),n),qt(cr.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qt(e.apply(dr(this),n))}:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=e.call.apply(e,[dr(this),t].concat(r));return fr.set(i,t.sort?t.sort():[t]),qt(i)}}function Nt(e){return"function"==typeof e?Ct(e):(e instanceof IDBTransaction&&function(e){if(!sr.has(e)){var t=new Promise((function(t,n){var r=function(){e.removeEventListener("complete",o),e.removeEventListener("error",i),e.removeEventListener("abort",i)},o=function(){t(),r()},i=function(){n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",i),e.addEventListener("abort",i)}));sr.set(e,t)}}(e),t=e,(Hn||(Hn=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((function(e){return t instanceof e}))?new Proxy(e,pr):e);var t}function qt(e){if(e instanceof IDBRequest)return t=e,(n=new Promise((function(e,n){var r=function(){t.removeEventListener("success",o),t.removeEventListener("error",i)},o=function(){e(qt(t.result)),r()},i=function(){n(t.error),r()};t.addEventListener("success",o),t.addEventListener("error",i)}))).then((function(e){e instanceof IDBCursor&&cr.set(e,t)})).catch((function(){})),hr.set(n,t),n;var t,n;if(lr.has(e))return lr.get(e);var r=Nt(e);return r!==e&&(lr.set(e,r),hr.set(r,e)),r}function $t(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 Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$t(Object(n),!0).forEach((function(t){Lt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mt(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function Ut(e,t){if(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t){if(mr.get(t))return mr.get(t);var n=t.replace(/FromIndex$/,""),r=t!==n,o=vr.includes(n);if(n in(r?IDBIndex:IDBObjectStore).prototype&&(o||yr.includes(n))){var i=function(){var e,t=(e=function*(e){for(var t,i=this.transaction(e,o?"readwrite":"readonly"),a=i.store,u=arguments.length,c=new Array(u>1?u-1:0),s=1;s<u;s++)c[s-1]=arguments[s];return r&&(a=a.index(c.shift())),(yield Promise.all([(t=a)[n].apply(t,c),o&&i.done]))[0]},function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){Mt(u,r,o,i,a,"next",e)}function a(e){Mt(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))});return function(e){return t.apply(this,arguments)}}();return mr.set(t,i),i}}}function Ft(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function Kt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){Ft(u,r,o,i,a,"next",e)}function a(e){Ft(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function Wt(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 Gt(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function zt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){Gt(u,r,o,i,a,"next",e)}function a(e){Gt(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function Ht(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 Jt(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,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||Vt(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 Qt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Vt(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Vt(e,t){if(e){if("string"==typeof e)return Xt(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)?Xt(e,t):void 0}}function Xt(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 Yt(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function Zt(){return Zt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zt.apply(this,arguments)}function en(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 tn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return nn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function nn(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 rn(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function on(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){rn(u,r,o,i,a,"next",e)}function a(e){rn(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function an(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function un(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 cn(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function sn(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 fn(e,t,n){return t&&sn(e.prototype,t),n&&sn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ln(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function hn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){ln(u,r,o,i,a,"next",e)}function a(e){ln(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}function pn(){return(pn=hn((function*(){try{self.irisKey=yield wn.a.getItem("swIrisKey")}catch(e){console.error("error loading iris key",e)}return self.irisKey}))).apply(this,arguments)}function dn(e){return new Promise((function(t){e.waitUntil(self.clients.matchAll({type:"window",includeUncontrolled:!0}).then((function(e){for(var n=0;n<e.length;n++){var r=e[n];if(r.url===Rr&&"focus"in r)return t(r)}t(null)})))}))}n.r(t);var yn,vn,mn=n("/fks"),bn=n.n(mn),gn=n("XgYJ"),wn=n.n(gn),_n=(n("xgXd"),function(e){for(var t=e,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.length>0&&(t+=" :: ".concat(JSON.stringify(r))),t}),kn=function(e){function t(e,t){var n,r=_n(e,t);return(n=h.call(this,r)).name=e,n.details=t,n}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e);var n,r,a,u,l,h=(n=t,r=c(),function(){var e,t=f(n);if(r){var o=f(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});return a=t,u&&o(a.prototype,u),l&&o(a,l),Object.defineProperty(a,"prototype",{writable:!1}),a}(a(Error)),Sn=(n("I3Xu"),"GET"),jn=function(e){return e&&"object"===l(e)?e:{handle:e}},On=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Sn;h(this,e),this.handler=jn(n),this.match=t,this.method=r}var t,n,r;return t=e,(n=[{key:"setCatchHandler",value:function(e){this.catchHandler=jn(e)}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),xn=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);return i.call(this,(function(t){var n=t.url,r=e.exec(n.href);if(r&&(n.origin===location.origin||0===r.index))return r.slice(1)}),n,r)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e);var n,r,o,i=m(t);return n=t,r&&y(n.prototype,r),o&&y(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n}(On),Tn=function(e){return new URL(String(e),location.href).href.replace(new RegExp("^".concat(location.origin)),"")},In=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._routes=new Map,this._defaultHandlerMap=new Map}var t,n,r;return t=e,n=[{key:"routes",get:function(){return this._routes}},{key:"addFetchListener",value:function(){var e=this;self.addEventListener("fetch",(function(t){var n=e.handleRequest({request:t.request,event:t});n&&t.respondWith(n)}))}},{key:"addCacheListener",value:function(){var e=this;self.addEventListener("message",(function(t){if(t.data&&"CACHE_URLS"===t.data.type){var n=Promise.all(t.data.payload.urlsToCache.map((function(n){"string"==typeof n&&(n=[n]);var r=_(Request,j(n));return e.handleRequest({request:r,event:t})})));t.waitUntil(n),t.ports&&t.ports[0]&&n.then((function(){return t.ports[0].postMessage(!0)}))}}))}},{key:"handleRequest",value:function(e){var t=this,n=e.request,r=e.event,o=new URL(n.url,location.href);if(o.protocol.startsWith("http")){var i=o.origin===location.origin,a=this.findMatchingRoute({event:r,request:n,sameOrigin:i,url:o}),u=a.params,c=a.route,s=c&&c.handler,f=n.method;if(!s&&this._defaultHandlerMap.has(f)&&(s=this._defaultHandlerMap.get(f)),s){var l;try{l=s.handle({url:o,request:n,event:r,params:u})}catch(e){l=Promise.reject(e)}var h=c&&c.catchHandler;return l instanceof Promise&&(this._catchHandler||h)&&(l=l.catch(function(){var e,i=(e=function*(e){if(h)try{return yield h.handle({url:o,request:n,event:r,params:u})}catch(t){t instanceof Error&&(e=t)}if(t._catchHandler)return t._catchHandler.handle({url:o,request:n,event:r});throw e},function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){w(u,r,o,i,a,"next",e)}function a(e){w(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))});return function(e){return i.apply(this,arguments)}}())),l}}}},{key:"findMatchingRoute",value:function(e){var t,n=e.url,r=e.sameOrigin,o=e.request,i=e.event,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=O(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(this._routes.get(o.method)||[]);try{for(a.s();!(t=a.n()).done;){var u=t.value,c=void 0,s=u.match({url:n,sameOrigin:r,request:o,event:i});if(s)return c=s,(Array.isArray(c)&&0===c.length||s.constructor===Object&&0===Object.keys(s).length||"boolean"==typeof s)&&(c=void 0),{route:u,params:c}}}catch(e){a.e(e)}finally{a.f()}return{}}},{key:"setDefaultHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Sn;this._defaultHandlerMap.set(t,jn(e))}},{key:"setCatchHandler",value:function(e){this._catchHandler=jn(e)}},{key:"registerRoute",value:function(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}},{key:"unregisterRoute",value:function(e){if(!this._routes.has(e.method))throw new kn("unregister-route-but-not-found-with-method",{method:e.method});var t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new kn("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}],n&&T(t.prototype,n),r&&T(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),En=function(){return yn||((yn=new In).addFetchListener(),yn.addCacheListener()),yn},Pn={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},An=function(e){return[Pn.prefix,e,Pn.suffix].filter((function(e){return e&&e.length>0})).join("-")},Rn=function(e){return e||An(Pn.googleAnalytics)},Dn=function(e){return e||An(Pn.precache)},Cn=function(){return Pn.prefix},Nn=function(e){return e||An(Pn.runtime)},qn=function(){return Pn.suffix},$n=(n("Gpc1"),C((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=function(){var e=R((function*(e){var t=e.state;t&&(t.originalRequest=e.request)}));return function(t){return e.apply(this,arguments)}}(),this.cachedResponseWillBeUsed=function(){var e=R((function*(e){var n=e.state,r=e.cachedResponse;if("install"===e.event.type&&n&&n.originalRequest&&n.originalRequest instanceof Request){var o=n.originalRequest.url;r?t.notUpdatedURLs.push(o):t.updatedURLs.push(o)}return r}));return function(t){return e.apply(this,arguments)}}()}))),Bn=$((function e(t){var n=this,r=t.precacheController;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cacheKeyWillBeUsed=function(){var e,t=(e=function*(e){var t=e.request,r=e.params,o=(null==r?void 0:r.cacheKey)||n._precacheController.getCacheKeyForURL(t.url);return o?new Request(o,{headers:t.headers}):t},function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){N(u,r,o,i,a,"next",e)}function a(e){N(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))});return function(e){return t.apply(this,arguments)}}(),this._precacheController=r})),Ln=V((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))})),Mn=new Set,Un=(n("myed"),function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._cacheKeys={},se(this,n),this.event=n.event,this._strategy=t,this._handlerDeferred=new Ln,this._extendLifetimePromises=[],this._plugins=ae(t.plugins),this._pluginStateMap=new Map;var r,o=ie(this._plugins);try{for(o.s();!(r=o.n()).done;){this._pluginStateMap.set(r.value,{})}}catch(e){o.e(e)}finally{o.f()}this.event.waitUntil(this._handlerDeferred.promise)}var t,n,r,o,i,a,u,c,s,f;return t=e,n=[{key:"fetch",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=oe((function*(e){var t=this.event,n=le(e);if("navigate"===n.mode&&t instanceof FetchEvent&&t.preloadResponse){var r=yield t.preloadResponse;if(r)return r}var o=this.hasCallback("fetchDidFail")?n.clone():null;try{var i,a=ie(this.iterateCallbacks("requestWillFetch"));try{for(a.s();!(i=a.n()).done;){var u=i.value;n=yield u({request:n.clone(),event:t})}}catch(e){a.e(e)}finally{a.f()}}catch(e){if(e instanceof Error)throw new kn("plugin-error-request-will-fetch",{thrownErrorMessage:e.message})}var c=n.clone();try{var s;s=yield fetch(n,"navigate"===n.mode?void 0:this._strategy.fetchOptions);var f,l=ie(this.iterateCallbacks("fetchDidSucceed"));try{for(l.s();!(f=l.n()).done;){var h=f.value;s=yield h({event:t,request:c,response:s})}}catch(e){l.e(e)}finally{l.f()}return s}catch(e){throw o&&(yield this.runCallbacks("fetchDidFail",{error:e,event:t,originalRequest:o.clone(),request:c.clone()})),e}}));return function(t){return e.apply(this,arguments)}}())},{key:"fetchAndCachePut",value:(f=oe((function*(e){var t=yield this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t})),function(e){return f.apply(this,arguments)})},{key:"cacheMatch",value:(s=oe((function*(e){var t,n=le(e),r=this._strategy,o=r.cacheName,i=r.matchOptions,a=yield this.getCacheKey(n,"read"),u=se(se({},i),{cacheName:o});t=yield caches.match(a,u);var c,s=ie(this.iterateCallbacks("cachedResponseWillBeUsed"));try{for(s.s();!(c=s.n()).done;){var f=c.value;t=(yield f({cacheName:o,matchOptions:i,cachedResponse:t,request:a,event:this.event}))||void 0}}catch(e){s.e(e)}finally{s.f()}return t})),function(e){return s.apply(this,arguments)})},{key:"cachePut",value:(c=oe((function*(e,t){var n=le(e);yield ne(0);var r=yield this.getCacheKey(n,"write");if(!t)throw new kn("cache-put-with-no-response",{url:Tn(r.url)});var o=yield this._ensureResponseSafeToCache(t);if(!o)return!1;var i=this._strategy,a=i.cacheName,u=i.matchOptions,c=yield self.caches.open(a),s=this.hasCallback("cacheDidUpdate"),f=s?yield function(e,t,n,r){return J.apply(this,arguments)}(c,r.clone(),["__WB_REVISION__"],u):null;try{yield c.put(r,s?o.clone():o)}catch(e){if(e instanceof Error)throw"QuotaExceededError"===e.name&&(yield function(){return te.apply(this,arguments)}()),e}var l,h=ie(this.iterateCallbacks("cacheDidUpdate"));try{for(h.s();!(l=h.n()).done;){var p=l.value;yield p({cacheName:a,oldResponse:f,newResponse:o.clone(),request:r,event:this.event})}}catch(e){h.e(e)}finally{h.f()}return!0})),function(e,t){return c.apply(this,arguments)})},{key:"getCacheKey",value:(u=oe((function*(e,t){var n="".concat(e.url," | ").concat(t);if(!this._cacheKeys[n]){var r,o=e,i=ie(this.iterateCallbacks("cacheKeyWillBeUsed"));try{for(i.s();!(r=i.n()).done;){var a=r.value;o=le(yield a({mode:t,request:o,event:this.event,params:this.params}))}}catch(e){i.e(e)}finally{i.f()}this._cacheKeys[n]=o}return this._cacheKeys[n]})),function(e,t){return u.apply(this,arguments)})},{key:"hasCallback",value:function(e){var t,n=ie(this._strategy.plugins);try{for(n.s();!(t=n.n()).done;)if(e in t.value)return!0}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"runCallbacks",value:(a=oe((function*(e,t){var n,r=ie(this.iterateCallbacks(e));try{for(r.s();!(n=r.n()).done;){var o=n.value;yield o(t)}}catch(e){r.e(e)}finally{r.f()}})),function(e,t){return a.apply(this,arguments)})},{key:"iterateCallbacks",value:function*(e){var t,n=this,r=ie(this._strategy.plugins);try{var o=function*(){var r=t.value;if("function"==typeof r[e]){var o=n._pluginStateMap.get(r);yield function(t){var n=se(se({},t),{state:o});return r[e](n)}}};for(r.s();!(t=r.n()).done;)yield*o()}catch(e){r.e(e)}finally{r.f()}}},{key:"waitUntil",value:function(e){return this._extendLifetimePromises.push(e),e}},{key:"doneWaiting",value:(i=oe((function*(){for(var e;e=this._extendLifetimePromises.shift();)yield e})),function(){return i.apply(this,arguments)})},{key:"destroy",value:function(){this._handlerDeferred.resolve(null)}},{key:"_ensureResponseSafeToCache",value:(o=oe((function*(e){var t,n=e,r=!1,o=ie(this.iterateCallbacks("cacheWillUpdate"));try{for(o.s();!(t=o.n()).done;){var i=t.value;if(n=(yield i({request:this.request,response:n,event:this.event}))||void 0,r=!0,!n)break}}catch(e){o.e(e)}finally{o.f()}return r||n&&200!==n.status&&(n=void 0),n})),function(e){return o.apply(this,arguments)})}],n&&fe(t.prototype,n),r&&fe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()),Fn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};be(this,e),this.cacheName=Nn(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}var t,n,r,o,i;return t=e,n=[{key:"handle",value:function(e){return ye(this.handleAll(e),1)[0]}},{key:"handleAll",value:function(e){e instanceof FetchEvent&&(e={event:e,request:e.request});var t=e.event,n="string"==typeof e.request?new Request(e.request):e.request,r=new Un(this,{event:t,request:n,params:"params"in e?e.params:void 0}),o=this._getResponse(r,n,t);return[o,this._awaitComplete(o,r,n,t)]}},{key:"_getResponse",value:(i=de((function*(e,t,n){yield e.runCallbacks("handlerWillStart",{event:n,request:t});var r=void 0;try{if(!(r=yield this._handle(t,e))||"error"===r.type)throw new kn("no-response",{url:t.url})}catch(u){if(u instanceof Error){var o,i=he(e.iterateCallbacks("handlerDidError"));try{for(i.s();!(o=i.n()).done;){var a=o.value;if(r=yield a({error:u,event:n,request:t}))break}}catch(e){i.e(e)}finally{i.f()}}if(!r)throw u}var u,c=he(e.iterateCallbacks("handlerWillRespond"));try{for(c.s();!(u=c.n()).done;){var s=u.value;r=yield s({event:n,request:t,response:r})}}catch(e){c.e(e)}finally{c.f()}return r})),function(e,t,n){return i.apply(this,arguments)})},{key:"_awaitComplete",value:(o=de((function*(e,t,n,r){var o,i;try{o=yield e}catch(i){}try{yield t.runCallbacks("handlerDidRespond",{event:r,request:n,response:o}),yield t.doneWaiting()}catch(e){e instanceof Error&&(i=e)}if(yield t.runCallbacks("handlerDidComplete",{event:r,request:n,response:o,error:i}),t.destroy(),i)throw i})),function(e,t,n,r){return o.apply(this,arguments)})}],n&&ge(t.prototype,n),r&&ge(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Kn=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xe(this,t),n.cacheName=Dn(n.cacheName),(e=c.call(this,n))._fallbackToNetwork=!1!==n.fallbackToNetwork,e.plugins.push(t.copyRedirectedCacheableResponsesPlugin),e}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ie(e,t)}(t,e);var n,r,o,i,a,u,c=Ee(t);return n=t,r=[{key:"_handle",value:(u=Oe((function*(e,t){var n=yield t.cacheMatch(e);return n||(t.event&&"install"===t.event.type?yield this._handleInstall(e,t):yield this._handleFetch(e,t))})),function(e,t){return u.apply(this,arguments)})},{key:"_handleFetch",value:(a=Oe((function*(e,t){var n,r=t.params||{};if(!this._fallbackToNetwork)throw new kn("missing-precache-entry",{cacheName:this.cacheName,url:e.url});var o=r.integrity,i=e.integrity,a=!i||i===o;return n=yield t.fetch(new Request(e,{integrity:i||o})),o&&a&&(this._useDefaultCacheabilityPluginIfNeeded(),yield t.cachePut(e,n.clone())),n})),function(e,t){return a.apply(this,arguments)})},{key:"_handleInstall",value:(i=Oe((function*(e,t){this._useDefaultCacheabilityPluginIfNeeded();var n=yield t.fetch(e);if(!(yield t.cachePut(e,n.clone())))throw new kn("bad-precaching-response",{url:e.url,status:n.status});return n})),function(e,t){return i.apply(this,arguments)})},{key:"_useDefaultCacheabilityPluginIfNeeded",value:function(){var e,n=null,r=0,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ke(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(this.plugins.entries());try{for(o.s();!(e=o.n()).done;){var i=_e(e.value,2),a=i[1];a!==t.copyRedirectedCacheableResponsesPlugin&&(a===t.defaultPrecacheCacheabilityPlugin&&(n=i[0]),a.cacheWillUpdate&&r++)}}catch(e){o.e(e)}finally{o.f()}0===r?this.plugins.push(t.defaultPrecacheCacheabilityPlugin):r>1&&null!==n&&this.plugins.splice(n,1)}}],r&&Te(n.prototype,r),o&&Te(n,o),Object.defineProperty(n,"prototype",{writable:!1}),t}(Fn);Kn.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:function(e){return Oe((function*(){var t=e.response;return!t||t.status>=400?null:t}))()}},Kn.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:function(e){return Oe((function*(){var t=e.response;return t.redirected?yield function(e,t){return U.apply(this,arguments)}(t):t}))()}};var Wn,Gn,zn,Hn,Jn,Qn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.cacheName,r=t.plugins,o=void 0===r?[]:r,i=t.fallbackToNetwork,a=void 0===i||i;Me(this,e),this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new Kn({cacheName:Dn(n),plugins:[].concat($e(o),[new Bn({precacheController:this})]),fallbackToNetwork:a}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}var t,n,r,o;return t=e,n=[{key:"strategy",get:function(){return this._strategy}},{key:"precache",value:function(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}},{key:"addToCacheList",value:function(e){var t,n=[],r=qe(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;"string"==typeof o?n.push(o):o&&void 0===o.revision&&n.push(o.url);var i=P(o),a=i.cacheKey,u=i.url,c="string"!=typeof o&&o.revision?"reload":"default";if(this._urlsToCacheKeys.has(u)&&this._urlsToCacheKeys.get(u)!==a)throw new kn("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(u),secondEntry:a});if("string"!=typeof o&&o.integrity){if(this._cacheKeysToIntegrities.has(a)&&this._cacheKeysToIntegrities.get(a)!==o.integrity)throw new kn("add-to-cache-list-conflicting-integrities",{url:u});this._cacheKeysToIntegrities.set(a,o.integrity)}if(this._urlsToCacheKeys.set(u,a),this._urlsToCacheModes.set(u,c),n.length>0){var s="Workbox is precaching URLs without revision "+"info: ".concat(n.join(", "),"\nThis is generally NOT safe. ")+"Learn more at https://bit.ly/wb-precache";console.warn(s)}}}catch(e){r.e(e)}finally{r.f()}}},{key:"install",value:function(e){var t=this;return E(e,Ne((function*(){var n=new $n;t.strategy.plugins.push(n);var r,o=qe(t._urlsToCacheKeys);try{for(o.s();!(r=o.n()).done;){var i=De(r.value,2),a=i[0],u=i[1],c=t._cacheKeysToIntegrities.get(u),s=t._urlsToCacheModes.get(a),f=new Request(a,{integrity:c,cache:s,credentials:"same-origin"});yield Promise.all(t.strategy.handleAll({params:{cacheKey:u},request:f,event:e}))}}catch(e){o.e(e)}finally{o.f()}return{updatedURLs:n.updatedURLs,notUpdatedURLs:n.notUpdatedURLs}})))}},{key:"activate",value:function(e){var t=this;return E(e,Ne((function*(){var e,n=yield self.caches.open(t.strategy.cacheName),r=yield n.keys(),o=new Set(t._urlsToCacheKeys.values()),i=[],a=qe(r);try{for(a.s();!(e=a.n()).done;){var u=e.value;o.has(u.url)||(yield n.delete(u),i.push(u.url))}}catch(e){a.e(e)}finally{a.f()}return{deletedURLs:i}})))}},{key:"getURLsToCacheKeys",value:function(){return this._urlsToCacheKeys}},{key:"getCachedURLs",value:function(){return $e(this._urlsToCacheKeys.keys())}},{key:"getCacheKeyForURL",value:function(e){var t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}},{key:"getIntegrityForCacheKey",value:function(e){return this._cacheKeysToIntegrities.get(e)}},{key:"matchPrecache",value:(o=Ne((function*(e){var t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(yield self.caches.open(this.strategy.cacheName)).match(n)})),function(e){return o.apply(this,arguments)})},{key:"createHandlerBoundToURL",value:function(e){var t=this,n=this.getCacheKeyForURL(e);if(!n)throw new kn("non-precached-url",{url:e});return function(r){return r.request=new Request(e),r.params=Re({cacheKey:n},r.params),t.strategy.handle(r)}}}],n&&Ue(t.prototype,n),r&&Ue(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Vn=function(){return Wn||(Wn=new Qn),Wn},Xn=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);return i.call(this,(function(t){var r,o=t.request,i=e.getURLsToCacheKeys(),a=Je(function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.ignoreURLParametersMatching,r=void 0===n?[/^utm_/,/^fbclid$/]:n,o=t.directoryIndex,i=void 0===o?"index.html":o,a=t.cleanURLs,u=void 0===a||a,c=t.urlManipulation,s=new URL(e,location.href);s.hash="",yield s.href;var f=We(s,r);if(yield f.href,i&&f.pathname.endsWith("/")){var l=new URL(f.href);l.pathname+=i,yield l.href}if(u){var h=new URL(f.href);h.pathname+=".html",yield h.href}if(c){var p,d=Ge(c({url:s}));try{for(d.s();!(p=d.n()).done;){var y=p.value;yield y.href}}catch(e){d.e(e)}finally{d.f()}}}(o.url,n));try{for(a.s();!(r=a.n()).done;){var u=i.get(r.value);if(u)return{cacheKey:u,integrity:e.getIntegrityForCacheKey(u)}}}catch(e){a.e(e)}finally{a.f()}}),e.strategy)}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xe(e,t)}(t,e);var n,r,o,i=Ye(t);return n=t,r&&Ve(n.prototype,r),o&&Ve(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n}(On),Yn=function(e){return"navigate"===e.request.mode},Zn={cacheWillUpdate:(Gn=function*(e){var t=e.response;return 200===t.status||0===t.status?t:null},zn=function(){var e=this,t=arguments;return new Promise((function(n,r){function o(e){rt(a,n,r,o,i,"next",e)}function i(e){rt(a,n,r,o,i,"throw",e)}var a=Gn.apply(e,t);o(void 0)}))},function(){return zn.apply(this,arguments)})},er=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ut(this,t),(e=u.call(this,n)).plugins.some((function(e){return"cacheWillUpdate"in e}))||e.plugins.unshift(Zn),e._networkTimeoutSeconds=n.networkTimeoutSeconds||0,e}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&st(e,t)}(t,e);var n,r,o,i,a,u=ft(t);return n=t,r=[{key:"_handle",value:(a=at((function*(e,t){var n,r=[],o=[];if(this._networkTimeoutSeconds){var i=this._getTimeoutPromise({request:e,logs:r,handler:t});n=i.id,o.push(i.promise)}var a=this._getNetworkPromise({timeoutId:n,request:e,logs:r,handler:t});o.push(a);var u=yield t.waitUntil(at((function*(){return(yield t.waitUntil(Promise.race(o)))||(yield a)}))());if(!u)throw new kn("no-response",{url:e.url});return u})),function(e,t){return a.apply(this,arguments)})},{key:"_getTimeoutPromise",value:function(e){var t,n=this,r=e.request,o=e.handler,i=new Promise((function(e){var i=function(){var t=at((function*(){e(yield o.cacheMatch(r))}));return function(){return t.apply(this,arguments)}}();t=setTimeout(i,1e3*n._networkTimeoutSeconds)}));return{promise:i,id:t}}},{key:"_getNetworkPromise",value:(i=at((function*(e){var t,n,r=e.timeoutId,o=e.request,i=e.handler;try{n=yield i.fetchAndCachePut(o)}catch(e){e instanceof Error&&(t=e)}return r&&clearTimeout(r),!t&&n||(n=yield i.cacheMatch(o)),n})),function(e){return i.apply(this,arguments)})}],r&&ct(n.prototype,r),o&&ct(n,o),Object.defineProperty(n,"prototype",{writable:!1}),t}(Fn),tr=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return yt(this,t),(e=a.call(this,n))._networkTimeoutSeconds=n.networkTimeoutSeconds||0,e}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mt(e,t)}(t,e);var n,r,o,i,a=bt(t);return n=t,r=[{key:"_handle",value:(i=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){dt(u,r,o,i,a,"next",e)}function a(e){dt(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}((function*(e,t){var n,r=void 0;try{var o=[t.fetch(e)];if(this._networkTimeoutSeconds){var i=ne(1e3*this._networkTimeoutSeconds);o.push(i)}if(!(n=yield Promise.race(o)))throw new Error("Timed out the network response after "+"".concat(this._networkTimeoutSeconds," seconds."))}catch(e){e instanceof Error&&(r=e)}if(!n)throw new kn("no-response",{url:e.url,error:r});return n})),function(e,t){return i.apply(this,arguments)})}],r&&vt(n.prototype,r),o&&vt(n,o),Object.defineProperty(n,"prototype",{writable:!1}),t}(Fn),nr=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return St(this,t),(e=a.call(this,n)).plugins.some((function(e){return"cacheWillUpdate"in e}))||e.plugins.unshift(Zn),e}!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ot(e,t)}(t,e);var n,r,o,i,a=xt(t);return n=t,r=[{key:"_handle",value:(i=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){kt(u,r,o,i,a,"next",e)}function a(e){kt(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}((function*(e,t){var n,r=t.fetchAndCachePut(e).catch((function(){})),o=yield t.cacheMatch(e);if(o);else try{o=yield r}catch(e){e instanceof Error&&(n=e)}if(!o)throw new kn("no-response",{url:e.url,error:n});return o})),function(e,t){return i.apply(this,arguments)})}],r&&jt(n.prototype,r),o&&jt(n,o),Object.defineProperty(n,"prototype",{writable:!1}),t}(Fn),rr={get googleAnalytics(){return Rn()},get precache(){return Dn()},get prefix(){return Cn()},get runtime(){return Nn()},get suffix(){return qn()}},or=(n("2Gk3"),function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Et(this,e),this._statuses=t.statuses,this._headers=t.headers}var t,n,r;return t=e,(n=[{key:"isResponseCacheable",value:function(e){var t=this,n=!0;return this._statuses&&(n=this._statuses.includes(e.status)),this._headers&&n&&(n=Object.keys(this._headers).some((function(n){return e.headers.get(n)===t._headers[n]}))),n}}])&&Pt(t.prototype,n),r&&Pt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()),ir=Dt((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cacheWillUpdate=function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){At(u,r,o,i,a,"next",e)}function a(e){At(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}((function*(e){var t=e.response;return n._cacheableResponse.isResponseCacheable(t)?t:null}));return function(t){return e.apply(this,arguments)}}(),this._cacheableResponse=new or(t)})),ar={},ur=new er({cacheName:rr.precache,networkTimeoutSeconds:5,plugins:[new ir({statuses:[200]})]}),cr=new WeakMap,sr=new WeakMap,fr=new WeakMap,lr=new WeakMap,hr=new WeakMap,pr={get:function(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return sr.get(e);if("objectStoreNames"===t)return e.objectStoreNames||fr.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return qt(e[t])},set:function(e,t,n){return e[t]=n,!0},has:function(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}},dr=function(e){return hr.get(e)},yr=["get","getKey","getAll","getAllKeys","count"],vr=["put","add","delete","clear"],mr=new Map;pr=function(e){return Bt(Bt({},e),{},{get:function(t,n,r){return Ut(t,n)||e.get(t,n,r)},has:function(t,n){return!!Ut(t,n)||e.has(t,n)}})}(pr);n("snVQ");var br,gr="requests",wr="queueName",_r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._db=null}var t,n,r,o,i,a,u,c,s,f,l,h;return t=e,n=[{key:"addEntry",value:(h=Kt((function*(e){var t=(yield this.getDb()).transaction(gr,"readwrite",{durability:"relaxed"});yield t.store.add(e),yield t.done})),function(e){return h.apply(this,arguments)})},{key:"getFirstEntryId",value:(l=Kt((function*(){var e=yield this.getDb(),t=yield e.transaction(gr).store.openCursor();return null==t?void 0:t.value.id})),function(){return l.apply(this,arguments)})},{key:"getAllEntriesByQueueName",value:(f=Kt((function*(e){var t=yield this.getDb(),n=yield t.getAllFromIndex(gr,wr,IDBKeyRange.only(e));return n||new Array})),function(e){return f.apply(this,arguments)})},{key:"getEntryCountByQueueName",value:(s=Kt((function*(e){return(yield this.getDb()).countFromIndex(gr,wr,IDBKeyRange.only(e))})),function(e){return s.apply(this,arguments)})},{key:"deleteEntry",value:(c=Kt((function*(e){var t=yield this.getDb();yield t.delete(gr,e)})),function(e){return c.apply(this,arguments)})},{key:"getFirstEntryByQueueName",value:(u=Kt((function*(e){return yield this.getEndEntryFromIndex(IDBKeyRange.only(e),"next")})),function(e){return u.apply(this,arguments)})},{key:"getLastEntryByQueueName",value:(a=Kt((function*(e){return yield this.getEndEntryFromIndex(IDBKeyRange.only(e),"prev")})),function(e){return a.apply(this,arguments)})},{key:"getEndEntryFromIndex",value:(i=Kt((function*(e,t){var n=yield this.getDb(),r=yield n.transaction(gr).store.index(wr).openCursor(e,t);return null==r?void 0:r.value})),function(e,t){return i.apply(this,arguments)})},{key:"getDb",value:(o=Kt((function*(){return this._db||(this._db=yield function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.blocked,o=n.upgrade,i=n.blocking,a=n.terminated,u=indexedDB.open(e,t),c=qt(u);return o&&u.addEventListener("upgradeneeded",(function(e){o(qt(u.result),e.oldVersion,e.newVersion,qt(u.transaction))})),r&&u.addEventListener("blocked",(function(){return r()})),c.then((function(e){a&&e.addEventListener("close",(function(){return a()})),i&&e.addEventListener("versionchange",(function(){return i()}))})).catch((function(){})),c}("workbox-background-sync",3,{upgrade:this._upgradeDb})),this._db})),function(){return o.apply(this,arguments)})},{key:"_upgradeDb",value:function(e,t){t>0&&t<3&&e.objectStoreNames.contains(gr)&&e.deleteObjectStore(gr),e.createObjectStore(gr,{autoIncrement:!0,keyPath:"id"}).createIndex(wr,wr,{unique:!1})}}],n&&Wt(t.prototype,n),r&&Wt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),kr=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._queueName=t,this._queueDb=new _r}var t,n,r,o,i,a,u,c,s,f,l;return t=e,n=[{key:"pushEntry",value:(l=zt((function*(e){delete e.id,e.queueName=this._queueName,yield this._queueDb.addEntry(e)})),function(e){return l.apply(this,arguments)})},{key:"unshiftEntry",value:(f=zt((function*(e){var t=yield this._queueDb.getFirstEntryId();t?e.id=t-1:delete e.id,e.queueName=this._queueName,yield this._queueDb.addEntry(e)})),function(e){return f.apply(this,arguments)})},{key:"popEntry",value:(s=zt((function*(){return this._removeEntry(yield this._queueDb.getLastEntryByQueueName(this._queueName))})),function(){return s.apply(this,arguments)})},{key:"shiftEntry",value:(c=zt((function*(){return this._removeEntry(yield this._queueDb.getFirstEntryByQueueName(this._queueName))})),function(){return c.apply(this,arguments)})},{key:"getAll",value:(u=zt((function*(){return yield this._queueDb.getAllEntriesByQueueName(this._queueName)})),function(){return u.apply(this,arguments)})},{key:"size",value:(a=zt((function*(){return yield this._queueDb.getEntryCountByQueueName(this._queueName)})),function(){return a.apply(this,arguments)})},{key:"deleteEntry",value:(i=zt((function*(e){yield this._queueDb.deleteEntry(e)})),function(e){return i.apply(this,arguments)})},{key:"_removeEntry",value:(o=zt((function*(e){return e&&(yield this.deleteEntry(e.id)),e})),function(e){return o.apply(this,arguments)})}],n&&Ht(t.prototype,n),r&&Ht(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Sr=["method","referrer","referrerPolicy","mode","credentials","cache","redirect","integrity","keepalive"],jr=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"navigate"===t.mode&&(t.mode="same-origin"),this._requestData=t}var t,n,r,o;return t=e,n=[{key:"toObject",value:function(){var e=Zt({},this._requestData);return e.headers=Zt({},this._requestData.headers),e.body&&(e.body=e.body.slice(0)),e}},{key:"toRequest",value:function(){return new Request(this._requestData.url,this._requestData)}},{key:"clone",value:function(){return new e(this.toObject())}}],r=[{key:"fromRequest",value:(o=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){Yt(u,r,o,i,a,"next",e)}function a(e){Yt(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}((function*(t){var n={url:t.url,headers:{}};"GET"!==t.method&&(n.body=yield t.clone().arrayBuffer());var r,o=Qt(t.headers.entries());try{for(o.s();!(r=o.n()).done;){var i=Jt(r.value,2);n.headers[i[0]]=i[1]}}catch(e){o.e(e)}finally{o.f()}var a,u=Qt(Sr);try{for(u.s();!(a=u.n()).done;){var c=a.value;void 0!==t[c]&&(n[c]=t[c])}}catch(e){u.e(e)}finally{u.f()}return new e(n)})),function(e){return o.apply(this,arguments)})}],n&&en(t.prototype,n),r&&en(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Or="workbox-background-sync",xr=new Set,Tr=function(e){var t={request:new jr(e.requestData).toRequest(),timestamp:e.timestamp};return e.metadata&&(t.metadata=e.metadata),t},Ir=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.onSync,o=n.maxRetentionTime;if(an(this,e),this._syncInProgress=!1,this._requestsAddedDuringSync=!1,xr.has(t))throw new kn("duplicate-queue-name",{name:t});xr.add(t),this._name=t,this._onSync=r||this.replayRequests,this._maxRetentionTime=o||10080,this._queueStore=new kr(this._name),this._addSyncListener()}var t,n,r,o,i,a,u,c,s,f,l,h,p;return t=e,n=[{key:"name",get:function(){return this._name}},{key:"pushRequest",value:(p=on((function*(e){yield this._addRequest(e,"push")})),function(e){return p.apply(this,arguments)})},{key:"unshiftRequest",value:(h=on((function*(e){yield this._addRequest(e,"unshift")})),function(e){return h.apply(this,arguments)})},{key:"popRequest",value:(l=on((function*(){return this._removeRequest("pop")})),function(){return l.apply(this,arguments)})},{key:"shiftRequest",value:(f=on((function*(){return this._removeRequest("shift")})),function(){return f.apply(this,arguments)})},{key:"getAll",value:(s=on((function*(){var e,t=yield this._queueStore.getAll(),n=Date.now(),r=[],o=tn(t);try{for(o.s();!(e=o.n()).done;){var i=e.value;n-i.timestamp>60*this._maxRetentionTime*1e3?yield this._queueStore.deleteEntry(i.id):r.push(Tr(i))}}catch(e){o.e(e)}finally{o.f()}return r})),function(){return s.apply(this,arguments)})},{key:"size",value:(c=on((function*(){return yield this._queueStore.size()})),function(){return c.apply(this,arguments)})},{key:"_addRequest",value:(u=on((function*(e,t){var n=e.request,r=e.metadata,o=e.timestamp,i=void 0===o?Date.now():o,a={requestData:(yield jr.fromRequest(n.clone())).toObject(),timestamp:i};r&&(a.metadata=r),yield this._queueStore["".concat(t,"Entry")](a),this._syncInProgress?this._requestsAddedDuringSync=!0:yield this.registerSync()})),function(e,t){return u.apply(this,arguments)})},{key:"_removeRequest",value:(a=on((function*(e){var t=Date.now(),n=yield this._queueStore["".concat(e,"Entry")]();return n?t-n.timestamp>60*this._maxRetentionTime*1e3?this._removeRequest(e):Tr(n):void 0})),function(e){return a.apply(this,arguments)})},{key:"replayRequests",value:(i=on((function*(){for(var e;e=yield this.shiftRequest();)try{yield fetch(e.request.clone())}catch(t){throw yield this.unshiftRequest(e),new kn("queue-replay-failed",{name:this._name})}})),function(){return i.apply(this,arguments)})},{key:"registerSync",value:(o=on((function*(){if("sync"in self.registration)try{yield self.registration.sync.register("".concat(Or,":").concat(this._name))}catch(e){}})),function(){return o.apply(this,arguments)})},{key:"_addSyncListener",value:function(){var e=this;"sync"in self.registration?self.addEventListener("sync",(function(t){if(t.tag==="".concat(Or,":").concat(e._name)){var n=function(){var n=on((function*(){var n;e._syncInProgress=!0;try{yield e._onSync({queue:e})}catch(e){if(e instanceof Error)throw n=e}finally{!e._requestsAddedDuringSync||n&&!t.lastChance||(yield e.registerSync()),e._syncInProgress=!1,e._requestsAddedDuringSync=!1}}));return function(){return n.apply(this,arguments)}}();t.waitUntil(n())}})):this._onSync({queue:this})}}],r=[{key:"_queueNames",get:function(){return xr}}],n&&un(t.prototype,n),r&&un(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Er=fn((function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.fetchDidFail=function(){var e=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){function i(e){cn(u,r,o,i,a,"next",e)}function a(e){cn(u,r,o,i,a,"throw",e)}var u=e.apply(t,n);i(void 0)}))}}((function*(e){var t=e.request;yield r._queue.pushRequest({request:t})}));return function(t){return e.apply(this,arguments)}}(),this._queue=new Ir(t,n)}));I("https://iris-notifications.herokuapp.com/notify",new tr({plugins:[new Er("apiRequests",{maxRetentionTime:20160})]}),"POST"),I("/peer_id",new tr),I((function(){return!0}),new nr),I((function(e){return Yn(e.event)}),ur),br=function(e){return Yn(e.event)?caches.match(tt("/200.html")||tt("/index.html")):Response.error()},En().setCatchHandler(br);var Pr,Ar=[{'revision':null,'url':'/0.chunk.ba205.js'},{'revision':null,'url':'/1.chunk.6f499.js'},{'revision':null,'url':'/18b4828d137eb80f413ee09473531ade.png'},{'revision':null,'url':'/2.chunk.68b63.js'},{'revision':'2aa61275988750e4d8754f7597888f28','url':'/200.html'},{'revision':null,'url':'/3f213087732422818ea1f7bfc2345c5a.png'},{'revision':null,'url':'/5.chunk.ef5a2.js'},{'revision':null,'url':'/6.chunk.a7a11.js'},{'revision':null,'url':'/64413ad8a360f3c2887cac7dccb470a9.png'},{'revision':null,'url':'/7.chunk.6f5d6.js'},{'revision':null,'url':'/8.chunk.29094.js'},{'revision':null,'url':'/9.chunk.dcf87.js'},{'revision':'662b71a7eb613da993b40f3f9ff7ae1e','url':'/assets/img/android-chrome-192x192.png'},{'revision':'35fa5945c1c6ab6d6e4799417f3ff245','url':'/assets/img/android-chrome-512x512.png'},{'revision':'e8878f49d45e78047676474d32cc4e0e','url':'/assets/img/apple-touch-icon.png'},{'revision':'deb2b1970c7c43f466d6aa39595cee92','url':'/assets/img/cover.jpg'},{'revision':'319faf8bf7254dcca33b19ccd4d97543','url':'/assets/img/favicon-16x16.png'},{'revision':'c9017787c1751c74f5af84579556ee19','url':'/assets/img/favicon-32x32.png'},{'revision':'5df75c3f1ea3575cc2d8e0175c3894c2','url':'/assets/img/gun-48x48.png'},{'revision':'412c0cd4676de5dc3da76dcd1f520901','url':'/assets/img/gun-chat.jpg'},{'revision':'30eb44025c5db825c99420258966dc12','url':'/assets/img/gun-og-image.png'},{'revision':'21ec1dc8e61ee5184d615dc3aef05ea2','url':'/assets/img/heart.png'},{'revision':'cd4b639792aff1dda21074a87526e54f','url':'/assets/img/herokubutton.svg'},{'revision':'f55e7713578bc8872424b567c823e7a3','url':'/assets/img/icon128.png'},{'revision':'db98a109715d43f009658d5d38ca3332','url':'/assets/img/mstile-150x150.png'},{'revision':'92dd9d4897e9e99528f95edaab0424a5','url':'/assets/img/safari-pinned-tab.svg'},{'revision':'bfaeb12da15414139b27bd376a8b81c3','url':'/assets/img/screenshot.png'},{'revision':'76e0ec7ef106385808d1aea76f8f1618','url':'/assets/img/space-game.jpg'},{'revision':null,'url':'/bundle.0f186.css'},{'revision':null,'url':'/bundle.527da.js'},{'revision':null,'url':'/polyfills.9f389.js'}];nt(Ar,Pr||ar);var Rr=new URL("/",self.location.origin).href;self.onmessage=function(e){Object.prototype.hasOwnProperty.call(e,"key")&&(self.irisKey=e.data.key,wn.a.setItem("swIrisKey",self.irisKey))},self.addEventListener("push",function(){var e=hn((function*(e){var t=yield dn(e);if(!t||"visible"!==t.visibilityState){self.irisKey||(yield function(){return pn.apply(this,arguments)}());var n=e.data.json();if(n.title&&n.body||console.log("what?",n),console.log("sw push",n),self.irisKey&&n.from&&n.from.epub){var r=yield bn.a.SEA.secret(n.from.epub,self.irisKey);n.title=yield bn.a.SEA.decrypt(n.title,r),n.body=yield bn.a.SEA.decrypt(n.body,r)}n.title&&0===n.title.indexOf("SEA{")&&(n.title="",n.body="Encrypted message"),self.registration.showNotification(n.title||"No title",{body:n.body||"No text",icon:"/assets/img/icon128.png"})}}));return function(t){return e.apply(this,arguments)}}()),self.addEventListener("notificationclick",function(){var e=hn((function*(e){e.notification.close();var t=yield dn(e);t?t.focus():self.clients.openWindow&&self.clients.openWindow(Rr)}));return function(t){return e.apply(this,arguments)}}())},Gpc1:function(){"use strict";try{self["workbox:precaching:6.4.1"]&&_()}catch(e){}},I3Xu:function(){"use strict";try{self["workbox:routing:6.4.1"]&&_()}catch(e){}},KNIt:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,e.exports=t,t.id="KNIt"},RoC8:function(e){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},XgYJ:function(e,t,n){(function(n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var o,i,a;a=function(){return function e(t,n,r){function o(a){if(!n[a]){if(!t[a]){if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return o(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var i=!1,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t){(function(e){"use strict";function n(){s=!0;for(var e,t,n=f.length;n;){for(t=f,f=[],e=-1;++e<n;)t[e]();n=f.length}s=!1}var r,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,a=new o(n),u=e.document.createTextNode("");a.observe(u,{characterData:!0}),r=function(){u.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){n(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(n,0)};else{var c=new e.MessageChannel;c.port1.onmessage=n,r=function(){c.port2.postMessage(0)}}var s,f=[];t.exports=function(e){1!==f.push(e)||s||r()}}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t){"use strict";function n(){}function o(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,e!==n&&c(this,e)}function i(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function a(e,t,n){f((function(){var r;try{r=t(n)}catch(t){return l.reject(e,t)}r===e?l.reject(e,new TypeError("Cannot resolve promise with itself")):l.resolve(e,r)}))}function u(e){var t=e&&e.then;if(e&&("object"==r(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function c(e,t){function n(t){o||(o=!0,l.reject(e,t))}function r(t){o||(o=!0,l.resolve(e,t))}var o=!1,i=s((function(){t(r,n)}));"error"===i.status&&n(i.value)}function s(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}var f=e(1),l={},h=["REJECTED"],p=["FULFILLED"],d=["PENDING"];t.exports=o,o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){if("function"!=typeof e&&this.state===p||"function"!=typeof t&&this.state===h)return this;var r=new this.constructor(n);return this.state!==d?a(r,this.state===p?e:t,this.outcome):this.queue.push(new i(r,e,t)),r},i.prototype.callFulfilled=function(e){l.resolve(this.promise,e)},i.prototype.otherCallFulfilled=function(e){a(this.promise,this.onFulfilled,e)},i.prototype.callRejected=function(e){l.reject(this.promise,e)},i.prototype.otherCallRejected=function(e){a(this.promise,this.onRejected,e)},l.resolve=function(e,t){var n=s(u,t);if("error"===n.status)return l.reject(e,n.value);var r=n.value;if(r)c(e,r);else{e.state=p,e.outcome=t;for(var o=-1,i=e.queue.length;++o<i;)e.queue[o].callFulfilled(t)}return e},l.reject=function(e,t){e.state=h,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},o.resolve=function(e){return e instanceof this?e:l.resolve(new this(n),e)},o.reject=function(e){var t=new this(n);return l.reject(t,e)},o.all=function(e){function t(e,t){r.resolve(e).then((function(e){a[t]=e,++u!==o||i||(i=!0,l.resolve(s,a))}),(function(e){i||(i=!0,l.reject(s,e))}))}var r=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var o=e.length,i=!1;if(!o)return this.resolve([]);for(var a=new Array(o),u=0,c=-1,s=new this(n);++c<o;)t(e[c],c);return s},o.race=function(e){function t(e){r.resolve(e).then((function(e){i||(i=!0,l.resolve(u,e))}),(function(e){i||(i=!0,l.reject(u,e))}))}var r=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var o=e.length,i=!1;if(!o)return this.resolve([]);for(var a=-1,u=new this(n);++a<o;)t(e[a]);return u}},{1:1}],3:[function(e){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t){"use strict";function n(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(o){if("TypeError"!==o.name)throw o;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}function o(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function i(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function a(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function u(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}function c(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=0;o<t;o++)r[o]=e.charCodeAt(o);return n}function s(e){return"boolean"==typeof N?D.resolve(N):function(e){return new D((function(t){var r=e.transaction(C,L),o=n([""]);r.objectStore(C).put(o,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return N=e}))}function f(e){var t=q[e.name],n={};n.promise=new D((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady=t.dbReady?t.dbReady.then((function(){return n.promise})):n.promise}function l(e){var t=q[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function h(e,t){var n=q[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function p(e,t){return new D((function(n,r){if(q[e.name]=q[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return n(e.db);f(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var i=R.open.apply(R,o);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(C)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),r(i.error)},i.onsuccess=function(){n(i.result),l(e)}}))}function d(e){return p(e,!1)}function y(e){return p(e,!0)}function v(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version>e.db.version;if(e.version<e.db.version&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),r||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function m(e){return n([c(atob(e.data))],{type:e.type})}function b(e){return e&&e.__local_forage_encoded_blob}function g(e){var t=this,n=t._initReady().then((function(){var e=q[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return i(n,e,e),n}function w(e,t,n,r){void 0===r&&(r=1);try{var o=e.db.transaction(e.storeName,t);n(null,o)}catch(o){if(r>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return D.resolve().then((function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),y(e)})).then((function(){return function(e){f(e);for(var t=q[e.name],n=t.forages,r=0;r<n.length;r++){var o=n[r];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return e.db=null,d(e).then((function(t){return e.db=t,v(e)?y(e):t})).then((function(r){e.db=t.db=r;for(var o=0;o<n.length;o++)n[o]._dbInfo.db=r})).catch((function(t){throw h(e,t),t}))}(e).then((function(){w(e,t,n,r-1)}))})).catch(n);n(o)}}function _(e){var t,n,r,o,i,a=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var s=new ArrayBuffer(a),f=new Uint8Array(s);for(t=0;t<u;t+=4)n=U.indexOf(e[t]),r=U.indexOf(e[t+1]),o=U.indexOf(e[t+2]),i=U.indexOf(e[t+3]),f[c++]=n<<2|r>>4,f[c++]=(15&r)<<4|o>>2,f[c++]=(3&o)<<6|63&i;return s}function k(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=U[n[t]>>2],r+=U[(3&n[t])<<4|n[t+1]>>4],r+=U[(15&n[t+1])<<2|n[t+2]>>6],r+=U[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}function S(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function j(e,t,n,r,o,i){e.executeSql(n,r,o,(function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,u){u.rows.length?i(e,a):S(e,t,(function(){e.executeSql(n,r,o,i)}),i)}),i):i(e,a)}),i)}function O(e,t,n,r){var i=this;e=a(e);var u=new D((function(o,a){i.ready().then((function(){void 0===t&&(t=null);var u=t,c=i._dbInfo;c.serializer.serialize(t,(function(t,s){s?a(s):c.db.transaction((function(n){j(n,c,"INSERT OR REPLACE INTO "+c.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(u)}),(function(e,t){a(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void o(O.apply(i,[e,u,n,r-1]));a(t)}}))}))})).catch(a)}));return o(u,n),u}function x(e){return new D((function(t,n){e.transaction((function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var o=[],i=0;i<r.rows.length;i++)o.push(r.rows.item(i).name);t({db:e,storeNames:o})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}function T(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function I(){return!function(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}()||localStorage.length>0}function E(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function P(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(arguments[0][n]=fe(t[n])?t[n].slice():t[n])}return arguments[0]}var A="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},R=function(){try{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}catch(e){return}}();"undefined"==typeof Promise&&e(3);var D=Promise,C="local-forage-detect-blob-support",N=void 0,q={},$=Object.prototype.toString,B="readonly",L="readwrite",M={_driver:"asyncStorage",_initStorage:function(e){function t(){return D.resolve()}var n=this,r={db:null};if(e)for(var o in e)r[o]=e[o];var i=q[r.name];i||(q[r.name]=i={forages:[],db:null,dbReady:null,deferredOperations:[]}),i.forages.push(n),n._initReady||(n._initReady=n.ready,n.ready=g);for(var a=[],u=0;u<i.forages.length;u++){var c=i.forages[u];c!==n&&a.push(c._initReady().catch(t))}var s=i.forages.slice(0);return D.all(a).then((function(){return r.db=i.db,d(r)})).then((function(e){return r.db=e,v(r,n._defaultConfig.version)?y(r):e})).then((function(e){r.db=i.db=e,n._dbInfo=r;for(var t=0;t<s.length;t++){var o=s[t];o!==n&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))},_support:function(){try{if(!R||!R.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=new D((function(t,r){n.ready().then((function(){w(n._dbInfo,B,(function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).openCursor(),u=1;a.onsuccess=function(){var n=a.result;if(n){var r=n.value;b(r)&&(r=m(r));var o=e(r,n.key,u++);void 0!==o?t(o):n.continue()}else t()},a.onerror=function(){r(a.error)}}catch(e){r(e)}}))})).catch(r)}));return o(r,t),r},getItem:function(e,t){var n=this;e=a(e);var r=new D((function(t,r){n.ready().then((function(){w(n._dbInfo,B,(function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),b(e)&&(e=m(e)),t(e)},a.onerror=function(){r(a.error)}}catch(e){r(e)}}))})).catch(r)}));return o(r,t),r},setItem:function(e,t,n){var r=this;e=a(e);var i=new D((function(n,o){var i;r.ready().then((function(){return i=r._dbInfo,"[object Blob]"===$.call(t)?s(i.db).then((function(e){return e?t:function(e){return new D((function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)}))}(t)})):t})).then((function(t){w(r._dbInfo,L,(function(i,a){if(i)return o(i);try{var u=a.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var c=u.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),n(t)},a.onabort=a.onerror=function(){o(c.error?c.error:c.transaction.error)}}catch(e){o(e)}}))})).catch(o)}));return o(i,n),i},removeItem:function(e,t){var n=this;e=a(e);var r=new D((function(t,r){n.ready().then((function(){w(n._dbInfo,L,(function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).delete(e);i.oncomplete=function(){t()},i.onerror=function(){r(a.error)},i.onabort=function(){r(a.error?a.error:a.transaction.error)}}catch(e){r(e)}}))})).catch(r)}));return o(r,t),r},clear:function(e){var t=this,n=new D((function(e,n){t.ready().then((function(){w(t._dbInfo,L,(function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){n(i.error?i.error:i.transaction.error)}}catch(e){n(e)}}))})).catch(n)}));return o(n,e),n},length:function(e){var t=this,n=new D((function(e,n){t.ready().then((function(){w(t._dbInfo,B,(function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).count();i.onsuccess=function(){e(i.result)},i.onerror=function(){n(i.error)}}catch(e){n(e)}}))})).catch(n)}));return o(n,e),n},key:function(e,t){var n=this,r=new D((function(t,r){e<0?t(null):n.ready().then((function(){w(n._dbInfo,B,(function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName),u=!1,c=a.openKeyCursor();c.onsuccess=function(){var n=c.result;n?0===e||u?t(n.key):(u=!0,n.advance(e)):t(null)},c.onerror=function(){r(c.error)}}catch(e){r(e)}}))})).catch(r)}));return o(r,t),r},keys:function(e){var t=this,n=new D((function(e,n){t.ready().then((function(){w(t._dbInfo,B,(function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).openKeyCursor(),a=[];i.onsuccess=function(){var t=i.result;t?(a.push(t.key),t.continue()):e(a)},i.onerror=function(){n(i.error)}}catch(e){n(e)}}))})).catch(n)}));return o(n,e),n},dropInstance:function(e,t){t=u.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,i=this;if(e.name){var a=e.name===n.name&&i._dbInfo.db,c=a?D.resolve(i._dbInfo.db):d(e).then((function(t){var n=q[e.name],r=n.forages;n.db=t;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=t;return t}));r=c.then(e.storeName?function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;f(e);var r=q[e.name],o=r.forages;t.close();for(var i=0;i<o.length;i++){var a=o[i];a._dbInfo.db=null,a._dbInfo.version=n}return new D((function(t,r){var o=R.open(e.name,n);o.onerror=function(e){o.result.close(),r(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}})).then((function(e){r.db=e;for(var t=0;t<o.length;t++){var n=o[t];n._dbInfo.db=e,l(n._dbInfo)}})).catch((function(t){throw(h(e,t)||D.resolve()).catch((function(){})),t}))}}:function(t){f(e);var n=q[e.name],r=n.forages;t.close();for(var o=0;o<r.length;o++)r[o]._dbInfo.db=null;return new D((function(t,n){var r=R.deleteDatabase(e.name);r.onerror=r.onblocked=function(e){var t=r.result;t&&t.close(),n(e)},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<r.length;t++)l(r[t]._dbInfo)})).catch((function(t){throw(h(e,t)||D.resolve()).catch((function(){})),t}))})}else r=D.reject("Invalid arguments");return o(r,t),r}},U="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",F="~~local_forage_type~",K=/^~~local_forage_type~([^~]+)~/,W="__lfsc__:",G=W.length,z="arbf",H="blob",J="si08",Q="ui08",V="uic8",X="si16",Y="si32",Z="ur16",ee="ui32",te="fl32",ne="fl64",re=G+z.length,oe=Object.prototype.toString,ie={serialize:function(e,t){var n="";if(e&&(n=oe.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===oe.call(e.buffer))){var r,o=W;e instanceof ArrayBuffer?(r=e,o+=z):(r=e.buffer,"[object Int8Array]"===n?o+=J:"[object Uint8Array]"===n?o+=Q:"[object Uint8ClampedArray]"===n?o+=V:"[object Int16Array]"===n?o+=X:"[object Uint16Array]"===n?o+=Z:"[object Int32Array]"===n?o+=Y:"[object Uint32Array]"===n?o+=ee:"[object Float32Array]"===n?o+=te:"[object Float64Array]"===n?o+=ne:t(new Error("Failed to get type for BinaryArray"))),t(o+k(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=F+e.type+"~"+k(this.result);t(W+H+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if(e.substring(0,G)!==W)return JSON.parse(e);var t,r=e.substring(re),o=e.substring(G,re);if(o===H&&K.test(r)){var i=r.match(K);t=i[1],r=r.substring(i[0].length)}var a=_(r);switch(o){case z:return a;case H:return n([a],{type:t});case J:return new Int8Array(a);case Q:return new Uint8Array(a);case V:return new Uint8ClampedArray(a);case X:return new Int16Array(a);case Z:return new Uint16Array(a);case Y:return new Int32Array(a);case ee:return new Uint32Array(a);case te:return new Float32Array(a);case ne:return new Float64Array(a);default:throw new Error("Unkown type: "+o)}},stringToBuffer:_,bufferToString:k},ae={_driver:"webSQLStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var o=new D((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction((function(o){S(o,n,(function(){t._dbInfo=n,e()}),(function(e,t){r(t)}))}),r)}));return n.serializer=ie,o},_support:"function"==typeof openDatabase,iterate:function(e,t){var n=this,r=new D((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){j(n,o,"SELECT * FROM "+o.storeName,[],(function(n,r){for(var i=r.rows,a=i.length,u=0;u<a;u++){var c=i.item(u),s=c.value;if(s&&(s=o.serializer.deserialize(s)),void 0!==(s=e(s,c.key,u+1)))return void t(s)}t()}),(function(e,t){r(t)}))}))})).catch(r)}));return o(r,t),r},getItem:function(e,t){var n=this;e=a(e);var r=new D((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){j(n,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return o(r,t),r},setItem:function(e,t,n){return O.apply(this,[e,t,n,1])},removeItem:function(e,t){var n=this;e=a(e);var r=new D((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){j(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){r(t)}))}))})).catch(r)}));return o(r,t),r},clear:function(e){var t=this,n=new D((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){j(t,r,"DELETE FROM "+r.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return o(n,e),n},length:function(e){var t=this,n=new D((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){j(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(t,n){var r=n.rows.item(0).c;e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return o(n,e),n},key:function(e,t){var n=this,r=new D((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){j(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return o(r,t),r},keys:function(e){var t=this,n=new D((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){j(t,r,"SELECT key FROM "+r.storeName,[],(function(t,n){for(var r=[],o=0;o<n.rows.length;o++)r.push(n.rows.item(o).key);e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return o(n,e),n},dropInstance:function(e,t){t=u.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,i=this;return r=e.name?new D((function(t){var r;r=e.name===n.name?i._dbInfo.db:openDatabase(e.name,"","",0),t(e.storeName?{db:r,storeNames:[e.storeName]}:x(r))})).then((function(e){return new D((function(t,n){e.db.transaction((function(r){function o(e){return new D((function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}for(var i=[],a=0,u=e.storeNames.length;a<u;a++)i.push(o(e.storeNames[a]));D.all(i).then((function(){t()})).catch((function(e){n(e)}))}),(function(e){n(e)}))}))})):D.reject("Invalid arguments"),o(r,t),r}},ue={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];return t.keyPrefix=T(e,this._defaultConfig),I()?(this._dbInfo=t,t.serializer=ie,D.resolve()):D.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,a=1,u=0;u<i;u++){var c=localStorage.key(u);if(0===c.indexOf(r)){var s=localStorage.getItem(c);if(s&&(s=t.serializer.deserialize(s)),void 0!==(s=e(s,c.substring(o),a++)))return s}}}));return o(r,t),r},getItem:function(e,t){var n=this;e=a(e);var r=n.ready().then((function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r}));return o(r,t),r},setItem:function(e,t,n){var r=this;e=a(e);var i=r.ready().then((function(){void 0===t&&(t=null);var n=t;return new D((function(o,i){var a=r._dbInfo;a.serializer.serialize(t,(function(t,r){if(r)i(r);else try{localStorage.setItem(a.keyPrefix+e,t),o(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||i(e),i(e)}}))}))}));return o(i,n),i},removeItem:function(e,t){var n=this;e=a(e);var r=n.ready().then((function(){localStorage.removeItem(n._dbInfo.keyPrefix+e)}));return o(r,t),r},clear:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return o(n,e),n},length:function(e){var t=this.keys().then((function(e){return e.length}));return o(t,e),t},key:function(e,t){var n=this,r=n.ready().then((function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t}));return o(r,t),r},keys:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,r=[],o=0;o<n;o++){var i=localStorage.key(o);0===i.indexOf(e.keyPrefix)&&r.push(i.substring(e.keyPrefix.length))}return r}));return o(n,e),n},dropInstance:function(e,t){if(t=u.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,i=this;return r=e.name?new D((function(t){t(e.storeName?T(e,i._defaultConfig):e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):D.reject("Invalid arguments"),o(r,t),r}},ce=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},se=function(e,t){for(var n=e.length,r=0;r<n;){if(ce(e[r],t))return!0;r++}return!1},fe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},le={},he={},pe={INDEXEDDB:M,WEBSQL:ae,LOCALSTORAGE:ue},de=[pe.INDEXEDDB._driver,pe.WEBSQL._driver,pe.LOCALSTORAGE._driver],ye=["dropInstance"],ve=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ye),me={description:"",driver:de.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},be=function(){function e(t){for(var n in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),pe)if(pe.hasOwnProperty(n)){var r=pe[n],o=r._driver;this[n]=o,le[o]||this.defineDriver(r)}this._defaultConfig=P({},me),this._config=P({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":A(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e&&e.driver)||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new D((function(t,n){try{var r=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(i);for(var a=ve.concat("_initStorage"),u=0,c=a.length;u<c;u++){var s=a[u];if((!se(ye,s)||e[s])&&"function"!=typeof e[s])return void n(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=D.reject(t);return o(n,arguments[arguments.length-1]),n}},n=0,r=ye.length;n<r;n++){var i=ye[n];e[i]||(e[i]=t(i))}}();var f=function(n){le[r]&&console.info("Redefining LocalForage driver: "+r),le[r]=e,he[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(f,n):f(!!e._support):f(!0)}catch(e){n(e)}}));return i(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=le[e]?D.resolve(le[e]):D.reject(new Error("Driver not found."));return i(r,t,n),r},e.prototype.getSerializer=function(e){var t=D.resolve(ie);return i(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return i(n,e,e),n},e.prototype.setDriver=function(e,t,n){function r(){a._config.driver=a.driver()}function o(e){return a._extend(e),r(),a._ready=a._initStorage(a._config),a._ready}var a=this;fe(e)||(e=[e]);var u=this._getSupportedDrivers(e),c=null!==this._driverSet?this._driverSet.catch((function(){return D.resolve()})):D.resolve();return this._driverSet=c.then((function(){var e=u[0];return a._dbInfo=null,a._ready=null,a.getDriver(e).then((function(e){a._driver=e._driver,r(),a._wrapLibraryMethodsWithReady(),a._initDriver=function(e){return function(){var t=0;return function n(){for(;t<e.length;){var i=e[t];return t++,a._dbInfo=null,a._ready=null,a.getDriver(i).then(o).catch(n)}r();var u=new Error("No available storage method found.");return a._driverSet=D.reject(u),a._driverSet}()}}(u)}))})).catch((function(){r();var e=new Error("No available storage method found.");return a._driverSet=D.reject(e),a._driverSet})),i(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!he[e]},e.prototype._extend=function(e){P(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];this.supports(o)&&t.push(o)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=ve.length;e<t;e++)E(this,ve[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),ge=new be;t.exports=ge},{3:3}]},{},[4])(4)},"object"==r(t)&&void 0!==e?e.exports=a():void 0===(i="function"==typeof(o=a)?o.apply(t,[]):o)||(e.exports=i)}).call(this,n("pCvA"))},heVN:function(e,t,n){(function(e,t){!function(e){"use strict";function n(e){delete f[e]}function r(e){if(l)setTimeout(r,0,e);else{var t=f[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{n(e),l=!1}}}}if(!e.setImmediate){var o,i,a,u,c,s=1,f={},l=!1,h=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?o=function(e){t.nextTick((function(){r(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){r(e.data)},o=function(e){a.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,o=function(e){var t=h.createElement("script");t.onreadystatechange=function(){r(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):o=function(e){setTimeout(r,0,e)}:(u="setImmediate$"+Math.random()+"$",c=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(u)&&r(+t.data.slice(u.length))},e.addEventListener?e.addEventListener("message",c,!1):e.attachEvent("onmessage",c),o=function(t){e.postMessage(u+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return f[s]=r,o(s),s++},p.clearImmediate=n}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n("pCvA"),n("5IsQ"))},myed:function(){"use strict";try{self["workbox:strategies:6.4.1"]&&_()}catch(e){}},oPUo:function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var o=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n("heVN"),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n("pCvA"))},pCvA:function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":t(window))&&(n=window)}e.exports=n},snVQ:function(){"use strict";try{self["workbox:background-sync:6.4.1"]&&_()}catch(e){}},xgXd:function(){"use strict";try{self["workbox:core:6.4.1"]&&_()}catch(e){}}});
//# sourceMappingURL=sw.js.map