magic-sdk 29.0.2-canary.863.13981938615.0 → 29.0.2-canary.863.13981975427.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 Ai=Object.create;var Xe=Object.defineProperty;var Oi=Object.getOwnPropertyDescriptor;var Ni=Object.getOwnPropertyNames,vr=Object.getOwnPropertySymbols,Ti=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty,Mi=Object.prototype.propertyIsEnumerable;var pr=(e,t,r)=>t in e?Xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gr=(e,t)=>{for(var r in t||(t={}))yr.call(t,r)&&pr(e,r,t[r]);if(vr)for(var r of vr(t))Mi.call(t,r)&&pr(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 Er=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),_r=(e,t)=>{for(var r in t)Xe(e,r,{get:t[r],enumerable:!0})},Ir=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ni(t))!yr.call(e,a)&&a!==r&&Xe(e,a,{get:()=>t[a],enumerable:!(i=Oi(t,a))||i.enumerable});return e};var wr=(e,t,r)=>(r=e!=null?Ai(Ti(e)):{},Ir(t||!e||!e.__esModule?Xe(r,"default",{value:e,enumerable:!0}):r,e)),Li=e=>Ir(Xe({},"__esModule",{value:!0}),e);var pe=(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=Er((An,Yt)=>{(function(e){if(typeof An=="object"&&typeof Yt<"u")Yt.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(g,N){if(!s[g]){if(!a[g]){var _=typeof ze=="function"&&ze;if(!N&&_)return _(g,!0);if(p)return p(g,!0);var O=new Error("Cannot find module '"+g+"'");throw O.code="MODULE_NOT_FOUND",O}var L=s[g]={exports:{}};a[g][0].call(L.exports,function(F){var C=a[g][1][F];return f(C||F)},L,L.exports,i,a,s,m)}return s[g].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,g=new f(F),N=m.document.createTextNode("");g.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 W=m.document.createElement("script");W.onreadystatechange=function(){F(),W.onreadystatechange=null,W.parentNode.removeChild(W),W=null},m.document.documentElement.appendChild(W)}:p=function(){setTimeout(F,0)};var O,L=[];function F(){O=!0;for(var W,J,$=L.length;$;){for(J=L,L=[],W=-1;++W<$;)J[W]();$=L.length}O=!1}a.exports=C;function C(W){L.push(W)===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"],g=["FULFILLED"],N=["PENDING"];a.exports=_;function _(A){if(typeof A!="function")throw new TypeError("resolver must be a function");this.state=N,this.queue=[],this.outcome=void 0,A!==f&&C(this,A)}_.prototype.catch=function(A){return this.then(null,A)},_.prototype.then=function(A,B){if(typeof A!="function"&&this.state===g||typeof B!="function"&&this.state===y)return this;var x=new this.constructor(f);if(this.state!==N){var H=this.state===g?A:B;L(x,H,this.outcome)}else this.queue.push(new O(x,A,B));return x};function O(A,B,x){this.promise=A,typeof B=="function"&&(this.onFulfilled=B,this.callFulfilled=this.otherCallFulfilled),typeof x=="function"&&(this.onRejected=x,this.callRejected=this.otherCallRejected)}O.prototype.callFulfilled=function(A){p.resolve(this.promise,A)},O.prototype.otherCallFulfilled=function(A){L(this.promise,this.onFulfilled,A)},O.prototype.callRejected=function(A){p.reject(this.promise,A)},O.prototype.otherCallRejected=function(A){L(this.promise,this.onRejected,A)};function L(A,B,x){m(function(){var H;try{H=B(x)}catch(Q){return p.reject(A,Q)}H===A?p.reject(A,new TypeError("Cannot resolve promise with itself")):p.resolve(A,H)})}p.resolve=function(A,B){var x=W(F,B);if(x.status==="error")return p.reject(A,x.value);var H=x.value;if(H)C(A,H);else{A.state=g,A.outcome=B;for(var Q=-1,ae=A.queue.length;++Q<ae;)A.queue[Q].callFulfilled(B)}return A},p.reject=function(A,B){A.state=y,A.outcome=B;for(var x=-1,H=A.queue.length;++x<H;)A.queue[x].callRejected(B);return A};function F(A){var B=A&&A.then;if(A&&(typeof A=="object"||typeof A=="function")&&typeof B=="function")return function(){B.apply(A,arguments)}}function C(A,B){var x=!1;function H(le){x||(x=!0,p.reject(A,le))}function Q(le){x||(x=!0,p.resolve(A,le))}function ae(){B(Q,H)}var ce=W(ae);ce.status==="error"&&H(ce.value)}function W(A,B){var x={};try{x.value=A(B),x.status="success"}catch(H){x.status="error",x.value=H}return x}_.resolve=J;function J(A){return A instanceof this?A:p.resolve(new this(f),A)}_.reject=$;function $(A){var B=new this(f);return p.reject(B,A)}_.all=Ae;function Ae(A){var B=this;if(Object.prototype.toString.call(A)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=A.length,H=!1;if(!x)return this.resolve([]);for(var Q=new Array(x),ae=0,ce=-1,le=new this(f);++ce<x;)ve(A[ce],ce);return le;function ve(Ce,h){B.resolve(Ce).then(I,function(S){H||(H=!0,p.reject(le,S))});function I(S){Q[h]=S,++ae===x&&!H&&(H=!0,p.resolve(le,Q))}}}_.race=oe;function oe(A){var B=this;if(Object.prototype.toString.call(A)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=A.length,H=!1;if(!x)return this.resolve([]);for(var Q=-1,ae=new this(f);++Q<x;)ce(A[Q]);return ae;function ce(le){B.resolve(le).then(function(ve){H||(H=!0,p.resolve(ae,ve))},function(ve){H||(H=!0,p.reject(ae,ve))})}}},{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,c){if(!(n instanceof c))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 g(){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),c=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!n||c)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function N(n,c){n=n||[],c=c||{};try{return new Blob(n,c)}catch(l){if(l.name!=="TypeError")throw l;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(c.type)}}typeof Promise>"u"&&i(3);var _=Promise;function O(n,c){c&&n.then(function(o){c(null,o)},function(o){c(o)})}function L(n,c,o){typeof c=="function"&&n.then(c),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 C(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var W="local-forage-detect-blob-support",J=void 0,$={},Ae=Object.prototype.toString,oe="readonly",A="readwrite";function B(n){for(var c=n.length,o=new ArrayBuffer(c),u=new Uint8Array(o),d=0;d<c;d++)u[d]=n.charCodeAt(d);return o}function x(n){return new _(function(c){var o=n.transaction(W,A),u=N([""]);o.objectStore(W).put(u,"key"),o.onabort=function(d){d.preventDefault(),d.stopPropagation(),c(!1)},o.oncomplete=function(){var d=navigator.userAgent.match(/Chrome\/(\d+)/),l=navigator.userAgent.match(/Edge\//);c(l||!d||parseInt(d[1],10)>=43)}}).catch(function(){return!1})}function H(n){return typeof J=="boolean"?_.resolve(J):x(n).then(function(c){return J=c,J})}function Q(n){var c=$[n.name],o={};o.promise=new _(function(u,d){o.resolve=u,o.reject=d}),c.deferredOperations.push(o),c.dbReady?c.dbReady=c.dbReady.then(function(){return o.promise}):c.dbReady=o.promise}function ae(n){var c=$[n.name],o=c.deferredOperations.pop();if(o)return o.resolve(),o.promise}function ce(n,c){var o=$[n.name],u=o.deferredOperations.pop();if(u)return u.reject(c),u.promise}function le(n,c){return new _(function(o,u){if($[n.name]=$[n.name]||ee(),n.db)if(c)Q(n),n.db.close();else return o(n.db);var d=[n.name];c&&d.push(n.version);var l=y.open.apply(y,d);c&&(l.onupgradeneeded=function(v){var E=l.result;try{E.createObjectStore(n.storeName),v.oldVersion<=1&&E.createObjectStore(W)}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}}),l.onerror=function(v){v.preventDefault(),u(l.error)},l.onsuccess=function(){var v=l.result;v.onversionchange=function(E){E.target.close()},o(v),ae(n)}})}function ve(n){return le(n,!1)}function Ce(n){return le(n,!0)}function h(n,c){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!==c&&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 l=n.db.version+1;l>n.version&&(n.version=l)}return!0}return!1}function I(n){return new _(function(c,o){var u=new FileReader;u.onerror=o,u.onloadend=function(d){var l=btoa(d.target.result||"");c({__local_forage_encoded_blob:!0,data:l,type:n.type})},u.readAsBinaryString(n)})}function S(n){var c=B(atob(n.data));return N([c],{type:n.type})}function P(n){return n&&n.__local_forage_encoded_blob}function D(n){var c=this,o=c._initReady().then(function(){var u=$[c._dbInfo.name];if(u&&u.dbReady)return u.dbReady});return L(o,n,n),o}function U(n){Q(n);for(var c=$[n.name],o=c.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,ve(n).then(function(l){return n.db=l,h(n)?Ce(n):l}).then(function(l){n.db=c.db=l;for(var v=0;v<o.length;v++)o[v]._dbInfo.db=l}).catch(function(l){throw ce(n,l),l})}function V(n,c,o,u){u===void 0&&(u=1);try{var d=n.db.transaction(n.storeName,c);o(null,d)}catch(l){if(u>0&&(!n.db||l.name==="InvalidStateError"||l.name==="NotFoundError"))return _.resolve().then(function(){if(!n.db||l.name==="NotFoundError"&&!n.db.objectStoreNames.contains(n.storeName)&&n.version<=n.db.version)return n.db&&(n.version=n.db.version+1),Ce(n)}).then(function(){return U(n).then(function(){V(n,c,o,u-1)})}).catch(o);o(l)}}function ee(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ke(n){var c=this,o={db:null};if(n)for(var u in n)o[u]=n[u];var d=$[o.name];d||(d=ee(),$[o.name]=d),d.forages.push(c),c._initReady||(c._initReady=c.ready,c.ready=D);var l=[];function v(){return _.resolve()}for(var E=0;E<d.forages.length;E++){var w=d.forages[E];w!==c&&l.push(w._initReady().catch(v))}var b=d.forages.slice(0);return _.all(l).then(function(){return o.db=d.db,ve(o)}).then(function(R){return o.db=R,h(o,c._defaultConfig.version)?Ce(o):R}).then(function(R){o.db=d.db=R,c._dbInfo=o;for(var T=0;T<b.length;T++){var k=b[T];k!==c&&(k._dbInfo.db=o.db,k._dbInfo.version=o.version)}})}function Pe(n,c){var o=this;n=F(n);var u=new _(function(d,l){o.ready().then(function(){V(o._dbInfo,oe,function(v,E){if(v)return l(v);try{var w=E.objectStore(o._dbInfo.storeName),b=w.get(n);b.onsuccess=function(){var R=b.result;R===void 0&&(R=null),P(R)&&(R=S(R)),d(R)},b.onerror=function(){l(b.error)}}catch(R){l(R)}})}).catch(l)});return O(u,c),u}function qe(n,c){var o=this,u=new _(function(d,l){o.ready().then(function(){V(o._dbInfo,oe,function(v,E){if(v)return l(v);try{var w=E.objectStore(o._dbInfo.storeName),b=w.openCursor(),R=1;b.onsuccess=function(){var T=b.result;if(T){var k=T.value;P(k)&&(k=S(k));var j=n(k,T.key,R++);j!==void 0?d(j):T.continue()}else d()},b.onerror=function(){l(b.error)}}catch(T){l(T)}})}).catch(l)});return O(u,c),u}function Cn(n,c,o){var u=this;n=F(n);var d=new _(function(l,v){var E;u.ready().then(function(){return E=u._dbInfo,Ae.call(c)==="[object Blob]"?H(E.db).then(function(w){return w?c:I(c)}):c}).then(function(w){V(u._dbInfo,A,function(b,R){if(b)return v(b);try{var T=R.objectStore(u._dbInfo.storeName);w===null&&(w=void 0);var k=T.put(w,n);R.oncomplete=function(){w===void 0&&(w=null),l(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,c){var o=this;n=F(n);var u=new _(function(d,l){o.ready().then(function(){V(o._dbInfo,A,function(v,E){if(v)return l(v);try{var w=E.objectStore(o._dbInfo.storeName),b=w.delete(n);E.oncomplete=function(){d()},E.onerror=function(){l(b.error)},E.onabort=function(){var R=b.error?b.error:b.transaction.error;l(R)}}catch(R){l(R)}})}).catch(l)});return O(u,c),u}function Dn(n){var c=this,o=new _(function(u,d){c.ready().then(function(){V(c._dbInfo,A,function(l,v){if(l)return d(l);try{var E=v.objectStore(c._dbInfo.storeName),w=E.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 $n(n){var c=this,o=new _(function(u,d){c.ready().then(function(){V(c._dbInfo,oe,function(l,v){if(l)return d(l);try{var E=v.objectStore(c._dbInfo.storeName),w=E.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,c){var o=this,u=new _(function(d,l){if(n<0){d(null);return}o.ready().then(function(){V(o._dbInfo,oe,function(v,E){if(v)return l(v);try{var w=E.objectStore(o._dbInfo.storeName),b=!1,R=w.openKeyCursor();R.onsuccess=function(){var T=R.result;if(!T){d(null);return}n===0||b?d(T.key):(b=!0,T.advance(n))},R.onerror=function(){l(R.error)}}catch(T){l(T)}})}).catch(l)});return O(u,c),u}function xn(n){var c=this,o=new _(function(u,d){c.ready().then(function(){V(c._dbInfo,oe,function(l,v){if(l)return d(l);try{var E=v.objectStore(c._dbInfo.storeName),w=E.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,c){c=C.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 l=n.name===o.name&&u._dbInfo.db,v=l?_.resolve(u._dbInfo.db):ve(n).then(function(E){var w=$[n.name],b=w.forages;w.db=E;for(var R=0;R<b.length;R++)b[R]._dbInfo.db=E;return E});n.storeName?d=v.then(function(E){if(!!E.objectStoreNames.contains(n.storeName)){var w=E.version+1;Q(n);var b=$[n.name],R=b.forages;E.close();for(var T=0;T<R.length;T++){var k=R[T];k._dbInfo.db=null,k._dbInfo.version=w}var j=new _(function(q,z){var X=y.open(n.name,w);X.onerror=function(fe){var Ye=X.result;Ye.close(),z(fe)},X.onupgradeneeded=function(){var fe=X.result;fe.deleteObjectStore(n.storeName)},X.onsuccess=function(){var fe=X.result;fe.close(),q(fe)}});return j.then(function(q){b.db=q;for(var z=0;z<R.length;z++){var X=R[z];X._dbInfo.db=q,ae(X._dbInfo)}}).catch(function(q){throw(ce(n,q)||_.resolve()).catch(function(){}),q})}}):d=v.then(function(E){Q(n);var w=$[n.name],b=w.forages;E.close();for(var R=0;R<b.length;R++){var T=b[R];T._dbInfo.db=null}var k=new _(function(j,q){var z=y.deleteDatabase(n.name);z.onerror=function(){var X=z.result;X&&X.close(),q(z.error)},z.onblocked=function(){console.warn('dropInstance blocked for database "'+n.name+'" until all open connections are closed')},z.onsuccess=function(){var X=z.result;X&&X.close(),j(X)}});return k.then(function(j){w.db=j;for(var q=0;q<b.length;q++){var z=b[q];ae(z._dbInfo)}}).catch(function(j){throw(ce(n,j)||_.resolve()).catch(function(){}),j})})}return O(d,c),d}var kn={_driver:"asyncStorage",_initStorage:ke,_support:g(),iterate:qe,getItem:Pe,setItem:Cn,removeItem:Pn,clear:Dn,length:$n,key:Un,keys:xn,dropInstance:Fn};function Wn(){return typeof openDatabase=="function"}var Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bn="~~local_forage_type~",zt=/^~~local_forage_type~([^~]+)~/,it="__lfsc__:",St=it.length,At="arbf",Ot="blob",Jt="si08",Qt="ui08",Zt="uic8",er="si16",tr="si32",rr="ur16",nr="ui32",ir="fl32",or="fl64",ar=St+At.length,sr=Object.prototype.toString;function cr(n){var c=n.length*.75,o=n.length,u,d=0,l,v,E,w;n[n.length-1]==="="&&(c--,n[n.length-2]==="="&&c--);var b=new ArrayBuffer(c),R=new Uint8Array(b);for(u=0;u<o;u+=4)l=Oe.indexOf(n[u]),v=Oe.indexOf(n[u+1]),E=Oe.indexOf(n[u+2]),w=Oe.indexOf(n[u+3]),R[d++]=l<<2|v>>4,R[d++]=(v&15)<<4|E>>2,R[d++]=(E&3)<<6|w&63;return b}function Nt(n){var c=new Uint8Array(n),o="",u;for(u=0;u<c.length;u+=3)o+=Oe[c[u]>>2],o+=Oe[(c[u]&3)<<4|c[u+1]>>4],o+=Oe[(c[u+1]&15)<<2|c[u+2]>>6],o+=Oe[c[u+2]&63];return c.length%3===2?o=o.substring(0,o.length-1)+"=":c.length%3===1&&(o=o.substring(0,o.length-2)+"=="),o}function Gn(n,c){var o="";if(n&&(o=sr.call(n)),n&&(o==="[object ArrayBuffer]"||n.buffer&&sr.call(n.buffer)==="[object ArrayBuffer]")){var u,d=it;n instanceof ArrayBuffer?(u=n,d+=At):(u=n.buffer,o==="[object Int8Array]"?d+=Jt:o==="[object Uint8Array]"?d+=Qt:o==="[object Uint8ClampedArray]"?d+=Zt:o==="[object Int16Array]"?d+=er:o==="[object Uint16Array]"?d+=rr:o==="[object Int32Array]"?d+=tr:o==="[object Uint32Array]"?d+=nr:o==="[object Float32Array]"?d+=ir:o==="[object Float64Array]"?d+=or:c(new Error("Failed to get type for BinaryArray"))),c(d+Nt(u))}else if(o==="[object Blob]"){var l=new FileReader;l.onload=function(){var v=Bn+n.type+"~"+Nt(this.result);c(it+Ot+v)},l.readAsArrayBuffer(n)}else try{c(JSON.stringify(n))}catch(v){console.error("Couldn't convert value into a JSON string: ",n),c(null,v)}}function Vn(n){if(n.substring(0,St)!==it)return JSON.parse(n);var c=n.substring(ar),o=n.substring(St,ar),u;if(o===Ot&&zt.test(c)){var d=c.match(zt);u=d[1],c=c.substring(d[0].length)}var l=cr(c);switch(o){case At:return l;case Ot:return N([l],{type:u});case Jt:return new Int8Array(l);case Qt:return new Uint8Array(l);case Zt:return new Uint8ClampedArray(l);case er:return new Int16Array(l);case rr:return new Uint16Array(l);case tr:return new Int32Array(l);case nr:return new Uint32Array(l);case ir:return new Float32Array(l);case or:return new Float64Array(l);default:throw new Error("Unkown type: "+o)}}var Tt={serialize:Gn,deserialize:Vn,stringToBuffer:cr,bufferToString:Nt};function lr(n,c,o,u){n.executeSql("CREATE TABLE IF NOT EXISTS "+c.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],o,u)}function jn(n){var c=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(l,v){try{o.db=openDatabase(o.name,String(o.version),o.description,o.size)}catch(E){return v(E)}o.db.transaction(function(E){lr(E,o,function(){c._dbInfo=o,l()},function(w,b){v(b)})},v)});return o.serializer=Tt,d}function Ne(n,c,o,u,d,l){n.executeSql(o,u,d,function(v,E){E.code===E.SYNTAX_ERR?v.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[c.storeName],function(w,b){b.rows.length?l(w,E):lr(w,c,function(){w.executeSql(o,u,d,l)},l)},l):l(v,E)},l)}function Hn(n,c){var o=this;n=F(n);var u=new _(function(d,l){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(E){Ne(E,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){l(b)})})}).catch(l)});return O(u,c),u}function qn(n,c){var o=this,u=new _(function(d,l){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(E){Ne(E,v,"SELECT * FROM "+v.storeName,[],function(w,b){for(var R=b.rows,T=R.length,k=0;k<T;k++){var j=R.item(k),q=j.value;if(q&&(q=v.serializer.deserialize(q)),q=n(q,j.key,k+1),q!==void 0){d(q);return}}d()},function(w,b){l(b)})})}).catch(l)});return O(u,c),u}function ur(n,c,o,u){var d=this;n=F(n);var l=new _(function(v,E){d.ready().then(function(){c===void 0&&(c=null);var w=c,b=d._dbInfo;b.serializer.serialize(c,function(R,T){T?E(T):b.db.transaction(function(k){Ne(k,b,"INSERT OR REPLACE INTO "+b.storeName+" (key, value) VALUES (?, ?)",[n,R],function(){v(w)},function(j,q){E(q)})},function(k){if(k.code===k.QUOTA_ERR){if(u>0){v(ur.apply(d,[n,w,o,u-1]));return}E(k)}})})}).catch(E)});return O(l,o),l}function Kn(n,c,o){return ur.apply(this,[n,c,o,1])}function Yn(n,c){var o=this;n=F(n);var u=new _(function(d,l){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(E){Ne(E,v,"DELETE FROM "+v.storeName+" WHERE key = ?",[n],function(){d()},function(w,b){l(b)})})}).catch(l)});return O(u,c),u}function Xn(n){var c=this,o=new _(function(u,d){c.ready().then(function(){var l=c._dbInfo;l.db.transaction(function(v){Ne(v,l,"DELETE FROM "+l.storeName,[],function(){u()},function(E,w){d(w)})})}).catch(d)});return O(o,n),o}function zn(n){var c=this,o=new _(function(u,d){c.ready().then(function(){var l=c._dbInfo;l.db.transaction(function(v){Ne(v,l,"SELECT COUNT(key) as c FROM "+l.storeName,[],function(E,w){var b=w.rows.item(0).c;u(b)},function(E,w){d(w)})})}).catch(d)});return O(o,n),o}function Jn(n,c){var o=this,u=new _(function(d,l){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(E){Ne(E,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){l(b)})})}).catch(l)});return O(u,c),u}function Qn(n){var c=this,o=new _(function(u,d){c.ready().then(function(){var l=c._dbInfo;l.db.transaction(function(v){Ne(v,l,"SELECT key FROM "+l.storeName,[],function(E,w){for(var b=[],R=0;R<w.rows.length;R++)b.push(w.rows.item(R).key);u(b)},function(E,w){d(w)})})}).catch(d)});return O(o,n),o}function Zn(n){return new _(function(c,o){n.transaction(function(u){u.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(d,l){for(var v=[],E=0;E<l.rows.length;E++)v.push(l.rows.item(E).name);c({db:n,storeNames:v})},function(d,l){o(l)})},function(u){o(u)})})}function ei(n,c){c=C.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(l){var v;n.name===o.name?v=u._dbInfo.db:v=openDatabase(n.name,"","",0),n.storeName?l({db:v,storeNames:[n.storeName]}):l(Zn(v))}).then(function(l){return new _(function(v,E){l.db.transaction(function(w){function b(j){return new _(function(q,z){w.executeSql("DROP TABLE IF EXISTS "+j,[],function(){q()},function(X,fe){z(fe)})})}for(var R=[],T=0,k=l.storeNames.length;T<k;T++)R.push(b(l.storeNames[T]));_.all(R).then(function(){v()}).catch(function(j){E(j)})},function(w){E(w)})})}):d=_.reject("Invalid arguments"),O(d,c),d}var ti={_driver:"webSQLStorage",_initStorage:jn,_support:Wn(),iterate:qn,getItem:Hn,setItem:Kn,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 dr(n,c){var o=n.name+"/";return n.storeName!==c.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 c=this,o={};if(n)for(var u in n)o[u]=n[u];return o.keyPrefix=dr(n,c._defaultConfig),ii()?(c._dbInfo=o,o.serializer=Tt,_.resolve()):_.reject()}function ai(n){var c=this,o=c.ready().then(function(){for(var u=c._dbInfo.keyPrefix,d=localStorage.length-1;d>=0;d--){var l=localStorage.key(d);l.indexOf(u)===0&&localStorage.removeItem(l)}});return O(o,n),o}function si(n,c){var o=this;n=F(n);var u=o.ready().then(function(){var d=o._dbInfo,l=localStorage.getItem(d.keyPrefix+n);return l&&(l=d.serializer.deserialize(l)),l});return O(u,c),u}function ci(n,c){var o=this,u=o.ready().then(function(){for(var d=o._dbInfo,l=d.keyPrefix,v=l.length,E=localStorage.length,w=1,b=0;b<E;b++){var R=localStorage.key(b);if(R.indexOf(l)===0){var T=localStorage.getItem(R);if(T&&(T=d.serializer.deserialize(T)),T=n(T,R.substring(v),w++),T!==void 0)return T}}});return O(u,c),u}function li(n,c){var o=this,u=o.ready().then(function(){var d=o._dbInfo,l;try{l=localStorage.key(n)}catch{l=null}return l&&(l=l.substring(d.keyPrefix.length)),l});return O(u,c),u}function ui(n){var c=this,o=c.ready().then(function(){for(var u=c._dbInfo,d=localStorage.length,l=[],v=0;v<d;v++){var E=localStorage.key(v);E.indexOf(u.keyPrefix)===0&&l.push(E.substring(u.keyPrefix.length))}return l});return O(o,n),o}function di(n){var c=this,o=c.keys().then(function(u){return u.length});return O(o,n),o}function fi(n,c){var o=this;n=F(n);var u=o.ready().then(function(){var d=o._dbInfo;localStorage.removeItem(d.keyPrefix+n)});return O(u,c),u}function hi(n,c,o){var u=this;n=F(n);var d=u.ready().then(function(){c===void 0&&(c=null);var l=c;return new _(function(v,E){var w=u._dbInfo;w.serializer.serialize(c,function(b,R){if(R)E(R);else try{localStorage.setItem(w.keyPrefix+n,b),v(l)}catch(T){(T.name==="QuotaExceededError"||T.name==="NS_ERROR_DOM_QUOTA_REACHED")&&E(T),E(T)}})})});return O(d,o),d}function mi(n,c){if(c=C.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(l){n.storeName?l(dr(n,u._defaultConfig)):l(n.name+"/")}).then(function(l){for(var v=localStorage.length-1;v>=0;v--){var E=localStorage.key(v);E.indexOf(l)===0&&localStorage.removeItem(E)}}):d=_.reject("Invalid arguments"),O(d,c),d}var vi={_driver:"localStorageWrapper",_initStorage:oi,_support:ri(),iterate:ci,getItem:si,setItem:hi,removeItem:fi,clear:ai,length:di,key:li,keys:ui,dropInstance:mi},pi=function(c,o){return c===o||typeof c=="number"&&typeof o=="number"&&isNaN(c)&&isNaN(o)},yi=function(c,o){for(var u=c.length,d=0;d<u;){if(pi(c[d],o))return!0;d++}return!1},fr=Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"},Ke={},hr={},We={INDEXEDDB:kn,WEBSQL:ti,LOCALSTORAGE:vi},gi=[We.INDEXEDDB._driver,We.WEBSQL._driver,We.LOCALSTORAGE._driver],ot=["dropInstance"],Mt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ot),Ei={description:"",driver:gi.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function _i(n,c){n[c]=function(){var o=arguments;return n.ready().then(function(){return n[c].apply(n,o)})}}function Lt(){for(var n=1;n<arguments.length;n++){var c=arguments[n];if(c)for(var o in c)c.hasOwnProperty(o)&&(fr(c[o])?arguments[0][o]=c[o].slice():arguments[0][o]=c[o])}return arguments[0]}var Ii=function(){function n(c){f(this,n);for(var o in We)if(We.hasOwnProperty(o)){var u=We[o],d=u._driver;this[o]=d,Ke[d]||this.defineDriver(u)}this._defaultConfig=Lt({},Ei),this._config=Lt({},this._defaultConfig,c),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 l=new _(function(v,E){try{var w=o._driver,b=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!o._driver){E(b);return}for(var R=Mt.concat("_initStorage"),T=0,k=R.length;T<k;T++){var j=R[T],q=!yi(ot,j);if((q||o[j])&&typeof o[j]!="function"){E(b);return}}var z=function(){for(var Ye=function(Ri){return function(){var Si=new Error("Method "+Ri+" is not implemented by the current driver"),mr=_.reject(Si);return O(mr,arguments[arguments.length-1]),mr}},Ct=0,bi=ot.length;Ct<bi;Ct++){var Pt=ot[Ct];o[Pt]||(o[Pt]=Ye(Pt))}};z();var X=function(Ye){Ke[w]&&console.info("Redefining LocalForage driver: "+w),Ke[w]=o,hr[w]=Ye,v()};"_support"in o?o._support&&typeof o._support=="function"?o._support().then(X,E):X(!!o._support):X(!0)}catch(fe){E(fe)}});return L(l,u,d),l},n.prototype.driver=function(){return this._driver||null},n.prototype.getDriver=function(o,u,d){var l=Ke[o]?_.resolve(Ke[o]):_.reject(new Error("Driver not found."));return L(l,u,d),l},n.prototype.getSerializer=function(o){var u=_.resolve(Tt);return L(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 L(d,o,o),d},n.prototype.setDriver=function(o,u,d){var l=this;fr(o)||(o=[o]);var v=this._getSupportedDrivers(o);function E(){l._config.driver=l.driver()}function w(T){return l._extend(T),E(),l._ready=l._initStorage(l._config),l._ready}function b(T){return function(){var k=0;function j(){for(;k<T.length;){var q=T[k];return k++,l._dbInfo=null,l._ready=null,l.getDriver(q).then(w).catch(j)}E();var z=new Error("No available storage method found.");return l._driverSet=_.reject(z),l._driverSet}return j()}}var R=this._driverSet!==null?this._driverSet.catch(function(){return _.resolve()}):_.resolve();return this._driverSet=R.then(function(){var T=v[0];return l._dbInfo=null,l._ready=null,l.getDriver(T).then(function(k){l._driver=k._driver,E(),l._wrapLibraryMethodsWithReady(),l._initDriver=b(v)})}).catch(function(){E();var T=new Error("No available storage method found.");return l._driverSet=_.reject(T),l._driverSet}),L(this._driverSet,u,d),this._driverSet},n.prototype.supports=function(o){return!!hr[o]},n.prototype._extend=function(o){Lt(this,o)},n.prototype._getSupportedDrivers=function(o){for(var u=[],d=0,l=o.length;d<l;d++){var v=o[d];this.supports(v)&&u.push(v)}return u},n.prototype._wrapLibraryMethodsWithReady=function(){for(var o=0,u=Mt.length;o<u;o++)_i(this,Mt[o])},n.prototype.createInstance=function(o){return new n(o)},n}(),wi=new Ii;a.exports=wi},{3:3}]},{},[4])(4)})});var Tn=Er((wt,Nn)=>{(function(e,t){typeof wt=="object"&&typeof Nn<"u"?t(wt):typeof define=="function"&&define.amd?define("localforage-driver-memory",["exports"],t):t(e.LocalforageDriverMemory={})})(typeof self<"u"?self:wt,function(e){"use strict";var t="localforage-driver-memory";function r(h){var I=typeof Symbol=="function"&&h[Symbol.iterator],S=0;return I?I.call(h):{next:function(){return h&&S>=h.length&&(h=void 0),{value:h&&h[S++],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 S=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,P=new S,D=0;D<h.length;D+=1)P.append(h[D]);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,S=h.length;h[h.length-1]==="="&&(I--,h[h.length-2]==="="&&I--);for(var P=new ArrayBuffer(I),D=new Uint8Array(P),U=0,V=0;U<S;U+=4){var ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U]),ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U+1]),Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U+2]),qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U+3]);D[V++]=ee<<2|ke>>4,D[V++]=(ke&15)<<4|Pe>>2,D[V++]=(Pe&3)<<6|qe&63}return P}function y(h){for(var I=new Uint8Array(h),S="",P=0;P<I.length;P+=3)S+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[I[P]>>2],S+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I[P]&3)<<4|I[P+1]>>4],S+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I[P+1]&15)<<2|I[P+2]>>6],S+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[I[P+2]&63];return I.length%3===2?S=S.substring(0,S.length-1)+"=":I.length%3===1&&(S=S.substring(0,S.length-2)+"=="),S}function g(h,I){var S="";if(h&&(S=f.call(h)),h&&(S==="[object ArrayBuffer]"||h.buffer&&f.call(h.buffer)==="[object ArrayBuffer]")){var P=void 0,D="__lfsc__:";h instanceof ArrayBuffer?(P=h,D+="arbf"):(P=h.buffer,S==="[object Int8Array]"?D+="si08":S==="[object Uint8Array]"?D+="ui08":S==="[object Uint8ClampedArray]"?D+="uic8":S==="[object Int16Array]"?D+="si16":S==="[object Uint16Array]"?D+="ur16":S==="[object Int32Array]"?D+="si32":S==="[object Uint32Array]"?D+="ui32":S==="[object Float32Array]"?D+="fl32":S==="[object Float64Array]"?D+="fl64":I(new Error("Failed to get type for BinaryArray"))),I(D+y(P))}else if(S==="[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),S=h.substring(s,m),P;if(S==="blob"&&a.test(I)){var D=I.match(a);P=D[1],I=I.substring(D[0].length)}var U=p(I);switch(S){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: "+S)}}function _(h){var I,S;if(h===null||typeof h!="object"||"isActiveClone"in h)return h;var P=h instanceof Date?new Date(h):h.constructor();try{for(var D=r(Object.keys(h)),U=D.next();!U.done;U=D.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&&(S=D.return)&&S.call(D)}finally{if(I)throw I.error}}return P}function O(h,I){return(h.name||I.name)+"/"+(h.storeName||I.storeName)+"/"}function L(h,I){I&&h.then(function(S){I(null,S)},function(S){I(S)})}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 C(h,I){var S=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 D;return h.name?D=new Promise(function(U){h.storeName?U(O(h,S._defaultConfig)):U(h.name+"/")}):D=Promise.reject("Invalid arguments"),{promise:D,callback:I}}function W(h){return typeof h!="string"&&(console.warn(h+" used as a key, but it is not a string."),h=String(h)),h}var J={bufferToString:y,deserialize:N,serialize:g,stringToBuffer:p},$={},Ae=function(){function h(I){this.kp=I,this.data={}}return h.resolve=function(I){return $[I]||($[I]=new h(I)),$[I]},h.prototype.clear=function(){this.data={}},h.prototype.drop=function(){this.clear(),delete $[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,S){this.data[I]=S},h}();function oe(h){var I=h?_(h):{},S=O(I,this._defaultConfig),P=Ae.resolve(S);return this._dbInfo=I,this._dbInfo.serializer=J,this._dbInfo.keyPrefix=S,this._dbInfo.mStore=P,Promise.resolve()}function A(h){var I=this,S=this.ready().then(function(){I._dbInfo.mStore.clear()});return L(S,h),S}function B(h,I){var S=C.apply(this,arguments),P=S.promise,D=S.callback,U=P.then(function(V){Ae.resolve(V).drop()});return L(U,D),P}function x(h,I){var S=this;h=W(h);var P=this.ready().then(function(){var D=S._dbInfo.mStore.get(h);return D==null?null:S._dbInfo.serializer.deserialize(D)});return L(P,I),P}function H(h,I){var S=this,P=this.ready().then(function(){for(var D=S._dbInfo.mStore,U=D.keys(),V=0;V<U.length;V++){var ee=D.get(U[V]);if(ee&&(ee=S._dbInfo.serializer.deserialize(ee)),ee=h(ee,U[V],V+1),ee!==void 0)return ee}});return L(P,I),P}function Q(h,I){var S=this,P=this.ready().then(function(){var D;try{D=S._dbInfo.mStore.key(h),D===void 0&&(D=null)}catch{D=null}return D});return L(P,I),P}function ae(h){var I=this,S=this.ready().then(function(){return I._dbInfo.mStore.keys()});return L(S,h),S}function ce(h){var I=this.keys().then(function(S){return S.length});return L(I,h),I}function le(h,I){var S=this;h=W(h);var P=this.ready().then(function(){S._dbInfo.mStore.rm(h)});return L(P,I),P}function ve(h,I,S){var P=this;h=W(h);var D=this.ready().then(function(){I===void 0&&(I=null);var U=I;return new Promise(function(V,ee){P._dbInfo.serializer.serialize(I,function(ke,Pe){if(Pe)ee(Pe);else try{P._dbInfo.mStore.set(h,ke),V(U)}catch(qe){ee(qe)}})})});return L(D,S),D}var Ce=!0;e._support=Ce,e._driver=t,e._initStorage=oe,e.clear=A,e.dropInstance=B,e.getItem=x,e.iterate=H,e.key=Q,e.keys=ae,e.length=ce,e.removeItem=le,e.setItem=ve,Object.defineProperty(e,"__esModule",{value:!0})})});var Fa={};_r(Fa,{default:()=>xa});var Ee=(e=>(e.MissingApiKey="MISSING_API_KEY",e.ModalNotReady="MODAL_NOT_READY",e.ModalLost="MODAL_WAS_LOST",e.MalformedResponse="MALFORMED_RESPONSE",e.InvalidArgument="INVALID_ARGUMENT",e.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",e.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",e))(Ee||{}),be=(e=>(e.SyncWeb3Method="SYNC_WEB3_METHOD",e.DuplicateIframe="DUPLICATE_IFRAME",e.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",e.DeprecationNotice="DEPRECATION_NOTICE",e.ProductAnnouncement="ANNOUNCEMENT",e))(be||{}),Be=(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))(Be||{}),_e=(e=>(e.PROVIDER="magic_3pw_provider",e.ADDRESS="magic_3pw_address",e.CHAIN_ID="magic_3pw_chainId",e))(_e||{}),br=(e=>(e.WalletConnected="wallet_connected",e.WalletRejected="wallet_rejected",e.Web3ModalSelected="web3modal_selected",e))(br||{}),M=(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))(M||{}),Dt=["magic_intermediary_event","magic_nft_checkout","mc_login"],he=(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))(he||{}),Re=(e=>(e.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",e.MAGIC_PING="MAGIC_PING",e))(Re||{}),Rr=(e=>(e.UpdateEmail="update-email",e.MFA="mfa",e.Recovery="recovery",e))(Rr||{}),Sr=(e=>(e.Retry="retry",e))(Sr||{}),Ar=(e=>(e.EmailSent="email-sent",e.EmailNotDeliverable="email-not-deliverable",e))(Ar||{}),de=(e=>(e.VerifyEmailOtp="verify-email-otp",e.VerifyMFACode="verify-mfa-code",e.LostDevice="lost-device",e.VerifyRecoveryCode="verify-recovery-code",e.Cancel="cancel",e))(de||{}),De=(e=>(e.VerifySmsOtp="verify-sms-otp",e.Cancel="cancel",e.Retry="retry",e))(De||{}),Or=(e=>(e.SmsOTPSent="sms-otp-sent",e.InvalidSmsOtp="invalid-sms-otp",e.ExpiredSmsOtp="expired-sms-otp",e))(Or||{}),Nr=(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))(Nr||{}),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||{}),ue=(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))(ue||{}),Mr=(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))(Mr||{}),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||{}),Cr=(e=>(e.IDTokenCreated="Auth/id-token-created",e))(Cr||{}),Pr=(e=>(e.Cancel="Farcaster/cancel",e))(Pr||{}),Dr=(e=>(e.MFASecretGenerated="mfa-secret-generated",e.InvalidMFAOtp="invalid-mfa-otp",e.MFARecoveryCodes="mfa-recovery-codes",e))(Dr||{}),$e=(e=>(e.VerifyMFACode="verify-mfa-code",e.Cancel="cancel-mfa-setup",e))($e||{}),$r=(e=>(e.MFACodeRequested="mfa-code-requested",e.InvalidMFAOtp="invalid-mfa-otp",e.InvalidRecoveryCode="invalid-recovery-code",e))($r||{}),Se=(e=>(e.VerifyMFACode="verify-mfa-code",e.LostDevice="lost-device",e.Cancel="cancel-mfa-disable",e))(Se||{}),Ur=(e=>(e.Harmony="HARMONY",e))(Ur||{}),at=(e=>(e.ClosedByUser="closed-by-user",e))(at||{}),st=(e=>(e.ClosedByUser="closed-by-user-on-received",e))(st||{}),xr=(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))(xr||{}),ye=(e=>(e.SendNewPhoneNumber="send-new-phone-number",e.SendOtpCode="send-otp-code",e.Cancel="cancel",e.StartEditPhoneNumber="start-edit-phone-number",e))(ye||{}),Fr=(e=>(e.PhoneNumber="phone_number",e))(Fr||{}),kr=(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))(kr||{}),ge=(e=>(e.Cancel="cancel",e.VerifyOtp="verify-otp-code",e.ResendSms="resend-sms-otp",e.UpdateEmail="update-email",e))(ge||{}),Ue=(e=>(e.Success="nft-checkout-success",e.Failure="nft-checkout-failure",e.Initiated="nft-checkout-initiated",e.Disconnect="disconnect",e))(Ue||{}),Wr=(e=>(e.WalletInfoFetched="Wallet/wallet-info-fetched",e))(Wr||{}),Br=(e=>(e.CloseMagicWindow="close-magic-window",e))(Br||{});var Ci=Object.create,gt=Object.defineProperty,Pi=Object.defineProperties,Di=Object.getOwnPropertyDescriptor,$i=Object.getOwnPropertyDescriptors,Ui=Object.getOwnPropertyNames,Gr=Object.getOwnPropertySymbols,xi=Object.getPrototypeOf,rn=Object.prototype.hasOwnProperty,Fi=Object.prototype.propertyIsEnumerable,Vr=(e,t,r)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Et=(e,t)=>{for(var r in t||(t={}))rn.call(t,r)&&Vr(e,r,t[r]);if(Gr)for(var r of Gr(t))Fi.call(t,r)&&Vr(e,r,t[r]);return e},xt=(e,t)=>Pi(e,$i(t)),ki=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wi=(e,t)=>{for(var r in t)gt(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))!rn.call(e,a)&&a!==r&&gt(e,a,{get:()=>t[a],enumerable:!(i=Di(t,a))||i.enumerable});return e},Gi=(e,t,r)=>(r=e!=null?Ci(xi(e)):{},Bi(t||!e||!e.__esModule?gt(r,"default",{value:e,enumerable:!0}):r,e)),Z=(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,g,N){this.fn=y,this.context=g,this.once=N||!1}function m(y,g,N,_,O){if(typeof N!="function")throw new TypeError("The listener must be a function");var L=new s(N,_||y,O),F=i?i+g:g;return y._events[F]?y._events[F].fn?y._events[F]=[y._events[F],L]:y._events[F].push(L):(y._events[F]=L,y._eventsCount++),y}function f(y,g){--y._eventsCount===0?y._events=new a:delete y._events[g]}function p(){this._events=new a,this._eventsCount=0}p.prototype.eventNames=function(){var y=[],g,N;if(this._eventsCount===0)return y;for(N in g=this._events)r.call(g,N)&&y.push(i?N.slice(1):N);return Object.getOwnPropertySymbols?y.concat(Object.getOwnPropertySymbols(g)):y},p.prototype.listeners=function(y){var g=i?i+y:y,N=this._events[g];if(!N)return[];if(N.fn)return[N.fn];for(var _=0,O=N.length,L=new Array(O);_<O;_++)L[_]=N[_].fn;return L},p.prototype.listenerCount=function(y){var g=i?i+y:y,N=this._events[g];return N?N.fn?1:N.length:0},p.prototype.emit=function(y,g,N,_,O,L){var F=i?i+y:y;if(!this._events[F])return!1;var C=this._events[F],W=arguments.length,J,$;if(C.fn){switch(C.once&&this.removeListener(y,C.fn,void 0,!0),W){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,g),!0;case 3:return C.fn.call(C.context,g,N),!0;case 4:return C.fn.call(C.context,g,N,_),!0;case 5:return C.fn.call(C.context,g,N,_,O),!0;case 6:return C.fn.call(C.context,g,N,_,O,L),!0}for($=1,J=new Array(W-1);$<W;$++)J[$-1]=arguments[$];C.fn.apply(C.context,J)}else{var Ae=C.length,oe;for($=0;$<Ae;$++)switch(C[$].once&&this.removeListener(y,C[$].fn,void 0,!0),W){case 1:C[$].fn.call(C[$].context);break;case 2:C[$].fn.call(C[$].context,g);break;case 3:C[$].fn.call(C[$].context,g,N);break;case 4:C[$].fn.call(C[$].context,g,N,_);break;default:if(!J)for(oe=1,J=new Array(W-1);oe<W;oe++)J[oe-1]=arguments[oe];C[$].fn.apply(C[$].context,J)}}return!0},p.prototype.on=function(y,g,N){return m(this,y,g,N,!1)},p.prototype.once=function(y,g,N){return m(this,y,g,N,!0)},p.prototype.removeListener=function(y,g,N,_){var O=i?i+y:y;if(!this._events[O])return this;if(!g)return f(this,O),this;var L=this._events[O];if(L.fn)L.fn===g&&(!_||L.once)&&(!N||L.context===N)&&f(this,O);else{for(var F=0,C=[],W=L.length;F<W;F++)(L[F].fn!==g||_&&!L[F].once||N&&L[F].context!==N)&&C.push(L[F]);C.length?this._events[O]=C.length===1?C[0]:C:f(this,O)}return this},p.prototype.removeAllListeners=function(y){var g;return y?(g=i?i+y:y,this._events[g]&&f(this,g)):(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 Hi=Number.MAX_SAFE_INTEGER||9007199254740991,Ft={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Hi,MAX_SAFE_COMPONENT_LENGTH:16},qi=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{},K=qi,nt=ji(function(e,t){let{MAX_SAFE_COMPONENT_LENGTH:r}=Ft,i=(t=e.exports={}).re=[],a=t.src=[],s=t.t={},m=0,f=(p,y,g)=>{let N=m++;K(N,y),s[p]=N,a[N]=y,i[N]=new RegExp(y,g?"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*$")}),jr=/^[0-9]+$/,nn=(e,t)=>{let r=jr.test(e),i=jr.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},Ki=(e,t)=>nn(t,e),Yi={compareIdentifiers:nn,rcompareIdentifiers:Ki},{MAX_LENGTH:Hr,MAX_SAFE_INTEGER:ct}=Ft,{re:qr,t:Kr}=nt,{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`);K("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?qr[Kr.LOOSE]:qr[Kr.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>ct||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ct||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ct||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<ct)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(K("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(K("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(K("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)),He=Xi,zi=(e,t,r)=>He(e,t,r)===0,Ji=zi,Qi=(e,t,r)=>He(e,t,r)!==0,Zi=Qi,eo=(e,t,r)=>He(e,t,r)>0,to=eo,ro=(e,t,r)=>He(e,t,r)>=0,no=ro,io=(e,t,r)=>He(e,t,r)<0,oo=io,ao=(e,t,r)=>He(e,t,r)<=0,so=ao,co=(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}`)}},$t=co,Ze=Symbol("SemVer ANY"),tt=class{static get ANY(){return Ze}constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof tt){if(e.loose===!!t.loose)return e;e=e.value}K("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,K("comp",this)}parse(e){let t=this.options.loose?Yr[Xr.COMPARATORLOOSE]:Yr[Xr.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(K("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 $t(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof tt))throw new TypeError("a Comparator is required");if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""||new Ve(e.value,t).test(this.value);if(e.operator==="")return e.value===""||new Ve(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=$t(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),f=$t(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||i||a&&s||m||f}},{re:Yr,t:Xr}=nt,Ve=class{constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof Ve)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Ve(e.raw,t);if(e instanceof tt)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)),K("hyphen replace",e),e=e.replace(ie[re.COMPARATORTRIM],lo),K("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 tt(a,this.options))}intersects(e,t){if(!(e instanceof Ve))throw new TypeError("a Range is required");return this.set.some(r=>zr(r,t)&&e.set.some(i=>zr(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:lo,tildeTrimReplace:uo,caretTrimReplace:fo}=nt,zr=(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)=>(K("comp",e,t),e=po(e,t),K("caret",e),e=mo(e,t),K("tildes",e),e=go(e,t),K("xrange",e),e=_o(e,t),K("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 K("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?(K("replaceTilde pr",f),p=`>=${a}.${s}.${m}-${f} <${a}.${+s+1}.0-0`):p=`>=${a}.${s}.${m} <${a}.${+s+1}.0-0`,K("tilde return",p),p})},po=(e,t)=>e.trim().split(/\s+/).map(r=>yo(r,t)).join(" "),yo=(e,t)=>{K("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 K("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?(K("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`):(K("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`),K("caret return",y),y})},go=(e,t)=>(K("replaceXRanges",e,t),e.split(/\s+/).map(r=>Eo(r,t)).join(" ")),Eo=(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)=>{K("xRange",e,i,a,s,m,f,p);let y=se(s),g=y||se(m),N=g||se(f),_=N;return a==="="&&_&&(a=""),p=t.includePrerelease?"-0":"",y?i=a===">"||a==="<"?"<0.0.0-0":"*":a&&_?(g&&(m=0),f=0,a===">"?(a=">=",g?(s=+s+1,m=0,f=0):(m=+m+1,f=0)):a==="<="&&(a="<",g?s=+s+1:m=+m+1),a==="<"&&(p="-0"),i=`${a+s}.${m}.${f}${p}`):g?i=`>=${s}.0.0${p} <${+s+1}.0.0-0`:N&&(i=`>=${s}.${m}.0${p} <${s}.${+m+1}.0-0`),K("xRange return",i),i})},_o=(e,t)=>(K("replaceStars",e,t),e.trim().replace(ie[re.STAR],"")),Io=(e,t)=>(K("replaceGTE0",e,t),e.trim().replace(ie[t.includePrerelease?re.GTE0PRE:re.GTE0],"")),wo=e=>(t,r,i,a,s,m,f,p,y,g,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(g)?`<${+y+1}.0.0-0`:se(N)?`<${y}.${+g+1}.0-0`:_?`<=${y}.${g}.${N}-${_}`:e?`<${y}.${g}.${+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(K(e[i].semver),e[i].semver!==tt.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 Ve(t,r)}catch(i){return!1}return t.test(e)},{MAX_LENGTH:So}=Ft,{re:Jr,t:Qr}=nt,Ao=(e,t)=>{if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof te)return e;if(typeof e!="string"||e.length>So||!(t.loose?Jr[Qr.LOOSE]:Jr[Qr.FULL]).test(e))return null;try{return new te(e,t)}catch(r){return null}},Oo=Ao,{re:lt,t:ut}=nt,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=lt[ut.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),lt[ut.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;lt[ut.COERCERTL].lastIndex=-1}else r=e.match(lt[ut.COERCE]);return r===null?null:Oo(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};function To(e){return String.fromCharCode(parseInt(e.slice(1),16))}function Mo(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}function Lo(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,To))}function Co(e){return decodeURIComponent(Array.from(atob(e),Mo).join(""))}function on(e){return Lo(JSON.stringify(e))}function Po(e){return JSON.parse(Co(e))}function et(e){return typeof e=="undefined"}function Do(e){return e===null}function an(e){return Do(e)||et(e)}function $o(e){return an(e)?!1:!et(e.jsonrpc)&&!et(e.id)&&(!et(e.result)||!et(e.error))}function Uo(e){return an(e)?!1:typeof e=="number"&&Object.values(Be).includes(e)}function mt(e){if(!e)return!0;for(let t in e)if(Object.hasOwnProperty.call(e,t))return!1;return!0}var Y={};function sn(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"},we=class extends Error{constructor(e,t){super(`Magic SDK Error: [${e}] ${t}`),this.code=e,this.rawMessage=t,this.__proto__=Error,Object.setPrototypeOf(this,we.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:Be.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)}},Fe=class{constructor(e,t){this.code=e,this.rawMessage=t,this.message=`Magic SDK Warning: [${e}] ${t}`}log(){console.warn(this.message)}},_t=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,_t.prototype)}},vt=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 we(Ee.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.")}function kt(){return new we(Ee.ModalNotReady,"Modal is not ready.")}function cn(){return new we(Ee.ModalLost,"Modal was lost, Reinitializing. please try again.")}function ko(){return new we(Ee.MalformedResponse,"Response from the Magic iframe is malformed.")}function Wo(e){return new we(Ee.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 Ai=Object.create;var Xe=Object.defineProperty;var Oi=Object.getOwnPropertyDescriptor;var Ni=Object.getOwnPropertyNames,vr=Object.getOwnPropertySymbols,Ti=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty,Mi=Object.prototype.propertyIsEnumerable;var pr=(e,t,r)=>t in e?Xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gr=(e,t)=>{for(var r in t||(t={}))yr.call(t,r)&&pr(e,r,t[r]);if(vr)for(var r of vr(t))Mi.call(t,r)&&pr(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 Er=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),_r=(e,t)=>{for(var r in t)Xe(e,r,{get:t[r],enumerable:!0})},Ir=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ni(t))!yr.call(e,a)&&a!==r&&Xe(e,a,{get:()=>t[a],enumerable:!(i=Oi(t,a))||i.enumerable});return e};var wr=(e,t,r)=>(r=e!=null?Ai(Ti(e)):{},Ir(t||!e||!e.__esModule?Xe(r,"default",{value:e,enumerable:!0}):r,e)),Li=e=>Ir(Xe({},"__esModule",{value:!0}),e);var pe=(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=Er((An,Yt)=>{(function(e){if(typeof An=="object"&&typeof Yt<"u")Yt.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(g,N){if(!s[g]){if(!a[g]){var _=typeof ze=="function"&&ze;if(!N&&_)return _(g,!0);if(p)return p(g,!0);var O=new Error("Cannot find module '"+g+"'");throw O.code="MODULE_NOT_FOUND",O}var L=s[g]={exports:{}};a[g][0].call(L.exports,function(F){var C=a[g][1][F];return f(C||F)},L,L.exports,i,a,s,m)}return s[g].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,g=new f(F),N=m.document.createTextNode("");g.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 W=m.document.createElement("script");W.onreadystatechange=function(){F(),W.onreadystatechange=null,W.parentNode.removeChild(W),W=null},m.document.documentElement.appendChild(W)}:p=function(){setTimeout(F,0)};var O,L=[];function F(){O=!0;for(var W,J,$=L.length;$;){for(J=L,L=[],W=-1;++W<$;)J[W]();$=L.length}O=!1}a.exports=C;function C(W){L.push(W)===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"],g=["FULFILLED"],N=["PENDING"];a.exports=_;function _(A){if(typeof A!="function")throw new TypeError("resolver must be a function");this.state=N,this.queue=[],this.outcome=void 0,A!==f&&C(this,A)}_.prototype.catch=function(A){return this.then(null,A)},_.prototype.then=function(A,B){if(typeof A!="function"&&this.state===g||typeof B!="function"&&this.state===y)return this;var x=new this.constructor(f);if(this.state!==N){var H=this.state===g?A:B;L(x,H,this.outcome)}else this.queue.push(new O(x,A,B));return x};function O(A,B,x){this.promise=A,typeof B=="function"&&(this.onFulfilled=B,this.callFulfilled=this.otherCallFulfilled),typeof x=="function"&&(this.onRejected=x,this.callRejected=this.otherCallRejected)}O.prototype.callFulfilled=function(A){p.resolve(this.promise,A)},O.prototype.otherCallFulfilled=function(A){L(this.promise,this.onFulfilled,A)},O.prototype.callRejected=function(A){p.reject(this.promise,A)},O.prototype.otherCallRejected=function(A){L(this.promise,this.onRejected,A)};function L(A,B,x){m(function(){var H;try{H=B(x)}catch(Q){return p.reject(A,Q)}H===A?p.reject(A,new TypeError("Cannot resolve promise with itself")):p.resolve(A,H)})}p.resolve=function(A,B){var x=W(F,B);if(x.status==="error")return p.reject(A,x.value);var H=x.value;if(H)C(A,H);else{A.state=g,A.outcome=B;for(var Q=-1,ae=A.queue.length;++Q<ae;)A.queue[Q].callFulfilled(B)}return A},p.reject=function(A,B){A.state=y,A.outcome=B;for(var x=-1,H=A.queue.length;++x<H;)A.queue[x].callRejected(B);return A};function F(A){var B=A&&A.then;if(A&&(typeof A=="object"||typeof A=="function")&&typeof B=="function")return function(){B.apply(A,arguments)}}function C(A,B){var x=!1;function H(le){x||(x=!0,p.reject(A,le))}function Q(le){x||(x=!0,p.resolve(A,le))}function ae(){B(Q,H)}var ce=W(ae);ce.status==="error"&&H(ce.value)}function W(A,B){var x={};try{x.value=A(B),x.status="success"}catch(H){x.status="error",x.value=H}return x}_.resolve=J;function J(A){return A instanceof this?A:p.resolve(new this(f),A)}_.reject=$;function $(A){var B=new this(f);return p.reject(B,A)}_.all=Ae;function Ae(A){var B=this;if(Object.prototype.toString.call(A)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=A.length,H=!1;if(!x)return this.resolve([]);for(var Q=new Array(x),ae=0,ce=-1,le=new this(f);++ce<x;)ve(A[ce],ce);return le;function ve(Ce,h){B.resolve(Ce).then(I,function(S){H||(H=!0,p.reject(le,S))});function I(S){Q[h]=S,++ae===x&&!H&&(H=!0,p.resolve(le,Q))}}}_.race=oe;function oe(A){var B=this;if(Object.prototype.toString.call(A)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=A.length,H=!1;if(!x)return this.resolve([]);for(var Q=-1,ae=new this(f);++Q<x;)ce(A[Q]);return ae;function ce(le){B.resolve(le).then(function(ve){H||(H=!0,p.resolve(ae,ve))},function(ve){H||(H=!0,p.reject(ae,ve))})}}},{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,c){if(!(n instanceof c))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 g(){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),c=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!n||c)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function N(n,c){n=n||[],c=c||{};try{return new Blob(n,c)}catch(l){if(l.name!=="TypeError")throw l;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(c.type)}}typeof Promise>"u"&&i(3);var _=Promise;function O(n,c){c&&n.then(function(o){c(null,o)},function(o){c(o)})}function L(n,c,o){typeof c=="function"&&n.then(c),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 C(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var W="local-forage-detect-blob-support",J=void 0,$={},Ae=Object.prototype.toString,oe="readonly",A="readwrite";function B(n){for(var c=n.length,o=new ArrayBuffer(c),u=new Uint8Array(o),d=0;d<c;d++)u[d]=n.charCodeAt(d);return o}function x(n){return new _(function(c){var o=n.transaction(W,A),u=N([""]);o.objectStore(W).put(u,"key"),o.onabort=function(d){d.preventDefault(),d.stopPropagation(),c(!1)},o.oncomplete=function(){var d=navigator.userAgent.match(/Chrome\/(\d+)/),l=navigator.userAgent.match(/Edge\//);c(l||!d||parseInt(d[1],10)>=43)}}).catch(function(){return!1})}function H(n){return typeof J=="boolean"?_.resolve(J):x(n).then(function(c){return J=c,J})}function Q(n){var c=$[n.name],o={};o.promise=new _(function(u,d){o.resolve=u,o.reject=d}),c.deferredOperations.push(o),c.dbReady?c.dbReady=c.dbReady.then(function(){return o.promise}):c.dbReady=o.promise}function ae(n){var c=$[n.name],o=c.deferredOperations.pop();if(o)return o.resolve(),o.promise}function ce(n,c){var o=$[n.name],u=o.deferredOperations.pop();if(u)return u.reject(c),u.promise}function le(n,c){return new _(function(o,u){if($[n.name]=$[n.name]||ee(),n.db)if(c)Q(n),n.db.close();else return o(n.db);var d=[n.name];c&&d.push(n.version);var l=y.open.apply(y,d);c&&(l.onupgradeneeded=function(v){var E=l.result;try{E.createObjectStore(n.storeName),v.oldVersion<=1&&E.createObjectStore(W)}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}}),l.onerror=function(v){v.preventDefault(),u(l.error)},l.onsuccess=function(){var v=l.result;v.onversionchange=function(E){E.target.close()},o(v),ae(n)}})}function ve(n){return le(n,!1)}function Ce(n){return le(n,!0)}function h(n,c){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!==c&&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 l=n.db.version+1;l>n.version&&(n.version=l)}return!0}return!1}function I(n){return new _(function(c,o){var u=new FileReader;u.onerror=o,u.onloadend=function(d){var l=btoa(d.target.result||"");c({__local_forage_encoded_blob:!0,data:l,type:n.type})},u.readAsBinaryString(n)})}function S(n){var c=B(atob(n.data));return N([c],{type:n.type})}function P(n){return n&&n.__local_forage_encoded_blob}function D(n){var c=this,o=c._initReady().then(function(){var u=$[c._dbInfo.name];if(u&&u.dbReady)return u.dbReady});return L(o,n,n),o}function U(n){Q(n);for(var c=$[n.name],o=c.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,ve(n).then(function(l){return n.db=l,h(n)?Ce(n):l}).then(function(l){n.db=c.db=l;for(var v=0;v<o.length;v++)o[v]._dbInfo.db=l}).catch(function(l){throw ce(n,l),l})}function V(n,c,o,u){u===void 0&&(u=1);try{var d=n.db.transaction(n.storeName,c);o(null,d)}catch(l){if(u>0&&(!n.db||l.name==="InvalidStateError"||l.name==="NotFoundError"))return _.resolve().then(function(){if(!n.db||l.name==="NotFoundError"&&!n.db.objectStoreNames.contains(n.storeName)&&n.version<=n.db.version)return n.db&&(n.version=n.db.version+1),Ce(n)}).then(function(){return U(n).then(function(){V(n,c,o,u-1)})}).catch(o);o(l)}}function ee(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function ke(n){var c=this,o={db:null};if(n)for(var u in n)o[u]=n[u];var d=$[o.name];d||(d=ee(),$[o.name]=d),d.forages.push(c),c._initReady||(c._initReady=c.ready,c.ready=D);var l=[];function v(){return _.resolve()}for(var E=0;E<d.forages.length;E++){var w=d.forages[E];w!==c&&l.push(w._initReady().catch(v))}var b=d.forages.slice(0);return _.all(l).then(function(){return o.db=d.db,ve(o)}).then(function(R){return o.db=R,h(o,c._defaultConfig.version)?Ce(o):R}).then(function(R){o.db=d.db=R,c._dbInfo=o;for(var T=0;T<b.length;T++){var k=b[T];k!==c&&(k._dbInfo.db=o.db,k._dbInfo.version=o.version)}})}function Pe(n,c){var o=this;n=F(n);var u=new _(function(d,l){o.ready().then(function(){V(o._dbInfo,oe,function(v,E){if(v)return l(v);try{var w=E.objectStore(o._dbInfo.storeName),b=w.get(n);b.onsuccess=function(){var R=b.result;R===void 0&&(R=null),P(R)&&(R=S(R)),d(R)},b.onerror=function(){l(b.error)}}catch(R){l(R)}})}).catch(l)});return O(u,c),u}function qe(n,c){var o=this,u=new _(function(d,l){o.ready().then(function(){V(o._dbInfo,oe,function(v,E){if(v)return l(v);try{var w=E.objectStore(o._dbInfo.storeName),b=w.openCursor(),R=1;b.onsuccess=function(){var T=b.result;if(T){var k=T.value;P(k)&&(k=S(k));var j=n(k,T.key,R++);j!==void 0?d(j):T.continue()}else d()},b.onerror=function(){l(b.error)}}catch(T){l(T)}})}).catch(l)});return O(u,c),u}function Cn(n,c,o){var u=this;n=F(n);var d=new _(function(l,v){var E;u.ready().then(function(){return E=u._dbInfo,Ae.call(c)==="[object Blob]"?H(E.db).then(function(w){return w?c:I(c)}):c}).then(function(w){V(u._dbInfo,A,function(b,R){if(b)return v(b);try{var T=R.objectStore(u._dbInfo.storeName);w===null&&(w=void 0);var k=T.put(w,n);R.oncomplete=function(){w===void 0&&(w=null),l(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,c){var o=this;n=F(n);var u=new _(function(d,l){o.ready().then(function(){V(o._dbInfo,A,function(v,E){if(v)return l(v);try{var w=E.objectStore(o._dbInfo.storeName),b=w.delete(n);E.oncomplete=function(){d()},E.onerror=function(){l(b.error)},E.onabort=function(){var R=b.error?b.error:b.transaction.error;l(R)}}catch(R){l(R)}})}).catch(l)});return O(u,c),u}function Dn(n){var c=this,o=new _(function(u,d){c.ready().then(function(){V(c._dbInfo,A,function(l,v){if(l)return d(l);try{var E=v.objectStore(c._dbInfo.storeName),w=E.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 $n(n){var c=this,o=new _(function(u,d){c.ready().then(function(){V(c._dbInfo,oe,function(l,v){if(l)return d(l);try{var E=v.objectStore(c._dbInfo.storeName),w=E.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,c){var o=this,u=new _(function(d,l){if(n<0){d(null);return}o.ready().then(function(){V(o._dbInfo,oe,function(v,E){if(v)return l(v);try{var w=E.objectStore(o._dbInfo.storeName),b=!1,R=w.openKeyCursor();R.onsuccess=function(){var T=R.result;if(!T){d(null);return}n===0||b?d(T.key):(b=!0,T.advance(n))},R.onerror=function(){l(R.error)}}catch(T){l(T)}})}).catch(l)});return O(u,c),u}function xn(n){var c=this,o=new _(function(u,d){c.ready().then(function(){V(c._dbInfo,oe,function(l,v){if(l)return d(l);try{var E=v.objectStore(c._dbInfo.storeName),w=E.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,c){c=C.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 l=n.name===o.name&&u._dbInfo.db,v=l?_.resolve(u._dbInfo.db):ve(n).then(function(E){var w=$[n.name],b=w.forages;w.db=E;for(var R=0;R<b.length;R++)b[R]._dbInfo.db=E;return E});n.storeName?d=v.then(function(E){if(!!E.objectStoreNames.contains(n.storeName)){var w=E.version+1;Q(n);var b=$[n.name],R=b.forages;E.close();for(var T=0;T<R.length;T++){var k=R[T];k._dbInfo.db=null,k._dbInfo.version=w}var j=new _(function(q,z){var X=y.open(n.name,w);X.onerror=function(fe){var Ye=X.result;Ye.close(),z(fe)},X.onupgradeneeded=function(){var fe=X.result;fe.deleteObjectStore(n.storeName)},X.onsuccess=function(){var fe=X.result;fe.close(),q(fe)}});return j.then(function(q){b.db=q;for(var z=0;z<R.length;z++){var X=R[z];X._dbInfo.db=q,ae(X._dbInfo)}}).catch(function(q){throw(ce(n,q)||_.resolve()).catch(function(){}),q})}}):d=v.then(function(E){Q(n);var w=$[n.name],b=w.forages;E.close();for(var R=0;R<b.length;R++){var T=b[R];T._dbInfo.db=null}var k=new _(function(j,q){var z=y.deleteDatabase(n.name);z.onerror=function(){var X=z.result;X&&X.close(),q(z.error)},z.onblocked=function(){console.warn('dropInstance blocked for database "'+n.name+'" until all open connections are closed')},z.onsuccess=function(){var X=z.result;X&&X.close(),j(X)}});return k.then(function(j){w.db=j;for(var q=0;q<b.length;q++){var z=b[q];ae(z._dbInfo)}}).catch(function(j){throw(ce(n,j)||_.resolve()).catch(function(){}),j})})}return O(d,c),d}var kn={_driver:"asyncStorage",_initStorage:ke,_support:g(),iterate:qe,getItem:Pe,setItem:Cn,removeItem:Pn,clear:Dn,length:$n,key:Un,keys:xn,dropInstance:Fn};function Wn(){return typeof openDatabase=="function"}var Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bn="~~local_forage_type~",zt=/^~~local_forage_type~([^~]+)~/,it="__lfsc__:",St=it.length,At="arbf",Ot="blob",Jt="si08",Qt="ui08",Zt="uic8",er="si16",tr="si32",rr="ur16",nr="ui32",ir="fl32",or="fl64",ar=St+At.length,sr=Object.prototype.toString;function cr(n){var c=n.length*.75,o=n.length,u,d=0,l,v,E,w;n[n.length-1]==="="&&(c--,n[n.length-2]==="="&&c--);var b=new ArrayBuffer(c),R=new Uint8Array(b);for(u=0;u<o;u+=4)l=Oe.indexOf(n[u]),v=Oe.indexOf(n[u+1]),E=Oe.indexOf(n[u+2]),w=Oe.indexOf(n[u+3]),R[d++]=l<<2|v>>4,R[d++]=(v&15)<<4|E>>2,R[d++]=(E&3)<<6|w&63;return b}function Nt(n){var c=new Uint8Array(n),o="",u;for(u=0;u<c.length;u+=3)o+=Oe[c[u]>>2],o+=Oe[(c[u]&3)<<4|c[u+1]>>4],o+=Oe[(c[u+1]&15)<<2|c[u+2]>>6],o+=Oe[c[u+2]&63];return c.length%3===2?o=o.substring(0,o.length-1)+"=":c.length%3===1&&(o=o.substring(0,o.length-2)+"=="),o}function Gn(n,c){var o="";if(n&&(o=sr.call(n)),n&&(o==="[object ArrayBuffer]"||n.buffer&&sr.call(n.buffer)==="[object ArrayBuffer]")){var u,d=it;n instanceof ArrayBuffer?(u=n,d+=At):(u=n.buffer,o==="[object Int8Array]"?d+=Jt:o==="[object Uint8Array]"?d+=Qt:o==="[object Uint8ClampedArray]"?d+=Zt:o==="[object Int16Array]"?d+=er:o==="[object Uint16Array]"?d+=rr:o==="[object Int32Array]"?d+=tr:o==="[object Uint32Array]"?d+=nr:o==="[object Float32Array]"?d+=ir:o==="[object Float64Array]"?d+=or:c(new Error("Failed to get type for BinaryArray"))),c(d+Nt(u))}else if(o==="[object Blob]"){var l=new FileReader;l.onload=function(){var v=Bn+n.type+"~"+Nt(this.result);c(it+Ot+v)},l.readAsArrayBuffer(n)}else try{c(JSON.stringify(n))}catch(v){console.error("Couldn't convert value into a JSON string: ",n),c(null,v)}}function Vn(n){if(n.substring(0,St)!==it)return JSON.parse(n);var c=n.substring(ar),o=n.substring(St,ar),u;if(o===Ot&&zt.test(c)){var d=c.match(zt);u=d[1],c=c.substring(d[0].length)}var l=cr(c);switch(o){case At:return l;case Ot:return N([l],{type:u});case Jt:return new Int8Array(l);case Qt:return new Uint8Array(l);case Zt:return new Uint8ClampedArray(l);case er:return new Int16Array(l);case rr:return new Uint16Array(l);case tr:return new Int32Array(l);case nr:return new Uint32Array(l);case ir:return new Float32Array(l);case or:return new Float64Array(l);default:throw new Error("Unkown type: "+o)}}var Tt={serialize:Gn,deserialize:Vn,stringToBuffer:cr,bufferToString:Nt};function lr(n,c,o,u){n.executeSql("CREATE TABLE IF NOT EXISTS "+c.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],o,u)}function jn(n){var c=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(l,v){try{o.db=openDatabase(o.name,String(o.version),o.description,o.size)}catch(E){return v(E)}o.db.transaction(function(E){lr(E,o,function(){c._dbInfo=o,l()},function(w,b){v(b)})},v)});return o.serializer=Tt,d}function Ne(n,c,o,u,d,l){n.executeSql(o,u,d,function(v,E){E.code===E.SYNTAX_ERR?v.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[c.storeName],function(w,b){b.rows.length?l(w,E):lr(w,c,function(){w.executeSql(o,u,d,l)},l)},l):l(v,E)},l)}function Hn(n,c){var o=this;n=F(n);var u=new _(function(d,l){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(E){Ne(E,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){l(b)})})}).catch(l)});return O(u,c),u}function qn(n,c){var o=this,u=new _(function(d,l){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(E){Ne(E,v,"SELECT * FROM "+v.storeName,[],function(w,b){for(var R=b.rows,T=R.length,k=0;k<T;k++){var j=R.item(k),q=j.value;if(q&&(q=v.serializer.deserialize(q)),q=n(q,j.key,k+1),q!==void 0){d(q);return}}d()},function(w,b){l(b)})})}).catch(l)});return O(u,c),u}function ur(n,c,o,u){var d=this;n=F(n);var l=new _(function(v,E){d.ready().then(function(){c===void 0&&(c=null);var w=c,b=d._dbInfo;b.serializer.serialize(c,function(R,T){T?E(T):b.db.transaction(function(k){Ne(k,b,"INSERT OR REPLACE INTO "+b.storeName+" (key, value) VALUES (?, ?)",[n,R],function(){v(w)},function(j,q){E(q)})},function(k){if(k.code===k.QUOTA_ERR){if(u>0){v(ur.apply(d,[n,w,o,u-1]));return}E(k)}})})}).catch(E)});return O(l,o),l}function Kn(n,c,o){return ur.apply(this,[n,c,o,1])}function Yn(n,c){var o=this;n=F(n);var u=new _(function(d,l){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(E){Ne(E,v,"DELETE FROM "+v.storeName+" WHERE key = ?",[n],function(){d()},function(w,b){l(b)})})}).catch(l)});return O(u,c),u}function Xn(n){var c=this,o=new _(function(u,d){c.ready().then(function(){var l=c._dbInfo;l.db.transaction(function(v){Ne(v,l,"DELETE FROM "+l.storeName,[],function(){u()},function(E,w){d(w)})})}).catch(d)});return O(o,n),o}function zn(n){var c=this,o=new _(function(u,d){c.ready().then(function(){var l=c._dbInfo;l.db.transaction(function(v){Ne(v,l,"SELECT COUNT(key) as c FROM "+l.storeName,[],function(E,w){var b=w.rows.item(0).c;u(b)},function(E,w){d(w)})})}).catch(d)});return O(o,n),o}function Jn(n,c){var o=this,u=new _(function(d,l){o.ready().then(function(){var v=o._dbInfo;v.db.transaction(function(E){Ne(E,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){l(b)})})}).catch(l)});return O(u,c),u}function Qn(n){var c=this,o=new _(function(u,d){c.ready().then(function(){var l=c._dbInfo;l.db.transaction(function(v){Ne(v,l,"SELECT key FROM "+l.storeName,[],function(E,w){for(var b=[],R=0;R<w.rows.length;R++)b.push(w.rows.item(R).key);u(b)},function(E,w){d(w)})})}).catch(d)});return O(o,n),o}function Zn(n){return new _(function(c,o){n.transaction(function(u){u.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(d,l){for(var v=[],E=0;E<l.rows.length;E++)v.push(l.rows.item(E).name);c({db:n,storeNames:v})},function(d,l){o(l)})},function(u){o(u)})})}function ei(n,c){c=C.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(l){var v;n.name===o.name?v=u._dbInfo.db:v=openDatabase(n.name,"","",0),n.storeName?l({db:v,storeNames:[n.storeName]}):l(Zn(v))}).then(function(l){return new _(function(v,E){l.db.transaction(function(w){function b(j){return new _(function(q,z){w.executeSql("DROP TABLE IF EXISTS "+j,[],function(){q()},function(X,fe){z(fe)})})}for(var R=[],T=0,k=l.storeNames.length;T<k;T++)R.push(b(l.storeNames[T]));_.all(R).then(function(){v()}).catch(function(j){E(j)})},function(w){E(w)})})}):d=_.reject("Invalid arguments"),O(d,c),d}var ti={_driver:"webSQLStorage",_initStorage:jn,_support:Wn(),iterate:qn,getItem:Hn,setItem:Kn,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 dr(n,c){var o=n.name+"/";return n.storeName!==c.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 c=this,o={};if(n)for(var u in n)o[u]=n[u];return o.keyPrefix=dr(n,c._defaultConfig),ii()?(c._dbInfo=o,o.serializer=Tt,_.resolve()):_.reject()}function ai(n){var c=this,o=c.ready().then(function(){for(var u=c._dbInfo.keyPrefix,d=localStorage.length-1;d>=0;d--){var l=localStorage.key(d);l.indexOf(u)===0&&localStorage.removeItem(l)}});return O(o,n),o}function si(n,c){var o=this;n=F(n);var u=o.ready().then(function(){var d=o._dbInfo,l=localStorage.getItem(d.keyPrefix+n);return l&&(l=d.serializer.deserialize(l)),l});return O(u,c),u}function ci(n,c){var o=this,u=o.ready().then(function(){for(var d=o._dbInfo,l=d.keyPrefix,v=l.length,E=localStorage.length,w=1,b=0;b<E;b++){var R=localStorage.key(b);if(R.indexOf(l)===0){var T=localStorage.getItem(R);if(T&&(T=d.serializer.deserialize(T)),T=n(T,R.substring(v),w++),T!==void 0)return T}}});return O(u,c),u}function li(n,c){var o=this,u=o.ready().then(function(){var d=o._dbInfo,l;try{l=localStorage.key(n)}catch{l=null}return l&&(l=l.substring(d.keyPrefix.length)),l});return O(u,c),u}function ui(n){var c=this,o=c.ready().then(function(){for(var u=c._dbInfo,d=localStorage.length,l=[],v=0;v<d;v++){var E=localStorage.key(v);E.indexOf(u.keyPrefix)===0&&l.push(E.substring(u.keyPrefix.length))}return l});return O(o,n),o}function di(n){var c=this,o=c.keys().then(function(u){return u.length});return O(o,n),o}function fi(n,c){var o=this;n=F(n);var u=o.ready().then(function(){var d=o._dbInfo;localStorage.removeItem(d.keyPrefix+n)});return O(u,c),u}function hi(n,c,o){var u=this;n=F(n);var d=u.ready().then(function(){c===void 0&&(c=null);var l=c;return new _(function(v,E){var w=u._dbInfo;w.serializer.serialize(c,function(b,R){if(R)E(R);else try{localStorage.setItem(w.keyPrefix+n,b),v(l)}catch(T){(T.name==="QuotaExceededError"||T.name==="NS_ERROR_DOM_QUOTA_REACHED")&&E(T),E(T)}})})});return O(d,o),d}function mi(n,c){if(c=C.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(l){n.storeName?l(dr(n,u._defaultConfig)):l(n.name+"/")}).then(function(l){for(var v=localStorage.length-1;v>=0;v--){var E=localStorage.key(v);E.indexOf(l)===0&&localStorage.removeItem(E)}}):d=_.reject("Invalid arguments"),O(d,c),d}var vi={_driver:"localStorageWrapper",_initStorage:oi,_support:ri(),iterate:ci,getItem:si,setItem:hi,removeItem:fi,clear:ai,length:di,key:li,keys:ui,dropInstance:mi},pi=function(c,o){return c===o||typeof c=="number"&&typeof o=="number"&&isNaN(c)&&isNaN(o)},yi=function(c,o){for(var u=c.length,d=0;d<u;){if(pi(c[d],o))return!0;d++}return!1},fr=Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"},Ke={},hr={},We={INDEXEDDB:kn,WEBSQL:ti,LOCALSTORAGE:vi},gi=[We.INDEXEDDB._driver,We.WEBSQL._driver,We.LOCALSTORAGE._driver],ot=["dropInstance"],Mt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ot),Ei={description:"",driver:gi.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function _i(n,c){n[c]=function(){var o=arguments;return n.ready().then(function(){return n[c].apply(n,o)})}}function Lt(){for(var n=1;n<arguments.length;n++){var c=arguments[n];if(c)for(var o in c)c.hasOwnProperty(o)&&(fr(c[o])?arguments[0][o]=c[o].slice():arguments[0][o]=c[o])}return arguments[0]}var Ii=function(){function n(c){f(this,n);for(var o in We)if(We.hasOwnProperty(o)){var u=We[o],d=u._driver;this[o]=d,Ke[d]||this.defineDriver(u)}this._defaultConfig=Lt({},Ei),this._config=Lt({},this._defaultConfig,c),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 l=new _(function(v,E){try{var w=o._driver,b=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!o._driver){E(b);return}for(var R=Mt.concat("_initStorage"),T=0,k=R.length;T<k;T++){var j=R[T],q=!yi(ot,j);if((q||o[j])&&typeof o[j]!="function"){E(b);return}}var z=function(){for(var Ye=function(Ri){return function(){var Si=new Error("Method "+Ri+" is not implemented by the current driver"),mr=_.reject(Si);return O(mr,arguments[arguments.length-1]),mr}},Ct=0,bi=ot.length;Ct<bi;Ct++){var Pt=ot[Ct];o[Pt]||(o[Pt]=Ye(Pt))}};z();var X=function(Ye){Ke[w]&&console.info("Redefining LocalForage driver: "+w),Ke[w]=o,hr[w]=Ye,v()};"_support"in o?o._support&&typeof o._support=="function"?o._support().then(X,E):X(!!o._support):X(!0)}catch(fe){E(fe)}});return L(l,u,d),l},n.prototype.driver=function(){return this._driver||null},n.prototype.getDriver=function(o,u,d){var l=Ke[o]?_.resolve(Ke[o]):_.reject(new Error("Driver not found."));return L(l,u,d),l},n.prototype.getSerializer=function(o){var u=_.resolve(Tt);return L(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 L(d,o,o),d},n.prototype.setDriver=function(o,u,d){var l=this;fr(o)||(o=[o]);var v=this._getSupportedDrivers(o);function E(){l._config.driver=l.driver()}function w(T){return l._extend(T),E(),l._ready=l._initStorage(l._config),l._ready}function b(T){return function(){var k=0;function j(){for(;k<T.length;){var q=T[k];return k++,l._dbInfo=null,l._ready=null,l.getDriver(q).then(w).catch(j)}E();var z=new Error("No available storage method found.");return l._driverSet=_.reject(z),l._driverSet}return j()}}var R=this._driverSet!==null?this._driverSet.catch(function(){return _.resolve()}):_.resolve();return this._driverSet=R.then(function(){var T=v[0];return l._dbInfo=null,l._ready=null,l.getDriver(T).then(function(k){l._driver=k._driver,E(),l._wrapLibraryMethodsWithReady(),l._initDriver=b(v)})}).catch(function(){E();var T=new Error("No available storage method found.");return l._driverSet=_.reject(T),l._driverSet}),L(this._driverSet,u,d),this._driverSet},n.prototype.supports=function(o){return!!hr[o]},n.prototype._extend=function(o){Lt(this,o)},n.prototype._getSupportedDrivers=function(o){for(var u=[],d=0,l=o.length;d<l;d++){var v=o[d];this.supports(v)&&u.push(v)}return u},n.prototype._wrapLibraryMethodsWithReady=function(){for(var o=0,u=Mt.length;o<u;o++)_i(this,Mt[o])},n.prototype.createInstance=function(o){return new n(o)},n}(),wi=new Ii;a.exports=wi},{3:3}]},{},[4])(4)})});var Tn=Er((wt,Nn)=>{(function(e,t){typeof wt=="object"&&typeof Nn<"u"?t(wt):typeof define=="function"&&define.amd?define("localforage-driver-memory",["exports"],t):t(e.LocalforageDriverMemory={})})(typeof self<"u"?self:wt,function(e){"use strict";var t="localforage-driver-memory";function r(h){var I=typeof Symbol=="function"&&h[Symbol.iterator],S=0;return I?I.call(h):{next:function(){return h&&S>=h.length&&(h=void 0),{value:h&&h[S++],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 S=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,P=new S,D=0;D<h.length;D+=1)P.append(h[D]);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,S=h.length;h[h.length-1]==="="&&(I--,h[h.length-2]==="="&&I--);for(var P=new ArrayBuffer(I),D=new Uint8Array(P),U=0,V=0;U<S;U+=4){var ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U]),ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U+1]),Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U+2]),qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[U+3]);D[V++]=ee<<2|ke>>4,D[V++]=(ke&15)<<4|Pe>>2,D[V++]=(Pe&3)<<6|qe&63}return P}function y(h){for(var I=new Uint8Array(h),S="",P=0;P<I.length;P+=3)S+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[I[P]>>2],S+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I[P]&3)<<4|I[P+1]>>4],S+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(I[P+1]&15)<<2|I[P+2]>>6],S+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[I[P+2]&63];return I.length%3===2?S=S.substring(0,S.length-1)+"=":I.length%3===1&&(S=S.substring(0,S.length-2)+"=="),S}function g(h,I){var S="";if(h&&(S=f.call(h)),h&&(S==="[object ArrayBuffer]"||h.buffer&&f.call(h.buffer)==="[object ArrayBuffer]")){var P=void 0,D="__lfsc__:";h instanceof ArrayBuffer?(P=h,D+="arbf"):(P=h.buffer,S==="[object Int8Array]"?D+="si08":S==="[object Uint8Array]"?D+="ui08":S==="[object Uint8ClampedArray]"?D+="uic8":S==="[object Int16Array]"?D+="si16":S==="[object Uint16Array]"?D+="ur16":S==="[object Int32Array]"?D+="si32":S==="[object Uint32Array]"?D+="ui32":S==="[object Float32Array]"?D+="fl32":S==="[object Float64Array]"?D+="fl64":I(new Error("Failed to get type for BinaryArray"))),I(D+y(P))}else if(S==="[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),S=h.substring(s,m),P;if(S==="blob"&&a.test(I)){var D=I.match(a);P=D[1],I=I.substring(D[0].length)}var U=p(I);switch(S){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: "+S)}}function _(h){var I,S;if(h===null||typeof h!="object"||"isActiveClone"in h)return h;var P=h instanceof Date?new Date(h):h.constructor();try{for(var D=r(Object.keys(h)),U=D.next();!U.done;U=D.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&&(S=D.return)&&S.call(D)}finally{if(I)throw I.error}}return P}function O(h,I){return(h.name||I.name)+"/"+(h.storeName||I.storeName)+"/"}function L(h,I){I&&h.then(function(S){I(null,S)},function(S){I(S)})}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 C(h,I){var S=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 D;return h.name?D=new Promise(function(U){h.storeName?U(O(h,S._defaultConfig)):U(h.name+"/")}):D=Promise.reject("Invalid arguments"),{promise:D,callback:I}}function W(h){return typeof h!="string"&&(console.warn(h+" used as a key, but it is not a string."),h=String(h)),h}var J={bufferToString:y,deserialize:N,serialize:g,stringToBuffer:p},$={},Ae=function(){function h(I){this.kp=I,this.data={}}return h.resolve=function(I){return $[I]||($[I]=new h(I)),$[I]},h.prototype.clear=function(){this.data={}},h.prototype.drop=function(){this.clear(),delete $[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,S){this.data[I]=S},h}();function oe(h){var I=h?_(h):{},S=O(I,this._defaultConfig),P=Ae.resolve(S);return this._dbInfo=I,this._dbInfo.serializer=J,this._dbInfo.keyPrefix=S,this._dbInfo.mStore=P,Promise.resolve()}function A(h){var I=this,S=this.ready().then(function(){I._dbInfo.mStore.clear()});return L(S,h),S}function B(h,I){var S=C.apply(this,arguments),P=S.promise,D=S.callback,U=P.then(function(V){Ae.resolve(V).drop()});return L(U,D),P}function x(h,I){var S=this;h=W(h);var P=this.ready().then(function(){var D=S._dbInfo.mStore.get(h);return D==null?null:S._dbInfo.serializer.deserialize(D)});return L(P,I),P}function H(h,I){var S=this,P=this.ready().then(function(){for(var D=S._dbInfo.mStore,U=D.keys(),V=0;V<U.length;V++){var ee=D.get(U[V]);if(ee&&(ee=S._dbInfo.serializer.deserialize(ee)),ee=h(ee,U[V],V+1),ee!==void 0)return ee}});return L(P,I),P}function Q(h,I){var S=this,P=this.ready().then(function(){var D;try{D=S._dbInfo.mStore.key(h),D===void 0&&(D=null)}catch{D=null}return D});return L(P,I),P}function ae(h){var I=this,S=this.ready().then(function(){return I._dbInfo.mStore.keys()});return L(S,h),S}function ce(h){var I=this.keys().then(function(S){return S.length});return L(I,h),I}function le(h,I){var S=this;h=W(h);var P=this.ready().then(function(){S._dbInfo.mStore.rm(h)});return L(P,I),P}function ve(h,I,S){var P=this;h=W(h);var D=this.ready().then(function(){I===void 0&&(I=null);var U=I;return new Promise(function(V,ee){P._dbInfo.serializer.serialize(I,function(ke,Pe){if(Pe)ee(Pe);else try{P._dbInfo.mStore.set(h,ke),V(U)}catch(qe){ee(qe)}})})});return L(D,S),D}var Ce=!0;e._support=Ce,e._driver=t,e._initStorage=oe,e.clear=A,e.dropInstance=B,e.getItem=x,e.iterate=H,e.key=Q,e.keys=ae,e.length=ce,e.removeItem=le,e.setItem=ve,Object.defineProperty(e,"__esModule",{value:!0})})});var Fa={};_r(Fa,{default:()=>xa});var Ee=(e=>(e.MissingApiKey="MISSING_API_KEY",e.ModalNotReady="MODAL_NOT_READY",e.ConnectionLost="CONNECTION_WAS_LOST",e.MalformedResponse="MALFORMED_RESPONSE",e.InvalidArgument="INVALID_ARGUMENT",e.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",e.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",e))(Ee||{}),be=(e=>(e.SyncWeb3Method="SYNC_WEB3_METHOD",e.DuplicateIframe="DUPLICATE_IFRAME",e.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",e.DeprecationNotice="DEPRECATION_NOTICE",e.ProductAnnouncement="ANNOUNCEMENT",e))(be||{}),Be=(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))(Be||{}),_e=(e=>(e.PROVIDER="magic_3pw_provider",e.ADDRESS="magic_3pw_address",e.CHAIN_ID="magic_3pw_chainId",e))(_e||{}),br=(e=>(e.WalletConnected="wallet_connected",e.WalletRejected="wallet_rejected",e.Web3ModalSelected="web3modal_selected",e))(br||{}),M=(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))(M||{}),Dt=["magic_intermediary_event","magic_nft_checkout","mc_login"],he=(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))(he||{}),Re=(e=>(e.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",e.MAGIC_PING="MAGIC_PING",e))(Re||{}),Rr=(e=>(e.UpdateEmail="update-email",e.MFA="mfa",e.Recovery="recovery",e))(Rr||{}),Sr=(e=>(e.Retry="retry",e))(Sr||{}),Ar=(e=>(e.EmailSent="email-sent",e.EmailNotDeliverable="email-not-deliverable",e))(Ar||{}),de=(e=>(e.VerifyEmailOtp="verify-email-otp",e.VerifyMFACode="verify-mfa-code",e.LostDevice="lost-device",e.VerifyRecoveryCode="verify-recovery-code",e.Cancel="cancel",e))(de||{}),De=(e=>(e.VerifySmsOtp="verify-sms-otp",e.Cancel="cancel",e.Retry="retry",e))(De||{}),Or=(e=>(e.SmsOTPSent="sms-otp-sent",e.InvalidSmsOtp="invalid-sms-otp",e.ExpiredSmsOtp="expired-sms-otp",e))(Or||{}),Nr=(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))(Nr||{}),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||{}),ue=(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))(ue||{}),Mr=(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))(Mr||{}),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||{}),Cr=(e=>(e.IDTokenCreated="Auth/id-token-created",e))(Cr||{}),Pr=(e=>(e.Cancel="Farcaster/cancel",e))(Pr||{}),Dr=(e=>(e.MFASecretGenerated="mfa-secret-generated",e.InvalidMFAOtp="invalid-mfa-otp",e.MFARecoveryCodes="mfa-recovery-codes",e))(Dr||{}),$e=(e=>(e.VerifyMFACode="verify-mfa-code",e.Cancel="cancel-mfa-setup",e))($e||{}),$r=(e=>(e.MFACodeRequested="mfa-code-requested",e.InvalidMFAOtp="invalid-mfa-otp",e.InvalidRecoveryCode="invalid-recovery-code",e))($r||{}),Se=(e=>(e.VerifyMFACode="verify-mfa-code",e.LostDevice="lost-device",e.Cancel="cancel-mfa-disable",e))(Se||{}),Ur=(e=>(e.Harmony="HARMONY",e))(Ur||{}),at=(e=>(e.ClosedByUser="closed-by-user",e))(at||{}),st=(e=>(e.ClosedByUser="closed-by-user-on-received",e))(st||{}),xr=(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))(xr||{}),ye=(e=>(e.SendNewPhoneNumber="send-new-phone-number",e.SendOtpCode="send-otp-code",e.Cancel="cancel",e.StartEditPhoneNumber="start-edit-phone-number",e))(ye||{}),Fr=(e=>(e.PhoneNumber="phone_number",e))(Fr||{}),kr=(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))(kr||{}),ge=(e=>(e.Cancel="cancel",e.VerifyOtp="verify-otp-code",e.ResendSms="resend-sms-otp",e.UpdateEmail="update-email",e))(ge||{}),Ue=(e=>(e.Success="nft-checkout-success",e.Failure="nft-checkout-failure",e.Initiated="nft-checkout-initiated",e.Disconnect="disconnect",e))(Ue||{}),Wr=(e=>(e.WalletInfoFetched="Wallet/wallet-info-fetched",e))(Wr||{}),Br=(e=>(e.CloseMagicWindow="close-magic-window",e))(Br||{});var Ci=Object.create,gt=Object.defineProperty,Pi=Object.defineProperties,Di=Object.getOwnPropertyDescriptor,$i=Object.getOwnPropertyDescriptors,Ui=Object.getOwnPropertyNames,Gr=Object.getOwnPropertySymbols,xi=Object.getPrototypeOf,rn=Object.prototype.hasOwnProperty,Fi=Object.prototype.propertyIsEnumerable,Vr=(e,t,r)=>t in e?gt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Et=(e,t)=>{for(var r in t||(t={}))rn.call(t,r)&&Vr(e,r,t[r]);if(Gr)for(var r of Gr(t))Fi.call(t,r)&&Vr(e,r,t[r]);return e},xt=(e,t)=>Pi(e,$i(t)),ki=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wi=(e,t)=>{for(var r in t)gt(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))!rn.call(e,a)&&a!==r&&gt(e,a,{get:()=>t[a],enumerable:!(i=Di(t,a))||i.enumerable});return e},Gi=(e,t,r)=>(r=e!=null?Ci(xi(e)):{},Bi(t||!e||!e.__esModule?gt(r,"default",{value:e,enumerable:!0}):r,e)),Z=(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,g,N){this.fn=y,this.context=g,this.once=N||!1}function m(y,g,N,_,O){if(typeof N!="function")throw new TypeError("The listener must be a function");var L=new s(N,_||y,O),F=i?i+g:g;return y._events[F]?y._events[F].fn?y._events[F]=[y._events[F],L]:y._events[F].push(L):(y._events[F]=L,y._eventsCount++),y}function f(y,g){--y._eventsCount===0?y._events=new a:delete y._events[g]}function p(){this._events=new a,this._eventsCount=0}p.prototype.eventNames=function(){var y=[],g,N;if(this._eventsCount===0)return y;for(N in g=this._events)r.call(g,N)&&y.push(i?N.slice(1):N);return Object.getOwnPropertySymbols?y.concat(Object.getOwnPropertySymbols(g)):y},p.prototype.listeners=function(y){var g=i?i+y:y,N=this._events[g];if(!N)return[];if(N.fn)return[N.fn];for(var _=0,O=N.length,L=new Array(O);_<O;_++)L[_]=N[_].fn;return L},p.prototype.listenerCount=function(y){var g=i?i+y:y,N=this._events[g];return N?N.fn?1:N.length:0},p.prototype.emit=function(y,g,N,_,O,L){var F=i?i+y:y;if(!this._events[F])return!1;var C=this._events[F],W=arguments.length,J,$;if(C.fn){switch(C.once&&this.removeListener(y,C.fn,void 0,!0),W){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,g),!0;case 3:return C.fn.call(C.context,g,N),!0;case 4:return C.fn.call(C.context,g,N,_),!0;case 5:return C.fn.call(C.context,g,N,_,O),!0;case 6:return C.fn.call(C.context,g,N,_,O,L),!0}for($=1,J=new Array(W-1);$<W;$++)J[$-1]=arguments[$];C.fn.apply(C.context,J)}else{var Ae=C.length,oe;for($=0;$<Ae;$++)switch(C[$].once&&this.removeListener(y,C[$].fn,void 0,!0),W){case 1:C[$].fn.call(C[$].context);break;case 2:C[$].fn.call(C[$].context,g);break;case 3:C[$].fn.call(C[$].context,g,N);break;case 4:C[$].fn.call(C[$].context,g,N,_);break;default:if(!J)for(oe=1,J=new Array(W-1);oe<W;oe++)J[oe-1]=arguments[oe];C[$].fn.apply(C[$].context,J)}}return!0},p.prototype.on=function(y,g,N){return m(this,y,g,N,!1)},p.prototype.once=function(y,g,N){return m(this,y,g,N,!0)},p.prototype.removeListener=function(y,g,N,_){var O=i?i+y:y;if(!this._events[O])return this;if(!g)return f(this,O),this;var L=this._events[O];if(L.fn)L.fn===g&&(!_||L.once)&&(!N||L.context===N)&&f(this,O);else{for(var F=0,C=[],W=L.length;F<W;F++)(L[F].fn!==g||_&&!L[F].once||N&&L[F].context!==N)&&C.push(L[F]);C.length?this._events[O]=C.length===1?C[0]:C:f(this,O)}return this},p.prototype.removeAllListeners=function(y){var g;return y?(g=i?i+y:y,this._events[g]&&f(this,g)):(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 Hi=Number.MAX_SAFE_INTEGER||9007199254740991,Ft={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Hi,MAX_SAFE_COMPONENT_LENGTH:16},qi=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{},K=qi,nt=ji(function(e,t){let{MAX_SAFE_COMPONENT_LENGTH:r}=Ft,i=(t=e.exports={}).re=[],a=t.src=[],s=t.t={},m=0,f=(p,y,g)=>{let N=m++;K(N,y),s[p]=N,a[N]=y,i[N]=new RegExp(y,g?"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*$")}),jr=/^[0-9]+$/,nn=(e,t)=>{let r=jr.test(e),i=jr.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},Ki=(e,t)=>nn(t,e),Yi={compareIdentifiers:nn,rcompareIdentifiers:Ki},{MAX_LENGTH:Hr,MAX_SAFE_INTEGER:ct}=Ft,{re:qr,t:Kr}=nt,{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`);K("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?qr[Kr.LOOSE]:qr[Kr.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>ct||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ct||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ct||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<ct)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(K("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(K("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(K("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)),He=Xi,zi=(e,t,r)=>He(e,t,r)===0,Ji=zi,Qi=(e,t,r)=>He(e,t,r)!==0,Zi=Qi,eo=(e,t,r)=>He(e,t,r)>0,to=eo,ro=(e,t,r)=>He(e,t,r)>=0,no=ro,io=(e,t,r)=>He(e,t,r)<0,oo=io,ao=(e,t,r)=>He(e,t,r)<=0,so=ao,co=(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}`)}},$t=co,Ze=Symbol("SemVer ANY"),tt=class{static get ANY(){return Ze}constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof tt){if(e.loose===!!t.loose)return e;e=e.value}K("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,K("comp",this)}parse(e){let t=this.options.loose?Yr[Xr.COMPARATORLOOSE]:Yr[Xr.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(K("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 $t(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof tt))throw new TypeError("a Comparator is required");if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""||new Ve(e.value,t).test(this.value);if(e.operator==="")return e.value===""||new Ve(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=$t(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),f=$t(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||i||a&&s||m||f}},{re:Yr,t:Xr}=nt,Ve=class{constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof Ve)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Ve(e.raw,t);if(e instanceof tt)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)),K("hyphen replace",e),e=e.replace(ie[re.COMPARATORTRIM],lo),K("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 tt(a,this.options))}intersects(e,t){if(!(e instanceof Ve))throw new TypeError("a Range is required");return this.set.some(r=>zr(r,t)&&e.set.some(i=>zr(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:lo,tildeTrimReplace:uo,caretTrimReplace:fo}=nt,zr=(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)=>(K("comp",e,t),e=po(e,t),K("caret",e),e=mo(e,t),K("tildes",e),e=go(e,t),K("xrange",e),e=_o(e,t),K("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 K("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?(K("replaceTilde pr",f),p=`>=${a}.${s}.${m}-${f} <${a}.${+s+1}.0-0`):p=`>=${a}.${s}.${m} <${a}.${+s+1}.0-0`,K("tilde return",p),p})},po=(e,t)=>e.trim().split(/\s+/).map(r=>yo(r,t)).join(" "),yo=(e,t)=>{K("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 K("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?(K("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`):(K("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`),K("caret return",y),y})},go=(e,t)=>(K("replaceXRanges",e,t),e.split(/\s+/).map(r=>Eo(r,t)).join(" ")),Eo=(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)=>{K("xRange",e,i,a,s,m,f,p);let y=se(s),g=y||se(m),N=g||se(f),_=N;return a==="="&&_&&(a=""),p=t.includePrerelease?"-0":"",y?i=a===">"||a==="<"?"<0.0.0-0":"*":a&&_?(g&&(m=0),f=0,a===">"?(a=">=",g?(s=+s+1,m=0,f=0):(m=+m+1,f=0)):a==="<="&&(a="<",g?s=+s+1:m=+m+1),a==="<"&&(p="-0"),i=`${a+s}.${m}.${f}${p}`):g?i=`>=${s}.0.0${p} <${+s+1}.0.0-0`:N&&(i=`>=${s}.${m}.0${p} <${s}.${+m+1}.0-0`),K("xRange return",i),i})},_o=(e,t)=>(K("replaceStars",e,t),e.trim().replace(ie[re.STAR],"")),Io=(e,t)=>(K("replaceGTE0",e,t),e.trim().replace(ie[t.includePrerelease?re.GTE0PRE:re.GTE0],"")),wo=e=>(t,r,i,a,s,m,f,p,y,g,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(g)?`<${+y+1}.0.0-0`:se(N)?`<${y}.${+g+1}.0-0`:_?`<=${y}.${g}.${N}-${_}`:e?`<${y}.${g}.${+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(K(e[i].semver),e[i].semver!==tt.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 Ve(t,r)}catch(i){return!1}return t.test(e)},{MAX_LENGTH:So}=Ft,{re:Jr,t:Qr}=nt,Ao=(e,t)=>{if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof te)return e;if(typeof e!="string"||e.length>So||!(t.loose?Jr[Qr.LOOSE]:Jr[Qr.FULL]).test(e))return null;try{return new te(e,t)}catch(r){return null}},Oo=Ao,{re:lt,t:ut}=nt,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=lt[ut.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),lt[ut.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;lt[ut.COERCERTL].lastIndex=-1}else r=e.match(lt[ut.COERCE]);return r===null?null:Oo(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};function To(e){return String.fromCharCode(parseInt(e.slice(1),16))}function Mo(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}function Lo(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,To))}function Co(e){return decodeURIComponent(Array.from(atob(e),Mo).join(""))}function on(e){return Lo(JSON.stringify(e))}function Po(e){return JSON.parse(Co(e))}function et(e){return typeof e=="undefined"}function Do(e){return e===null}function an(e){return Do(e)||et(e)}function $o(e){return an(e)?!1:!et(e.jsonrpc)&&!et(e.id)&&(!et(e.result)||!et(e.error))}function Uo(e){return an(e)?!1:typeof e=="number"&&Object.values(Be).includes(e)}function mt(e){if(!e)return!0;for(let t in e)if(Object.hasOwnProperty.call(e,t))return!1;return!0}var Y={};function sn(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"},we=class extends Error{constructor(e,t){super(`Magic SDK Error: [${e}] ${t}`),this.code=e,this.rawMessage=t,this.__proto__=Error,Object.setPrototypeOf(this,we.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:Be.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)}},Fe=class{constructor(e,t){this.code=e,this.rawMessage=t,this.message=`Magic SDK Warning: [${e}] ${t}`}log(){console.warn(this.message)}},_t=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,_t.prototype)}},vt=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 we(Ee.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.")}function kt(){return new we(Ee.ModalNotReady,"Modal is not ready.")}function cn(){return new we(Ee.ConnectionLost,"Modal Disconnected, Reinitializing. please try again.")}function ko(){return new we(Ee.MalformedResponse,"Response from the Magic iframe is malformed.")}function Wo(e){return new we(Ee.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 we(Ee.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 we(Ee.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": "29.0.2-canary.863.13981938615.0",
3
+ "version": "29.0.2-canary.863.13981975427.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": "25.0.2-canary.863.13981938615.0",
33
- "@magic-sdk/provider": "29.0.2-canary.863.13981938615.0",
34
- "@magic-sdk/types": "24.18.1-canary.863.13981938615.0",
32
+ "@magic-sdk/commons": "25.0.2-canary.863.13981975427.0",
33
+ "@magic-sdk/provider": "29.0.2-canary.863.13981975427.0",
34
+ "@magic-sdk/types": "24.18.1-canary.863.13981975427.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": "620eba79e59b99bafd53fe1092469e7e7f24a95a"
43
+ "gitHead": "9ce14f143c2624d0156136dbdcfd0cea3b669a12"
44
44
  }