@privy-io/react-auth 1.21.0-beta.4 → 1.21.0-beta.5

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.
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var Yl=Object.create;var Lo=Object.defineProperty;var Xl=Object.getOwnPropertyDescriptor;var Ql=Object.getOwnPropertyNames;var ec=Object.getPrototypeOf,tc=Object.prototype.hasOwnProperty;var Xn=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qn=(e,t)=>{for(var o in t)Lo(e,o,{get:t[o],enumerable:!0})},ei=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ql(t))!tc.call(e,n)&&n!==o&&Lo(e,n,{get:()=>t[n],enumerable:!(r=Xl(t,n))||r.enumerable});return e};var oc=(e,t,o)=>(o=e!=null?Yl(ec(e)):{},ei(t||!e||!e.__esModule?Lo(o,"default",{value:e,enumerable:!0}):o,e)),ti=e=>ei(Lo({},"__esModule",{value:!0}),e);var Go=Ne((R0,Fo)=>{var Ui,Bi,Fi,Gi,Hi,Vi,ji,$i,zi,Uo,Hr,qi,Zi,Ki,At,Ji,Yi,Xi,Qi,ea,ta,oa,ra,na,Bo;(function(e){var t=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(r){e(o(t,o(r)))}):typeof Fo=="object"&&typeof Fo.exports=="object"?e(o(t,o(Fo.exports))):e(o(t));function o(r,n){return r!==t&&(typeof Object.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(i,a){return r[i]=n?n(i,a):a}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])};Ui=function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)},Bi=Object.assign||function(r){for(var n,i=1,a=arguments.length;i<a;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])}return r},Fi=function(r,n){var i={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&n.indexOf(a)<0&&(i[a]=r[a]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(r);s<a.length;s++)n.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(r,a[s])&&(i[a[s]]=r[a[s]]);return i},Gi=function(r,n,i,a){var s=arguments.length,l=s<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,i):a,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(r,n,i,a);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(l=(s<3?c(l):s>3?c(n,i,l):c(n,i))||l);return s>3&&l&&Object.defineProperty(n,i,l),l},Hi=function(r,n){return function(i,a){n(i,a,r)}},Vi=function(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)},ji=function(r,n,i,a){function s(l){return l instanceof i?l:new i(function(c){c(l)})}return new(i||(i=Promise))(function(l,c){function h(g){try{p(a.next(g))}catch(b){c(b)}}function m(g){try{p(a.throw(g))}catch(b){c(b)}}function p(g){g.done?l(g.value):s(g.value).then(h,m)}p((a=a.apply(r,n||[])).next())})},$i=function(r,n){var i={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},a,s,l,c;return c={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function h(p){return function(g){return m([p,g])}}function m(p){if(a)throw new TypeError("Generator is already executing.");for(;i;)try{if(a=1,s&&(l=p[0]&2?s.return:p[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,p[1])).done)return l;switch(s=0,l&&(p=[p[0]&2,l.value]),p[0]){case 0:case 1:l=p;break;case 4:return i.label++,{value:p[1],done:!1};case 5:i.label++,s=p[1],p=[0];continue;case 7:p=i.ops.pop(),i.trys.pop();continue;default:if(l=i.trys,!(l=l.length>0&&l[l.length-1])&&(p[0]===6||p[0]===2)){i=0;continue}if(p[0]===3&&(!l||p[1]>l[0]&&p[1]<l[3])){i.label=p[1];break}if(p[0]===6&&i.label<l[1]){i.label=l[1],l=p;break}if(l&&i.label<l[2]){i.label=l[2],i.ops.push(p);break}l[2]&&i.ops.pop(),i.trys.pop();continue}p=n.call(r,i)}catch(g){p=[6,g],s=0}finally{a=l=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},zi=function(r,n){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(n,i)&&Bo(n,r,i)},Bo=Object.create?function(r,n,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||("get"in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(r,a,s)}:function(r,n,i,a){a===void 0&&(a=i),r[a]=n[i]},Uo=function(r){var n=typeof Symbol=="function"&&Symbol.iterator,i=n&&r[n],a=0;if(i)return i.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&a>=r.length&&(r=void 0),{value:r&&r[a++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Hr=function(r,n){var i=typeof Symbol=="function"&&r[Symbol.iterator];if(!i)return r;var a=i.call(r),s,l=[],c;try{for(;(n===void 0||n-- >0)&&!(s=a.next()).done;)l.push(s.value)}catch(h){c={error:h}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(c)throw c.error}}return l},qi=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(Hr(arguments[n]));return r},Zi=function(){for(var r=0,n=0,i=arguments.length;n<i;n++)r+=arguments[n].length;for(var a=Array(r),s=0,n=0;n<i;n++)for(var l=arguments[n],c=0,h=l.length;c<h;c++,s++)a[s]=l[c];return a},Ki=function(r,n,i){if(i||arguments.length===2)for(var a=0,s=n.length,l;a<s;a++)(l||!(a in n))&&(l||(l=Array.prototype.slice.call(n,0,a)),l[a]=n[a]);return r.concat(l||Array.prototype.slice.call(n))},At=function(r){return this instanceof At?(this.v=r,this):new At(r)},Ji=function(r,n,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=i.apply(r,n||[]),s,l=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(d){a[d]&&(s[d]=function(y){return new Promise(function(v,k){l.push([d,y,v,k])>1||h(d,y)})})}function h(d,y){try{m(a[d](y))}catch(v){b(l[0][3],v)}}function m(d){d.value instanceof At?Promise.resolve(d.value.v).then(p,g):b(l[0][2],d)}function p(d){h("next",d)}function g(d){h("throw",d)}function b(d,y){d(y),l.shift(),l.length&&h(l[0][0],l[0][1])}},Yi=function(r){var n,i;return n={},a("next"),a("throw",function(s){throw s}),a("return"),n[Symbol.iterator]=function(){return this},n;function a(s,l){n[s]=r[s]?function(c){return(i=!i)?{value:At(r[s](c)),done:s==="return"}:l?l(c):c}:l}},Xi=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],i;return n?n.call(r):(r=typeof Uo=="function"?Uo(r):r[Symbol.iterator](),i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i);function a(l){i[l]=r[l]&&function(c){return new Promise(function(h,m){c=r[l](c),s(h,m,c.done,c.value)})}}function s(l,c,h,m){Promise.resolve(m).then(function(p){l({value:p,done:h})},c)}},Qi=function(r,n){return Object.defineProperty?Object.defineProperty(r,"raw",{value:n}):r.raw=n,r};var o=Object.create?function(r,n){Object.defineProperty(r,"default",{enumerable:!0,value:n})}:function(r,n){r.default=n};ea=function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)i!=="default"&&Object.prototype.hasOwnProperty.call(r,i)&&Bo(n,r,i);return o(n,r),n},ta=function(r){return r&&r.__esModule?r:{default:r}},oa=function(r,n,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?r!==n||!a:!n.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(r):a?a.value:n.get(r)},ra=function(r,n,i,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?r!==n||!s:!n.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(r,i):s?s.value=i:n.set(r,i),i},na=function(r,n){if(n===null||typeof n!="object"&&typeof n!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r=="function"?n===r:r.has(n)},e("__extends",Ui),e("__assign",Bi),e("__rest",Fi),e("__decorate",Gi),e("__param",Hi),e("__metadata",Vi),e("__awaiter",ji),e("__generator",$i),e("__exportStar",zi),e("__createBinding",Bo),e("__values",Uo),e("__read",Hr),e("__spread",qi),e("__spreadArrays",Zi),e("__spreadArray",Ki),e("__await",At),e("__asyncGenerator",Ji),e("__asyncDelegator",Yi),e("__asyncValues",Xi),e("__makeTemplateObject",Qi),e("__importStar",ea),e("__importDefault",ta),e("__classPrivateFieldGet",oa),e("__classPrivateFieldSet",ra),e("__classPrivateFieldIn",na)})});var Vr=Ne(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.getLocalStorage=U.getLocalStorageOrThrow=U.getCrypto=U.getCryptoOrThrow=U.getLocation=U.getLocationOrThrow=U.getNavigator=U.getNavigatorOrThrow=U.getDocument=U.getDocumentOrThrow=U.getFromWindowOrThrow=U.getFromWindow=void 0;function at(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}U.getFromWindow=at;function Tt(e){let t=at(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}U.getFromWindowOrThrow=Tt;function kc(){return Tt("document")}U.getDocumentOrThrow=kc;function Ac(){return at("document")}U.getDocument=Ac;function Tc(){return Tt("navigator")}U.getNavigatorOrThrow=Tc;function Wc(){return at("navigator")}U.getNavigator=Wc;function Rc(){return Tt("location")}U.getLocationOrThrow=Rc;function Ic(){return at("location")}U.getLocation=Ic;function Mc(){return Tt("crypto")}U.getCryptoOrThrow=Mc;function Oc(){return at("crypto")}U.getCrypto=Oc;function Nc(){return Tt("localStorage")}U.getLocalStorageOrThrow=Nc;function Dc(){return at("localStorage")}U.getLocalStorage=Dc});var aa=Ne(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.getWindowMetadata=void 0;var ia=Vr();function Uc(){let e,t;try{e=ia.getDocumentOrThrow(),t=ia.getLocationOrThrow()}catch{return null}function o(){let m=e.getElementsByTagName("link"),p=[];for(let g=0;g<m.length;g++){let b=m[g],d=b.getAttribute("rel");if(d&&d.toLowerCase().indexOf("icon")>-1){let y=b.getAttribute("href");if(y)if(y.toLowerCase().indexOf("https:")===-1&&y.toLowerCase().indexOf("http:")===-1&&y.indexOf("//")!==0){let v=t.protocol+"//"+t.host;if(y.indexOf("/")===0)v+=y;else{let k=t.pathname.split("/");k.pop(),v+=k.join("/")+"/"+y}p.push(v)}else if(y.indexOf("//")===0){let v=t.protocol+y;p.push(v)}else p.push(y)}}return p}function r(...m){let p=e.getElementsByTagName("meta");for(let g=0;g<p.length;g++){let b=p[g],d=["itemprop","property","name"].map(y=>b.getAttribute(y)).filter(y=>y?m.includes(y):!1);if(d.length&&d){let y=b.getAttribute("content");if(y)return y}}return""}function n(){let m=r("name","og:site_name","og:title","twitter:title");return m||(m=e.title),m}function i(){return r("description","og:description","twitter:description","keywords")}let a=n(),s=i(),l=t.origin,c=o();return{description:s,url:l,icons:c,name:a}}Ho.getWindowMetadata=Uc});var ba={};Qn(ba,{BotInfo:()=>ua,BrowserInfo:()=>ca,NodeInfo:()=>da,ReactNativeInfo:()=>fa,SearchBotDeviceInfo:()=>pa,browserName:()=>jc,detect:()=>Vc,detectOS:()=>ha,getNodeVersion:()=>ga,parseUserAgent:()=>jr});function Vc(e){return e?jr(e):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new fa:typeof navigator<"u"?jr(navigator.userAgent):ga()}function ma(e){return e!==""&&Hc.reduce(function(t,o){var r=o[0],n=o[1];if(t)return t;var i=n.exec(e);return!!i&&[r,i]},!1)}function jc(e){var t=ma(e);return t?t[0]:null}function jr(e){var t=ma(e);if(!t)return null;var o=t[0],r=t[1];if(o==="searchbot")return new ua;var n=r[1]&&r[1].split(/[._]/).slice(0,3);n?n.length<sa&&(n=Bc(n,$c(sa-n.length))):n=[];var i=n.join("."),a=ha(e),s=Gc.exec(e);return s&&s[1]?new pa(o,i,a,s[1]):new ca(o,i,a)}function ha(e){for(var t=0,o=la.length;t<o;t++){var r=la[t],n=r[0],i=r[1],a=i.exec(e);if(a)return n}return null}function ga(){var e=typeof process<"u"&&process.version;return e?new da(process.version.slice(1)):null}function $c(e){for(var t=[],o=0;o<e;o++)t.push("0");return t}var Bc,ca,da,pa,ua,fa,Fc,Gc,sa,Hc,la,ya=Xn(()=>{Bc=function(){for(var e=0,t=0,o=arguments.length;t<o;t++)e+=arguments[t].length;for(var r=Array(e),n=0,t=0;t<o;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,n++)r[n]=i[a];return r},ca=function(){function e(t,o,r){this.name=t,this.version=o,this.os=r,this.type="browser"}return e}(),da=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=process.platform}return e}(),pa=function(){function e(t,o,r,n){this.name=t,this.version=o,this.os=r,this.bot=n,this.type="bot-device"}return e}(),ua=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),fa=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),Fc=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,Gc=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,sa=3,Hc=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",Fc]],la=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]]});var zr=Ne(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.getClientMeta=L.getLocalStorage=L.getLocalStorageOrThrow=L.getCrypto=L.getCryptoOrThrow=L.getLocation=L.getLocationOrThrow=L.getNavigator=L.getNavigatorOrThrow=L.getDocument=L.getDocumentOrThrow=L.getFromWindowOrThrow=L.getFromWindow=L.isBrowser=L.isNode=L.isMobile=L.isIOS=L.isAndroid=L.detectOS=L.detectEnv=void 0;var va=Go(),zc=va.__importStar(aa()),Le=va.__importStar(Vr()),qc=(ya(),ti(ba));function $r(e){return(0,qc.detect)(e)}L.detectEnv=$r;function Vo(){let e=$r();return e&&e.os?e.os:void 0}L.detectOS=Vo;function wa(){let e=Vo();return e?e.toLowerCase().includes("android"):!1}L.isAndroid=wa;function Ca(){let e=Vo();return e?e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}L.isIOS=Ca;function Zc(){return Vo()?wa()||Ca():!1}L.isMobile=Zc;function Ea(){let e=$r();return e&&e.name?e.name.toLowerCase()==="node":!1}L.isNode=Ea;function Kc(){return!Ea()&&!!(0,L.getNavigator)()}L.isBrowser=Kc;L.getFromWindow=Le.getFromWindow;L.getFromWindowOrThrow=Le.getFromWindowOrThrow;L.getDocumentOrThrow=Le.getDocumentOrThrow;L.getDocument=Le.getDocument;L.getNavigatorOrThrow=Le.getNavigatorOrThrow;L.getNavigator=Le.getNavigator;L.getLocationOrThrow=Le.getLocationOrThrow;L.getLocation=Le.getLocation;L.getCryptoOrThrow=Le.getCryptoOrThrow;L.getCrypto=Le.getCrypto;L.getLocalStorageOrThrow=Le.getLocalStorageOrThrow;L.getLocalStorage=Le.getLocalStorage;function Jc(){return zc.getWindowMetadata()}L.getClientMeta=Jc});var xa={};Qn(xa,{safeJsonParse:()=>Yc,safeJsonStringify:()=>Xc});function Yc(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}function Xc(e){return typeof e=="string"?e:JSON.stringify(e)}var _a=Xn(()=>{});var qr=Ne(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.safeJsonStringify=Wt.safeJsonParse=void 0;var Qc=Go(),La=Qc.__importStar((_a(),ti(xa)));Wt.safeJsonParse=La.safeJsonParse;Wt.safeJsonStringify=La.safeJsonStringify});var Kr=Ne(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.removeLocal=ze.getLocal=ze.setLocal=void 0;var Pa=qr(),Zr=zr();function ed(e,t){let o=(0,Pa.safeJsonStringify)(t),r=(0,Zr.getLocalStorage)();r&&r.setItem(e,o)}ze.setLocal=ed;function td(e){let t=null,o=null,r=(0,Zr.getLocalStorage)();return r&&(o=r.getItem(e)),t=o&&(0,Pa.safeJsonParse)(o),t}ze.getLocal=td;function od(e){let t=(0,Zr.getLocalStorage)();t&&t.removeItem(e)}ze.removeLocal=od});var ka=Ne(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.getMobileLinkRegistry=ue.getMobileRegistryEntry=ue.saveMobileLinkInfo=ue.formatIOSMobile=ue.mobileLinkChoiceKey=void 0;var rd=Kr();ue.mobileLinkChoiceKey="WALLETCONNECT_DEEPLINK_CHOICE";function nd(e,t){let o=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${o}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${o}`:""}ue.formatIOSMobile=nd;function id(e){let t=e.href.split("?")[0];(0,rd.setLocal)(ue.mobileLinkChoiceKey,Object.assign(Object.assign({},e),{href:t}))}ue.saveMobileLinkInfo=id;function Sa(e,t){return e.filter(o=>o.name.toLowerCase().includes(t.toLowerCase()))[0]}ue.getMobileRegistryEntry=Sa;function ad(e,t){let o=e;return t&&(o=t.map(r=>Sa(e,r)).filter(Boolean)),o}ue.getMobileLinkRegistry=ad});var Wa=Ne(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.formatMobileRegistry=Ae.formatMobileRegistryEntry=Ae.getDappRegistryUrl=Ae.getWalletRegistryUrl=void 0;var Aa="https://registry.walletconnect.com";function sd(){return Aa+"/api/v2/wallets"}Ae.getWalletRegistryUrl=sd;function ld(){return Aa+"/api/v2/dapps"}Ae.getDappRegistryUrl=ld;function Ta(e,t="mobile"){var o;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:(o=e.image_url.sm)!==null&&o!==void 0?o:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}Ae.formatMobileRegistryEntry=Ta;function cd(e,t="mobile"){return Object.values(e).filter(o=>!!o[t].universal||!!o[t].native).map(o=>Ta(o,t))}Ae.formatMobileRegistry=cd});var Ra=Ne(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});var oo=Go();oo.__exportStar(zr(),st);oo.__exportStar(qr(),st);oo.__exportStar(Kr(),st);oo.__exportStar(ka(),st);oo.__exportStar(Wa(),st)});import{Web3Provider as ru}from"@ethersproject/providers";import{useEffect as Zn,useState as ie}from"react";var x=()=>{throw new Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};import rc from"axios";var Pe=class extends Error{constructor(o,r){super(o);r instanceof Error&&(this.cause=r)}toString(){return`${this.type}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}},vt=class extends Pe{constructor(o,r,n,i){super(n,i);this.type=o;this.status=r}},C=class extends Pe{constructor(o,r){super(o,r);this.type="client_error"}};var G=class extends Pe{constructor(o,r){super(o,r);this.type="connector_error"}},Z=e=>{if(e instanceof Pe)return e;if(!rc.isAxiosError(e))return we(e);if(!e.response)return new vt("api_error",null,e.message,e);let{type:t,message:o,error:r}=e.response.data;return new vt(t||"ApiError",e.response.status,o||r,e)},we=e=>e instanceof Pe?e:e instanceof Error?new C(e.message,e):new C(`Internal error: ${e}`);var oi=()=>"/api/v1/sessions",ri=()=>"/api/v1/sessions/logout",ni=()=>"/api/v1/sessions/fork",ii=()=>"/api/v1/sessions/fork/recover",ai=()=>"/api/v1/siwe/init",si=()=>"/api/v1/siwe/authenticate",li=()=>"/api/v1/siwe/link",ci=()=>"/api/v1/passwordless/init",di=()=>"/api/v1/passwordless/authenticate",pi=()=>"/api/v1/passwordless/link",ui=()=>"/api/v1/passwordless_sms/init",fi=()=>"/api/v1/passwordless_sms/authenticate",mi=()=>"/api/v1/passwordless_sms/link",hi=()=>"/api/v1/oauth/init",gi=()=>"/api/v1/oauth/authenticate",bi=()=>"/api/v1/oauth/link",yi=()=>"/api/v1/siwe/unlink",vi=()=>"/api/v1/passwordless/unlink",wi=()=>"/api/v1/passwordless_sms/unlink",Ci=()=>"/api/v1/oauth/unlink";var Qt=class{constructor(t){this.meta={email:t}}async authenticate(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new C("Email and email code must be set prior to calling authenticate.");try{let t=di(),o=await this.api.post(t,{email:this.meta.email,code:this.meta.emailCode});return{user:o.data.user,token:o.data.token,refresh_token:o.data.refresh_token,is_new_user:o.data.is_new_user}}catch(t){throw Z(t)}}async link(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new C("Email and email code must be set prior to calling authenticate.");try{let t=pi();return(await this.api.post(t,{email:this.meta.email,code:this.meta.emailCode})).data}catch(t){throw Z(t)}}async sendCodeEmail(t){if(!this.api)throw new C("Auth flow has no API instance");if(t&&(this.meta.email=t),!this.meta.email)throw new C("Email must be set when initialzing authentication.");try{let o=ci();return(await this.api.post(o,{email:this.meta.email})).data}catch(o){throw Z(o)}}};var wt=class{constructor(t,o,r){this.meta={provider:t},this.meta.authorizationCode=o,this.meta.stateCode=r}isActive(){return!!(this.meta.authorizationCode&&this.meta.stateCode&&this.meta.provider)}async authenticate(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new C("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenticate.");if(this.meta.authorizationCode==="undefined")throw new C("User denied confirmation during OAuth flow");try{let t=gi(),o=await this.api.post(t,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode});return{user:o.data.user,token:o.data.token,refresh_token:o.data.refresh_token,is_new_user:o.data.is_new_user}}catch(t){throw Z(t)}}async link(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new C("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling link.");if(this.meta.authorizationCode==="undefined")throw new C("User denied confirmation during OAuth flow");try{let t=bi();return(await this.api.post(t,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode})).data}catch(t){throw Z(t)}}async getAuthorizationUrl(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.provider)throw new C("Provider must be set when initialzing OAuth authentication.");try{let t=hi();return(await this.api.post(t,{provider:this.meta.provider,redirect_to:window.location.href})).data}catch(t){throw Z(t)}}};var Ct=class{constructor(t,o,r){this._meta={walletType:o,walletId:r},this.connectors=t,this.walletConnector=this.connectors.createWalletConnector(o,null,r)}get meta(){return{...this._meta,walletName:this.walletConnector.walletBranding.name,walletIcon:this.walletConnector.walletBranding.icon}}async authenticate(){if(!this.api)throw new C("Auth flow has no API instance");try{let{message:t,signature:o}=await this.sign(),r=await this.api.post(si(),{message:t,signature:o});return this.connectors.addWalletConnector(this.walletConnector),await this.connectors.setActiveWallet(this.walletConnector.address)||console.warn("Failed to set active wallet"),{user:r.data.user,token:r.data.token,refresh_token:r.data.refresh_token,is_new_user:r.data.is_new_user}}catch(t){throw Z(t)}}async link(){if(!this.api)throw new C("Auth flow has no API instance");try{let{message:t,signature:o}=await this.sign(),r=await this.api.post(li(),{message:t,signature:o});return this.connectors.addWalletConnector(this.walletConnector),await this.connectors.setActiveWallet(this.walletConnector.address)||console.warn("Failed to set active wallet"),r.data}catch(t){throw Z(t)}}async promptConnect(){if(!this.api)throw new C("Auth flow has no API instance");let t=await this.walletConnector.connect({showPrompt:!0});return await this.buildSiweMessage(t),t}async sign(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.preparedMessage){let o=await this.walletConnector.connect({showPrompt:!1});await this.buildSiweMessage(o)}if(!this.preparedMessage)throw new C("Could not prepare SIWE message");let t=await this.walletConnector.sign(this.preparedMessage);return{message:this.preparedMessage,signature:t}}async buildSiweMessage(t){if(!this.api)throw new C("Auth flow has no API instance");let o=t.address,r=t.chainId,n=await this.api.post(ai(),{address:o});return this.preparedMessage=this.walletConnector.prepareMessage(r,o,n.data.nonce),this.preparedMessage}};var eo=class{constructor(t){this.meta={phoneNumber:t}}async authenticate(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.phoneNumber||!this.meta.smsCode)throw new C("phone number and sms code must be set prior to calling authenticate.");try{let t=fi(),o=await this.api.post(t,{phoneNumber:this.meta.phoneNumber,code:this.meta.smsCode});return{user:o.data.user,token:o.data.token,refresh_token:o.data.refresh_token,is_new_user:o.data.is_new_user}}catch(t){throw Z(t)}}async link(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.phoneNumber||!this.meta.smsCode)throw new C("phone number and sms code must be set prior to calling authenticate.");try{let t=mi();return(await this.api.post(t,{phoneNumber:this.meta.phoneNumber,code:this.meta.smsCode})).data}catch(t){throw Z(t)}}async sendSmsCode(t){if(!this.api)throw new C("Auth flow has no API instance");if(t&&(this.meta.phoneNumber=t),!this.meta.phoneNumber)throw new C("phone nNumber must be set when initialzing authentication.");try{let o=ui();return(await this.api.post(o,{phoneNumber:this.meta.phoneNumber})).data}catch(o){throw Z(o)}}};import{getAddress as pd}from"@ethersproject/address";var Ei="1.21.0-beta.4";var xi="https://api.privy.io/v0",Po=process.env.NEXT_PUBLIC_PRIVY_AUTH_URL||"https://auth.privy.io",So="4df5e2316331463a9130964bd6078dfa",_i=1e4,Ce=1400,Rr=Ei;var Et="privy:token",ko="privy:refresh_token",to="privy:session_transfer_token",Ao="privy:connectors",Ir="walletconnect",Li=3e4;var Mr=class{constructor(){this._cache={}}get(t){return this._cache[t]}put(t,o){o!==void 0?this._cache[t]=o:this.del(t)}del(t){delete this._cache[t]}getKeys(){return Object.keys(this._cache)}},Or=class{get(t){let o=localStorage.getItem(t);return o===null?void 0:JSON.parse(o)}put(t,o){o!==void 0?localStorage.setItem(t,JSON.stringify(o)):this.del(t)}del(t){localStorage.removeItem(t)}getKeys(){return Object.entries(localStorage).map(([t])=>t)}};function ic(){return typeof window<"u"&&window.localStorage?new Or:new Mr}var H=ic();import mc from"@coinbase/wallet-sdk";import{getAddress as hc}from"@ethersproject/address";import{jsx as Pi,jsxs as ac}from"react/jsx-runtime";var Ee=({style:e,...t})=>ac("svg",{width:"1024",height:"1024",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...e},...t,children:[Pi("rect",{width:"1024",height:"1024",fill:"#0052FF",rx:100,ry:100}),Pi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"})]});import{getAddress as uc}from"@ethersproject/address";import{Web3Provider as fc}from"@ethersproject/providers";import{ErrorCode as sc}from"@ethersproject/logger";var xt=class extends G{constructor(){super("Wallet timeout");this.type="wallet_error"}},ot=class extends G{constructor(){super("User rejected connection");this.type="wallet_error"}},xe=e=>{if(e instanceof G)return e;if((e==null?void 0:e.code)&&(e==null?void 0:e.reason)){let t=new _t(e);return e.code===sc.ACTION_REJECTED&&(t.details=tt.E4001_USER_REJECTED_REQUEST),t}return e!=null&&e.code?new _t(e):new G("Unknown connector error",e)},Nr=class extends Pe{constructor(o,r,n){super(o);this.type="provider_error";this.code=r,this.data=n}},_t=class extends Nr{constructor(o){var i,a,s;let r=o;super(r.message,r.code,r.data);let n=Object.values(tt).find(l=>l.eipCode===r.code);this.details=n||tt.UNKNOWN_ERROR,r.code===-32002&&((i=r.message)!=null&&i.includes("already pending for origin")?(a=r.message)!=null&&a.includes("wallet_requestPermissions")?this.details=tt.E32002_CONNECTION_ALREADY_PENDING:this.details=tt.E32002_REQUEST_ALREADY_PENDING:(s=r.message)!=null&&s.includes("Already processing")&&r.message.includes("eth_requestAccounts")&&(this.details=tt.E32002_WALLET_LOCKED))}},lc={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Wallet request timed out",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_USER_REJECTED_CONNECTION:{message:"You rejected the request",detail:"Please try connecting again.",retryable:!0}},cc={E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}},dc={E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1}},tt={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},...dc,...cc},rt={...lc,...tt};var pc=12e4,Dr=(e=new xt,t=pc)=>new Promise((o,r)=>setTimeout(()=>{r(e)},t)),Se=class{constructor(t){this.removeListener=(t,o)=>{if(this.walletProvider)return this.walletProvider.removeListener(t,o)};this.setWalletProvider=t=>{this.walletProvider=t,this._subscriptions.forEach(o=>{var r;(r=this.walletProvider)==null||r.on(o.eventName,o.listener)})};this.walletProvider=t,this._subscriptions=[]}on(t,o){if(this.walletProvider)return this.walletProvider.on(t,o);this._subscriptions.push({eventName:t,listener:o})}async request(t){if(!this.walletProvider)throw new G(`A wallet request of type ${t.method} was made before setting a wallet provider.`);return Promise.race([this.walletProvider.request(t),Dr()]).catch(o=>{throw xe(o)})}},nt=class extends Se{constructor(o){super(o)}},To=class extends Se{constructor(t){super(t)}sendAsync(t,o){throw new Error("sendAsync is no longer supported by EIP-1193. Use the request method instead.")}};var ke=class{constructor(t,o,r){this.createSiweMessage=(t,o,r,n,i,a,s)=>`${r} wants you to sign in with your Ethereum account:
1
+ var Yl=Object.create;var Lo=Object.defineProperty;var Xl=Object.getOwnPropertyDescriptor;var Ql=Object.getOwnPropertyNames;var ec=Object.getPrototypeOf,tc=Object.prototype.hasOwnProperty;var Xn=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qn=(e,t)=>{for(var o in t)Lo(e,o,{get:t[o],enumerable:!0})},ei=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ql(t))!tc.call(e,n)&&n!==o&&Lo(e,n,{get:()=>t[n],enumerable:!(r=Xl(t,n))||r.enumerable});return e};var oc=(e,t,o)=>(o=e!=null?Yl(ec(e)):{},ei(t||!e||!e.__esModule?Lo(o,"default",{value:e,enumerable:!0}):o,e)),ti=e=>ei(Lo({},"__esModule",{value:!0}),e);var Go=Ne((R0,Fo)=>{var Ui,Bi,Fi,Gi,Hi,Vi,ji,$i,zi,Uo,Hr,qi,Zi,Ki,At,Ji,Yi,Xi,Qi,ea,ta,oa,ra,na,Bo;(function(e){var t=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(r){e(o(t,o(r)))}):typeof Fo=="object"&&typeof Fo.exports=="object"?e(o(t,o(Fo.exports))):e(o(t));function o(r,n){return r!==t&&(typeof Object.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(i,a){return r[i]=n?n(i,a):a}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])};Ui=function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)},Bi=Object.assign||function(r){for(var n,i=1,a=arguments.length;i<a;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])}return r},Fi=function(r,n){var i={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&n.indexOf(a)<0&&(i[a]=r[a]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(r);s<a.length;s++)n.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(r,a[s])&&(i[a[s]]=r[a[s]]);return i},Gi=function(r,n,i,a){var s=arguments.length,l=s<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,i):a,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(r,n,i,a);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(l=(s<3?c(l):s>3?c(n,i,l):c(n,i))||l);return s>3&&l&&Object.defineProperty(n,i,l),l},Hi=function(r,n){return function(i,a){n(i,a,r)}},Vi=function(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)},ji=function(r,n,i,a){function s(l){return l instanceof i?l:new i(function(c){c(l)})}return new(i||(i=Promise))(function(l,c){function h(g){try{p(a.next(g))}catch(b){c(b)}}function m(g){try{p(a.throw(g))}catch(b){c(b)}}function p(g){g.done?l(g.value):s(g.value).then(h,m)}p((a=a.apply(r,n||[])).next())})},$i=function(r,n){var i={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},a,s,l,c;return c={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function h(p){return function(g){return m([p,g])}}function m(p){if(a)throw new TypeError("Generator is already executing.");for(;i;)try{if(a=1,s&&(l=p[0]&2?s.return:p[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,p[1])).done)return l;switch(s=0,l&&(p=[p[0]&2,l.value]),p[0]){case 0:case 1:l=p;break;case 4:return i.label++,{value:p[1],done:!1};case 5:i.label++,s=p[1],p=[0];continue;case 7:p=i.ops.pop(),i.trys.pop();continue;default:if(l=i.trys,!(l=l.length>0&&l[l.length-1])&&(p[0]===6||p[0]===2)){i=0;continue}if(p[0]===3&&(!l||p[1]>l[0]&&p[1]<l[3])){i.label=p[1];break}if(p[0]===6&&i.label<l[1]){i.label=l[1],l=p;break}if(l&&i.label<l[2]){i.label=l[2],i.ops.push(p);break}l[2]&&i.ops.pop(),i.trys.pop();continue}p=n.call(r,i)}catch(g){p=[6,g],s=0}finally{a=l=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},zi=function(r,n){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(n,i)&&Bo(n,r,i)},Bo=Object.create?function(r,n,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||("get"in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(r,a,s)}:function(r,n,i,a){a===void 0&&(a=i),r[a]=n[i]},Uo=function(r){var n=typeof Symbol=="function"&&Symbol.iterator,i=n&&r[n],a=0;if(i)return i.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&a>=r.length&&(r=void 0),{value:r&&r[a++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Hr=function(r,n){var i=typeof Symbol=="function"&&r[Symbol.iterator];if(!i)return r;var a=i.call(r),s,l=[],c;try{for(;(n===void 0||n-- >0)&&!(s=a.next()).done;)l.push(s.value)}catch(h){c={error:h}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(c)throw c.error}}return l},qi=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(Hr(arguments[n]));return r},Zi=function(){for(var r=0,n=0,i=arguments.length;n<i;n++)r+=arguments[n].length;for(var a=Array(r),s=0,n=0;n<i;n++)for(var l=arguments[n],c=0,h=l.length;c<h;c++,s++)a[s]=l[c];return a},Ki=function(r,n,i){if(i||arguments.length===2)for(var a=0,s=n.length,l;a<s;a++)(l||!(a in n))&&(l||(l=Array.prototype.slice.call(n,0,a)),l[a]=n[a]);return r.concat(l||Array.prototype.slice.call(n))},At=function(r){return this instanceof At?(this.v=r,this):new At(r)},Ji=function(r,n,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=i.apply(r,n||[]),s,l=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(d){a[d]&&(s[d]=function(y){return new Promise(function(v,k){l.push([d,y,v,k])>1||h(d,y)})})}function h(d,y){try{m(a[d](y))}catch(v){b(l[0][3],v)}}function m(d){d.value instanceof At?Promise.resolve(d.value.v).then(p,g):b(l[0][2],d)}function p(d){h("next",d)}function g(d){h("throw",d)}function b(d,y){d(y),l.shift(),l.length&&h(l[0][0],l[0][1])}},Yi=function(r){var n,i;return n={},a("next"),a("throw",function(s){throw s}),a("return"),n[Symbol.iterator]=function(){return this},n;function a(s,l){n[s]=r[s]?function(c){return(i=!i)?{value:At(r[s](c)),done:s==="return"}:l?l(c):c}:l}},Xi=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],i;return n?n.call(r):(r=typeof Uo=="function"?Uo(r):r[Symbol.iterator](),i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i);function a(l){i[l]=r[l]&&function(c){return new Promise(function(h,m){c=r[l](c),s(h,m,c.done,c.value)})}}function s(l,c,h,m){Promise.resolve(m).then(function(p){l({value:p,done:h})},c)}},Qi=function(r,n){return Object.defineProperty?Object.defineProperty(r,"raw",{value:n}):r.raw=n,r};var o=Object.create?function(r,n){Object.defineProperty(r,"default",{enumerable:!0,value:n})}:function(r,n){r.default=n};ea=function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)i!=="default"&&Object.prototype.hasOwnProperty.call(r,i)&&Bo(n,r,i);return o(n,r),n},ta=function(r){return r&&r.__esModule?r:{default:r}},oa=function(r,n,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?r!==n||!a:!n.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(r):a?a.value:n.get(r)},ra=function(r,n,i,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?r!==n||!s:!n.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(r,i):s?s.value=i:n.set(r,i),i},na=function(r,n){if(n===null||typeof n!="object"&&typeof n!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r=="function"?n===r:r.has(n)},e("__extends",Ui),e("__assign",Bi),e("__rest",Fi),e("__decorate",Gi),e("__param",Hi),e("__metadata",Vi),e("__awaiter",ji),e("__generator",$i),e("__exportStar",zi),e("__createBinding",Bo),e("__values",Uo),e("__read",Hr),e("__spread",qi),e("__spreadArrays",Zi),e("__spreadArray",Ki),e("__await",At),e("__asyncGenerator",Ji),e("__asyncDelegator",Yi),e("__asyncValues",Xi),e("__makeTemplateObject",Qi),e("__importStar",ea),e("__importDefault",ta),e("__classPrivateFieldGet",oa),e("__classPrivateFieldSet",ra),e("__classPrivateFieldIn",na)})});var Vr=Ne(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.getLocalStorage=U.getLocalStorageOrThrow=U.getCrypto=U.getCryptoOrThrow=U.getLocation=U.getLocationOrThrow=U.getNavigator=U.getNavigatorOrThrow=U.getDocument=U.getDocumentOrThrow=U.getFromWindowOrThrow=U.getFromWindow=void 0;function at(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}U.getFromWindow=at;function Tt(e){let t=at(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}U.getFromWindowOrThrow=Tt;function kc(){return Tt("document")}U.getDocumentOrThrow=kc;function Ac(){return at("document")}U.getDocument=Ac;function Tc(){return Tt("navigator")}U.getNavigatorOrThrow=Tc;function Wc(){return at("navigator")}U.getNavigator=Wc;function Rc(){return Tt("location")}U.getLocationOrThrow=Rc;function Ic(){return at("location")}U.getLocation=Ic;function Mc(){return Tt("crypto")}U.getCryptoOrThrow=Mc;function Oc(){return at("crypto")}U.getCrypto=Oc;function Nc(){return Tt("localStorage")}U.getLocalStorageOrThrow=Nc;function Dc(){return at("localStorage")}U.getLocalStorage=Dc});var aa=Ne(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.getWindowMetadata=void 0;var ia=Vr();function Uc(){let e,t;try{e=ia.getDocumentOrThrow(),t=ia.getLocationOrThrow()}catch{return null}function o(){let m=e.getElementsByTagName("link"),p=[];for(let g=0;g<m.length;g++){let b=m[g],d=b.getAttribute("rel");if(d&&d.toLowerCase().indexOf("icon")>-1){let y=b.getAttribute("href");if(y)if(y.toLowerCase().indexOf("https:")===-1&&y.toLowerCase().indexOf("http:")===-1&&y.indexOf("//")!==0){let v=t.protocol+"//"+t.host;if(y.indexOf("/")===0)v+=y;else{let k=t.pathname.split("/");k.pop(),v+=k.join("/")+"/"+y}p.push(v)}else if(y.indexOf("//")===0){let v=t.protocol+y;p.push(v)}else p.push(y)}}return p}function r(...m){let p=e.getElementsByTagName("meta");for(let g=0;g<p.length;g++){let b=p[g],d=["itemprop","property","name"].map(y=>b.getAttribute(y)).filter(y=>y?m.includes(y):!1);if(d.length&&d){let y=b.getAttribute("content");if(y)return y}}return""}function n(){let m=r("name","og:site_name","og:title","twitter:title");return m||(m=e.title),m}function i(){return r("description","og:description","twitter:description","keywords")}let a=n(),s=i(),l=t.origin,c=o();return{description:s,url:l,icons:c,name:a}}Ho.getWindowMetadata=Uc});var ba={};Qn(ba,{BotInfo:()=>ua,BrowserInfo:()=>ca,NodeInfo:()=>da,ReactNativeInfo:()=>fa,SearchBotDeviceInfo:()=>pa,browserName:()=>jc,detect:()=>Vc,detectOS:()=>ha,getNodeVersion:()=>ga,parseUserAgent:()=>jr});function Vc(e){return e?jr(e):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new fa:typeof navigator<"u"?jr(navigator.userAgent):ga()}function ma(e){return e!==""&&Hc.reduce(function(t,o){var r=o[0],n=o[1];if(t)return t;var i=n.exec(e);return!!i&&[r,i]},!1)}function jc(e){var t=ma(e);return t?t[0]:null}function jr(e){var t=ma(e);if(!t)return null;var o=t[0],r=t[1];if(o==="searchbot")return new ua;var n=r[1]&&r[1].split(/[._]/).slice(0,3);n?n.length<sa&&(n=Bc(n,$c(sa-n.length))):n=[];var i=n.join("."),a=ha(e),s=Gc.exec(e);return s&&s[1]?new pa(o,i,a,s[1]):new ca(o,i,a)}function ha(e){for(var t=0,o=la.length;t<o;t++){var r=la[t],n=r[0],i=r[1],a=i.exec(e);if(a)return n}return null}function ga(){var e=typeof process<"u"&&process.version;return e?new da(process.version.slice(1)):null}function $c(e){for(var t=[],o=0;o<e;o++)t.push("0");return t}var Bc,ca,da,pa,ua,fa,Fc,Gc,sa,Hc,la,ya=Xn(()=>{Bc=function(){for(var e=0,t=0,o=arguments.length;t<o;t++)e+=arguments[t].length;for(var r=Array(e),n=0,t=0;t<o;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,n++)r[n]=i[a];return r},ca=function(){function e(t,o,r){this.name=t,this.version=o,this.os=r,this.type="browser"}return e}(),da=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=process.platform}return e}(),pa=function(){function e(t,o,r,n){this.name=t,this.version=o,this.os=r,this.bot=n,this.type="bot-device"}return e}(),ua=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),fa=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),Fc=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,Gc=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,sa=3,Hc=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",Fc]],la=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]]});var zr=Ne(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.getClientMeta=L.getLocalStorage=L.getLocalStorageOrThrow=L.getCrypto=L.getCryptoOrThrow=L.getLocation=L.getLocationOrThrow=L.getNavigator=L.getNavigatorOrThrow=L.getDocument=L.getDocumentOrThrow=L.getFromWindowOrThrow=L.getFromWindow=L.isBrowser=L.isNode=L.isMobile=L.isIOS=L.isAndroid=L.detectOS=L.detectEnv=void 0;var va=Go(),zc=va.__importStar(aa()),Le=va.__importStar(Vr()),qc=(ya(),ti(ba));function $r(e){return(0,qc.detect)(e)}L.detectEnv=$r;function Vo(){let e=$r();return e&&e.os?e.os:void 0}L.detectOS=Vo;function wa(){let e=Vo();return e?e.toLowerCase().includes("android"):!1}L.isAndroid=wa;function Ca(){let e=Vo();return e?e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}L.isIOS=Ca;function Zc(){return Vo()?wa()||Ca():!1}L.isMobile=Zc;function Ea(){let e=$r();return e&&e.name?e.name.toLowerCase()==="node":!1}L.isNode=Ea;function Kc(){return!Ea()&&!!(0,L.getNavigator)()}L.isBrowser=Kc;L.getFromWindow=Le.getFromWindow;L.getFromWindowOrThrow=Le.getFromWindowOrThrow;L.getDocumentOrThrow=Le.getDocumentOrThrow;L.getDocument=Le.getDocument;L.getNavigatorOrThrow=Le.getNavigatorOrThrow;L.getNavigator=Le.getNavigator;L.getLocationOrThrow=Le.getLocationOrThrow;L.getLocation=Le.getLocation;L.getCryptoOrThrow=Le.getCryptoOrThrow;L.getCrypto=Le.getCrypto;L.getLocalStorageOrThrow=Le.getLocalStorageOrThrow;L.getLocalStorage=Le.getLocalStorage;function Jc(){return zc.getWindowMetadata()}L.getClientMeta=Jc});var xa={};Qn(xa,{safeJsonParse:()=>Yc,safeJsonStringify:()=>Xc});function Yc(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}function Xc(e){return typeof e=="string"?e:JSON.stringify(e)}var _a=Xn(()=>{});var qr=Ne(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.safeJsonStringify=Wt.safeJsonParse=void 0;var Qc=Go(),La=Qc.__importStar((_a(),ti(xa)));Wt.safeJsonParse=La.safeJsonParse;Wt.safeJsonStringify=La.safeJsonStringify});var Kr=Ne(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.removeLocal=ze.getLocal=ze.setLocal=void 0;var Pa=qr(),Zr=zr();function ed(e,t){let o=(0,Pa.safeJsonStringify)(t),r=(0,Zr.getLocalStorage)();r&&r.setItem(e,o)}ze.setLocal=ed;function td(e){let t=null,o=null,r=(0,Zr.getLocalStorage)();return r&&(o=r.getItem(e)),t=o&&(0,Pa.safeJsonParse)(o),t}ze.getLocal=td;function od(e){let t=(0,Zr.getLocalStorage)();t&&t.removeItem(e)}ze.removeLocal=od});var ka=Ne(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.getMobileLinkRegistry=ue.getMobileRegistryEntry=ue.saveMobileLinkInfo=ue.formatIOSMobile=ue.mobileLinkChoiceKey=void 0;var rd=Kr();ue.mobileLinkChoiceKey="WALLETCONNECT_DEEPLINK_CHOICE";function nd(e,t){let o=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${o}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${o}`:""}ue.formatIOSMobile=nd;function id(e){let t=e.href.split("?")[0];(0,rd.setLocal)(ue.mobileLinkChoiceKey,Object.assign(Object.assign({},e),{href:t}))}ue.saveMobileLinkInfo=id;function Sa(e,t){return e.filter(o=>o.name.toLowerCase().includes(t.toLowerCase()))[0]}ue.getMobileRegistryEntry=Sa;function ad(e,t){let o=e;return t&&(o=t.map(r=>Sa(e,r)).filter(Boolean)),o}ue.getMobileLinkRegistry=ad});var Wa=Ne(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.formatMobileRegistry=Ae.formatMobileRegistryEntry=Ae.getDappRegistryUrl=Ae.getWalletRegistryUrl=void 0;var Aa="https://registry.walletconnect.com";function sd(){return Aa+"/api/v2/wallets"}Ae.getWalletRegistryUrl=sd;function ld(){return Aa+"/api/v2/dapps"}Ae.getDappRegistryUrl=ld;function Ta(e,t="mobile"){var o;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:(o=e.image_url.sm)!==null&&o!==void 0?o:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}Ae.formatMobileRegistryEntry=Ta;function cd(e,t="mobile"){return Object.values(e).filter(o=>!!o[t].universal||!!o[t].native).map(o=>Ta(o,t))}Ae.formatMobileRegistry=cd});var Ra=Ne(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});var oo=Go();oo.__exportStar(zr(),st);oo.__exportStar(qr(),st);oo.__exportStar(Kr(),st);oo.__exportStar(ka(),st);oo.__exportStar(Wa(),st)});import{Web3Provider as ru}from"@ethersproject/providers";import{useEffect as Zn,useState as ie}from"react";var x=()=>{throw new Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};import rc from"axios";var Pe=class extends Error{constructor(o,r){super(o);r instanceof Error&&(this.cause=r)}toString(){return`${this.type}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}},vt=class extends Pe{constructor(o,r,n,i){super(n,i);this.type=o;this.status=r}},C=class extends Pe{constructor(o,r){super(o,r);this.type="client_error"}};var G=class extends Pe{constructor(o,r){super(o,r);this.type="connector_error"}},Z=e=>{if(e instanceof Pe)return e;if(!rc.isAxiosError(e))return we(e);if(!e.response)return new vt("api_error",null,e.message,e);let{type:t,message:o,error:r}=e.response.data;return new vt(t||"ApiError",e.response.status,o||r,e)},we=e=>e instanceof Pe?e:e instanceof Error?new C(e.message,e):new C(`Internal error: ${e}`);var oi=()=>"/api/v1/sessions",ri=()=>"/api/v1/sessions/logout",ni=()=>"/api/v1/sessions/fork",ii=()=>"/api/v1/sessions/fork/recover",ai=()=>"/api/v1/siwe/init",si=()=>"/api/v1/siwe/authenticate",li=()=>"/api/v1/siwe/link",ci=()=>"/api/v1/passwordless/init",di=()=>"/api/v1/passwordless/authenticate",pi=()=>"/api/v1/passwordless/link",ui=()=>"/api/v1/passwordless_sms/init",fi=()=>"/api/v1/passwordless_sms/authenticate",mi=()=>"/api/v1/passwordless_sms/link",hi=()=>"/api/v1/oauth/init",gi=()=>"/api/v1/oauth/authenticate",bi=()=>"/api/v1/oauth/link",yi=()=>"/api/v1/siwe/unlink",vi=()=>"/api/v1/passwordless/unlink",wi=()=>"/api/v1/passwordless_sms/unlink",Ci=()=>"/api/v1/oauth/unlink";var Qt=class{constructor(t){this.meta={email:t}}async authenticate(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new C("Email and email code must be set prior to calling authenticate.");try{let t=di(),o=await this.api.post(t,{email:this.meta.email,code:this.meta.emailCode});return{user:o.data.user,token:o.data.token,refresh_token:o.data.refresh_token,is_new_user:o.data.is_new_user}}catch(t){throw Z(t)}}async link(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new C("Email and email code must be set prior to calling authenticate.");try{let t=pi();return(await this.api.post(t,{email:this.meta.email,code:this.meta.emailCode})).data}catch(t){throw Z(t)}}async sendCodeEmail(t){if(!this.api)throw new C("Auth flow has no API instance");if(t&&(this.meta.email=t),!this.meta.email)throw new C("Email must be set when initialzing authentication.");try{let o=ci();return(await this.api.post(o,{email:this.meta.email})).data}catch(o){throw Z(o)}}};var wt=class{constructor(t,o,r){this.meta={provider:t},this.meta.authorizationCode=o,this.meta.stateCode=r}isActive(){return!!(this.meta.authorizationCode&&this.meta.stateCode&&this.meta.provider)}async authenticate(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new C("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenticate.");if(this.meta.authorizationCode==="undefined")throw new C("User denied confirmation during OAuth flow");try{let t=gi(),o=await this.api.post(t,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode});return{user:o.data.user,token:o.data.token,refresh_token:o.data.refresh_token,is_new_user:o.data.is_new_user}}catch(t){throw Z(t)}}async link(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new C("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling link.");if(this.meta.authorizationCode==="undefined")throw new C("User denied confirmation during OAuth flow");try{let t=bi();return(await this.api.post(t,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode})).data}catch(t){throw Z(t)}}async getAuthorizationUrl(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.provider)throw new C("Provider must be set when initialzing OAuth authentication.");try{let t=hi();return(await this.api.post(t,{provider:this.meta.provider,redirect_to:window.location.href})).data}catch(t){throw Z(t)}}};var Ct=class{constructor(t,o,r){this._meta={walletType:o,walletId:r},this.connectors=t,this.walletConnector=this.connectors.createWalletConnector(o,null,r)}get meta(){return{...this._meta,walletName:this.walletConnector.walletBranding.name,walletIcon:this.walletConnector.walletBranding.icon}}async authenticate(){if(!this.api)throw new C("Auth flow has no API instance");try{let{message:t,signature:o}=await this.sign(),r=await this.api.post(si(),{message:t,signature:o});return this.connectors.addWalletConnector(this.walletConnector),await this.connectors.setActiveWallet(this.walletConnector.address)||console.warn("Failed to set active wallet"),{user:r.data.user,token:r.data.token,refresh_token:r.data.refresh_token,is_new_user:r.data.is_new_user}}catch(t){throw Z(t)}}async link(){if(!this.api)throw new C("Auth flow has no API instance");try{let{message:t,signature:o}=await this.sign(),r=await this.api.post(li(),{message:t,signature:o});return this.connectors.addWalletConnector(this.walletConnector),await this.connectors.setActiveWallet(this.walletConnector.address)||console.warn("Failed to set active wallet"),r.data}catch(t){throw Z(t)}}async promptConnect(){if(!this.api)throw new C("Auth flow has no API instance");let t=await this.walletConnector.connect({showPrompt:!0});return await this.buildSiweMessage(t),t}async sign(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.preparedMessage){let o=await this.walletConnector.connect({showPrompt:!1});await this.buildSiweMessage(o)}if(!this.preparedMessage)throw new C("Could not prepare SIWE message");let t=await this.walletConnector.sign(this.preparedMessage);return{message:this.preparedMessage,signature:t}}async buildSiweMessage(t){if(!this.api)throw new C("Auth flow has no API instance");let o=t.address,r=t.chainId,n=await this.api.post(ai(),{address:o});return this.preparedMessage=this.walletConnector.prepareMessage(r,o,n.data.nonce),this.preparedMessage}};var eo=class{constructor(t){this.meta={phoneNumber:t}}async authenticate(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.phoneNumber||!this.meta.smsCode)throw new C("phone number and sms code must be set prior to calling authenticate.");try{let t=fi(),o=await this.api.post(t,{phoneNumber:this.meta.phoneNumber,code:this.meta.smsCode});return{user:o.data.user,token:o.data.token,refresh_token:o.data.refresh_token,is_new_user:o.data.is_new_user}}catch(t){throw Z(t)}}async link(){if(!this.api)throw new C("Auth flow has no API instance");if(!this.meta.phoneNumber||!this.meta.smsCode)throw new C("phone number and sms code must be set prior to calling authenticate.");try{let t=mi();return(await this.api.post(t,{phoneNumber:this.meta.phoneNumber,code:this.meta.smsCode})).data}catch(t){throw Z(t)}}async sendSmsCode(t){if(!this.api)throw new C("Auth flow has no API instance");if(t&&(this.meta.phoneNumber=t),!this.meta.phoneNumber)throw new C("phone nNumber must be set when initialzing authentication.");try{let o=ui();return(await this.api.post(o,{phoneNumber:this.meta.phoneNumber})).data}catch(o){throw Z(o)}}};import{getAddress as pd}from"@ethersproject/address";var Ei="1.21.0-beta.5";var xi="https://api.privy.io/v0",Po=process.env.NEXT_PUBLIC_PRIVY_AUTH_URL||"https://auth.privy.io",So="4df5e2316331463a9130964bd6078dfa",_i=1e4,Ce=1400,Rr=Ei;var Et="privy:token",ko="privy:refresh_token",to="privy:session_transfer_token",Ao="privy:connectors",Ir="walletconnect",Li=3e4;var Mr=class{constructor(){this._cache={}}get(t){return this._cache[t]}put(t,o){o!==void 0?this._cache[t]=o:this.del(t)}del(t){delete this._cache[t]}getKeys(){return Object.keys(this._cache)}},Or=class{get(t){let o=localStorage.getItem(t);return o===null?void 0:JSON.parse(o)}put(t,o){o!==void 0?localStorage.setItem(t,JSON.stringify(o)):this.del(t)}del(t){localStorage.removeItem(t)}getKeys(){return Object.entries(localStorage).map(([t])=>t)}};function ic(){return typeof window<"u"&&window.localStorage?new Or:new Mr}var H=ic();import mc from"@coinbase/wallet-sdk";import{getAddress as hc}from"@ethersproject/address";import{jsx as Pi,jsxs as ac}from"react/jsx-runtime";var Ee=({style:e,...t})=>ac("svg",{width:"1024",height:"1024",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...e},...t,children:[Pi("rect",{width:"1024",height:"1024",fill:"#0052FF",rx:100,ry:100}),Pi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"})]});import{getAddress as uc}from"@ethersproject/address";import{Web3Provider as fc}from"@ethersproject/providers";import{ErrorCode as sc}from"@ethersproject/logger";var xt=class extends G{constructor(){super("Wallet timeout");this.type="wallet_error"}},ot=class extends G{constructor(){super("User rejected connection");this.type="wallet_error"}},xe=e=>{if(e instanceof G)return e;if((e==null?void 0:e.code)&&(e==null?void 0:e.reason)){let t=new _t(e);return e.code===sc.ACTION_REJECTED&&(t.details=tt.E4001_USER_REJECTED_REQUEST),t}return e!=null&&e.code?new _t(e):new G("Unknown connector error",e)},Nr=class extends Pe{constructor(o,r,n){super(o);this.type="provider_error";this.code=r,this.data=n}},_t=class extends Nr{constructor(o){var i,a,s;let r=o;super(r.message,r.code,r.data);let n=Object.values(tt).find(l=>l.eipCode===r.code);this.details=n||tt.UNKNOWN_ERROR,r.code===-32002&&((i=r.message)!=null&&i.includes("already pending for origin")?(a=r.message)!=null&&a.includes("wallet_requestPermissions")?this.details=tt.E32002_CONNECTION_ALREADY_PENDING:this.details=tt.E32002_REQUEST_ALREADY_PENDING:(s=r.message)!=null&&s.includes("Already processing")&&r.message.includes("eth_requestAccounts")&&(this.details=tt.E32002_WALLET_LOCKED))}},lc={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Wallet request timed out",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_USER_REJECTED_CONNECTION:{message:"You rejected the request",detail:"Please try connecting again.",retryable:!0}},cc={E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}},dc={E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1}},tt={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},...dc,...cc},rt={...lc,...tt};var pc=12e4,Dr=(e=new xt,t=pc)=>new Promise((o,r)=>setTimeout(()=>{r(e)},t)),Se=class{constructor(t){this.removeListener=(t,o)=>{if(this.walletProvider)return this.walletProvider.removeListener(t,o)};this.setWalletProvider=t=>{this.walletProvider=t,this._subscriptions.forEach(o=>{var r;(r=this.walletProvider)==null||r.on(o.eventName,o.listener)})};this.walletProvider=t,this._subscriptions=[]}on(t,o){if(this.walletProvider)return this.walletProvider.on(t,o);this._subscriptions.push({eventName:t,listener:o})}async request(t){if(!this.walletProvider)throw new G(`A wallet request of type ${t.method} was made before setting a wallet provider.`);return Promise.race([this.walletProvider.request(t),Dr()]).catch(o=>{throw xe(o)})}},nt=class extends Se{constructor(o){super(o)}},To=class extends Se{constructor(t){super(t)}sendAsync(t,o){throw new Error("sendAsync is no longer supported by EIP-1193. Use the request method instead.")}};var ke=class{constructor(t,o,r){this.createSiweMessage=(t,o,r,n,i,a,s)=>`${r} wants you to sign in with your Ethereum account:
2
2
  ${o}
3
3
 
4
4
  ${s}
@@ -206,7 +206,7 @@ Resources:
206
206
  display: flex;
207
207
  align-items: center;
208
208
  justify-content: space-between;
209
- margin-bottom: 24px;
209
+ margin-bottom: 30px;
210
210
 
211
211
  h2 {
212
212
  font-size: 16px;
@@ -257,6 +257,7 @@ Resources:
257
257
  /* Mobile */
258
258
  @media (max-width: 440px) {
259
259
  height: 30px;
260
+ margin-bottom: 10px;
260
261
  }
261
262
  `;import{jsx as Ya}from"react/jsx-runtime";var Xa=({style:e,...t})=>Ya("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...e},...t,children:Ya("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 00-5.25 5.25v3a3 3 0 00-3 3v6.75a3 3 0 003 3h10.5a3 3 0 003-3v-6.75a3 3 0 00-3-3v-3c0-2.9-2.35-5.25-5.25-5.25zm3.75 8.25v-3a3.75 3.75 0 10-7.5 0v3h7.5z",clipRule:"evenodd"})});import{Fragment as dn,jsx as Te,jsxs as Xo}from"react/jsx-runtime";var Qa=()=>{let{navigate:e,app:t}=w(),o=(t==null?void 0:t.allowlistConfig.errorTitle)||"You don't have access to this app",r=(t==null?void 0:t.allowlistConfig.errorDetail)||"Have you been invited?",n=(t==null?void 0:t.allowlistConfig.errorCtaText)||"Try another account";return Xo(dn,{children:[Te(_,{}),Xo(Td,{children:[Te(Rd,{children:Xo("div",{children:[Te(za,{}),Te(Xa,{style:{width:"38px",height:"38px",strokeWidth:"1",stroke:"var(--privy-color-accent)",fill:"var(--privy-color-accent)"}})]})}),Xo(Wd,{children:[typeof o=="string"?Te("h3",{children:o}):Te(dn,{children:o}),typeof r=="string"?Te("p",{children:r}):Te(dn,{children:r})]}),t!=null&&t.allowlistConfig.errorCtaLink?Te(se,{as:"a",href:t.allowlistConfig.errorCtaLink,children:n}):Te(se,{onClick:()=>{e("LANDING")},children:n})]})]})},Td=pn.div`
262
263
  display: flex;
@@ -311,7 +312,7 @@ Resources:
311
312
  `;import os from"styled-components";import{jsx as ts}from"react/jsx-runtime";var Qo=({style:e,...t})=>ts("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"1.25rem",width:"1.25rem",...e},...t,children:ts("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99555 0.929932C-1.12055 1.31799 -0.499722 9.15734 2.17445 8.76915C0.0807959 10.5544 -0.960455 16.6416 6.01654 16.0265C10.6356 15.9489 15.5635 12.2232 15.5635 8.1095C15.5635 2.63748 10.7516 0.929932 7.99555 0.929932ZM9.47052 7.53055C9.47052 8.49933 8.81856 9.28468 8.01433 9.28468C7.2101 9.28468 6.55814 8.49933 6.55814 7.53055C6.55814 6.56176 7.2101 5.77641 8.01433 5.77641C8.81856 5.77641 9.47052 6.56176 9.47052 7.53055ZM12.3171 9.28468C13.1213 9.28468 13.7733 8.49933 13.7733 7.53055C13.7733 6.56176 13.1213 5.77641 12.3171 5.77641C11.5129 5.77641 10.8609 6.56176 10.8609 7.53055C10.8609 8.49933 11.5129 9.28468 12.3171 9.28468Z",fill:t.color||"var(--privy-color-foreground-3)"})});import{Fragment as Md,jsx as Mt,jsxs as ns}from"react/jsx-runtime";var Id=os.div`
312
313
  margin-top: 16px;
313
314
  font-size: 12px;
314
- text-align: left;
315
+ text-align: center;
315
316
  color: var(--privy-color-foreground-3);
316
317
 
317
318
  && > a {
@@ -324,7 +325,7 @@ Resources:
324
325
  flex-grow: 1;
325
326
  align-items: flex-end;
326
327
  justify-content: center;
327
- margin-top: 24px;
328
+ margin-top: 10px;
328
329
 
329
330
  > :first-child {
330
331
  margin-right: 6px;
@@ -1069,7 +1070,7 @@ Resources:
1069
1070
  `,_p=Me.div`
1070
1071
  display: flex;
1071
1072
  justify-content: center;
1072
- `;import{Fragment as Lp,jsx as pr,jsxs as Ks}from"react/jsx-runtime";var Js=()=>{let{navigateBack:e}=w();return Ks(Lp,{children:[pr(_,{backFn:e},"header"),pr(Rn,{}),Ks(fe,{children:[pr("span",{children:"Still not sure? "}),pr("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})};import{Fragment as Pp,jsx as ur,jsxs as Ys}from"react/jsx-runtime";var Xs=()=>{let{navigateBack:e}=w();return Ys(Pp,{children:[ur(_,{backFn:e},"header"),ur(Tn,{}),Ys(fe,{children:[ur("span",{children:"Still not sure? "}),ur("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})};import{Fragment as Sp,jsx as fr,jsxs as Qs}from"react/jsx-runtime";var el=()=>{let{navigateBack:e}=w();return Qs(Sp,{children:[fr(_,{backFn:e},"header"),fr(Wn,{}),Qs(fe,{children:[fr("span",{children:"Still not sure? "}),fr("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})};import{useState as Qp}from"react";import{isMobile as ul}from"react-device-detect";import $t from"styled-components";import{jsx as tl}from"react/jsx-runtime";var ol=()=>{var t;let{app:e}=w();return(t=e==null?void 0:e.appearance)!=null&&t.logo?tl("div",{children:tl("img",{src:e.appearance.logo,alt:`${e==null?void 0:e.name} logo`,style:{objectFit:"contain",width:"200px",height:"80px"}})}):null};import{useEffect as kp,useState as On}from"react";import hr from"styled-components";import{jsx as rl}from"react/jsx-runtime";var mr=({style:e,...t})=>rl("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...e},...t,children:rl("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})});import{Fragment as Ip,jsx as Vt,jsxs as Nn}from"react/jsx-runtime";var gr=e=>{let[t,o]=On(""),[r,n]=On(!1),[i,a]=On(null),{isLinking:s,initLoginWithEmail:l}=P(),{navigate:c,options:h}=w(),m=h.wallet;kp(()=>{let d=document.querySelector("#email-input");d==null||d.focus()},[]);let p=Si(t),g=()=>{n(!0),l(t).then(()=>{c("AWAITING_PASSWORDLESS_CODE")}).catch(d=>{let y=(d==null?void 0:d.status)===401&&(d==null?void 0:d.message)==="User is not allowed to login to this app.";(d==null?void 0:d.status)===422?a(d.message):y?c("ALLOWLIST_REJECTION_SCREEN"):a("Issue submitting email"),n(!1)})},b="Get started without a wallet.";return i?b=i:s?b="Easily connect an email":m||(b="Get started quickly with email"),Nn(Ip,{children:[Nn(Ap,{stacked:e.stacked,children:[Nn(Wp,{standalone:e.stacked,children:[Vt(mr,{}),Vt("input",{id:"email-input",type:"email",placeholder:"your@email.com",onChange:d=>o(d.target.value),onKeyUp:d=>{d.key==="Enter"&&g()},value:t,autoComplete:"email"})]}),e.stacked?null:Vt(Tp,{disabled:r||!p,onClick:g,children:r?Vt(Ke,{}):"Submit"})]}),Vt(Rp,{fail:!!i,children:b}),e.stacked?Vt(X,{loading:r,loadingText:null,disabled:r||!p,onClick:g,children:"Submit"}):null]})},Ap=hr.div`
1073
+ `;import{Fragment as Lp,jsx as pr,jsxs as Ks}from"react/jsx-runtime";var Js=()=>{let{navigateBack:e}=w();return Ks(Lp,{children:[pr(_,{backFn:e},"header"),pr(Rn,{}),Ks(fe,{children:[pr("span",{children:"Still not sure? "}),pr("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})};import{Fragment as Pp,jsx as ur,jsxs as Ys}from"react/jsx-runtime";var Xs=()=>{let{navigateBack:e}=w();return Ys(Pp,{children:[ur(_,{backFn:e},"header"),ur(Tn,{}),Ys(fe,{children:[ur("span",{children:"Still not sure? "}),ur("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})};import{Fragment as Sp,jsx as fr,jsxs as Qs}from"react/jsx-runtime";var el=()=>{let{navigateBack:e}=w();return Qs(Sp,{children:[fr(_,{backFn:e},"header"),fr(Wn,{}),Qs(fe,{children:[fr("span",{children:"Still not sure? "}),fr("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})};import{useState as Qp}from"react";import{isMobile as ul}from"react-device-detect";import $t from"styled-components";import{jsx as tl}from"react/jsx-runtime";var ol=()=>{var t;let{app:e}=w();return(t=e==null?void 0:e.appearance)!=null&&t.logo?tl("div",{children:tl("img",{src:e.appearance.logo,alt:`${e==null?void 0:e.name} logo`,style:{objectFit:"contain",width:"180px",height:"60px"}})}):null};import{useEffect as kp,useState as On}from"react";import hr from"styled-components";import{jsx as rl}from"react/jsx-runtime";var mr=({style:e,...t})=>rl("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...e},...t,children:rl("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})});import{Fragment as Ip,jsx as Vt,jsxs as Nn}from"react/jsx-runtime";var gr=e=>{let[t,o]=On(""),[r,n]=On(!1),[i,a]=On(null),{isLinking:s,initLoginWithEmail:l}=P(),{navigate:c,options:h}=w(),m=h.wallet;kp(()=>{let d=document.querySelector("#email-input");d==null||d.focus()},[]);let p=Si(t),g=()=>{n(!0),l(t).then(()=>{c("AWAITING_PASSWORDLESS_CODE")}).catch(d=>{let y=(d==null?void 0:d.status)===401&&(d==null?void 0:d.message)==="User is not allowed to login to this app.";(d==null?void 0:d.status)===422?a(d.message):y?c("ALLOWLIST_REJECTION_SCREEN"):a("Issue submitting email"),n(!1)})},b="Get started without a wallet.";return i?b=i:s?b="Easily connect an email":m||(b="Get started quickly with email"),Nn(Ip,{children:[Nn(Ap,{stacked:e.stacked,children:[Nn(Wp,{standalone:e.stacked,children:[Vt(mr,{}),Vt("input",{id:"email-input",type:"email",placeholder:"your@email.com",onChange:d=>o(d.target.value),onKeyUp:d=>{d.key==="Enter"&&g()},value:t,autoComplete:"email"})]}),e.stacked?null:Vt(Tp,{disabled:r||!p,onClick:g,children:r?Vt(Ke,{}):"Submit"})]}),Vt(Rp,{fail:!!i,children:b}),e.stacked?Vt(X,{loading:r,loadingText:null,disabled:r||!p,onClick:g,children:"Submit"}):null]})},Ap=hr.div`
1073
1074
  width: 100%;
1074
1075
  height: ${e=>e.stacked?"100%":"auto"};
1075
1076
 
@@ -1369,6 +1370,12 @@ Resources:
1369
1370
  :hover > :last-child {
1370
1371
  opacity: 1;
1371
1372
  }
1373
+
1374
+ @media (max-width: 440px) {
1375
+ > :last-child {
1376
+ display: none;
1377
+ }
1378
+ }
1372
1379
  `;import Jp from"styled-components";import{jsx as pl,jsxs as Xp}from"react/jsx-runtime";var Pr=()=>{let{navigate:e}=w();return Xp(Yp,{children:[pl("span",{children:"Don\u2019t have a wallet? "}),pl("button",{onClick:()=>{e("WALLET_EDUCATION")},children:"Create one now."})]})},Yp=Jp.div`
1373
1380
  font-size: 13px;
1374
1381
  color: var(--privy-color-foreground-3);
@@ -1444,7 +1451,7 @@ Resources:
1444
1451
  // Lastly, apply a 10px cheat upwards, which helps in particular for when
1445
1452
  // the logo is close to the top (mobile or full wallet-open design)
1446
1453
  margin-top: ${e=>`${(e.hasOnlyOneSection?31:0)-(e.hasTerms?18:0)}px`};
1447
- margin-bottom: ${e=>`${10+(e.hasOnlyOneSection?31:0)-(e.hasTerms?18:0)}px`};
1454
+ margin-bottom: ${e=>`${15+(e.hasOnlyOneSection?31:0)-(e.hasTerms?18:0)}px`};
1448
1455
  `,i2=$t(le)`
1449
1456
  flex-direction: ${e=>e.reverse?"column-reverse":"column"};
1450
1457
  `;import{Fragment as a2,jsx as zt,jsxs as s2}from"react/jsx-runtime";var bl=()=>{let{app:e}=w();return s2(a2,{children:[zt(_,{},"header"),zt(Ye,{title:"Connect your email",description:`Add your email to your ${e==null?void 0:e.name} account`,icon:zt(mr,{})}),zt(le,{children:zt(gr,{stacked:!0})}),zt(M,{protectedByPrivy:!0})]})};import{Fragment as l2,jsx as qt,jsxs as c2}from"react/jsx-runtime";var yl=()=>{let{app:e}=w();return c2(l2,{children:[qt(_,{},"header"),qt(Ye,{title:"Connect your phone",description:`Add your number to your ${e==null?void 0:e.name} account`,icon:qt(br,{})}),qt(le,{children:qt(vr,{stacked:!0})}),qt(M,{protectedByPrivy:!0})]})};import{Fragment as d2,jsx as bo,jsxs as vl}from"react/jsx-runtime";var wl=()=>{let{linkingHint:e}=P(),{app:t}=w(),o=e?`Select the wallet with ${it(e)} and follow the instructions to reconnect your wallet${t!=null&&t.name?` to ${t.name}.`:"."}`:`Link a wallet to your ${t==null?void 0:t.name} account`;return vl(d2,{children:[bo(_,{},"header"),bo(Je,{title:`${e?"Reconnect":"Connect"} your wallet`,description:o}),vl(le,{children:[bo(Lr,{}),bo(Pr,{})]}),bo(M,{protectedByPrivy:!0})]})};import{jsx as Cl,jsxs as p2}from"react/jsx-runtime";var El=({style:e,...t})=>p2("svg",{width:"164",height:"164",viewBox:"0 0 164 164",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"26px",width:"26px",...e},...t,children:[Cl("circle",{cx:"82",cy:"82",r:"80",stroke:"#EC6351","stroke-width":"4","stroke-linecap":"round"}),Cl("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M81.9999 100.788C93.3288 100.788 102.513 91.6043 102.513 80.2754C102.513 68.9465 93.3288 59.7626 81.9999 59.7626C70.671 59.7626 61.4871 68.9465 61.4871 80.2754C61.4871 91.6043 70.671 100.788 81.9999 100.788ZM88.3236 71.8304C88.9093 71.2446 89.8591 71.2446 90.4449 71.8304C91.0307 72.4161 91.0307 73.3659 90.4449 73.9517L84.121 80.2756L90.445 86.5996C91.0308 87.1854 91.0308 88.1351 90.445 88.7209C89.8592 89.3067 88.9095 89.3067 88.3237 88.7209L81.9997 82.3969L75.6756 88.7209C75.0899 89.3067 74.1401 89.3067 73.5543 88.7209C72.9685 88.1351 72.9685 87.1854 73.5543 86.5996L79.8783 80.2756L73.5544 73.9517C72.9686 73.3659 72.9686 72.4161 73.5544 71.8304C74.1402 71.2446 75.09 71.2446 75.6758 71.8304L81.9997 78.1543L88.3236 71.8304Z",fill:"#EC6351"})]});import{Fragment as u2,jsx as Zt,jsxs as xl}from"react/jsx-runtime";var _l=()=>{let{closePrivyModal:e}=P(),{navigate:t}=w();return xl(u2,{children:[Zt(_,{},"header"),Zt(El,{style:{width:"160px",height:"160px",margin:"0 auto 20px"}}),Zt(Je,{title:"Could not connect with wallet",description:"Please check that Phantom multichain is enabled and try again.",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center"}}),xl(le,{children:[Zt(X,{onClick:()=>t("LANDING"),children:"Try again"}),Zt(ja,{onClick:()=>e(),children:"Cancel"})]}),Zt(M,{protectedByPrivy:!0})]})};import{useEffect as Ll,useState as Pl}from"react";import Hn from"styled-components";import{Fragment as b2,jsx as ht,jsxs as Sr}from"react/jsx-runtime";var Sl={google:{name:"Google",component:xr},discord:{name:"Discord",component:wr},github:{name:"Github",component:Cr},twitter:{name:"Twitter",component:_r}},f2=e=>e.charAt(0).toUpperCase()+e.slice(1),Gn=()=>{let e=new URL(window.location.href);e.searchParams.delete("privy_oauth_code"),e.searchParams.delete("privy_oauth_provider"),e.searchParams.delete("privy_oauth_state"),window.history.pushState({},"",e)},kl=()=>{var A;let{ready:e,user:t,authenticated:o}=I(),{data:r,setModalData:n,navigate:i}=w(),{getAuthMeta:a,initLoginWithOAuth:s,loginWithOAuth:l,closePrivyModal:c}=P(),[h,m]=Pl(!1),[p,g]=Pl(void 0),b=((A=a())==null?void 0:A.provider)||"google",d=Sl[b].name,y=Sl[b].component;Ll(()=>{!e||l().then(()=>{Gn(),m(!0)}).catch(O=>{let N={retryable:!1,message:"Authentication failed."};O.message.includes("Another user has already linked this")?N.detail="This account has already been linked to another user.":O.message==="Invalid code during oauth flow."?(N.retryable=!0,N.detail="Something went wrong. Try again."):O.message==="User denied confirmation during OAuth flow"&&(N.detail=`Retry and check ${f2(b)} to finish connecting your account.`,N.retryable=!0),Gn(),g(N)})},[e]),Ll(()=>{var q;if(!(o&&h&&t))return;if(((q=r==null?void 0:r.login)==null?void 0:q.promptCreatePrivyWalletFlow)&&!t.wallet){let ge=setTimeout(()=>{n({createWallet:{onSuccess:()=>{},onFailure:de=>console.error(de),callAuthOnSuccessOnClose:!0}}),i("EMBEDDED_WALLET_SCREEN")},Ce-500);return()=>clearTimeout(ge)}else{let ge=setTimeout(c,Ce);return()=>clearTimeout(ge)}},[o,h,t]);let v=h?`Successfully connected with ${d}`:p?p.message:`Verifying connection to ${d}`,k="";return h?k="You\u2019re good to go!":p?k=p.detail:k="Just a few moments more",Sr(b2,{children:[ht(_,{}),Sr(m2,{children:[ht(g2,{children:Sr("div",{children:[ht(Jo,{success:h,fail:!!p}),ht(y,{style:{width:"38px",height:"38px"},logoFill:"primary"})]})}),Sr(h2,{children:[ht("h3",{children:v}),ht("p",{children:k})]}),ht(se,{onClick:()=>{Gn(),s(b),g(void 0)},invisible:h||!(p!=null&&p.retryable),disabled:!h&&!(p!=null&&p.retryable),children:"Retry"})]})]})},m2=Hn.div`
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Kl=Object.create;var Fo=Object.defineProperty;var Jl=Object.getOwnPropertyDescriptor;var Yl=Object.getOwnPropertyNames;var Xl=Object.getPrototypeOf,Ql=Object.prototype.hasOwnProperty;var ui=(e,t)=>()=>(e&&(t=e(e=0)),t);var lt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),tn=(e,t)=>{for(var o in t)Fo(e,o,{get:t[o],enumerable:!0})},fi=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Yl(t))!Ql.call(e,n)&&n!==o&&Fo(e,n,{get:()=>t[n],enumerable:!(r=Jl(t,n))||r.enumerable});return e};var P=(e,t,o)=>(o=e!=null?Kl(Xl(e)):{},fi(t||!e||!e.__esModule?Fo(o,"default",{value:e,enumerable:!0}):o,e)),on=e=>fi(Fo({},"__esModule",{value:!0}),e);var nr=lt((h2,rr)=>{var oa,ra,na,ia,aa,sa,la,ca,da,tr,fn,pa,ua,fa,Xt,ma,ha,ga,ba,ya,va,wa,Ca,Ea,or;(function(e){var t=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(r){e(o(t,o(r)))}):typeof rr=="object"&&typeof rr.exports=="object"?e(o(t,o(rr.exports))):e(o(t));function o(r,n){return r!==t&&(typeof Object.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(i,a){return r[i]=n?n(i,a):a}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])};oa=function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)},ra=Object.assign||function(r){for(var n,i=1,a=arguments.length;i<a;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])}return r},na=function(r,n){var i={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&n.indexOf(a)<0&&(i[a]=r[a]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(r);s<a.length;s++)n.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(r,a[s])&&(i[a[s]]=r[a[s]]);return i},ia=function(r,n,i,a){var s=arguments.length,l=s<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,i):a,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(r,n,i,a);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(l=(s<3?c(l):s>3?c(n,i,l):c(n,i))||l);return s>3&&l&&Object.defineProperty(n,i,l),l},aa=function(r,n){return function(i,a){n(i,a,r)}},sa=function(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)},la=function(r,n,i,a){function s(l){return l instanceof i?l:new i(function(c){c(l)})}return new(i||(i=Promise))(function(l,c){function h(b){try{p(a.next(b))}catch(y){c(y)}}function m(b){try{p(a.throw(b))}catch(y){c(y)}}function p(b){b.done?l(b.value):s(b.value).then(h,m)}p((a=a.apply(r,n||[])).next())})},ca=function(r,n){var i={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},a,s,l,c;return c={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function h(p){return function(b){return m([p,b])}}function m(p){if(a)throw new TypeError("Generator is already executing.");for(;i;)try{if(a=1,s&&(l=p[0]&2?s.return:p[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,p[1])).done)return l;switch(s=0,l&&(p=[p[0]&2,l.value]),p[0]){case 0:case 1:l=p;break;case 4:return i.label++,{value:p[1],done:!1};case 5:i.label++,s=p[1],p=[0];continue;case 7:p=i.ops.pop(),i.trys.pop();continue;default:if(l=i.trys,!(l=l.length>0&&l[l.length-1])&&(p[0]===6||p[0]===2)){i=0;continue}if(p[0]===3&&(!l||p[1]>l[0]&&p[1]<l[3])){i.label=p[1];break}if(p[0]===6&&i.label<l[1]){i.label=l[1],l=p;break}if(l&&i.label<l[2]){i.label=l[2],i.ops.push(p);break}l[2]&&i.ops.pop(),i.trys.pop();continue}p=n.call(r,i)}catch(b){p=[6,b],s=0}finally{a=l=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},da=function(r,n){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(n,i)&&or(n,r,i)},or=Object.create?function(r,n,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||("get"in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(r,a,s)}:function(r,n,i,a){a===void 0&&(a=i),r[a]=n[i]},tr=function(r){var n=typeof Symbol=="function"&&Symbol.iterator,i=n&&r[n],a=0;if(i)return i.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&a>=r.length&&(r=void 0),{value:r&&r[a++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},fn=function(r,n){var i=typeof Symbol=="function"&&r[Symbol.iterator];if(!i)return r;var a=i.call(r),s,l=[],c;try{for(;(n===void 0||n-- >0)&&!(s=a.next()).done;)l.push(s.value)}catch(h){c={error:h}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(c)throw c.error}}return l},pa=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(fn(arguments[n]));return r},ua=function(){for(var r=0,n=0,i=arguments.length;n<i;n++)r+=arguments[n].length;for(var a=Array(r),s=0,n=0;n<i;n++)for(var l=arguments[n],c=0,h=l.length;c<h;c++,s++)a[s]=l[c];return a},fa=function(r,n,i){if(i||arguments.length===2)for(var a=0,s=n.length,l;a<s;a++)(l||!(a in n))&&(l||(l=Array.prototype.slice.call(n,0,a)),l[a]=n[a]);return r.concat(l||Array.prototype.slice.call(n))},Xt=function(r){return this instanceof Xt?(this.v=r,this):new Xt(r)},ma=function(r,n,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=i.apply(r,n||[]),s,l=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(d){a[d]&&(s[d]=function(v){return new Promise(function(C,T){l.push([d,v,C,T])>1||h(d,v)})})}function h(d,v){try{m(a[d](v))}catch(C){y(l[0][3],C)}}function m(d){d.value instanceof Xt?Promise.resolve(d.value.v).then(p,b):y(l[0][2],d)}function p(d){h("next",d)}function b(d){h("throw",d)}function y(d,v){d(v),l.shift(),l.length&&h(l[0][0],l[0][1])}},ha=function(r){var n,i;return n={},a("next"),a("throw",function(s){throw s}),a("return"),n[Symbol.iterator]=function(){return this},n;function a(s,l){n[s]=r[s]?function(c){return(i=!i)?{value:Xt(r[s](c)),done:s==="return"}:l?l(c):c}:l}},ga=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],i;return n?n.call(r):(r=typeof tr=="function"?tr(r):r[Symbol.iterator](),i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i);function a(l){i[l]=r[l]&&function(c){return new Promise(function(h,m){c=r[l](c),s(h,m,c.done,c.value)})}}function s(l,c,h,m){Promise.resolve(m).then(function(p){l({value:p,done:h})},c)}},ba=function(r,n){return Object.defineProperty?Object.defineProperty(r,"raw",{value:n}):r.raw=n,r};var o=Object.create?function(r,n){Object.defineProperty(r,"default",{enumerable:!0,value:n})}:function(r,n){r.default=n};ya=function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)i!=="default"&&Object.prototype.hasOwnProperty.call(r,i)&&or(n,r,i);return o(n,r),n},va=function(r){return r&&r.__esModule?r:{default:r}},wa=function(r,n,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?r!==n||!a:!n.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(r):a?a.value:n.get(r)},Ca=function(r,n,i,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?r!==n||!s:!n.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(r,i):s?s.value=i:n.set(r,i),i},Ea=function(r,n){if(n===null||typeof n!="object"&&typeof n!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r=="function"?n===r:r.has(n)},e("__extends",oa),e("__assign",ra),e("__rest",na),e("__decorate",ia),e("__param",aa),e("__metadata",sa),e("__awaiter",la),e("__generator",ca),e("__exportStar",da),e("__createBinding",or),e("__values",tr),e("__read",fn),e("__spread",pa),e("__spreadArrays",ua),e("__spreadArray",fa),e("__await",Xt),e("__asyncGenerator",ma),e("__asyncDelegator",ha),e("__asyncValues",ga),e("__makeTemplateObject",ba),e("__importStar",ya),e("__importDefault",va),e("__classPrivateFieldGet",wa),e("__classPrivateFieldSet",Ca),e("__classPrivateFieldIn",Ea)})});var mn=lt(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.getLocalStorage=G.getLocalStorageOrThrow=G.getCrypto=G.getCryptoOrThrow=G.getLocation=G.getLocationOrThrow=G.getNavigator=G.getNavigatorOrThrow=G.getDocument=G.getDocumentOrThrow=G.getFromWindowOrThrow=G.getFromWindow=void 0;function Mt(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}G.getFromWindow=Mt;function Qt(e){let t=Mt(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}G.getFromWindowOrThrow=Qt;function lc(){return Qt("document")}G.getDocumentOrThrow=lc;function cc(){return Mt("document")}G.getDocument=cc;function dc(){return Qt("navigator")}G.getNavigatorOrThrow=dc;function pc(){return Mt("navigator")}G.getNavigator=pc;function uc(){return Qt("location")}G.getLocationOrThrow=uc;function fc(){return Mt("location")}G.getLocation=fc;function mc(){return Qt("crypto")}G.getCryptoOrThrow=mc;function hc(){return Mt("crypto")}G.getCrypto=hc;function gc(){return Qt("localStorage")}G.getLocalStorageOrThrow=gc;function bc(){return Mt("localStorage")}G.getLocalStorage=bc});var _a=lt(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.getWindowMetadata=void 0;var xa=mn();function yc(){let e,t;try{e=xa.getDocumentOrThrow(),t=xa.getLocationOrThrow()}catch{return null}function o(){let m=e.getElementsByTagName("link"),p=[];for(let b=0;b<m.length;b++){let y=m[b],d=y.getAttribute("rel");if(d&&d.toLowerCase().indexOf("icon")>-1){let v=y.getAttribute("href");if(v)if(v.toLowerCase().indexOf("https:")===-1&&v.toLowerCase().indexOf("http:")===-1&&v.indexOf("//")!==0){let C=t.protocol+"//"+t.host;if(v.indexOf("/")===0)C+=v;else{let T=t.pathname.split("/");T.pop(),C+=T.join("/")+"/"+v}p.push(C)}else if(v.indexOf("//")===0){let C=t.protocol+v;p.push(C)}else p.push(v)}}return p}function r(...m){let p=e.getElementsByTagName("meta");for(let b=0;b<p.length;b++){let y=p[b],d=["itemprop","property","name"].map(v=>y.getAttribute(v)).filter(v=>v?m.includes(v):!1);if(d.length&&d){let v=y.getAttribute("content");if(v)return v}}return""}function n(){let m=r("name","og:site_name","og:title","twitter:title");return m||(m=e.title),m}function i(){return r("description","og:description","twitter:description","keywords")}let a=n(),s=i(),l=t.origin,c=o();return{description:s,url:l,icons:c,name:a}}ir.getWindowMetadata=yc});var Oa={};tn(Oa,{BotInfo:()=>Ta,BrowserInfo:()=>Sa,NodeInfo:()=>ka,ReactNativeInfo:()=>Wa,SearchBotDeviceInfo:()=>Aa,browserName:()=>_c,detect:()=>xc,detectOS:()=>Ia,getNodeVersion:()=>Ma,parseUserAgent:()=>hn});function xc(e){return e?hn(e):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Wa:typeof navigator<"u"?hn(navigator.userAgent):Ma()}function Ra(e){return e!==""&&Ec.reduce(function(t,o){var r=o[0],n=o[1];if(t)return t;var i=n.exec(e);return!!i&&[r,i]},!1)}function _c(e){var t=Ra(e);return t?t[0]:null}function hn(e){var t=Ra(e);if(!t)return null;var o=t[0],r=t[1];if(o==="searchbot")return new Ta;var n=r[1]&&r[1].split(/[._]/).slice(0,3);n?n.length<La&&(n=vc(n,Lc(La-n.length))):n=[];var i=n.join("."),a=Ia(e),s=Cc.exec(e);return s&&s[1]?new Aa(o,i,a,s[1]):new Sa(o,i,a)}function Ia(e){for(var t=0,o=Pa.length;t<o;t++){var r=Pa[t],n=r[0],i=r[1],a=i.exec(e);if(a)return n}return null}function Ma(){var e=typeof process<"u"&&process.version;return e?new ka(process.version.slice(1)):null}function Lc(e){for(var t=[],o=0;o<e;o++)t.push("0");return t}var vc,Sa,ka,Aa,Ta,Wa,wc,Cc,La,Ec,Pa,Na=ui(()=>{vc=function(){for(var e=0,t=0,o=arguments.length;t<o;t++)e+=arguments[t].length;for(var r=Array(e),n=0,t=0;t<o;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,n++)r[n]=i[a];return r},Sa=function(){function e(t,o,r){this.name=t,this.version=o,this.os=r,this.type="browser"}return e}(),ka=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=process.platform}return e}(),Aa=function(){function e(t,o,r,n){this.name=t,this.version=o,this.os=r,this.bot=n,this.type="bot-device"}return e}(),Ta=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),Wa=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),wc=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,Cc=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,La=3,Ec=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",wc]],Pa=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]]});var bn=lt(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.getClientMeta=S.getLocalStorage=S.getLocalStorageOrThrow=S.getCrypto=S.getCryptoOrThrow=S.getLocation=S.getLocationOrThrow=S.getNavigator=S.getNavigatorOrThrow=S.getDocument=S.getDocumentOrThrow=S.getFromWindowOrThrow=S.getFromWindow=S.isBrowser=S.isNode=S.isMobile=S.isIOS=S.isAndroid=S.detectOS=S.detectEnv=void 0;var Da=nr(),Pc=Da.__importStar(_a()),He=Da.__importStar(mn()),Sc=(Na(),on(Oa));function gn(e){return(0,Sc.detect)(e)}S.detectEnv=gn;function ar(){let e=gn();return e&&e.os?e.os:void 0}S.detectOS=ar;function Ua(){let e=ar();return e?e.toLowerCase().includes("android"):!1}S.isAndroid=Ua;function Ba(){let e=ar();return e?e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}S.isIOS=Ba;function kc(){return ar()?Ua()||Ba():!1}S.isMobile=kc;function Fa(){let e=gn();return e&&e.name?e.name.toLowerCase()==="node":!1}S.isNode=Fa;function Ac(){return!Fa()&&!!(0,S.getNavigator)()}S.isBrowser=Ac;S.getFromWindow=He.getFromWindow;S.getFromWindowOrThrow=He.getFromWindowOrThrow;S.getDocumentOrThrow=He.getDocumentOrThrow;S.getDocument=He.getDocument;S.getNavigatorOrThrow=He.getNavigatorOrThrow;S.getNavigator=He.getNavigator;S.getLocationOrThrow=He.getLocationOrThrow;S.getLocation=He.getLocation;S.getCryptoOrThrow=He.getCryptoOrThrow;S.getCrypto=He.getCrypto;S.getLocalStorageOrThrow=He.getLocalStorageOrThrow;S.getLocalStorage=He.getLocalStorage;function Tc(){return Pc.getWindowMetadata()}S.getClientMeta=Tc});var Ga={};tn(Ga,{safeJsonParse:()=>Wc,safeJsonStringify:()=>Rc});function Wc(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}function Rc(e){return typeof e=="string"?e:JSON.stringify(e)}var Ha=ui(()=>{});var yn=lt(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.safeJsonStringify=eo.safeJsonParse=void 0;var Ic=nr(),Va=Ic.__importStar((Ha(),on(Ga)));eo.safeJsonParse=Va.safeJsonParse;eo.safeJsonStringify=Va.safeJsonStringify});var wn=lt(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.removeLocal=yt.getLocal=yt.setLocal=void 0;var ja=yn(),vn=bn();function Mc(e,t){let o=(0,ja.safeJsonStringify)(t),r=(0,vn.getLocalStorage)();r&&r.setItem(e,o)}yt.setLocal=Mc;function Oc(e){let t=null,o=null,r=(0,vn.getLocalStorage)();return r&&(o=r.getItem(e)),t=o&&(0,ja.safeJsonParse)(o),t}yt.getLocal=Oc;function Nc(e){let t=(0,vn.getLocalStorage)();t&&t.removeItem(e)}yt.removeLocal=Nc});var za=lt(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.getMobileLinkRegistry=Ee.getMobileRegistryEntry=Ee.saveMobileLinkInfo=Ee.formatIOSMobile=Ee.mobileLinkChoiceKey=void 0;var Dc=wn();Ee.mobileLinkChoiceKey="WALLETCONNECT_DEEPLINK_CHOICE";function Uc(e,t){let o=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${o}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${o}`:""}Ee.formatIOSMobile=Uc;function Bc(e){let t=e.href.split("?")[0];(0,Dc.setLocal)(Ee.mobileLinkChoiceKey,Object.assign(Object.assign({},e),{href:t}))}Ee.saveMobileLinkInfo=Bc;function $a(e,t){return e.filter(o=>o.name.toLowerCase().includes(t.toLowerCase()))[0]}Ee.getMobileRegistryEntry=$a;function Fc(e,t){let o=e;return t&&(o=t.map(r=>$a(e,r)).filter(Boolean)),o}Ee.getMobileLinkRegistry=Fc});var Ka=lt(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.formatMobileRegistry=et.formatMobileRegistryEntry=et.getDappRegistryUrl=et.getWalletRegistryUrl=void 0;var qa="https://registry.walletconnect.com";function Gc(){return qa+"/api/v2/wallets"}et.getWalletRegistryUrl=Gc;function Hc(){return qa+"/api/v2/dapps"}et.getDappRegistryUrl=Hc;function Za(e,t="mobile"){var o;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:(o=e.image_url.sm)!==null&&o!==void 0?o:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}et.formatMobileRegistryEntry=Za;function Vc(e,t="mobile"){return Object.values(e).filter(o=>!!o[t].universal||!!o[t].native).map(o=>Za(o,t))}et.formatMobileRegistry=Vc});var Ja=lt(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});var Po=nr();Po.__exportStar(bn(),Ot);Po.__exportStar(yn(),Ot);Po.__exportStar(wn(),Ot);Po.__exportStar(za(),Ot);Po.__exportStar(Ka(),Ot)});var pp={};tn(pp,{AsExternalProvider:()=>bt,ConnectorManager:()=>to,PrivyClient:()=>ro,PrivyProvider:()=>jl,PrivyProxyProvider:()=>Ue,VERSION:()=>Vo,WalletConnector:()=>Be,getAccessToken:()=>Vl,usePrivy:()=>N});module.exports=on(pp);var Hl=require("@ethersproject/providers"),te=require("react");var _=()=>{throw new Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};var mi=P(require("axios")),qe=class extends Error{constructor(o,r){super(o);r instanceof Error&&(this.cause=r)}toString(){return`${this.type}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}},jt=class extends qe{constructor(o,r,n,i){super(n,i);this.type=o;this.status=r}},x=class extends qe{constructor(o,r){super(o,r);this.type="client_error"}};var q=class extends qe{constructor(o,r){super(o,r);this.type="connector_error"}},re=e=>{if(e instanceof qe)return e;if(!mi.default.isAxiosError(e))return Me(e);if(!e.response)return new jt("api_error",null,e.message,e);let{type:t,message:o,error:r}=e.response.data;return new jt(t||"ApiError",e.response.status,o||r,e)},Me=e=>e instanceof qe?e:e instanceof Error?new x(e.message,e):new x(`Internal error: ${e}`);var hi=()=>"/api/v1/sessions",gi=()=>"/api/v1/sessions/logout",bi=()=>"/api/v1/sessions/fork",yi=()=>"/api/v1/sessions/fork/recover",vi=()=>"/api/v1/siwe/init",wi=()=>"/api/v1/siwe/authenticate",Ci=()=>"/api/v1/siwe/link",Ei=()=>"/api/v1/passwordless/init",xi=()=>"/api/v1/passwordless/authenticate",_i=()=>"/api/v1/passwordless/link",Li=()=>"/api/v1/passwordless_sms/init",Pi=()=>"/api/v1/passwordless_sms/authenticate",Si=()=>"/api/v1/passwordless_sms/link",ki=()=>"/api/v1/oauth/init",Ai=()=>"/api/v1/oauth/authenticate",Ti=()=>"/api/v1/oauth/link",Wi=()=>"/api/v1/siwe/unlink",Ri=()=>"/api/v1/passwordless/unlink",Ii=()=>"/api/v1/passwordless_sms/unlink",Mi=()=>"/api/v1/oauth/unlink";var Eo=class{constructor(t){this.meta={email:t}}async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new x("Email and email code must be set prior to calling authenticate.");try{let t=xi(),o=await this.api.post(t,{email:this.meta.email,code:this.meta.emailCode});return{user:o.data.user,token:o.data.token,refresh_token:o.data.refresh_token,is_new_user:o.data.is_new_user}}catch(t){throw re(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new x("Email and email code must be set prior to calling authenticate.");try{let t=_i();return(await this.api.post(t,{email:this.meta.email,code:this.meta.emailCode})).data}catch(t){throw re(t)}}async sendCodeEmail(t){if(!this.api)throw new x("Auth flow has no API instance");if(t&&(this.meta.email=t),!this.meta.email)throw new x("Email must be set when initialzing authentication.");try{let o=Ei();return(await this.api.post(o,{email:this.meta.email})).data}catch(o){throw re(o)}}};var $t=class{constructor(t,o,r){this.meta={provider:t},this.meta.authorizationCode=o,this.meta.stateCode=r}isActive(){return!!(this.meta.authorizationCode&&this.meta.stateCode&&this.meta.provider)}async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new x("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenticate.");if(this.meta.authorizationCode==="undefined")throw new x("User denied confirmation during OAuth flow");try{let t=Ai(),o=await this.api.post(t,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode});return{user:o.data.user,token:o.data.token,refresh_token:o.data.refresh_token,is_new_user:o.data.is_new_user}}catch(t){throw re(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new x("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling link.");if(this.meta.authorizationCode==="undefined")throw new x("User denied confirmation during OAuth flow");try{let t=Ti();return(await this.api.post(t,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode})).data}catch(t){throw re(t)}}async getAuthorizationUrl(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.provider)throw new x("Provider must be set when initialzing OAuth authentication.");try{let t=ki();return(await this.api.post(t,{provider:this.meta.provider,redirect_to:window.location.href})).data}catch(t){throw re(t)}}};var zt=class{constructor(t,o,r){this._meta={walletType:o,walletId:r},this.connectors=t,this.walletConnector=this.connectors.createWalletConnector(o,null,r)}get meta(){return{...this._meta,walletName:this.walletConnector.walletBranding.name,walletIcon:this.walletConnector.walletBranding.icon}}async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");try{let{message:t,signature:o}=await this.sign(),r=await this.api.post(wi(),{message:t,signature:o});return this.connectors.addWalletConnector(this.walletConnector),await this.connectors.setActiveWallet(this.walletConnector.address)||console.warn("Failed to set active wallet"),{user:r.data.user,token:r.data.token,refresh_token:r.data.refresh_token,is_new_user:r.data.is_new_user}}catch(t){throw re(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");try{let{message:t,signature:o}=await this.sign(),r=await this.api.post(Ci(),{message:t,signature:o});return this.connectors.addWalletConnector(this.walletConnector),await this.connectors.setActiveWallet(this.walletConnector.address)||console.warn("Failed to set active wallet"),r.data}catch(t){throw re(t)}}async promptConnect(){if(!this.api)throw new x("Auth flow has no API instance");let t=await this.walletConnector.connect({showPrompt:!0});return await this.buildSiweMessage(t),t}async sign(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.preparedMessage){let o=await this.walletConnector.connect({showPrompt:!1});await this.buildSiweMessage(o)}if(!this.preparedMessage)throw new x("Could not prepare SIWE message");let t=await this.walletConnector.sign(this.preparedMessage);return{message:this.preparedMessage,signature:t}}async buildSiweMessage(t){if(!this.api)throw new x("Auth flow has no API instance");let o=t.address,r=t.chainId,n=await this.api.post(vi(),{address:o});return this.preparedMessage=this.walletConnector.prepareMessage(r,o,n.data.nonce),this.preparedMessage}};var xo=class{constructor(t){this.meta={phoneNumber:t}}async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.phoneNumber||!this.meta.smsCode)throw new x("phone number and sms code must be set prior to calling authenticate.");try{let t=Pi(),o=await this.api.post(t,{phoneNumber:this.meta.phoneNumber,code:this.meta.smsCode});return{user:o.data.user,token:o.data.token,refresh_token:o.data.refresh_token,is_new_user:o.data.is_new_user}}catch(t){throw re(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.phoneNumber||!this.meta.smsCode)throw new x("phone number and sms code must be set prior to calling authenticate.");try{let t=Si();return(await this.api.post(t,{phoneNumber:this.meta.phoneNumber,code:this.meta.smsCode})).data}catch(t){throw re(t)}}async sendSmsCode(t){if(!this.api)throw new x("Auth flow has no API instance");if(t&&(this.meta.phoneNumber=t),!this.meta.phoneNumber)throw new x("phone nNumber must be set when initialzing authentication.");try{let o=Li();return(await this.api.post(o,{phoneNumber:this.meta.phoneNumber})).data}catch(o){throw re(o)}}};var rs=require("@ethersproject/address");var Oi="1.21.0-beta.4";var Ni="https://api.privy.io/v0",Go=process.env.NEXT_PUBLIC_PRIVY_AUTH_URL||"https://auth.privy.io",Ho="4df5e2316331463a9130964bd6078dfa",Di=1e4,Oe=1400,Vo=Oi;var qt="privy:token",jo="privy:refresh_token",_o="privy:session_transfer_token",$o="privy:connectors",rn="walletconnect",Ui=3e4;var nn=class{constructor(){this._cache={}}get(t){return this._cache[t]}put(t,o){o!==void 0?this._cache[t]=o:this.del(t)}del(t){delete this._cache[t]}getKeys(){return Object.keys(this._cache)}},an=class{get(t){let o=localStorage.getItem(t);return o===null?void 0:JSON.parse(o)}put(t,o){o!==void 0?localStorage.setItem(t,JSON.stringify(o)):this.del(t)}del(t){localStorage.removeItem(t)}getKeys(){return Object.entries(localStorage).map(([t])=>t)}};function tc(){return typeof window<"u"&&window.localStorage?new an:new nn}var Z=tc();var Hi=P(require("@coinbase/wallet-sdk")),Vi=require("@ethersproject/address");var Lo=require("react/jsx-runtime"),Ne=({style:e,...t})=>(0,Lo.jsxs)("svg",{width:"1024",height:"1024",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...e},...t,children:[(0,Lo.jsx)("rect",{width:"1024",height:"1024",fill:"#0052FF",rx:100,ry:100}),(0,Lo.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"})]});var Fi=require("@ethersproject/address"),Gi=require("@ethersproject/providers");var Bi=require("@ethersproject/logger");var Zt=class extends q{constructor(){super("Wallet timeout");this.type="wallet_error"}},Wt=class extends q{constructor(){super("User rejected connection");this.type="wallet_error"}},De=e=>{if(e instanceof q)return e;if((e==null?void 0:e.code)&&(e==null?void 0:e.reason)){let t=new Kt(e);return e.code===Bi.ErrorCode.ACTION_REJECTED&&(t.details=Tt.E4001_USER_REJECTED_REQUEST),t}return e!=null&&e.code?new Kt(e):new q("Unknown connector error",e)},sn=class extends qe{constructor(o,r,n){super(o);this.type="provider_error";this.code=r,this.data=n}},Kt=class extends sn{constructor(o){var i,a,s;let r=o;super(r.message,r.code,r.data);let n=Object.values(Tt).find(l=>l.eipCode===r.code);this.details=n||Tt.UNKNOWN_ERROR,r.code===-32002&&((i=r.message)!=null&&i.includes("already pending for origin")?(a=r.message)!=null&&a.includes("wallet_requestPermissions")?this.details=Tt.E32002_CONNECTION_ALREADY_PENDING:this.details=Tt.E32002_REQUEST_ALREADY_PENDING:(s=r.message)!=null&&s.includes("Already processing")&&r.message.includes("eth_requestAccounts")&&(this.details=Tt.E32002_WALLET_LOCKED))}},oc={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Wallet request timed out",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_USER_REJECTED_CONNECTION:{message:"You rejected the request",detail:"Please try connecting again.",retryable:!0}},rc={E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}},nc={E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1}},Tt={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},...nc,...rc},Rt={...oc,...Tt};var ic=12e4,ln=(e=new Zt,t=ic)=>new Promise((o,r)=>setTimeout(()=>{r(e)},t)),Ue=class{constructor(t){this.removeListener=(t,o)=>{if(this.walletProvider)return this.walletProvider.removeListener(t,o)};this.setWalletProvider=t=>{this.walletProvider=t,this._subscriptions.forEach(o=>{var r;(r=this.walletProvider)==null||r.on(o.eventName,o.listener)})};this.walletProvider=t,this._subscriptions=[]}on(t,o){if(this.walletProvider)return this.walletProvider.on(t,o);this._subscriptions.push({eventName:t,listener:o})}async request(t){if(!this.walletProvider)throw new q(`A wallet request of type ${t.method} was made before setting a wallet provider.`);return Promise.race([this.walletProvider.request(t),ln()]).catch(o=>{throw De(o)})}},bt=class extends Ue{constructor(o){super(o)}},zo=class extends Ue{constructor(t){super(t)}sendAsync(t,o){throw new Error("sendAsync is no longer supported by EIP-1193. Use the request method instead.")}};var Be=class{constructor(t,o,r){this.createSiweMessage=(t,o,r,n,i,a,s)=>`${r} wants you to sign in with your Ethereum account:
1
+ "use strict";var Kl=Object.create;var Fo=Object.defineProperty;var Jl=Object.getOwnPropertyDescriptor;var Yl=Object.getOwnPropertyNames;var Xl=Object.getPrototypeOf,Ql=Object.prototype.hasOwnProperty;var ui=(e,t)=>()=>(e&&(t=e(e=0)),t);var lt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),tn=(e,t)=>{for(var o in t)Fo(e,o,{get:t[o],enumerable:!0})},fi=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Yl(t))!Ql.call(e,n)&&n!==o&&Fo(e,n,{get:()=>t[n],enumerable:!(r=Jl(t,n))||r.enumerable});return e};var P=(e,t,o)=>(o=e!=null?Kl(Xl(e)):{},fi(t||!e||!e.__esModule?Fo(o,"default",{value:e,enumerable:!0}):o,e)),on=e=>fi(Fo({},"__esModule",{value:!0}),e);var nr=lt((h2,rr)=>{var oa,ra,na,ia,aa,sa,la,ca,da,tr,fn,pa,ua,fa,Xt,ma,ha,ga,ba,ya,va,wa,Ca,Ea,or;(function(e){var t=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(r){e(o(t,o(r)))}):typeof rr=="object"&&typeof rr.exports=="object"?e(o(t,o(rr.exports))):e(o(t));function o(r,n){return r!==t&&(typeof Object.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(i,a){return r[i]=n?n(i,a):a}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])};oa=function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)},ra=Object.assign||function(r){for(var n,i=1,a=arguments.length;i<a;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])}return r},na=function(r,n){var i={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&n.indexOf(a)<0&&(i[a]=r[a]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(r);s<a.length;s++)n.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(r,a[s])&&(i[a[s]]=r[a[s]]);return i},ia=function(r,n,i,a){var s=arguments.length,l=s<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,i):a,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(r,n,i,a);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(l=(s<3?c(l):s>3?c(n,i,l):c(n,i))||l);return s>3&&l&&Object.defineProperty(n,i,l),l},aa=function(r,n){return function(i,a){n(i,a,r)}},sa=function(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)},la=function(r,n,i,a){function s(l){return l instanceof i?l:new i(function(c){c(l)})}return new(i||(i=Promise))(function(l,c){function h(b){try{p(a.next(b))}catch(y){c(y)}}function m(b){try{p(a.throw(b))}catch(y){c(y)}}function p(b){b.done?l(b.value):s(b.value).then(h,m)}p((a=a.apply(r,n||[])).next())})},ca=function(r,n){var i={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},a,s,l,c;return c={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function h(p){return function(b){return m([p,b])}}function m(p){if(a)throw new TypeError("Generator is already executing.");for(;i;)try{if(a=1,s&&(l=p[0]&2?s.return:p[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,p[1])).done)return l;switch(s=0,l&&(p=[p[0]&2,l.value]),p[0]){case 0:case 1:l=p;break;case 4:return i.label++,{value:p[1],done:!1};case 5:i.label++,s=p[1],p=[0];continue;case 7:p=i.ops.pop(),i.trys.pop();continue;default:if(l=i.trys,!(l=l.length>0&&l[l.length-1])&&(p[0]===6||p[0]===2)){i=0;continue}if(p[0]===3&&(!l||p[1]>l[0]&&p[1]<l[3])){i.label=p[1];break}if(p[0]===6&&i.label<l[1]){i.label=l[1],l=p;break}if(l&&i.label<l[2]){i.label=l[2],i.ops.push(p);break}l[2]&&i.ops.pop(),i.trys.pop();continue}p=n.call(r,i)}catch(b){p=[6,b],s=0}finally{a=l=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},da=function(r,n){for(var i in r)i!=="default"&&!Object.prototype.hasOwnProperty.call(n,i)&&or(n,r,i)},or=Object.create?function(r,n,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(n,i);(!s||("get"in s?!n.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(r,a,s)}:function(r,n,i,a){a===void 0&&(a=i),r[a]=n[i]},tr=function(r){var n=typeof Symbol=="function"&&Symbol.iterator,i=n&&r[n],a=0;if(i)return i.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&a>=r.length&&(r=void 0),{value:r&&r[a++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},fn=function(r,n){var i=typeof Symbol=="function"&&r[Symbol.iterator];if(!i)return r;var a=i.call(r),s,l=[],c;try{for(;(n===void 0||n-- >0)&&!(s=a.next()).done;)l.push(s.value)}catch(h){c={error:h}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(c)throw c.error}}return l},pa=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(fn(arguments[n]));return r},ua=function(){for(var r=0,n=0,i=arguments.length;n<i;n++)r+=arguments[n].length;for(var a=Array(r),s=0,n=0;n<i;n++)for(var l=arguments[n],c=0,h=l.length;c<h;c++,s++)a[s]=l[c];return a},fa=function(r,n,i){if(i||arguments.length===2)for(var a=0,s=n.length,l;a<s;a++)(l||!(a in n))&&(l||(l=Array.prototype.slice.call(n,0,a)),l[a]=n[a]);return r.concat(l||Array.prototype.slice.call(n))},Xt=function(r){return this instanceof Xt?(this.v=r,this):new Xt(r)},ma=function(r,n,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=i.apply(r,n||[]),s,l=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(d){a[d]&&(s[d]=function(v){return new Promise(function(C,T){l.push([d,v,C,T])>1||h(d,v)})})}function h(d,v){try{m(a[d](v))}catch(C){y(l[0][3],C)}}function m(d){d.value instanceof Xt?Promise.resolve(d.value.v).then(p,b):y(l[0][2],d)}function p(d){h("next",d)}function b(d){h("throw",d)}function y(d,v){d(v),l.shift(),l.length&&h(l[0][0],l[0][1])}},ha=function(r){var n,i;return n={},a("next"),a("throw",function(s){throw s}),a("return"),n[Symbol.iterator]=function(){return this},n;function a(s,l){n[s]=r[s]?function(c){return(i=!i)?{value:Xt(r[s](c)),done:s==="return"}:l?l(c):c}:l}},ga=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],i;return n?n.call(r):(r=typeof tr=="function"?tr(r):r[Symbol.iterator](),i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i);function a(l){i[l]=r[l]&&function(c){return new Promise(function(h,m){c=r[l](c),s(h,m,c.done,c.value)})}}function s(l,c,h,m){Promise.resolve(m).then(function(p){l({value:p,done:h})},c)}},ba=function(r,n){return Object.defineProperty?Object.defineProperty(r,"raw",{value:n}):r.raw=n,r};var o=Object.create?function(r,n){Object.defineProperty(r,"default",{enumerable:!0,value:n})}:function(r,n){r.default=n};ya=function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)i!=="default"&&Object.prototype.hasOwnProperty.call(r,i)&&or(n,r,i);return o(n,r),n},va=function(r){return r&&r.__esModule?r:{default:r}},wa=function(r,n,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?r!==n||!a:!n.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(r):a?a.value:n.get(r)},Ca=function(r,n,i,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?r!==n||!s:!n.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(r,i):s?s.value=i:n.set(r,i),i},Ea=function(r,n){if(n===null||typeof n!="object"&&typeof n!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r=="function"?n===r:r.has(n)},e("__extends",oa),e("__assign",ra),e("__rest",na),e("__decorate",ia),e("__param",aa),e("__metadata",sa),e("__awaiter",la),e("__generator",ca),e("__exportStar",da),e("__createBinding",or),e("__values",tr),e("__read",fn),e("__spread",pa),e("__spreadArrays",ua),e("__spreadArray",fa),e("__await",Xt),e("__asyncGenerator",ma),e("__asyncDelegator",ha),e("__asyncValues",ga),e("__makeTemplateObject",ba),e("__importStar",ya),e("__importDefault",va),e("__classPrivateFieldGet",wa),e("__classPrivateFieldSet",Ca),e("__classPrivateFieldIn",Ea)})});var mn=lt(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.getLocalStorage=G.getLocalStorageOrThrow=G.getCrypto=G.getCryptoOrThrow=G.getLocation=G.getLocationOrThrow=G.getNavigator=G.getNavigatorOrThrow=G.getDocument=G.getDocumentOrThrow=G.getFromWindowOrThrow=G.getFromWindow=void 0;function Mt(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}G.getFromWindow=Mt;function Qt(e){let t=Mt(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}G.getFromWindowOrThrow=Qt;function lc(){return Qt("document")}G.getDocumentOrThrow=lc;function cc(){return Mt("document")}G.getDocument=cc;function dc(){return Qt("navigator")}G.getNavigatorOrThrow=dc;function pc(){return Mt("navigator")}G.getNavigator=pc;function uc(){return Qt("location")}G.getLocationOrThrow=uc;function fc(){return Mt("location")}G.getLocation=fc;function mc(){return Qt("crypto")}G.getCryptoOrThrow=mc;function hc(){return Mt("crypto")}G.getCrypto=hc;function gc(){return Qt("localStorage")}G.getLocalStorageOrThrow=gc;function bc(){return Mt("localStorage")}G.getLocalStorage=bc});var _a=lt(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.getWindowMetadata=void 0;var xa=mn();function yc(){let e,t;try{e=xa.getDocumentOrThrow(),t=xa.getLocationOrThrow()}catch{return null}function o(){let m=e.getElementsByTagName("link"),p=[];for(let b=0;b<m.length;b++){let y=m[b],d=y.getAttribute("rel");if(d&&d.toLowerCase().indexOf("icon")>-1){let v=y.getAttribute("href");if(v)if(v.toLowerCase().indexOf("https:")===-1&&v.toLowerCase().indexOf("http:")===-1&&v.indexOf("//")!==0){let C=t.protocol+"//"+t.host;if(v.indexOf("/")===0)C+=v;else{let T=t.pathname.split("/");T.pop(),C+=T.join("/")+"/"+v}p.push(C)}else if(v.indexOf("//")===0){let C=t.protocol+v;p.push(C)}else p.push(v)}}return p}function r(...m){let p=e.getElementsByTagName("meta");for(let b=0;b<p.length;b++){let y=p[b],d=["itemprop","property","name"].map(v=>y.getAttribute(v)).filter(v=>v?m.includes(v):!1);if(d.length&&d){let v=y.getAttribute("content");if(v)return v}}return""}function n(){let m=r("name","og:site_name","og:title","twitter:title");return m||(m=e.title),m}function i(){return r("description","og:description","twitter:description","keywords")}let a=n(),s=i(),l=t.origin,c=o();return{description:s,url:l,icons:c,name:a}}ir.getWindowMetadata=yc});var Oa={};tn(Oa,{BotInfo:()=>Ta,BrowserInfo:()=>Sa,NodeInfo:()=>ka,ReactNativeInfo:()=>Wa,SearchBotDeviceInfo:()=>Aa,browserName:()=>_c,detect:()=>xc,detectOS:()=>Ia,getNodeVersion:()=>Ma,parseUserAgent:()=>hn});function xc(e){return e?hn(e):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Wa:typeof navigator<"u"?hn(navigator.userAgent):Ma()}function Ra(e){return e!==""&&Ec.reduce(function(t,o){var r=o[0],n=o[1];if(t)return t;var i=n.exec(e);return!!i&&[r,i]},!1)}function _c(e){var t=Ra(e);return t?t[0]:null}function hn(e){var t=Ra(e);if(!t)return null;var o=t[0],r=t[1];if(o==="searchbot")return new Ta;var n=r[1]&&r[1].split(/[._]/).slice(0,3);n?n.length<La&&(n=vc(n,Lc(La-n.length))):n=[];var i=n.join("."),a=Ia(e),s=Cc.exec(e);return s&&s[1]?new Aa(o,i,a,s[1]):new Sa(o,i,a)}function Ia(e){for(var t=0,o=Pa.length;t<o;t++){var r=Pa[t],n=r[0],i=r[1],a=i.exec(e);if(a)return n}return null}function Ma(){var e=typeof process<"u"&&process.version;return e?new ka(process.version.slice(1)):null}function Lc(e){for(var t=[],o=0;o<e;o++)t.push("0");return t}var vc,Sa,ka,Aa,Ta,Wa,wc,Cc,La,Ec,Pa,Na=ui(()=>{vc=function(){for(var e=0,t=0,o=arguments.length;t<o;t++)e+=arguments[t].length;for(var r=Array(e),n=0,t=0;t<o;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,n++)r[n]=i[a];return r},Sa=function(){function e(t,o,r){this.name=t,this.version=o,this.os=r,this.type="browser"}return e}(),ka=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=process.platform}return e}(),Aa=function(){function e(t,o,r,n){this.name=t,this.version=o,this.os=r,this.bot=n,this.type="bot-device"}return e}(),Ta=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),Wa=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),wc=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,Cc=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,La=3,Ec=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",wc]],Pa=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]]});var bn=lt(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.getClientMeta=S.getLocalStorage=S.getLocalStorageOrThrow=S.getCrypto=S.getCryptoOrThrow=S.getLocation=S.getLocationOrThrow=S.getNavigator=S.getNavigatorOrThrow=S.getDocument=S.getDocumentOrThrow=S.getFromWindowOrThrow=S.getFromWindow=S.isBrowser=S.isNode=S.isMobile=S.isIOS=S.isAndroid=S.detectOS=S.detectEnv=void 0;var Da=nr(),Pc=Da.__importStar(_a()),He=Da.__importStar(mn()),Sc=(Na(),on(Oa));function gn(e){return(0,Sc.detect)(e)}S.detectEnv=gn;function ar(){let e=gn();return e&&e.os?e.os:void 0}S.detectOS=ar;function Ua(){let e=ar();return e?e.toLowerCase().includes("android"):!1}S.isAndroid=Ua;function Ba(){let e=ar();return e?e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}S.isIOS=Ba;function kc(){return ar()?Ua()||Ba():!1}S.isMobile=kc;function Fa(){let e=gn();return e&&e.name?e.name.toLowerCase()==="node":!1}S.isNode=Fa;function Ac(){return!Fa()&&!!(0,S.getNavigator)()}S.isBrowser=Ac;S.getFromWindow=He.getFromWindow;S.getFromWindowOrThrow=He.getFromWindowOrThrow;S.getDocumentOrThrow=He.getDocumentOrThrow;S.getDocument=He.getDocument;S.getNavigatorOrThrow=He.getNavigatorOrThrow;S.getNavigator=He.getNavigator;S.getLocationOrThrow=He.getLocationOrThrow;S.getLocation=He.getLocation;S.getCryptoOrThrow=He.getCryptoOrThrow;S.getCrypto=He.getCrypto;S.getLocalStorageOrThrow=He.getLocalStorageOrThrow;S.getLocalStorage=He.getLocalStorage;function Tc(){return Pc.getWindowMetadata()}S.getClientMeta=Tc});var Ga={};tn(Ga,{safeJsonParse:()=>Wc,safeJsonStringify:()=>Rc});function Wc(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}function Rc(e){return typeof e=="string"?e:JSON.stringify(e)}var Ha=ui(()=>{});var yn=lt(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.safeJsonStringify=eo.safeJsonParse=void 0;var Ic=nr(),Va=Ic.__importStar((Ha(),on(Ga)));eo.safeJsonParse=Va.safeJsonParse;eo.safeJsonStringify=Va.safeJsonStringify});var wn=lt(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.removeLocal=yt.getLocal=yt.setLocal=void 0;var ja=yn(),vn=bn();function Mc(e,t){let o=(0,ja.safeJsonStringify)(t),r=(0,vn.getLocalStorage)();r&&r.setItem(e,o)}yt.setLocal=Mc;function Oc(e){let t=null,o=null,r=(0,vn.getLocalStorage)();return r&&(o=r.getItem(e)),t=o&&(0,ja.safeJsonParse)(o),t}yt.getLocal=Oc;function Nc(e){let t=(0,vn.getLocalStorage)();t&&t.removeItem(e)}yt.removeLocal=Nc});var za=lt(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.getMobileLinkRegistry=Ee.getMobileRegistryEntry=Ee.saveMobileLinkInfo=Ee.formatIOSMobile=Ee.mobileLinkChoiceKey=void 0;var Dc=wn();Ee.mobileLinkChoiceKey="WALLETCONNECT_DEEPLINK_CHOICE";function Uc(e,t){let o=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${o}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${o}`:""}Ee.formatIOSMobile=Uc;function Bc(e){let t=e.href.split("?")[0];(0,Dc.setLocal)(Ee.mobileLinkChoiceKey,Object.assign(Object.assign({},e),{href:t}))}Ee.saveMobileLinkInfo=Bc;function $a(e,t){return e.filter(o=>o.name.toLowerCase().includes(t.toLowerCase()))[0]}Ee.getMobileRegistryEntry=$a;function Fc(e,t){let o=e;return t&&(o=t.map(r=>$a(e,r)).filter(Boolean)),o}Ee.getMobileLinkRegistry=Fc});var Ka=lt(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.formatMobileRegistry=et.formatMobileRegistryEntry=et.getDappRegistryUrl=et.getWalletRegistryUrl=void 0;var qa="https://registry.walletconnect.com";function Gc(){return qa+"/api/v2/wallets"}et.getWalletRegistryUrl=Gc;function Hc(){return qa+"/api/v2/dapps"}et.getDappRegistryUrl=Hc;function Za(e,t="mobile"){var o;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:(o=e.image_url.sm)!==null&&o!==void 0?o:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}et.formatMobileRegistryEntry=Za;function Vc(e,t="mobile"){return Object.values(e).filter(o=>!!o[t].universal||!!o[t].native).map(o=>Za(o,t))}et.formatMobileRegistry=Vc});var Ja=lt(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});var Po=nr();Po.__exportStar(bn(),Ot);Po.__exportStar(yn(),Ot);Po.__exportStar(wn(),Ot);Po.__exportStar(za(),Ot);Po.__exportStar(Ka(),Ot)});var pp={};tn(pp,{AsExternalProvider:()=>bt,ConnectorManager:()=>to,PrivyClient:()=>ro,PrivyProvider:()=>jl,PrivyProxyProvider:()=>Ue,VERSION:()=>Vo,WalletConnector:()=>Be,getAccessToken:()=>Vl,usePrivy:()=>N});module.exports=on(pp);var Hl=require("@ethersproject/providers"),te=require("react");var _=()=>{throw new Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};var mi=P(require("axios")),qe=class extends Error{constructor(o,r){super(o);r instanceof Error&&(this.cause=r)}toString(){return`${this.type}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}},jt=class extends qe{constructor(o,r,n,i){super(n,i);this.type=o;this.status=r}},x=class extends qe{constructor(o,r){super(o,r);this.type="client_error"}};var q=class extends qe{constructor(o,r){super(o,r);this.type="connector_error"}},re=e=>{if(e instanceof qe)return e;if(!mi.default.isAxiosError(e))return Me(e);if(!e.response)return new jt("api_error",null,e.message,e);let{type:t,message:o,error:r}=e.response.data;return new jt(t||"ApiError",e.response.status,o||r,e)},Me=e=>e instanceof qe?e:e instanceof Error?new x(e.message,e):new x(`Internal error: ${e}`);var hi=()=>"/api/v1/sessions",gi=()=>"/api/v1/sessions/logout",bi=()=>"/api/v1/sessions/fork",yi=()=>"/api/v1/sessions/fork/recover",vi=()=>"/api/v1/siwe/init",wi=()=>"/api/v1/siwe/authenticate",Ci=()=>"/api/v1/siwe/link",Ei=()=>"/api/v1/passwordless/init",xi=()=>"/api/v1/passwordless/authenticate",_i=()=>"/api/v1/passwordless/link",Li=()=>"/api/v1/passwordless_sms/init",Pi=()=>"/api/v1/passwordless_sms/authenticate",Si=()=>"/api/v1/passwordless_sms/link",ki=()=>"/api/v1/oauth/init",Ai=()=>"/api/v1/oauth/authenticate",Ti=()=>"/api/v1/oauth/link",Wi=()=>"/api/v1/siwe/unlink",Ri=()=>"/api/v1/passwordless/unlink",Ii=()=>"/api/v1/passwordless_sms/unlink",Mi=()=>"/api/v1/oauth/unlink";var Eo=class{constructor(t){this.meta={email:t}}async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new x("Email and email code must be set prior to calling authenticate.");try{let t=xi(),o=await this.api.post(t,{email:this.meta.email,code:this.meta.emailCode});return{user:o.data.user,token:o.data.token,refresh_token:o.data.refresh_token,is_new_user:o.data.is_new_user}}catch(t){throw re(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new x("Email and email code must be set prior to calling authenticate.");try{let t=_i();return(await this.api.post(t,{email:this.meta.email,code:this.meta.emailCode})).data}catch(t){throw re(t)}}async sendCodeEmail(t){if(!this.api)throw new x("Auth flow has no API instance");if(t&&(this.meta.email=t),!this.meta.email)throw new x("Email must be set when initialzing authentication.");try{let o=Ei();return(await this.api.post(o,{email:this.meta.email})).data}catch(o){throw re(o)}}};var $t=class{constructor(t,o,r){this.meta={provider:t},this.meta.authorizationCode=o,this.meta.stateCode=r}isActive(){return!!(this.meta.authorizationCode&&this.meta.stateCode&&this.meta.provider)}async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new x("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenticate.");if(this.meta.authorizationCode==="undefined")throw new x("User denied confirmation during OAuth flow");try{let t=Ai(),o=await this.api.post(t,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode});return{user:o.data.user,token:o.data.token,refresh_token:o.data.refresh_token,is_new_user:o.data.is_new_user}}catch(t){throw re(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new x("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling link.");if(this.meta.authorizationCode==="undefined")throw new x("User denied confirmation during OAuth flow");try{let t=Ti();return(await this.api.post(t,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode})).data}catch(t){throw re(t)}}async getAuthorizationUrl(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.provider)throw new x("Provider must be set when initialzing OAuth authentication.");try{let t=ki();return(await this.api.post(t,{provider:this.meta.provider,redirect_to:window.location.href})).data}catch(t){throw re(t)}}};var zt=class{constructor(t,o,r){this._meta={walletType:o,walletId:r},this.connectors=t,this.walletConnector=this.connectors.createWalletConnector(o,null,r)}get meta(){return{...this._meta,walletName:this.walletConnector.walletBranding.name,walletIcon:this.walletConnector.walletBranding.icon}}async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");try{let{message:t,signature:o}=await this.sign(),r=await this.api.post(wi(),{message:t,signature:o});return this.connectors.addWalletConnector(this.walletConnector),await this.connectors.setActiveWallet(this.walletConnector.address)||console.warn("Failed to set active wallet"),{user:r.data.user,token:r.data.token,refresh_token:r.data.refresh_token,is_new_user:r.data.is_new_user}}catch(t){throw re(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");try{let{message:t,signature:o}=await this.sign(),r=await this.api.post(Ci(),{message:t,signature:o});return this.connectors.addWalletConnector(this.walletConnector),await this.connectors.setActiveWallet(this.walletConnector.address)||console.warn("Failed to set active wallet"),r.data}catch(t){throw re(t)}}async promptConnect(){if(!this.api)throw new x("Auth flow has no API instance");let t=await this.walletConnector.connect({showPrompt:!0});return await this.buildSiweMessage(t),t}async sign(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.preparedMessage){let o=await this.walletConnector.connect({showPrompt:!1});await this.buildSiweMessage(o)}if(!this.preparedMessage)throw new x("Could not prepare SIWE message");let t=await this.walletConnector.sign(this.preparedMessage);return{message:this.preparedMessage,signature:t}}async buildSiweMessage(t){if(!this.api)throw new x("Auth flow has no API instance");let o=t.address,r=t.chainId,n=await this.api.post(vi(),{address:o});return this.preparedMessage=this.walletConnector.prepareMessage(r,o,n.data.nonce),this.preparedMessage}};var xo=class{constructor(t){this.meta={phoneNumber:t}}async authenticate(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.phoneNumber||!this.meta.smsCode)throw new x("phone number and sms code must be set prior to calling authenticate.");try{let t=Pi(),o=await this.api.post(t,{phoneNumber:this.meta.phoneNumber,code:this.meta.smsCode});return{user:o.data.user,token:o.data.token,refresh_token:o.data.refresh_token,is_new_user:o.data.is_new_user}}catch(t){throw re(t)}}async link(){if(!this.api)throw new x("Auth flow has no API instance");if(!this.meta.phoneNumber||!this.meta.smsCode)throw new x("phone number and sms code must be set prior to calling authenticate.");try{let t=Si();return(await this.api.post(t,{phoneNumber:this.meta.phoneNumber,code:this.meta.smsCode})).data}catch(t){throw re(t)}}async sendSmsCode(t){if(!this.api)throw new x("Auth flow has no API instance");if(t&&(this.meta.phoneNumber=t),!this.meta.phoneNumber)throw new x("phone nNumber must be set when initialzing authentication.");try{let o=Li();return(await this.api.post(o,{phoneNumber:this.meta.phoneNumber})).data}catch(o){throw re(o)}}};var rs=require("@ethersproject/address");var Oi="1.21.0-beta.5";var Ni="https://api.privy.io/v0",Go=process.env.NEXT_PUBLIC_PRIVY_AUTH_URL||"https://auth.privy.io",Ho="4df5e2316331463a9130964bd6078dfa",Di=1e4,Oe=1400,Vo=Oi;var qt="privy:token",jo="privy:refresh_token",_o="privy:session_transfer_token",$o="privy:connectors",rn="walletconnect",Ui=3e4;var nn=class{constructor(){this._cache={}}get(t){return this._cache[t]}put(t,o){o!==void 0?this._cache[t]=o:this.del(t)}del(t){delete this._cache[t]}getKeys(){return Object.keys(this._cache)}},an=class{get(t){let o=localStorage.getItem(t);return o===null?void 0:JSON.parse(o)}put(t,o){o!==void 0?localStorage.setItem(t,JSON.stringify(o)):this.del(t)}del(t){localStorage.removeItem(t)}getKeys(){return Object.entries(localStorage).map(([t])=>t)}};function tc(){return typeof window<"u"&&window.localStorage?new an:new nn}var Z=tc();var Hi=P(require("@coinbase/wallet-sdk")),Vi=require("@ethersproject/address");var Lo=require("react/jsx-runtime"),Ne=({style:e,...t})=>(0,Lo.jsxs)("svg",{width:"1024",height:"1024",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...e},...t,children:[(0,Lo.jsx)("rect",{width:"1024",height:"1024",fill:"#0052FF",rx:100,ry:100}),(0,Lo.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"})]});var Fi=require("@ethersproject/address"),Gi=require("@ethersproject/providers");var Bi=require("@ethersproject/logger");var Zt=class extends q{constructor(){super("Wallet timeout");this.type="wallet_error"}},Wt=class extends q{constructor(){super("User rejected connection");this.type="wallet_error"}},De=e=>{if(e instanceof q)return e;if((e==null?void 0:e.code)&&(e==null?void 0:e.reason)){let t=new Kt(e);return e.code===Bi.ErrorCode.ACTION_REJECTED&&(t.details=Tt.E4001_USER_REJECTED_REQUEST),t}return e!=null&&e.code?new Kt(e):new q("Unknown connector error",e)},sn=class extends qe{constructor(o,r,n){super(o);this.type="provider_error";this.code=r,this.data=n}},Kt=class extends sn{constructor(o){var i,a,s;let r=o;super(r.message,r.code,r.data);let n=Object.values(Tt).find(l=>l.eipCode===r.code);this.details=n||Tt.UNKNOWN_ERROR,r.code===-32002&&((i=r.message)!=null&&i.includes("already pending for origin")?(a=r.message)!=null&&a.includes("wallet_requestPermissions")?this.details=Tt.E32002_CONNECTION_ALREADY_PENDING:this.details=Tt.E32002_REQUEST_ALREADY_PENDING:(s=r.message)!=null&&s.includes("Already processing")&&r.message.includes("eth_requestAccounts")&&(this.details=Tt.E32002_WALLET_LOCKED))}},oc={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Wallet request timed out",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_USER_REJECTED_CONNECTION:{message:"You rejected the request",detail:"Please try connecting again.",retryable:!0}},rc={E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}},nc={E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1}},Tt={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},...nc,...rc},Rt={...oc,...Tt};var ic=12e4,ln=(e=new Zt,t=ic)=>new Promise((o,r)=>setTimeout(()=>{r(e)},t)),Ue=class{constructor(t){this.removeListener=(t,o)=>{if(this.walletProvider)return this.walletProvider.removeListener(t,o)};this.setWalletProvider=t=>{this.walletProvider=t,this._subscriptions.forEach(o=>{var r;(r=this.walletProvider)==null||r.on(o.eventName,o.listener)})};this.walletProvider=t,this._subscriptions=[]}on(t,o){if(this.walletProvider)return this.walletProvider.on(t,o);this._subscriptions.push({eventName:t,listener:o})}async request(t){if(!this.walletProvider)throw new q(`A wallet request of type ${t.method} was made before setting a wallet provider.`);return Promise.race([this.walletProvider.request(t),ln()]).catch(o=>{throw De(o)})}},bt=class extends Ue{constructor(o){super(o)}},zo=class extends Ue{constructor(t){super(t)}sendAsync(t,o){throw new Error("sendAsync is no longer supported by EIP-1193. Use the request method instead.")}};var Be=class{constructor(t,o,r){this.createSiweMessage=(t,o,r,n,i,a,s)=>`${r} wants you to sign in with your Ethereum account:
2
2
  ${o}
3
3
 
4
4
  ${s}
@@ -206,7 +206,7 @@ Resources:
206
206
  display: flex;
207
207
  align-items: center;
208
208
  justify-content: space-between;
209
- margin-bottom: 24px;
209
+ margin-bottom: 30px;
210
210
 
211
211
  h2 {
212
212
  font-size: 16px;
@@ -257,6 +257,7 @@ Resources:
257
257
  /* Mobile */
258
258
  @media (max-width: 440px) {
259
259
  height: 30px;
260
+ margin-bottom: 10px;
260
261
  }
261
262
  `;var Rn=require("react/jsx-runtime"),hs=({style:e,...t})=>(0,Rn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...e},...t,children:(0,Rn.jsx)("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 00-5.25 5.25v3a3 3 0 00-3 3v6.75a3 3 0 003 3h10.5a3 3 0 003-3v-6.75a3 3 0 00-3-3v-3c0-2.9-2.35-5.25-5.25-5.25zm3.75 8.25v-3a3.75 3.75 0 10-7.5 0v3h7.5z",clipRule:"evenodd"})});var X=require("react/jsx-runtime"),gs=()=>{let{navigate:e,app:t}=E(),o=(t==null?void 0:t.allowlistConfig.errorTitle)||"You don't have access to this app",r=(t==null?void 0:t.allowlistConfig.errorDetail)||"Have you been invited?",n=(t==null?void 0:t.allowlistConfig.errorCtaText)||"Try another account";return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(L,{}),(0,X.jsxs)(Qc,{children:[(0,X.jsx)(td,{children:(0,X.jsxs)("div",{children:[(0,X.jsx)(ps,{}),(0,X.jsx)(hs,{style:{width:"38px",height:"38px",strokeWidth:"1",stroke:"var(--privy-color-accent)",fill:"var(--privy-color-accent)"}})]})}),(0,X.jsxs)(ed,{children:[typeof o=="string"?(0,X.jsx)("h3",{children:o}):(0,X.jsx)(X.Fragment,{children:o}),typeof r=="string"?(0,X.jsx)("p",{children:r}):(0,X.jsx)(X.Fragment,{children:r})]}),t!=null&&t.allowlistConfig.errorCtaLink?(0,X.jsx)(ye,{as:"a",href:t.allowlistConfig.errorCtaLink,children:n}):(0,X.jsx)(ye,{onClick:()=>{e("LANDING")},children:n})]})]})},Qc=wr.default.div`
262
263
  display: flex;
@@ -311,7 +312,7 @@ Resources:
311
312
  `;var On=P(require("styled-components"));var Mn=require("react/jsx-runtime"),Cr=({style:e,...t})=>(0,Mn.jsx)("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"1.25rem",width:"1.25rem",...e},...t,children:(0,Mn.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99555 0.929932C-1.12055 1.31799 -0.499722 9.15734 2.17445 8.76915C0.0807959 10.5544 -0.960455 16.6416 6.01654 16.0265C10.6356 15.9489 15.5635 12.2232 15.5635 8.1095C15.5635 2.63748 10.7516 0.929932 7.99555 0.929932ZM9.47052 7.53055C9.47052 8.49933 8.81856 9.28468 8.01433 9.28468C7.2101 9.28468 6.55814 8.49933 6.55814 7.53055C6.55814 6.56176 7.2101 5.77641 8.01433 5.77641C8.81856 5.77641 9.47052 6.56176 9.47052 7.53055ZM12.3171 9.28468C13.1213 9.28468 13.7733 8.49933 13.7733 7.53055C13.7733 6.56176 13.1213 5.77641 12.3171 5.77641C11.5129 5.77641 10.8609 6.56176 10.8609 7.53055C10.8609 8.49933 11.5129 9.28468 12.3171 9.28468Z",fill:t.color||"var(--privy-color-foreground-3)"})});var je=require("react/jsx-runtime"),od=On.default.div`
312
313
  margin-top: 16px;
313
314
  font-size: 12px;
314
- text-align: left;
315
+ text-align: center;
315
316
  color: var(--privy-color-foreground-3);
316
317
 
317
318
  && > a {
@@ -324,7 +325,7 @@ Resources:
324
325
  flex-grow: 1;
325
326
  align-items: flex-end;
326
327
  justify-content: center;
327
- margin-top: 24px;
328
+ margin-top: 10px;
328
329
 
329
330
  > :first-child {
330
331
  margin-right: 6px;
@@ -1069,7 +1070,7 @@ Resources:
1069
1070
  `,m1=Ke.default.div`
1070
1071
  display: flex;
1071
1072
  justify-content: center;
1072
- `;var nt=require("react/jsx-runtime"),al=()=>{let{navigateBack:e}=E();return(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(L,{backFn:e},"header"),(0,nt.jsx)(qn,{}),(0,nt.jsxs)(xe,{children:[(0,nt.jsx)("span",{children:"Still not sure? "}),(0,nt.jsx)("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})};var it=require("react/jsx-runtime"),sl=()=>{let{navigateBack:e}=E();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(L,{backFn:e},"header"),(0,it.jsx)($n,{}),(0,it.jsxs)(xe,{children:[(0,it.jsx)("span",{children:"Still not sure? "}),(0,it.jsx)("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})};var at=require("react/jsx-runtime"),ll=()=>{let{navigateBack:e}=E();return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(L,{backFn:e},"header"),(0,at.jsx)(zn,{}),(0,at.jsxs)(xe,{children:[(0,at.jsx)("span",{children:"Still not sure? "}),(0,at.jsx)("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})};var hl=require("react"),ni=require("react-device-detect"),Ft=P(require("styled-components"));var Jn=require("react/jsx-runtime"),cl=()=>{var t;let{app:e}=E();return(t=e==null?void 0:e.appearance)!=null&&t.logo?(0,Jn.jsx)("div",{children:(0,Jn.jsx)("img",{src:e.appearance.logo,alt:`${e==null?void 0:e.name} logo`,style:{objectFit:"contain",width:"200px",height:"80px"}})}):null};var ho=require("react"),Ro=P(require("styled-components"));var Yn=require("react/jsx-runtime"),Mr=({style:e,...t})=>(0,Yn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...e},...t,children:(0,Yn.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})});var Se=require("react/jsx-runtime"),Or=e=>{let[t,o]=(0,ho.useState)(""),[r,n]=(0,ho.useState)(!1),[i,a]=(0,ho.useState)(null),{isLinking:s,initLoginWithEmail:l}=k(),{navigate:c,options:h}=E(),m=h.wallet;(0,ho.useEffect)(()=>{let d=document.querySelector("#email-input");d==null||d.focus()},[]);let p=$i(t),b=()=>{n(!0),l(t).then(()=>{c("AWAITING_PASSWORDLESS_CODE")}).catch(d=>{let v=(d==null?void 0:d.status)===401&&(d==null?void 0:d.message)==="User is not allowed to login to this app.";(d==null?void 0:d.status)===422?a(d.message):v?c("ALLOWLIST_REJECTION_SCREEN"):a("Issue submitting email"),n(!1)})},y="Get started without a wallet.";return i?y=i:s?y="Easily connect an email":m||(y="Get started quickly with email"),(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsxs)(h1,{stacked:e.stacked,children:[(0,Se.jsxs)(b1,{standalone:e.stacked,children:[(0,Se.jsx)(Mr,{}),(0,Se.jsx)("input",{id:"email-input",type:"email",placeholder:"your@email.com",onChange:d=>o(d.target.value),onKeyUp:d=>{d.key==="Enter"&&b()},value:t,autoComplete:"email"})]}),e.stacked?null:(0,Se.jsx)(g1,{disabled:r||!p,onClick:b,children:r?(0,Se.jsx)(Et,{}):"Submit"})]}),(0,Se.jsx)(y1,{fail:!!i,children:y}),e.stacked?(0,Se.jsx)(ie,{loading:r,loadingText:null,disabled:r||!p,onClick:b,children:"Submit"}):null]})},h1=Ro.default.div`
1073
+ `;var nt=require("react/jsx-runtime"),al=()=>{let{navigateBack:e}=E();return(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(L,{backFn:e},"header"),(0,nt.jsx)(qn,{}),(0,nt.jsxs)(xe,{children:[(0,nt.jsx)("span",{children:"Still not sure? "}),(0,nt.jsx)("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})};var it=require("react/jsx-runtime"),sl=()=>{let{navigateBack:e}=E();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(L,{backFn:e},"header"),(0,it.jsx)($n,{}),(0,it.jsxs)(xe,{children:[(0,it.jsx)("span",{children:"Still not sure? "}),(0,it.jsx)("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})};var at=require("react/jsx-runtime"),ll=()=>{let{navigateBack:e}=E();return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(L,{backFn:e},"header"),(0,at.jsx)(zn,{}),(0,at.jsxs)(xe,{children:[(0,at.jsx)("span",{children:"Still not sure? "}),(0,at.jsx)("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})};var hl=require("react"),ni=require("react-device-detect"),Ft=P(require("styled-components"));var Jn=require("react/jsx-runtime"),cl=()=>{var t;let{app:e}=E();return(t=e==null?void 0:e.appearance)!=null&&t.logo?(0,Jn.jsx)("div",{children:(0,Jn.jsx)("img",{src:e.appearance.logo,alt:`${e==null?void 0:e.name} logo`,style:{objectFit:"contain",width:"180px",height:"60px"}})}):null};var ho=require("react"),Ro=P(require("styled-components"));var Yn=require("react/jsx-runtime"),Mr=({style:e,...t})=>(0,Yn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...e},...t,children:(0,Yn.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})});var Se=require("react/jsx-runtime"),Or=e=>{let[t,o]=(0,ho.useState)(""),[r,n]=(0,ho.useState)(!1),[i,a]=(0,ho.useState)(null),{isLinking:s,initLoginWithEmail:l}=k(),{navigate:c,options:h}=E(),m=h.wallet;(0,ho.useEffect)(()=>{let d=document.querySelector("#email-input");d==null||d.focus()},[]);let p=$i(t),b=()=>{n(!0),l(t).then(()=>{c("AWAITING_PASSWORDLESS_CODE")}).catch(d=>{let v=(d==null?void 0:d.status)===401&&(d==null?void 0:d.message)==="User is not allowed to login to this app.";(d==null?void 0:d.status)===422?a(d.message):v?c("ALLOWLIST_REJECTION_SCREEN"):a("Issue submitting email"),n(!1)})},y="Get started without a wallet.";return i?y=i:s?y="Easily connect an email":m||(y="Get started quickly with email"),(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsxs)(h1,{stacked:e.stacked,children:[(0,Se.jsxs)(b1,{standalone:e.stacked,children:[(0,Se.jsx)(Mr,{}),(0,Se.jsx)("input",{id:"email-input",type:"email",placeholder:"your@email.com",onChange:d=>o(d.target.value),onKeyUp:d=>{d.key==="Enter"&&b()},value:t,autoComplete:"email"})]}),e.stacked?null:(0,Se.jsx)(g1,{disabled:r||!p,onClick:b,children:r?(0,Se.jsx)(Et,{}):"Submit"})]}),(0,Se.jsx)(y1,{fail:!!i,children:y}),e.stacked?(0,Se.jsx)(ie,{loading:r,loadingText:null,disabled:r||!p,onClick:b,children:"Submit"}):null]})},h1=Ro.default.div`
1073
1074
  width: 100%;
1074
1075
  height: ${e=>e.stacked?"100%":"auto"};
1075
1076
 
@@ -1369,6 +1370,12 @@ Resources:
1369
1370
  :hover > :last-child {
1370
1371
  opacity: 1;
1371
1372
  }
1373
+
1374
+ @media (max-width: 440px) {
1375
+ > :last-child {
1376
+ display: none;
1377
+ }
1378
+ }
1372
1379
  `;var fl=P(require("styled-components"));var Mo=require("react/jsx-runtime"),Vr=()=>{let{navigate:e}=E();return(0,Mo.jsxs)(A1,{children:[(0,Mo.jsx)("span",{children:"Don\u2019t have a wallet? "}),(0,Mo.jsx)("button",{onClick:()=>{e("WALLET_EDUCATION")},children:"Create one now."})]})},A1=fl.default.div`
1373
1380
  font-size: 13px;
1374
1381
  color: var(--privy-color-foreground-3);
@@ -1444,7 +1451,7 @@ Resources:
1444
1451
  // Lastly, apply a 10px cheat upwards, which helps in particular for when
1445
1452
  // the logo is close to the top (mobile or full wallet-open design)
1446
1453
  margin-top: ${e=>`${(e.hasOnlyOneSection?31:0)-(e.hasTerms?18:0)}px`};
1447
- margin-bottom: ${e=>`${10+(e.hasOnlyOneSection?31:0)-(e.hasTerms?18:0)}px`};
1454
+ margin-bottom: ${e=>`${15+(e.hasOnlyOneSection?31:0)-(e.hasTerms?18:0)}px`};
1448
1455
  `,O1=(0,Ft.default)(ve)`
1449
1456
  flex-direction: ${e=>e.reverse?"column-reverse":"column"};
1450
1457
  `;var Ye=require("react/jsx-runtime"),vl=()=>{let{app:e}=E();return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsx)(L,{},"header"),(0,Ye.jsx)(_t,{title:"Connect your email",description:`Add your email to your ${e==null?void 0:e.name} account`,icon:(0,Ye.jsx)(Mr,{})}),(0,Ye.jsx)(ve,{children:(0,Ye.jsx)(Or,{stacked:!0})}),(0,Ye.jsx)(D,{protectedByPrivy:!0})]})};var Xe=require("react/jsx-runtime"),wl=()=>{let{app:e}=E();return(0,Xe.jsxs)(Xe.Fragment,{children:[(0,Xe.jsx)(L,{},"header"),(0,Xe.jsx)(_t,{title:"Connect your phone",description:`Add your number to your ${e==null?void 0:e.name} account`,icon:(0,Xe.jsx)(Nr,{})}),(0,Xe.jsx)(ve,{children:(0,Xe.jsx)(Dr,{stacked:!0})}),(0,Xe.jsx)(D,{protectedByPrivy:!0})]})};var Qe=require("react/jsx-runtime"),Cl=()=>{let{linkingHint:e}=k(),{app:t}=E(),o=e?`Select the wallet with ${It(e)} and follow the instructions to reconnect your wallet${t!=null&&t.name?` to ${t.name}.`:"."}`:`Link a wallet to your ${t==null?void 0:t.name} account`;return(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(L,{},"header"),(0,Qe.jsx)(xt,{title:`${e?"Reconnect":"Connect"} your wallet`,description:o}),(0,Qe.jsxs)(ve,{children:[(0,Qe.jsx)(Hr,{}),(0,Qe.jsx)(Vr,{})]}),(0,Qe.jsx)(D,{protectedByPrivy:!0})]})};var Oo=require("react/jsx-runtime"),El=({style:e,...t})=>(0,Oo.jsxs)("svg",{width:"164",height:"164",viewBox:"0 0 164 164",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"26px",width:"26px",...e},...t,children:[(0,Oo.jsx)("circle",{cx:"82",cy:"82",r:"80",stroke:"#EC6351","stroke-width":"4","stroke-linecap":"round"}),(0,Oo.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M81.9999 100.788C93.3288 100.788 102.513 91.6043 102.513 80.2754C102.513 68.9465 93.3288 59.7626 81.9999 59.7626C70.671 59.7626 61.4871 68.9465 61.4871 80.2754C61.4871 91.6043 70.671 100.788 81.9999 100.788ZM88.3236 71.8304C88.9093 71.2446 89.8591 71.2446 90.4449 71.8304C91.0307 72.4161 91.0307 73.3659 90.4449 73.9517L84.121 80.2756L90.445 86.5996C91.0308 87.1854 91.0308 88.1351 90.445 88.7209C89.8592 89.3067 88.9095 89.3067 88.3237 88.7209L81.9997 82.3969L75.6756 88.7209C75.0899 89.3067 74.1401 89.3067 73.5543 88.7209C72.9685 88.1351 72.9685 87.1854 73.5543 86.5996L79.8783 80.2756L73.5544 73.9517C72.9686 73.3659 72.9686 72.4161 73.5544 71.8304C74.1402 71.2446 75.09 71.2446 75.6758 71.8304L81.9997 78.1543L88.3236 71.8304Z",fill:"#EC6351"})]});var ze=require("react/jsx-runtime"),xl=()=>{let{closePrivyModal:e}=k(),{navigate:t}=E();return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(L,{},"header"),(0,ze.jsx)(El,{style:{width:"160px",height:"160px",margin:"0 auto 20px"}}),(0,ze.jsx)(xt,{title:"Could not connect with wallet",description:"Please check that Phantom multichain is enabled and try again.",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center"}}),(0,ze.jsxs)(ve,{children:[(0,ze.jsx)(ie,{onClick:()=>t("LANDING"),children:"Try again"}),(0,ze.jsx)(ls,{onClick:()=>e(),children:"Cancel"})]}),(0,ze.jsx)(D,{protectedByPrivy:!0})]})};var yo=require("react"),jr=P(require("styled-components"));var he=require("react/jsx-runtime"),_l={google:{name:"Google",component:Fr},discord:{name:"Discord",component:Ur},github:{name:"Github",component:Br},twitter:{name:"Twitter",component:Gr}},N1=e=>e.charAt(0).toUpperCase()+e.slice(1),ii=()=>{let e=new URL(window.location.href);e.searchParams.delete("privy_oauth_code"),e.searchParams.delete("privy_oauth_provider"),e.searchParams.delete("privy_oauth_state"),window.history.pushState({},"",e)},Ll=()=>{var W;let{ready:e,user:t,authenticated:o}=N(),{data:r,setModalData:n,navigate:i}=E(),{getAuthMeta:a,initLoginWithOAuth:s,loginWithOAuth:l,closePrivyModal:c}=k(),[h,m]=(0,yo.useState)(!1),[p,b]=(0,yo.useState)(void 0),y=((W=a())==null?void 0:W.provider)||"google",d=_l[y].name,v=_l[y].component;(0,yo.useEffect)(()=>{!e||l().then(()=>{ii(),m(!0)}).catch(U=>{let B={retryable:!1,message:"Authentication failed."};U.message.includes("Another user has already linked this")?B.detail="This account has already been linked to another user.":U.message==="Invalid code during oauth flow."?(B.retryable=!0,B.detail="Something went wrong. Try again."):U.message==="User denied confirmation during OAuth flow"&&(B.detail=`Retry and check ${N1(y)} to finish connecting your account.`,B.retryable=!0),ii(),b(B)})},[e]),(0,yo.useEffect)(()=>{var oe;if(!(o&&h&&t))return;if(((oe=r==null?void 0:r.login)==null?void 0:oe.promptCreatePrivyWalletFlow)&&!t.wallet){let Te=setTimeout(()=>{n({createWallet:{onSuccess:()=>{},onFailure:Ce=>console.error(Ce),callAuthOnSuccessOnClose:!0}}),i("EMBEDDED_WALLET_SCREEN")},Oe-500);return()=>clearTimeout(Te)}else{let Te=setTimeout(c,Oe);return()=>clearTimeout(Te)}},[o,h,t]);let C=h?`Successfully connected with ${d}`:p?p.message:`Verifying connection to ${d}`,T="";return h?T="You\u2019re good to go!":p?T=p.detail:T="Just a few moments more",(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(L,{}),(0,he.jsxs)(D1,{children:[(0,he.jsx)(B1,{children:(0,he.jsxs)("div",{children:[(0,he.jsx)(yr,{success:h,fail:!!p}),(0,he.jsx)(v,{style:{width:"38px",height:"38px"},logoFill:"primary"})]})}),(0,he.jsxs)(U1,{children:[(0,he.jsx)("h3",{children:C}),(0,he.jsx)("p",{children:T})]}),(0,he.jsx)(ye,{onClick:()=>{ii(),s(y),b(void 0)},invisible:h||!(p!=null&&p.retryable),disabled:!h&&!(p!=null&&p.retryable),children:"Retry"})]})]})},D1=jr.default.div`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@privy-io/react-auth",
3
- "version": "1.21.0-beta.4",
3
+ "version": "1.21.0-beta.5",
4
4
  "description": "React client for the Privy Auth API",
5
5
  "keywords": [
6
6
  "authentication",