magic-sdk 28.19.2-canary.842.12375745226.0 → 28.19.2-canary.846.12474511164.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/magic.js +1 -1
  2. package/package.json +5 -5
package/dist/magic.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Magic=(()=>{var Si=Object.create;var Xe=Object.defineProperty;var Oi=Object.getOwnPropertyDescriptor;var Ni=Object.getOwnPropertyNames,yr=Object.getOwnPropertySymbols,Mi=Object.getPrototypeOf,gr=Object.prototype.hasOwnProperty,Ti=Object.prototype.propertyIsEnumerable;var Er=(e,t,r)=>t in e?Xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_r=(e,t)=>{for(var r in t||(t={}))gr.call(t,r)&&Er(e,r,t[r]);if(yr)for(var r of yr(t))Ti.call(t,r)&&Er(e,r,t[r]);return e};var ze=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var Ir=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wr=(e,t)=>{for(var r in t)Xe(e,r,{get:t[r],enumerable:!0})},br=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ni(t))!gr.call(e,a)&&a!==r&&Xe(e,a,{get:()=>t[a],enumerable:!(i=Oi(t,a))||i.enumerable});return e};var Rr=(e,t,r)=>(r=e!=null?Si(Mi(e)):{},br(t||!e||!e.__esModule?Xe(r,"default",{value:e,enumerable:!0}):r,e)),Ci=e=>br(Xe({},"__esModule",{value:!0}),e);var ge=(e,t,r)=>new Promise((i,a)=>{var s=p=>{try{f(r.next(p))}catch(y){a(y)}},m=p=>{try{f(r.throw(p))}catch(y){a(y)}},f=p=>p.done?i(p.value):Promise.resolve(p.value).then(s,m);f((r=r.apply(e,t)).next())});var On=Ir((Sn,zt)=>{(function(e){if(typeof Sn=="object"&&typeof zt<"u")zt.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t;typeof window<"u"?t=window:typeof global<"u"?t=global:typeof self<"u"?t=self:t=this,t.localforage=e()}})(function(){var e,t,r;return function i(a,s,m){function f(E,N){if(!s[E]){if(!a[E]){var _=typeof ze=="function"&&ze;if(!N&&_)return _(E,!0);if(p)return p(E,!0);var O=new Error("Cannot find module '"+E+"'");throw O.code="MODULE_NOT_FOUND",O}var C=s[E]={exports:{}};a[E][0].call(C.exports,function(F){var L=a[E][1][F];return f(L||F)},C,C.exports,i,a,s,m)}return s[E].exports}for(var p=typeof ze=="function"&&ze,y=0;y<m.length;y++)f(m[y]);return f}({1:[function(i,a,s){(function(m){"use strict";var f=m.MutationObserver||m.WebKitMutationObserver,p;if(f){var y=0,E=new f(F),N=m.document.createTextNode("");E.observe(N,{characterData:!0}),p=function(){N.data=y=++y%2}}else if(!m.setImmediate&&typeof m.MessageChannel<"u"){var _=new m.MessageChannel;_.port1.onmessage=F,p=function(){_.port2.postMessage(0)}}else"document"in m&&"onreadystatechange"in m.document.createElement("script")?p=function(){var B=m.document.createElement("script");B.onreadystatechange=function(){F(),B.onreadystatechange=null,B.parentNode.removeChild(B),B=null},m.document.documentElement.appendChild(B)}:p=function(){setTimeout(F,0)};var O,C=[];function F(){O=!0;for(var B,Q,D=C.length;D;){for(Q=C,C=[],B=-1;++B<D;)Q[B]();D=C.length}O=!1}a.exports=L;function L(B){C.push(B)===1&&!O&&p()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(i,a,s){"use strict";var m=i(1);function f(){}var p={},y=["REJECTED"],E=["FULFILLED"],N=["PENDING"];a.exports=_;function _(S){if(typeof S!="function")throw new TypeError("resolver must be a function");this.state=N,this.queue=[],this.outcome=void 0,S!==f&&L(this,S)}_.prototype.catch=function(S){return this.then(null,S)},_.prototype.then=function(S,G){if(typeof S!="function"&&this.state===E||typeof G!="function"&&this.state===y)return this;var x=new this.constructor(f);if(this.state!==N){var q=this.state===E?S:G;C(x,q,this.outcome)}else this.queue.push(new O(x,S,G));return x};function O(S,G,x){this.promise=S,typeof G=="function"&&(this.onFulfilled=G,this.callFulfilled=this.otherCallFulfilled),typeof x=="function"&&(this.onRejected=x,this.callRejected=this.otherCallRejected)}O.prototype.callFulfilled=function(S){p.resolve(this.promise,S)},O.prototype.otherCallFulfilled=function(S){C(this.promise,this.onFulfilled,S)},O.prototype.callRejected=function(S){p.reject(this.promise,S)},O.prototype.otherCallRejected=function(S){C(this.promise,this.onRejected,S)};function C(S,G,x){m(function(){var q;try{q=G(x)}catch(Z){return p.reject(S,Z)}q===S?p.reject(S,new TypeError("Cannot resolve promise with itself")):p.resolve(S,q)})}p.resolve=function(S,G){var x=B(F,G);if(x.status==="error")return p.reject(S,x.value);var q=x.value;if(q)L(S,q);else{S.state=E,S.outcome=G;for(var Z=-1,ae=S.queue.length;++Z<ae;)S.queue[Z].callFulfilled(G)}return S},p.reject=function(S,G){S.state=y,S.outcome=G;for(var x=-1,q=S.queue.length;++x<q;)S.queue[x].callRejected(G);return S};function F(S){var G=S&&S.then;if(S&&(typeof S=="object"||typeof S=="function")&&typeof G=="function")return function(){G.apply(S,arguments)}}function L(S,G){var x=!1;function q(ue){x||(x=!0,p.reject(S,ue))}function Z(ue){x||(x=!0,p.resolve(S,ue))}function ae(){G(Z,q)}var ce=B(ae);ce.status==="error"&&q(ce.value)}function B(S,G){var x={};try{x.value=S(G),x.status="success"}catch(q){x.status="error",x.value=q}return x}_.resolve=Q;function Q(S){return S instanceof this?S:p.resolve(new this(f),S)}_.reject=D;function D(S){var G=new this(f);return p.reject(G,S)}_.all=Se;function Se(S){var G=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=S.length,q=!1;if(!x)return this.resolve([]);for(var Z=new Array(x),ae=0,ce=-1,ue=new this(f);++ce<x;)pe(S[ce],ce);return ue;function pe(Te,h){G.resolve(Te).then(I,function(A){q||(q=!0,p.reject(ue,A))});function I(A){Z[h]=A,++ae===x&&!q&&(q=!0,p.resolve(ue,Z))}}}_.race=oe;function oe(S){var G=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=S.length,q=!1;if(!x)return this.resolve([]);for(var Z=-1,ae=new this(f);++Z<x;)ce(S[Z]);return ae;function ce(ue){G.resolve(ue).then(function(pe){q||(q=!0,p.resolve(ae,pe))},function(pe){q||(q=!0,p.reject(ae,pe))})}}},{1:1}],3:[function(i,a,s){(function(m){"use strict";typeof m.Promise!="function"&&(m.Promise=i(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(i,a,s){"use strict";var m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function f(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function p(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var y=p();function E(){try{if(!y||!y.open)return!1;var n=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),l=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!n||l)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function N(n,l){n=n||[],l=l||{};try{return new Blob(n,l)}catch(c){if(c.name!=="TypeError")throw c;for(var o=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,u=new o,d=0;d<n.length;d+=1)u.append(n[d]);return u.getBlob(l.type)}}typeof Promise>"u"&&i(3);var _=Promise;function O(n,l){l&&n.then(function(o){l(null,o)},function(o){l(o)})}function C(n,l,o){typeof l=="function"&&n.then(l),typeof o=="function"&&n.catch(o)}function F(n){return typeof n!="string"&&(console.warn(n+" used as a key, but it is not a string."),n=String(n)),n}function L(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var B="local-forage-detect-blob-support",Q=void 0,D={},Se=Object.prototype.toString,oe="readonly",S="readwrite";function G(n){for(var l=n.length,o=new ArrayBuffer(l),u=new Uint8Array(o),d=0;d<l;d++)u[d]=n.charCodeAt(d);return o}function x(n){return new _(function(l){var o=n.transaction(B,S),u=N([""]);o.objectStore(B).put(u,"key"),o.onabort=function(d){d.preventDefault(),d.stopPropagation(),l(!1)},o.oncomplete=function(){var d=navigator.userAgent.match(/Chrome\/(\d+)/),c=navigator.userAgent.match(/Edge\//);l(c||!d||parseInt(d[1],10)>=43)}}).catch(function(){return!1})}function q(n){return typeof Q=="boolean"?_.resolve(Q):x(n).then(function(l){return Q=l,Q})}function Z(n){var l=D[n.name],o={};o.promise=new _(function(u,d){o.resolve=u,o.reject=d}),l.deferredOperations.push(o),l.dbReady?l.dbReady=l.dbReady.then(function(){return o.promise}):l.dbReady=o.promise}function ae(n){var l=D[n.name],o=l.deferredOperations.pop();if(o)return o.resolve(),o.promise}function ce(n,l){var o=D[n.name],u=o.deferredOperations.pop();if(u)return u.reject(l),u.promise}function ue(n,l){return new _(function(o,u){if(D[n.name]=D[n.name]||ee(),n.db)if(l)Z(n),n.db.close();else return o(n.db);var d=[n.name];l&&d.push(n.version);var c=y.open.apply(y,d);l&&(c.onupgradeneeded=function(v){var g=c.result;try{g.createObjectStore(n.storeName),v.oldVersion<=1&&g.createObjectStore(B)}catch(w){if(w.name==="ConstraintError")console.warn('The database "'+n.name+'" has been upgraded from version '+v.oldVersion+" to version "+v.newVersion+', but the storage "'+n.storeName+'" already exists.');else throw w}}),c.onerror=function(v){v.preventDefault(),u(c.error)},c.onsuccess=function(){var v=c.result;v.onversionchange=function(g){g.target.close()},o(v),ae(n)}})}function pe(n){return ue(n,!1)}function Te(n){return ue(n,!0)}function h(n,l){if(!n.db)return!0;var o=!n.db.objectStoreNames.contains(n.storeName),u=n.version<n.db.version,d=n.version>n.db.version;if(u&&(n.version!==l&&console.warn('The database "'+n.name+`" can't be downgraded from version `+n.db.version+" to version "+n.version+"."),n.version=n.db.version),d||o){if(o){var c=n.db.version+1;c>n.version&&(n.version=c)}return!0}return!1}function I(n){return new _(function(l,o){var u=new FileReader;u.onerror=o,u.onloadend=function(d){var c=btoa(d.target.result||"");l({__local_forage_encoded_blob:!0,data:c,type:n.type})},u.readAsBinaryString(n)})}function A(n){var l=G(atob(n.data));return N([l],{type:n.type})}function P(n){return n&&n.__local_forage_encoded_blob}function $(n){var l=this,o=l._initReady().then(function(){var u=D[l._dbInfo.name];if(u&&u.dbReady)return u.dbReady});return C(o,n,n),o}function U(n){Z(n);for(var l=D[n.name],o=l.forages,u=0;u<o.length;u++){var d=o[u];d._dbInfo.db&&(d._dbInfo.db.close(),d._dbInfo.db=null)}return n.db=null,pe(n).then(function(c){return n.db=c,h(n)?Te(n):c}).then(function(c){n.db=l.db=c;for(var v=0;v<o.length;v++)o[v]._dbInfo.db=c}).catch(function(c){throw ce(n,c),c})}function V(n,l,o,u){u===void 0&&(u=1);try{var d=n.db.transaction(n.storeName,l);o(null,d)}catch(c){if(u>0&&(!n.db||c.name==="InvalidStateError"||c.name==="NotFoundError"))return _.resolve().then(function(){if(!n.db||c.name==="NotFoundError"&&!n.db.objectStoreNames.contains(n.storeName)&&n.version<=n.db.version)return n.db&&(n.version=n.db.version+1),Te(n)}).then(function(){return U(n).then(function(){V(n,l,o,u-1)})}).catch(o);o(c)}}function ee(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function xe(n){var l=this,o={db:null};if(n)for(var u in n)o[u]=n[u];var d=D[o.name];d||(d=ee(),D[o.name]=d),d.forages.push(l),l._initReady||(l._initReady=l.ready,l.ready=$);var c=[];function v(){return _.resolve()}for(var g=0;g<d.forages.length;g++){var w=d.forages[g];w!==l&&c.push(w._initReady().catch(v))}var b=d.forages.slice(0);return _.all(c).then(function(){return o.db=d.db,pe(o)}).then(function(R){return o.db=R,h(o,l._defaultConfig.version)?Te(o):R}).then(function(R){o.db=d.db=R,l._dbInfo=o;for(var M=0;M<b.length;M++){var k=b[M];k!==l&&(k._dbInfo.db=o.db,k._dbInfo.version=o.version)}})}function Ce(n,l){var o=this;n=F(n);var u=new _(function(d,c){o.ready().then(function(){V(o._dbInfo,oe,function(v,g){if(v)return c(v);try{var w=g.objectStore(o._dbInfo.storeName),b=w.get(n);b.onsuccess=function(){var R=b.result;R===void 0&&(R=null),P(R)&&(R=A(R)),d(R)},b.onerror=function(){c(b.error)}}catch(R){c(R)}})}).catch(c)});return O(u,l),u}function Ke(n,l){var o=this,u=new _(function(d,c){o.ready().then(function(){V(o._dbInfo,oe,function(v,g){if(v)return c(v);try{var w=g.objectStore(o._dbInfo.storeName),b=w.openCursor(),R=1;b.onsuccess=function(){var M=b.result;if(M){var k=M.value;P(k)&&(k=A(k));var j=n(k,M.key,R++);j!==void 0?d(j):M.continue()}else d()},b.onerror=function(){c(b.error)}}catch(M){c(M)}})}).catch(c)});return O(u,l),u}function Ln(n,l,o){var u=this;n=F(n);var d=new _(function(c,v){var g;u.ready().then(function(){return g=u._dbInfo,Se.call(l)==="[object Blob]"?q(g.db).then(function(w){return w?l:I(l)}):l}).then(function(w){V(u._dbInfo,S,function(b,R){if(b)return v(b);try{var M=R.objectStore(u._dbInfo.storeName);w===null&&(w=void 0);var k=M.put(w,n);R.oncomplete=function(){w===void 0&&(w=null),c(w)},R.onabort=R.onerror=function(){var j=k.error?k.error:k.transaction.error;v(j)}}catch(j){v(j)}})}).catch(v)});return O(d,o),d}function Pn(n,l){var o=this;n=F(n);var u=new _(function(d,c){o.ready().then(function(){V(o._dbInfo,S,function(v,g){if(v)return c(v);try{var w=g.objectStore(o._dbInfo.storeName),b=w.delete(n);g.oncomplete=function(){d()},g.onerror=function(){c(b.error)},g.onabort=function(){var R=b.error?b.error:b.transaction.error;c(R)}}catch(R){c(R)}})}).catch(c)});return O(u,l),u}function $n(n){var l=this,o=new _(function(u,d){l.ready().then(function(){V(l._dbInfo,S,function(c,v){if(c)return d(c);try{var g=v.objectStore(l._dbInfo.storeName),w=g.clear();v.oncomplete=function(){u()},v.onabort=v.onerror=function(){var b=w.error?w.error:w.transaction.error;d(b)}}catch(b){d(b)}})}).catch(d)});return O(o,n),o}function Dn(n){var l=this,o=new _(function(u,d){l.ready().then(function(){V(l._dbInfo,oe,function(c,v){if(c)return d(c);try{var g=v.objectStore(l._dbInfo.storeName),w=g.count();w.onsuccess=function(){u(w.result)},w.onerror=function(){d(w.error)}}catch(b){d(b)}})}).catch(d)});return O(o,n),o}function Un(n,l){var o=this,u=new _(function(d,c){if(n<0){d(null);return}o.ready().then(function(){V(o._dbInfo,oe,function(v,g){if(v)return c(v);try{var w=g.objectStore(o._dbInfo.storeName),b=!1,R=w.openKeyCursor();R.onsuccess=function(){var M=R.result;if(!M){d(null);return}n===0||b?d(M.key):(b=!0,M.advance(n))},R.onerror=function(){c(R.error)}}catch(M){c(M)}})}).catch(c)});return O(u,l),u}function xn(n){var l=this,o=new _(function(u,d){l.ready().then(function(){V(l._dbInfo,oe,function(c,v){if(c)return d(c);try{var g=v.objectStore(l._dbInfo.storeName),w=g.openKeyCursor(),b=[];w.onsuccess=function(){var R=w.result;if(!R){u(b);return}b.push(R.key),R.continue()},w.onerror=function(){d(w.error)}}catch(R){d(R)}})}).catch(d)});return O(o,n),o}function Fn(n,l){l=L.apply(this,arguments);var o=this.config();n=typeof n!="function"&&n||{},n.name||(n.name=n.name||o.name,n.storeName=n.storeName||o.storeName);var u=this,d;if(!n.name)d=_.reject("Invalid arguments");else{var c=n.name===o.name&&u._dbInfo.db,v=c?_.resolve(u._dbInfo.db):pe(n).then(function(g){var w=D[n.name],b=w.forages;w.db=g;for(var R=0;R<b.length;R++)b[R]._dbInfo.db=g;return g});n.storeName?d=v.then(function(g){if(!!g.objectStoreNames.contains(n.storeName)){var w=g.version+1;Z(n);var b=D[n.name],R=b.forages;g.close();for(var M=0;M<R.length;M++){var k=R[M];k._dbInfo.db=null,k._dbInfo.version=w}var j=new _(function(K,J){var z=y.open(n.name,w);z.onerror=function(me){var Ye=z.result;Ye.close(),J(me)},z.onupgradeneeded=function(){var me=z.result;me.deleteObjectStore(n.storeName)},z.onsuccess=function(){var me=z.result;me.close(),K(me)}});return j.then(function(K){b.db=K;for(var J=0;J<R.length;J++){var z=R[J];z._dbInfo.db=K,ae(z._dbInfo)}}).catch(function(K){throw(ce(n,K)||_.resolve()).catch(function(){}),K})}}):d=v.then(function(g){Z(n);var w=D[n.name],b=w.forages;g.close();for(var R=0;R<b.length;R++){var M=b[R];M._dbInfo.db=null}var k=new _(function(j,K){var J=y.deleteDatabase(n.name);J.onerror=function(){var z=J.result;z&&z.close(),K(J.error)},J.onblocked=function(){console.warn('dropInstance blocked for database "'+n.name+'" until all open connections are closed')},J.onsuccess=function(){var z=J.result;z&&z.close(),j(z)}});return k.then(function(j){w.db=j;for(var K=0;K<b.length;K++){var J=b[K];ae(J._dbInfo)}}).catch(function(j){throw(ce(n,j)||_.resolve()).catch(function(){}),j})})}return O(d,l),d}var kn={_driver:"asyncStorage",_initStorage:xe,_support:E(),iterate:Ke,getItem:Ce,setItem:Ln,removeItem:Pn,clear:$n,length:Dn,key:Un,keys:xn,dropInstance:Fn};function Wn(){return typeof openDatabase=="function"}var Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bn="~~local_forage_type~",Qt=/^~~local_forage_type~([^~]+)~/,st="__lfsc__:",Ot=st.length,Nt="arbf",Mt="blob",Zt="si08",er="ui08",tr="uic8",rr="si16",nr="si32",ir="ur16",or="ui32",ar="fl32",sr="fl64",lr=Ot+Nt.length,cr=Object.prototype.toString;function ur(n){var l=n.length*.75,o=n.length,u,d=0,c,v,g,w;n[n.length-1]==="="&&(l--,n[n.length-2]==="="&&l--);var b=new ArrayBuffer(l),R=new Uint8Array(b);for(u=0;u<o;u+=4)c=Oe.indexOf(n[u]),v=Oe.indexOf(n[u+1]),g=Oe.indexOf(n[u+2]),w=Oe.indexOf(n[u+3]),R[d++]=c<<2|v>>4,R[d++]=(v&15)<<4|g>>2,R[d++]=(g&3)<<6|w&63;return b}function Tt(n){var l=new Uint8Array(n),o="",u;for(u=0;u<l.length;u+=3)o+=Oe[l[u]>>2],o+=Oe[(l[u]&3)<<4|l[u+1]>>4],o+=Oe[(l[u+1]&15)<<2|l[u+2]>>6],o+=Oe[l[u+2]&63];return l.length%3===2?o=o.substring(0,o.length-1)+"=":l.length%3===1&&(o=o.substring(0,o.length-2)+"=="),o}function Gn(n,l){var o="";if(n&&(o=cr.call(n)),n&&(o==="[object ArrayBuffer]"||n.buffer&&cr.call(n.buffer)==="[object ArrayBuffer]")){var u,d=st;n instanceof ArrayBuffer?(u=n,d+=Nt):(u=n.buffer,o==="[object Int8Array]"?d+=Zt:o==="[object Uint8Array]"?d+=er:o==="[object Uint8ClampedArray]"?d+=tr:o==="[object Int16Array]"?d+=rr:o==="[object Uint16Array]"?d+=ir:o==="[object Int32Array]"?d+=nr:o==="[object Uint32Array]"?d+=or:o==="[object Float32Array]"?d+=ar:o==="[object Float64Array]"?d+=sr:l(new Error("Failed to get type for BinaryArray"))),l(d+Tt(u))}else if(o==="[object Blob]"){var c=new FileReader;c.onload=function(){var v=Bn+n.type+"~"+Tt(this.result);l(st+Mt+v)},c.readAsArrayBuffer(n)}else try{l(JSON.stringify(n))}catch(v){console.error("Couldn't convert value into a JSON string: ",n),l(null,v)}}function Vn(n){if(n.substring(0,Ot)!==st)return JSON.parse(n);var l=n.substring(lr),o=n.substring(Ot,lr),u;if(o===Mt&&Qt.test(l)){var d=l.match(Qt);u=d[1],l=l.substring(d[0].length)}var c=ur(l);switch(o){case Nt:return c;case Mt:return N([c],{type:u});case Zt:return new Int8Array(c);case er:return new Uint8Array(c);case tr:return new Uint8ClampedArray(c);case rr:return new Int16Array(c);case ir:return new Uint16Array(c);case nr:return new Int32Array(c);case or:return new Uint32Array(c);case ar:return new Float32Array(c);case sr:return new Float64Array(c);default:throw new Error("Unkown type: "+o)}}var Ct={serialize:Gn,deserialize:Vn,stringToBuffer:ur,bufferToString:Tt};function dr(n,l,o,u){n.executeSql("CREATE TABLE IF NOT EXISTS "+l.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],o,u)}function jn(n){var l=this,o={db:null};if(n)for(var u in n)o[u]=typeof n[u]!="string"?n[u].toString():n[u];var d=new _(function(c,v){try{o.db=openDatabase(o.name,String(o.version),o.description,o.size)}catch(g){return v(g)}o.db.transaction(function(g){dr(g,o,function(){l._dbInfo=o,c()},function(w,b){v(b)})},v)});return o.serializer=Ct,d}function Ne(n,l,o,u,d,c){n.executeSql(o,u,d,function(v,g){g.code===g.SYNTAX_ERR?v.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[l.storeName],function(w,b){b.rows.length?c(w,g):dr(w,l,function(){w.executeSql(o,u,d,c)},c)},c):c(v,g)},c)}function qn(n,l){var o=this;n=F(n);var u=new _(function(d,c){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(g){Ne(g,v,"SELECT * FROM "+v.storeName+" WHERE key = ? LIMIT 1",[n],function(w,b){var R=b.rows.length?b.rows.item(0).value:null;R&&(R=v.serializer.deserialize(R)),d(R)},function(w,b){c(b)})})}).catch(c)});return O(u,l),u}function Kn(n,l){var o=this,u=new _(function(d,c){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(g){Ne(g,v,"SELECT * FROM "+v.storeName,[],function(w,b){for(var R=b.rows,M=R.length,k=0;k<M;k++){var j=R.item(k),K=j.value;if(K&&(K=v.serializer.deserialize(K)),K=n(K,j.key,k+1),K!==void 0){d(K);return}}d()},function(w,b){c(b)})})}).catch(c)});return O(u,l),u}function fr(n,l,o,u){var d=this;n=F(n);var c=new _(function(v,g){d.ready().then(function(){l===void 0&&(l=null);var w=l,b=d._dbInfo;b.serializer.serialize(l,function(R,M){M?g(M):b.db.transaction(function(k){Ne(k,b,"INSERT OR REPLACE INTO "+b.storeName+" (key, value) VALUES (?, ?)",[n,R],function(){v(w)},function(j,K){g(K)})},function(k){if(k.code===k.QUOTA_ERR){if(u>0){v(fr.apply(d,[n,w,o,u-1]));return}g(k)}})})}).catch(g)});return O(c,o),c}function Hn(n,l,o){return fr.apply(this,[n,l,o,1])}function Yn(n,l){var o=this;n=F(n);var u=new _(function(d,c){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(g){Ne(g,v,"DELETE FROM "+v.storeName+" WHERE key = ?",[n],function(){d()},function(w,b){c(b)})})}).catch(c)});return O(u,l),u}function Xn(n){var l=this,o=new _(function(u,d){l.ready().then(function(){var c=l._dbInfo;c.db.transaction(function(v){Ne(v,c,"DELETE FROM "+c.storeName,[],function(){u()},function(g,w){d(w)})})}).catch(d)});return O(o,n),o}function zn(n){var l=this,o=new _(function(u,d){l.ready().then(function(){var c=l._dbInfo;c.db.transaction(function(v){Ne(v,c,"SELECT COUNT(key) as c FROM "+c.storeName,[],function(g,w){var b=w.rows.item(0).c;u(b)},function(g,w){d(w)})})}).catch(d)});return O(o,n),o}function Jn(n,l){var o=this,u=new _(function(d,c){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(g){Ne(g,v,"SELECT key FROM "+v.storeName+" WHERE id = ? LIMIT 1",[n+1],function(w,b){var R=b.rows.length?b.rows.item(0).key:null;d(R)},function(w,b){c(b)})})}).catch(c)});return O(u,l),u}function Qn(n){var l=this,o=new _(function(u,d){l.ready().then(function(){var c=l._dbInfo;c.db.transaction(function(v){Ne(v,c,"SELECT key FROM "+c.storeName,[],function(g,w){for(var b=[],R=0;R<w.rows.length;R++)b.push(w.rows.item(R).key);u(b)},function(g,w){d(w)})})}).catch(d)});return O(o,n),o}function Zn(n){return new _(function(l,o){n.transaction(function(u){u.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(d,c){for(var v=[],g=0;g<c.rows.length;g++)v.push(c.rows.item(g).name);l({db:n,storeNames:v})},function(d,c){o(c)})},function(u){o(u)})})}function ei(n,l){l=L.apply(this,arguments);var o=this.config();n=typeof n!="function"&&n||{},n.name||(n.name=n.name||o.name,n.storeName=n.storeName||o.storeName);var u=this,d;return n.name?d=new _(function(c){var v;n.name===o.name?v=u._dbInfo.db:v=openDatabase(n.name,"","",0),n.storeName?c({db:v,storeNames:[n.storeName]}):c(Zn(v))}).then(function(c){return new _(function(v,g){c.db.transaction(function(w){function b(j){return new _(function(K,J){w.executeSql("DROP TABLE IF EXISTS "+j,[],function(){K()},function(z,me){J(me)})})}for(var R=[],M=0,k=c.storeNames.length;M<k;M++)R.push(b(c.storeNames[M]));_.all(R).then(function(){v()}).catch(function(j){g(j)})},function(w){g(w)})})}):d=_.reject("Invalid arguments"),O(d,l),d}var ti={_driver:"webSQLStorage",_initStorage:jn,_support:Wn(),iterate:Kn,getItem:qn,setItem:Hn,removeItem:Yn,clear:Xn,length:zn,key:Jn,keys:Qn,dropInstance:ei};function ri(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function hr(n,l){var o=n.name+"/";return n.storeName!==l.storeName&&(o+=n.storeName+"/"),o}function ni(){var n="_localforage_support_test";try{return localStorage.setItem(n,!0),localStorage.removeItem(n),!1}catch{return!0}}function ii(){return!ni()||localStorage.length>0}function oi(n){var l=this,o={};if(n)for(var u in n)o[u]=n[u];return o.keyPrefix=hr(n,l._defaultConfig),ii()?(l._dbInfo=o,o.serializer=Ct,_.resolve()):_.reject()}function ai(n){var l=this,o=l.ready().then(function(){for(var u=l._dbInfo.keyPrefix,d=localStorage.length-1;d>=0;d--){var c=localStorage.key(d);c.indexOf(u)===0&&localStorage.removeItem(c)}});return O(o,n),o}function si(n,l){var o=this;n=F(n);var u=o.ready().then(function(){var d=o._dbInfo,c=localStorage.getItem(d.keyPrefix+n);return c&&(c=d.serializer.deserialize(c)),c});return O(u,l),u}function li(n,l){var o=this,u=o.ready().then(function(){for(var d=o._dbInfo,c=d.keyPrefix,v=c.length,g=localStorage.length,w=1,b=0;b<g;b++){var R=localStorage.key(b);if(R.indexOf(c)===0){var M=localStorage.getItem(R);if(M&&(M=d.serializer.deserialize(M)),M=n(M,R.substring(v),w++),M!==void 0)return M}}});return O(u,l),u}function ci(n,l){var o=this,u=o.ready().then(function(){var d=o._dbInfo,c;try{c=localStorage.key(n)}catch{c=null}return c&&(c=c.substring(d.keyPrefix.length)),c});return O(u,l),u}function ui(n){var l=this,o=l.ready().then(function(){for(var u=l._dbInfo,d=localStorage.length,c=[],v=0;v<d;v++){var g=localStorage.key(v);g.indexOf(u.keyPrefix)===0&&c.push(g.substring(u.keyPrefix.length))}return c});return O(o,n),o}function di(n){var l=this,o=l.keys().then(function(u){return u.length});return O(o,n),o}function fi(n,l){var o=this;n=F(n);var u=o.ready().then(function(){var d=o._dbInfo;localStorage.removeItem(d.keyPrefix+n)});return O(u,l),u}function hi(n,l,o){var u=this;n=F(n);var d=u.ready().then(function(){l===void 0&&(l=null);var c=l;return new _(function(v,g){var w=u._dbInfo;w.serializer.serialize(l,function(b,R){if(R)g(R);else try{localStorage.setItem(w.keyPrefix+n,b),v(c)}catch(M){(M.name==="QuotaExceededError"||M.name==="NS_ERROR_DOM_QUOTA_REACHED")&&g(M),g(M)}})})});return O(d,o),d}function mi(n,l){if(l=L.apply(this,arguments),n=typeof n!="function"&&n||{},!n.name){var o=this.config();n.name=n.name||o.name,n.storeName=n.storeName||o.storeName}var u=this,d;return n.name?d=new _(function(c){n.storeName?c(hr(n,u._defaultConfig)):c(n.name+"/")}).then(function(c){for(var v=localStorage.length-1;v>=0;v--){var g=localStorage.key(v);g.indexOf(c)===0&&localStorage.removeItem(g)}}):d=_.reject("Invalid arguments"),O(d,l),d}var vi={_driver:"localStorageWrapper",_initStorage:oi,_support:ri(),iterate:li,getItem:si,setItem:hi,removeItem:fi,clear:ai,length:di,key:ci,keys:ui,dropInstance:mi},pi=function(l,o){return l===o||typeof l=="number"&&typeof o=="number"&&isNaN(l)&&isNaN(o)},yi=function(l,o){for(var u=l.length,d=0;d<u;){if(pi(l[d],o))return!0;d++}return!1},mr=Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"},He={},vr={},Fe={INDEXEDDB:kn,WEBSQL:ti,LOCALSTORAGE:vi},Ei=[Fe.INDEXEDDB._driver,Fe.WEBSQL._driver,Fe.LOCALSTORAGE._driver],lt=["dropInstance"],Lt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(lt),gi={description:"",driver:Ei.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function _i(n,l){n[l]=function(){var o=arguments;return n.ready().then(function(){return n[l].apply(n,o)})}}function Pt(){for(var n=1;n<arguments.length;n++){var l=arguments[n];if(l)for(var o in l)l.hasOwnProperty(o)&&(mr(l[o])?arguments[0][o]=l[o].slice():arguments[0][o]=l[o])}return arguments[0]}var Ii=function(){function n(l){f(this,n);for(var o in Fe)if(Fe.hasOwnProperty(o)){var u=Fe[o],d=u._driver;this[o]=d,He[d]||this.defineDriver(u)}this._defaultConfig=Pt({},gi),this._config=Pt({},this._defaultConfig,l),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return n.prototype.config=function(o){if((typeof o>"u"?"undefined":m(o))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var u in o){if(u==="storeName"&&(o[u]=o[u].replace(/\W/g,"_")),u==="version"&&typeof o[u]!="number")return new Error("Database version must be a number.");this._config[u]=o[u]}return"driver"in o&&o.driver?this.setDriver(this._config.driver):!0}else return typeof o=="string"?this._config[o]:this._config},n.prototype.defineDriver=function(o,u,d){var c=new _(function(v,g){try{var w=o._driver,b=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!o._driver){g(b);return}for(var R=Lt.concat("_initStorage"),M=0,k=R.length;M<k;M++){var j=R[M],K=!yi(lt,j);if((K||o[j])&&typeof o[j]!="function"){g(b);return}}var J=function(){for(var Ye=function(Ri){return function(){var Ai=new Error("Method "+Ri+" is not implemented by the current driver"),pr=_.reject(Ai);return O(pr,arguments[arguments.length-1]),pr}},$t=0,bi=lt.length;$t<bi;$t++){var Dt=lt[$t];o[Dt]||(o[Dt]=Ye(Dt))}};J();var z=function(Ye){He[w]&&console.info("Redefining LocalForage driver: "+w),He[w]=o,vr[w]=Ye,v()};"_support"in o?o._support&&typeof o._support=="function"?o._support().then(z,g):z(!!o._support):z(!0)}catch(me){g(me)}});return C(c,u,d),c},n.prototype.driver=function(){return this._driver||null},n.prototype.getDriver=function(o,u,d){var c=He[o]?_.resolve(He[o]):_.reject(new Error("Driver not found."));return C(c,u,d),c},n.prototype.getSerializer=function(o){var u=_.resolve(Ct);return C(u,o),u},n.prototype.ready=function(o){var u=this,d=u._driverSet.then(function(){return u._ready===null&&(u._ready=u._initDriver()),u._ready});return C(d,o,o),d},n.prototype.setDriver=function(o,u,d){var c=this;mr(o)||(o=[o]);var v=this._getSupportedDrivers(o);function g(){c._config.driver=c.driver()}function w(M){return c._extend(M),g(),c._ready=c._initStorage(c._config),c._ready}function b(M){return function(){var k=0;function j(){for(;k<M.length;){var K=M[k];return k++,c._dbInfo=null,c._ready=null,c.getDriver(K).then(w).catch(j)}g();var J=new Error("No available storage method found.");return c._driverSet=_.reject(J),c._driverSet}return j()}}var R=this._driverSet!==null?this._driverSet.catch(function(){return _.resolve()}):_.resolve();return this._driverSet=R.then(function(){var M=v[0];return c._dbInfo=null,c._ready=null,c.getDriver(M).then(function(k){c._driver=k._driver,g(),c._wrapLibraryMethodsWithReady(),c._initDriver=b(v)})}).catch(function(){g();var M=new Error("No available storage method found.");return c._driverSet=_.reject(M),c._driverSet}),C(this._driverSet,u,d),this._driverSet},n.prototype.supports=function(o){return!!vr[o]},n.prototype._extend=function(o){Pt(this,o)},n.prototype._getSupportedDrivers=function(o){for(var u=[],d=0,c=o.length;d<c;d++){var v=o[d];this.supports(v)&&u.push(v)}return u},n.prototype._wrapLibraryMethodsWithReady=function(){for(var o=0,u=Lt.length;o<u;o++)_i(this,Lt[o])},n.prototype.createInstance=function(o){return new n(o)},n}(),wi=new Ii;a.exports=wi},{3:3}]},{},[4])(4)})});var Mn=Ir((Rt,Nn)=>{(function(e,t){typeof Rt=="object"&&typeof Nn<"u"?t(Rt):typeof define=="function"&&define.amd?define("localforage-driver-memory",["exports"],t):t(e.LocalforageDriverMemory={})})(typeof self<"u"?self:Rt,function(e){"use strict";var t="localforage-driver-memory";function r(h){var I=typeof Symbol=="function"&&h[Symbol.iterator],A=0;return I?I.call(h):{next:function(){return h&&A>=h.length&&(h=void 0),{value:h&&h[A++],done:!h}}}}function i(h,I){h=h||[],I=I||{};try{return new Blob(h,I)}catch(U){if(U.name!=="TypeError")throw U;for(var A=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,P=new A,$=0;$<h.length;$+=1)P.append(h[$]);return P.getBlob(I.type)}}var a=/^~~local_forage_type~([^~]+)~/,s=9,m=s+4,f=Object.prototype.toString;function p(h){var I=h.length*.75,A=h.length;h[h.length-1]==="="&&(I--,h[h.length-2]==="="&&I--);for(var P=new ArrayBuffer(I),$=new Uint8Array(P),U=0,V=0;U<A;U+=4){var ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U]),xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U+1]),Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U+2]),Ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U+3]);$[V++]=ee<<2|xe>>4,$[V++]=(xe&15)<<4|Ce>>2,$[V++]=(Ce&3)<<6|Ke&63}return P}function y(h){for(var I=new Uint8Array(h),A="",P=0;P<I.length;P+=3)A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[I[P]>>2],A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I[P]&3)<<4|I[P+1]>>4],A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I[P+1]&15)<<2|I[P+2]>>6],A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[I[P+2]&63];return I.length%3===2?A=A.substring(0,A.length-1)+"=":I.length%3===1&&(A=A.substring(0,A.length-2)+"=="),A}function E(h,I){var A="";if(h&&(A=f.call(h)),h&&(A==="[object ArrayBuffer]"||h.buffer&&f.call(h.buffer)==="[object ArrayBuffer]")){var P=void 0,$="__lfsc__:";h instanceof ArrayBuffer?(P=h,$+="arbf"):(P=h.buffer,A==="[object Int8Array]"?$+="si08":A==="[object Uint8Array]"?$+="ui08":A==="[object Uint8ClampedArray]"?$+="uic8":A==="[object Int16Array]"?$+="si16":A==="[object Uint16Array]"?$+="ur16":A==="[object Int32Array]"?$+="si32":A==="[object Uint32Array]"?$+="ui32":A==="[object Float32Array]"?$+="fl32":A==="[object Float64Array]"?$+="fl64":I(new Error("Failed to get type for BinaryArray"))),I($+y(P))}else if(A==="[object Blob]"){var U=new FileReader;U.onload=function(){var V="~~local_forage_type~"+h.type+"~"+y(this.result);I("__lfsc__:blob"+V)},U.readAsArrayBuffer(h)}else try{I(JSON.stringify(h))}catch(V){console.error("Couldn't convert value into a JSON string: ",h),I(null,V)}}function N(h){if(h.substring(0,s)!=="__lfsc__:")return JSON.parse(h);var I=h.substring(m),A=h.substring(s,m),P;if(A==="blob"&&a.test(I)){var $=I.match(a);P=$[1],I=I.substring($[0].length)}var U=p(I);switch(A){case"arbf":return U;case"blob":return i([U],{type:P});case"si08":return new Int8Array(U);case"ui08":return new Uint8Array(U);case"uic8":return new Uint8ClampedArray(U);case"si16":return new Int16Array(U);case"ur16":return new Uint16Array(U);case"si32":return new Int32Array(U);case"ui32":return new Uint32Array(U);case"fl32":return new Float32Array(U);case"fl64":return new Float64Array(U);default:throw new Error("Unkown type: "+A)}}function _(h){var I,A;if(h===null||typeof h!="object"||"isActiveClone"in h)return h;var P=h instanceof Date?new Date(h):h.constructor();try{for(var $=r(Object.keys(h)),U=$.next();!U.done;U=$.next()){var V=U.value;Object.prototype.hasOwnProperty.call(h,V)&&(h.isActiveClone=null,P[V]=_(h[V]),delete h.isActiveClone)}}catch(ee){I={error:ee}}finally{try{U&&!U.done&&(A=$.return)&&A.call($)}finally{if(I)throw I.error}}return P}function O(h,I){return(h.name||I.name)+"/"+(h.storeName||I.storeName)+"/"}function C(h,I){I&&h.then(function(A){I(null,A)},function(A){I(A)})}function F(){for(var h=[],I=0;I<arguments.length;I++)h[I]=arguments[I];if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}function L(h,I){var A=this;if(I=F.apply(this,arguments),h=typeof h!="function"&&h||{},!h.name){var P=this.config();h.name=h.name||P.name,h.storeName=h.storeName||P.storeName}var $;return h.name?$=new Promise(function(U){h.storeName?U(O(h,A._defaultConfig)):U(h.name+"/")}):$=Promise.reject("Invalid arguments"),{promise:$,callback:I}}function B(h){return typeof h!="string"&&(console.warn(h+" used as a key, but it is not a string."),h=String(h)),h}var Q={bufferToString:y,deserialize:N,serialize:E,stringToBuffer:p},D={},Se=function(){function h(I){this.kp=I,this.data={}}return h.resolve=function(I){return D[I]||(D[I]=new h(I)),D[I]},h.prototype.clear=function(){this.data={}},h.prototype.drop=function(){this.clear(),delete D[this.kp]},h.prototype.get=function(I){return this.data[I]},h.prototype.key=function(I){return this.keys()[I]},h.prototype.keys=function(){return Object.keys(this.data)},h.prototype.rm=function(I){delete this.data[I]},h.prototype.set=function(I,A){this.data[I]=A},h}();function oe(h){var I=h?_(h):{},A=O(I,this._defaultConfig),P=Se.resolve(A);return this._dbInfo=I,this._dbInfo.serializer=Q,this._dbInfo.keyPrefix=A,this._dbInfo.mStore=P,Promise.resolve()}function S(h){var I=this,A=this.ready().then(function(){I._dbInfo.mStore.clear()});return C(A,h),A}function G(h,I){var A=L.apply(this,arguments),P=A.promise,$=A.callback,U=P.then(function(V){Se.resolve(V).drop()});return C(U,$),P}function x(h,I){var A=this;h=B(h);var P=this.ready().then(function(){var $=A._dbInfo.mStore.get(h);return $==null?null:A._dbInfo.serializer.deserialize($)});return C(P,I),P}function q(h,I){var A=this,P=this.ready().then(function(){for(var $=A._dbInfo.mStore,U=$.keys(),V=0;V<U.length;V++){var ee=$.get(U[V]);if(ee&&(ee=A._dbInfo.serializer.deserialize(ee)),ee=h(ee,U[V],V+1),ee!==void 0)return ee}});return C(P,I),P}function Z(h,I){var A=this,P=this.ready().then(function(){var $;try{$=A._dbInfo.mStore.key(h),$===void 0&&($=null)}catch{$=null}return $});return C(P,I),P}function ae(h){var I=this,A=this.ready().then(function(){return I._dbInfo.mStore.keys()});return C(A,h),A}function ce(h){var I=this.keys().then(function(A){return A.length});return C(I,h),I}function ue(h,I){var A=this;h=B(h);var P=this.ready().then(function(){A._dbInfo.mStore.rm(h)});return C(P,I),P}function pe(h,I,A){var P=this;h=B(h);var $=this.ready().then(function(){I===void 0&&(I=null);var U=I;return new Promise(function(V,ee){P._dbInfo.serializer.serialize(I,function(xe,Ce){if(Ce)ee(Ce);else try{P._dbInfo.mStore.set(h,xe),V(U)}catch(Ke){ee(Ke)}})})});return C($,A),$}var Te=!0;e._support=Te,e._driver=t,e._initStorage=oe,e.clear=S,e.dropInstance=G,e.getItem=x,e.iterate=q,e.key=Z,e.keys=ae,e.length=ce,e.removeItem=ue,e.setItem=pe,Object.defineProperty(e,"__esModule",{value:!0})})});var Ua={};wr(Ua,{default:()=>Da});var Ie=(e=>(e.MissingApiKey="MISSING_API_KEY",e.ModalNotReady="MODAL_NOT_READY",e.MalformedResponse="MALFORMED_RESPONSE",e.InvalidArgument="INVALID_ARGUMENT",e.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",e.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",e))(Ie||{}),we=(e=>(e.SyncWeb3Method="SYNC_WEB3_METHOD",e.DuplicateIframe="DUPLICATE_IFRAME",e.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",e.DeprecationNotice="DEPRECATION_NOTICE",e.ProductAnnouncement="ANNOUNCEMENT",e))(we||{}),ke=(e=>(e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",e[e.MagicLinkExpired=-10001]="MagicLinkExpired",e[e.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",e[e.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",e[e.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",e[e.UpdateEmailFailed=-10004]="UpdateEmailFailed",e[e.UserRequestEditEmail=-10005]="UserRequestEditEmail",e[e.InactiveRecipient=-10010]="InactiveRecipient",e[e.AccessDeniedToUser=-10011]="AccessDeniedToUser",e[e.RedirectLoginComplete=-10015]="RedirectLoginComplete",e))(ke||{}),fe=(e=>(e.MetaMask="metamask",e.CoinbaseWallet="coinbase_wallet",e))(fe||{}),We=(e=>(e.WalletSelected="wallet_selected",e.WalletConnected="wallet_connected",e.WalletRejected="wallet_rejected",e))(We||{}),T=(e=>(e.LoginWithSms="magic_auth_login_with_sms",e.LoginWithEmailOTP="magic_auth_login_with_email_otp",e.LoginWithMagicLink="magic_auth_login_with_magic_link",e.LoginWithCredential="magic_auth_login_with_credential",e.SetAuthorizationToken="magic_auth_set_authorization_token",e.GetIdToken="magic_auth_get_id_token",e.GenerateIdToken="magic_auth_generate_id_token",e.GetMetadata="magic_auth_get_metadata",e.IsLoggedIn="magic_is_logged_in",e.Logout="magic_auth_logout",e.UpdateEmail="magic_auth_update_email",e.UserSettings="magic_auth_settings",e.UserSettingsTestMode="magic_auth_settings_testing_mode",e.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",e.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",e.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",e.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",e.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",e.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",e.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",e.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",e.LogoutTestMode="magic_auth_logout_testing_mode",e.UpdateEmailTestMode="magic_auth_update_email_testing_mode",e.IntermediaryEvent="magic_intermediary_event",e.RequestAccounts="eth_requestAccounts",e.GetInfo="magic_get_info",e.ShowUI="magic_wallet",e.NFTPurchase="magic_nft_purchase",e.NFTCheckout="magic_nft_checkout",e.NFTTransfer="magic_nft_transfer",e.RequestUserInfoWithUI="mc_request_user_info",e.Disconnect="mc_disconnect",e.RecoverAccount="magic_auth_recover_account",e.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",e.MagicBoxHeartBeat="magic_box_heart_beat",e.AutoConnect="mc_auto_connect",e.Login="mc_login",e.EncryptV1="magic_auth_encrypt_v1",e.DecryptV1="magic_auth_decrypt_v1",e.ShowNFTs="magic_show_nfts",e.ShowOnRamp="magic_show_fiat_onramp",e.ShowSendTokensUI="magic_show_send_tokens_ui",e.ShowAddress="magic_show_address",e.ShowBalances="magic_show_balances",e.SendGaslessTransaction="eth_sendGaslessTransaction",e.RevealPK="magic_reveal_key",e.EnableMFA="magic_auth_enable_mfa_flow",e.DisableMFA="magic_auth_disable_mfa_flow",e))(T||{}),ve=(e=>(e.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",e.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",e.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",e.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",e.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",e.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",e.MAGIC_SEND_PRODUCT_ANNOUNCEMENT="MAGIC_SEND_PRODUCT_ANNOUNCEMENT",e.MAGIC_PONG="MAGIC_PONG",e.MAGIC_POPUP_RESPONSE="MAGIC_POPUP_RESPONSE",e.MAGIC_POPUP_OAUTH_VERIFY_RESPONSE="MAGIC_POPUP_OAUTH_VERIFY_RESPONSE",e))(ve||{}),be=(e=>(e.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",e.MAGIC_PING="MAGIC_PING",e))(be||{}),Ar=(e=>(e.UpdateEmail="update-email",e.MFA="mfa",e.Recovery="recovery",e))(Ar||{}),Sr=(e=>(e.Retry="retry",e))(Sr||{}),Or=(e=>(e.EmailSent="email-sent",e.EmailNotDeliverable="email-not-deliverable",e))(Or||{}),he=(e=>(e.VerifyEmailOtp="verify-email-otp",e.VerifyMFACode="verify-mfa-code",e.LostDevice="lost-device",e.VerifyRecoveryCode="verify-recovery-code",e.Cancel="cancel",e))(he||{}),Le=(e=>(e.VerifySmsOtp="verify-sms-otp",e.Cancel="cancel",e.Retry="retry",e))(Le||{}),Nr=(e=>(e.SmsOTPSent="sms-otp-sent",e.InvalidSmsOtp="invalid-sms-otp",e.ExpiredSmsOtp="expired-sms-otp",e))(Nr||{}),Mr=(e=>(e.EmailOTPSent="email-otp-sent",e.InvalidEmailOtp="invalid-email-otp",e.InvalidMfaOtp="invalid-mfa-otp",e.ExpiredEmailOtp="expired-email-otp",e.MfaSentHandle="mfa-sent-handle",e.RecoveryCodeSentHandle="recovery-code-sent-handle",e.InvalidRecoveryCode="invalid-recovery-code",e.RecoveryCodeSuccess="recovery-code-success",e))(Mr||{}),Je=(e=>(e.Retry="device-retry",e))(Je||{}),Tr=(e=>(e.DeviceApproved="device-approved",e.DeviceNeedsApproval="device-needs-approval",e.DeviceVerificationLinkExpired="device-verification-link-expired",e.DeviceVerificationEmailSent="device-verification-email-sent",e))(Tr||{}),de=(e=>(e.Retry="Recency/auth-factor-retry",e.Cancel="Recency/auth-factor-verification-cancel",e.VerifyEmailOtp="Recency/auth-factor-verify-email-otp",e.VerifyMFACode="Recency/verify-mfa-code",e))(de||{}),Cr=(e=>(e.PrimaryAuthFactorNeedsVerification="Recency/auth-factor-needs-verification",e.PrimaryAuthFactorVerified="Recency/auth-factor-verified",e.InvalidEmailOtp="Recency/auth-factor-invalid-email-otp",e.EmailExpired="Recency/auth-factor-verification-email-expired",e.EmailSent="Recency/auth-factor-verification-email-sent",e.EmailNotDeliverable="Recency/auth-factor-verification-email-not-deliverable",e))(Cr||{}),ne=(e=>(e.RetryWithNewEmail="UpdateEmail/retry-with-new-email",e.Cancel="UpdateEmail/new-email-verification-cancel",e.VerifyEmailOtp="UpdateEmail/new-email-verify-otp",e))(ne||{}),Lr=(e=>(e.NewAuthFactorNeedsVerification="UpdateEmail/new-email-needs-verification",e.EmailUpdated="UpdateEmail/email-updated",e.InvalidEmailOtp="UpdateEmail/new-email-invalid-email-otp",e.EmailExpired="UpdateEmail/new-email-verification-email-expired",e.EmailSent="UpdateEmail/new-email-verification-email-sent",e.EmailNotDeliverable="UpdateEmail/new-email-verification-email-not-deliverable",e.InvalidEmail="UpdateEmail/new-email-invalid",e.EmailAlreadyExists="UpdateEmail/new-email-already-exists",e))(Lr||{}),Pr=(e=>(e.IDTokenCreated="Auth/id-token-created",e))(Pr||{}),$r=(e=>(e.SuccessSignIn="Farcaster/success_sign_in",e))($r||{}),Dr=(e=>(e.MFASecretGenerated="mfa-secret-generated",e.InvalidMFAOtp="invalid-mfa-otp",e.MFARecoveryCodes="mfa-recovery-codes",e))(Dr||{}),Pe=(e=>(e.VerifyMFACode="verify-mfa-code",e.Cancel="cancel-mfa-setup",e))(Pe||{}),Ur=(e=>(e.MFACodeRequested="mfa-code-requested",e.InvalidMFAOtp="invalid-mfa-otp",e.InvalidRecoveryCode="invalid-recovery-code",e))(Ur||{}),Re=(e=>(e.VerifyMFACode="verify-mfa-code",e.LostDevice="lost-device",e.Cancel="cancel-mfa-disable",e))(Re||{}),xr=(e=>(e.Harmony="HARMONY",e))(xr||{}),ct=(e=>(e.ClosedByUser="closed-by-user",e))(ct||{}),ut=(e=>(e.ClosedByUser="closed-by-user-on-received",e))(ut||{}),Fr=(e=>(e.EnterNewPhoneNumber="enter-new-phone-number",e.EnterOtpCode="enter-otp-code",e.RecoveryFactorAlreadyExists="recovery-factor-already-exists",e.MalformedPhoneNumber="malformed-phone-number",e.InvalidOtpCode="invalid-otp-code",e))(Fr||{}),ye=(e=>(e.SendNewPhoneNumber="send-new-phone-number",e.SendOtpCode="send-otp-code",e.Cancel="cancel",e.StartEditPhoneNumber="start-edit-phone-number",e))(ye||{}),kr=(e=>(e.PhoneNumber="phone_number",e))(kr||{}),Wr=(e=>(e.SmsOtpSent="sms-otp-sent",e.LoginThrottled="login-throttled",e.InvalidSmsOtp="invalid-sms-otp",e.SmsVerified="sms-verified",e.AccountRecovered="account-recovered",e.UpdateEmailRequired="update-email-required",e))(Wr||{}),Ee=(e=>(e.Cancel="cancel",e.VerifyOtp="verify-otp-code",e.ResendSms="resend-sms-otp",e.UpdateEmail="update-email",e))(Ee||{}),Br=(e=>(e.Success="nft-checkout-success",e.Failure="nft-checkout-failure",e.Initiated="nft-checkout-initiated",e.Disconnect="disconnect",e))(Br||{}),Gr=(e=>(e.WalletInfoFetched="Wallet/wallet-info-fetched",e))(Gr||{}),Vr=(e=>(e.CloseMagicWindow="close-magic-window",e))(Vr||{});var Li=Object.create,_t=Object.defineProperty,Pi=Object.defineProperties,$i=Object.getOwnPropertyDescriptor,Di=Object.getOwnPropertyDescriptors,Ui=Object.getOwnPropertyNames,jr=Object.getOwnPropertySymbols,xi=Object.getPrototypeOf,on=Object.prototype.hasOwnProperty,Fi=Object.prototype.propertyIsEnumerable,qr=(e,t,r)=>t in e?_t(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ft=(e,t)=>{for(var r in t||(t={}))on.call(t,r)&&qr(e,r,t[r]);if(jr)for(var r of jr(t))Fi.call(t,r)&&qr(e,r,t[r]);return e},kt=(e,t)=>Pi(e,Di(t)),ki=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wi=(e,t)=>{for(var r in t)_t(e,r,{get:t[r],enumerable:!0})},Bi=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ui(t))!on.call(e,a)&&a!==r&&_t(e,a,{get:()=>t[a],enumerable:!(i=$i(t,a))||i.enumerable});return e},Gi=(e,t,r)=>(r=e!=null?Li(xi(e)):{},Bi(t||!e||!e.__esModule?_t(r,"default",{value:e,enumerable:!0}):r,e)),X=(e,t,r)=>new Promise((i,a)=>{var s=p=>{try{f(r.next(p))}catch(y){a(y)}},m=p=>{try{f(r.throw(p))}catch(y){a(y)}},f=p=>p.done?i(p.value):Promise.resolve(p.value).then(s,m);f((r=r.apply(e,t)).next())}),Vi=ki((e,t)=>{"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(i=!1));function s(y,E,N){this.fn=y,this.context=E,this.once=N||!1}function m(y,E,N,_,O){if(typeof N!="function")throw new TypeError("The listener must be a function");var C=new s(N,_||y,O),F=i?i+E:E;return y._events[F]?y._events[F].fn?y._events[F]=[y._events[F],C]:y._events[F].push(C):(y._events[F]=C,y._eventsCount++),y}function f(y,E){--y._eventsCount===0?y._events=new a:delete y._events[E]}function p(){this._events=new a,this._eventsCount=0}p.prototype.eventNames=function(){var y=[],E,N;if(this._eventsCount===0)return y;for(N in E=this._events)r.call(E,N)&&y.push(i?N.slice(1):N);return Object.getOwnPropertySymbols?y.concat(Object.getOwnPropertySymbols(E)):y},p.prototype.listeners=function(y){var E=i?i+y:y,N=this._events[E];if(!N)return[];if(N.fn)return[N.fn];for(var _=0,O=N.length,C=new Array(O);_<O;_++)C[_]=N[_].fn;return C},p.prototype.listenerCount=function(y){var E=i?i+y:y,N=this._events[E];return N?N.fn?1:N.length:0},p.prototype.emit=function(y,E,N,_,O,C){var F=i?i+y:y;if(!this._events[F])return!1;var L=this._events[F],B=arguments.length,Q,D;if(L.fn){switch(L.once&&this.removeListener(y,L.fn,void 0,!0),B){case 1:return L.fn.call(L.context),!0;case 2:return L.fn.call(L.context,E),!0;case 3:return L.fn.call(L.context,E,N),!0;case 4:return L.fn.call(L.context,E,N,_),!0;case 5:return L.fn.call(L.context,E,N,_,O),!0;case 6:return L.fn.call(L.context,E,N,_,O,C),!0}for(D=1,Q=new Array(B-1);D<B;D++)Q[D-1]=arguments[D];L.fn.apply(L.context,Q)}else{var Se=L.length,oe;for(D=0;D<Se;D++)switch(L[D].once&&this.removeListener(y,L[D].fn,void 0,!0),B){case 1:L[D].fn.call(L[D].context);break;case 2:L[D].fn.call(L[D].context,E);break;case 3:L[D].fn.call(L[D].context,E,N);break;case 4:L[D].fn.call(L[D].context,E,N,_);break;default:if(!Q)for(oe=1,Q=new Array(B-1);oe<B;oe++)Q[oe-1]=arguments[oe];L[D].fn.apply(L[D].context,Q)}}return!0},p.prototype.on=function(y,E,N){return m(this,y,E,N,!1)},p.prototype.once=function(y,E,N){return m(this,y,E,N,!0)},p.prototype.removeListener=function(y,E,N,_){var O=i?i+y:y;if(!this._events[O])return this;if(!E)return f(this,O),this;var C=this._events[O];if(C.fn)C.fn===E&&(!_||C.once)&&(!N||C.context===N)&&f(this,O);else{for(var F=0,L=[],B=C.length;F<B;F++)(C[F].fn!==E||_&&!C[F].once||N&&C[F].context!==N)&&L.push(C[F]);L.length?this._events[O]=L.length===1?L[0]:L:f(this,O)}return this},p.prototype.removeAllListeners=function(y){var E;return y?(E=i?i+y:y,this._events[E]&&f(this,E)):(this._events=new a,this._eventsCount=0),this},p.prototype.off=p.prototype.removeListener,p.prototype.addListener=p.prototype.on,p.prefixed=i,p.EventEmitter=p,typeof t<"u"&&(t.exports=p)});function ji(e){let t={exports:{}};return e(t,t.exports),t.exports}var qi=Number.MAX_SAFE_INTEGER||9007199254740991,Wt={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:qi,MAX_SAFE_COMPONENT_LENGTH:16},Ki=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{},H=Ki,at=ji(function(e,t){let{MAX_SAFE_COMPONENT_LENGTH:r}=Wt,i=(t=e.exports={}).re=[],a=t.src=[],s=t.t={},m=0,f=(p,y,E)=>{let N=m++;H(N,y),s[p]=N,a[N]=y,i[N]=new RegExp(y,E?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","[0-9]+"),f("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),f("MAINVERSION",`(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${a[s.NUMERICIDENTIFIER]}|${a[s.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${a[s.NUMERICIDENTIFIERLOOSE]}|${a[s.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER","[0-9A-Za-z-]+"),f("BUILD",`(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`),f("FULL",`^${a[s.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`),f("LOOSE",`^${a[s.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${a[s.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`),f("XRANGE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`),f("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),f("COERCERTL",a[s.COERCE],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${a[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${a[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0.0.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}),Kr=/^[0-9]+$/,an=(e,t)=>{let r=Kr.test(e),i=Kr.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},Hi=(e,t)=>an(t,e),Yi={compareIdentifiers:an,rcompareIdentifiers:Hi},{MAX_LENGTH:Hr,MAX_SAFE_INTEGER:dt}=Wt,{re:Yr,t:Xr}=at,{compareIdentifiers:Qe}=Yi,te=class{constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof te){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Hr)throw new TypeError(`version is longer than ${Hr} characters`);H("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?Yr[Xr.LOOSE]:Yr[Xr.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>dt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>dt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>dt||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let a=+i;if(a>=0&&a<dt)return a}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(H("SemVer.compare",this.version,this.options,e),!(e instanceof te)){if(typeof e=="string"&&e===this.version)return 0;e=new te(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof te||(e=new te(e,this.options)),Qe(this.major,e.major)||Qe(this.minor,e.minor)||Qe(this.patch,e.patch)}comparePre(e){if(e instanceof te||(e=new te(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(H("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return Qe(r,i)}while(++t)}compareBuild(e){e instanceof te||(e=new te(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(H("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return Qe(r,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}},Xi=(e,t,r)=>new te(e,r).compare(new te(t,r)),qe=Xi,zi=(e,t,r)=>qe(e,t,r)===0,Ji=zi,Qi=(e,t,r)=>qe(e,t,r)!==0,Zi=Qi,eo=(e,t,r)=>qe(e,t,r)>0,to=eo,ro=(e,t,r)=>qe(e,t,r)>=0,no=ro,io=(e,t,r)=>qe(e,t,r)<0,oo=io,ao=(e,t,r)=>qe(e,t,r)<=0,so=ao,lo=(e,t,r,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return Ji(e,r,i);case"!=":return Zi(e,r,i);case">":return to(e,r,i);case">=":return no(e,r,i);case"<":return oo(e,r,i);case"<=":return so(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}},Ut=lo,Ze=Symbol("SemVer ANY"),nt=class{static get ANY(){return Ze}constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof nt){if(e.loose===!!t.loose)return e;e=e.value}H("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ze?this.value="":this.value=this.operator+this.semver.version,H("comp",this)}parse(e){let t=this.options.loose?zr[Jr.COMPARATORLOOSE]:zr[Jr.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new te(r[2],this.options.loose):this.semver=Ze}toString(){return this.value}test(e){if(H("Comparator.test",e,this.options.loose),this.semver===Ze||e===Ze)return!0;if(typeof e=="string")try{e=new te(e,this.options)}catch(t){return!1}return Ut(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof nt))throw new TypeError("a Comparator is required");if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""||new Ge(e.value,t).test(this.value);if(e.operator==="")return e.value===""||new Ge(this.value,t).test(e.semver);let r=!(this.operator!==">="&&this.operator!==">"||e.operator!==">="&&e.operator!==">"),i=!(this.operator!=="<="&&this.operator!=="<"||e.operator!=="<="&&e.operator!=="<"),a=this.semver.version===e.semver.version,s=!(this.operator!==">="&&this.operator!=="<="||e.operator!==">="&&e.operator!=="<="),m=Ut(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),f=Ut(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||i||a&&s||m||f}},{re:zr,t:Jr}=at,Ge=class{constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof Ge)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Ge(e.raw,t);if(e instanceof nt)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let{loose:t}=this.options;e=e.trim();let r=t?ie[re.HYPHENRANGELOOSE]:ie[re.HYPHENRANGE];e=e.replace(r,wo(this.options.includePrerelease)),H("hyphen replace",e),e=e.replace(ie[re.COMPARATORTRIM],co),H("comparator trim",e,ie[re.COMPARATORTRIM]),e=(e=(e=e.replace(ie[re.TILDETRIM],uo)).replace(ie[re.CARETTRIM],fo)).split(/\s+/).join(" ");let i=t?ie[re.COMPARATORLOOSE]:ie[re.COMPARATOR];return e.split(" ").map(a=>ho(a,this.options)).join(" ").split(/\s+/).map(a=>Io(a,this.options)).filter(this.options.loose?a=>!!a.match(i):()=>!0).map(a=>new nt(a,this.options))}intersects(e,t){if(!(e instanceof Ge))throw new TypeError("a Range is required");return this.set.some(r=>Qr(r,t)&&e.set.some(i=>Qr(i,t)&&r.every(a=>i.every(s=>a.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new te(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(bo(this.set[t],e,this.options))return!0;return!1}},{re:ie,t:re,comparatorTrimReplace:co,tildeTrimReplace:uo,caretTrimReplace:fo}=at,Qr=(e,t)=>{let r=!0,i=e.slice(),a=i.pop();for(;r&&i.length;)r=i.every(s=>a.intersects(s,t)),a=i.pop();return r},ho=(e,t)=>(H("comp",e,t),e=po(e,t),H("caret",e),e=mo(e,t),H("tildes",e),e=Eo(e,t),H("xrange",e),e=_o(e,t),H("stars",e),e),se=e=>!e||e.toLowerCase()==="x"||e==="*",mo=(e,t)=>e.trim().split(/\s+/).map(r=>vo(r,t)).join(" "),vo=(e,t)=>{let r=t.loose?ie[re.TILDELOOSE]:ie[re.TILDE];return e.replace(r,(i,a,s,m,f)=>{let p;return H("tilde",e,i,a,s,m,f),se(a)?p="":se(s)?p=`>=${a}.0.0 <${+a+1}.0.0-0`:se(m)?p=`>=${a}.${s}.0 <${a}.${+s+1}.0-0`:f?(H("replaceTilde pr",f),p=`>=${a}.${s}.${m}-${f} <${a}.${+s+1}.0-0`):p=`>=${a}.${s}.${m} <${a}.${+s+1}.0-0`,H("tilde return",p),p})},po=(e,t)=>e.trim().split(/\s+/).map(r=>yo(r,t)).join(" "),yo=(e,t)=>{H("caret",e,t);let r=t.loose?ie[re.CARETLOOSE]:ie[re.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,(a,s,m,f,p)=>{let y;return H("caret",e,a,s,m,f,p),se(s)?y="":se(m)?y=`>=${s}.0.0${i} <${+s+1}.0.0-0`:se(f)?y=s==="0"?`>=${s}.${m}.0${i} <${s}.${+m+1}.0-0`:`>=${s}.${m}.0${i} <${+s+1}.0.0-0`:p?(H("replaceCaret pr",p),y=s==="0"?m==="0"?`>=${s}.${m}.${f}-${p} <${s}.${m}.${+f+1}-0`:`>=${s}.${m}.${f}-${p} <${s}.${+m+1}.0-0`:`>=${s}.${m}.${f}-${p} <${+s+1}.0.0-0`):(H("no pr"),y=s==="0"?m==="0"?`>=${s}.${m}.${f}${i} <${s}.${m}.${+f+1}-0`:`>=${s}.${m}.${f}${i} <${s}.${+m+1}.0-0`:`>=${s}.${m}.${f} <${+s+1}.0.0-0`),H("caret return",y),y})},Eo=(e,t)=>(H("replaceXRanges",e,t),e.split(/\s+/).map(r=>go(r,t)).join(" ")),go=(e,t)=>{e=e.trim();let r=t.loose?ie[re.XRANGELOOSE]:ie[re.XRANGE];return e.replace(r,(i,a,s,m,f,p)=>{H("xRange",e,i,a,s,m,f,p);let y=se(s),E=y||se(m),N=E||se(f),_=N;return a==="="&&_&&(a=""),p=t.includePrerelease?"-0":"",y?i=a===">"||a==="<"?"<0.0.0-0":"*":a&&_?(E&&(m=0),f=0,a===">"?(a=">=",E?(s=+s+1,m=0,f=0):(m=+m+1,f=0)):a==="<="&&(a="<",E?s=+s+1:m=+m+1),a==="<"&&(p="-0"),i=`${a+s}.${m}.${f}${p}`):E?i=`>=${s}.0.0${p} <${+s+1}.0.0-0`:N&&(i=`>=${s}.${m}.0${p} <${s}.${+m+1}.0-0`),H("xRange return",i),i})},_o=(e,t)=>(H("replaceStars",e,t),e.trim().replace(ie[re.STAR],"")),Io=(e,t)=>(H("replaceGTE0",e,t),e.trim().replace(ie[t.includePrerelease?re.GTE0PRE:re.GTE0],"")),wo=e=>(t,r,i,a,s,m,f,p,y,E,N,_,O)=>`${r=se(i)?"":se(a)?`>=${i}.0.0${e?"-0":""}`:se(s)?`>=${i}.${a}.0${e?"-0":""}`:m?`>=${r}`:`>=${r}${e?"-0":""}`} ${p=se(y)?"":se(E)?`<${+y+1}.0.0-0`:se(N)?`<${y}.${+E+1}.0-0`:_?`<=${y}.${E}.${N}-${_}`:e?`<${y}.${E}.${+N+1}-0`:`<=${p}`}`.trim(),bo=(e,t,r)=>{for(let i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let i=0;i<e.length;i++)if(H(e[i].semver),e[i].semver!==nt.ANY&&e[i].semver.prerelease.length>0){let a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0},Ro=(e,t,r)=>{try{t=new Ge(t,r)}catch(i){return!1}return t.test(e)},{MAX_LENGTH:Ao}=Wt,{re:Zr,t:en}=at,So=(e,t)=>{if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof te)return e;if(typeof e!="string"||e.length>Ao||!(t.loose?Zr[en.LOOSE]:Zr[en.FULL]).test(e))return null;try{return new te(e,t)}catch(r){return null}},Oo=So,{re:ft,t:ht}=at,No=(e,t)=>{if(e instanceof te)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;let r=null;if((t=t||{}).rtl){let i;for(;(i=ft[ht.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),ft[ht.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;ft[ht.COERCERTL].lastIndex=-1}else r=e.match(ft[ht.COERCE]);return r===null?null:Oo(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};function Mo(e){return String.fromCharCode(parseInt(e.slice(1),16))}function To(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}function Co(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,Mo))}function Lo(e){return decodeURIComponent(Array.from(atob(e),To).join(""))}function sn(e){return Co(JSON.stringify(e))}function Po(e){return JSON.parse(Lo(e))}function et(e){return typeof e=="undefined"}function $o(e){return e===null}function ln(e){return $o(e)||et(e)}function Do(e){return ln(e)?!1:!et(e.jsonrpc)&&!et(e.id)&&(!et(e.result)||!et(e.error))}function Uo(e){return ln(e)?!1:typeof e=="number"&&Object.values(ke).includes(e)}function yt(e){if(!e)return!0;for(let t in e)if(Object.hasOwnProperty.call(e,t))return!1;return!0}var Y={};function cn(e,t){return Object.assign(Y,t),e}var xo={"magic-sdk":"magic-sdk","@magic-sdk/react-native":"magic-sdk-rn","@magic-sdk/react-native-bare":"magic-sdk-rn-bare","@magic-sdk/react-native-expo":"magic-sdk-rn-expo"},Ae=class extends Error{constructor(e,t){super(`Magic SDK Error: [${e}] ${t}`),this.code=e,this.rawMessage=t,this.__proto__=Error,Object.setPrototypeOf(this,Ae.prototype)}},je=class extends Error{constructor(e){super(),this.__proto__=Error;let t=Number(e==null?void 0:e.code);this.rawMessage=(e==null?void 0:e.message)||"Internal error",this.code=Uo(t)?t:ke.InternalError,this.message=`Magic RPC Error: [${this.code}] ${this.rawMessage}`,this.data=(e==null?void 0:e.data)||void 0,Object.setPrototypeOf(this,je.prototype)}},De=class{constructor(e,t){this.code=e,this.rawMessage=t,this.message=`Magic SDK Warning: [${e}] ${t}`}log(){console.warn(this.message)}},It=class extends Error{constructor(e,t,r,i){super(`Magic Extension Error (${e.name}): [${t}] ${r}`),this.code=t,this.rawMessage=r,this.data=i,this.__proto__=Error,Object.setPrototypeOf(this,It.prototype)}},Et=class{constructor(e,t,r){this.code=t,this.rawMessage=r,this.message=`Magic Extension Warning (${e.name}): [${t}] ${r}`}log(){console.warn(this.message)}};function Fo(){return new Ae(Ie.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.")}function wt(){return new Ae(Ie.ModalNotReady,"Modal is not ready.")}function ko(){return new Ae(Ie.MalformedResponse,"Response from the Magic iframe is malformed.")}function Wo(e){return new Ae(Ie.ExtensionNotInitialized,`Extensions must be initialized with a Magic SDK instance before \`Extension.${e}\` can be accessed. Do not invoke \`Extension.${e}\` inside an extension constructor.`)}function Bo(e){let t=`Some extensions are incompatible with \`${Y.sdkName}@${Y.version}\`:`;return e.filter(r=>typeof r.compat!="undefined"&&r.compat!==null).forEach(r=>{let i=r.compat[Y.sdkName];typeof i=="string"?t+=`
1
+ "use strict";var Magic=(()=>{var Si=Object.create;var Xe=Object.defineProperty;var Oi=Object.getOwnPropertyDescriptor;var Ni=Object.getOwnPropertyNames,yr=Object.getOwnPropertySymbols,Mi=Object.getPrototypeOf,gr=Object.prototype.hasOwnProperty,Ti=Object.prototype.propertyIsEnumerable;var Er=(e,t,r)=>t in e?Xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_r=(e,t)=>{for(var r in t||(t={}))gr.call(t,r)&&Er(e,r,t[r]);if(yr)for(var r of yr(t))Ti.call(t,r)&&Er(e,r,t[r]);return e};var ze=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var Ir=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wr=(e,t)=>{for(var r in t)Xe(e,r,{get:t[r],enumerable:!0})},br=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ni(t))!gr.call(e,a)&&a!==r&&Xe(e,a,{get:()=>t[a],enumerable:!(i=Oi(t,a))||i.enumerable});return e};var Rr=(e,t,r)=>(r=e!=null?Si(Mi(e)):{},br(t||!e||!e.__esModule?Xe(r,"default",{value:e,enumerable:!0}):r,e)),Ci=e=>br(Xe({},"__esModule",{value:!0}),e);var ge=(e,t,r)=>new Promise((i,a)=>{var s=p=>{try{f(r.next(p))}catch(y){a(y)}},m=p=>{try{f(r.throw(p))}catch(y){a(y)}},f=p=>p.done?i(p.value):Promise.resolve(p.value).then(s,m);f((r=r.apply(e,t)).next())});var On=Ir((Sn,zt)=>{(function(e){if(typeof Sn=="object"&&typeof zt<"u")zt.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t;typeof window<"u"?t=window:typeof global<"u"?t=global:typeof self<"u"?t=self:t=this,t.localforage=e()}})(function(){var e,t,r;return function i(a,s,m){function f(E,N){if(!s[E]){if(!a[E]){var _=typeof ze=="function"&&ze;if(!N&&_)return _(E,!0);if(p)return p(E,!0);var O=new Error("Cannot find module '"+E+"'");throw O.code="MODULE_NOT_FOUND",O}var C=s[E]={exports:{}};a[E][0].call(C.exports,function(F){var L=a[E][1][F];return f(L||F)},C,C.exports,i,a,s,m)}return s[E].exports}for(var p=typeof ze=="function"&&ze,y=0;y<m.length;y++)f(m[y]);return f}({1:[function(i,a,s){(function(m){"use strict";var f=m.MutationObserver||m.WebKitMutationObserver,p;if(f){var y=0,E=new f(F),N=m.document.createTextNode("");E.observe(N,{characterData:!0}),p=function(){N.data=y=++y%2}}else if(!m.setImmediate&&typeof m.MessageChannel<"u"){var _=new m.MessageChannel;_.port1.onmessage=F,p=function(){_.port2.postMessage(0)}}else"document"in m&&"onreadystatechange"in m.document.createElement("script")?p=function(){var B=m.document.createElement("script");B.onreadystatechange=function(){F(),B.onreadystatechange=null,B.parentNode.removeChild(B),B=null},m.document.documentElement.appendChild(B)}:p=function(){setTimeout(F,0)};var O,C=[];function F(){O=!0;for(var B,Q,D=C.length;D;){for(Q=C,C=[],B=-1;++B<D;)Q[B]();D=C.length}O=!1}a.exports=L;function L(B){C.push(B)===1&&!O&&p()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(i,a,s){"use strict";var m=i(1);function f(){}var p={},y=["REJECTED"],E=["FULFILLED"],N=["PENDING"];a.exports=_;function _(S){if(typeof S!="function")throw new TypeError("resolver must be a function");this.state=N,this.queue=[],this.outcome=void 0,S!==f&&L(this,S)}_.prototype.catch=function(S){return this.then(null,S)},_.prototype.then=function(S,G){if(typeof S!="function"&&this.state===E||typeof G!="function"&&this.state===y)return this;var x=new this.constructor(f);if(this.state!==N){var q=this.state===E?S:G;C(x,q,this.outcome)}else this.queue.push(new O(x,S,G));return x};function O(S,G,x){this.promise=S,typeof G=="function"&&(this.onFulfilled=G,this.callFulfilled=this.otherCallFulfilled),typeof x=="function"&&(this.onRejected=x,this.callRejected=this.otherCallRejected)}O.prototype.callFulfilled=function(S){p.resolve(this.promise,S)},O.prototype.otherCallFulfilled=function(S){C(this.promise,this.onFulfilled,S)},O.prototype.callRejected=function(S){p.reject(this.promise,S)},O.prototype.otherCallRejected=function(S){C(this.promise,this.onRejected,S)};function C(S,G,x){m(function(){var q;try{q=G(x)}catch(Z){return p.reject(S,Z)}q===S?p.reject(S,new TypeError("Cannot resolve promise with itself")):p.resolve(S,q)})}p.resolve=function(S,G){var x=B(F,G);if(x.status==="error")return p.reject(S,x.value);var q=x.value;if(q)L(S,q);else{S.state=E,S.outcome=G;for(var Z=-1,ae=S.queue.length;++Z<ae;)S.queue[Z].callFulfilled(G)}return S},p.reject=function(S,G){S.state=y,S.outcome=G;for(var x=-1,q=S.queue.length;++x<q;)S.queue[x].callRejected(G);return S};function F(S){var G=S&&S.then;if(S&&(typeof S=="object"||typeof S=="function")&&typeof G=="function")return function(){G.apply(S,arguments)}}function L(S,G){var x=!1;function q(ue){x||(x=!0,p.reject(S,ue))}function Z(ue){x||(x=!0,p.resolve(S,ue))}function ae(){G(Z,q)}var ce=B(ae);ce.status==="error"&&q(ce.value)}function B(S,G){var x={};try{x.value=S(G),x.status="success"}catch(q){x.status="error",x.value=q}return x}_.resolve=Q;function Q(S){return S instanceof this?S:p.resolve(new this(f),S)}_.reject=D;function D(S){var G=new this(f);return p.reject(G,S)}_.all=Se;function Se(S){var G=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=S.length,q=!1;if(!x)return this.resolve([]);for(var Z=new Array(x),ae=0,ce=-1,ue=new this(f);++ce<x;)pe(S[ce],ce);return ue;function pe(Te,h){G.resolve(Te).then(I,function(A){q||(q=!0,p.reject(ue,A))});function I(A){Z[h]=A,++ae===x&&!q&&(q=!0,p.resolve(ue,Z))}}}_.race=oe;function oe(S){var G=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=S.length,q=!1;if(!x)return this.resolve([]);for(var Z=-1,ae=new this(f);++Z<x;)ce(S[Z]);return ae;function ce(ue){G.resolve(ue).then(function(pe){q||(q=!0,p.resolve(ae,pe))},function(pe){q||(q=!0,p.reject(ae,pe))})}}},{1:1}],3:[function(i,a,s){(function(m){"use strict";typeof m.Promise!="function"&&(m.Promise=i(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(i,a,s){"use strict";var m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function f(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function p(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var y=p();function E(){try{if(!y||!y.open)return!1;var n=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),l=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!n||l)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function N(n,l){n=n||[],l=l||{};try{return new Blob(n,l)}catch(c){if(c.name!=="TypeError")throw c;for(var o=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,u=new o,d=0;d<n.length;d+=1)u.append(n[d]);return u.getBlob(l.type)}}typeof Promise>"u"&&i(3);var _=Promise;function O(n,l){l&&n.then(function(o){l(null,o)},function(o){l(o)})}function C(n,l,o){typeof l=="function"&&n.then(l),typeof o=="function"&&n.catch(o)}function F(n){return typeof n!="string"&&(console.warn(n+" used as a key, but it is not a string."),n=String(n)),n}function L(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var B="local-forage-detect-blob-support",Q=void 0,D={},Se=Object.prototype.toString,oe="readonly",S="readwrite";function G(n){for(var l=n.length,o=new ArrayBuffer(l),u=new Uint8Array(o),d=0;d<l;d++)u[d]=n.charCodeAt(d);return o}function x(n){return new _(function(l){var o=n.transaction(B,S),u=N([""]);o.objectStore(B).put(u,"key"),o.onabort=function(d){d.preventDefault(),d.stopPropagation(),l(!1)},o.oncomplete=function(){var d=navigator.userAgent.match(/Chrome\/(\d+)/),c=navigator.userAgent.match(/Edge\//);l(c||!d||parseInt(d[1],10)>=43)}}).catch(function(){return!1})}function q(n){return typeof Q=="boolean"?_.resolve(Q):x(n).then(function(l){return Q=l,Q})}function Z(n){var l=D[n.name],o={};o.promise=new _(function(u,d){o.resolve=u,o.reject=d}),l.deferredOperations.push(o),l.dbReady?l.dbReady=l.dbReady.then(function(){return o.promise}):l.dbReady=o.promise}function ae(n){var l=D[n.name],o=l.deferredOperations.pop();if(o)return o.resolve(),o.promise}function ce(n,l){var o=D[n.name],u=o.deferredOperations.pop();if(u)return u.reject(l),u.promise}function ue(n,l){return new _(function(o,u){if(D[n.name]=D[n.name]||ee(),n.db)if(l)Z(n),n.db.close();else return o(n.db);var d=[n.name];l&&d.push(n.version);var c=y.open.apply(y,d);l&&(c.onupgradeneeded=function(v){var g=c.result;try{g.createObjectStore(n.storeName),v.oldVersion<=1&&g.createObjectStore(B)}catch(w){if(w.name==="ConstraintError")console.warn('The database "'+n.name+'" has been upgraded from version '+v.oldVersion+" to version "+v.newVersion+', but the storage "'+n.storeName+'" already exists.');else throw w}}),c.onerror=function(v){v.preventDefault(),u(c.error)},c.onsuccess=function(){var v=c.result;v.onversionchange=function(g){g.target.close()},o(v),ae(n)}})}function pe(n){return ue(n,!1)}function Te(n){return ue(n,!0)}function h(n,l){if(!n.db)return!0;var o=!n.db.objectStoreNames.contains(n.storeName),u=n.version<n.db.version,d=n.version>n.db.version;if(u&&(n.version!==l&&console.warn('The database "'+n.name+`" can't be downgraded from version `+n.db.version+" to version "+n.version+"."),n.version=n.db.version),d||o){if(o){var c=n.db.version+1;c>n.version&&(n.version=c)}return!0}return!1}function I(n){return new _(function(l,o){var u=new FileReader;u.onerror=o,u.onloadend=function(d){var c=btoa(d.target.result||"");l({__local_forage_encoded_blob:!0,data:c,type:n.type})},u.readAsBinaryString(n)})}function A(n){var l=G(atob(n.data));return N([l],{type:n.type})}function P(n){return n&&n.__local_forage_encoded_blob}function $(n){var l=this,o=l._initReady().then(function(){var u=D[l._dbInfo.name];if(u&&u.dbReady)return u.dbReady});return C(o,n,n),o}function U(n){Z(n);for(var l=D[n.name],o=l.forages,u=0;u<o.length;u++){var d=o[u];d._dbInfo.db&&(d._dbInfo.db.close(),d._dbInfo.db=null)}return n.db=null,pe(n).then(function(c){return n.db=c,h(n)?Te(n):c}).then(function(c){n.db=l.db=c;for(var v=0;v<o.length;v++)o[v]._dbInfo.db=c}).catch(function(c){throw ce(n,c),c})}function V(n,l,o,u){u===void 0&&(u=1);try{var d=n.db.transaction(n.storeName,l);o(null,d)}catch(c){if(u>0&&(!n.db||c.name==="InvalidStateError"||c.name==="NotFoundError"))return _.resolve().then(function(){if(!n.db||c.name==="NotFoundError"&&!n.db.objectStoreNames.contains(n.storeName)&&n.version<=n.db.version)return n.db&&(n.version=n.db.version+1),Te(n)}).then(function(){return U(n).then(function(){V(n,l,o,u-1)})}).catch(o);o(c)}}function ee(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function xe(n){var l=this,o={db:null};if(n)for(var u in n)o[u]=n[u];var d=D[o.name];d||(d=ee(),D[o.name]=d),d.forages.push(l),l._initReady||(l._initReady=l.ready,l.ready=$);var c=[];function v(){return _.resolve()}for(var g=0;g<d.forages.length;g++){var w=d.forages[g];w!==l&&c.push(w._initReady().catch(v))}var b=d.forages.slice(0);return _.all(c).then(function(){return o.db=d.db,pe(o)}).then(function(R){return o.db=R,h(o,l._defaultConfig.version)?Te(o):R}).then(function(R){o.db=d.db=R,l._dbInfo=o;for(var M=0;M<b.length;M++){var k=b[M];k!==l&&(k._dbInfo.db=o.db,k._dbInfo.version=o.version)}})}function Ce(n,l){var o=this;n=F(n);var u=new _(function(d,c){o.ready().then(function(){V(o._dbInfo,oe,function(v,g){if(v)return c(v);try{var w=g.objectStore(o._dbInfo.storeName),b=w.get(n);b.onsuccess=function(){var R=b.result;R===void 0&&(R=null),P(R)&&(R=A(R)),d(R)},b.onerror=function(){c(b.error)}}catch(R){c(R)}})}).catch(c)});return O(u,l),u}function Ke(n,l){var o=this,u=new _(function(d,c){o.ready().then(function(){V(o._dbInfo,oe,function(v,g){if(v)return c(v);try{var w=g.objectStore(o._dbInfo.storeName),b=w.openCursor(),R=1;b.onsuccess=function(){var M=b.result;if(M){var k=M.value;P(k)&&(k=A(k));var j=n(k,M.key,R++);j!==void 0?d(j):M.continue()}else d()},b.onerror=function(){c(b.error)}}catch(M){c(M)}})}).catch(c)});return O(u,l),u}function Ln(n,l,o){var u=this;n=F(n);var d=new _(function(c,v){var g;u.ready().then(function(){return g=u._dbInfo,Se.call(l)==="[object Blob]"?q(g.db).then(function(w){return w?l:I(l)}):l}).then(function(w){V(u._dbInfo,S,function(b,R){if(b)return v(b);try{var M=R.objectStore(u._dbInfo.storeName);w===null&&(w=void 0);var k=M.put(w,n);R.oncomplete=function(){w===void 0&&(w=null),c(w)},R.onabort=R.onerror=function(){var j=k.error?k.error:k.transaction.error;v(j)}}catch(j){v(j)}})}).catch(v)});return O(d,o),d}function Pn(n,l){var o=this;n=F(n);var u=new _(function(d,c){o.ready().then(function(){V(o._dbInfo,S,function(v,g){if(v)return c(v);try{var w=g.objectStore(o._dbInfo.storeName),b=w.delete(n);g.oncomplete=function(){d()},g.onerror=function(){c(b.error)},g.onabort=function(){var R=b.error?b.error:b.transaction.error;c(R)}}catch(R){c(R)}})}).catch(c)});return O(u,l),u}function $n(n){var l=this,o=new _(function(u,d){l.ready().then(function(){V(l._dbInfo,S,function(c,v){if(c)return d(c);try{var g=v.objectStore(l._dbInfo.storeName),w=g.clear();v.oncomplete=function(){u()},v.onabort=v.onerror=function(){var b=w.error?w.error:w.transaction.error;d(b)}}catch(b){d(b)}})}).catch(d)});return O(o,n),o}function Dn(n){var l=this,o=new _(function(u,d){l.ready().then(function(){V(l._dbInfo,oe,function(c,v){if(c)return d(c);try{var g=v.objectStore(l._dbInfo.storeName),w=g.count();w.onsuccess=function(){u(w.result)},w.onerror=function(){d(w.error)}}catch(b){d(b)}})}).catch(d)});return O(o,n),o}function Un(n,l){var o=this,u=new _(function(d,c){if(n<0){d(null);return}o.ready().then(function(){V(o._dbInfo,oe,function(v,g){if(v)return c(v);try{var w=g.objectStore(o._dbInfo.storeName),b=!1,R=w.openKeyCursor();R.onsuccess=function(){var M=R.result;if(!M){d(null);return}n===0||b?d(M.key):(b=!0,M.advance(n))},R.onerror=function(){c(R.error)}}catch(M){c(M)}})}).catch(c)});return O(u,l),u}function xn(n){var l=this,o=new _(function(u,d){l.ready().then(function(){V(l._dbInfo,oe,function(c,v){if(c)return d(c);try{var g=v.objectStore(l._dbInfo.storeName),w=g.openKeyCursor(),b=[];w.onsuccess=function(){var R=w.result;if(!R){u(b);return}b.push(R.key),R.continue()},w.onerror=function(){d(w.error)}}catch(R){d(R)}})}).catch(d)});return O(o,n),o}function Fn(n,l){l=L.apply(this,arguments);var o=this.config();n=typeof n!="function"&&n||{},n.name||(n.name=n.name||o.name,n.storeName=n.storeName||o.storeName);var u=this,d;if(!n.name)d=_.reject("Invalid arguments");else{var c=n.name===o.name&&u._dbInfo.db,v=c?_.resolve(u._dbInfo.db):pe(n).then(function(g){var w=D[n.name],b=w.forages;w.db=g;for(var R=0;R<b.length;R++)b[R]._dbInfo.db=g;return g});n.storeName?d=v.then(function(g){if(!!g.objectStoreNames.contains(n.storeName)){var w=g.version+1;Z(n);var b=D[n.name],R=b.forages;g.close();for(var M=0;M<R.length;M++){var k=R[M];k._dbInfo.db=null,k._dbInfo.version=w}var j=new _(function(K,J){var z=y.open(n.name,w);z.onerror=function(me){var Ye=z.result;Ye.close(),J(me)},z.onupgradeneeded=function(){var me=z.result;me.deleteObjectStore(n.storeName)},z.onsuccess=function(){var me=z.result;me.close(),K(me)}});return j.then(function(K){b.db=K;for(var J=0;J<R.length;J++){var z=R[J];z._dbInfo.db=K,ae(z._dbInfo)}}).catch(function(K){throw(ce(n,K)||_.resolve()).catch(function(){}),K})}}):d=v.then(function(g){Z(n);var w=D[n.name],b=w.forages;g.close();for(var R=0;R<b.length;R++){var M=b[R];M._dbInfo.db=null}var k=new _(function(j,K){var J=y.deleteDatabase(n.name);J.onerror=function(){var z=J.result;z&&z.close(),K(J.error)},J.onblocked=function(){console.warn('dropInstance blocked for database "'+n.name+'" until all open connections are closed')},J.onsuccess=function(){var z=J.result;z&&z.close(),j(z)}});return k.then(function(j){w.db=j;for(var K=0;K<b.length;K++){var J=b[K];ae(J._dbInfo)}}).catch(function(j){throw(ce(n,j)||_.resolve()).catch(function(){}),j})})}return O(d,l),d}var kn={_driver:"asyncStorage",_initStorage:xe,_support:E(),iterate:Ke,getItem:Ce,setItem:Ln,removeItem:Pn,clear:$n,length:Dn,key:Un,keys:xn,dropInstance:Fn};function Wn(){return typeof openDatabase=="function"}var Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bn="~~local_forage_type~",Qt=/^~~local_forage_type~([^~]+)~/,st="__lfsc__:",Ot=st.length,Nt="arbf",Mt="blob",Zt="si08",er="ui08",tr="uic8",rr="si16",nr="si32",ir="ur16",or="ui32",ar="fl32",sr="fl64",lr=Ot+Nt.length,cr=Object.prototype.toString;function ur(n){var l=n.length*.75,o=n.length,u,d=0,c,v,g,w;n[n.length-1]==="="&&(l--,n[n.length-2]==="="&&l--);var b=new ArrayBuffer(l),R=new Uint8Array(b);for(u=0;u<o;u+=4)c=Oe.indexOf(n[u]),v=Oe.indexOf(n[u+1]),g=Oe.indexOf(n[u+2]),w=Oe.indexOf(n[u+3]),R[d++]=c<<2|v>>4,R[d++]=(v&15)<<4|g>>2,R[d++]=(g&3)<<6|w&63;return b}function Tt(n){var l=new Uint8Array(n),o="",u;for(u=0;u<l.length;u+=3)o+=Oe[l[u]>>2],o+=Oe[(l[u]&3)<<4|l[u+1]>>4],o+=Oe[(l[u+1]&15)<<2|l[u+2]>>6],o+=Oe[l[u+2]&63];return l.length%3===2?o=o.substring(0,o.length-1)+"=":l.length%3===1&&(o=o.substring(0,o.length-2)+"=="),o}function Gn(n,l){var o="";if(n&&(o=cr.call(n)),n&&(o==="[object ArrayBuffer]"||n.buffer&&cr.call(n.buffer)==="[object ArrayBuffer]")){var u,d=st;n instanceof ArrayBuffer?(u=n,d+=Nt):(u=n.buffer,o==="[object Int8Array]"?d+=Zt:o==="[object Uint8Array]"?d+=er:o==="[object Uint8ClampedArray]"?d+=tr:o==="[object Int16Array]"?d+=rr:o==="[object Uint16Array]"?d+=ir:o==="[object Int32Array]"?d+=nr:o==="[object Uint32Array]"?d+=or:o==="[object Float32Array]"?d+=ar:o==="[object Float64Array]"?d+=sr:l(new Error("Failed to get type for BinaryArray"))),l(d+Tt(u))}else if(o==="[object Blob]"){var c=new FileReader;c.onload=function(){var v=Bn+n.type+"~"+Tt(this.result);l(st+Mt+v)},c.readAsArrayBuffer(n)}else try{l(JSON.stringify(n))}catch(v){console.error("Couldn't convert value into a JSON string: ",n),l(null,v)}}function Vn(n){if(n.substring(0,Ot)!==st)return JSON.parse(n);var l=n.substring(lr),o=n.substring(Ot,lr),u;if(o===Mt&&Qt.test(l)){var d=l.match(Qt);u=d[1],l=l.substring(d[0].length)}var c=ur(l);switch(o){case Nt:return c;case Mt:return N([c],{type:u});case Zt:return new Int8Array(c);case er:return new Uint8Array(c);case tr:return new Uint8ClampedArray(c);case rr:return new Int16Array(c);case ir:return new Uint16Array(c);case nr:return new Int32Array(c);case or:return new Uint32Array(c);case ar:return new Float32Array(c);case sr:return new Float64Array(c);default:throw new Error("Unkown type: "+o)}}var Ct={serialize:Gn,deserialize:Vn,stringToBuffer:ur,bufferToString:Tt};function dr(n,l,o,u){n.executeSql("CREATE TABLE IF NOT EXISTS "+l.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],o,u)}function jn(n){var l=this,o={db:null};if(n)for(var u in n)o[u]=typeof n[u]!="string"?n[u].toString():n[u];var d=new _(function(c,v){try{o.db=openDatabase(o.name,String(o.version),o.description,o.size)}catch(g){return v(g)}o.db.transaction(function(g){dr(g,o,function(){l._dbInfo=o,c()},function(w,b){v(b)})},v)});return o.serializer=Ct,d}function Ne(n,l,o,u,d,c){n.executeSql(o,u,d,function(v,g){g.code===g.SYNTAX_ERR?v.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[l.storeName],function(w,b){b.rows.length?c(w,g):dr(w,l,function(){w.executeSql(o,u,d,c)},c)},c):c(v,g)},c)}function qn(n,l){var o=this;n=F(n);var u=new _(function(d,c){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(g){Ne(g,v,"SELECT * FROM "+v.storeName+" WHERE key = ? LIMIT 1",[n],function(w,b){var R=b.rows.length?b.rows.item(0).value:null;R&&(R=v.serializer.deserialize(R)),d(R)},function(w,b){c(b)})})}).catch(c)});return O(u,l),u}function Kn(n,l){var o=this,u=new _(function(d,c){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(g){Ne(g,v,"SELECT * FROM "+v.storeName,[],function(w,b){for(var R=b.rows,M=R.length,k=0;k<M;k++){var j=R.item(k),K=j.value;if(K&&(K=v.serializer.deserialize(K)),K=n(K,j.key,k+1),K!==void 0){d(K);return}}d()},function(w,b){c(b)})})}).catch(c)});return O(u,l),u}function fr(n,l,o,u){var d=this;n=F(n);var c=new _(function(v,g){d.ready().then(function(){l===void 0&&(l=null);var w=l,b=d._dbInfo;b.serializer.serialize(l,function(R,M){M?g(M):b.db.transaction(function(k){Ne(k,b,"INSERT OR REPLACE INTO "+b.storeName+" (key, value) VALUES (?, ?)",[n,R],function(){v(w)},function(j,K){g(K)})},function(k){if(k.code===k.QUOTA_ERR){if(u>0){v(fr.apply(d,[n,w,o,u-1]));return}g(k)}})})}).catch(g)});return O(c,o),c}function Hn(n,l,o){return fr.apply(this,[n,l,o,1])}function Yn(n,l){var o=this;n=F(n);var u=new _(function(d,c){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(g){Ne(g,v,"DELETE FROM "+v.storeName+" WHERE key = ?",[n],function(){d()},function(w,b){c(b)})})}).catch(c)});return O(u,l),u}function Xn(n){var l=this,o=new _(function(u,d){l.ready().then(function(){var c=l._dbInfo;c.db.transaction(function(v){Ne(v,c,"DELETE FROM "+c.storeName,[],function(){u()},function(g,w){d(w)})})}).catch(d)});return O(o,n),o}function zn(n){var l=this,o=new _(function(u,d){l.ready().then(function(){var c=l._dbInfo;c.db.transaction(function(v){Ne(v,c,"SELECT COUNT(key) as c FROM "+c.storeName,[],function(g,w){var b=w.rows.item(0).c;u(b)},function(g,w){d(w)})})}).catch(d)});return O(o,n),o}function Jn(n,l){var o=this,u=new _(function(d,c){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(g){Ne(g,v,"SELECT key FROM "+v.storeName+" WHERE id = ? LIMIT 1",[n+1],function(w,b){var R=b.rows.length?b.rows.item(0).key:null;d(R)},function(w,b){c(b)})})}).catch(c)});return O(u,l),u}function Qn(n){var l=this,o=new _(function(u,d){l.ready().then(function(){var c=l._dbInfo;c.db.transaction(function(v){Ne(v,c,"SELECT key FROM "+c.storeName,[],function(g,w){for(var b=[],R=0;R<w.rows.length;R++)b.push(w.rows.item(R).key);u(b)},function(g,w){d(w)})})}).catch(d)});return O(o,n),o}function Zn(n){return new _(function(l,o){n.transaction(function(u){u.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(d,c){for(var v=[],g=0;g<c.rows.length;g++)v.push(c.rows.item(g).name);l({db:n,storeNames:v})},function(d,c){o(c)})},function(u){o(u)})})}function ei(n,l){l=L.apply(this,arguments);var o=this.config();n=typeof n!="function"&&n||{},n.name||(n.name=n.name||o.name,n.storeName=n.storeName||o.storeName);var u=this,d;return n.name?d=new _(function(c){var v;n.name===o.name?v=u._dbInfo.db:v=openDatabase(n.name,"","",0),n.storeName?c({db:v,storeNames:[n.storeName]}):c(Zn(v))}).then(function(c){return new _(function(v,g){c.db.transaction(function(w){function b(j){return new _(function(K,J){w.executeSql("DROP TABLE IF EXISTS "+j,[],function(){K()},function(z,me){J(me)})})}for(var R=[],M=0,k=c.storeNames.length;M<k;M++)R.push(b(c.storeNames[M]));_.all(R).then(function(){v()}).catch(function(j){g(j)})},function(w){g(w)})})}):d=_.reject("Invalid arguments"),O(d,l),d}var ti={_driver:"webSQLStorage",_initStorage:jn,_support:Wn(),iterate:Kn,getItem:qn,setItem:Hn,removeItem:Yn,clear:Xn,length:zn,key:Jn,keys:Qn,dropInstance:ei};function ri(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function hr(n,l){var o=n.name+"/";return n.storeName!==l.storeName&&(o+=n.storeName+"/"),o}function ni(){var n="_localforage_support_test";try{return localStorage.setItem(n,!0),localStorage.removeItem(n),!1}catch{return!0}}function ii(){return!ni()||localStorage.length>0}function oi(n){var l=this,o={};if(n)for(var u in n)o[u]=n[u];return o.keyPrefix=hr(n,l._defaultConfig),ii()?(l._dbInfo=o,o.serializer=Ct,_.resolve()):_.reject()}function ai(n){var l=this,o=l.ready().then(function(){for(var u=l._dbInfo.keyPrefix,d=localStorage.length-1;d>=0;d--){var c=localStorage.key(d);c.indexOf(u)===0&&localStorage.removeItem(c)}});return O(o,n),o}function si(n,l){var o=this;n=F(n);var u=o.ready().then(function(){var d=o._dbInfo,c=localStorage.getItem(d.keyPrefix+n);return c&&(c=d.serializer.deserialize(c)),c});return O(u,l),u}function li(n,l){var o=this,u=o.ready().then(function(){for(var d=o._dbInfo,c=d.keyPrefix,v=c.length,g=localStorage.length,w=1,b=0;b<g;b++){var R=localStorage.key(b);if(R.indexOf(c)===0){var M=localStorage.getItem(R);if(M&&(M=d.serializer.deserialize(M)),M=n(M,R.substring(v),w++),M!==void 0)return M}}});return O(u,l),u}function ci(n,l){var o=this,u=o.ready().then(function(){var d=o._dbInfo,c;try{c=localStorage.key(n)}catch{c=null}return c&&(c=c.substring(d.keyPrefix.length)),c});return O(u,l),u}function ui(n){var l=this,o=l.ready().then(function(){for(var u=l._dbInfo,d=localStorage.length,c=[],v=0;v<d;v++){var g=localStorage.key(v);g.indexOf(u.keyPrefix)===0&&c.push(g.substring(u.keyPrefix.length))}return c});return O(o,n),o}function di(n){var l=this,o=l.keys().then(function(u){return u.length});return O(o,n),o}function fi(n,l){var o=this;n=F(n);var u=o.ready().then(function(){var d=o._dbInfo;localStorage.removeItem(d.keyPrefix+n)});return O(u,l),u}function hi(n,l,o){var u=this;n=F(n);var d=u.ready().then(function(){l===void 0&&(l=null);var c=l;return new _(function(v,g){var w=u._dbInfo;w.serializer.serialize(l,function(b,R){if(R)g(R);else try{localStorage.setItem(w.keyPrefix+n,b),v(c)}catch(M){(M.name==="QuotaExceededError"||M.name==="NS_ERROR_DOM_QUOTA_REACHED")&&g(M),g(M)}})})});return O(d,o),d}function mi(n,l){if(l=L.apply(this,arguments),n=typeof n!="function"&&n||{},!n.name){var o=this.config();n.name=n.name||o.name,n.storeName=n.storeName||o.storeName}var u=this,d;return n.name?d=new _(function(c){n.storeName?c(hr(n,u._defaultConfig)):c(n.name+"/")}).then(function(c){for(var v=localStorage.length-1;v>=0;v--){var g=localStorage.key(v);g.indexOf(c)===0&&localStorage.removeItem(g)}}):d=_.reject("Invalid arguments"),O(d,l),d}var vi={_driver:"localStorageWrapper",_initStorage:oi,_support:ri(),iterate:li,getItem:si,setItem:hi,removeItem:fi,clear:ai,length:di,key:ci,keys:ui,dropInstance:mi},pi=function(l,o){return l===o||typeof l=="number"&&typeof o=="number"&&isNaN(l)&&isNaN(o)},yi=function(l,o){for(var u=l.length,d=0;d<u;){if(pi(l[d],o))return!0;d++}return!1},mr=Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"},He={},vr={},Fe={INDEXEDDB:kn,WEBSQL:ti,LOCALSTORAGE:vi},Ei=[Fe.INDEXEDDB._driver,Fe.WEBSQL._driver,Fe.LOCALSTORAGE._driver],lt=["dropInstance"],Lt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(lt),gi={description:"",driver:Ei.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function _i(n,l){n[l]=function(){var o=arguments;return n.ready().then(function(){return n[l].apply(n,o)})}}function Pt(){for(var n=1;n<arguments.length;n++){var l=arguments[n];if(l)for(var o in l)l.hasOwnProperty(o)&&(mr(l[o])?arguments[0][o]=l[o].slice():arguments[0][o]=l[o])}return arguments[0]}var Ii=function(){function n(l){f(this,n);for(var o in Fe)if(Fe.hasOwnProperty(o)){var u=Fe[o],d=u._driver;this[o]=d,He[d]||this.defineDriver(u)}this._defaultConfig=Pt({},gi),this._config=Pt({},this._defaultConfig,l),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return n.prototype.config=function(o){if((typeof o>"u"?"undefined":m(o))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var u in o){if(u==="storeName"&&(o[u]=o[u].replace(/\W/g,"_")),u==="version"&&typeof o[u]!="number")return new Error("Database version must be a number.");this._config[u]=o[u]}return"driver"in o&&o.driver?this.setDriver(this._config.driver):!0}else return typeof o=="string"?this._config[o]:this._config},n.prototype.defineDriver=function(o,u,d){var c=new _(function(v,g){try{var w=o._driver,b=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!o._driver){g(b);return}for(var R=Lt.concat("_initStorage"),M=0,k=R.length;M<k;M++){var j=R[M],K=!yi(lt,j);if((K||o[j])&&typeof o[j]!="function"){g(b);return}}var J=function(){for(var Ye=function(Ri){return function(){var Ai=new Error("Method "+Ri+" is not implemented by the current driver"),pr=_.reject(Ai);return O(pr,arguments[arguments.length-1]),pr}},$t=0,bi=lt.length;$t<bi;$t++){var Dt=lt[$t];o[Dt]||(o[Dt]=Ye(Dt))}};J();var z=function(Ye){He[w]&&console.info("Redefining LocalForage driver: "+w),He[w]=o,vr[w]=Ye,v()};"_support"in o?o._support&&typeof o._support=="function"?o._support().then(z,g):z(!!o._support):z(!0)}catch(me){g(me)}});return C(c,u,d),c},n.prototype.driver=function(){return this._driver||null},n.prototype.getDriver=function(o,u,d){var c=He[o]?_.resolve(He[o]):_.reject(new Error("Driver not found."));return C(c,u,d),c},n.prototype.getSerializer=function(o){var u=_.resolve(Ct);return C(u,o),u},n.prototype.ready=function(o){var u=this,d=u._driverSet.then(function(){return u._ready===null&&(u._ready=u._initDriver()),u._ready});return C(d,o,o),d},n.prototype.setDriver=function(o,u,d){var c=this;mr(o)||(o=[o]);var v=this._getSupportedDrivers(o);function g(){c._config.driver=c.driver()}function w(M){return c._extend(M),g(),c._ready=c._initStorage(c._config),c._ready}function b(M){return function(){var k=0;function j(){for(;k<M.length;){var K=M[k];return k++,c._dbInfo=null,c._ready=null,c.getDriver(K).then(w).catch(j)}g();var J=new Error("No available storage method found.");return c._driverSet=_.reject(J),c._driverSet}return j()}}var R=this._driverSet!==null?this._driverSet.catch(function(){return _.resolve()}):_.resolve();return this._driverSet=R.then(function(){var M=v[0];return c._dbInfo=null,c._ready=null,c.getDriver(M).then(function(k){c._driver=k._driver,g(),c._wrapLibraryMethodsWithReady(),c._initDriver=b(v)})}).catch(function(){g();var M=new Error("No available storage method found.");return c._driverSet=_.reject(M),c._driverSet}),C(this._driverSet,u,d),this._driverSet},n.prototype.supports=function(o){return!!vr[o]},n.prototype._extend=function(o){Pt(this,o)},n.prototype._getSupportedDrivers=function(o){for(var u=[],d=0,c=o.length;d<c;d++){var v=o[d];this.supports(v)&&u.push(v)}return u},n.prototype._wrapLibraryMethodsWithReady=function(){for(var o=0,u=Lt.length;o<u;o++)_i(this,Lt[o])},n.prototype.createInstance=function(o){return new n(o)},n}(),wi=new Ii;a.exports=wi},{3:3}]},{},[4])(4)})});var Mn=Ir((Rt,Nn)=>{(function(e,t){typeof Rt=="object"&&typeof Nn<"u"?t(Rt):typeof define=="function"&&define.amd?define("localforage-driver-memory",["exports"],t):t(e.LocalforageDriverMemory={})})(typeof self<"u"?self:Rt,function(e){"use strict";var t="localforage-driver-memory";function r(h){var I=typeof Symbol=="function"&&h[Symbol.iterator],A=0;return I?I.call(h):{next:function(){return h&&A>=h.length&&(h=void 0),{value:h&&h[A++],done:!h}}}}function i(h,I){h=h||[],I=I||{};try{return new Blob(h,I)}catch(U){if(U.name!=="TypeError")throw U;for(var A=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,P=new A,$=0;$<h.length;$+=1)P.append(h[$]);return P.getBlob(I.type)}}var a=/^~~local_forage_type~([^~]+)~/,s=9,m=s+4,f=Object.prototype.toString;function p(h){var I=h.length*.75,A=h.length;h[h.length-1]==="="&&(I--,h[h.length-2]==="="&&I--);for(var P=new ArrayBuffer(I),$=new Uint8Array(P),U=0,V=0;U<A;U+=4){var ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U]),xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U+1]),Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U+2]),Ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U+3]);$[V++]=ee<<2|xe>>4,$[V++]=(xe&15)<<4|Ce>>2,$[V++]=(Ce&3)<<6|Ke&63}return P}function y(h){for(var I=new Uint8Array(h),A="",P=0;P<I.length;P+=3)A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[I[P]>>2],A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I[P]&3)<<4|I[P+1]>>4],A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I[P+1]&15)<<2|I[P+2]>>6],A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[I[P+2]&63];return I.length%3===2?A=A.substring(0,A.length-1)+"=":I.length%3===1&&(A=A.substring(0,A.length-2)+"=="),A}function E(h,I){var A="";if(h&&(A=f.call(h)),h&&(A==="[object ArrayBuffer]"||h.buffer&&f.call(h.buffer)==="[object ArrayBuffer]")){var P=void 0,$="__lfsc__:";h instanceof ArrayBuffer?(P=h,$+="arbf"):(P=h.buffer,A==="[object Int8Array]"?$+="si08":A==="[object Uint8Array]"?$+="ui08":A==="[object Uint8ClampedArray]"?$+="uic8":A==="[object Int16Array]"?$+="si16":A==="[object Uint16Array]"?$+="ur16":A==="[object Int32Array]"?$+="si32":A==="[object Uint32Array]"?$+="ui32":A==="[object Float32Array]"?$+="fl32":A==="[object Float64Array]"?$+="fl64":I(new Error("Failed to get type for BinaryArray"))),I($+y(P))}else if(A==="[object Blob]"){var U=new FileReader;U.onload=function(){var V="~~local_forage_type~"+h.type+"~"+y(this.result);I("__lfsc__:blob"+V)},U.readAsArrayBuffer(h)}else try{I(JSON.stringify(h))}catch(V){console.error("Couldn't convert value into a JSON string: ",h),I(null,V)}}function N(h){if(h.substring(0,s)!=="__lfsc__:")return JSON.parse(h);var I=h.substring(m),A=h.substring(s,m),P;if(A==="blob"&&a.test(I)){var $=I.match(a);P=$[1],I=I.substring($[0].length)}var U=p(I);switch(A){case"arbf":return U;case"blob":return i([U],{type:P});case"si08":return new Int8Array(U);case"ui08":return new Uint8Array(U);case"uic8":return new Uint8ClampedArray(U);case"si16":return new Int16Array(U);case"ur16":return new Uint16Array(U);case"si32":return new Int32Array(U);case"ui32":return new Uint32Array(U);case"fl32":return new Float32Array(U);case"fl64":return new Float64Array(U);default:throw new Error("Unkown type: "+A)}}function _(h){var I,A;if(h===null||typeof h!="object"||"isActiveClone"in h)return h;var P=h instanceof Date?new Date(h):h.constructor();try{for(var $=r(Object.keys(h)),U=$.next();!U.done;U=$.next()){var V=U.value;Object.prototype.hasOwnProperty.call(h,V)&&(h.isActiveClone=null,P[V]=_(h[V]),delete h.isActiveClone)}}catch(ee){I={error:ee}}finally{try{U&&!U.done&&(A=$.return)&&A.call($)}finally{if(I)throw I.error}}return P}function O(h,I){return(h.name||I.name)+"/"+(h.storeName||I.storeName)+"/"}function C(h,I){I&&h.then(function(A){I(null,A)},function(A){I(A)})}function F(){for(var h=[],I=0;I<arguments.length;I++)h[I]=arguments[I];if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}function L(h,I){var A=this;if(I=F.apply(this,arguments),h=typeof h!="function"&&h||{},!h.name){var P=this.config();h.name=h.name||P.name,h.storeName=h.storeName||P.storeName}var $;return h.name?$=new Promise(function(U){h.storeName?U(O(h,A._defaultConfig)):U(h.name+"/")}):$=Promise.reject("Invalid arguments"),{promise:$,callback:I}}function B(h){return typeof h!="string"&&(console.warn(h+" used as a key, but it is not a string."),h=String(h)),h}var Q={bufferToString:y,deserialize:N,serialize:E,stringToBuffer:p},D={},Se=function(){function h(I){this.kp=I,this.data={}}return h.resolve=function(I){return D[I]||(D[I]=new h(I)),D[I]},h.prototype.clear=function(){this.data={}},h.prototype.drop=function(){this.clear(),delete D[this.kp]},h.prototype.get=function(I){return this.data[I]},h.prototype.key=function(I){return this.keys()[I]},h.prototype.keys=function(){return Object.keys(this.data)},h.prototype.rm=function(I){delete this.data[I]},h.prototype.set=function(I,A){this.data[I]=A},h}();function oe(h){var I=h?_(h):{},A=O(I,this._defaultConfig),P=Se.resolve(A);return this._dbInfo=I,this._dbInfo.serializer=Q,this._dbInfo.keyPrefix=A,this._dbInfo.mStore=P,Promise.resolve()}function S(h){var I=this,A=this.ready().then(function(){I._dbInfo.mStore.clear()});return C(A,h),A}function G(h,I){var A=L.apply(this,arguments),P=A.promise,$=A.callback,U=P.then(function(V){Se.resolve(V).drop()});return C(U,$),P}function x(h,I){var A=this;h=B(h);var P=this.ready().then(function(){var $=A._dbInfo.mStore.get(h);return $==null?null:A._dbInfo.serializer.deserialize($)});return C(P,I),P}function q(h,I){var A=this,P=this.ready().then(function(){for(var $=A._dbInfo.mStore,U=$.keys(),V=0;V<U.length;V++){var ee=$.get(U[V]);if(ee&&(ee=A._dbInfo.serializer.deserialize(ee)),ee=h(ee,U[V],V+1),ee!==void 0)return ee}});return C(P,I),P}function Z(h,I){var A=this,P=this.ready().then(function(){var $;try{$=A._dbInfo.mStore.key(h),$===void 0&&($=null)}catch{$=null}return $});return C(P,I),P}function ae(h){var I=this,A=this.ready().then(function(){return I._dbInfo.mStore.keys()});return C(A,h),A}function ce(h){var I=this.keys().then(function(A){return A.length});return C(I,h),I}function ue(h,I){var A=this;h=B(h);var P=this.ready().then(function(){A._dbInfo.mStore.rm(h)});return C(P,I),P}function pe(h,I,A){var P=this;h=B(h);var $=this.ready().then(function(){I===void 0&&(I=null);var U=I;return new Promise(function(V,ee){P._dbInfo.serializer.serialize(I,function(xe,Ce){if(Ce)ee(Ce);else try{P._dbInfo.mStore.set(h,xe),V(U)}catch(Ke){ee(Ke)}})})});return C($,A),$}var Te=!0;e._support=Te,e._driver=t,e._initStorage=oe,e.clear=S,e.dropInstance=G,e.getItem=x,e.iterate=q,e.key=Z,e.keys=ae,e.length=ce,e.removeItem=ue,e.setItem=pe,Object.defineProperty(e,"__esModule",{value:!0})})});var Ua={};wr(Ua,{default:()=>Da});var Ie=(e=>(e.MissingApiKey="MISSING_API_KEY",e.ModalNotReady="MODAL_NOT_READY",e.MalformedResponse="MALFORMED_RESPONSE",e.InvalidArgument="INVALID_ARGUMENT",e.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",e.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",e))(Ie||{}),we=(e=>(e.SyncWeb3Method="SYNC_WEB3_METHOD",e.DuplicateIframe="DUPLICATE_IFRAME",e.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",e.DeprecationNotice="DEPRECATION_NOTICE",e.ProductAnnouncement="ANNOUNCEMENT",e))(we||{}),ke=(e=>(e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",e[e.MagicLinkExpired=-10001]="MagicLinkExpired",e[e.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",e[e.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",e[e.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",e[e.UpdateEmailFailed=-10004]="UpdateEmailFailed",e[e.UserRequestEditEmail=-10005]="UserRequestEditEmail",e[e.InactiveRecipient=-10010]="InactiveRecipient",e[e.AccessDeniedToUser=-10011]="AccessDeniedToUser",e[e.RedirectLoginComplete=-10015]="RedirectLoginComplete",e))(ke||{}),fe=(e=>(e.MetaMask="metamask",e.CoinbaseWallet="coinbase_wallet",e))(fe||{}),We=(e=>(e.WalletSelected="wallet_selected",e.WalletConnected="wallet_connected",e.WalletRejected="wallet_rejected",e))(We||{}),T=(e=>(e.LoginWithSms="magic_auth_login_with_sms",e.LoginWithEmailOTP="magic_auth_login_with_email_otp",e.LoginWithMagicLink="magic_auth_login_with_magic_link",e.LoginWithCredential="magic_auth_login_with_credential",e.SetAuthorizationToken="magic_auth_set_authorization_token",e.GetIdToken="magic_auth_get_id_token",e.GenerateIdToken="magic_auth_generate_id_token",e.GetMetadata="magic_auth_get_metadata",e.IsLoggedIn="magic_is_logged_in",e.Logout="magic_auth_logout",e.UpdateEmail="magic_auth_update_email",e.UserSettings="magic_auth_settings",e.UserSettingsTestMode="magic_auth_settings_testing_mode",e.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",e.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",e.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",e.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",e.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",e.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",e.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",e.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",e.LogoutTestMode="magic_auth_logout_testing_mode",e.UpdateEmailTestMode="magic_auth_update_email_testing_mode",e.IntermediaryEvent="magic_intermediary_event",e.RequestAccounts="eth_requestAccounts",e.GetInfo="magic_get_info",e.ShowUI="magic_wallet",e.NFTPurchase="magic_nft_purchase",e.NFTCheckout="magic_nft_checkout",e.NFTTransfer="magic_nft_transfer",e.RequestUserInfoWithUI="mc_request_user_info",e.Disconnect="mc_disconnect",e.RecoverAccount="magic_auth_recover_account",e.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",e.MagicBoxHeartBeat="magic_box_heart_beat",e.AutoConnect="mc_auto_connect",e.Login="mc_login",e.EncryptV1="magic_auth_encrypt_v1",e.DecryptV1="magic_auth_decrypt_v1",e.ShowNFTs="magic_show_nfts",e.ShowOnRamp="magic_show_fiat_onramp",e.ShowSendTokensUI="magic_show_send_tokens_ui",e.ShowAddress="magic_show_address",e.ShowBalances="magic_show_balances",e.SendGaslessTransaction="eth_sendGaslessTransaction",e.RevealPK="magic_reveal_key",e.EnableMFA="magic_auth_enable_mfa_flow",e.DisableMFA="magic_auth_disable_mfa_flow",e))(T||{}),ve=(e=>(e.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",e.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",e.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",e.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",e.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",e.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",e.MAGIC_SEND_PRODUCT_ANNOUNCEMENT="MAGIC_SEND_PRODUCT_ANNOUNCEMENT",e.MAGIC_PONG="MAGIC_PONG",e.MAGIC_POPUP_RESPONSE="MAGIC_POPUP_RESPONSE",e.MAGIC_POPUP_OAUTH_VERIFY_RESPONSE="MAGIC_POPUP_OAUTH_VERIFY_RESPONSE",e))(ve||{}),be=(e=>(e.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",e.MAGIC_PING="MAGIC_PING",e))(be||{}),Ar=(e=>(e.UpdateEmail="update-email",e.MFA="mfa",e.Recovery="recovery",e))(Ar||{}),Sr=(e=>(e.Retry="retry",e))(Sr||{}),Or=(e=>(e.EmailSent="email-sent",e.EmailNotDeliverable="email-not-deliverable",e))(Or||{}),he=(e=>(e.VerifyEmailOtp="verify-email-otp",e.VerifyMFACode="verify-mfa-code",e.LostDevice="lost-device",e.VerifyRecoveryCode="verify-recovery-code",e.Cancel="cancel",e))(he||{}),Le=(e=>(e.VerifySmsOtp="verify-sms-otp",e.Cancel="cancel",e.Retry="retry",e))(Le||{}),Nr=(e=>(e.SmsOTPSent="sms-otp-sent",e.InvalidSmsOtp="invalid-sms-otp",e.ExpiredSmsOtp="expired-sms-otp",e))(Nr||{}),Mr=(e=>(e.EmailOTPSent="email-otp-sent",e.InvalidEmailOtp="invalid-email-otp",e.InvalidMfaOtp="invalid-mfa-otp",e.ExpiredEmailOtp="expired-email-otp",e.MfaSentHandle="mfa-sent-handle",e.RecoveryCodeSentHandle="recovery-code-sent-handle",e.InvalidRecoveryCode="invalid-recovery-code",e.RecoveryCodeSuccess="recovery-code-success",e))(Mr||{}),Je=(e=>(e.Retry="device-retry",e))(Je||{}),Tr=(e=>(e.DeviceApproved="device-approved",e.DeviceNeedsApproval="device-needs-approval",e.DeviceVerificationLinkExpired="device-verification-link-expired",e.DeviceVerificationEmailSent="device-verification-email-sent",e))(Tr||{}),de=(e=>(e.Retry="Recency/auth-factor-retry",e.Cancel="Recency/auth-factor-verification-cancel",e.VerifyEmailOtp="Recency/auth-factor-verify-email-otp",e.VerifyMFACode="Recency/verify-mfa-code",e))(de||{}),Cr=(e=>(e.PrimaryAuthFactorNeedsVerification="Recency/auth-factor-needs-verification",e.PrimaryAuthFactorVerified="Recency/auth-factor-verified",e.InvalidEmailOtp="Recency/auth-factor-invalid-email-otp",e.EmailExpired="Recency/auth-factor-verification-email-expired",e.EmailSent="Recency/auth-factor-verification-email-sent",e.EmailNotDeliverable="Recency/auth-factor-verification-email-not-deliverable",e))(Cr||{}),ne=(e=>(e.RetryWithNewEmail="UpdateEmail/retry-with-new-email",e.Cancel="UpdateEmail/new-email-verification-cancel",e.VerifyEmailOtp="UpdateEmail/new-email-verify-otp",e))(ne||{}),Lr=(e=>(e.NewAuthFactorNeedsVerification="UpdateEmail/new-email-needs-verification",e.EmailUpdated="UpdateEmail/email-updated",e.InvalidEmailOtp="UpdateEmail/new-email-invalid-email-otp",e.EmailExpired="UpdateEmail/new-email-verification-email-expired",e.EmailSent="UpdateEmail/new-email-verification-email-sent",e.EmailNotDeliverable="UpdateEmail/new-email-verification-email-not-deliverable",e.InvalidEmail="UpdateEmail/new-email-invalid",e.EmailAlreadyExists="UpdateEmail/new-email-already-exists",e))(Lr||{}),Pr=(e=>(e.IDTokenCreated="Auth/id-token-created",e))(Pr||{}),$r=(e=>(e.Cancel="Farcaster/cancel",e))($r||{}),Dr=(e=>(e.MFASecretGenerated="mfa-secret-generated",e.InvalidMFAOtp="invalid-mfa-otp",e.MFARecoveryCodes="mfa-recovery-codes",e))(Dr||{}),Pe=(e=>(e.VerifyMFACode="verify-mfa-code",e.Cancel="cancel-mfa-setup",e))(Pe||{}),Ur=(e=>(e.MFACodeRequested="mfa-code-requested",e.InvalidMFAOtp="invalid-mfa-otp",e.InvalidRecoveryCode="invalid-recovery-code",e))(Ur||{}),Re=(e=>(e.VerifyMFACode="verify-mfa-code",e.LostDevice="lost-device",e.Cancel="cancel-mfa-disable",e))(Re||{}),xr=(e=>(e.Harmony="HARMONY",e))(xr||{}),ct=(e=>(e.ClosedByUser="closed-by-user",e))(ct||{}),ut=(e=>(e.ClosedByUser="closed-by-user-on-received",e))(ut||{}),Fr=(e=>(e.EnterNewPhoneNumber="enter-new-phone-number",e.EnterOtpCode="enter-otp-code",e.RecoveryFactorAlreadyExists="recovery-factor-already-exists",e.MalformedPhoneNumber="malformed-phone-number",e.InvalidOtpCode="invalid-otp-code",e))(Fr||{}),ye=(e=>(e.SendNewPhoneNumber="send-new-phone-number",e.SendOtpCode="send-otp-code",e.Cancel="cancel",e.StartEditPhoneNumber="start-edit-phone-number",e))(ye||{}),kr=(e=>(e.PhoneNumber="phone_number",e))(kr||{}),Wr=(e=>(e.SmsOtpSent="sms-otp-sent",e.LoginThrottled="login-throttled",e.InvalidSmsOtp="invalid-sms-otp",e.SmsVerified="sms-verified",e.AccountRecovered="account-recovered",e.UpdateEmailRequired="update-email-required",e))(Wr||{}),Ee=(e=>(e.Cancel="cancel",e.VerifyOtp="verify-otp-code",e.ResendSms="resend-sms-otp",e.UpdateEmail="update-email",e))(Ee||{}),Br=(e=>(e.Success="nft-checkout-success",e.Failure="nft-checkout-failure",e.Initiated="nft-checkout-initiated",e.Disconnect="disconnect",e))(Br||{}),Gr=(e=>(e.WalletInfoFetched="Wallet/wallet-info-fetched",e))(Gr||{}),Vr=(e=>(e.CloseMagicWindow="close-magic-window",e))(Vr||{});var Li=Object.create,_t=Object.defineProperty,Pi=Object.defineProperties,$i=Object.getOwnPropertyDescriptor,Di=Object.getOwnPropertyDescriptors,Ui=Object.getOwnPropertyNames,jr=Object.getOwnPropertySymbols,xi=Object.getPrototypeOf,on=Object.prototype.hasOwnProperty,Fi=Object.prototype.propertyIsEnumerable,qr=(e,t,r)=>t in e?_t(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ft=(e,t)=>{for(var r in t||(t={}))on.call(t,r)&&qr(e,r,t[r]);if(jr)for(var r of jr(t))Fi.call(t,r)&&qr(e,r,t[r]);return e},kt=(e,t)=>Pi(e,Di(t)),ki=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wi=(e,t)=>{for(var r in t)_t(e,r,{get:t[r],enumerable:!0})},Bi=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ui(t))!on.call(e,a)&&a!==r&&_t(e,a,{get:()=>t[a],enumerable:!(i=$i(t,a))||i.enumerable});return e},Gi=(e,t,r)=>(r=e!=null?Li(xi(e)):{},Bi(t||!e||!e.__esModule?_t(r,"default",{value:e,enumerable:!0}):r,e)),X=(e,t,r)=>new Promise((i,a)=>{var s=p=>{try{f(r.next(p))}catch(y){a(y)}},m=p=>{try{f(r.throw(p))}catch(y){a(y)}},f=p=>p.done?i(p.value):Promise.resolve(p.value).then(s,m);f((r=r.apply(e,t)).next())}),Vi=ki((e,t)=>{"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(i=!1));function s(y,E,N){this.fn=y,this.context=E,this.once=N||!1}function m(y,E,N,_,O){if(typeof N!="function")throw new TypeError("The listener must be a function");var C=new s(N,_||y,O),F=i?i+E:E;return y._events[F]?y._events[F].fn?y._events[F]=[y._events[F],C]:y._events[F].push(C):(y._events[F]=C,y._eventsCount++),y}function f(y,E){--y._eventsCount===0?y._events=new a:delete y._events[E]}function p(){this._events=new a,this._eventsCount=0}p.prototype.eventNames=function(){var y=[],E,N;if(this._eventsCount===0)return y;for(N in E=this._events)r.call(E,N)&&y.push(i?N.slice(1):N);return Object.getOwnPropertySymbols?y.concat(Object.getOwnPropertySymbols(E)):y},p.prototype.listeners=function(y){var E=i?i+y:y,N=this._events[E];if(!N)return[];if(N.fn)return[N.fn];for(var _=0,O=N.length,C=new Array(O);_<O;_++)C[_]=N[_].fn;return C},p.prototype.listenerCount=function(y){var E=i?i+y:y,N=this._events[E];return N?N.fn?1:N.length:0},p.prototype.emit=function(y,E,N,_,O,C){var F=i?i+y:y;if(!this._events[F])return!1;var L=this._events[F],B=arguments.length,Q,D;if(L.fn){switch(L.once&&this.removeListener(y,L.fn,void 0,!0),B){case 1:return L.fn.call(L.context),!0;case 2:return L.fn.call(L.context,E),!0;case 3:return L.fn.call(L.context,E,N),!0;case 4:return L.fn.call(L.context,E,N,_),!0;case 5:return L.fn.call(L.context,E,N,_,O),!0;case 6:return L.fn.call(L.context,E,N,_,O,C),!0}for(D=1,Q=new Array(B-1);D<B;D++)Q[D-1]=arguments[D];L.fn.apply(L.context,Q)}else{var Se=L.length,oe;for(D=0;D<Se;D++)switch(L[D].once&&this.removeListener(y,L[D].fn,void 0,!0),B){case 1:L[D].fn.call(L[D].context);break;case 2:L[D].fn.call(L[D].context,E);break;case 3:L[D].fn.call(L[D].context,E,N);break;case 4:L[D].fn.call(L[D].context,E,N,_);break;default:if(!Q)for(oe=1,Q=new Array(B-1);oe<B;oe++)Q[oe-1]=arguments[oe];L[D].fn.apply(L[D].context,Q)}}return!0},p.prototype.on=function(y,E,N){return m(this,y,E,N,!1)},p.prototype.once=function(y,E,N){return m(this,y,E,N,!0)},p.prototype.removeListener=function(y,E,N,_){var O=i?i+y:y;if(!this._events[O])return this;if(!E)return f(this,O),this;var C=this._events[O];if(C.fn)C.fn===E&&(!_||C.once)&&(!N||C.context===N)&&f(this,O);else{for(var F=0,L=[],B=C.length;F<B;F++)(C[F].fn!==E||_&&!C[F].once||N&&C[F].context!==N)&&L.push(C[F]);L.length?this._events[O]=L.length===1?L[0]:L:f(this,O)}return this},p.prototype.removeAllListeners=function(y){var E;return y?(E=i?i+y:y,this._events[E]&&f(this,E)):(this._events=new a,this._eventsCount=0),this},p.prototype.off=p.prototype.removeListener,p.prototype.addListener=p.prototype.on,p.prefixed=i,p.EventEmitter=p,typeof t<"u"&&(t.exports=p)});function ji(e){let t={exports:{}};return e(t,t.exports),t.exports}var qi=Number.MAX_SAFE_INTEGER||9007199254740991,Wt={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:qi,MAX_SAFE_COMPONENT_LENGTH:16},Ki=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{},H=Ki,at=ji(function(e,t){let{MAX_SAFE_COMPONENT_LENGTH:r}=Wt,i=(t=e.exports={}).re=[],a=t.src=[],s=t.t={},m=0,f=(p,y,E)=>{let N=m++;H(N,y),s[p]=N,a[N]=y,i[N]=new RegExp(y,E?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","[0-9]+"),f("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),f("MAINVERSION",`(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${a[s.NUMERICIDENTIFIER]}|${a[s.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${a[s.NUMERICIDENTIFIERLOOSE]}|${a[s.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER","[0-9A-Za-z-]+"),f("BUILD",`(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`),f("FULL",`^${a[s.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`),f("LOOSE",`^${a[s.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${a[s.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`),f("XRANGE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`),f("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),f("COERCERTL",a[s.COERCE],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${a[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${a[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0.0.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}),Kr=/^[0-9]+$/,an=(e,t)=>{let r=Kr.test(e),i=Kr.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},Hi=(e,t)=>an(t,e),Yi={compareIdentifiers:an,rcompareIdentifiers:Hi},{MAX_LENGTH:Hr,MAX_SAFE_INTEGER:dt}=Wt,{re:Yr,t:Xr}=at,{compareIdentifiers:Qe}=Yi,te=class{constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof te){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Hr)throw new TypeError(`version is longer than ${Hr} characters`);H("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?Yr[Xr.LOOSE]:Yr[Xr.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>dt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>dt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>dt||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let a=+i;if(a>=0&&a<dt)return a}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(H("SemVer.compare",this.version,this.options,e),!(e instanceof te)){if(typeof e=="string"&&e===this.version)return 0;e=new te(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof te||(e=new te(e,this.options)),Qe(this.major,e.major)||Qe(this.minor,e.minor)||Qe(this.patch,e.patch)}comparePre(e){if(e instanceof te||(e=new te(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(H("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return Qe(r,i)}while(++t)}compareBuild(e){e instanceof te||(e=new te(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(H("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return Qe(r,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}},Xi=(e,t,r)=>new te(e,r).compare(new te(t,r)),qe=Xi,zi=(e,t,r)=>qe(e,t,r)===0,Ji=zi,Qi=(e,t,r)=>qe(e,t,r)!==0,Zi=Qi,eo=(e,t,r)=>qe(e,t,r)>0,to=eo,ro=(e,t,r)=>qe(e,t,r)>=0,no=ro,io=(e,t,r)=>qe(e,t,r)<0,oo=io,ao=(e,t,r)=>qe(e,t,r)<=0,so=ao,lo=(e,t,r,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return Ji(e,r,i);case"!=":return Zi(e,r,i);case">":return to(e,r,i);case">=":return no(e,r,i);case"<":return oo(e,r,i);case"<=":return so(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}},Ut=lo,Ze=Symbol("SemVer ANY"),nt=class{static get ANY(){return Ze}constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof nt){if(e.loose===!!t.loose)return e;e=e.value}H("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Ze?this.value="":this.value=this.operator+this.semver.version,H("comp",this)}parse(e){let t=this.options.loose?zr[Jr.COMPARATORLOOSE]:zr[Jr.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new te(r[2],this.options.loose):this.semver=Ze}toString(){return this.value}test(e){if(H("Comparator.test",e,this.options.loose),this.semver===Ze||e===Ze)return!0;if(typeof e=="string")try{e=new te(e,this.options)}catch(t){return!1}return Ut(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof nt))throw new TypeError("a Comparator is required");if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""||new Ge(e.value,t).test(this.value);if(e.operator==="")return e.value===""||new Ge(this.value,t).test(e.semver);let r=!(this.operator!==">="&&this.operator!==">"||e.operator!==">="&&e.operator!==">"),i=!(this.operator!=="<="&&this.operator!=="<"||e.operator!=="<="&&e.operator!=="<"),a=this.semver.version===e.semver.version,s=!(this.operator!==">="&&this.operator!=="<="||e.operator!==">="&&e.operator!=="<="),m=Ut(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),f=Ut(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||i||a&&s||m||f}},{re:zr,t:Jr}=at,Ge=class{constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof Ge)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Ge(e.raw,t);if(e instanceof nt)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let{loose:t}=this.options;e=e.trim();let r=t?ie[re.HYPHENRANGELOOSE]:ie[re.HYPHENRANGE];e=e.replace(r,wo(this.options.includePrerelease)),H("hyphen replace",e),e=e.replace(ie[re.COMPARATORTRIM],co),H("comparator trim",e,ie[re.COMPARATORTRIM]),e=(e=(e=e.replace(ie[re.TILDETRIM],uo)).replace(ie[re.CARETTRIM],fo)).split(/\s+/).join(" ");let i=t?ie[re.COMPARATORLOOSE]:ie[re.COMPARATOR];return e.split(" ").map(a=>ho(a,this.options)).join(" ").split(/\s+/).map(a=>Io(a,this.options)).filter(this.options.loose?a=>!!a.match(i):()=>!0).map(a=>new nt(a,this.options))}intersects(e,t){if(!(e instanceof Ge))throw new TypeError("a Range is required");return this.set.some(r=>Qr(r,t)&&e.set.some(i=>Qr(i,t)&&r.every(a=>i.every(s=>a.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new te(e,this.options)}catch(t){return!1}for(let t=0;t<this.set.length;t++)if(bo(this.set[t],e,this.options))return!0;return!1}},{re:ie,t:re,comparatorTrimReplace:co,tildeTrimReplace:uo,caretTrimReplace:fo}=at,Qr=(e,t)=>{let r=!0,i=e.slice(),a=i.pop();for(;r&&i.length;)r=i.every(s=>a.intersects(s,t)),a=i.pop();return r},ho=(e,t)=>(H("comp",e,t),e=po(e,t),H("caret",e),e=mo(e,t),H("tildes",e),e=Eo(e,t),H("xrange",e),e=_o(e,t),H("stars",e),e),se=e=>!e||e.toLowerCase()==="x"||e==="*",mo=(e,t)=>e.trim().split(/\s+/).map(r=>vo(r,t)).join(" "),vo=(e,t)=>{let r=t.loose?ie[re.TILDELOOSE]:ie[re.TILDE];return e.replace(r,(i,a,s,m,f)=>{let p;return H("tilde",e,i,a,s,m,f),se(a)?p="":se(s)?p=`>=${a}.0.0 <${+a+1}.0.0-0`:se(m)?p=`>=${a}.${s}.0 <${a}.${+s+1}.0-0`:f?(H("replaceTilde pr",f),p=`>=${a}.${s}.${m}-${f} <${a}.${+s+1}.0-0`):p=`>=${a}.${s}.${m} <${a}.${+s+1}.0-0`,H("tilde return",p),p})},po=(e,t)=>e.trim().split(/\s+/).map(r=>yo(r,t)).join(" "),yo=(e,t)=>{H("caret",e,t);let r=t.loose?ie[re.CARETLOOSE]:ie[re.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,(a,s,m,f,p)=>{let y;return H("caret",e,a,s,m,f,p),se(s)?y="":se(m)?y=`>=${s}.0.0${i} <${+s+1}.0.0-0`:se(f)?y=s==="0"?`>=${s}.${m}.0${i} <${s}.${+m+1}.0-0`:`>=${s}.${m}.0${i} <${+s+1}.0.0-0`:p?(H("replaceCaret pr",p),y=s==="0"?m==="0"?`>=${s}.${m}.${f}-${p} <${s}.${m}.${+f+1}-0`:`>=${s}.${m}.${f}-${p} <${s}.${+m+1}.0-0`:`>=${s}.${m}.${f}-${p} <${+s+1}.0.0-0`):(H("no pr"),y=s==="0"?m==="0"?`>=${s}.${m}.${f}${i} <${s}.${m}.${+f+1}-0`:`>=${s}.${m}.${f}${i} <${s}.${+m+1}.0-0`:`>=${s}.${m}.${f} <${+s+1}.0.0-0`),H("caret return",y),y})},Eo=(e,t)=>(H("replaceXRanges",e,t),e.split(/\s+/).map(r=>go(r,t)).join(" ")),go=(e,t)=>{e=e.trim();let r=t.loose?ie[re.XRANGELOOSE]:ie[re.XRANGE];return e.replace(r,(i,a,s,m,f,p)=>{H("xRange",e,i,a,s,m,f,p);let y=se(s),E=y||se(m),N=E||se(f),_=N;return a==="="&&_&&(a=""),p=t.includePrerelease?"-0":"",y?i=a===">"||a==="<"?"<0.0.0-0":"*":a&&_?(E&&(m=0),f=0,a===">"?(a=">=",E?(s=+s+1,m=0,f=0):(m=+m+1,f=0)):a==="<="&&(a="<",E?s=+s+1:m=+m+1),a==="<"&&(p="-0"),i=`${a+s}.${m}.${f}${p}`):E?i=`>=${s}.0.0${p} <${+s+1}.0.0-0`:N&&(i=`>=${s}.${m}.0${p} <${s}.${+m+1}.0-0`),H("xRange return",i),i})},_o=(e,t)=>(H("replaceStars",e,t),e.trim().replace(ie[re.STAR],"")),Io=(e,t)=>(H("replaceGTE0",e,t),e.trim().replace(ie[t.includePrerelease?re.GTE0PRE:re.GTE0],"")),wo=e=>(t,r,i,a,s,m,f,p,y,E,N,_,O)=>`${r=se(i)?"":se(a)?`>=${i}.0.0${e?"-0":""}`:se(s)?`>=${i}.${a}.0${e?"-0":""}`:m?`>=${r}`:`>=${r}${e?"-0":""}`} ${p=se(y)?"":se(E)?`<${+y+1}.0.0-0`:se(N)?`<${y}.${+E+1}.0-0`:_?`<=${y}.${E}.${N}-${_}`:e?`<${y}.${E}.${+N+1}-0`:`<=${p}`}`.trim(),bo=(e,t,r)=>{for(let i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let i=0;i<e.length;i++)if(H(e[i].semver),e[i].semver!==nt.ANY&&e[i].semver.prerelease.length>0){let a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0},Ro=(e,t,r)=>{try{t=new Ge(t,r)}catch(i){return!1}return t.test(e)},{MAX_LENGTH:Ao}=Wt,{re:Zr,t:en}=at,So=(e,t)=>{if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof te)return e;if(typeof e!="string"||e.length>Ao||!(t.loose?Zr[en.LOOSE]:Zr[en.FULL]).test(e))return null;try{return new te(e,t)}catch(r){return null}},Oo=So,{re:ft,t:ht}=at,No=(e,t)=>{if(e instanceof te)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;let r=null;if((t=t||{}).rtl){let i;for(;(i=ft[ht.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),ft[ht.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;ft[ht.COERCERTL].lastIndex=-1}else r=e.match(ft[ht.COERCE]);return r===null?null:Oo(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};function Mo(e){return String.fromCharCode(parseInt(e.slice(1),16))}function To(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}function Co(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,Mo))}function Lo(e){return decodeURIComponent(Array.from(atob(e),To).join(""))}function sn(e){return Co(JSON.stringify(e))}function Po(e){return JSON.parse(Lo(e))}function et(e){return typeof e=="undefined"}function $o(e){return e===null}function ln(e){return $o(e)||et(e)}function Do(e){return ln(e)?!1:!et(e.jsonrpc)&&!et(e.id)&&(!et(e.result)||!et(e.error))}function Uo(e){return ln(e)?!1:typeof e=="number"&&Object.values(ke).includes(e)}function yt(e){if(!e)return!0;for(let t in e)if(Object.hasOwnProperty.call(e,t))return!1;return!0}var Y={};function cn(e,t){return Object.assign(Y,t),e}var xo={"magic-sdk":"magic-sdk","@magic-sdk/react-native":"magic-sdk-rn","@magic-sdk/react-native-bare":"magic-sdk-rn-bare","@magic-sdk/react-native-expo":"magic-sdk-rn-expo"},Ae=class extends Error{constructor(e,t){super(`Magic SDK Error: [${e}] ${t}`),this.code=e,this.rawMessage=t,this.__proto__=Error,Object.setPrototypeOf(this,Ae.prototype)}},je=class extends Error{constructor(e){super(),this.__proto__=Error;let t=Number(e==null?void 0:e.code);this.rawMessage=(e==null?void 0:e.message)||"Internal error",this.code=Uo(t)?t:ke.InternalError,this.message=`Magic RPC Error: [${this.code}] ${this.rawMessage}`,this.data=(e==null?void 0:e.data)||void 0,Object.setPrototypeOf(this,je.prototype)}},De=class{constructor(e,t){this.code=e,this.rawMessage=t,this.message=`Magic SDK Warning: [${e}] ${t}`}log(){console.warn(this.message)}},It=class extends Error{constructor(e,t,r,i){super(`Magic Extension Error (${e.name}): [${t}] ${r}`),this.code=t,this.rawMessage=r,this.data=i,this.__proto__=Error,Object.setPrototypeOf(this,It.prototype)}},Et=class{constructor(e,t,r){this.code=t,this.rawMessage=r,this.message=`Magic Extension Warning (${e.name}): [${t}] ${r}`}log(){console.warn(this.message)}};function Fo(){return new Ae(Ie.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.")}function wt(){return new Ae(Ie.ModalNotReady,"Modal is not ready.")}function ko(){return new Ae(Ie.MalformedResponse,"Response from the Magic iframe is malformed.")}function Wo(e){return new Ae(Ie.ExtensionNotInitialized,`Extensions must be initialized with a Magic SDK instance before \`Extension.${e}\` can be accessed. Do not invoke \`Extension.${e}\` inside an extension constructor.`)}function Bo(e){let t=`Some extensions are incompatible with \`${Y.sdkName}@${Y.version}\`:`;return e.filter(r=>typeof r.compat!="undefined"&&r.compat!==null).forEach(r=>{let i=r.compat[Y.sdkName];typeof i=="string"?t+=`
2
2
  - Extension \`${r.name}\` supports version(s) \`${i}\``:i||(t+=`
3
3
  - Extension \`${r.name}\` does not support ${Y.platform} environments.`)}),new Ae(Ie.IncompatibleExtensions,t)}function Go(e){let t=r=>{let i=r+1,a=i%10,s=i%100;return a===1&&s!==11?`${i}st`:a===2&&s!==12?`${i}nd`:a===3&&s!==13?`${i}rd`:`${i}th`};return new Ae(Ie.InvalidArgument,`Invalid ${t(e.argument)} argument given to \`${e.procedure}\`.
4
4
  Expected: \`${e.expected}\`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-sdk",
3
- "version": "28.19.2-canary.842.12375745226.0",
3
+ "version": "28.19.2-canary.846.12474511164.0",
4
4
  "description": "Passwordless authentication for the web.",
5
5
  "author": "Magic Labs <team@magic.link> (https://magic.link/)",
6
6
  "license": "MIT",
@@ -29,9 +29,9 @@
29
29
  ]
30
30
  },
31
31
  "dependencies": {
32
- "@magic-sdk/commons": "24.18.2-canary.842.12375745226.0",
33
- "@magic-sdk/provider": "28.18.2-canary.842.12375745226.0",
34
- "@magic-sdk/types": "^24.16.1",
32
+ "@magic-sdk/commons": "24.18.2-canary.846.12474511164.0",
33
+ "@magic-sdk/provider": "28.18.2-canary.846.12474511164.0",
34
+ "@magic-sdk/types": "24.16.2-canary.846.12474511164.0",
35
35
  "localforage": "^1.7.4"
36
36
  },
37
37
  "devDependencies": {
@@ -40,5 +40,5 @@
40
40
  "@babel/runtime": "^7.9.6",
41
41
  "localforage-driver-memory": "^1.0.5"
42
42
  },
43
- "gitHead": "4fb370cab02463ce4887cea2002f40ed81df62e9"
43
+ "gitHead": "343b2f1d106fc26e642da17821962113c9edb1b9"
44
44
  }