@privy-io/react-auth 3.0.0 → 3.0.1
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/cjs/{SignRequestScreen-cKtBaDI7.js → SignRequestScreen-CN1o6lNS.js} +3 -3
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/farcaster.js +1 -1
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/{internal-context-KhEoJA7w.js → internal-context-DNWjSiYq.js} +1 -1
- package/dist/cjs/{privy-context-CIEj0Pa8.js → privy-context-C4y2c3Ko.js} +1 -1
- package/dist/cjs/{smart-wallets-B822d9Kk.js → smart-wallets-y1iwNp9C.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/ui.js +2 -2
- package/dist/cjs/use-export-wallet-BCC4davd.js +2 -0
- package/dist/cjs/{use-sign-with-user-signer-ThMn4Vgi.js → use-sign-with-user-signer-Q0_LRVtz.js} +1 -1
- package/dist/cjs/{useActiveWallet-Cv3I_On0.js → useActiveWallet-B5PAGqSK.js} +1 -1
- package/dist/cjs/{usePrivy-B4cuW5Bf.js → usePrivy-D-rpmVV5.js} +1 -1
- package/dist/dts/extended-chains.d.mts +1 -1
- package/dist/dts/extended-chains.d.ts +1 -1
- package/dist/dts/farcaster.d.mts +1 -1
- package/dist/dts/farcaster.d.ts +1 -1
- package/dist/dts/index.d.mts +2 -2
- package/dist/dts/index.d.ts +2 -2
- package/dist/dts/smart-wallets.d.mts +1 -1
- package/dist/dts/smart-wallets.d.ts +1 -1
- package/dist/dts/solana.d.mts +2 -2
- package/dist/dts/solana.d.ts +2 -2
- package/dist/dts/{types-BQI70hRv.d.mts → types-D0jOlnAF.d.mts} +1 -0
- package/dist/dts/{types-BQI70hRv.d.ts → types-D0jOlnAF.d.ts} +1 -0
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/esm/{SignRequestScreen-C_hOFegy.mjs → SignRequestScreen-NOqdMm22.mjs} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/farcaster.mjs +1 -1
- package/dist/esm/index.mjs +6 -6
- package/dist/esm/{internal-context-B0qoKMVz.mjs → internal-context-LlMdpfkb.mjs} +1 -1
- package/dist/esm/{privy-context-DvKRpqkM.mjs → privy-context-V2csHgUI.mjs} +1 -1
- package/dist/esm/{smart-wallets-CAnrtQOj.mjs → smart-wallets-DXnL6fHN.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/ui.mjs +2 -2
- package/dist/esm/use-export-wallet-Duyde2UB.mjs +1 -0
- package/dist/esm/{use-sign-with-user-signer-Bwzp21df.mjs → use-sign-with-user-signer-DwqsbciW.mjs} +1 -1
- package/dist/esm/{useActiveWallet-CbqIRPmU.mjs → useActiveWallet-58s-VNmj.mjs} +1 -1
- package/dist/esm/{usePrivy-BVeHvDov.mjs → usePrivy-ZXeOLg-E.mjs} +1 -1
- package/package.json +4 -4
- package/dist/cjs/useFundWallet-F-byjhI0.js +0 -2
- package/dist/esm/useFundWallet-CkgUMUp9.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("@heroicons/react/24/outline/CheckCircleIcon"),n=require("react"),r=require("viem"),a=require("@privy-io/js-sdk-core"),i=require("@heroicons/react/24/outline/InformationCircleIcon"),o=require("styled-components"),s=require("./internal-context-KhEoJA7w.js"),l=require("@heroicons/react/24/outline/CreditCardIcon"),c=require("@heroicons/react/24/outline/QrCodeIcon"),d=require("@heroicons/react/24/solid/ArrowsRightLeftIcon"),u=require("viem/utils"),p=require("@heroicons/react/24/outline/ExclamationCircleIcon"),h=require("./paths-B00ZrFQm.js"),g=require("@heroicons/react/24/outline/WalletIcon"),m=require("@heroicons/react/24/outline/GlobeAltIcon"),y=require("@headlessui/react"),f=require("@heroicons/react/24/outline/ChevronDownIcon"),x=require("@heroicons/react/24/solid/CheckCircleIcon"),v=require("ofetch"),w=require("./privy-context-CIEj0Pa8.js"),C=require("@heroicons/react/24/outline"),b=require("@heroicons/react/24/outline/ClipboardDocumentCheckIcon"),j=require("@heroicons/react/24/outline/ClipboardDocumentIcon"),k=require("@privy-io/ethereum"),T=require("lucide-react"),A=require("@heroicons/react/24/outline/ExclamationTriangleIcon"),S=require("@scure/base"),E=require("tinycolor2"),I=require("@heroicons/react/24/outline/UserCircleIcon"),P=require("@heroicons/react/24/outline/ArrowLeftIcon");require("@heroicons/react/24/outline/ArrowRightIcon");var N=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),_=require("@heroicons/react/24/outline/XMarkIcon"),M=require("@heroicons/react/20/solid/CheckIcon"),F=require("@heroicons/react/24/outline/EnvelopeIcon"),L=require("@heroicons/react/24/outline/PhoneIcon"),W=require("react-device-detect"),D=require("@heroicons/react/24/outline/Square2StackIcon"),R=require("fast-password-entropy"),O=require("secure-password-utilities"),B=require("secure-password-utilities/wordlists"),U=require("@heroicons/react/24/outline/LockClosedIcon"),z=require("@heroicons/react/24/outline/PencilSquareIcon"),H=require("jose"),V=require("@heroicons/react/24/outline/ArrowPathIcon"),$=require("@heroicons/react/24/outline/EyeIcon"),q=require("@heroicons/react/24/outline/EyeSlashIcon"),G=require("@heroicons/react/24/outline/KeyIcon"),Y=require("@heroicons/react/24/outline/ArrowDownTrayIcon"),Z=require("@heroicons/react/24/outline/DocumentDuplicateIcon"),K=require("@heroicons/react/24/solid/XCircleIcon"),Q=require("@heroicons/react/24/outline/ShieldCheckIcon"),X=require("@tanstack/react-virtual"),J=require("@heroicons/react/24/outline/CheckIcon"),ee=require("qrcode"),te=require("eventemitter3"),ne=require("zustand"),re=require("@walletconnect/ethereum-provider"),ae=require("@heroicons/react/24/outline/FingerPrintIcon");function ie(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function oe(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var se=/*#__PURE__*/ie(t),le=/*#__PURE__*/ie(n),ce=/*#__PURE__*/ie(i),de=/*#__PURE__*/ie(l),ue=/*#__PURE__*/ie(c),pe=/*#__PURE__*/ie(d),he=/*#__PURE__*/ie(p),ge=/*#__PURE__*/ie(g),me=/*#__PURE__*/ie(m),ye=/*#__PURE__*/ie(f),fe=/*#__PURE__*/ie(x),xe=/*#__PURE__*/ie(b),ve=/*#__PURE__*/ie(j),we=/*#__PURE__*/ie(A),Ce=/*#__PURE__*/ie(E),be=/*#__PURE__*/ie(I),je=/*#__PURE__*/ie(P),ke=/*#__PURE__*/ie(N),Te=/*#__PURE__*/ie(_),Ae=/*#__PURE__*/ie(M),Se=/*#__PURE__*/ie(F),Ee=/*#__PURE__*/ie(L),Ie=/*#__PURE__*/oe(W),Pe=/*#__PURE__*/ie(D),Ne=/*#__PURE__*/ie(R),_e=/*#__PURE__*/oe(O),Me=/*#__PURE__*/ie(U),Fe=/*#__PURE__*/ie(z),Le=/*#__PURE__*/ie(V),We=/*#__PURE__*/ie($),De=/*#__PURE__*/ie(q),Re=/*#__PURE__*/ie(G),Oe=/*#__PURE__*/ie(Y),Be=/*#__PURE__*/ie(Z),Ue=/*#__PURE__*/ie(K),ze=/*#__PURE__*/ie(Q),He=/*#__PURE__*/ie(J),Ve=/*#__PURE__*/ie(ee),$e=/*#__PURE__*/ie(te),qe=/*#__PURE__*/ie(ae);class Ge{get(e){let t=localStorage.getItem(e);return null===t?void 0:JSON.parse(t)}put(e,t){void 0!==t?localStorage.setItem(e,JSON.stringify(t)):this.del(e)}del(e){localStorage.removeItem(e)}getKeys(){return Object.entries(localStorage).map((([e])=>e))}}var Ye="undefined"!=typeof window&&window.localStorage?new Ge:new class{get(e){return this._cache[e]}put(e,t){void 0!==t?this._cache[e]=t:this.del(e)}del(e){delete this._cache[e]}getKeys(){return Object.keys(this._cache)}constructor(){this._cache={}}};function Ze(e){return{name:e.metadata?.shortName||e.name||"",universalLink:e.mobile.universal,deepLink:e.mobile.native}}function Ke(e,t){let n=Ze(t);if(n.universalLink)return et(n.universalLink,e)}let Qe="WALLETCONNECT_DEEPLINK_CHOICE";function Xe(e){return e.startsWith("http://")||e.startsWith("https://")}function Je(e,t){if(Xe(e))return et(e,t);let n=e;return n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),{redirect:`${n}wc?uri=${encodeURIComponent(t)}`,href:n}}function et(e,t){if(!Xe(e))return Je(e,t);let n=e;return n.endsWith("/")||(n=`${n}/`),{redirect:`${n}wc?uri=${encodeURIComponent(t)}`,href:n}}function tt(e,t){window.open(e,t,"noreferrer noopener")}class nt{execute(e){return null===this.promise&&(this.promise=(async()=>{try{return await this.fn(e)}finally{this.promise=null}})()),this.promise}constructor(e){this.promise=null,this.fn=e}}const rt=1400,at=4e3,it="privy:state_code",ot="privy:code_verifier",st=e=>`privy:wallet:${e}`,lt="privy:connections",ct=12e4;function dt(e){return crypto.getRandomValues(new Uint8Array(e))}function ut(){return H.base64url.encode(dt(36))}function pt(){return ut()}async function ht(e,t="S256"){if("S256"!=t)return e;{let t=await async function(e){let t=(new TextEncoder).encode(e);return new Uint8Array(await crypto.subtle.digest("SHA-256",t))}(e);return H.base64url.encode(t)}}function gt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const mt=({style:t,...n})=>/*#__PURE__*/e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"24px",...t},...n,children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#040507"}),/*#__PURE__*/e.jsx("path",{d:"M17.2949 6.37537C18.0156 5.44684 19.4671 4.57877 20.4927 4.46512C20.8178 4.42885 20.8581 4.43127 20.9312 4.50139L20.9967 4.56426L20.9816 4.99225C20.9564 5.65963 20.8682 6.12873 20.6716 6.6341C20.4751 7.13705 20.1198 7.71738 19.8426 7.97852C19.7594 8.06074 19.6007 8.22516 19.4948 8.34848C19.0563 8.84901 18.439 9.20205 17.5973 9.4366C17.2823 9.52606 17.2596 9.52848 16.8917 9.52606C16.4482 9.52365 16.3852 9.51156 16.3524 9.43176C16.3398 9.39791 16.3272 9.18996 16.3222 8.9675L16.3171 8.56127L16.423 8.17922C16.6347 7.41512 16.8791 6.90733 17.2949 6.37537Z",fill:"white"}),/*#__PURE__*/e.jsx("path",{d:"M17.4512 10.2081C18.4163 9.84541 19.7595 9.48754 20.2584 9.46336C20.6616 9.4416 21.2966 9.49238 21.7225 9.57943C22.1383 9.66164 22.4357 9.76078 22.8666 9.96148C23.5571 10.2831 24.1442 10.7135 24.6104 11.2382C24.9582 11.6299 24.9783 11.6807 24.8397 11.8113C24.7944 11.8548 24.6885 11.9249 24.6054 11.9709C24.4542 12.0507 23.8368 12.5464 23.8368 12.5875C23.8368 12.5971 23.736 12.7108 23.6125 12.8341C23.2068 13.25 23.0279 13.5861 22.7683 14.4252C22.7078 14.6186 22.6448 14.8725 22.6272 14.9934C22.5566 15.4577 22.5919 16.125 22.7154 16.7344C22.7885 17.1044 23.0808 17.7306 23.3706 18.1489C23.7763 18.7317 24.3786 19.2491 24.9909 19.5514C25.316 19.7086 25.5 19.8464 25.5 19.9334C25.5 19.96 25.4773 20.0205 25.4521 20.064C25.4244 20.1075 25.3866 20.2164 25.3639 20.3034C25.311 20.521 25.001 21.244 24.807 21.5971C24.0862 22.9052 23.3731 23.8748 22.6095 24.5833C21.8611 25.2725 21.1606 25.582 20.4348 25.5385C19.9359 25.5094 19.4596 25.3934 18.7842 25.1322C18.2248 24.917 18.0081 24.8493 17.7939 24.8203C17.688 24.8058 17.4915 24.7768 17.3604 24.7574C16.9774 24.697 16.7254 24.6921 16.4533 24.7478C15.5461 24.9267 15.5133 24.9364 15.0144 25.1371C14.2231 25.4562 13.8073 25.5578 13.2907 25.5578C12.8875 25.5602 12.696 25.5143 12.2575 25.3087C11.8694 25.125 11.5948 24.9315 11.2546 24.5978C10.9295 24.2811 10.7052 24.0151 10.2642 23.4323C9.18818 22.0081 9.02187 21.7276 8.49519 20.4582C8.28612 19.9546 8.19971 19.7502 8.13026 19.5402C8.07498 19.373 8.03043 19.2023 7.94332 18.8744C7.73164 18.074 7.70896 17.9869 7.70896 17.8709C7.70896 17.8153 7.68628 17.675 7.66108 17.5565C7.44184 16.5917 7.44688 15.0007 7.67116 14.1713C7.82236 13.6127 8.02648 13.088 8.30367 12.5512C8.92863 11.3325 9.71738 10.5539 10.874 10.0123C11.2571 9.8309 11.5444 9.74627 12.0534 9.65922C12.2903 9.62054 12.5523 9.56976 12.6355 9.54799C12.8421 9.49238 13.3184 9.49963 13.6057 9.56008C14.2911 9.71 14.7548 9.84058 15.2059 10.0123C16.0551 10.3411 16.549 10.4789 16.7506 10.4475C16.7692 10.4444 16.7848 10.4418 16.8002 10.4387C16.8815 10.4225 16.9601 10.3929 17.4512 10.2081Z",fill:"white"})]}),yt=({style:t,...n})=>/*#__PURE__*/e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"24px",...t},...n,children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#5462EB"}),/*#__PURE__*/e.jsx("path",{d:"M23.5433 8.87438C22.2479 8.26174 20.8587 7.81038 19.4063 7.55187C19.3799 7.54688 19.3534 7.55934 19.3398 7.58428C19.1612 7.91179 18.9633 8.33905 18.8247 8.67487C17.2625 8.43382 15.7084 8.43382 14.1782 8.67487C14.0396 8.33158 13.8345 7.91179 13.6551 7.58428C13.6414 7.56018 13.615 7.54771 13.5886 7.55187C12.1369 7.80955 10.7478 8.26092 9.45159 8.87438C9.44037 8.87937 9.43075 8.88769 9.42437 8.89849C6.78947 12.9558 6.06766 16.9134 6.42176 20.8219C6.42336 20.841 6.43378 20.8593 6.4482 20.871C8.18663 22.1868 9.87059 22.9857 11.5233 23.5152C11.5497 23.5235 11.5778 23.5135 11.5946 23.491C11.9855 22.9408 12.334 22.3606 12.6328 21.7504C12.6505 21.7147 12.6336 21.6723 12.5976 21.6581C12.0448 21.442 11.5185 21.1785 11.0122 20.8793C10.9721 20.8552 10.9689 20.7961 11.0058 20.7679C11.1123 20.6856 11.2189 20.6 11.3206 20.5135C11.339 20.4977 11.3647 20.4944 11.3863 20.5044C14.7125 22.0696 18.3136 22.0696 21.6006 20.5044C21.6222 20.4936 21.6479 20.4969 21.6671 20.5127C21.7688 20.5991 21.8754 20.6856 21.9827 20.7679C22.0196 20.7961 22.0172 20.8552 21.9771 20.8793C21.4708 21.1843 20.9445 21.442 20.3909 21.6573C20.3548 21.6715 20.3388 21.7147 20.3564 21.7504C20.6617 22.3597 21.0101 22.9399 21.3939 23.4902C21.4099 23.5135 21.4387 23.5235 21.4652 23.5152C23.1259 22.9857 24.8099 22.1868 26.5483 20.871C26.5635 20.8593 26.5731 20.8419 26.5747 20.8228C26.9985 16.3041 25.8649 12.3789 23.5697 8.89931C23.5641 8.88769 23.5545 8.87937 23.5433 8.87438ZM13.1295 18.442C12.1281 18.442 11.303 17.4944 11.303 16.3307C11.303 15.1669 12.1121 14.2193 13.1295 14.2193C14.155 14.2193 14.9721 15.1752 14.9561 16.3307C14.9561 17.4944 14.1469 18.442 13.1295 18.442ZM19.883 18.442C18.8816 18.442 18.0564 17.4944 18.0564 16.3307C18.0564 15.1669 18.8655 14.2193 19.883 14.2193C20.9084 14.2193 21.7255 15.1752 21.7095 16.3307C21.7095 17.4944 20.9084 18.442 19.883 18.442Z",fill:"#F7F7F7"})]}),ft=({style:t,...n})=>/*#__PURE__*/e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"24px",...t},...n,children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"black"}),/*#__PURE__*/e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.5083 5.62451C10.8896 5.62451 6.34741 10.2078 6.34741 15.878C6.34741 20.4104 9.25774 24.2471 13.2951 25.605C13.7999 25.7071 13.9848 25.3844 13.9848 25.1129C13.9848 24.8752 13.9682 24.0604 13.9682 23.2115C11.1417 23.8227 10.5531 21.9892 10.5531 21.9892C10.0988 20.8009 9.42579 20.4954 9.42579 20.4954C8.50068 19.8673 9.49318 19.8673 9.49318 19.8673C10.5194 19.9352 11.0578 20.9198 11.0578 20.9198C11.9661 22.4815 13.4297 22.0402 14.0185 21.7686C14.1025 21.1065 14.3719 20.6482 14.6579 20.3936C12.4035 20.1559 10.0317 19.2732 10.0317 15.3347C10.0317 14.2142 10.4351 13.2976 11.0745 12.5847C10.9736 12.3301 10.6202 11.2774 11.1756 9.86844C11.1756 9.86844 12.0335 9.59678 13.968 10.9209C14.7962 10.6965 15.6503 10.5823 16.5083 10.5814C17.3662 10.5814 18.2408 10.7003 19.0484 10.9209C20.9831 9.59678 21.841 9.86844 21.841 9.86844C22.3963 11.2774 22.0428 12.3301 21.9419 12.5847C22.5981 13.2976 22.9849 14.2142 22.9849 15.3347C22.9849 19.2732 20.6131 20.1388 18.3419 20.3936C18.7121 20.7161 19.0316 21.3271 19.0316 22.2948C19.0316 23.6698 19.0149 24.7733 19.0149 25.1127C19.0149 25.3844 19.2 25.7071 19.7046 25.6052C23.742 24.2469 26.6523 20.4104 26.6523 15.878C26.669 10.2078 22.1102 5.62451 16.5083 5.62451Z",fill:"white"})]}),xt=t=>/*#__PURE__*/e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#F1F2F9"}),/*#__PURE__*/e.jsx("path",{d:"M26.1001 16.2273C26.1001 15.5182 26.0365 14.8364 25.9183 14.1818H16.5001V18.05H21.8819C21.6501 19.3 20.9456 20.3591 19.8865 21.0682V23.5773H23.1183C25.0092 21.8364 26.1001 19.2727 26.1001 16.2273Z",fill:"#4285F4"}),/*#__PURE__*/e.jsx("path",{d:"M16.5001 26C19.2001 26 21.4637 25.1046 23.1182 23.5773L19.8864 21.0682C18.991 21.6682 17.8455 22.0227 16.5001 22.0227C13.8955 22.0227 11.691 20.2637 10.9046 17.9H7.56372V20.4909C9.20917 23.7591 12.591 26 16.5001 26Z",fill:"#34A853"}),/*#__PURE__*/e.jsx("path",{d:"M10.9047 17.8999C10.7047 17.2999 10.591 16.659 10.591 15.9999C10.591 15.3408 10.7047 14.6999 10.9047 14.0999V11.509H7.56376C6.86376 12.9025 6.49951 14.4405 6.50012 15.9999C6.50012 17.6136 6.88649 19.1408 7.56376 20.4908L10.9047 17.8999Z",fill:"#FBBC05"}),/*#__PURE__*/e.jsx("path",{d:"M16.5001 9.97726C17.9682 9.97726 19.2864 10.4818 20.3228 11.4727L23.191 8.60454C21.4591 6.99091 19.1955 6 16.5001 6C12.591 6 9.20917 8.2409 7.56372 11.5091L10.9046 14.1C11.691 11.7364 13.8955 9.97726 16.5001 9.97726Z",fill:"#EA4335"})]});function vt(t){/*#__PURE__*/return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:26,height:26,viewBox:"0 0 140 140",x:"0px",y:"0px",fill:"none",...t,children:[/*#__PURE__*/e.jsxs("defs",{children:[/*#__PURE__*/e.jsxs("linearGradient",{id:"b",children:[/*#__PURE__*/e.jsx("stop",{offset:"0",stopColor:"#3771c8"}),/*#__PURE__*/e.jsx("stop",{stopColor:"#3771c8",offset:".128"}),/*#__PURE__*/e.jsx("stop",{offset:"1",stopColor:"#60f",stopOpacity:"0"})]}),/*#__PURE__*/e.jsxs("linearGradient",{id:"a",children:[/*#__PURE__*/e.jsx("stop",{offset:"0",stopColor:"#fd5"}),/*#__PURE__*/e.jsx("stop",{offset:".1",stopColor:"#fd5"}),/*#__PURE__*/e.jsx("stop",{offset:".5",stopColor:"#ff543e"}),/*#__PURE__*/e.jsx("stop",{offset:"1",stopColor:"#c837ab"})]}),/*#__PURE__*/e.jsx("radialGradient",{id:"c",cx:"158.429",cy:"578.088",r:"65",xlinkHref:"#a",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(0 -1.98198 1.8439 0 -1031.402 454.004)",fx:"158.429",fy:"578.088"}),/*#__PURE__*/e.jsx("radialGradient",{id:"d",cx:"147.694",cy:"473.455",r:"65",xlinkHref:"#b",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(.17394 .86872 -3.5818 .71718 1648.348 -458.493)",fx:"147.694",fy:"473.455"})]}),/*#__PURE__*/e.jsx("path",{fill:"url(#c)",d:"M65.03 0C37.888 0 29.95.028 28.407.156c-5.57.463-9.036 1.34-12.812 3.22-2.91 1.445-5.205 3.12-7.47 5.468C4 13.126 1.5 18.394.595 24.656c-.44 3.04-.568 3.66-.594 19.188-.01 5.176 0 11.988 0 21.125 0 27.12.03 35.05.16 36.59.45 5.42 1.3 8.83 3.1 12.56 3.44 7.14 10.01 12.5 17.75 14.5 2.68.69 5.64 1.07 9.44 1.25 1.61.07 18.02.12 34.44.12 16.42 0 32.84-.02 34.41-.1 4.4-.207 6.955-.55 9.78-1.28 7.79-2.01 14.24-7.29 17.75-14.53 1.765-3.64 2.66-7.18 3.065-12.317.088-1.12.125-18.977.125-36.81 0-17.836-.04-35.66-.128-36.78-.41-5.22-1.305-8.73-3.127-12.44-1.495-3.037-3.155-5.305-5.565-7.624C116.9 4 111.64 1.5 105.372.596 102.335.157 101.73.027 86.19 0H65.03z",transform:"translate(1.004 1)"}),/*#__PURE__*/e.jsx("path",{fill:"url(#d)",d:"M65.03 0C37.888 0 29.95.028 28.407.156c-5.57.463-9.036 1.34-12.812 3.22-2.91 1.445-5.205 3.12-7.47 5.468C4 13.126 1.5 18.394.595 24.656c-.44 3.04-.568 3.66-.594 19.188-.01 5.176 0 11.988 0 21.125 0 27.12.03 35.05.16 36.59.45 5.42 1.3 8.83 3.1 12.56 3.44 7.14 10.01 12.5 17.75 14.5 2.68.69 5.64 1.07 9.44 1.25 1.61.07 18.02.12 34.44.12 16.42 0 32.84-.02 34.41-.1 4.4-.207 6.955-.55 9.78-1.28 7.79-2.01 14.24-7.29 17.75-14.53 1.765-3.64 2.66-7.18 3.065-12.317.088-1.12.125-18.977.125-36.81 0-17.836-.04-35.66-.128-36.78-.41-5.22-1.305-8.73-3.127-12.44-1.495-3.037-3.155-5.305-5.565-7.624C116.9 4 111.64 1.5 105.372.596 102.335.157 101.73.027 86.19 0H65.03z",transform:"translate(1.004 1)"}),/*#__PURE__*/e.jsx("path",{fill:"#fff",d:"M66.004 18c-13.036 0-14.672.057-19.792.29-5.11.234-8.598 1.043-11.65 2.23-3.157 1.226-5.835 2.866-8.503 5.535-2.67 2.668-4.31 5.346-5.54 8.502-1.19 3.053-2 6.542-2.23 11.65C18.06 51.327 18 52.964 18 66s.058 14.667.29 19.787c.235 5.11 1.044 8.598 2.23 11.65 1.227 3.157 2.867 5.835 5.536 8.503 2.667 2.67 5.345 4.314 8.5 5.54 3.054 1.187 6.543 1.996 11.652 2.23 5.12.233 6.755.29 19.79.29 13.037 0 14.668-.057 19.788-.29 5.11-.234 8.602-1.043 11.656-2.23 3.156-1.226 5.83-2.87 8.497-5.54 2.67-2.668 4.31-5.346 5.54-8.502 1.18-3.053 1.99-6.542 2.23-11.65.23-5.12.29-6.752.29-19.788 0-13.036-.06-14.672-.29-19.792-.24-5.11-1.05-8.598-2.23-11.65-1.23-3.157-2.87-5.835-5.54-8.503-2.67-2.67-5.34-4.31-8.5-5.535-3.06-1.187-6.55-1.996-11.66-2.23-5.12-.233-6.75-.29-19.79-.29zm-4.306 8.65c1.278-.002 2.704 0 4.306 0 12.816 0 14.335.046 19.396.276 4.68.214 7.22.996 8.912 1.653 2.24.87 3.837 1.91 5.516 3.59 1.68 1.68 2.72 3.28 3.592 5.52.657 1.69 1.44 4.23 1.653 8.91.23 5.06.28 6.58.28 19.39s-.05 14.33-.28 19.39c-.214 4.68-.996 7.22-1.653 8.91-.87 2.24-1.912 3.835-3.592 5.514-1.68 1.68-3.275 2.72-5.516 3.59-1.69.66-4.232 1.44-8.912 1.654-5.06.23-6.58.28-19.396.28-12.817 0-14.336-.05-19.396-.28-4.68-.216-7.22-.998-8.913-1.655-2.24-.87-3.84-1.91-5.52-3.59-1.68-1.68-2.72-3.276-3.592-5.517-.657-1.69-1.44-4.23-1.653-8.91-.23-5.06-.276-6.58-.276-19.398s.046-14.33.276-19.39c.214-4.68.996-7.22 1.653-8.912.87-2.24 1.912-3.84 3.592-5.52 1.68-1.68 3.28-2.72 5.52-3.592 1.692-.66 4.233-1.44 8.913-1.655 4.428-.2 6.144-.26 15.09-.27zm29.928 7.97c-3.18 0-5.76 2.577-5.76 5.758 0 3.18 2.58 5.76 5.76 5.76 3.18 0 5.76-2.58 5.76-5.76 0-3.18-2.58-5.76-5.76-5.76zm-25.622 6.73c-13.613 0-24.65 11.037-24.65 24.65 0 13.613 11.037 24.645 24.65 24.645C79.617 90.645 90.65 79.613 90.65 66S79.616 41.35 66.003 41.35zm0 8.65c8.836 0 16 7.163 16 16 0 8.836-7.164 16-16 16-8.837 0-16-7.164-16-16 0-8.837 7.163-16 16-16z"})]})}function wt(t){/*#__PURE__*/return e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...t,children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"black"}),/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#06C755"}),/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"url(#pattern0_1769_69)"}),/*#__PURE__*/e.jsxs("defs",{children:[/*#__PURE__*/e.jsx("pattern",{id:"pattern0_1769_69",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:/*#__PURE__*/e.jsx("use",{xlinkHref:"#image0_1769_69",transform:"scale(0.003125)"})}),/*#__PURE__*/e.jsx("image",{id:"image0_1769_69",width:"320",height:"320",preserveAspectRatio:"none",xlinkHref:"data:image/png;base64,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"})]})]})}function Ct(t){/*#__PURE__*/return e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e.jsxs("g",{"clip-path":"url(#clip0_1715_1956)",children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#0977B6"}),/*#__PURE__*/e.jsx("path",{d:"M9.46878 6.82104C10.6699 6.82104 11.6461 7.79742 11.6461 8.999C11.6461 10.2017 10.6699 11.1782 9.46878 11.1782C8.26447 11.1782 7.28967 10.2017 7.28967 8.999C7.28967 7.79742 8.26447 6.82104 9.46878 6.82104ZM7.58908 12.8309H11.3467V24.9207H7.58908V12.8309Z",fill:"white"}),/*#__PURE__*/e.jsx("path",{d:"M13.7032 12.8309H17.3076V14.4827H17.3576C17.8589 13.5322 19.0846 12.53 20.9127 12.53C24.7175 12.53 25.42 15.0341 25.42 18.2891V24.9207H21.6651V19.0415C21.6651 17.6388 21.6394 15.8355 19.7126 15.8355C17.7573 15.8355 17.4579 17.363 17.4579 18.9399V24.9207H13.7032L13.7032 12.8309Z",fill:"white"})]}),/*#__PURE__*/e.jsx("defs",{children:/*#__PURE__*/e.jsx("clipPath",{id:"clip0_1715_1956",children:/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"white"})})})]})}function bt(t){/*#__PURE__*/return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512",...t,children:[/*#__PURE__*/e.jsx("path",{fill:"#1ed760",d:"M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8Z"}),/*#__PURE__*/e.jsx("path",{d:"M406.6 231.1c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3zm-31 76.2c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm-26.9 65.6c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4z"})]})}function jt(t){/*#__PURE__*/return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg","shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision","image-rendering":"optimizeQuality","fill-rule":"evenodd","clip-rule":"evenodd",viewBox:"0 0 1000 1000",...t,children:/*#__PURE__*/e.jsx("path",{d:"M906.25 0H93.75C42.19 0 0 42.19 0 93.75v812.49c0 51.57 42.19 93.75 93.75 93.75l812.5.01c51.56 0 93.75-42.19 93.75-93.75V93.75C1000 42.19 957.81 0 906.25 0zM684.02 319.72c-32.42-21.13-55.81-54.96-63.11-94.38-1.57-8.51-2.45-17.28-2.45-26.25H515l-.17 414.65c-1.74 46.43-39.96 83.7-86.8 83.7-14.57 0-28.27-3.63-40.35-9.99-27.68-14.57-46.63-43.58-46.63-76.97 0-47.96 39.02-86.98 86.97-86.98 8.95 0 17.54 1.48 25.66 4.01V421.89c-8.41-1.15-16.95-1.86-25.66-1.86-105.01 0-190.43 85.43-190.43 190.45 0 64.42 32.18 121.44 81.3 155.92 30.93 21.72 68.57 34.51 109.14 34.51 105.01 0 190.43-85.43 190.43-190.43V400.21c40.58 29.12 90.3 46.28 143.95 46.28V343.03c-28.89 0-55.8-8.59-78.39-23.31z"})})}const kt=t=>/*#__PURE__*/e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"black"}),/*#__PURE__*/e.jsx("path",{d:"M8.53901 8L14.7164 16.2153L8.5 22.8947H9.89907L15.3415 17.0468L19.7389 22.8947H24.5L17.975 14.2173L23.7612 8H22.3621L17.3499 13.3858L13.3001 8H8.53901ZM10.5964 9.02501H12.7837L22.4422 21.8695H20.255L10.5964 9.02501Z",fill:"#F7F7F7"})]});function Tt(){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"),Ye.del(it),window.history.replaceState({},"",e)}const At=({address:e,chainId:t,nonce:n})=>`${window.location.host} wants you to sign in with your Ethereum account:\n${e}\n\nBy signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.\n\nURI: ${window.location.origin}\nVersion: 1\nChain ID: ${t}\nNonce: ${n}\nIssued At: ${(new Date).toISOString()}\nResources:\n- https://privy.io`;class St{get meta(){return{connectorType:this.wallet?.connectorType,walletClientType:this.wallet?.walletClientType,chainId:this.wallet?.chainId,address:this.wallet?.address,disableSignup:this._meta.disableSignup}}async authenticate(){if(!this.client)throw new h.PrivyClientError("SiweFlow has no client instance");try{if(this.preparedMessage&&this.signature)return await this.client.authenticateWithSiweInternal({message:this.preparedMessage,signature:this.signature,chainId:this.wallet?.chainId,walletClientType:this.wallet?.walletClientType,connectorType:this.wallet?.connectorType,mode:this._meta.disableSignup?"no-signup":"login-or-sign-up"});if(!this.wallet)throw new h.PrivyClientError("SiweFlow has no wallet instance");let{message:e,signature:t}=await this.sign();return await this.client.authenticateWithSiweInternal({message:e,signature:t,chainId:this.wallet.chainId,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(e){throw h.formatApiError(e)}}async link(){if(!this.client)throw new h.PrivyClientError("SiweFlow has no client instance");try{if(!this.wallet)throw new h.PrivyClientError("SiweFlow has no wallet instance");let{message:e,signature:t}=await this.sign();return await this.client.linkWithSiweInternal({message:e,signature:t,chainId:this.wallet.chainId,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType})}catch(e){throw h.formatApiError(e)}}async sign(){if(!this.client)throw new h.PrivyClientError("SiweFlow has no client instance");if(await this.buildMessage(),!this.preparedMessage)throw new h.PrivyClientError("Could not prepare SIWE message");if(!this.wallet)throw new h.PrivyClientError("SiweFlow has no wallet instance");let e=await this.wallet.sign(this.preparedMessage);return{message:this.preparedMessage,signature:e}}async _getNonceOnce(){if(!this.client)throw new h.PrivyClientError("SiweFlow has no client instance");if(!this.wallet)throw new h.PrivyClientError("UI SiweFlow has no wallet instance");return await this.client.generateSiweNonce({address:this.wallet.address,captchaToken:this.captchaToken})}async buildMessage(){if(!this.client)throw new h.PrivyClientError("SiweFlow has no client instance");if(!this.wallet)throw new h.PrivyClientError("SiweFlow has no wallet instance");let e=this.wallet.address,t=this.wallet.chainId.replace("eip155:","");return this.nonce||(this.nonce=await this.getNonceOnce.execute()),this.preparedMessage=At({address:e,chainId:t,nonce:this.nonce}),this.preparedMessage}constructor(e,t,n,r=!1,a){this._meta={disableSignup:!1},this.getNonceOnce=new nt(this._getNonceOnce.bind(this)),this.wallet=t,this.captchaToken=n,this.client=e,this._meta.disableSignup=r,this.preparedMessage=a?.message,this.signature=a?.signature}}const Et=({address:e,nonce:t})=>`${window.location.host} wants you to sign in with your Solana account:\n${e}\n\n${`You are proving you own ${e}.`}\n\nURI: ${window.location.origin}\nVersion: 1\nChain ID: mainnet\nNonce: ${t}\nIssued At: ${(new Date).toISOString()}\nResources:\n- https://privy.io`;class It{get meta(){return{connectorType:this.wallet.connectorType,walletClientType:this.wallet.walletClientType,disableSignup:this._meta.disableSignup,messageType:this._meta.messageType,address:this.wallet?.address}}set messageType(e){this._meta.messageType=e}async authenticate(){if(!this.client)throw new h.PrivyClientError("SiwsFlow has no client instance");try{let{message:e,signature:t}=await this.sign();return await this.client.authenticateWithSiwsInternal({message:e,signature:t,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up",messageType:this.meta.messageType})}catch(e){throw h.formatApiError(e)}}async link(){if(!this.client)throw new h.PrivyClientError("SiwsFlow has no client instance");try{let{message:e,signature:t}=await this.sign();return await this.client.linkWithSiwsInternal({message:e,signature:t,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,messageType:this.meta.messageType})}catch(e){throw h.formatApiError(e)}}async sign(){let e,t;if(!this.client)throw new h.PrivyClientError("SiwsFlow has no client instance");await this.buildMessage();let n="transaction"===this.meta.messageType;if(!this.preparedMessage)throw new h.PrivyClientError("Could not prepare SIWS message");if(!n&&!this.wallet.provider.signMessage||n&&!this.wallet.provider.signTransaction)throw new h.PrivyClientError("Wallet does not support the necessary signing methods");if(n&&this._plugin){let n=await this.wallet.provider.signTransaction({transaction:S.base64.decode(this.preparedMessage)});e=S.base64.encode(n.signedTransaction),t=this._plugin.getSignatureFromTransaction(n.signedTransaction,this.wallet.address)}else{e=this.preparedMessage;let n=await this.wallet.provider.signMessage({message:(new TextEncoder).encode(this.preparedMessage)});t=S.base64.encode(n.signature)}return{message:e,signature:t}}async _getNonceOnce(){if(!this.client)throw new h.PrivyClientError("SiwsFlow has no client instance");return await this.client.generateSiwsNonce({address:this.wallet.address,captchaToken:this.captchaToken})}async buildMessage(){if(!this.client)throw new h.PrivyClientError("SiwsFlow has no client instance");let e=this.wallet.address;return this.nonce||(this.nonce=await this.getNonceOnce.execute()),"transaction"===this.meta.messageType&&this._plugin?this.preparedMessage=this._plugin.createSiwsMemoTransaction({address:e,nonce:this.nonce}):this.preparedMessage=Et({address:e,nonce:this.nonce}),this.preparedMessage}constructor(e,t,n,r=!1,a="plain",i){this._meta={disableSignup:!1,messageType:"plain"},this.getNonceOnce=new nt(this._getNonceOnce.bind(this)),this.wallet=e,this.captchaToken=n,this.client=t,this._meta.disableSignup=r,this._meta.messageType=a,this._plugin=i}}const Pt=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isClover?"Clover":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOneKey?"OneKey Wallet":e.isOpera?"Opera":e.isPhantom||"isPhantom"in e?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isSafePal?"SafePal Wallet":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally||e.isTaho?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZeal?"Zeal":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0,Nt=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;if(e.isBraveWallet&&!e._events&&!e._state||"MetaMask"!==Pt(e))return!1;if(e.providers)for(let t of e.providers)if(!Nt(t))return!1;return!0},_t=()=>{let e=window;if(!e.ethereum)return!1;if(e.ethereum.isCoinbaseWallet)return!0;if(e.ethereum.providers)for(let t of e.ethereum.providers)if(t&&t.isCoinbaseWallet)return!0;return!1},Mt=(e,t,n,a)=>{let i=Number(e),o=t.find((e=>e.id===i));if(!o)throw new h.PrivyConnectorError(`Unsupported chainId ${e}`,4901);return r.createPublicClient({transport:r.http(Ft(o,n,a.appId)),chain:o})},Ft=(e,t,n)=>{let r,a=e.id,i=Number(e.id);if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])r=e.rpcUrls.privyWalletOverride.http[0];else if(t.rpcUrls&&t.rpcUrls[i])r=t.rpcUrls[i];else if(e.rpcUrls.privy?.http[0]){let t=new URL(e.rpcUrls.privy.http[0]);t.searchParams.append("privyAppId",n),r=t.toString()}else r=e.rpcUrls.public?.http[0]?e.rpcUrls.public.http[0]:e.rpcUrls.default?.http[0];if(!r)throw new h.PrivyConnectorError(`No RPC url found for ${a}`);return r},Lt=e=>!!String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),Wt=(e,t=3,n=4,r="ethereum")=>{if(!e)return"";let a="ethereum"===r?2:0;return t+n+a+3>=e.length?e:`${e.slice(0,a+t)}...${e.slice(e.length-n,e.length)}`},Dt=(e,t=3,n=4)=>Wt(e,t,n,"solana"),Rt=e=>new Promise((t=>setTimeout(t,e)));const Ot=(e,t={})=>{let n=t.delayMs||150,r=t.maxAttempts||270;return new Promise((async(a,i)=>{let o=!1,s=0;for(;!o&&s<r;){if(t.abortSignal?.aborted)return;e().then((e=>{o=!0,a(e)}),((...e)=>{o=!0,i(...e)})),s+=1,await Rt(n)}o||i(Error("Exceeded max attempts before resolving function"))}))},Bt=(e,t,n={},r={})=>{let a=new URL(t,e);for(let[e,t]of Object.entries(n))void 0!==t&&a.searchParams.set(e,t);let i=Object.entries(r);if(i.length>0){let e=new URLSearchParams;for(let[t,n]of i)e.append(t,n);a.hash=e.toString()}return a.href},Ut=e=>e.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,"");function zt(e){return`eip155:${String(Number(e))}`}const Ht=(e,t,n,r)=>{let a=Number(e),i=t.find((e=>e.id===a));if(!i)throw new h.PrivyConnectorError(`Unsupported chainId ${e}`,4901);return Ft(i,n,r)};const Vt=/*#__PURE__*/n.createContext({siteKey:"",enabled:!1,appId:void 0,token:void 0,error:void 0,status:"disabled",setToken:s.notImplemented,setError:s.notImplemented,setExecuting:s.notImplemented,waitForResult:()=>Promise.resolve(""),ref:{current:null},remove:s.notImplemented,reset:s.notImplemented,execute:s.notImplemented});class $t extends h.PrivyError{constructor(e,t,n){super(e||"Captcha failed"),this.type="Captcha",t instanceof Error&&(this.cause=t),this.privyErrorCode=n}}const qt=()=>n.useContext(Vt);function Gt(e){let t={detail:"",retryable:!1};return e?.privyErrorCode===h.PrivyErrorCode.LINKED_TO_ANOTHER_USER&&(t.detail="This account has already been linked to another user."),e?.privyErrorCode===h.PrivyErrorCode.DISALLOWED_LOGIN_METHOD&&(t.detail="Login with Telegram not allowed."),e?.privyErrorCode===h.PrivyErrorCode.INVALID_DATA&&(t.retryable=!0,t.detail="Something went wrong. Try again."),e?.privyErrorCode===h.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE&&(t.retryable=!0,t.detail="Something went wrong. Try again."),e?.privyErrorCode===h.PrivyErrorCode.INVALID_CREDENTIALS&&(t.retryable=!0,t.detail="Something went wrong. Try again."),e?.privyErrorCode===h.PrivyErrorCode.TOO_MANY_REQUESTS&&(t.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===h.PrivyErrorCode.TOO_MANY_REQUESTS&&e.message.includes("rate limit")&&(t.detail="Request limit reached for Telegram. Please wait a moment and try again."),e instanceof $t&&(t.retryable=!0,t.detail="Something went wrong. Try again."),t}function Yt(e){return Object.fromEntries(decodeURIComponent(e).split("&").map((e=>e.split("=").map(decodeURIComponent))))}function Zt(){let e=new URL(window.location.href);e.searchParams.delete("id"),e.searchParams.delete("hash"),e.searchParams.delete("auth_date"),e.searchParams.delete("first_name"),e.searchParams.delete("last_name"),e.searchParams.delete("username"),e.searchParams.delete("photo_url"),e.hash="",window.history.replaceState({},"",e)}let Kt=e=>{if("ethereum"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier"};if("solana"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"solana-address-verifier"};throw Error("Failed to get account entropy details")};const Qt=(e,t)=>{if(t?.imported)return Kt(t);let n=w.getPrivyPrimaryWallet(e);if(!n)throw Error("Failed to find primary wallet");return Kt(n)},Xt=({style:t,...n})=>/*#__PURE__*/e.jsxs("svg",{viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...t},...n,children:[/*#__PURE__*/e.jsx("rect",{width:"1024",height:"1024",fill:"#0052FF",rx:100,ry:100}),/*#__PURE__*/e.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"})]}),Jt="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTAyNCAxMDI0JyBmaWxsPSdub25lJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHN0eWxlPSdoZWlnaHQ6MjhweDt3aWR0aDoyOHB4Jz48cmVjdCB3aWR0aD0nMTAyNCcgaGVpZ2h0PScxMDI0JyBmaWxsPScjMDA1MkZGJyByeD0nMTAwJyByeT0nMTAwJz48L3JlY3Q+PHBhdGggZmlsbC1ydWxlPSdldmVub2RkJyBjbGlwLXJ1bGU9J2V2ZW5vZGQnIGQ9J00xNTIgNTEyQzE1MiA3MTAuODIzIDMxMy4xNzcgODcyIDUxMiA4NzJDNzEwLjgyMyA4NzIgODcyIDcxMC44MjMgODcyIDUxMkM4NzIgMzEzLjE3NyA3MTAuODIzIDE1MiA1MTIgMTUyQzMxMy4xNzcgMTUyIDE1MiAzMTMuMTc3IDE1MiA1MTJaTTQyMCAzOTZDNDA2Ljc0NSAzOTYgMzk2IDQwNi43NDUgMzk2IDQyMFY2MDRDMzk2IDYxNy4yNTUgNDA2Ljc0NSA2MjggNDIwIDYyOEg2MDRDNjE3LjI1NSA2MjggNjI4IDYxNy4yNTUgNjI4IDYwNFY0MjBDNjI4IDQwNi43NDUgNjE3LjI1NSAzOTYgNjA0IDM5Nkg0MjBaJyBmaWxsPSd3aGl0ZSc+PC9wYXRoPjwvc3ZnPg==",en="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAALZJREFUaEPtmjEOhDAMBNc/O14GvOzys3CAKK6eAlmaVGl2Zc+kTOU685vkc9/bnD2prZK5/TZY24z9P+g4F5hNh7/GdoG37WlAA5CATwgCxHENYISwQAMQII5rACOEBRqAAHFcAxghLNAABIjjGsAIYYEGIEAc1wBGCAs0AAHiuAYwQligAQgQxzWAEcICDUCAOK4BjBAWaAACxHENYISwQAMQII6fBjr+VHkW3+u+tfyxMpJaDgYzYxb/ALZVAAAAAElFTkSuQmCC";class tn extends h.PrivyConnectorError{constructor(){super("Wallet timeout"),this.type="wallet_error"}}const nn=e=>e instanceof h.PrivyConnectorError?e:e?.code?new an(e):new h.PrivyConnectorError("Unknown connector error",e);class rn extends h.PrivyError{constructor(e,t,n){super(e),this.type="provider_error",this.code=t,this.data=n}}class an extends rn{constructor(e){super(e.message,e.code,e.data);let t=Object.values(a.ProviderErrors).find((t=>t.eipCode===e.code));this.details=t||a.ProviderErrors.UNKNOWN_ERROR,-32002===e.code&&(e.message?.includes("already pending for origin")?e.message?.includes("wallet_requestPermissions")?this.details=a.ProviderErrors.E32002_CONNECTION_ALREADY_PENDING:this.details=a.ProviderErrors.E32002_REQUEST_ALREADY_PENDING:e.message?.includes("Already processing")&&e.message.includes("eth_requestAccounts")&&(this.details=a.ProviderErrors.E32002_WALLET_LOCKED))}}const on={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},ERROR_USER_LIMIT_REACHED:{message:"Unable to link",detail:"You've reached the maximum number of linked wallets.",retryable:!1},...a.ProviderErrors};function sn(e){return"ethereum"===e.type}function ln(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],a=t[n];if(r?.address!==a?.address||r&&a&&sn(r)&&sn(a)&&r?.chainId!==a?.chainId||r?.connectorType!==a?.connectorType||r?.connectedAt!==a?.connectedAt||r?.walletClientType!==a?.walletClientType||r?.isConnected!==a?.isConnected||r?.linked!==a?.linked)return!1}return!0}class cn extends $e.default{constructor(e){super(),this.walletClientType=e,this.connected=!1,this.initialized=!1}}const dn=(e,t)=>e.rpcTimeouts&&e.rpcTimeouts[t]||ct;class un extends cn{buildConnectedWallet(e,t,n,r){let a=async()=>!!this.wallets.find((t=>u.getAddress(t.address)===u.getAddress(e)));return{type:"ethereum",address:u.getAddress(e),chainId:t,meta:n,imported:r,switchChain:async n=>{let r,i;if(!a)throw new h.PrivyConnectorError("Wallet is not currently connected.");let o=this.wallets.find((t=>u.getAddress(t.address)===u.getAddress(e)))?.chainId;if(!o)throw new h.PrivyConnectorError("Unable to determine current chainId.");if("number"==typeof n?(r=`0x${n.toString(16)}`,i=n):(r=n,i=Number(n)),o===zt(r))return;let s=this.chains.find((e=>e.id===i));if(!s)throw new h.PrivyConnectorError(`Unsupported chainId: ${n}`);let l=async()=>{await this.proxyProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]})};try{return await l()}catch(e){if(((e,t)=>{switch(t){case"coinbase_wallet":case"base_account":return e.message.includes("addEthereumChain");case"rabby_wallet":return e.message.includes("Unrecognized chain ID");default:return 4902===e.code||e.message?.includes("4902")}})(e,this.walletClientType))return"rabby_wallet"===this.walletClientType&&await Rt(300),await this.proxyProvider.request({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:s.name,nativeCurrency:s.nativeCurrency,rpcUrls:[s.rpcUrls.default?.http[0]??""],blockExplorerUrls:[s.blockExplorers?.default.url??""]}]}),l();if("rainbow"===this.walletClientType&&e.message?.includes("wallet_switchEthereumChain"))throw new h.PrivyConnectorError(`Rainbow does not support the chainId ${t}`);throw e}},connectedAt:Date.now(),walletClientType:this.walletClientType,connectorType:this.connectorType,isConnected:a,getEthereumProvider:async()=>{if(!await a())throw new h.PrivyConnectorError("Wallet is not currently connected.");return this.proxyProvider},sign:async e=>{if(!await a())throw new h.PrivyConnectorError("Wallet is not currently connected.");return await this.sign(e)},disconnect:()=>{this.disconnect()}}}async syncAccounts(e){let t,n=e;try{if(void 0===n){let e=await Ot((()=>this.proxyProvider.request({method:"eth_accounts"})),{maxAttempts:10,delayMs:500});console.debug(`eth_accounts for ${this.walletClientType}:`,e),Array.isArray(e)&&(n=e)}}catch(e){console.debug("Wallet did not respond to eth_accounts. Defaulting to prefetched accounts.",e)}if(!n||!Array.isArray(n)||n.length<=0||!n[0])return;let r=n[0],a=u.getAddress(r),i=[];if("privy"===this.walletClientType){let e=Ye.get(st(a));this.chains.find((t=>t.id===Number(e)))||(Ye.del(st(a)),e=null),t=e||`0x${this.defaultChain.id.toString(16)}`;try{await this.proxyProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]})}catch(e){console.warn(`Unable to switch embedded wallet to chain ID ${t} on initialization`)}}else try{let e=await Ot((()=>this.proxyProvider.request({method:"eth_chainId"})),{maxAttempts:10,delayMs:500});if(console.debug(`eth_chainId for ${this.walletClientType}:`,e),"string"==typeof e)t=e;else{if("number"!=typeof e)throw Error("Invalid chainId returned from provider");t=`0x${e.toString(16)}`}}catch(e){console.warn("Failed to get chainId from provider, defaulting to 0x1",e),t="0x1"}let o=zt(t);if(!i.find((e=>u.getAddress(e.address)===a))){let e={name:this.walletBranding.name,icon:"string"==typeof this.walletBranding.icon?this.walletBranding.icon:void 0,id:this.walletBranding.id};i.push(this.buildConnectedWallet(u.getAddress(r),o,e,"embedded_imported"===this.connectorType))}ln(i,this.wallets)||(this.wallets=i,this.emit("walletsUpdated"))}async getConnectedWallet(){let e=await this.proxyProvider.request({method:"eth_accounts"});return this.wallets.sort(((e,t)=>t.connectedAt-e.connectedAt)).find((t=>e.find((e=>u.getAddress(e)===u.getAddress(t.address)))))||null}async isConnected(){let e=await this.proxyProvider.request({method:"eth_accounts"});return Array.isArray(e)&&e.length>0}async sign(e){return await this.connect({showPrompt:!1}),this.proxyProvider.request({method:"personal_sign",params:[u.toHex(e),this.wallets[0]?.address]})}subscribeListeners(){this.proxyProvider.on("accountsChanged",this.onAccountsChanged),this.proxyProvider.on("chainChanged",this.onChainChanged),this.proxyProvider.on("disconnect",this.onDisconnect),this.proxyProvider.on("connect",this.onConnect)}unsubscribeListeners(){this.proxyProvider.removeListener("accountsChanged",this.onAccountsChanged),this.proxyProvider.removeListener("chainChanged",this.onChainChanged),this.proxyProvider.removeListener("disconnect",this.onDisconnect),this.proxyProvider.removeListener("connect",this.onConnect)}constructor(e,t,n,r){super(e),this.chainType="ethereum",this.onAccountsChanged=e=>{0===e.length?this.onDisconnect():this.syncAccounts(e)},this.onChainChanged=e=>{this.wallets.forEach((t=>{t.chainId=zt(e),"privy"===this.walletClientType&&Ye.put(st(t.address),e)})),this.emit("walletsUpdated")},this.onDisconnect=()=>{this.connected=!1,this.wallets=[],this.emit("walletsUpdated")},this.onConnect=async()=>{"base_account"===this.connectorType&&this.connected||(this.connected=!0,"coinbase_wallet"===this.connectorType&&await Rt(500),this.syncAccounts())},this.wallets=[],this.walletClientType=e,this.chains=t,this.defaultChain=n,this.rpcConfig=r,this.rpcTimeoutDuration=dn(r,e),this.connected=!1,this.initialized=!1}}class pn{on(e,t){if(this.walletProvider)return this.walletProvider.on(e,t);this._subscriptions.push({eventName:e,listener:t})}async request(e){if(!this.walletProvider)throw new h.PrivyConnectorError(`A wallet request of type ${e.method} was made before setting a wallet provider.`);return Promise.race([this.walletProvider.request(e),this.walletTimeout()]).catch((e=>{throw nn(e)}))}constructor(e,t){this.removeListener=(e,t)=>{if(this.walletProvider)try{return this.walletProvider.removeListener(e,t)}catch(e){console.warn("Unable to remove wallet provider listener")}},this.walletTimeout=(e=new tn,t=this.rpcTimeoutDuration)=>new Promise(((n,r)=>setTimeout((()=>{r(e)}),t))),this.setWalletProvider=e=>{this.walletProvider&&this._subscriptions.forEach((e=>{this.removeListener(e.eventName,e.listener)})),this.walletProvider=e,this._subscriptions.forEach((e=>{this.walletProvider?.on(e.eventName,e.listener)}))},this.walletProvider=e,this.rpcTimeoutDuration=t||ct,this._subscriptions=[]}}const hn=({...t})=>/*#__PURE__*/e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:/*#__PURE__*/e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.37126 11.0323C2.37126 12.696 3.90598 13.4421 5.40654 13.4468C8.91753 13.4468 12.8021 11.2897 12.7819 7.67984C12.7673 5.07728 10.3748 2.86167 7.54357 2.88296C4.8495 2.88296 2.21821 4.6411 2.21803 7.03628C2.21803 7.67951 2.58722 8.30178 3.55231 8.37184C2.74763 9.16826 2.37126 10.1225 2.37126 11.0323ZM7.55283 8.68012C8.11562 8.68012 8.57186 8.13217 8.57186 7.45624C8.57186 6.78032 8.11562 6.23237 7.55283 6.23237C6.99003 6.23237 6.53379 6.78032 6.53379 7.45624C6.53379 8.13217 6.99003 8.68012 7.55283 8.68012ZM10.4747 8.68012C11.0375 8.68012 11.4937 8.13217 11.4937 7.45625C11.4937 6.78032 11.0375 6.23237 10.4747 6.23237C9.91186 6.23237 9.45562 6.78032 9.45562 7.45625C9.45562 8.13217 9.91186 8.68012 10.4747 8.68012Z",fill:t.color||"var(--privy-color-foreground-3)"})});class gn extends un{get walletBranding(){return{id:this.id,name:this.name,icon:this.icon}}async initialize(){this.initialized=!0,this.emit("initialized")}async connect(){throw Error("connect called for an uninstalled wallet via the EthereumNullConnector")}disconnect(){throw Error("disconnect called for an uninstalled wallet via the EthereumNullConnector")}promptConnection(e){throw Error(`promptConnection called for an uninstalled wallet via the EthereumNullConnector for ${e}`)}constructor({id:e,name:t,icon:n,walletClientType:r,defaultChain:a}){super(r,[],a,{}),this.connectorType="null",this.proxyProvider=new pn(void 0,ct),this.id=e,this.name=t,this.icon=n,this.connectorType=r}}const mn=({style:t,...n})=>/*#__PURE__*/e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24",style:{...t},...n,children:/*#__PURE__*/e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})}),yn=({...t})=>/*#__PURE__*/e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",...t,children:[/*#__PURE__*/e.jsx("rect",{width:"32",height:"32",rx:"6",fill:"#121314"}),/*#__PURE__*/e.jsx("g",{transform:"translate(4, 4)",children:/*#__PURE__*/e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 318.6 318.6",children:[/*#__PURE__*/e.jsx("style",{children:".s1{stroke-linecap:round;stroke-linejoin:round}.s2{fill:#e4761b;stroke:#e4761b}.s3{fill:#f6851b;stroke:#f6851b}"}),/*#__PURE__*/e.jsx("path",{fill:"#e2761b",stroke:"#e2761b",className:"s1",d:"m274.1 35.5-99.5 73.9L193 65.8z"}),/*#__PURE__*/e.jsx("path",{d:"m44.4 35.5 98.7 74.6-17.5-44.3zm193.9 171.3-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z",className:"s1 s2"}),/*#__PURE__*/e.jsx("path",{d:"m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zm111.3 0-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5 33.9 16.5-4.7-39.3z",className:"s1 s2"}),/*#__PURE__*/e.jsx("path",{fill:"#d7c1b3",stroke:"#d7c1b3",className:"s1",d:"m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zm-105 0 31.5 14.9-.2-9.3 2.5-22.1z"}),/*#__PURE__*/e.jsx("path",{fill:"#233447",stroke:"#233447",className:"s1",d:"m138.8 193.5-28.2-8.3 19.9-9.1zm40.9 0 8.3-17.4 20 9.1z"}),/*#__PURE__*/e.jsx("path",{fill:"#cd6116",stroke:"#cd6116",className:"s1",d:"m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1 20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"}),/*#__PURE__*/e.jsx("path",{fill:"#e4751f",stroke:"#e4751f",className:"s1",d:"m87.8 162.1 23.6 46-.8-22.9zm120.3 23.1-1 22.9 23.7-46zm-64-20.6-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0-2.7 18 1.2 45 6.7-34.1z"}),/*#__PURE__*/e.jsx("path",{d:"m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z",className:"s3"}),/*#__PURE__*/e.jsx("path",{fill:"#c0ad9e",stroke:"#c0ad9e",className:"s1",d:"m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"}),/*#__PURE__*/e.jsx("path",{fill:"#161616",stroke:"#161616",className:"s1",d:"m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"}),/*#__PURE__*/e.jsx("path",{fill:"#763d16",stroke:"#763d16",className:"s1",d:"m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"}),/*#__PURE__*/e.jsx("path",{d:"m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4 3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z",className:"s3"})]})})]}),fn=({style:t,...n})=>/*#__PURE__*/e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"108",height:"108",viewBox:"0 0 108 108",fill:"none",style:{height:"28px",width:"28px",...t},...n,children:[/*#__PURE__*/e.jsx("rect",{width:"108",height:"108",rx:"23",fill:"#AB9FF2"}),/*#__PURE__*/e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M46.5267 69.9229C42.0054 76.8509 34.4292 85.6182 24.348 85.6182C19.5824 85.6182 15 83.6563 15 75.1342C15 53.4305 44.6326 19.8327 72.1268 19.8327C87.768 19.8327 94 30.6846 94 43.0079C94 58.8258 83.7355 76.9122 73.5321 76.9122C70.2939 76.9122 68.7053 75.1342 68.7053 72.314C68.7053 71.5783 68.8275 70.7812 69.0719 69.9229C65.5893 75.8699 58.8685 81.3878 52.5754 81.3878C47.993 81.3878 45.6713 78.5063 45.6713 74.4598C45.6713 72.9884 45.9768 71.4556 46.5267 69.9229ZM83.6761 42.5794C83.6761 46.1704 81.5575 47.9658 79.1875 47.9658C76.7816 47.9658 74.6989 46.1704 74.6989 42.5794C74.6989 38.9885 76.7816 37.1931 79.1875 37.1931C81.5575 37.1931 83.6761 38.9885 83.6761 42.5794ZM70.2103 42.5795C70.2103 46.1704 68.0916 47.9658 65.7216 47.9658C63.3157 47.9658 61.233 46.1704 61.233 42.5795C61.233 38.9885 63.3157 37.1931 65.7216 37.1931C68.0916 37.1931 70.2103 38.9885 70.2103 42.5795Z",fill:"#FFFDF8"})]}),xn=["metamask","phantom","brave_wallet","rainbow","uniswap_wallet_extension","uniswap_extension","rabby_wallet","bybit_wallet","ronin_wallet","haha_wallet","crypto.com_wallet_extension","crypto.com_onchain","binance","bitkeep","coinbase_wallet","coinbase_smart_wallet","base_account","metamask","trust","safe","rainbow","uniswap","zerion","argent","spot","omni","cryptocom","blockchain","safepal","bitkeep","zengo","1inch","binance","exodus","mew_wallet","alphawallet","keyring_pro","mathwallet","unstoppable","obvious","ambire","internet_money_wallet","coin98","abc_wallet","arculus_wallet","haha","cling_wallet","broearn","copiosa","burrito_wallet","enjin_wallet","plasma_wallet","avacus","bee","pitaka","pltwallet","minerva","kryptogo","prema","slingshot","kriptonio","timeless","secux","bitizen","blocto","okx_wallet","safemoon","rabby_wallet","bybit_wallet","ronin_wallet","haha_wallet","privy","unknown","phantom","solflare","glow","backpack","mobile_wallet_adapter"],vn=Object.freeze({phantom:{client:"phantom",name:"Phantom",installLink:Ie.isFirefox?"https://addons.mozilla.org/en-US/firefox/addon/phantom-app/":"https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa?hl=en",chainTypes:["ethereum","solana"],get isInstalled(){if("phantom"in window){let e=window;if(e?.phantom?.ethereum?.isPhantom&&e?.phantom?.ethereum?.chainId||e?.phantom?.solana?.isPhantom)return!0}return!1},getMobileRedirect({useUniversalLink:e,isSolana:t,connectOnly:n}){let r=Cn({client:this.client,isSolana:t,connectOnly:n});return`${e?"phantom://":"https://phantom.app/ul/"}browse/${r}?ref=${r}`}},solflare:{client:"solflare",name:"Solflare",installLink:Ie.isFirefox?"https://addons.mozilla.org/es/firefox/addon/solflare-wallet/":"https://chromewebstore.google.com/detail/solflare-wallet/bhhhlbepdkbapadjdnnojkbgioiodbic",chainTypes:["solana"],get isInstalled(){return"solflare"in window&&!!window?.solflare?.isSolflare},getMobileRedirect({useUniversalLink:e,isSolana:t,connectOnly:n}){let r=Cn({client:this.client,isSolana:t,connectOnly:n});return`${e?"solflare://ul/v1/":"https://solflare.com/ul/v1/"}browse/${r}?ref=${r}`}},backpack:{client:"backpack",name:"Backpack",installLink:"https://chromewebstore.google.com/detail/backpack/aflkmfhebedbjioipglgcbcmnbpgliof",chainTypes:["ethereum","solana"],get isInstalled(){return!(!("backpack"in window)||!window?.backpack?.ethereum?.isBackpack&&!window?.backpack?.solana?.isBackpack)},getMobileRedirect({useUniversalLink:e,isSolana:t,connectOnly:n}){let r=Cn({client:this.client,isSolana:t,connectOnly:n});return`${e?"backpack://ul/v1/":"https://backpack.com/ul/v1/"}browse/${r}?ref=${r}`}},okx_wallet:{client:"okx_wallet",name:"OKX Wallet",installLink:"https://chromewebstore.google.com/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge",chainTypes:["solana"],get isInstalled(){return"okxwallet"in window&&!!window?.okxwallet?.isOkxWallet},getMobileRedirect({isSolana:e,connectOnly:t}){return"https://www.okx.com/download?deeplink="+encodeURIComponent("okx://wallet/dapp/url?dappUrl="+Cn({client:this.client,isSolana:e,connectOnly:t}))}}});function wn({connectorType:e,walletClientType:t}){for(let n of xn)if(e===n||t===n)return vn[n]}function Cn({client:e,isSolana:t,connectOnly:n}){let r=new URL(window.location.href);return r.searchParams.set("privy_connector",t?"solana_adapter":"injected"),r.searchParams.set("privy_wallet_client",e),r.searchParams.set("privy_connect_only",String(n)),encodeURIComponent(r.href.replace(/\/$/g,""))}const bn=()=>{let e=Ye.get(lt);return e&&Array.isArray(e)&&e.map((e=>(e=>e&&"string"==typeof e.address&&"string"==typeof e.connectorType&&"string"==typeof e.walletClientType&&"number"==typeof e.connectedAt)(e))).every(Boolean)?e:[]};let jn=["phantom","glow","solflare","backpack","okx_wallet","walletconnect","mobile_wallet_adapter"];function kn(e){return e.toLowerCase().split(" ").join("_")}class Tn extends cn{get isInstalled(){return!0}get wallet(){return this._wallet}buildConnectedWallet(){return this._wallet.accounts.map((e=>({type:"solana",provider:new a.ConnectedStandardSolanaWallet({wallet:this._wallet,account:e}),address:e.address,connectedAt:Date.now(),walletClientType:this._wallet.name,connectorType:this.connectorType,imported:!1,meta:{name:this._wallet.name,id:this._wallet.name,icon:this._wallet.icon},isConnected:async()=>this._wallet.accounts.length>0,disconnect:()=>{this.disconnect()}})))}async syncAccounts(){this.wallets=this.buildConnectedWallet(),this.emit("walletsUpdated")}get walletBranding(){return{id:this.wallet.name,name:this.wallet.name,icon:this.wallet.icon}}async initialize(){this.subscribeListeners(),await this.syncAccounts(),this.shouldAttemptAutoConnect()&&await(this.wallet.features["standard:connect"]?.connect({silent:!0}).catch((()=>{}))),this.initialized=!0,this.emit("initialized")}async connect(e){return e.showPrompt&&await this.promptConnection(),await this.isConnected()?this.getConnectedWallet():null}async getConnectedWallet(){return this.wallets.sort(((e,t)=>t.connectedAt-e.connectedAt))[0]||null}async isConnected(){return this._wallet.accounts.length>0}subscribeListeners(){this._unsubscribeListeners=this.wallet.features["standard:events"]?.on("change",this.onChange)}unsubscribeListeners(){this._unsubscribeListeners?.()}shouldAttemptAutoConnect(){return!(!this.autoConnectEnabled||!jn.includes(this.walletClientType))&&("phantom"!==this.walletClientType||bn().some((({walletClientType:e})=>"phantom"===e)))}constructor(e,t){super(kn(e.name)),this.chainType="solana",this.connectorType="solana_adapter",this.disconnect=()=>{this.wallet.features["standard:disconnect"]?.disconnect().catch((e=>console.error("Error disconnecting",e)))},this.promptConnection=async()=>{try{await(this.wallet.features["standard:connect"]?.connect())}catch(e){throw nn(e)}},this.onChange=()=>{this.syncAccounts()},this._wallet=e,this.autoConnectEnabled=t,this.wallets=[]}}class An extends Tn{get walletBranding(){return{id:this.id,name:this.name,icon:this.icon}}async initialize(){this.initialized=!0,this.emit("initialized")}async connect(){throw Error("connect called for an uninstalled wallet via the SolanaNullConnector")}constructor({id:e,name:t,icon:n}){super({name:t},!1),this.connectorType="null",this.proxyProvider=new pn(void 0,ct),this.disconnect=async()=>{throw Error("disconnect called for an uninstalled wallet via the SolanaNullConnector")},this.promptConnection=async()=>{throw Error("promptConnection called for an uninstalled wallet via the SolanaNullConnector")},this.id=e,this.name=t,this.icon=n}}function Sn(e){return"solana"===e.chainType}const En=ne.create((()=>({listings:[]}))),In=En.setState,Pn=e=>{let t;try{t=new URL(e).hostname}catch(e){return}return En.getState().listings.find((({homepage:e})=>{let n;try{n=new URL(e).hostname}catch(e){return!1}return t.includes(n)}))},Nn=e=>En((({listings:t})=>t.find((({slug:t})=>_n(t)===_n(e)))));function _n(e){return"cryptocom"===e?"cryptocom-defi":"binance"===e?"binance-defi":e.replace(/[-_]wallet$/,"")}function Mn({src:t,...n}){/*#__PURE__*/return e.jsx("img",{src:t,...n,style:{display:"none"}})}const Fn={appearance:{landingHeader:"Log in or sign up",theme:"light",walletList:["detected_ethereum_wallets","metamask","coinbase_wallet","rainbow","base_account","wallet_connect"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",externalWallets:{coinbaseWallet:{}},embeddedWallets:{extendedCalldataDecoding:!1},captchaEnabled:!1,_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let Ln=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","binance","binanceus","bitkeep"]),Wn=e=>Ln.has(e),Dn=(e,t,n)=>n.indexOf(e)===t;function Rn(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return Ce.default({...e.toHsl(),l:n})}function On(e,t){let n=e.getLuminance(),r=t.getLuminance();return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Bn({backgroundTheme:e,accentHex:t}){let n,r;"light"===e?n=!1:"dark"===e?n=!0:(n=.5>=Ce.default(e).getLuminance(),r=Ce.default(e).toHslString());let a=n?"dark":"light",i=n?Un:zn,{accent:o,accentLight:s,accentHover:l,accentDark:c,accentDarkest:d}=function(e,t){if(!e){let e=t?Un:zn;return{accent:Ce.default(e.background.interactive),accentLight:Ce.default(e.background.interactive),accentHover:Ce.default(e.background["interactive-hover"]),accentDark:Ce.default(e.background["interactive-clicked"]),accentDarkest:Ce.default(e.background["interactive-disabled"])}}let n=Ce.default(e);return{accent:n,accentLight:Rn(n,.15),accentHover:Rn(n,.3),accentDark:Rn(n,-.06),accentDarkest:Rn(n,-.6)}}(t,n),u=function(e){let t=Ce.default(zn.text.default),n=Ce.default(Un.text.default),r=On(e,t),a=On(e,n),i=e.toHsl();return i.h>=220&&i.h<=300&&a>=3?Un.text.default:r>a?zn.text.default:Un.text.default}(o),p=Ce.default(u),h=On(o,Ce.default(i.background.default))>=3;return{colorScheme:a,background:r||i.background.default,background2:i.background.elevated,background3:i.background.interactive,foreground:i.text.default,foreground2:i.text.muted,foreground3:i.text.placeholder,foreground4:i.border.default,accent:o.toHslString(),accentLight:s.toHslString(),accentHover:l.toHslString(),accentDark:c.toHslString(),accentDarkest:d.toHslString(),foregroundAccent:p.toHslString(),success:i.background.success,successDark:i.text.success,successLight:i.background.success,error:i.text.error,errorLight:i.background.error,warn:i.background.warning,warnLight:i.background.warning,warningDark:i.text.warning,errorDark:i.text.error,successBg:i.background.success,errorBg:i.background.error,errorBgHover:i.background["error-hover"],warnBg:i.background.warning,infoBg:i.background.info,infoBgHover:i.background["info-hover"],borderDefault:i.border.default,borderHover:i.border["default-hover"],borderFocus:i.border.focused,borderError:i.border.error,borderSuccess:i.border.success,borderWarning:i.border.warning,borderInfo:i.border.info,borderInteractive:i.border.interactive,borderInteractiveHover:i.border["interactive-hover"],backgroundHover:i.background["default-hover"],backgroundClicked:i.background["default-clicked"],backgroundDisabled:i.background["default-disabled"],backgroundInteractive:i.background.interactive,backgroundInteractiveHover:i.background["interactive-hover"],backgroundInteractiveClicked:i.background["interactive-clicked"],backgroundInteractiveDisabled:i.background["interactive-disabled"],foregroundHover:i.text.default,foregroundClicked:i.text.default,foregroundDisabled:i.text["default-disabled"],foregroundInteractive:i.text.interactive,foregroundInteractiveHover:i.text["interactive-hover"],accentHasGoodContrast:h?"1":"0",linkNavigationColor:h?o.toHslString():i.text.default,linkNavigationDecoration:h?"none":"underline",iconDefault:i.icon.default,iconMuted:i.icon.muted,iconSubtle:i.icon.subtle,iconInverse:i.icon.inverse,iconSuccess:i.icon.success,iconWarning:i.icon.warning,iconError:i.icon.error,iconInteractive:i.icon.interactive,iconDefaultHover:i.icon["default-hover"],iconMutedHover:i.icon["muted-hover"],iconSubtleHover:i.icon["subtle-hover"],iconDefaultClicked:i.icon["default-clicked"],iconMutedClicked:i.icon["muted-clicked"],iconSubtleClicked:i.icon["subtle-clicked"],iconDefaultDisabled:i.icon["default-disabled"],iconMutedDisabled:i.icon["muted-disabled"],iconSubtleDisabled:i.icon["subtle-disabled"],iconErrorHover:i.icon["error-hover"],iconInteractiveHover:i.icon["interactive-hover"],iconErrorClicked:i.icon["error-clicked"],iconInteractiveClicked:i.icon["interactive-clicked"],iconMutedDisabledAlt:i.icon["muted-disabled"],iconSubtleDisabledAlt:i.icon["subtle-disabled"]}}const Un={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","elevated-hover":"#242B3B","default-clicked":"#1A2230","elevated-clicked":"#2C3444","default-disabled":"#020713","elevated-disabled":"#141824",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#EF4444","interactive-clicked":"#6560CC","muted-disabled-alt":"#404452","subtle-disabled-alt":"#404452"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",inverse:"#020713",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-hover":"#F8F8F8","muted-hover":"#9BA2AE","placeholder-hover":"#656C78","default-clicked":"#F8F8F8","muted-clicked":"#9BA2AE","placeholder-clicked":"#656C78","default-disabled":"#404452","muted-disabled":"#404452","placeholder-disabled":"#404452","error-hover":"#FA8B8B","interactive-hover":"#8C88E5","error-clicked":"#F87171","interactive-clicked":"#7671CC","error-disabled":"#404452","interactive-disabled":"#404452"},border:{default:"#1F2937",primary:"#110F2A",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF","default-clicked":"#1F2937","interactive-clicked":"#88B0FF","default-active":"#F8F8F8","default-disabled":"#1F2937","interactive-disabled":"#1F2937","error-hover":"#971B1C","error-clicked":"#971B1C","error-disabled":"#1F2937"}},zn={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","elevated-hover":"#E8E9F4","default-clicked":"#F1F2F9","elevated-clicked":"#DFE0EF","default-disabled":"#FFFFFF","elevated-disabled":"#F1F2F9",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482","error-disabled":"#CBCDE1","interactive-disabled":"#CBCDE1"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",inverse:"#FFFFFF",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-hover":"#040217","muted-hover":"#64668B","placeholder-hover":"#9498B8","default-clicked":"#040217","muted-clicked":"#64668B","placeholder-clicked":"#9498B8","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","placeholder-disabled":"#CBCDE1","error-hover":"#991B1B","interactive-hover":"#5B4FFF","error-clicked":"#991B1B","interactive-clicked":"#5B4FFF","error-disabled":"#CBCDE1","interactive-disabled":"#CBCDE1"},border:{default:"#E2E3F0",primary:"#110F2A",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF","default-clicked":"#E2E3F0","interactive-clicked":"#5B4FFF","default-active":"#110F2A","default-disabled":"#E2E3F0","interactive-disabled":"#E2E3F0","error-hover":"#F69393","error-clicked":"#F69393","error-disabled":"#E2E3F0"}};function Hn(e,t,n,r){let i,o,s,l,c,d,u,p,h,g,m,y,f,x,v,w,C=n?console.warn:()=>{};t?.loginMethods?(i=t.loginMethods.includes("email"),o=t.loginMethods.includes("sms"),l=t.loginMethods.includes("wallet"),c=t.loginMethods.includes("google"),d=t.loginMethods.includes("twitter"),u=t.loginMethods.includes("discord"),g=t.loginMethods.includes("spotify"),m=t.loginMethods.includes("instagram"),p=t.loginMethods.includes("tiktok"),h=t.loginMethods.includes("line"),f=t.loginMethods.includes("github"),y=t.loginMethods.includes("linkedin"),x=t.loginMethods.includes("apple"),v=t.loginMethods.includes("farcaster"),w=t.loginMethods.includes("telegram"),s=t.loginMethods.includes("passkey")):(i=e.email_auth,o=e.sms_auth,l=e.wallet_auth||e.solana_wallet_auth,c=e.google_oauth,d=e.twitter_oauth,u=e.discord_oauth,f=e.github_oauth,g=e.spotify_oauth,m=e.instagram_oauth,p=e.tiktok_oauth,h=e.line_oauth,y=e.linkedin_oauth,x=e.apple_oauth,v=e.farcaster_auth,w=e.telegram_auth,s=e.passkey_auth),e.passkey_auth&&(s=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(s=!1);let b=[i,o].filter(Boolean),j=[c,d,u,f,g,m,p,h,y,x,v,w].filter(Boolean),k=[l].filter(Boolean),T=t?.loginMethods?.includes("passkey")??!1,A=e.passkeys_for_signup_enabled??!1,S=[s&&(A||T)].filter(Boolean);if(b.length+j.length+k.length+S.length===0)throw Error("You must enable at least one login method");let E=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.show_wallet_login_first;E&&0===k.length?(C("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),E=!1):E||j.length+b.length!==0||(C("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),E=!0);let I=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&C("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let P=(({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(Wn).filter(Dn):e?e.filter(Wn).filter(Dn):Fn.appearance.walletList)({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),N=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],n=[];for(let n of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(n)?console.warn(`Duplicated login method: ${n}`):t.push(n);for(let r of e.overflow??[])t.includes(r)||n.includes(r)?console.warn(`Duplicated login method: ${r}`):n.push(r);return{primary:t,overflow:n}})({input:t?.loginMethodsAndOrder}),_=t?.intl?.defaultCountry??"US",{chains:M,defaultChain:F}=function({supportedChains:e,defaultChainFromConfig:t}){let n;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");n=a.dedupeSupportedChains(e)}else n=[...a.DEFAULT_SUPPORTED_CHAINS];let r=e?n[0]:a.mainnet,i=t??r;if(!n.find((e=>e.id===i.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:n,defaultChain:i}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),L=!!t?.defaultChain,W=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,D=W?"all-users":e.embedded_wallet_config.ethereum.create_on_login,R=e.embedded_wallet_config.solana.create_on_login;e.solana_wallet_auth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`");let O=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,B=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0;return{id:e.id,name:e.name,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:t?.appearance?.logo??e.logo_url??void 0,landingHeader:t?.appearance?.landingHeader??Fn.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:Bn({backgroundTheme:t?.appearance?.theme??Fn.appearance.theme,accentHex:t?.appearance?.accentColor??e.accent_color}),loginGroupPriority:E?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:P,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.wallet_auth??!1,solanaWalletAuth:e.solana_wallet_auth??!1})},loginMethods:{wallet:l,email:i,sms:o,passkey:s,google:c,twitter:d,discord:u,github:f,spotify:g,instagram:m,tiktok:p,line:h,linkedin:y,apple:x,farcaster:v,telegram:w},disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:N,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.terms_and_conditions_url,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacy_policy_url,requireUsersAcceptTerms:e.require_users_accept_terms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.wallet_connect_cloud_project_id??Fn.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:t?.externalWallets?.signatureRequestTimeouts??{}},chains:M,defaultChain:F,intl:{defaultCountry:_},shouldEnforceDefaultChainOnConnect:L,captchaEnabled:e.captcha_enabled??Fn.captchaEnabled,captchaSiteKey:e.captcha_site_key,externalWallets:{coinbaseWallet:{config:{appName:e.name,appLogoUrl:e.logo_url,preference:{options:"all",...t?.externalWallets?.coinbaseWallet?.config?.preference},...t?.externalWallets?.coinbaseWallet?.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...t?.externalWallets?.baseAccount?.config,preference:{...t?.externalWallets?.baseAccount?.config?.preference,telemetry:!1}}},walletConnect:{enabled:I},solana:{connectors:t?.externalWallets?.solana?.connectors},disableAllExternalWallets:t?.externalWallets?.disableAllExternalWallets??!1},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!W&&(e.embedded_wallet_config.require_user_owned_recovery_on_create??!1),userOwnedRecoveryOptions:W?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:t?.embeddedWallets?.priceDisplay??{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:t?.embeddedWallets?.ethereum?.createOnLogin??D},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??R},disableAutomaticMigration:t?.embeddedWallets?.disableAutomaticMigration??!1,mode:e.embedded_wallet_config.mode,showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforce_wallet_uis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??r??"https://auth.privy.io"}},mfa:{methods:e.mfa_methods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink},customAuth:W?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:O,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??Fn._render.standalone},fundingConfig:B,fundingMethodConfig:{...t?.fundingMethodConfig??Fn.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??Fn.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??Fn.fundingMethodConfig.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:t?.customOAuthRedirectUrl,solanaRpcs:{"solana:mainnet":t?.solana?.rpcs?.["solana:mainnet"]??null,"solana:devnet":t?.solana?.rpcs?.["solana:devnet"]??null,"solana:testnet":t?.solana?.rpcs?.["solana:testnet"]??null}}}const Vn={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},fiat_on_ramp_enabled:!1,captcha_enabled:!1,captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1},$n=Hn(Vn,void 0,!1);let qn=/*#__PURE__*/n.createContext({appConfig:$n,isServerConfigLoaded:!1});const Gn=()=>{let{appConfig:e}=n.useContext(qn);return e},Yn=/*#__PURE__*/n.createContext({app:$n,currentScreen:null,lastScreen:null,navigate:s.notImplemented,navigateBack:s.notImplemented,resetNavigation:s.notImplemented,setModalData:s.notImplemented,onUserCloseViaDialogOrKeybindRef:void 0}),Zn=()=>n.useContext(Yn),Kn=({style:t,...n})=>{let{app:r}=Zn();/*#__PURE__*/return e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...t},...n,children:[/*#__PURE__*/e.jsx("rect",{width:"28",height:"28",rx:"3",fill:"dark"===r?.appearance.palette.colorScheme?"#3396ff":"#141414"}),/*#__PURE__*/e.jsx("g",{clipPath:"url(#clip0_1765_9946)",children:/*#__PURE__*/e.jsx("path",{d:"M8.09448 10.3941C11.3558 7.20196 16.6442 7.20196 19.9055 10.3941L20.2982 10.7782C20.3369 10.8157 20.3677 10.8606 20.3887 10.9102C20.4097 10.9599 20.4206 11.0132 20.4206 11.0671C20.4206 11.121 20.4097 11.1744 20.3887 11.224C20.3677 11.2737 20.3369 11.3186 20.2982 11.3561L18.9554 12.6702C18.9158 12.7086 18.8628 12.7301 18.8077 12.7301C18.7526 12.7301 18.6996 12.7086 18.66 12.6702L18.1198 12.1415C15.8448 9.91503 12.1557 9.91503 9.88015 12.1415L9.30167 12.7075C9.26207 12.7459 9.20909 12.7673 9.15395 12.7673C9.0988 12.7673 9.04582 12.7459 9.00622 12.7075L7.66346 11.3934C7.62475 11.3559 7.59397 11.3109 7.57295 11.2613C7.55193 11.2117 7.5411 11.1583 7.5411 11.1044C7.5411 11.0505 7.55193 10.9971 7.57295 10.9475C7.59397 10.8979 7.62475 10.8529 7.66346 10.8154L8.09448 10.3941ZM22.6829 13.1115L23.8776 14.2814C23.9163 14.319 23.9471 14.3639 23.9681 14.4135C23.9892 14.4632 24 14.5165 24 14.5704C24 14.6243 23.9892 14.6777 23.9681 14.7273C23.9471 14.777 23.9163 14.8219 23.8776 14.8594L18.4893 20.1332C18.4102 20.2101 18.3042 20.2531 18.1938 20.2531C18.0835 20.2531 17.9775 20.2101 17.8984 20.1332L14.0743 16.3901C14.0545 16.3708 14.0279 16.36 14.0003 16.36C13.9726 16.36 13.9461 16.3708 13.9263 16.3901L10.1021 20.1332C10.023 20.2101 9.91703 20.2531 9.8067 20.2531C9.69636 20.2531 9.59038 20.2101 9.51124 20.1332L4.12236 14.8594C4.08365 14.8219 4.05287 14.777 4.03185 14.7273C4.01083 14.6777 4 14.6243 4 14.5704C4 14.5165 4.01083 14.4632 4.03185 14.4135C4.05287 14.3639 4.08365 14.319 4.12236 14.2814L5.31767 13.1115C5.39678 13.0348 5.50265 12.9919 5.61285 12.9919C5.72305 12.9919 5.82892 13.0348 5.90803 13.1115L9.73216 16.8546C9.75194 16.874 9.7785 16.8848 9.80616 16.8848C9.83381 16.8848 9.86037 16.874 9.88015 16.8546L13.7043 13.1115C13.7834 13.0346 13.8894 12.9916 13.9997 12.9916C14.1101 12.9916 14.216 13.0346 14.2952 13.1115L18.1198 16.8546C18.1396 16.874 18.1662 16.8848 18.1938 16.8848C18.2215 16.8848 18.2481 16.874 18.2678 16.8546L22.092 13.1115C22.1711 13.0346 22.2771 12.9916 22.3874 12.9916C22.4977 12.9916 22.6037 13.0346 22.6829 13.1115Z",fill:"white"})}),/*#__PURE__*/e.jsx("defs",{children:/*#__PURE__*/e.jsx("clipPath",{id:"clip0_1765_9946",children:/*#__PURE__*/e.jsx("rect",{width:"20",height:"12.2531",fill:"white",transform:"translate(4 8)"})})})]})},Qn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAHdElNRQfoDAIVODUC+w+GAAAGsUlEQVRYw6WXbYwWVxXHf+fOLAtCXYS2QJdIaClipGCTknXXNqBQMVHbfmhItH4Aral+IAEaG03UxJgYKQJGTUxtDWjaxDSNtcZqIGDwpRuW1oYiVqpdpZSlpC3qysu+PHPP3w/3mXnmeXZbPzjJZO7cefn/z/mfe865xlscq3dGDIguGiHLaMQVLja4s87FShcLo5jtApdddnHexUmHIy475JmdUkPRAQMu7gzT4ljnxJpdk0QPmMFkyAKN2OfOFpc2uuh1J3MZDrjAvXmVEQUuoosRxw642FcEG7IoDxiFxNiu8NYE+vcUYIFYRKKs113bXWx2Z34CoQZsVHOiCZ7mopdzdsFhv8NexEgRDHMxUSNREbh1bwNZwBsFblmfu/a4a6AEENYO5i3AOoEWeEUCF4MOOxBDMQAOk99OJALA2u80sBCwWGBZWG/yRwMaCAbBIAsQTJT3gea1OWfNeaPzvjoHEI85rA8ObtB1v7cIdJkIHgkh9AXpocy0LJjIKvB2wPpZB0v3wkrw5jdNEjeYeMhFX3BAyfn2ke9NUrgB9LrrcZcGJFCld4fWNddXbvbWfWzGR6xJFZsBGh0cBh3bBIxIEGTQ3W0h4NuDaSAzyAxCmGq11Vzf5uaa1aG8p+WFtrEYQGwvjICJkAEqvC+YNmcmMlMNvEaCdrcbyUvQAWDTjVuESHObM6cPGWHmzDwLaEtmzG9Z3qF1zUpXmuuZBb1z4bqeNC6f0WE1NtUTwHzEloiy3BvFisy0sYoLlQtT6XW15md2Qf9SY+2Ngfdca/TMSm/9ewz+/Boc/It45h/i4kSTsKw90SQJsPTvjSZbkWemDW7qTRZ0JEYJWSKxZJ7xmf6M224MzMzbX1s8F1YugjtvMg6eErt/4/z1jUrz1rXUKxnZC2zIg2mdBTK1mFUOKC1fOt/48kdzVixIz86Nij+eEacvpJWyZJ5xy7th8VzjjpuMJfMCW58QL73ekXPVlhsyE+vyzFiplJyauEIyrGIquruMq7qTxk+dcB495rzyTzFepCUWLIFv/kBg081Gd55WUk1IDGFTS89K++TDYxddzKnWcbluHd450xgdh7EGrOo1rr868PMTzqWJRGZ2d8oB/xpL33Xnxl2rjeNn4blXRXduzJ4B5y+28kWscAwXl+yeR654FFZPHoUb710YuPeDOUdPO48di1xptKpeEeHqOcYXNwQKGd88EDk3mqxtxPSfGRlsXRtYt8z4ytPOH/7eqpg1Aso7fYKgK4NPrMpYvsC4/poMA34yVJIQC3sCD9yecdsNyaV5yPj6ryJnR1PAvSNP4J+/1cgDfLbfePaMGGtM7Qdyl12WmKOmXgKKAp54vmBRTxfLrjE+tSYjBPjRM5FrrzIeuD2jf2lLzw8vN4JlfPVp581LsO1DgXv7jSzAiXPw/d+JiYLpjsu26Yfjf5O0rF5WoxsNT9G/bX0XKxakmPjlSee6HlizJJXSX7/oRDc+vjKR+f2wODcKd78/gR8/C9uedF44myJxmhh4OY/ipMQyqaWxmjn95TfEroMFOzbkvG+RceeqViPx1Aln1yEnOow1AnffHCpJAJ5/Vex4UvzptZRdY/O/1dJIS/NkcNmR6MTYah6qzseA4TfFtw4UvHBW1bc/O+7sPhwZHYf/jMODh5yfPudVbXj2TAJ/8XxrOZagNamj4Ei2/GNfuyRxh8t6BG2l15up+MIVODEiFr8rcPS0+O6RBF6mrrEGHHtFzOo2Lo7Dl37hvPQ6mNV6R9JYKgnYWcE37K5HlE2OT/5A0udaPUBHH+BQOMzuNsYLuDyZflTW+fTcmJFDHhJhaZqewMuewXDxcDR9IYyPN6Jj+6K4MF2vV8qBtZJScqVRNi6lpGONVJis5mpKi1WbgwsY+zIsBpcR8mzIZfuTRVZrtdu9odrptR/Xx5XONXJqBmCN0P6YMUQq9WJiwt0Je102WHdbpxSqydMObBWYdwDWLVcqcIMYe3NPjg0Ht84od0Ajju1w2XCr9e6QoqM9V23ZtnmI6cfAMMb9AY0YEHdb6oobEh4y3H3Ize6LsmGvN5IdUnhttdQ9UVrfLk/ljWEZ9wXsqAdQk1EA+O22GcgdZTke/bAs3OPY4HSdcB20HhvVtTMu0jmI8ekAhz2IICj2hKpNqI60NcuIRUHEej1quzubXa2tmZhenrfZmv3YYQ9ipDAIgvHptmblccuDjdRcmjFpWbDi/9ycZjZkRbk5jYztai/AUwiUx+qdEQB/m+25i9lxyvbcjrg45Lmd0uT/3p7/Fw6ODf+WO019AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI0LTEyLTAyVDIxOjU2OjQ4KzAwOjAwMVpslgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNC0xMi0wMlQyMTo1Njo0OCswMDowMEAH1CoAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjQtMTItMDJUMjE6NTY6NTMrMDA6MDDZv6GRAAAAAElFTkSuQmCC";class Xn extends un{async initialize(){let e=await this.createProvider();this.provider=e,this.proxyProvider.setWalletProvider(e),this.subscribeListeners(),e.session&&(this.walletProvider?.session?.peer.metadata.url&&(this.walletEntry=Pn(this.walletProvider?.session?.peer.metadata.url),this.walletClientType=this.walletEntry?.slug||"unknown"),this.connected=!0,await this.syncAccounts()),this.initialized=!0,this.emit("initialized")}async connect(e){return e.showPrompt&&await this.promptConnection(),this.getConnectedWallet()}async isConnected(){return!!this.walletProvider?.connected}get walletBranding(){let e=this.walletProvider?.session?.peer.metadata.icons?.[0];return{name:Ut(this.walletProvider?.session?.peer.metadata.name||"")||"WalletConnect",icon:"string"==typeof e?e:Qn,id:this.walletProvider?.session?.peer.metadata.name.toLowerCase()||"wallet_connect_v2"}}async resetConnection(e){this.walletProvider&&this.walletProvider.connected&&(await this.walletProvider.disconnect(),this.walletProvider.signer.session=void 0,this.walletClientType=e,this.redirectUri=void 0,this.fallbackUniversalRedirectUri=void 0,function(){try{localStorage.removeItem(Qe)}catch{}}(),this.onDisconnect())}async promptConnection(){if(this.provider)return new Promise(((e,t)=>{(async()=>{let t="",n=await Promise.race([this.walletProvider?.enable(),this.proxyProvider.walletTimeout()]);if(n?.length&&(t=n[0]),!t||""===t)throw new h.PrivyConnectorError("Unable to retrieve address");this.walletProvider?.session?.peer.metadata.url&&(this.walletEntry=Pn(this.walletProvider?.session?.peer.metadata.url),this.walletClientType=this.walletEntry?.slug||"unknown",this.proxyProvider.rpcTimeoutDuration=dn(this.rpcConfig,this.walletClientType)),this.connected=!0,await this.syncAccounts(n),e()})().catch((e=>{t(e?nn(e):new h.PrivyConnectorError("Unknown error during connection"))}))}))}disconnect(){this.walletProvider?.disconnect().then((()=>this.onDisconnect())).catch((()=>console.warn("Unable to disconnect WalletConnect provider")))}get walletProvider(){return this.proxyProvider.walletProvider}setWalletProvider(e){this.proxyProvider.setWalletProvider(e)}async createProvider(){let e={};for(let t of this.chains){let n=Ht(t.id,this.chains,this.rpcConfig,this.privyAppId);n&&(e[t.id]=n)}let t=this.shouldEnforceDefaultChainOnConnect?[this.defaultChain.id]:[],n=this.chains.map((e=>e.id)),r=await re.EthereumProvider.init({projectId:this.walletConnectCloudProjectId,chains:t,optionalChains:n,optionalEvents:re.OPTIONAL_EVENTS,optionalMethods:re.OPTIONAL_METHODS,rpcMap:e,showQrModal:!1,metadata:{description:this.privyAppName,name:this.privyAppName,url:window.location.origin,icons:[]}});return r.on("display_uri",(e=>{if(r.signer.abortPairingAttempt(),function(){try{localStorage.removeItem(Qe)}catch{}}(),!this.showPrivyQrModal)throw new h.PrivyConnectorError("WalletConnect modal not available - Privy handles wallet connections through its own UI");if(W.isMobile&&this.walletEntry){let{redirect:t,href:n}=function(e,t){let n=Ze(t);if(n.deepLink)return Je(n.deepLink,e);if(n.universalLink)return et(n.universalLink,e);throw new h.PrivyClientError(`Unsupported wallet ${t.id}`)}(e,this.walletEntry);tt(t,"_self"),function({href:e,name:t}){try{localStorage.setItem(Qe,JSON.stringify({href:e,name:t}))}catch{}}({href:n,name:this.walletEntry.metadata?.shortName||this.walletEntry.name});let r=Ke(e,this.walletEntry);return this.redirectUri=t,this.fallbackUniversalRedirectUri=r?.redirect,this.showPrivyQrModal({native:t,universal:t})}if(this.redirectUri=void 0,this.walletEntry){let t=Ke(e,this.walletEntry);this.fallbackUniversalRedirectUri=t?.redirect}this.showPrivyQrModal({native:e,universal:void 0})})),r.on("connect",(()=>{r.session?.peer.metadata.url&&(this.walletEntry=Pn(r.session?.peer.metadata.url),this.walletClientType=this.walletEntry?.slug||"unknown")})),r}async enableProvider(){return this.walletProvider?.connected?Promise.resolve(this.walletProvider.accounts):await(this.walletProvider?.enable())}setWalletEntry(e,t){this.walletEntry=e,this.showPrivyQrModal=t}constructor({walletConnectCloudProjectId:e,rpcConfig:t,chains:n,defaultChain:r,shouldEnforceDefaultChainOnConnect:a,privyAppId:i,privyAppName:o,walletClientType:s}){super(s||"unknown",n,r,t),this.connectorType="wallet_connect_v2",this.privyAppId=i,this.privyAppName=o,this.walletConnectCloudProjectId=e,this.rpcConfig=t,this.shouldEnforceDefaultChainOnConnect=a,this.proxyProvider=new pn(void 0,this.rpcTimeoutDuration),s&&(this.walletEntry=(e=>En.getState().listings.find((({slug:t})=>_n(t)===_n(e))))(s),this.walletClientType=s)}}const Jn=/*#__PURE__*/n.createContext(void 0);let er=()=>n.useContext(Jn);function tr(e,t){if(!t)return;let r=er().current[e];return n.useEffect((()=>{for(let[n,a]of Object.entries(t))Object.prototype.hasOwnProperty.call(r,n)||console.warn(`Invalid event type "${n}" for action "${e}"`),r[n]?.push(a);return()=>{for(let[n,a]of Object.entries(t))Object.prototype.hasOwnProperty.call(r,n)||console.warn(`Invalid event type "${n}" for action "${e}"`),r[n]=r[n]?.filter((e=>e!==a))}}),[t])}function nr(e,t,n,...r){for(let a of e.current[t][n])a(...r)}function rr(){let e=er();return(t,n,...r)=>nr(e,t,n,...r)}const ar=/*#__PURE__*/o.styled.div.withConfig({displayName:"Grow",componentId:"sc-681ff332-0"})(["text-align:left;flex-grow:1;"]),ir=/*#__PURE__*/o.styled.div.withConfig({displayName:"AlignBottom",componentId:"sc-681ff332-1"})(["display:flex;flex-direction:column;justify-content:flex-end;flex-grow:1;"]),or=/*#__PURE__*/o.styled.div.withConfig({displayName:"LoginMethodContainer",componentId:"sc-681ff332-2"})(["display:flex;flex-direction:column;gap:8px;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]),sr=/*#__PURE__*/o.styled(or).withConfig({displayName:"LoginMethodContainerWithScrollShadows",componentId:"sc-681ff332-3"})([""," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;max-height:400px;overflow-y:auto;scrollbar-width:none;padding:3px;"],(e=>"light"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0));let lr=/*#__PURE__*/o.css(["&&{width:100%;font-size:16px;line-height:24px;min-height:56px;@media (min-width:440px){font-size:14px;}display:flex;gap:12px;align-items:center;color:var(--privy-color-foreground);padding:10px 12px;border:1px solid var(--privy-color-foreground-4) !important;border-radius:var(--privy-border-radius-md);transition:background-color 200ms ease;cursor:pointer;&:hover{background-color:var(--privy-color-background-2);}&:disabled{cursor:pointer;background-color:var(--privy-color-background-2);}}"]);const cr=/*#__PURE__*/o.styled.div.withConfig({displayName:"Subtitle",componentId:"sc-681ff332-4"})(["text-align:center;font-size:14px;margin-bottom:24px;"]),dr=/*#__PURE__*/o.styled.button.attrs({className:"login-method-button"}).withConfig({displayName:"LoginMethodButton",componentId:"sc-681ff332-5"})(["",""],lr),ur=/*#__PURE__*/o.styled.div.withConfig({displayName:"LoginMethodIconWrapper",componentId:"sc-681ff332-7"})(["width:32px;height:32px;border-radius:",";background:",";display:flex;align-items:center;justify-content:center;flex-shrink:0;svg{width:",";height:",";color:",";}"],(e=>e.$fullSize?"0":"4px"),(e=>e.$fullSize?"transparent":"var(--privy-color-background-2)"),(e=>e.$fullSize?"32px":"18px"),(e=>e.$fullSize?"32px":"18px"),(e=>e.$fullSize?"inherit":"var(--privy-color-icon-muted)")),pr=/*#__PURE__*/o.styled.div.withConfig({displayName:"Hide",componentId:"sc-681ff332-8"})(["width:100%;height:100%;min-height:inherit;display:flex;flex-direction:column;",""],(e=>e.$if?"display: none;":"")),hr=/*#__PURE__*/o.styled.div.withConfig({displayName:"EmptyWalletState",componentId:"sc-681ff332-9"})(["width:100%;height:100%;padding:",";"],(e=>e.$withPadding?"64px 0px":"0px")),gr=/*#__PURE__*/o.styled.div.withConfig({displayName:"Header",componentId:"sc-681ff332-10"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-bottom:32px;gap:12px;& h3{font-size:18px;font-style:normal;font-weight:600;line-height:24px;}& p{max-width:300px;font-size:14px;font-style:normal;font-weight:400;line-height:20px;}"]);function mr(t){/*#__PURE__*/return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...t,children:/*#__PURE__*/e.jsx("g",{fill:t.color||"var(--privy-color-foreground)",children:/*#__PURE__*/e.jsx("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let yr=/*#__PURE__*/o.styled.span.withConfig({displayName:"TermsAndConditionsContainer",componentId:"sc-ff3bd734-0"})(["margin-top:16px;font-size:13px;text-align:center;color:var(--privy-color-foreground-3);display:block;&& > a{color:var(--privy-color-accent);}"]);function fr({app:{legal:{privacyPolicyUrl:t,termsAndConditionsUrl:n,requireUsersAcceptTerms:r}},alwaysShowImplicitConsent:a}){let i=!(!t||!n);return r&&!a||!n&&!t?
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("@heroicons/react/24/outline/CheckCircleIcon"),n=require("react"),r=require("viem"),a=require("@privy-io/js-sdk-core"),i=require("@heroicons/react/24/outline/InformationCircleIcon"),o=require("styled-components"),s=require("./internal-context-DNWjSiYq.js"),l=require("@heroicons/react/24/outline/CreditCardIcon"),c=require("@heroicons/react/24/outline/QrCodeIcon"),d=require("@heroicons/react/24/solid/ArrowsRightLeftIcon"),u=require("viem/utils"),p=require("@heroicons/react/24/outline/ExclamationCircleIcon"),h=require("./paths-B00ZrFQm.js"),g=require("@heroicons/react/24/outline/WalletIcon"),m=require("@heroicons/react/24/outline/GlobeAltIcon"),y=require("@headlessui/react"),f=require("@heroicons/react/24/outline/ChevronDownIcon"),x=require("@heroicons/react/24/solid/CheckCircleIcon"),v=require("ofetch"),w=require("./privy-context-C4y2c3Ko.js"),C=require("@heroicons/react/24/outline"),b=require("@heroicons/react/24/outline/ClipboardDocumentCheckIcon"),j=require("@heroicons/react/24/outline/ClipboardDocumentIcon"),k=require("@privy-io/ethereum"),T=require("lucide-react"),A=require("@heroicons/react/24/outline/ExclamationTriangleIcon"),S=require("@scure/base"),E=require("tinycolor2"),I=require("@heroicons/react/24/outline/UserCircleIcon"),P=require("@heroicons/react/24/outline/ArrowLeftIcon");require("@heroicons/react/24/outline/ArrowRightIcon");var N=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),_=require("@heroicons/react/24/outline/XMarkIcon"),M=require("@heroicons/react/20/solid/CheckIcon"),F=require("@heroicons/react/24/outline/EnvelopeIcon"),L=require("@heroicons/react/24/outline/PhoneIcon"),W=require("react-device-detect"),D=require("@heroicons/react/24/outline/Square2StackIcon"),R=require("fast-password-entropy"),O=require("secure-password-utilities"),B=require("secure-password-utilities/wordlists"),U=require("@heroicons/react/24/outline/LockClosedIcon"),z=require("@heroicons/react/24/outline/PencilSquareIcon"),H=require("jose"),V=require("@heroicons/react/24/outline/ArrowPathIcon"),$=require("@heroicons/react/24/outline/EyeIcon"),q=require("@heroicons/react/24/outline/EyeSlashIcon"),G=require("@heroicons/react/24/outline/KeyIcon"),Y=require("@heroicons/react/24/outline/ArrowDownTrayIcon"),Z=require("@heroicons/react/24/outline/DocumentDuplicateIcon"),K=require("@heroicons/react/24/solid/XCircleIcon"),Q=require("@heroicons/react/24/outline/ShieldCheckIcon"),X=require("@tanstack/react-virtual"),J=require("@heroicons/react/24/outline/CheckIcon"),ee=require("qrcode"),te=require("eventemitter3"),ne=require("zustand"),re=require("@walletconnect/ethereum-provider"),ae=require("@heroicons/react/24/outline/FingerPrintIcon");function ie(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function oe(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var se=/*#__PURE__*/ie(t),le=/*#__PURE__*/ie(n),ce=/*#__PURE__*/ie(i),de=/*#__PURE__*/ie(l),ue=/*#__PURE__*/ie(c),pe=/*#__PURE__*/ie(d),he=/*#__PURE__*/ie(p),ge=/*#__PURE__*/ie(g),me=/*#__PURE__*/ie(m),ye=/*#__PURE__*/ie(f),fe=/*#__PURE__*/ie(x),xe=/*#__PURE__*/ie(b),ve=/*#__PURE__*/ie(j),we=/*#__PURE__*/ie(A),Ce=/*#__PURE__*/ie(E),be=/*#__PURE__*/ie(I),je=/*#__PURE__*/ie(P),ke=/*#__PURE__*/ie(N),Te=/*#__PURE__*/ie(_),Ae=/*#__PURE__*/ie(M),Se=/*#__PURE__*/ie(F),Ee=/*#__PURE__*/ie(L),Ie=/*#__PURE__*/oe(W),Pe=/*#__PURE__*/ie(D),Ne=/*#__PURE__*/ie(R),_e=/*#__PURE__*/oe(O),Me=/*#__PURE__*/ie(U),Fe=/*#__PURE__*/ie(z),Le=/*#__PURE__*/ie(V),We=/*#__PURE__*/ie($),De=/*#__PURE__*/ie(q),Re=/*#__PURE__*/ie(G),Oe=/*#__PURE__*/ie(Y),Be=/*#__PURE__*/ie(Z),Ue=/*#__PURE__*/ie(K),ze=/*#__PURE__*/ie(Q),He=/*#__PURE__*/ie(J),Ve=/*#__PURE__*/ie(ee),$e=/*#__PURE__*/ie(te),qe=/*#__PURE__*/ie(ae);class Ge{get(e){let t=localStorage.getItem(e);return null===t?void 0:JSON.parse(t)}put(e,t){void 0!==t?localStorage.setItem(e,JSON.stringify(t)):this.del(e)}del(e){localStorage.removeItem(e)}getKeys(){return Object.entries(localStorage).map((([e])=>e))}}var Ye="undefined"!=typeof window&&window.localStorage?new Ge:new class{get(e){return this._cache[e]}put(e,t){void 0!==t?this._cache[e]=t:this.del(e)}del(e){delete this._cache[e]}getKeys(){return Object.keys(this._cache)}constructor(){this._cache={}}};function Ze(e){return{name:e.metadata?.shortName||e.name||"",universalLink:e.mobile.universal,deepLink:e.mobile.native}}function Ke(e,t){let n=Ze(t);if(n.universalLink)return et(n.universalLink,e)}let Qe="WALLETCONNECT_DEEPLINK_CHOICE";function Xe(e){return e.startsWith("http://")||e.startsWith("https://")}function Je(e,t){if(Xe(e))return et(e,t);let n=e;return n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),{redirect:`${n}wc?uri=${encodeURIComponent(t)}`,href:n}}function et(e,t){if(!Xe(e))return Je(e,t);let n=e;return n.endsWith("/")||(n=`${n}/`),{redirect:`${n}wc?uri=${encodeURIComponent(t)}`,href:n}}function tt(e,t){window.open(e,t,"noreferrer noopener")}class nt{execute(e){return null===this.promise&&(this.promise=(async()=>{try{return await this.fn(e)}finally{this.promise=null}})()),this.promise}constructor(e){this.promise=null,this.fn=e}}const rt=1400,at=4e3,it="privy:state_code",ot="privy:code_verifier",st=e=>`privy:wallet:${e}`,lt="privy:connections",ct=12e4;function dt(e){return crypto.getRandomValues(new Uint8Array(e))}function ut(){return H.base64url.encode(dt(36))}function pt(){return ut()}async function ht(e,t="S256"){if("S256"!=t)return e;{let t=await async function(e){let t=(new TextEncoder).encode(e);return new Uint8Array(await crypto.subtle.digest("SHA-256",t))}(e);return H.base64url.encode(t)}}function gt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const mt=({style:t,...n})=>/*#__PURE__*/e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"24px",...t},...n,children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#040507"}),/*#__PURE__*/e.jsx("path",{d:"M17.2949 6.37537C18.0156 5.44684 19.4671 4.57877 20.4927 4.46512C20.8178 4.42885 20.8581 4.43127 20.9312 4.50139L20.9967 4.56426L20.9816 4.99225C20.9564 5.65963 20.8682 6.12873 20.6716 6.6341C20.4751 7.13705 20.1198 7.71738 19.8426 7.97852C19.7594 8.06074 19.6007 8.22516 19.4948 8.34848C19.0563 8.84901 18.439 9.20205 17.5973 9.4366C17.2823 9.52606 17.2596 9.52848 16.8917 9.52606C16.4482 9.52365 16.3852 9.51156 16.3524 9.43176C16.3398 9.39791 16.3272 9.18996 16.3222 8.9675L16.3171 8.56127L16.423 8.17922C16.6347 7.41512 16.8791 6.90733 17.2949 6.37537Z",fill:"white"}),/*#__PURE__*/e.jsx("path",{d:"M17.4512 10.2081C18.4163 9.84541 19.7595 9.48754 20.2584 9.46336C20.6616 9.4416 21.2966 9.49238 21.7225 9.57943C22.1383 9.66164 22.4357 9.76078 22.8666 9.96148C23.5571 10.2831 24.1442 10.7135 24.6104 11.2382C24.9582 11.6299 24.9783 11.6807 24.8397 11.8113C24.7944 11.8548 24.6885 11.9249 24.6054 11.9709C24.4542 12.0507 23.8368 12.5464 23.8368 12.5875C23.8368 12.5971 23.736 12.7108 23.6125 12.8341C23.2068 13.25 23.0279 13.5861 22.7683 14.4252C22.7078 14.6186 22.6448 14.8725 22.6272 14.9934C22.5566 15.4577 22.5919 16.125 22.7154 16.7344C22.7885 17.1044 23.0808 17.7306 23.3706 18.1489C23.7763 18.7317 24.3786 19.2491 24.9909 19.5514C25.316 19.7086 25.5 19.8464 25.5 19.9334C25.5 19.96 25.4773 20.0205 25.4521 20.064C25.4244 20.1075 25.3866 20.2164 25.3639 20.3034C25.311 20.521 25.001 21.244 24.807 21.5971C24.0862 22.9052 23.3731 23.8748 22.6095 24.5833C21.8611 25.2725 21.1606 25.582 20.4348 25.5385C19.9359 25.5094 19.4596 25.3934 18.7842 25.1322C18.2248 24.917 18.0081 24.8493 17.7939 24.8203C17.688 24.8058 17.4915 24.7768 17.3604 24.7574C16.9774 24.697 16.7254 24.6921 16.4533 24.7478C15.5461 24.9267 15.5133 24.9364 15.0144 25.1371C14.2231 25.4562 13.8073 25.5578 13.2907 25.5578C12.8875 25.5602 12.696 25.5143 12.2575 25.3087C11.8694 25.125 11.5948 24.9315 11.2546 24.5978C10.9295 24.2811 10.7052 24.0151 10.2642 23.4323C9.18818 22.0081 9.02187 21.7276 8.49519 20.4582C8.28612 19.9546 8.19971 19.7502 8.13026 19.5402C8.07498 19.373 8.03043 19.2023 7.94332 18.8744C7.73164 18.074 7.70896 17.9869 7.70896 17.8709C7.70896 17.8153 7.68628 17.675 7.66108 17.5565C7.44184 16.5917 7.44688 15.0007 7.67116 14.1713C7.82236 13.6127 8.02648 13.088 8.30367 12.5512C8.92863 11.3325 9.71738 10.5539 10.874 10.0123C11.2571 9.8309 11.5444 9.74627 12.0534 9.65922C12.2903 9.62054 12.5523 9.56976 12.6355 9.54799C12.8421 9.49238 13.3184 9.49963 13.6057 9.56008C14.2911 9.71 14.7548 9.84058 15.2059 10.0123C16.0551 10.3411 16.549 10.4789 16.7506 10.4475C16.7692 10.4444 16.7848 10.4418 16.8002 10.4387C16.8815 10.4225 16.9601 10.3929 17.4512 10.2081Z",fill:"white"})]}),yt=({style:t,...n})=>/*#__PURE__*/e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"24px",...t},...n,children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#5462EB"}),/*#__PURE__*/e.jsx("path",{d:"M23.5433 8.87438C22.2479 8.26174 20.8587 7.81038 19.4063 7.55187C19.3799 7.54688 19.3534 7.55934 19.3398 7.58428C19.1612 7.91179 18.9633 8.33905 18.8247 8.67487C17.2625 8.43382 15.7084 8.43382 14.1782 8.67487C14.0396 8.33158 13.8345 7.91179 13.6551 7.58428C13.6414 7.56018 13.615 7.54771 13.5886 7.55187C12.1369 7.80955 10.7478 8.26092 9.45159 8.87438C9.44037 8.87937 9.43075 8.88769 9.42437 8.89849C6.78947 12.9558 6.06766 16.9134 6.42176 20.8219C6.42336 20.841 6.43378 20.8593 6.4482 20.871C8.18663 22.1868 9.87059 22.9857 11.5233 23.5152C11.5497 23.5235 11.5778 23.5135 11.5946 23.491C11.9855 22.9408 12.334 22.3606 12.6328 21.7504C12.6505 21.7147 12.6336 21.6723 12.5976 21.6581C12.0448 21.442 11.5185 21.1785 11.0122 20.8793C10.9721 20.8552 10.9689 20.7961 11.0058 20.7679C11.1123 20.6856 11.2189 20.6 11.3206 20.5135C11.339 20.4977 11.3647 20.4944 11.3863 20.5044C14.7125 22.0696 18.3136 22.0696 21.6006 20.5044C21.6222 20.4936 21.6479 20.4969 21.6671 20.5127C21.7688 20.5991 21.8754 20.6856 21.9827 20.7679C22.0196 20.7961 22.0172 20.8552 21.9771 20.8793C21.4708 21.1843 20.9445 21.442 20.3909 21.6573C20.3548 21.6715 20.3388 21.7147 20.3564 21.7504C20.6617 22.3597 21.0101 22.9399 21.3939 23.4902C21.4099 23.5135 21.4387 23.5235 21.4652 23.5152C23.1259 22.9857 24.8099 22.1868 26.5483 20.871C26.5635 20.8593 26.5731 20.8419 26.5747 20.8228C26.9985 16.3041 25.8649 12.3789 23.5697 8.89931C23.5641 8.88769 23.5545 8.87937 23.5433 8.87438ZM13.1295 18.442C12.1281 18.442 11.303 17.4944 11.303 16.3307C11.303 15.1669 12.1121 14.2193 13.1295 14.2193C14.155 14.2193 14.9721 15.1752 14.9561 16.3307C14.9561 17.4944 14.1469 18.442 13.1295 18.442ZM19.883 18.442C18.8816 18.442 18.0564 17.4944 18.0564 16.3307C18.0564 15.1669 18.8655 14.2193 19.883 14.2193C20.9084 14.2193 21.7255 15.1752 21.7095 16.3307C21.7095 17.4944 20.9084 18.442 19.883 18.442Z",fill:"#F7F7F7"})]}),ft=({style:t,...n})=>/*#__PURE__*/e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"24px",...t},...n,children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"black"}),/*#__PURE__*/e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.5083 5.62451C10.8896 5.62451 6.34741 10.2078 6.34741 15.878C6.34741 20.4104 9.25774 24.2471 13.2951 25.605C13.7999 25.7071 13.9848 25.3844 13.9848 25.1129C13.9848 24.8752 13.9682 24.0604 13.9682 23.2115C11.1417 23.8227 10.5531 21.9892 10.5531 21.9892C10.0988 20.8009 9.42579 20.4954 9.42579 20.4954C8.50068 19.8673 9.49318 19.8673 9.49318 19.8673C10.5194 19.9352 11.0578 20.9198 11.0578 20.9198C11.9661 22.4815 13.4297 22.0402 14.0185 21.7686C14.1025 21.1065 14.3719 20.6482 14.6579 20.3936C12.4035 20.1559 10.0317 19.2732 10.0317 15.3347C10.0317 14.2142 10.4351 13.2976 11.0745 12.5847C10.9736 12.3301 10.6202 11.2774 11.1756 9.86844C11.1756 9.86844 12.0335 9.59678 13.968 10.9209C14.7962 10.6965 15.6503 10.5823 16.5083 10.5814C17.3662 10.5814 18.2408 10.7003 19.0484 10.9209C20.9831 9.59678 21.841 9.86844 21.841 9.86844C22.3963 11.2774 22.0428 12.3301 21.9419 12.5847C22.5981 13.2976 22.9849 14.2142 22.9849 15.3347C22.9849 19.2732 20.6131 20.1388 18.3419 20.3936C18.7121 20.7161 19.0316 21.3271 19.0316 22.2948C19.0316 23.6698 19.0149 24.7733 19.0149 25.1127C19.0149 25.3844 19.2 25.7071 19.7046 25.6052C23.742 24.2469 26.6523 20.4104 26.6523 15.878C26.669 10.2078 22.1102 5.62451 16.5083 5.62451Z",fill:"white"})]}),xt=t=>/*#__PURE__*/e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#F1F2F9"}),/*#__PURE__*/e.jsx("path",{d:"M26.1001 16.2273C26.1001 15.5182 26.0365 14.8364 25.9183 14.1818H16.5001V18.05H21.8819C21.6501 19.3 20.9456 20.3591 19.8865 21.0682V23.5773H23.1183C25.0092 21.8364 26.1001 19.2727 26.1001 16.2273Z",fill:"#4285F4"}),/*#__PURE__*/e.jsx("path",{d:"M16.5001 26C19.2001 26 21.4637 25.1046 23.1182 23.5773L19.8864 21.0682C18.991 21.6682 17.8455 22.0227 16.5001 22.0227C13.8955 22.0227 11.691 20.2637 10.9046 17.9H7.56372V20.4909C9.20917 23.7591 12.591 26 16.5001 26Z",fill:"#34A853"}),/*#__PURE__*/e.jsx("path",{d:"M10.9047 17.8999C10.7047 17.2999 10.591 16.659 10.591 15.9999C10.591 15.3408 10.7047 14.6999 10.9047 14.0999V11.509H7.56376C6.86376 12.9025 6.49951 14.4405 6.50012 15.9999C6.50012 17.6136 6.88649 19.1408 7.56376 20.4908L10.9047 17.8999Z",fill:"#FBBC05"}),/*#__PURE__*/e.jsx("path",{d:"M16.5001 9.97726C17.9682 9.97726 19.2864 10.4818 20.3228 11.4727L23.191 8.60454C21.4591 6.99091 19.1955 6 16.5001 6C12.591 6 9.20917 8.2409 7.56372 11.5091L10.9046 14.1C11.691 11.7364 13.8955 9.97726 16.5001 9.97726Z",fill:"#EA4335"})]});function vt(t){/*#__PURE__*/return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:26,height:26,viewBox:"0 0 140 140",x:"0px",y:"0px",fill:"none",...t,children:[/*#__PURE__*/e.jsxs("defs",{children:[/*#__PURE__*/e.jsxs("linearGradient",{id:"b",children:[/*#__PURE__*/e.jsx("stop",{offset:"0",stopColor:"#3771c8"}),/*#__PURE__*/e.jsx("stop",{stopColor:"#3771c8",offset:".128"}),/*#__PURE__*/e.jsx("stop",{offset:"1",stopColor:"#60f",stopOpacity:"0"})]}),/*#__PURE__*/e.jsxs("linearGradient",{id:"a",children:[/*#__PURE__*/e.jsx("stop",{offset:"0",stopColor:"#fd5"}),/*#__PURE__*/e.jsx("stop",{offset:".1",stopColor:"#fd5"}),/*#__PURE__*/e.jsx("stop",{offset:".5",stopColor:"#ff543e"}),/*#__PURE__*/e.jsx("stop",{offset:"1",stopColor:"#c837ab"})]}),/*#__PURE__*/e.jsx("radialGradient",{id:"c",cx:"158.429",cy:"578.088",r:"65",xlinkHref:"#a",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(0 -1.98198 1.8439 0 -1031.402 454.004)",fx:"158.429",fy:"578.088"}),/*#__PURE__*/e.jsx("radialGradient",{id:"d",cx:"147.694",cy:"473.455",r:"65",xlinkHref:"#b",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(.17394 .86872 -3.5818 .71718 1648.348 -458.493)",fx:"147.694",fy:"473.455"})]}),/*#__PURE__*/e.jsx("path",{fill:"url(#c)",d:"M65.03 0C37.888 0 29.95.028 28.407.156c-5.57.463-9.036 1.34-12.812 3.22-2.91 1.445-5.205 3.12-7.47 5.468C4 13.126 1.5 18.394.595 24.656c-.44 3.04-.568 3.66-.594 19.188-.01 5.176 0 11.988 0 21.125 0 27.12.03 35.05.16 36.59.45 5.42 1.3 8.83 3.1 12.56 3.44 7.14 10.01 12.5 17.75 14.5 2.68.69 5.64 1.07 9.44 1.25 1.61.07 18.02.12 34.44.12 16.42 0 32.84-.02 34.41-.1 4.4-.207 6.955-.55 9.78-1.28 7.79-2.01 14.24-7.29 17.75-14.53 1.765-3.64 2.66-7.18 3.065-12.317.088-1.12.125-18.977.125-36.81 0-17.836-.04-35.66-.128-36.78-.41-5.22-1.305-8.73-3.127-12.44-1.495-3.037-3.155-5.305-5.565-7.624C116.9 4 111.64 1.5 105.372.596 102.335.157 101.73.027 86.19 0H65.03z",transform:"translate(1.004 1)"}),/*#__PURE__*/e.jsx("path",{fill:"url(#d)",d:"M65.03 0C37.888 0 29.95.028 28.407.156c-5.57.463-9.036 1.34-12.812 3.22-2.91 1.445-5.205 3.12-7.47 5.468C4 13.126 1.5 18.394.595 24.656c-.44 3.04-.568 3.66-.594 19.188-.01 5.176 0 11.988 0 21.125 0 27.12.03 35.05.16 36.59.45 5.42 1.3 8.83 3.1 12.56 3.44 7.14 10.01 12.5 17.75 14.5 2.68.69 5.64 1.07 9.44 1.25 1.61.07 18.02.12 34.44.12 16.42 0 32.84-.02 34.41-.1 4.4-.207 6.955-.55 9.78-1.28 7.79-2.01 14.24-7.29 17.75-14.53 1.765-3.64 2.66-7.18 3.065-12.317.088-1.12.125-18.977.125-36.81 0-17.836-.04-35.66-.128-36.78-.41-5.22-1.305-8.73-3.127-12.44-1.495-3.037-3.155-5.305-5.565-7.624C116.9 4 111.64 1.5 105.372.596 102.335.157 101.73.027 86.19 0H65.03z",transform:"translate(1.004 1)"}),/*#__PURE__*/e.jsx("path",{fill:"#fff",d:"M66.004 18c-13.036 0-14.672.057-19.792.29-5.11.234-8.598 1.043-11.65 2.23-3.157 1.226-5.835 2.866-8.503 5.535-2.67 2.668-4.31 5.346-5.54 8.502-1.19 3.053-2 6.542-2.23 11.65C18.06 51.327 18 52.964 18 66s.058 14.667.29 19.787c.235 5.11 1.044 8.598 2.23 11.65 1.227 3.157 2.867 5.835 5.536 8.503 2.667 2.67 5.345 4.314 8.5 5.54 3.054 1.187 6.543 1.996 11.652 2.23 5.12.233 6.755.29 19.79.29 13.037 0 14.668-.057 19.788-.29 5.11-.234 8.602-1.043 11.656-2.23 3.156-1.226 5.83-2.87 8.497-5.54 2.67-2.668 4.31-5.346 5.54-8.502 1.18-3.053 1.99-6.542 2.23-11.65.23-5.12.29-6.752.29-19.788 0-13.036-.06-14.672-.29-19.792-.24-5.11-1.05-8.598-2.23-11.65-1.23-3.157-2.87-5.835-5.54-8.503-2.67-2.67-5.34-4.31-8.5-5.535-3.06-1.187-6.55-1.996-11.66-2.23-5.12-.233-6.75-.29-19.79-.29zm-4.306 8.65c1.278-.002 2.704 0 4.306 0 12.816 0 14.335.046 19.396.276 4.68.214 7.22.996 8.912 1.653 2.24.87 3.837 1.91 5.516 3.59 1.68 1.68 2.72 3.28 3.592 5.52.657 1.69 1.44 4.23 1.653 8.91.23 5.06.28 6.58.28 19.39s-.05 14.33-.28 19.39c-.214 4.68-.996 7.22-1.653 8.91-.87 2.24-1.912 3.835-3.592 5.514-1.68 1.68-3.275 2.72-5.516 3.59-1.69.66-4.232 1.44-8.912 1.654-5.06.23-6.58.28-19.396.28-12.817 0-14.336-.05-19.396-.28-4.68-.216-7.22-.998-8.913-1.655-2.24-.87-3.84-1.91-5.52-3.59-1.68-1.68-2.72-3.276-3.592-5.517-.657-1.69-1.44-4.23-1.653-8.91-.23-5.06-.276-6.58-.276-19.398s.046-14.33.276-19.39c.214-4.68.996-7.22 1.653-8.912.87-2.24 1.912-3.84 3.592-5.52 1.68-1.68 3.28-2.72 5.52-3.592 1.692-.66 4.233-1.44 8.913-1.655 4.428-.2 6.144-.26 15.09-.27zm29.928 7.97c-3.18 0-5.76 2.577-5.76 5.758 0 3.18 2.58 5.76 5.76 5.76 3.18 0 5.76-2.58 5.76-5.76 0-3.18-2.58-5.76-5.76-5.76zm-25.622 6.73c-13.613 0-24.65 11.037-24.65 24.65 0 13.613 11.037 24.645 24.65 24.645C79.617 90.645 90.65 79.613 90.65 66S79.616 41.35 66.003 41.35zm0 8.65c8.836 0 16 7.163 16 16 0 8.836-7.164 16-16 16-8.837 0-16-7.164-16-16 0-8.837 7.163-16 16-16z"})]})}function wt(t){/*#__PURE__*/return e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...t,children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"black"}),/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#06C755"}),/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"url(#pattern0_1769_69)"}),/*#__PURE__*/e.jsxs("defs",{children:[/*#__PURE__*/e.jsx("pattern",{id:"pattern0_1769_69",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:/*#__PURE__*/e.jsx("use",{xlinkHref:"#image0_1769_69",transform:"scale(0.003125)"})}),/*#__PURE__*/e.jsx("image",{id:"image0_1769_69",width:"320",height:"320",preserveAspectRatio:"none",xlinkHref:"data:image/png;base64,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"})]})]})}function Ct(t){/*#__PURE__*/return e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e.jsxs("g",{"clip-path":"url(#clip0_1715_1956)",children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#0977B6"}),/*#__PURE__*/e.jsx("path",{d:"M9.46878 6.82104C10.6699 6.82104 11.6461 7.79742 11.6461 8.999C11.6461 10.2017 10.6699 11.1782 9.46878 11.1782C8.26447 11.1782 7.28967 10.2017 7.28967 8.999C7.28967 7.79742 8.26447 6.82104 9.46878 6.82104ZM7.58908 12.8309H11.3467V24.9207H7.58908V12.8309Z",fill:"white"}),/*#__PURE__*/e.jsx("path",{d:"M13.7032 12.8309H17.3076V14.4827H17.3576C17.8589 13.5322 19.0846 12.53 20.9127 12.53C24.7175 12.53 25.42 15.0341 25.42 18.2891V24.9207H21.6651V19.0415C21.6651 17.6388 21.6394 15.8355 19.7126 15.8355C17.7573 15.8355 17.4579 17.363 17.4579 18.9399V24.9207H13.7032L13.7032 12.8309Z",fill:"white"})]}),/*#__PURE__*/e.jsx("defs",{children:/*#__PURE__*/e.jsx("clipPath",{id:"clip0_1715_1956",children:/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"white"})})})]})}function bt(t){/*#__PURE__*/return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512",...t,children:[/*#__PURE__*/e.jsx("path",{fill:"#1ed760",d:"M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8Z"}),/*#__PURE__*/e.jsx("path",{d:"M406.6 231.1c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3zm-31 76.2c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm-26.9 65.6c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4z"})]})}function jt(t){/*#__PURE__*/return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg","shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision","image-rendering":"optimizeQuality","fill-rule":"evenodd","clip-rule":"evenodd",viewBox:"0 0 1000 1000",...t,children:/*#__PURE__*/e.jsx("path",{d:"M906.25 0H93.75C42.19 0 0 42.19 0 93.75v812.49c0 51.57 42.19 93.75 93.75 93.75l812.5.01c51.56 0 93.75-42.19 93.75-93.75V93.75C1000 42.19 957.81 0 906.25 0zM684.02 319.72c-32.42-21.13-55.81-54.96-63.11-94.38-1.57-8.51-2.45-17.28-2.45-26.25H515l-.17 414.65c-1.74 46.43-39.96 83.7-86.8 83.7-14.57 0-28.27-3.63-40.35-9.99-27.68-14.57-46.63-43.58-46.63-76.97 0-47.96 39.02-86.98 86.97-86.98 8.95 0 17.54 1.48 25.66 4.01V421.89c-8.41-1.15-16.95-1.86-25.66-1.86-105.01 0-190.43 85.43-190.43 190.45 0 64.42 32.18 121.44 81.3 155.92 30.93 21.72 68.57 34.51 109.14 34.51 105.01 0 190.43-85.43 190.43-190.43V400.21c40.58 29.12 90.3 46.28 143.95 46.28V343.03c-28.89 0-55.8-8.59-78.39-23.31z"})})}const kt=t=>/*#__PURE__*/e.jsxs("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e.jsx("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"black"}),/*#__PURE__*/e.jsx("path",{d:"M8.53901 8L14.7164 16.2153L8.5 22.8947H9.89907L15.3415 17.0468L19.7389 22.8947H24.5L17.975 14.2173L23.7612 8H22.3621L17.3499 13.3858L13.3001 8H8.53901ZM10.5964 9.02501H12.7837L22.4422 21.8695H20.255L10.5964 9.02501Z",fill:"#F7F7F7"})]});function Tt(){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"),Ye.del(it),window.history.replaceState({},"",e)}const At=({address:e,chainId:t,nonce:n})=>`${window.location.host} wants you to sign in with your Ethereum account:\n${e}\n\nBy signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.\n\nURI: ${window.location.origin}\nVersion: 1\nChain ID: ${t}\nNonce: ${n}\nIssued At: ${(new Date).toISOString()}\nResources:\n- https://privy.io`;class St{get meta(){return{connectorType:this.wallet?.connectorType,walletClientType:this.wallet?.walletClientType,chainId:this.wallet?.chainId,address:this.wallet?.address,disableSignup:this._meta.disableSignup}}async authenticate(){if(!this.client)throw new h.PrivyClientError("SiweFlow has no client instance");try{if(this.preparedMessage&&this.signature)return await this.client.authenticateWithSiweInternal({message:this.preparedMessage,signature:this.signature,chainId:this.wallet?.chainId,walletClientType:this.wallet?.walletClientType,connectorType:this.wallet?.connectorType,mode:this._meta.disableSignup?"no-signup":"login-or-sign-up"});if(!this.wallet)throw new h.PrivyClientError("SiweFlow has no wallet instance");let{message:e,signature:t}=await this.sign();return await this.client.authenticateWithSiweInternal({message:e,signature:t,chainId:this.wallet.chainId,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(e){throw h.formatApiError(e)}}async link(){if(!this.client)throw new h.PrivyClientError("SiweFlow has no client instance");try{if(!this.wallet)throw new h.PrivyClientError("SiweFlow has no wallet instance");let{message:e,signature:t}=await this.sign();return await this.client.linkWithSiweInternal({message:e,signature:t,chainId:this.wallet.chainId,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType})}catch(e){throw h.formatApiError(e)}}async sign(){if(!this.client)throw new h.PrivyClientError("SiweFlow has no client instance");if(await this.buildMessage(),!this.preparedMessage)throw new h.PrivyClientError("Could not prepare SIWE message");if(!this.wallet)throw new h.PrivyClientError("SiweFlow has no wallet instance");let e=await this.wallet.sign(this.preparedMessage);return{message:this.preparedMessage,signature:e}}async _getNonceOnce(){if(!this.client)throw new h.PrivyClientError("SiweFlow has no client instance");if(!this.wallet)throw new h.PrivyClientError("UI SiweFlow has no wallet instance");return await this.client.generateSiweNonce({address:this.wallet.address,captchaToken:this.captchaToken})}async buildMessage(){if(!this.client)throw new h.PrivyClientError("SiweFlow has no client instance");if(!this.wallet)throw new h.PrivyClientError("SiweFlow has no wallet instance");let e=this.wallet.address,t=this.wallet.chainId.replace("eip155:","");return this.nonce||(this.nonce=await this.getNonceOnce.execute()),this.preparedMessage=At({address:e,chainId:t,nonce:this.nonce}),this.preparedMessage}constructor(e,t,n,r=!1,a){this._meta={disableSignup:!1},this.getNonceOnce=new nt(this._getNonceOnce.bind(this)),this.wallet=t,this.captchaToken=n,this.client=e,this._meta.disableSignup=r,this.preparedMessage=a?.message,this.signature=a?.signature}}const Et=({address:e,nonce:t})=>`${window.location.host} wants you to sign in with your Solana account:\n${e}\n\n${`You are proving you own ${e}.`}\n\nURI: ${window.location.origin}\nVersion: 1\nChain ID: mainnet\nNonce: ${t}\nIssued At: ${(new Date).toISOString()}\nResources:\n- https://privy.io`;class It{get meta(){return{connectorType:this.wallet.connectorType,walletClientType:this.wallet.walletClientType,disableSignup:this._meta.disableSignup,messageType:this._meta.messageType,address:this.wallet?.address}}set messageType(e){this._meta.messageType=e}async authenticate(){if(!this.client)throw new h.PrivyClientError("SiwsFlow has no client instance");try{let{message:e,signature:t}=await this.sign();return await this.client.authenticateWithSiwsInternal({message:e,signature:t,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up",messageType:this.meta.messageType})}catch(e){throw h.formatApiError(e)}}async link(){if(!this.client)throw new h.PrivyClientError("SiwsFlow has no client instance");try{let{message:e,signature:t}=await this.sign();return await this.client.linkWithSiwsInternal({message:e,signature:t,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,messageType:this.meta.messageType})}catch(e){throw h.formatApiError(e)}}async sign(){let e,t;if(!this.client)throw new h.PrivyClientError("SiwsFlow has no client instance");await this.buildMessage();let n="transaction"===this.meta.messageType;if(!this.preparedMessage)throw new h.PrivyClientError("Could not prepare SIWS message");if(!n&&!this.wallet.provider.signMessage||n&&!this.wallet.provider.signTransaction)throw new h.PrivyClientError("Wallet does not support the necessary signing methods");if(n&&this._plugin){let n=await this.wallet.provider.signTransaction({transaction:S.base64.decode(this.preparedMessage)});e=S.base64.encode(n.signedTransaction),t=this._plugin.getSignatureFromTransaction(n.signedTransaction,this.wallet.address)}else{e=this.preparedMessage;let n=await this.wallet.provider.signMessage({message:(new TextEncoder).encode(this.preparedMessage)});t=S.base64.encode(n.signature)}return{message:e,signature:t}}async _getNonceOnce(){if(!this.client)throw new h.PrivyClientError("SiwsFlow has no client instance");return await this.client.generateSiwsNonce({address:this.wallet.address,captchaToken:this.captchaToken})}async buildMessage(){if(!this.client)throw new h.PrivyClientError("SiwsFlow has no client instance");let e=this.wallet.address;return this.nonce||(this.nonce=await this.getNonceOnce.execute()),"transaction"===this.meta.messageType&&this._plugin?this.preparedMessage=this._plugin.createSiwsMemoTransaction({address:e,nonce:this.nonce}):this.preparedMessage=Et({address:e,nonce:this.nonce}),this.preparedMessage}constructor(e,t,n,r=!1,a="plain",i){this._meta={disableSignup:!1,messageType:"plain"},this.getNonceOnce=new nt(this._getNonceOnce.bind(this)),this.wallet=e,this.captchaToken=n,this.client=t,this._meta.disableSignup=r,this._meta.messageType=a,this._plugin=i}}const Pt=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isClover?"Clover":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOneKey?"OneKey Wallet":e.isOpera?"Opera":e.isPhantom||"isPhantom"in e?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isSafePal?"SafePal Wallet":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally||e.isTaho?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZeal?"Zeal":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0,Nt=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;if(e.isBraveWallet&&!e._events&&!e._state||"MetaMask"!==Pt(e))return!1;if(e.providers)for(let t of e.providers)if(!Nt(t))return!1;return!0},_t=()=>{let e=window;if(!e.ethereum)return!1;if(e.ethereum.isCoinbaseWallet)return!0;if(e.ethereum.providers)for(let t of e.ethereum.providers)if(t&&t.isCoinbaseWallet)return!0;return!1},Mt=(e,t,n,a)=>{let i=Number(e),o=t.find((e=>e.id===i));if(!o)throw new h.PrivyConnectorError(`Unsupported chainId ${e}`,4901);return r.createPublicClient({transport:r.http(Ft(o,n,a.appId)),chain:o})},Ft=(e,t,n)=>{let r,a=e.id,i=Number(e.id);if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])r=e.rpcUrls.privyWalletOverride.http[0];else if(t.rpcUrls&&t.rpcUrls[i])r=t.rpcUrls[i];else if(e.rpcUrls.privy?.http[0]){let t=new URL(e.rpcUrls.privy.http[0]);t.searchParams.append("privyAppId",n),r=t.toString()}else r=e.rpcUrls.public?.http[0]?e.rpcUrls.public.http[0]:e.rpcUrls.default?.http[0];if(!r)throw new h.PrivyConnectorError(`No RPC url found for ${a}`);return r},Lt=e=>!!String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),Wt=(e,t=3,n=4,r="ethereum")=>{if(!e)return"";let a="ethereum"===r?2:0;return t+n+a+3>=e.length?e:`${e.slice(0,a+t)}...${e.slice(e.length-n,e.length)}`},Dt=(e,t=3,n=4)=>Wt(e,t,n,"solana"),Rt=e=>new Promise((t=>setTimeout(t,e)));const Ot=(e,t={})=>{let n=t.delayMs||150,r=t.maxAttempts||270;return new Promise((async(a,i)=>{let o=!1,s=0;for(;!o&&s<r;){if(t.abortSignal?.aborted)return;e().then((e=>{o=!0,a(e)}),((...e)=>{o=!0,i(...e)})),s+=1,await Rt(n)}o||i(Error("Exceeded max attempts before resolving function"))}))},Bt=(e,t,n={},r={})=>{let a=new URL(t,e);for(let[e,t]of Object.entries(n))void 0!==t&&a.searchParams.set(e,t);let i=Object.entries(r);if(i.length>0){let e=new URLSearchParams;for(let[t,n]of i)e.append(t,n);a.hash=e.toString()}return a.href},Ut=e=>e.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,"");function zt(e){return`eip155:${String(Number(e))}`}const Ht=(e,t,n,r)=>{let a=Number(e),i=t.find((e=>e.id===a));if(!i)throw new h.PrivyConnectorError(`Unsupported chainId ${e}`,4901);return Ft(i,n,r)};const Vt=/*#__PURE__*/n.createContext({siteKey:"",enabled:!1,appId:void 0,token:void 0,error:void 0,status:"disabled",setToken:s.notImplemented,setError:s.notImplemented,setExecuting:s.notImplemented,waitForResult:()=>Promise.resolve(""),ref:{current:null},remove:s.notImplemented,reset:s.notImplemented,execute:s.notImplemented});class $t extends h.PrivyError{constructor(e,t,n){super(e||"Captcha failed"),this.type="Captcha",t instanceof Error&&(this.cause=t),this.privyErrorCode=n}}const qt=()=>n.useContext(Vt);function Gt(e){let t={detail:"",retryable:!1};return e?.privyErrorCode===h.PrivyErrorCode.LINKED_TO_ANOTHER_USER&&(t.detail="This account has already been linked to another user."),e?.privyErrorCode===h.PrivyErrorCode.DISALLOWED_LOGIN_METHOD&&(t.detail="Login with Telegram not allowed."),e?.privyErrorCode===h.PrivyErrorCode.INVALID_DATA&&(t.retryable=!0,t.detail="Something went wrong. Try again."),e?.privyErrorCode===h.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE&&(t.retryable=!0,t.detail="Something went wrong. Try again."),e?.privyErrorCode===h.PrivyErrorCode.INVALID_CREDENTIALS&&(t.retryable=!0,t.detail="Something went wrong. Try again."),e?.privyErrorCode===h.PrivyErrorCode.TOO_MANY_REQUESTS&&(t.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===h.PrivyErrorCode.TOO_MANY_REQUESTS&&e.message.includes("rate limit")&&(t.detail="Request limit reached for Telegram. Please wait a moment and try again."),e instanceof $t&&(t.retryable=!0,t.detail="Something went wrong. Try again."),t}function Yt(e){return Object.fromEntries(decodeURIComponent(e).split("&").map((e=>e.split("=").map(decodeURIComponent))))}function Zt(){let e=new URL(window.location.href);e.searchParams.delete("id"),e.searchParams.delete("hash"),e.searchParams.delete("auth_date"),e.searchParams.delete("first_name"),e.searchParams.delete("last_name"),e.searchParams.delete("username"),e.searchParams.delete("photo_url"),e.hash="",window.history.replaceState({},"",e)}let Kt=e=>{if("ethereum"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier"};if("solana"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"solana-address-verifier"};throw Error("Failed to get account entropy details")};const Qt=(e,t)=>{if(t?.imported)return Kt(t);let n=w.getPrivyPrimaryWallet(e);if(!n)throw Error("Failed to find primary wallet");return Kt(n)},Xt=({style:t,...n})=>/*#__PURE__*/e.jsxs("svg",{viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...t},...n,children:[/*#__PURE__*/e.jsx("rect",{width:"1024",height:"1024",fill:"#0052FF",rx:100,ry:100}),/*#__PURE__*/e.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"})]}),Jt="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTAyNCAxMDI0JyBmaWxsPSdub25lJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHN0eWxlPSdoZWlnaHQ6MjhweDt3aWR0aDoyOHB4Jz48cmVjdCB3aWR0aD0nMTAyNCcgaGVpZ2h0PScxMDI0JyBmaWxsPScjMDA1MkZGJyByeD0nMTAwJyByeT0nMTAwJz48L3JlY3Q+PHBhdGggZmlsbC1ydWxlPSdldmVub2RkJyBjbGlwLXJ1bGU9J2V2ZW5vZGQnIGQ9J00xNTIgNTEyQzE1MiA3MTAuODIzIDMxMy4xNzcgODcyIDUxMiA4NzJDNzEwLjgyMyA4NzIgODcyIDcxMC44MjMgODcyIDUxMkM4NzIgMzEzLjE3NyA3MTAuODIzIDE1MiA1MTIgMTUyQzMxMy4xNzcgMTUyIDE1MiAzMTMuMTc3IDE1MiA1MTJaTTQyMCAzOTZDNDA2Ljc0NSAzOTYgMzk2IDQwNi43NDUgMzk2IDQyMFY2MDRDMzk2IDYxNy4yNTUgNDA2Ljc0NSA2MjggNDIwIDYyOEg2MDRDNjE3LjI1NSA2MjggNjI4IDYxNy4yNTUgNjI4IDYwNFY0MjBDNjI4IDQwNi43NDUgNjE3LjI1NSAzOTYgNjA0IDM5Nkg0MjBaJyBmaWxsPSd3aGl0ZSc+PC9wYXRoPjwvc3ZnPg==",en="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAALZJREFUaEPtmjEOhDAMBNc/O14GvOzys3CAKK6eAlmaVGl2Zc+kTOU685vkc9/bnD2prZK5/TZY24z9P+g4F5hNh7/GdoG37WlAA5CATwgCxHENYISwQAMQII5rACOEBRqAAHFcAxghLNAABIjjGsAIYYEGIEAc1wBGCAs0AAHiuAYwQligAQgQxzWAEcICDUCAOK4BjBAWaAACxHENYISwQAMQII6fBjr+VHkW3+u+tfyxMpJaDgYzYxb/ALZVAAAAAElFTkSuQmCC";class tn extends h.PrivyConnectorError{constructor(){super("Wallet timeout"),this.type="wallet_error"}}const nn=e=>e instanceof h.PrivyConnectorError?e:e?.code?new an(e):new h.PrivyConnectorError("Unknown connector error",e);class rn extends h.PrivyError{constructor(e,t,n){super(e),this.type="provider_error",this.code=t,this.data=n}}class an extends rn{constructor(e){super(e.message,e.code,e.data);let t=Object.values(a.ProviderErrors).find((t=>t.eipCode===e.code));this.details=t||a.ProviderErrors.UNKNOWN_ERROR,-32002===e.code&&(e.message?.includes("already pending for origin")?e.message?.includes("wallet_requestPermissions")?this.details=a.ProviderErrors.E32002_CONNECTION_ALREADY_PENDING:this.details=a.ProviderErrors.E32002_REQUEST_ALREADY_PENDING:e.message?.includes("Already processing")&&e.message.includes("eth_requestAccounts")&&(this.details=a.ProviderErrors.E32002_WALLET_LOCKED))}}const on={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},ERROR_USER_LIMIT_REACHED:{message:"Unable to link",detail:"You've reached the maximum number of linked wallets.",retryable:!1},...a.ProviderErrors};function sn(e){return"ethereum"===e.type}function ln(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],a=t[n];if(r?.address!==a?.address||r&&a&&sn(r)&&sn(a)&&r?.chainId!==a?.chainId||r?.connectorType!==a?.connectorType||r?.connectedAt!==a?.connectedAt||r?.walletClientType!==a?.walletClientType||r?.isConnected!==a?.isConnected||r?.linked!==a?.linked)return!1}return!0}class cn extends $e.default{constructor(e){super(),this.walletClientType=e,this.connected=!1,this.initialized=!1}}const dn=(e,t)=>e.rpcTimeouts&&e.rpcTimeouts[t]||ct;class un extends cn{buildConnectedWallet(e,t,n,r){let a=async()=>!!this.wallets.find((t=>u.getAddress(t.address)===u.getAddress(e)));return{type:"ethereum",address:u.getAddress(e),chainId:t,meta:n,imported:r,switchChain:async n=>{let r,i;if(!a)throw new h.PrivyConnectorError("Wallet is not currently connected.");let o=this.wallets.find((t=>u.getAddress(t.address)===u.getAddress(e)))?.chainId;if(!o)throw new h.PrivyConnectorError("Unable to determine current chainId.");if("number"==typeof n?(r=`0x${n.toString(16)}`,i=n):(r=n,i=Number(n)),o===zt(r))return;let s=this.chains.find((e=>e.id===i));if(!s)throw new h.PrivyConnectorError(`Unsupported chainId: ${n}`);let l=async()=>{await this.proxyProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]})};try{return await l()}catch(e){if(((e,t)=>{switch(t){case"coinbase_wallet":case"base_account":return e.message.includes("addEthereumChain");case"rabby_wallet":return e.message.includes("Unrecognized chain ID");default:return 4902===e.code||e.message?.includes("4902")}})(e,this.walletClientType))return"rabby_wallet"===this.walletClientType&&await Rt(300),await this.proxyProvider.request({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:s.name,nativeCurrency:s.nativeCurrency,rpcUrls:[s.rpcUrls.default?.http[0]??""],blockExplorerUrls:[s.blockExplorers?.default.url??""]}]}),l();if("rainbow"===this.walletClientType&&e.message?.includes("wallet_switchEthereumChain"))throw new h.PrivyConnectorError(`Rainbow does not support the chainId ${t}`);throw e}},connectedAt:Date.now(),walletClientType:this.walletClientType,connectorType:this.connectorType,isConnected:a,getEthereumProvider:async()=>{if(!await a())throw new h.PrivyConnectorError("Wallet is not currently connected.");return this.proxyProvider},sign:async e=>{if(!await a())throw new h.PrivyConnectorError("Wallet is not currently connected.");return await this.sign(e)},disconnect:()=>{this.disconnect()}}}async syncAccounts(e){let t,n=e;try{if(void 0===n){let e=await Ot((()=>this.proxyProvider.request({method:"eth_accounts"})),{maxAttempts:10,delayMs:500});console.debug(`eth_accounts for ${this.walletClientType}:`,e),Array.isArray(e)&&(n=e)}}catch(e){console.debug("Wallet did not respond to eth_accounts. Defaulting to prefetched accounts.",e)}if(!n||!Array.isArray(n)||n.length<=0||!n[0])return;let r=n[0],a=u.getAddress(r),i=[];if("privy"===this.walletClientType){let e=Ye.get(st(a));this.chains.find((t=>t.id===Number(e)))||(Ye.del(st(a)),e=null),t=e||`0x${this.defaultChain.id.toString(16)}`;try{await this.proxyProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]})}catch(e){console.warn(`Unable to switch embedded wallet to chain ID ${t} on initialization`)}}else try{let e=await Ot((()=>this.proxyProvider.request({method:"eth_chainId"})),{maxAttempts:10,delayMs:500});if(console.debug(`eth_chainId for ${this.walletClientType}:`,e),"string"==typeof e)t=e;else{if("number"!=typeof e)throw Error("Invalid chainId returned from provider");t=`0x${e.toString(16)}`}}catch(e){console.warn("Failed to get chainId from provider, defaulting to 0x1",e),t="0x1"}let o=zt(t);if(!i.find((e=>u.getAddress(e.address)===a))){let e={name:this.walletBranding.name,icon:"string"==typeof this.walletBranding.icon?this.walletBranding.icon:void 0,id:this.walletBranding.id};i.push(this.buildConnectedWallet(u.getAddress(r),o,e,"embedded_imported"===this.connectorType))}ln(i,this.wallets)||(this.wallets=i,this.emit("walletsUpdated"))}async getConnectedWallet(){let e=await this.proxyProvider.request({method:"eth_accounts"});return this.wallets.sort(((e,t)=>t.connectedAt-e.connectedAt)).find((t=>e.find((e=>u.getAddress(e)===u.getAddress(t.address)))))||null}async isConnected(){let e=await this.proxyProvider.request({method:"eth_accounts"});return Array.isArray(e)&&e.length>0}async sign(e){return await this.connect({showPrompt:!1}),this.proxyProvider.request({method:"personal_sign",params:[u.toHex(e),this.wallets[0]?.address]})}subscribeListeners(){this.proxyProvider.on("accountsChanged",this.onAccountsChanged),this.proxyProvider.on("chainChanged",this.onChainChanged),this.proxyProvider.on("disconnect",this.onDisconnect),this.proxyProvider.on("connect",this.onConnect)}unsubscribeListeners(){this.proxyProvider.removeListener("accountsChanged",this.onAccountsChanged),this.proxyProvider.removeListener("chainChanged",this.onChainChanged),this.proxyProvider.removeListener("disconnect",this.onDisconnect),this.proxyProvider.removeListener("connect",this.onConnect)}constructor(e,t,n,r){super(e),this.chainType="ethereum",this.onAccountsChanged=e=>{0===e.length?this.onDisconnect():this.syncAccounts(e)},this.onChainChanged=e=>{this.wallets.forEach((t=>{t.chainId=zt(e),"privy"===this.walletClientType&&Ye.put(st(t.address),e)})),this.emit("walletsUpdated")},this.onDisconnect=()=>{this.connected=!1,this.wallets=[],this.emit("walletsUpdated")},this.onConnect=async()=>{"base_account"===this.connectorType&&this.connected||(this.connected=!0,"coinbase_wallet"===this.connectorType&&await Rt(500),this.syncAccounts())},this.wallets=[],this.walletClientType=e,this.chains=t,this.defaultChain=n,this.rpcConfig=r,this.rpcTimeoutDuration=dn(r,e),this.connected=!1,this.initialized=!1}}class pn{on(e,t){if(this.walletProvider)return this.walletProvider.on(e,t);this._subscriptions.push({eventName:e,listener:t})}async request(e){if(!this.walletProvider)throw new h.PrivyConnectorError(`A wallet request of type ${e.method} was made before setting a wallet provider.`);return Promise.race([this.walletProvider.request(e),this.walletTimeout()]).catch((e=>{throw nn(e)}))}constructor(e,t){this.removeListener=(e,t)=>{if(this.walletProvider)try{return this.walletProvider.removeListener(e,t)}catch(e){console.warn("Unable to remove wallet provider listener")}},this.walletTimeout=(e=new tn,t=this.rpcTimeoutDuration)=>new Promise(((n,r)=>setTimeout((()=>{r(e)}),t))),this.setWalletProvider=e=>{this.walletProvider&&this._subscriptions.forEach((e=>{this.removeListener(e.eventName,e.listener)})),this.walletProvider=e,this._subscriptions.forEach((e=>{this.walletProvider?.on(e.eventName,e.listener)}))},this.walletProvider=e,this.rpcTimeoutDuration=t||ct,this._subscriptions=[]}}const hn=({...t})=>/*#__PURE__*/e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:/*#__PURE__*/e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.37126 11.0323C2.37126 12.696 3.90598 13.4421 5.40654 13.4468C8.91753 13.4468 12.8021 11.2897 12.7819 7.67984C12.7673 5.07728 10.3748 2.86167 7.54357 2.88296C4.8495 2.88296 2.21821 4.6411 2.21803 7.03628C2.21803 7.67951 2.58722 8.30178 3.55231 8.37184C2.74763 9.16826 2.37126 10.1225 2.37126 11.0323ZM7.55283 8.68012C8.11562 8.68012 8.57186 8.13217 8.57186 7.45624C8.57186 6.78032 8.11562 6.23237 7.55283 6.23237C6.99003 6.23237 6.53379 6.78032 6.53379 7.45624C6.53379 8.13217 6.99003 8.68012 7.55283 8.68012ZM10.4747 8.68012C11.0375 8.68012 11.4937 8.13217 11.4937 7.45625C11.4937 6.78032 11.0375 6.23237 10.4747 6.23237C9.91186 6.23237 9.45562 6.78032 9.45562 7.45625C9.45562 8.13217 9.91186 8.68012 10.4747 8.68012Z",fill:t.color||"var(--privy-color-foreground-3)"})});class gn extends un{get walletBranding(){return{id:this.id,name:this.name,icon:this.icon}}async initialize(){this.initialized=!0,this.emit("initialized")}async connect(){throw Error("connect called for an uninstalled wallet via the EthereumNullConnector")}disconnect(){throw Error("disconnect called for an uninstalled wallet via the EthereumNullConnector")}promptConnection(e){throw Error(`promptConnection called for an uninstalled wallet via the EthereumNullConnector for ${e}`)}constructor({id:e,name:t,icon:n,walletClientType:r,defaultChain:a}){super(r,[],a,{}),this.connectorType="null",this.proxyProvider=new pn(void 0,ct),this.id=e,this.name=t,this.icon=n,this.connectorType=r}}const mn=({style:t,...n})=>/*#__PURE__*/e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24",style:{...t},...n,children:/*#__PURE__*/e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})}),yn=({...t})=>/*#__PURE__*/e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",...t,children:[/*#__PURE__*/e.jsx("rect",{width:"32",height:"32",rx:"6",fill:"#121314"}),/*#__PURE__*/e.jsx("g",{transform:"translate(4, 4)",children:/*#__PURE__*/e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 318.6 318.6",children:[/*#__PURE__*/e.jsx("style",{children:".s1{stroke-linecap:round;stroke-linejoin:round}.s2{fill:#e4761b;stroke:#e4761b}.s3{fill:#f6851b;stroke:#f6851b}"}),/*#__PURE__*/e.jsx("path",{fill:"#e2761b",stroke:"#e2761b",className:"s1",d:"m274.1 35.5-99.5 73.9L193 65.8z"}),/*#__PURE__*/e.jsx("path",{d:"m44.4 35.5 98.7 74.6-17.5-44.3zm193.9 171.3-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z",className:"s1 s2"}),/*#__PURE__*/e.jsx("path",{d:"m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zm111.3 0-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5 33.9 16.5-4.7-39.3z",className:"s1 s2"}),/*#__PURE__*/e.jsx("path",{fill:"#d7c1b3",stroke:"#d7c1b3",className:"s1",d:"m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zm-105 0 31.5 14.9-.2-9.3 2.5-22.1z"}),/*#__PURE__*/e.jsx("path",{fill:"#233447",stroke:"#233447",className:"s1",d:"m138.8 193.5-28.2-8.3 19.9-9.1zm40.9 0 8.3-17.4 20 9.1z"}),/*#__PURE__*/e.jsx("path",{fill:"#cd6116",stroke:"#cd6116",className:"s1",d:"m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1 20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"}),/*#__PURE__*/e.jsx("path",{fill:"#e4751f",stroke:"#e4751f",className:"s1",d:"m87.8 162.1 23.6 46-.8-22.9zm120.3 23.1-1 22.9 23.7-46zm-64-20.6-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0-2.7 18 1.2 45 6.7-34.1z"}),/*#__PURE__*/e.jsx("path",{d:"m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z",className:"s3"}),/*#__PURE__*/e.jsx("path",{fill:"#c0ad9e",stroke:"#c0ad9e",className:"s1",d:"m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"}),/*#__PURE__*/e.jsx("path",{fill:"#161616",stroke:"#161616",className:"s1",d:"m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"}),/*#__PURE__*/e.jsx("path",{fill:"#763d16",stroke:"#763d16",className:"s1",d:"m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"}),/*#__PURE__*/e.jsx("path",{d:"m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4 3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z",className:"s3"})]})})]}),fn=({style:t,...n})=>/*#__PURE__*/e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"108",height:"108",viewBox:"0 0 108 108",fill:"none",style:{height:"28px",width:"28px",...t},...n,children:[/*#__PURE__*/e.jsx("rect",{width:"108",height:"108",rx:"23",fill:"#AB9FF2"}),/*#__PURE__*/e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M46.5267 69.9229C42.0054 76.8509 34.4292 85.6182 24.348 85.6182C19.5824 85.6182 15 83.6563 15 75.1342C15 53.4305 44.6326 19.8327 72.1268 19.8327C87.768 19.8327 94 30.6846 94 43.0079C94 58.8258 83.7355 76.9122 73.5321 76.9122C70.2939 76.9122 68.7053 75.1342 68.7053 72.314C68.7053 71.5783 68.8275 70.7812 69.0719 69.9229C65.5893 75.8699 58.8685 81.3878 52.5754 81.3878C47.993 81.3878 45.6713 78.5063 45.6713 74.4598C45.6713 72.9884 45.9768 71.4556 46.5267 69.9229ZM83.6761 42.5794C83.6761 46.1704 81.5575 47.9658 79.1875 47.9658C76.7816 47.9658 74.6989 46.1704 74.6989 42.5794C74.6989 38.9885 76.7816 37.1931 79.1875 37.1931C81.5575 37.1931 83.6761 38.9885 83.6761 42.5794ZM70.2103 42.5795C70.2103 46.1704 68.0916 47.9658 65.7216 47.9658C63.3157 47.9658 61.233 46.1704 61.233 42.5795C61.233 38.9885 63.3157 37.1931 65.7216 37.1931C68.0916 37.1931 70.2103 38.9885 70.2103 42.5795Z",fill:"#FFFDF8"})]}),xn=["metamask","phantom","brave_wallet","rainbow","uniswap_wallet_extension","uniswap_extension","rabby_wallet","bybit_wallet","ronin_wallet","haha_wallet","crypto.com_wallet_extension","crypto.com_onchain","binance","bitkeep","coinbase_wallet","coinbase_smart_wallet","base_account","metamask","trust","safe","rainbow","uniswap","zerion","argent","spot","omni","cryptocom","blockchain","safepal","bitkeep","zengo","1inch","binance","exodus","mew_wallet","alphawallet","keyring_pro","mathwallet","unstoppable","obvious","ambire","internet_money_wallet","coin98","abc_wallet","arculus_wallet","haha","cling_wallet","broearn","copiosa","burrito_wallet","enjin_wallet","plasma_wallet","avacus","bee","pitaka","pltwallet","minerva","kryptogo","prema","slingshot","kriptonio","timeless","secux","bitizen","blocto","okx_wallet","safemoon","rabby_wallet","bybit_wallet","ronin_wallet","haha_wallet","privy","unknown","phantom","solflare","glow","backpack","mobile_wallet_adapter"],vn=Object.freeze({phantom:{client:"phantom",name:"Phantom",installLink:Ie.isFirefox?"https://addons.mozilla.org/en-US/firefox/addon/phantom-app/":"https://chrome.google.com/webstore/detail/phantom/bfnaelmomeimhlpmgjnjophhpkkoljpa?hl=en",chainTypes:["ethereum","solana"],get isInstalled(){if("phantom"in window){let e=window;if(e?.phantom?.ethereum?.isPhantom&&e?.phantom?.ethereum?.chainId||e?.phantom?.solana?.isPhantom)return!0}return!1},getMobileRedirect({useUniversalLink:e,isSolana:t,connectOnly:n}){let r=Cn({client:this.client,isSolana:t,connectOnly:n});return`${e?"phantom://":"https://phantom.app/ul/"}browse/${r}?ref=${r}`}},solflare:{client:"solflare",name:"Solflare",installLink:Ie.isFirefox?"https://addons.mozilla.org/es/firefox/addon/solflare-wallet/":"https://chromewebstore.google.com/detail/solflare-wallet/bhhhlbepdkbapadjdnnojkbgioiodbic",chainTypes:["solana"],get isInstalled(){return"solflare"in window&&!!window?.solflare?.isSolflare},getMobileRedirect({useUniversalLink:e,isSolana:t,connectOnly:n}){let r=Cn({client:this.client,isSolana:t,connectOnly:n});return`${e?"solflare://ul/v1/":"https://solflare.com/ul/v1/"}browse/${r}?ref=${r}`}},backpack:{client:"backpack",name:"Backpack",installLink:"https://chromewebstore.google.com/detail/backpack/aflkmfhebedbjioipglgcbcmnbpgliof",chainTypes:["ethereum","solana"],get isInstalled(){return!(!("backpack"in window)||!window?.backpack?.ethereum?.isBackpack&&!window?.backpack?.solana?.isBackpack)},getMobileRedirect({useUniversalLink:e,isSolana:t,connectOnly:n}){let r=Cn({client:this.client,isSolana:t,connectOnly:n});return`${e?"backpack://ul/v1/":"https://backpack.com/ul/v1/"}browse/${r}?ref=${r}`}},okx_wallet:{client:"okx_wallet",name:"OKX Wallet",installLink:"https://chromewebstore.google.com/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge",chainTypes:["solana"],get isInstalled(){return"okxwallet"in window&&!!window?.okxwallet?.isOkxWallet},getMobileRedirect({isSolana:e,connectOnly:t}){return"https://www.okx.com/download?deeplink="+encodeURIComponent("okx://wallet/dapp/url?dappUrl="+Cn({client:this.client,isSolana:e,connectOnly:t}))}}});function wn({connectorType:e,walletClientType:t}){for(let n of xn)if(e===n||t===n)return vn[n]}function Cn({client:e,isSolana:t,connectOnly:n}){let r=new URL(window.location.href);return r.searchParams.set("privy_connector",t?"solana_adapter":"injected"),r.searchParams.set("privy_wallet_client",e),r.searchParams.set("privy_connect_only",String(n)),encodeURIComponent(r.href.replace(/\/$/g,""))}const bn=()=>{let e=Ye.get(lt);return e&&Array.isArray(e)&&e.map((e=>(e=>e&&"string"==typeof e.address&&"string"==typeof e.connectorType&&"string"==typeof e.walletClientType&&"number"==typeof e.connectedAt)(e))).every(Boolean)?e:[]};let jn=["phantom","glow","solflare","backpack","okx_wallet","walletconnect","mobile_wallet_adapter"];function kn(e){return e.toLowerCase().split(" ").join("_")}class Tn extends cn{get isInstalled(){return!0}get wallet(){return this._wallet}buildConnectedWallet(){return this._wallet.accounts.map((e=>({type:"solana",provider:new a.ConnectedStandardSolanaWallet({wallet:this._wallet,account:e}),address:e.address,connectedAt:Date.now(),walletClientType:this._wallet.name,connectorType:this.connectorType,imported:!1,meta:{name:this._wallet.name,id:this._wallet.name,icon:this._wallet.icon},isConnected:async()=>this._wallet.accounts.length>0,disconnect:()=>{this.disconnect()}})))}async syncAccounts(){this.wallets=this.buildConnectedWallet(),this.emit("walletsUpdated")}get walletBranding(){return{id:this.wallet.name,name:this.wallet.name,icon:this.wallet.icon}}async initialize(){this.subscribeListeners(),await this.syncAccounts(),this.shouldAttemptAutoConnect()&&await(this.wallet.features["standard:connect"]?.connect({silent:!0}).catch((()=>{}))),this.initialized=!0,this.emit("initialized")}async connect(e){return e.showPrompt&&await this.promptConnection(),await this.isConnected()?this.getConnectedWallet():null}async getConnectedWallet(){return this.wallets.sort(((e,t)=>t.connectedAt-e.connectedAt))[0]||null}async isConnected(){return this._wallet.accounts.length>0}subscribeListeners(){this._unsubscribeListeners=this.wallet.features["standard:events"]?.on("change",this.onChange)}unsubscribeListeners(){this._unsubscribeListeners?.()}shouldAttemptAutoConnect(){return!(!this.autoConnectEnabled||!jn.includes(this.walletClientType))&&("phantom"!==this.walletClientType||bn().some((({walletClientType:e})=>"phantom"===e)))}constructor(e,t){super(kn(e.name)),this.chainType="solana",this.connectorType="solana_adapter",this.disconnect=()=>{this.wallet.features["standard:disconnect"]?.disconnect().catch((e=>console.error("Error disconnecting",e)))},this.promptConnection=async()=>{try{await(this.wallet.features["standard:connect"]?.connect())}catch(e){throw nn(e)}},this.onChange=()=>{this.syncAccounts()},this._wallet=e,this.autoConnectEnabled=t,this.wallets=[]}}class An extends Tn{get walletBranding(){return{id:this.id,name:this.name,icon:this.icon}}async initialize(){this.initialized=!0,this.emit("initialized")}async connect(){throw Error("connect called for an uninstalled wallet via the SolanaNullConnector")}constructor({id:e,name:t,icon:n}){super({name:t},!1),this.connectorType="null",this.proxyProvider=new pn(void 0,ct),this.disconnect=async()=>{throw Error("disconnect called for an uninstalled wallet via the SolanaNullConnector")},this.promptConnection=async()=>{throw Error("promptConnection called for an uninstalled wallet via the SolanaNullConnector")},this.id=e,this.name=t,this.icon=n}}function Sn(e){return"solana"===e.chainType}const En=ne.create((()=>({listings:[]}))),In=En.setState,Pn=e=>{let t;try{t=new URL(e).hostname}catch(e){return}return En.getState().listings.find((({homepage:e})=>{let n;try{n=new URL(e).hostname}catch(e){return!1}return t.includes(n)}))},Nn=e=>En((({listings:t})=>t.find((({slug:t})=>_n(t)===_n(e)))));function _n(e){return"cryptocom"===e?"cryptocom-defi":"binance"===e?"binance-defi":e.replace(/[-_]wallet$/,"")}function Mn({src:t,...n}){/*#__PURE__*/return e.jsx("img",{src:t,...n,style:{display:"none"}})}const Fn={appearance:{landingHeader:"Log in or sign up",theme:"light",walletList:["detected_ethereum_wallets","metamask","coinbase_wallet","rainbow","base_account","wallet_connect"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",externalWallets:{coinbaseWallet:{}},embeddedWallets:{extendedCalldataDecoding:!1},captchaEnabled:!1,_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let Ln=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","binance","binanceus","bitkeep"]),Wn=e=>Ln.has(e),Dn=(e,t,n)=>n.indexOf(e)===t;function Rn(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return Ce.default({...e.toHsl(),l:n})}function On(e,t){let n=e.getLuminance(),r=t.getLuminance();return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Bn({backgroundTheme:e,accentHex:t}){let n,r;"light"===e?n=!1:"dark"===e?n=!0:(n=.5>=Ce.default(e).getLuminance(),r=Ce.default(e).toHslString());let a=n?"dark":"light",i=n?Un:zn,{accent:o,accentLight:s,accentHover:l,accentDark:c,accentDarkest:d}=function(e,t){if(!e){let e=t?Un:zn;return{accent:Ce.default(e.background.interactive),accentLight:Ce.default(e.background.interactive),accentHover:Ce.default(e.background["interactive-hover"]),accentDark:Ce.default(e.background["interactive-clicked"]),accentDarkest:Ce.default(e.background["interactive-disabled"])}}let n=Ce.default(e);return{accent:n,accentLight:Rn(n,.15),accentHover:Rn(n,.3),accentDark:Rn(n,-.06),accentDarkest:Rn(n,-.6)}}(t,n),u=function(e){let t=Ce.default(zn.text.default),n=Ce.default(Un.text.default),r=On(e,t),a=On(e,n),i=e.toHsl();return i.h>=220&&i.h<=300&&a>=3?Un.text.default:r>a?zn.text.default:Un.text.default}(o),p=Ce.default(u),h=On(o,Ce.default(i.background.default))>=3;return{colorScheme:a,background:r||i.background.default,background2:i.background.elevated,background3:i.background.interactive,foreground:i.text.default,foreground2:i.text.muted,foreground3:i.text.placeholder,foreground4:i.border.default,accent:o.toHslString(),accentLight:s.toHslString(),accentHover:l.toHslString(),accentDark:c.toHslString(),accentDarkest:d.toHslString(),foregroundAccent:p.toHslString(),success:i.background.success,successDark:i.text.success,successLight:i.background.success,error:i.text.error,errorLight:i.background.error,warn:i.background.warning,warnLight:i.background.warning,warningDark:i.text.warning,errorDark:i.text.error,successBg:i.background.success,errorBg:i.background.error,errorBgHover:i.background["error-hover"],warnBg:i.background.warning,infoBg:i.background.info,infoBgHover:i.background["info-hover"],borderDefault:i.border.default,borderHover:i.border["default-hover"],borderFocus:i.border.focused,borderError:i.border.error,borderSuccess:i.border.success,borderWarning:i.border.warning,borderInfo:i.border.info,borderInteractive:i.border.interactive,borderInteractiveHover:i.border["interactive-hover"],backgroundHover:i.background["default-hover"],backgroundClicked:i.background["default-clicked"],backgroundDisabled:i.background["default-disabled"],backgroundInteractive:i.background.interactive,backgroundInteractiveHover:i.background["interactive-hover"],backgroundInteractiveClicked:i.background["interactive-clicked"],backgroundInteractiveDisabled:i.background["interactive-disabled"],foregroundHover:i.text.default,foregroundClicked:i.text.default,foregroundDisabled:i.text["default-disabled"],foregroundInteractive:i.text.interactive,foregroundInteractiveHover:i.text["interactive-hover"],accentHasGoodContrast:h?"1":"0",linkNavigationColor:h?o.toHslString():i.text.default,linkNavigationDecoration:h?"none":"underline",iconDefault:i.icon.default,iconMuted:i.icon.muted,iconSubtle:i.icon.subtle,iconInverse:i.icon.inverse,iconSuccess:i.icon.success,iconWarning:i.icon.warning,iconError:i.icon.error,iconInteractive:i.icon.interactive,iconDefaultHover:i.icon["default-hover"],iconMutedHover:i.icon["muted-hover"],iconSubtleHover:i.icon["subtle-hover"],iconDefaultClicked:i.icon["default-clicked"],iconMutedClicked:i.icon["muted-clicked"],iconSubtleClicked:i.icon["subtle-clicked"],iconDefaultDisabled:i.icon["default-disabled"],iconMutedDisabled:i.icon["muted-disabled"],iconSubtleDisabled:i.icon["subtle-disabled"],iconErrorHover:i.icon["error-hover"],iconInteractiveHover:i.icon["interactive-hover"],iconErrorClicked:i.icon["error-clicked"],iconInteractiveClicked:i.icon["interactive-clicked"],iconMutedDisabledAlt:i.icon["muted-disabled"],iconSubtleDisabledAlt:i.icon["subtle-disabled"]}}const Un={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","elevated-hover":"#242B3B","default-clicked":"#1A2230","elevated-clicked":"#2C3444","default-disabled":"#020713","elevated-disabled":"#141824",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#EF4444","interactive-clicked":"#6560CC","muted-disabled-alt":"#404452","subtle-disabled-alt":"#404452"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",inverse:"#020713",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-hover":"#F8F8F8","muted-hover":"#9BA2AE","placeholder-hover":"#656C78","default-clicked":"#F8F8F8","muted-clicked":"#9BA2AE","placeholder-clicked":"#656C78","default-disabled":"#404452","muted-disabled":"#404452","placeholder-disabled":"#404452","error-hover":"#FA8B8B","interactive-hover":"#8C88E5","error-clicked":"#F87171","interactive-clicked":"#7671CC","error-disabled":"#404452","interactive-disabled":"#404452"},border:{default:"#1F2937",primary:"#110F2A",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF","default-clicked":"#1F2937","interactive-clicked":"#88B0FF","default-active":"#F8F8F8","default-disabled":"#1F2937","interactive-disabled":"#1F2937","error-hover":"#971B1C","error-clicked":"#971B1C","error-disabled":"#1F2937"}},zn={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","elevated-hover":"#E8E9F4","default-clicked":"#F1F2F9","elevated-clicked":"#DFE0EF","default-disabled":"#FFFFFF","elevated-disabled":"#F1F2F9",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482","error-disabled":"#CBCDE1","interactive-disabled":"#CBCDE1"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",inverse:"#FFFFFF",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-hover":"#040217","muted-hover":"#64668B","placeholder-hover":"#9498B8","default-clicked":"#040217","muted-clicked":"#64668B","placeholder-clicked":"#9498B8","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","placeholder-disabled":"#CBCDE1","error-hover":"#991B1B","interactive-hover":"#5B4FFF","error-clicked":"#991B1B","interactive-clicked":"#5B4FFF","error-disabled":"#CBCDE1","interactive-disabled":"#CBCDE1"},border:{default:"#E2E3F0",primary:"#110F2A",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF","default-clicked":"#E2E3F0","interactive-clicked":"#5B4FFF","default-active":"#110F2A","default-disabled":"#E2E3F0","interactive-disabled":"#E2E3F0","error-hover":"#F69393","error-clicked":"#F69393","error-disabled":"#E2E3F0"}};function Hn(e,t,n,r,i){let o,s,l,c,d,u,p,h,g,m,y,f,x,v,w,C,b=n?console.warn:()=>{};t?.loginMethods?(o=t.loginMethods.includes("email"),s=t.loginMethods.includes("sms"),c=t.loginMethods.includes("wallet"),d=t.loginMethods.includes("google"),u=t.loginMethods.includes("twitter"),p=t.loginMethods.includes("discord"),m=t.loginMethods.includes("spotify"),y=t.loginMethods.includes("instagram"),h=t.loginMethods.includes("tiktok"),g=t.loginMethods.includes("line"),x=t.loginMethods.includes("github"),f=t.loginMethods.includes("linkedin"),v=t.loginMethods.includes("apple"),w=t.loginMethods.includes("farcaster"),C=t.loginMethods.includes("telegram"),l=t.loginMethods.includes("passkey")):(o=e.email_auth,s=e.sms_auth,c=e.wallet_auth||e.solana_wallet_auth,d=e.google_oauth,u=e.twitter_oauth,p=e.discord_oauth,x=e.github_oauth,m=e.spotify_oauth,y=e.instagram_oauth,h=e.tiktok_oauth,g=e.line_oauth,f=e.linkedin_oauth,v=e.apple_oauth,w=e.farcaster_auth,C=e.telegram_auth,l=e.passkey_auth),e.passkey_auth&&(l=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(l=!1);let j=[o,s].filter(Boolean),k=[d,u,p,x,m,y,h,g,f,v,w,C].filter(Boolean),T=[c].filter(Boolean),A=t?.loginMethods?.includes("passkey")??!1,S=e.passkeys_for_signup_enabled??!1,E=[l&&(S||A)].filter(Boolean);if(j.length+k.length+T.length+E.length===0)throw Error("You must enable at least one login method");let I=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.show_wallet_login_first;I&&0===T.length?(b("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),I=!1):I||k.length+j.length!==0||(b("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),I=!0);let P=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&b("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let N=(({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(Wn).filter(Dn):e?e.filter(Wn).filter(Dn):Fn.appearance.walletList)({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),_=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],n=[];for(let n of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(n)?console.warn(`Duplicated login method: ${n}`):t.push(n);for(let r of e.overflow??[])t.includes(r)||n.includes(r)?console.warn(`Duplicated login method: ${r}`):n.push(r);return{primary:t,overflow:n}})({input:t?.loginMethodsAndOrder}),M=t?.intl?.defaultCountry??"US",{chains:F,defaultChain:L}=function({supportedChains:e,defaultChainFromConfig:t}){let n;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");n=a.dedupeSupportedChains(e)}else n=[...a.DEFAULT_SUPPORTED_CHAINS];let r=e?n[0]:a.mainnet,i=t??r;if(!n.find((e=>e.id===i.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:n,defaultChain:i}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),W=!!t?.defaultChain,D=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,R=D?"all-users":e.embedded_wallet_config.ethereum.create_on_login,O=e.embedded_wallet_config.solana.create_on_login;e.solana_wallet_auth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`");let B=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,U=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0;return{id:e.id,appClientId:i,name:e.name,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:t?.appearance?.logo??e.logo_url??void 0,landingHeader:t?.appearance?.landingHeader??Fn.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:Bn({backgroundTheme:t?.appearance?.theme??Fn.appearance.theme,accentHex:t?.appearance?.accentColor??e.accent_color}),loginGroupPriority:I?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:N,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.wallet_auth??!1,solanaWalletAuth:e.solana_wallet_auth??!1})},loginMethods:{wallet:c,email:o,sms:s,passkey:l,google:d,twitter:u,discord:p,github:x,spotify:m,instagram:y,tiktok:h,line:g,linkedin:f,apple:v,farcaster:w,telegram:C},disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:_,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.terms_and_conditions_url,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacy_policy_url,requireUsersAcceptTerms:e.require_users_accept_terms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.wallet_connect_cloud_project_id??Fn.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:t?.externalWallets?.signatureRequestTimeouts??{}},chains:F,defaultChain:L,intl:{defaultCountry:M},shouldEnforceDefaultChainOnConnect:W,captchaEnabled:e.captcha_enabled??Fn.captchaEnabled,captchaSiteKey:e.captcha_site_key,externalWallets:{coinbaseWallet:{config:{appName:e.name,appLogoUrl:e.logo_url,preference:{options:"all",...t?.externalWallets?.coinbaseWallet?.config?.preference},...t?.externalWallets?.coinbaseWallet?.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...t?.externalWallets?.baseAccount?.config,preference:{...t?.externalWallets?.baseAccount?.config?.preference,telemetry:!1}}},walletConnect:{enabled:P},solana:{connectors:t?.externalWallets?.solana?.connectors},disableAllExternalWallets:t?.externalWallets?.disableAllExternalWallets??!1},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!D&&(e.embedded_wallet_config.require_user_owned_recovery_on_create??!1),userOwnedRecoveryOptions:D?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:t?.embeddedWallets?.priceDisplay??{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:t?.embeddedWallets?.ethereum?.createOnLogin??R},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??O},disableAutomaticMigration:t?.embeddedWallets?.disableAutomaticMigration??!1,mode:e.embedded_wallet_config.mode,showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforce_wallet_uis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??r??"https://auth.privy.io"}},mfa:{methods:e.mfa_methods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink},customAuth:D?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:B,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??Fn._render.standalone},fundingConfig:U,fundingMethodConfig:{...t?.fundingMethodConfig??Fn.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??Fn.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??Fn.fundingMethodConfig.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:t?.customOAuthRedirectUrl,solanaRpcs:{"solana:mainnet":t?.solana?.rpcs?.["solana:mainnet"]??null,"solana:devnet":t?.solana?.rpcs?.["solana:devnet"]??null,"solana:testnet":t?.solana?.rpcs?.["solana:testnet"]??null}}}const Vn={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},fiat_on_ramp_enabled:!1,captcha_enabled:!1,captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1},$n=Hn(Vn,void 0,!1);let qn=/*#__PURE__*/n.createContext({appConfig:$n,isServerConfigLoaded:!1});const Gn=()=>{let{appConfig:e}=n.useContext(qn);return e},Yn=/*#__PURE__*/n.createContext({app:$n,currentScreen:null,lastScreen:null,navigate:s.notImplemented,navigateBack:s.notImplemented,resetNavigation:s.notImplemented,setModalData:s.notImplemented,onUserCloseViaDialogOrKeybindRef:void 0}),Zn=()=>n.useContext(Yn),Kn=({style:t,...n})=>{let{app:r}=Zn();/*#__PURE__*/return e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...t},...n,children:[/*#__PURE__*/e.jsx("rect",{width:"28",height:"28",rx:"3",fill:"dark"===r?.appearance.palette.colorScheme?"#3396ff":"#141414"}),/*#__PURE__*/e.jsx("g",{clipPath:"url(#clip0_1765_9946)",children:/*#__PURE__*/e.jsx("path",{d:"M8.09448 10.3941C11.3558 7.20196 16.6442 7.20196 19.9055 10.3941L20.2982 10.7782C20.3369 10.8157 20.3677 10.8606 20.3887 10.9102C20.4097 10.9599 20.4206 11.0132 20.4206 11.0671C20.4206 11.121 20.4097 11.1744 20.3887 11.224C20.3677 11.2737 20.3369 11.3186 20.2982 11.3561L18.9554 12.6702C18.9158 12.7086 18.8628 12.7301 18.8077 12.7301C18.7526 12.7301 18.6996 12.7086 18.66 12.6702L18.1198 12.1415C15.8448 9.91503 12.1557 9.91503 9.88015 12.1415L9.30167 12.7075C9.26207 12.7459 9.20909 12.7673 9.15395 12.7673C9.0988 12.7673 9.04582 12.7459 9.00622 12.7075L7.66346 11.3934C7.62475 11.3559 7.59397 11.3109 7.57295 11.2613C7.55193 11.2117 7.5411 11.1583 7.5411 11.1044C7.5411 11.0505 7.55193 10.9971 7.57295 10.9475C7.59397 10.8979 7.62475 10.8529 7.66346 10.8154L8.09448 10.3941ZM22.6829 13.1115L23.8776 14.2814C23.9163 14.319 23.9471 14.3639 23.9681 14.4135C23.9892 14.4632 24 14.5165 24 14.5704C24 14.6243 23.9892 14.6777 23.9681 14.7273C23.9471 14.777 23.9163 14.8219 23.8776 14.8594L18.4893 20.1332C18.4102 20.2101 18.3042 20.2531 18.1938 20.2531C18.0835 20.2531 17.9775 20.2101 17.8984 20.1332L14.0743 16.3901C14.0545 16.3708 14.0279 16.36 14.0003 16.36C13.9726 16.36 13.9461 16.3708 13.9263 16.3901L10.1021 20.1332C10.023 20.2101 9.91703 20.2531 9.8067 20.2531C9.69636 20.2531 9.59038 20.2101 9.51124 20.1332L4.12236 14.8594C4.08365 14.8219 4.05287 14.777 4.03185 14.7273C4.01083 14.6777 4 14.6243 4 14.5704C4 14.5165 4.01083 14.4632 4.03185 14.4135C4.05287 14.3639 4.08365 14.319 4.12236 14.2814L5.31767 13.1115C5.39678 13.0348 5.50265 12.9919 5.61285 12.9919C5.72305 12.9919 5.82892 13.0348 5.90803 13.1115L9.73216 16.8546C9.75194 16.874 9.7785 16.8848 9.80616 16.8848C9.83381 16.8848 9.86037 16.874 9.88015 16.8546L13.7043 13.1115C13.7834 13.0346 13.8894 12.9916 13.9997 12.9916C14.1101 12.9916 14.216 13.0346 14.2952 13.1115L18.1198 16.8546C18.1396 16.874 18.1662 16.8848 18.1938 16.8848C18.2215 16.8848 18.2481 16.874 18.2678 16.8546L22.092 13.1115C22.1711 13.0346 22.2771 12.9916 22.3874 12.9916C22.4977 12.9916 22.6037 13.0346 22.6829 13.1115Z",fill:"white"})}),/*#__PURE__*/e.jsx("defs",{children:/*#__PURE__*/e.jsx("clipPath",{id:"clip0_1765_9946",children:/*#__PURE__*/e.jsx("rect",{width:"20",height:"12.2531",fill:"white",transform:"translate(4 8)"})})})]})},Qn="data:image/png;base64,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";class Xn extends un{async initialize(){let e=await this.createProvider();this.provider=e,this.proxyProvider.setWalletProvider(e),this.subscribeListeners(),e.session&&(this.walletProvider?.session?.peer.metadata.url&&(this.walletEntry=Pn(this.walletProvider?.session?.peer.metadata.url),this.walletClientType=this.walletEntry?.slug||"unknown"),this.connected=!0,await this.syncAccounts()),this.initialized=!0,this.emit("initialized")}async connect(e){return e.showPrompt&&await this.promptConnection(),this.getConnectedWallet()}async isConnected(){return!!this.walletProvider?.connected}get walletBranding(){let e=this.walletProvider?.session?.peer.metadata.icons?.[0];return{name:Ut(this.walletProvider?.session?.peer.metadata.name||"")||"WalletConnect",icon:"string"==typeof e?e:Qn,id:this.walletProvider?.session?.peer.metadata.name.toLowerCase()||"wallet_connect_v2"}}async resetConnection(e){this.walletProvider&&this.walletProvider.connected&&(await this.walletProvider.disconnect(),this.walletProvider.signer.session=void 0,this.walletClientType=e,this.redirectUri=void 0,this.fallbackUniversalRedirectUri=void 0,function(){try{localStorage.removeItem(Qe)}catch{}}(),this.onDisconnect())}async promptConnection(){if(this.provider)return new Promise(((e,t)=>{(async()=>{let t="",n=await Promise.race([this.walletProvider?.enable(),this.proxyProvider.walletTimeout()]);if(n?.length&&(t=n[0]),!t||""===t)throw new h.PrivyConnectorError("Unable to retrieve address");this.walletProvider?.session?.peer.metadata.url&&(this.walletEntry=Pn(this.walletProvider?.session?.peer.metadata.url),this.walletClientType=this.walletEntry?.slug||"unknown",this.proxyProvider.rpcTimeoutDuration=dn(this.rpcConfig,this.walletClientType)),this.connected=!0,await this.syncAccounts(n),e()})().catch((e=>{t(e?nn(e):new h.PrivyConnectorError("Unknown error during connection"))}))}))}disconnect(){this.walletProvider?.disconnect().then((()=>this.onDisconnect())).catch((()=>console.warn("Unable to disconnect WalletConnect provider")))}get walletProvider(){return this.proxyProvider.walletProvider}setWalletProvider(e){this.proxyProvider.setWalletProvider(e)}async createProvider(){let e={};for(let t of this.chains){let n=Ht(t.id,this.chains,this.rpcConfig,this.privyAppId);n&&(e[t.id]=n)}let t=this.shouldEnforceDefaultChainOnConnect?[this.defaultChain.id]:[],n=this.chains.map((e=>e.id)),r=await re.EthereumProvider.init({projectId:this.walletConnectCloudProjectId,chains:t,optionalChains:n,optionalEvents:re.OPTIONAL_EVENTS,optionalMethods:re.OPTIONAL_METHODS,rpcMap:e,showQrModal:!1,metadata:{description:this.privyAppName,name:this.privyAppName,url:window.location.origin,icons:[]}});return r.on("display_uri",(e=>{if(r.signer.abortPairingAttempt(),function(){try{localStorage.removeItem(Qe)}catch{}}(),!this.showPrivyQrModal)throw new h.PrivyConnectorError("WalletConnect modal not available - Privy handles wallet connections through its own UI");if(W.isMobile&&this.walletEntry){let{redirect:t,href:n}=function(e,t){let n=Ze(t);if(n.deepLink)return Je(n.deepLink,e);if(n.universalLink)return et(n.universalLink,e);throw new h.PrivyClientError(`Unsupported wallet ${t.id}`)}(e,this.walletEntry);tt(t,"_self"),function({href:e,name:t}){try{localStorage.setItem(Qe,JSON.stringify({href:e,name:t}))}catch{}}({href:n,name:this.walletEntry.metadata?.shortName||this.walletEntry.name});let r=Ke(e,this.walletEntry);return this.redirectUri=t,this.fallbackUniversalRedirectUri=r?.redirect,this.showPrivyQrModal({native:t,universal:t})}if(this.redirectUri=void 0,this.walletEntry){let t=Ke(e,this.walletEntry);this.fallbackUniversalRedirectUri=t?.redirect}this.showPrivyQrModal({native:e,universal:void 0})})),r.on("connect",(()=>{r.session?.peer.metadata.url&&(this.walletEntry=Pn(r.session?.peer.metadata.url),this.walletClientType=this.walletEntry?.slug||"unknown")})),r}async enableProvider(){return this.walletProvider?.connected?Promise.resolve(this.walletProvider.accounts):await(this.walletProvider?.enable())}setWalletEntry(e,t){this.walletEntry=e,this.showPrivyQrModal=t}constructor({walletConnectCloudProjectId:e,rpcConfig:t,chains:n,defaultChain:r,shouldEnforceDefaultChainOnConnect:a,privyAppId:i,privyAppName:o,walletClientType:s}){super(s||"unknown",n,r,t),this.connectorType="wallet_connect_v2",this.privyAppId=i,this.privyAppName=o,this.walletConnectCloudProjectId=e,this.rpcConfig=t,this.shouldEnforceDefaultChainOnConnect=a,this.proxyProvider=new pn(void 0,this.rpcTimeoutDuration),s&&(this.walletEntry=(e=>En.getState().listings.find((({slug:t})=>_n(t)===_n(e))))(s),this.walletClientType=s)}}const Jn=/*#__PURE__*/n.createContext(void 0);let er=()=>n.useContext(Jn);function tr(e,t){if(!t)return;let r=er().current[e];return n.useEffect((()=>{for(let[n,a]of Object.entries(t))Object.prototype.hasOwnProperty.call(r,n)||console.warn(`Invalid event type "${n}" for action "${e}"`),r[n]?.push(a);return()=>{for(let[n,a]of Object.entries(t))Object.prototype.hasOwnProperty.call(r,n)||console.warn(`Invalid event type "${n}" for action "${e}"`),r[n]=r[n]?.filter((e=>e!==a))}}),[t])}function nr(e,t,n,...r){for(let a of e.current[t][n])a(...r)}function rr(){let e=er();return(t,n,...r)=>nr(e,t,n,...r)}const ar=/*#__PURE__*/o.styled.div.withConfig({displayName:"Grow",componentId:"sc-681ff332-0"})(["text-align:left;flex-grow:1;"]),ir=/*#__PURE__*/o.styled.div.withConfig({displayName:"AlignBottom",componentId:"sc-681ff332-1"})(["display:flex;flex-direction:column;justify-content:flex-end;flex-grow:1;"]),or=/*#__PURE__*/o.styled.div.withConfig({displayName:"LoginMethodContainer",componentId:"sc-681ff332-2"})(["display:flex;flex-direction:column;gap:8px;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]),sr=/*#__PURE__*/o.styled(or).withConfig({displayName:"LoginMethodContainerWithScrollShadows",componentId:"sc-681ff332-3"})([""," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;max-height:400px;overflow-y:auto;scrollbar-width:none;padding:3px;"],(e=>"light"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0));let lr=/*#__PURE__*/o.css(["&&{width:100%;font-size:16px;line-height:24px;min-height:56px;@media (min-width:440px){font-size:14px;}display:flex;gap:12px;align-items:center;color:var(--privy-color-foreground);padding:10px 12px;border:1px solid var(--privy-color-foreground-4) !important;border-radius:var(--privy-border-radius-md);transition:background-color 200ms ease;cursor:pointer;&:hover{background-color:var(--privy-color-background-2);}&:disabled{cursor:pointer;background-color:var(--privy-color-background-2);}}"]);const cr=/*#__PURE__*/o.styled.div.withConfig({displayName:"Subtitle",componentId:"sc-681ff332-4"})(["text-align:center;font-size:14px;margin-bottom:24px;"]),dr=/*#__PURE__*/o.styled.button.attrs({className:"login-method-button"}).withConfig({displayName:"LoginMethodButton",componentId:"sc-681ff332-5"})(["",""],lr),ur=/*#__PURE__*/o.styled.div.withConfig({displayName:"LoginMethodIconWrapper",componentId:"sc-681ff332-7"})(["width:32px;height:32px;border-radius:",";background:",";display:flex;align-items:center;justify-content:center;flex-shrink:0;svg{width:",";height:",";color:",";}"],(e=>e.$fullSize?"0":"4px"),(e=>e.$fullSize?"transparent":"var(--privy-color-background-2)"),(e=>e.$fullSize?"32px":"18px"),(e=>e.$fullSize?"32px":"18px"),(e=>e.$fullSize?"inherit":"var(--privy-color-icon-muted)")),pr=/*#__PURE__*/o.styled.div.withConfig({displayName:"Hide",componentId:"sc-681ff332-8"})(["width:100%;height:100%;min-height:inherit;display:flex;flex-direction:column;",""],(e=>e.$if?"display: none;":"")),hr=/*#__PURE__*/o.styled.div.withConfig({displayName:"EmptyWalletState",componentId:"sc-681ff332-9"})(["width:100%;height:100%;padding:",";"],(e=>e.$withPadding?"64px 0px":"0px")),gr=/*#__PURE__*/o.styled.div.withConfig({displayName:"Header",componentId:"sc-681ff332-10"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-bottom:32px;gap:12px;& h3{font-size:18px;font-style:normal;font-weight:600;line-height:24px;}& p{max-width:300px;font-size:14px;font-style:normal;font-weight:400;line-height:20px;}"]);function mr(t){/*#__PURE__*/return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...t,children:/*#__PURE__*/e.jsx("g",{fill:t.color||"var(--privy-color-foreground)",children:/*#__PURE__*/e.jsx("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let yr=/*#__PURE__*/o.styled.span.withConfig({displayName:"TermsAndConditionsContainer",componentId:"sc-ff3bd734-0"})(["margin-top:16px;font-size:13px;text-align:center;color:var(--privy-color-foreground-3);display:block;&& > a{color:var(--privy-color-accent);}"]);function fr({app:{legal:{privacyPolicyUrl:t,termsAndConditionsUrl:n,requireUsersAcceptTerms:r}},alwaysShowImplicitConsent:a}){let i=!(!t||!n);return r&&!a||!n&&!t?
|
|
2
2
|
/*#__PURE__*/e.jsx(yr,{}):
|
|
3
3
|
/*#__PURE__*/ /*#__PURE__*/e.jsxs(yr,{children:["By logging in I agree to the"," ",n&&/*#__PURE__*/e.jsx("a",{href:n,target:"_blank",children:i?"Terms":"Terms of Service"}),i&&" & ",t&&/*#__PURE__*/e.jsx("a",{href:t,target:"_blank",children:"Privacy Policy"})]})}const xr=({className:t})=>{let{appearance:n}=Gn();/*#__PURE__*/return e.jsx(wr,{className:t,children:n.footerLogo??/*#__PURE__*/e.jsx(vr,{href:"https://www.privy.io/",target:"_blank",id:"protected-by-privy",children:/*#__PURE__*/e.jsx(mr,{color:"currentColor",height:13,width:150})})})};let vr=/*#__PURE__*/o.styled.a.withConfig({displayName:"PrivyLink",componentId:"sc-ff3bd734-1"})(["&&{padding:0;color:var(--privy-color-foreground-3);}"]);const wr=/*#__PURE__*/o.styled.div.withConfig({displayName:"ModalFooter",componentId:"sc-ff3bd734-2"})(["display:flex;align-items:center;justify-content:center;padding-top:8px;padding-bottom:12px;gap:8px;font-size:13px;&& a{padding:0.5rem 0;&:hover{text-decoration:none;}}@media all and (display-mode:standalone){padding-bottom:30px;}"]),Cr=({success:t,fail:n})=>/*#__PURE__*/e.jsxs(jr,{children:[/*#__PURE__*/e.jsx(br,{children:/*#__PURE__*/e.jsx(Tr,{className:t?"success":n?"fail":""})}),/*#__PURE__*/e.jsx(br,{children:/*#__PURE__*/e.jsx(kr,{className:t?"success":n?"fail":""})})]});let br=/*#__PURE__*/o.styled.span.withConfig({displayName:"PositionedAbsoluteLoader",componentId:"sc-aba6339d-0"})(["&&{position:absolute;top:0;left:0;z-index:2;}"]),jr=/*#__PURE__*/o.styled.span.withConfig({displayName:"ConnectionLoaderContainer",componentId:"sc-aba6339d-1"})(["position:relative;width:82px;height:82px;display:inline-block;"]);const kr=/*#__PURE__*/o.styled.span.withConfig({displayName:"Loader",componentId:"sc-aba6339d-2"})(["&&{width:82px;height:82px;border-width:4px;border-style:solid;border-color:",";border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1.2s linear infinite;transition:border-color 800ms;}@keyframes rotation{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}&&&.success{border-color:var(--privy-color-icon-success);border-bottom-color:var(--privy-color-icon-success);}&&&.fail{border-color:var(--privy-color-icon-error);border-bottom-color:var(--privy-color-icon-error);}"],(e=>e.color??"var(--privy-color-icon-subtle)")),Tr=/*#__PURE__*/o.styled(kr).withConfig({displayName:"LoaderFaint",componentId:"sc-aba6339d-3"})(["&&{border-bottom-color:",";border-color:",";animation:none;opacity:0.5;}"],(e=>e.color??"var(--privy-color-border-default)"),(e=>e.color??"var(--privy-color-border-default)")),Ar=t=>/*#__PURE__*/e.jsx(Sr,{color:t.color||"var(--privy-color-foreground-3)"});let Sr=/*#__PURE__*/o.styled(kr).withConfig({displayName:"StyledButtonLoader",componentId:"sc-aba6339d-4"})(["&&{height:1rem;width:1rem;margin:2px 0;border-width:1.5px;transition:border-color 200ms ease;}"]);const Er=({variant:t="primary",size:n="lg",children:r,success:a,...i})=>{switch(t){case"secondary":/*#__PURE__*/return e.jsx(Fr,{size:n,...i,children:r});case"error":/*#__PURE__*/return e.jsx(Fr,{$warn:!0,size:n,...i,children:r});case"muted":/*#__PURE__*/return e.jsx(Lr,{size:n,...i,children:r});default:/*#__PURE__*/return e.jsx(Pr,{size:n,success:a,...i,children:r})}},Ir=/*#__PURE__*/o.styled.button.withConfig({displayName:"BaseButton",componentId:"sc-e537b447-0"})(["display:flex;flex-direction:row;align-items:center;justify-content:center;user-select:none;&{width:auto;cursor:pointer;border-radius:",";font-size:14px;font-style:normal;font-weight:500;line-height:22px;letter-spacing:-0.016px;}&&{height:",";padding:0 ",";}"],(({$size:e})=>"sm"===e?"6px":"var(--privy-border-radius-sm)"),(({$size:e})=>"sm"===e?"28px":"48px"),(({$size:e})=>"sm"===e?"10px":"16px")),Pr=({children:t,loading:n,disabled:r,success:a,size:i="lg",loadingText:o="Loading...",as:s,onClick:l,...c})=>{let d="a"===s,u=!(!n&&!r);/*#__PURE__*/return e.jsx(Mr,{as:s,disabled:d?void 0:u,"aria-disabled":d?u:void 0,$success:a,$size:i,onClick:e=>{d&&u?e.preventDefault():l?.(e)},...c,children:n?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Ar,{}),o?/*#__PURE__*/e.jsx("span",{style:{marginLeft:"8px"},children:o}):null]}):t})},Nr=({children:t,loading:n,disabled:r,...a})=>/*#__PURE__*/e.jsx(_r,{disabled:r,...a,children:n?/*#__PURE__*/e.jsx(Ar,{color:"var(--privy-color-foreground-accent)"}):t});let _r=/*#__PURE__*/o.styled(Ir).withConfig({displayName:"StyledPrimaryButtonWithoutGray",componentId:"sc-e537b447-1"})(["position:relative;&&{background-color:var(--privy-color-accent);color:var(--privy-color-foreground-accent);transition:background-color 200ms ease;}&:hover{background-color:var(--privy-color-accent-dark);}&:active{background-color:var(--privy-color-accent-dark);}&:disabled,&:hover:disabled,&:active:disabled{cursor:not-allowed;color:var(--privy-color-foreground-disabled);background-color:var(--privy-color-accent-dark);}"]),Mr=/*#__PURE__*/o.styled(Ir).withConfig({displayName:"StyledPrimaryButton",componentId:"sc-e537b447-2"})(["position:relative;&&{background-color:",";color:var(--privy-color-foreground-accent);transition:background-color 200ms ease;}&:hover{background-color:",";}&:active{background-color:",";}&:focus{outline:none;box-shadow:0 0 0 3px #949df9;}&:disabled{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],(e=>e.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(e=>e.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent-dark)"),(e=>e.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent-dark)"),(e=>e.disabled&&/*#__PURE__*/o.css(["&&&,&&&:hover,&&&:active{background-color:var(--privy-color-background-2);border:1px solid var(--privy-color-border-default);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"])));const Fr=({children:t,loading:n,disabled:r,size:a="lg",loadingText:i="Loading...",as:o,onClick:s,...l})=>{let c="a"===o,d=!(!n&&!r);/*#__PURE__*/return e.jsx(Wr,{as:o,disabled:c?void 0:d,"aria-disabled":c?d:void 0,$size:a,onClick:e=>{c&&d?e.preventDefault():s?.(e)},...l,children:n?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Ar,{}),i?/*#__PURE__*/e.jsx("span",{style:{marginLeft:"8px"},children:i}):null]}):t})},Lr=({children:t,loading:n,disabled:r,size:a="lg",loadingText:i="Loading...",as:o,onClick:s,...l})=>{let c="a"===o,d=!(!n&&!r);/*#__PURE__*/return e.jsx(Dr,{as:o,disabled:c?void 0:d,"aria-disabled":c?d:void 0,$size:a,onClick:e=>{c&&d?e.preventDefault():s?.(e)},...l,children:n?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Ar,{}),i?/*#__PURE__*/e.jsx("span",{style:{marginLeft:"8px"},children:i}):null]}):t})};let Wr=/*#__PURE__*/o.styled(Ir).withConfig({displayName:"StyledSecondaryButton",componentId:"sc-e537b447-3"})(["&&{border-width:1px;border-style:solid;border-color:",";background-color:var(--privy-color-background);color:",";transition:border-color 200ms ease,color 200ms ease,background-color 200ms ease;}&:hover{border-color:",";background-color:",";color:",";}&:active{border-color:",";background-color:",";color:",";}&:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],(e=>e.$warn?"var(--privy-color-border-error)":"var(--privy-color-accent)"),(e=>e.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(e=>e.$warn?"var(--privy-color-border-error)":"var(--privy-color-border-interactive-hover)"),(e=>e.$warn?"var(--privy-color-error-light)":"var(--privy-color-info-bg-hover)"),(e=>e.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(e=>e.$warn?"var(--privy-color-border-error)":"var(--privy-color-border-interactive)"),(e=>e.$warn?"var(--privy-color-error-bg-hover)":"var(--privy-color-info-bg)"),(e=>e.$warn?"var(--privy-color-error-dark)":"var(--privy-color-accent)"),(e=>e.disabled&&/*#__PURE__*/o.css(["&&&,&&&:hover,&&&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"]))),Dr=/*#__PURE__*/o.styled(Ir).withConfig({displayName:"StyledMutedButton",componentId:"sc-e537b447-4"})(["&&{border-width:1px;border-style:solid;border-color:var(--privy-color-border-default);background-color:transparent;color:var(--privy-color-text-muted);transition:border-color 200ms ease,color 200ms ease,background-color 200ms ease;}&:hover{border-color:var(--privy-color-border-default);background-color:var(--privy-color-info-bg-hover);color:var(--privy-color-foreground-2);}&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-info-bg);color:var(--privy-color-foreground-2);}&:focus{outline:none;box-shadow:0 0 0 3px #949df9;}&:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}&:hover:disabled,&:active:disabled{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}",""],(e=>e.disabled&&/*#__PURE__*/o.css(["&&&,&&&:hover,&&&:active{border-color:var(--privy-color-border-default);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-disabled);cursor:not-allowed;}"])));const Rr=({children:t,onClick:n,disabled:r,isSubmitting:a,...i})=>/*#__PURE__*/e.jsxs(Or,{$isSubmitting:a,onClick:n,disabled:r,...i,children:[/*#__PURE__*/e.jsx("span",{children:t}),
|
|
4
4
|
/*#__PURE__*/e.jsx("span",{children:/*#__PURE__*/e.jsx(Ar,{})})]});let Or=/*#__PURE__*/o.styled.button.withConfig({displayName:"StyledEmbeddedButton",componentId:"sc-e537b447-7"})(["&&{color:var(--privy-color-accent);font-size:16px;font-style:normal;font-weight:500;line-height:24px;cursor:pointer;border-radius:0px var(--privy-border-radius-mdlg) var(--privy-border-radius-mdlg) 0px;border:none;transition:color 200ms ease;@media (min-width:441px){font-size:14px;}:hover{color:var(--privy-color-accent-dark);}&& > :first-child{opacity:",";}&& > :last-child{position:absolute;display:flex;top:50%;left:50%;transform:translate3d(-50%,-50%,0);opacity:",";}:disabled,:hover:disabled{color:var(--privy-color-foreground-disabled);cursor:not-allowed;}}"],(e=>e.$isSubmitting?0:1),(e=>e.$isSubmitting?1:0));const Br=({backFn:t})=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(Vr,{onClick:t,children:/*#__PURE__*/e.jsx(je.default,{height:"16px",width:"16px",strokeWidth:2})})}),Ur=({infoFn:t})=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx($r,{"aria-label":"info",onClick:t,children:/*#__PURE__*/e.jsx(ke.default,{height:"22px",width:"22px",strokeWidth:2})})}),zr=t=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(Vr,{"aria-label":"close modal",onClick:t.onClose,children:/*#__PURE__*/e.jsx(Te.default,{height:"16px",width:"16px",strokeWidth:2})})}),Hr=({backFn:t,infoFn:n,onClose:r,title:a,closeable:i=!0,className:o})=>{let{closePrivyModal:l}=s.usePrivyInternal(),c=Gn();/*#__PURE__*/return e.jsxs(qr,{className:o,children:[/*#__PURE__*/e.jsxs(Gr,{children:[t&&/*#__PURE__*/e.jsx(Br,{backFn:t}),n&&/*#__PURE__*/e.jsx(Ur,{infoFn:n})]}),a&&/*#__PURE__*/e.jsx(Zr,{id:"privy-dialog-title",children:a}),/*#__PURE__*/e.jsx(Yr,{children:!c.render.standalone&&i&&/*#__PURE__*/e.jsx(zr,{onClose:r||(()=>l())})})]})};let Vr=/*#__PURE__*/o.styled.button.withConfig({displayName:"StyledButton",componentId:"sc-e033e17a-0"})(["&&{cursor:pointer;display:flex;opacity:0.6;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-full);padding:4px;> svg{margin:auto;color:var(--privy-color-foreground);}:hover{opacity:1;}}"]),$r=/*#__PURE__*/o.styled(Vr).withConfig({displayName:"TransparentStyledButton",componentId:"sc-e033e17a-1"})(["&&{background-color:transparent;}"]),qr=/*#__PURE__*/o.styled.div.withConfig({displayName:"StyledHeader",componentId:"sc-e033e17a-2"})(["padding:16px 0;display:flex;align-items:center;justify-content:space-between;h2{font-size:16px;line-height:24px;font-weight:600;color:var(--privy-color-foreground);}"]),Gr=/*#__PURE__*/o.styled.div.withConfig({displayName:"LeftActionContainer",componentId:"sc-e033e17a-3"})(["flex:1;align-items:center;display:flex;gap:8px;"]),Yr=/*#__PURE__*/o.styled.div.withConfig({displayName:"RightActionContainer",componentId:"sc-e033e17a-4"})(["flex:1;display:flex;justify-content:flex-end;"]),Zr=/*#__PURE__*/o.styled.div.withConfig({displayName:"TitleContainer",componentId:"sc-e033e17a-5"})(["overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis;text-align:center;color:var(--privy-color-foreground-2);"]);const Kr=({size:t})=>/*#__PURE__*/e.jsx(Qr,{$size:t,children:/*#__PURE__*/e.jsxs(Xr,{children:[/*#__PURE__*/e.jsx(Jr,{}),/*#__PURE__*/e.jsx(ea,{})]})});let Qr=/*#__PURE__*/o.styled.div.withConfig({displayName:"LoadingContainer",componentId:"sc-5be8451e-0"})(["--spinner-size:",";display:inline-flex;justify-content:center;align-items:center;@media all and (display-mode:standalone){margin-bottom:30px;}"],(e=>e.$size?e.$size:"96px")),Xr=/*#__PURE__*/o.styled.div.withConfig({displayName:"SpinnerContainer",componentId:"sc-5be8451e-1"})(["position:relative;height:var(--spinner-size);width:var(--spinner-size);opacity:1;animation:fadein 200ms ease;"]),Jr=/*#__PURE__*/o.styled.div.withConfig({displayName:"CircleFixed",componentId:"sc-5be8451e-2"})(["position:absolute;top:0;right:0;bottom:0;left:0;width:var(--spinner-size);height:var(--spinner-size);&&{border:4px solid var(--privy-color-border-default);border-radius:50%;}"]),ea=/*#__PURE__*/o.styled.div.withConfig({displayName:"CircleRotate",componentId:"sc-5be8451e-3"})(["position:absolute;top:0;right:0;bottom:0;left:0;width:var(--spinner-size);height:var(--spinner-size);animation:spin 1200ms linear infinite;&&{border:4px solid;border-color:var(--privy-color-icon-subtle) transparent transparent transparent;border-radius:50%;}@keyframes spin{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}"]);const ta=/*#__PURE__*/o.styled.div.withConfig({displayName:"ScreenRoot",componentId:"sc-cc9e9a32-0"})(["--screen-space:16px;--screen-space-lg:calc(var(--screen-space) * 1.5);position:relative;overflow:hidden;margin:0 calc(-1 * var(--screen-space));height:100%;border-radius:var(--privy-border-radius-lg);"]),na=/*#__PURE__*/o.styled.div.withConfig({displayName:"ScreenRootInner",componentId:"sc-cc9e9a32-1"})(["display:flex;flex-direction:column;gap:calc(var(--screen-space) * 1.5);width:100%;background:var(--privy-color-background);padding:0 var(--screen-space-lg) var(--screen-space);height:100%;border-radius:var(--privy-border-radius-lg);"]),ra=/*#__PURE__*/o.styled.div.withConfig({displayName:"HeaderContainer",componentId:"sc-cc9e9a32-2"})(["position:relative;display:flex;flex-direction:column;"]),aa=/*#__PURE__*/o.styled(Hr).withConfig({displayName:"StyledModalHeader",componentId:"sc-cc9e9a32-3"})(["margin:0 -8px;"]),ia=/*#__PURE__*/o.styled.div.withConfig({displayName:"BodyContainer",componentId:"sc-cc9e9a32-4"})(["flex:1 1 auto;display:flex;flex-direction:column;overflow-y:auto;padding:3px;margin:-3px;&::-webkit-scrollbar{display:none;}scrollbar-gutter:stable both-edges;scrollbar-width:none;-ms-overflow-style:none;"," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;"],(({$colorScheme:e})=>"light"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0)),oa=/*#__PURE__*/o.styled.div.withConfig({displayName:"FooterContainer",componentId:"sc-cc9e9a32-5"})(["display:flex;flex-direction:column;gap:var(--screen-space-lg);"]);let sa=/*#__PURE__*/o.styled.div.withConfig({displayName:"CenteredHeader",componentId:"sc-cc9e9a32-6"})(["text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--screen-space);"]),la=/*#__PURE__*/o.styled.div.withConfig({displayName:"TitleContainer",componentId:"sc-cc9e9a32-7"})(["display:flex;flex-direction:column;gap:4px;"]),ca=/*#__PURE__*/o.styled.h3.withConfig({displayName:"HeaderTitle",componentId:"sc-cc9e9a32-8"})(["&&{font-size:20px;line-height:32px;font-weight:500;color:var(--privy-color-foreground);margin:0;}"]),da=/*#__PURE__*/o.styled.p.withConfig({displayName:"HeaderSubtitle",componentId:"sc-cc9e9a32-9"})(["&&{margin:0;font-size:16px;font-weight:300;line-height:24px;color:var(--privy-color-foreground);}"]),ua=/*#__PURE__*/o.styled.div.withConfig({displayName:"IconContainer",componentId:"sc-cc9e9a32-10"})(["background:",";border-radius:50%;width:64px;height:64px;display:flex;align-items:center;justify-content:center;"],(({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}})),pa=/*#__PURE__*/o.styled.div.withConfig({displayName:"LogoContainer",componentId:"sc-cc9e9a32-11"})(["display:flex;align-items:center;justify-content:center;margin-bottom:var(--screen-space);img,svg{max-height:90px;max-width:180px;}"]),ha=/*#__PURE__*/o.styled.div.withConfig({displayName:"LoadingWithIconContainer",componentId:"sc-cc9e9a32-12"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:82px;> div{position:relative;}> div > :first-child{position:relative;}> div > :last-child{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);}"]);const ga=({children:t,...n})=>/*#__PURE__*/e.jsx(ta,{children:/*#__PURE__*/e.jsx(na,{...n,children:t})});let ma=/*#__PURE__*/o.styled.div.withConfig({displayName:"ProgressBarContainer",componentId:"sc-cc9e9a32-13"})(["position:absolute;top:0;left:calc(-1 * var(--screen-space-lg));width:calc(100% + calc(var(--screen-space-lg) * 2));height:4px;background:var(--privy-color-background-2);border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden;"]),ya=/*#__PURE__*/o.styled(xr).withConfig({displayName:"StyledBlobbyFooter",componentId:"sc-cc9e9a32-14"})(["padding:0;&& a{padding:0;color:var(--privy-color-foreground-3);}"]),fa=/*#__PURE__*/o.styled.div.withConfig({displayName:"ProgressBarFill",componentId:"sc-cc9e9a32-15"})(["height:100%;width:","%;background:var(--privy-color-foreground-3);border-radius:2px;transition:width 300ms ease-in-out;"],(({pct:e})=>e)),xa=({step:t})=>t?/*#__PURE__*/e.jsx(ma,{children:/*#__PURE__*/e.jsx(fa,{pct:Math.min(100,t.current/t.total*100)})}):null;ga.Header=({title:t,subtitle:n,icon:r,iconVariant:a,iconLoadingStatus:i,showBack:o,onBack:s,showInfo:l,onInfo:c,showClose:d,onClose:u,step:p,...h})=>/*#__PURE__*/e.jsxs(ra,{...h,children:[/*#__PURE__*/e.jsx(aa,{backFn:o?s:void 0,infoFn:l?c:void 0,onClose:d?u:void 0,closeable:d}),(r||a||t||n)&&/*#__PURE__*/e.jsxs(sa,{children:[r||a?/*#__PURE__*/e.jsx(ga.Icon,{icon:r,variant:a,loadingStatus:i}):null,/*#__PURE__*/e.jsxs(la,{children:[t&&/*#__PURE__*/e.jsx(ca,{children:t}),n&&/*#__PURE__*/e.jsx(da,{children:n})]})]}),p&&/*#__PURE__*/e.jsx(xa,{step:p})]}),ga.Body=/*#__PURE__*/le.default.forwardRef((({children:t,...n},r)=>/*#__PURE__*/e.jsx(ia,{ref:r,...n,children:t}))),ga.Body.displayName="Screen.Body",ga.Footer=({children:t,...n})=>/*#__PURE__*/e.jsx(oa,{...n,children:t}),ga.Actions=({children:t,...n})=>/*#__PURE__*/e.jsx(va,{...n,children:t}),ga.HelpText=({children:t,...n})=>/*#__PURE__*/e.jsx(wa,{...n,children:t}),ga.Watermark=()=>/*#__PURE__*/e.jsx(ya,{}),ga.Icon=({icon:t,variant:n="subtle",loadingStatus:r})=>"logo"===n&&t?"string"==typeof t?/*#__PURE__*/e.jsx(pa,{children:/*#__PURE__*/e.jsx("img",{src:t,alt:""})}):/*#__PURE__*/le.default.isValidElement(t)?/*#__PURE__*/e.jsx(pa,{children:t}):
|
|
@@ -23,5 +23,5 @@ return e.jsx(li,{...Gn().render.standalone?{defaultValue:"details"}:{},children:
|
|
|
23
23
|
/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Cg,{}),/*#__PURE__*/e.jsx(Kr,{}),/*#__PURE__*/e.jsx("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/e.jsx(xr,{})]})}},Op={component:()=>{let{data:t,setModalData:r}=Zn(),a=t?.funding,i="solana"===a.chainType,o=n.useRef(null),{tokenPrice:s}=Ei(i?"solana":a.chain.id),l=i?void 0:a,c=!(!l?.erc20Address||l?.erc20ContractInfo),d=i?a.isUSDC?"USDC":"SOL":a.erc20Address?a.erc20ContractInfo?.symbol:a.chain.nativeCurrency.symbol||"ETH",u=parseFloat(a.amount),p=!isNaN(u)&&u>0,h=s?Sa(a.amount,s):void 0;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Cg,{}),/*#__PURE__*/e.jsx(Cu,{children:"Confirm or edit amount"}),/*#__PURE__*/e.jsxs(Za,{style:{marginTop:"32px"},children:[/*#__PURE__*/e.jsx(Tp,{children:c?/*#__PURE__*/e.jsx(Kr,{size:"50px"}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(Ap,{onClick:()=>o.current?.focus(),children:[/*#__PURE__*/e.jsx(Ep,{ref:o,value:a.amount,onChange:e=>{let n=e.target.value;/^[0-9.]*$/.test(n)&&n.split(".").length-1<=1&&r({...t,funding:{...a,amount:n},solanaFundingData:t?.solanaFundingData?{...t.solanaFundingData,amount:n}:void 0})}}),/*#__PURE__*/e.jsx(Ip,{children:d})]}),!l?.erc20Address&&/*#__PURE__*/e.jsx(Pp,{children:h&&p?`${h} USD`:""})]})}),/*#__PURE__*/e.jsx(Nr,{style:{marginTop:"1rem"},disabled:!p,onClick:a.onContinueWithExternalWallet,children:"Continue"})]}),/*#__PURE__*/e.jsx(xr,{})]})}},Bp={component:()=>{let t,{connectors:r}=s.usePrivyInternal(),{app:a,setModalData:i,data:o,navigate:l}=Zn(),{wallets:c}=Pi(),d=r.filter(Sn).flatMap((e=>e.wallets)),[u,p]=n.useState("default"),h="solana"===o?.funding?.chainType,g=!!o?.funding?.crossChainBridgingEnabled;t="ethereum"===o?.funding?.chainType?o.funding.erc20Address&&!o.funding.isUSDC?"ethereum-only":g&&!o.funding.chain.testnet?"ethereum-and-solana":"ethereum-only":g&&!o.funding?.isUSDC?"ethereum-and-solana":"solana-only";let m=c.filter((e=>"privy"!==e.walletClientType)),y=m.map((e=>e.walletClientType)),f=d.filter((e=>"privy"!==e.walletClientType)),x=f.map((e=>e.walletClientType)),v=[],w={...o.funding};w.usingDefaultFundingMethod&&(w.usingDefaultFundingMethod=!1);let C=({address:e,walletChainType:t,walletClientType:n})=>{i({...o,funding:{...w,connectedWalletAddress:e,onContinueWithExternalWallet:()=>l(j({destChainType:h?"solana":"ethereum",sourceChainType:t}))},solanaFundingData:o?.solanaFundingData?{...o.solanaFundingData,sourceWalletData:{address:e,walletClientType:n}}:void 0}),l(Op)};"solana-only"!==t&&v.push(...m.map(((t,n)=>/*#__PURE__*/e.jsx(Up,{onClick:()=>C({address:t.address,walletChainType:"ethereum",walletClientType:t.walletClientType}),icon:t.meta.icon,name:t.meta.name,chainType:t.type},n)))),"ethereum-only"!==t&&v.push(...f.map(((t,n)=>/*#__PURE__*/e.jsx(Up,{onClick:()=>C({address:t.address,walletChainType:"solana",walletClientType:t.walletClientType}),icon:t.meta.icon,name:t.meta.name,chainType:t.type},n)))),v.push(...ou({walletList:a.appearance.walletList.filter((e=>!m.some((t=>t.walletClientType===e))&&!f.some((t=>t.walletClientType===e)))),walletChainType:t,connectors:r,connectOnly:!0,ignore:[...a.appearance.walletList,...y,...x],walletConnectEnabled:a.externalWallets.walletConnect.enabled}));let b=/*#__PURE__*/e.jsx(ud,{text:"More wallets",onClick:()=>p("overflow")}),j=({sourceChainType:e,destChainType:t})=>"ethereum"===e&&"solana"===t?bg:"ethereum"===e&&"ethereum"===t?Wp:"solana"===e&&"ethereum"===t?Rp:w.externalSolanaFundingScreen;return n.useEffect((()=>{i({...o,externalConnectWallet:{onCompleteNavigateTo:({address:e,walletClientType:t,walletChainType:n})=>(i({...o,funding:{...w,onContinueWithExternalWallet:()=>{l(j({destChainType:h?"solana":"ethereum",sourceChainType:n??"ethereum"}))}},solanaFundingData:o?.solanaFundingData?{...o.solanaFundingData,sourceWalletData:{address:e||"",walletClientType:t||""}}:void 0}),Op)}})}),[]),"overflow"===u?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Hr,{backFn:()=>p("default")},"header"),/*#__PURE__*/e.jsxs(or,{children:[/*#__PURE__*/e.jsx(wu,{style:{color:"var(--privy-color-foreground-3)",textAlign:"left"},children:"More wallets"}),v]}),/*#__PURE__*/e.jsx(xr,{})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Cg,{}),/*#__PURE__*/e.jsx(Bi,{title:"Transfer from wallet",description:"Connect a wallet to deposit funds or send funds manually to your wallet address."}),/*#__PURE__*/e.jsxs(or,{children:[v.length>4?v.slice(0,3):v,v.length>4&&b]}),/*#__PURE__*/e.jsx(xr,{})]})}};let Up=({onClick:t,icon:n,name:r,chainType:a})=>/*#__PURE__*/e.jsxs(dr,{onClick:t,children:[/*#__PURE__*/e.jsx(kp,{style:{width:20},children:/*#__PURE__*/e.jsx("img",{src:n})}),r,/*#__PURE__*/e.jsx(bc,{color:"gray",style:{marginLeft:"auto"},children:"Connected"}),"solana"===a&&/*#__PURE__*/e.jsx(bc,{color:"gray",children:"Solana"})]});const zp={component:()=>{let{data:t,setModalData:r,navigate:a,navigateBack:i}=Zn(),{closePrivyModal:o,createAnalyticsEvent:l,client:c}=s.usePrivyInternal(),[d,u]=n.useState("pending-in-flow"),p=n.useRef(0),h={...t?.funding,showAlternateFundingMethod:!0};h.usingDefaultFundingMethod&&(h.usingDefaultFundingMethod=!1);let{partnerUserId:g,popup:m}=t?.coinbaseOnrampStatus??{};return n.useEffect((()=>{if("pending-in-flow"===d||"pending-after-flow"===d){let e=setInterval((async()=>{if(g)try{let{status:e}=await c.getCoinbaseOnRampStatus({partnerUserId:g});if("success"===e)return void u("success");if("failure"===e)throw Error("There was an error completing Coinbase Onramp flow.");if(p.current>=3)return r({funding:h,solanaFundingData:t?.solanaFundingData}),void a(lh);m?.closed&&(p.current=p.current+1,u("pending-after-flow"))}catch(e){console.error(e),u("error"),l({eventName:Bu,payload:{status:"failure",provider:"coinbase-onramp",error:e.message}}),r({funding:{...h,errorMessage:"Something went wrong adding funds. Please try again or use another method."},solanaFundingData:t?.solanaFundingData}),a(lh)}}),1500);return()=>clearInterval(e)}}),[g,m,d]),/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Hr,{title:"Fund account",backFn:()=>{r({funding:h,solanaFundingData:t?.solanaFundingData}),i()}},"header"),/*#__PURE__*/e.jsx(Hp,{status:d,onClickCta:o}),/*#__PURE__*/e.jsx(xr,{})]})}};let Hp=({status:t,onClickCta:r})=>{let{title:a,body:i,cta:o}=n.useMemo((()=>(e=>{switch(e){case"success":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"pending-after-flow":return{title:"In Progress",body:"Almost done. Retrieving transaction status from Coinbase",cta:""};case"error":case"pending-in-flow":return{title:"In Progress",body:"Go back to Coinbase Onramp to finish funding your account.",cta:""}}})(t)),[t]);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(qp,{children:[/*#__PURE__*/e.jsx(Vp,{isSucccess:"success"===t}),/*#__PURE__*/e.jsxs(Ka,{children:[/*#__PURE__*/e.jsx("h3",{children:a}),/*#__PURE__*/e.jsx($p,{children:i})]})]}),o&&/*#__PURE__*/e.jsx(Pr,{onClick:r,children:o})]})},Vp=({isSucccess:t})=>{if(!t){let t="var(--privy-color-foreground-4)";/*#__PURE__*/return e.jsxs("div",{style:{position:"relative"},children:[/*#__PURE__*/e.jsx(kr,{color:t,style:{position:"absolute"}}),/*#__PURE__*/e.jsx(Tr,{color:t}),/*#__PURE__*/e.jsx(Xt,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let n=(t=>t?fe.default:()=>/*#__PURE__*/e.jsx(pe.default,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}}))(t),r=(e=>e?"var(--privy-color-success)":"var(--privy-color-foreground-4)")(t);/*#__PURE__*/return e.jsx("div",{style:{borderColor:r,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/e.jsx(n,{width:"4rem",height:"4rem",color:r})})},$p=/*#__PURE__*/o.styled.p.withConfig({displayName:"StatusBody",componentId:"sc-8428a551-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),qp=/*#__PURE__*/o.styled.div.withConfig({displayName:"ConnectContainer",componentId:"sc-8428a551-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]);let Gp={[a.mainnet.id]:"ethereum",[a.base.id]:"base",[a.optimism.id]:"optimism",[a.polygon.id]:"polygon",[a.arbitrum.id]:"arbitrum"};const Yp=(e,t,n,r,i,o)=>new Promise((async(s,l)=>{let c=Di();if(!c)return void l(Error("Unable to initialize flow"));let d="ethereum"===t.chainType?function(e){let t=Gp[e];if(!t)throw new h.PrivyClientError(`Unsupported chainId: ${e} for Coinbase Onramp`);return t}(t.chain.id):"solana",u=t.isUSDC?"USDC":"ethereum"===t.chainType?a.toCoinbaseAssetId(t.chain.id,"native-currency"):"SOL",p=await e.initCoinbaseOnRamp({addresses:[{address:t.address,blockchains:[d]}],assets:[u]}),{url:g}=a.getCoinbaseOnRampUrl({appId:e.getAppId(),input:p,amount:t.amount,blockchain:d,asset:u,experience:o});c.location=g.toString();let m={...i?.funding,showAlternateFundingMethod:!0};t.usingDefaultFundingMethod&&(m.usingDefaultFundingMethod=!1),n({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{popup:c}}),r(zp),e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"coinbase-onramp",value:t.amount,chainType:t.chainType,chainId:"ethereum"===t.chainType?t.chain.id:t.chain}}),setTimeout((()=>{n({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{partnerUserId:p.partner_user_id,popup:c}})}),5e3),s()})),Zp="moonpay";function Kp(e){return parseFloat(e)}function Qp(e,t=!1){let[r,a]=n.useState(null),{createAnalyticsEvent:i}=s.usePrivyInternal(),{data:o,navigate:l,setModalData:c}=Zn(),d=o?.funding,u=n.useRef(0);return n.useEffect((()=>{let n=setInterval((async()=>{if(e)try{let[r]=await async function(e,t){return v.ofetch(`https://api.moonpay.com/v1/transactions/ext/${e}`,{query:{apiKey:t?"pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI":"pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL"}})}(e,t),s="waitingAuthorization"===r.status&&"credit_debit_card"===r.paymentMethod?"pending":r.status;if(["failed","completed","awaitingAuthorization"].includes(s)&&(i({eventName:Bu,payload:{status:s,provider:Zp,paymentMethod:r.paymentMethod,cardPaymentType:r.cardPaymentType,currency:r.currency?.code,baseCurrencyAmount:r.baseCurrencyAmount,quoteCurrencyAmount:r.quoteCurrencyAmount,feeAmount:r.feeAmount,extraFeeAmount:r.extraFeeAmount,networkFeeAmount:r.networkFeeAmount,isSandbox:t}}),clearInterval(n)),"failed"===s||"serviceFailure"===s)return c({funding:{...d,errorMessage:"Something went wrong adding funds from Moonpay. Please try again or use another method to fund your wallet."},solanaFundingData:o?.solanaFundingData}),void l(lh);a(s)}catch(e){404!==e.response?.status&&(u.current+=1),u.current>=3&&(i({eventName:Bu,payload:{status:"serviceFailure",provider:Zp}}),clearInterval(n),c({funding:{...d,errorMessage:"Something went wrong adding funds from Moonpay. Please try again or use another method to fund your wallet."},solanaFundingData:o?.solanaFundingData}),l(lh))}}),3e3);return()=>clearInterval(n)}),[e,u]),r}const Xp=({size:t=61,...n})=>/*#__PURE__*/e.jsx("svg",{width:t,height:t,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:/*#__PURE__*/e.jsxs("g",{id:"moonpay_symbol_wht 2",children:[/*#__PURE__*/e.jsx("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),/*#__PURE__*/e.jsx("path",{id:"Vector",d:"M43.8884 23.3258C45.0203 23.3258 46.1268 22.9901 47.068 22.3613C48.0091 21.7324 48.7427 20.8386 49.1759 19.7928C49.6091 18.747 49.7224 17.5962 49.5016 16.4861C49.2807 15.3759 48.7357 14.3561 47.9353 13.5557C47.1349 12.7553 46.1151 12.2102 45.0049 11.9893C43.8947 11.7685 42.7439 11.8819 41.6982 12.3151C40.6524 12.7482 39.7585 13.4818 39.1297 14.423C38.5008 15.3641 38.1651 16.4707 38.1651 17.6026C38.165 18.3542 38.3131 19.0985 38.6007 19.7929C38.8883 20.4873 39.3098 21.1182 39.8413 21.6496C40.3728 22.1811 41.0037 22.6027 41.6981 22.8903C42.3925 23.1778 43.1367 23.3259 43.8884 23.3258ZM26.3395 49.1017C23.5804 49.1017 20.8832 48.2836 18.5891 46.7507C16.295 45.2178 14.5069 43.039 13.4511 40.49C12.3952 37.9409 12.1189 35.1359 12.6572 32.4298C13.1955 29.7237 14.5241 27.238 16.4751 25.287C18.4262 23.336 20.9118 22.0074 23.6179 21.4691C26.324 20.9308 29.129 21.2071 31.6781 22.2629C34.2272 23.3189 36.406 25.1069 37.9389 27.401C39.4717 29.6952 40.2899 32.3923 40.2899 35.1514C40.2899 36.9835 39.9291 38.7975 39.2281 40.49C38.527 42.1826 37.4994 43.7205 36.204 45.0159C34.9086 46.3113 33.3707 47.3389 31.6781 48.04C29.9856 48.741 28.1715 49.1018 26.3395 49.1017Z",fill:"white"})]})});const Jp={component:()=>{let{app:t,data:n,setModalData:r,navigateBack:a}=Zn(),{closePrivyModal:i}=s.usePrivyInternal(),{externalTransactionId:o}=n?.moonpayStatus,l=Qp(o||null,t.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Hr,{title:"Fund account",backFn:()=>{let e={...n?.funding,showAlternateFundingMethod:!0};e.usingDefaultFundingMethod&&(e.usingDefaultFundingMethod=!1),r({funding:e,solanaFundingData:n?.solanaFundingData}),a()}}),/*#__PURE__*/e.jsx(eh,{status:l,onClickCta:i}),/*#__PURE__*/e.jsx(xr,{})]})}};let eh=({status:t,onClickCta:r})=>{let{title:a,body:i,cta:o}=n.useMemo((()=>(e=>{switch(e){case"completed":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"waitingAuthorization":return{title:"Processing payment",body:"This may take up to a few hours. You will receive an email when the purchase is complete.",cta:"Continue"};default:return{title:"In Progress",body:"Go back to MoonPay to finish funding your account.",cta:""}}})(t)),[t]);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(rh,{children:[/*#__PURE__*/e.jsx(th,{status:t}),/*#__PURE__*/e.jsxs(Ka,{children:[/*#__PURE__*/e.jsx("h3",{children:a}),/*#__PURE__*/e.jsx(nh,{children:i})]})]}),o&&/*#__PURE__*/e.jsx(Pr,{onClick:r,children:o})]})},th=({status:t})=>{if(!t||"pending"===t){let t="var(--privy-color-foreground-4)";/*#__PURE__*/return e.jsxs("div",{style:{position:"relative"},children:[/*#__PURE__*/e.jsx(kr,{color:t,style:{position:"absolute"}}),/*#__PURE__*/e.jsx(Tr,{color:t}),/*#__PURE__*/e.jsx(Xp,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let n=(t=>{switch(t){case"completed":return fe.default;case"waitingAuthorization":return()=>/*#__PURE__*/e.jsx(pe.default,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(t),r=(e=>e?{completed:"var(--privy-color-success)",failed:"var(--privy-color-error)",serviceFailure:"var(--privy-color-error)",waitingAuthorization:"var(--privy-color-accent)",pending:"var(--privy-color-foreground-4)"}[e]:"var(--privy-color-foreground-4)")(t);/*#__PURE__*/return e.jsx("div",{style:{borderColor:r,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/e.jsx(n,{width:"4rem",height:"4rem",color:r})})},nh=/*#__PURE__*/o.styled.p.withConfig({displayName:"StatusBody",componentId:"sc-75e2a891-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),rh=/*#__PURE__*/o.styled.div.withConfig({displayName:"ConnectContainer",componentId:"sc-75e2a891-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]);const ah=async(e,t,n,r,i,o,s,l)=>{let c=Di();if(!c)throw Error("Unable to initialize flow");let d="ethereum"===t.chainType?a.chainToMoonpayCurrency(t.chain.id,r):t.isUSDC?"USDC_SOL":"SOL",{signedUrl:u,externalTransactionId:p}=await e.signMoonpayOnRampUrl({address:t.address,useSandbox:n.fundingMethodConfig.moonpay.useSandbox??!1,config:{uiConfig:{accentColor:n.appearance.palette.accent,theme:n.appearance.palette.colorScheme},paymentMethod:l,currencyCode:d,quoteCurrencyAmount:Kp(t.amount)}});e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"moonpay",value:t.amount,chainType:t.chainType,chainId:"ethereum"===t.chainType?t.chain.id:t.chain}}),c.location=u;let h={...s?.funding,showAlternateFundingMethod:!0};t.usingDefaultFundingMethod&&(h.usingDefaultFundingMethod=!1),i({moonpayStatus:{},funding:h,solanaFundingData:s?.solanaFundingData}),o(Jp),setTimeout((()=>{i({moonpayStatus:{externalTransactionId:p},funding:h,solanaFundingData:s?.solanaFundingData})}),8e3)};let ih=async e=>"undefined"!=typeof window&&"PaymentRequest"in window&&await new window.PaymentRequest([{supportedMethods:e}],{id:"0",total:{label:"Item",amount:{currency:"USD",value:"1.00"}}}).canMakePayment();const oh=()=>ih("https://apple.com/apple-pay"),sh=()=>ih("https://google.com/pay"),lh={component:()=>{let{wallets:t}=Pi(),{connectors:r}=s.usePrivyInternal(),i=r.filter(Sn).flatMap((e=>e.wallets)),{navigate:o,data:l,setModalData:c}=Zn(),{client:d}=s.usePrivyInternal(),p=Gn(),h=l?.funding,g=Qu(oh),m=Qu(sh),y="solana"===h.chainType,f=y?void 0:h,x=n.useMemo((()=>((e,t,n,r,i,o)=>{let s,l,c="solana"===n.chainType,d=c?void 0:n,u=n.isUSDC?"USDC":d?.erc20Address?void 0:"native-currency",p=!!c||u&&a.isSupportedChainIdForMoonpay(Number(n.chain.id),u),h=!!c||u&&a.isSupportedChainIdForCoinbaseOnramp(Number(n.chain.id),u),g=[];for(let a of(n.preferredCardProvider&&n.supportedOptions.sort((e=>e.provider===n.preferredCardProvider?-1:1)),n.supportedOptions))"card"===a.method&&"coinbase"===a.provider&&h&&g.push((()=>Yp(t,n,r,i,o,"buy"))),"card"===a.method&&"moonpay"===a.provider&&p&&u&&g.push((()=>ah(t,n,e,u,r,i,o,"credit_debit_card")));for(let e of n.supportedOptions)"exchange"===e.method&&"coinbase"===e.provider&&h&&(s=()=>Yp(t,n,r,i,o,"buy"));for(let e of o?.funding?.supportedOptions??[])"wallets"===e.method&&(l=()=>i(Bp));return{onFundWithCard:g,onFundWithExchange:s,onFundWithWallet:l}})(p,d,h,c,o,l)),[p,d,h,l,c,o]),v=y?i.find((({address:e})=>e===h.address)):t.find((({address:e})=>u.getAddress(e)===u.getAddress(h.address))),w=Nn(v?.walletClientType||"unknown"),C=w?.name||"wallet",b=v&&"privy"!==v.walletClientType?C:p.name,j=n.useMemo((()=>h.uiConfig?.landing?.title?h.uiConfig?.landing?.title:`Add funds to your ${b?.toLowerCase().endsWith("wallet")?b:b+" wallet"}`),[h.uiConfig?.landing?.title,b]);n.useEffect((()=>{if(h?.defaultFundingMethod&&h.usingDefaultFundingMethod)switch(c({funding:{...h,usingDefaultFundingMethod:!1},solanaFundingData:l?.solanaFundingData}),h?.defaultFundingMethod){case"card":x.onFundWithCard[0]&&x.onFundWithCard[0]();break;case"exchange":x.onFundWithExchange&&x.onFundWithExchange();break;case"wallet":x.onFundWithWallet&&x.onFundWithWallet();break;case"manual":o(ch)}}),[]),n.useEffect((()=>{f?.erc20Address&&!f.erc20ContractInfo&&Xu({address:f.erc20Address,chain:f.chain,rpcConfig:p.rpcConfig,privyAppId:p.id}).then((e=>{c({...l,funding:{...f,erc20ContractInfo:e?{symbol:e.symbol,decimals:e.decimals}:void 0}})})).catch(console.error)}),[f?.erc20Address,f?.chain]);let k=!(!f?.erc20Address||f?.erc20ContractInfo);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Cg,{}),/*#__PURE__*/e.jsx("h3",{children:j}),/*#__PURE__*/e.jsxs(jp,{children:[h.errorMessage&&/*#__PURE__*/e.jsx(qu,{theme:p.appearance.palette.colorScheme,children:h.errorMessage}),x.onFundWithCard?.[0]&&/*#__PURE__*/e.jsxs(dr,{disabled:k,onClick:x.onFundWithCard[0],children:[/*#__PURE__*/e.jsx(kp,{children:/*#__PURE__*/e.jsx(de.default,{style:{width:24}})}),"Pay with card",g?/*#__PURE__*/e.jsx(Zu,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):m?/*#__PURE__*/e.jsx(Ku,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):null]}),x.onFundWithExchange&&/*#__PURE__*/e.jsxs(dr,{disabled:k,onClick:x.onFundWithExchange,children:[/*#__PURE__*/e.jsx(kp,{children:/*#__PURE__*/e.jsx(pe.default,{style:{width:24}})}),"Transfer from an exchange"]}),x.onFundWithWallet&&/*#__PURE__*/e.jsxs(dr,{disabled:k,onClick:x.onFundWithWallet,children:[/*#__PURE__*/e.jsx(kp,{children:/*#__PURE__*/e.jsx(kl,{style:{width:24}})}),"Transfer from wallet"]}),/*#__PURE__*/e.jsxs(dr,{disabled:k,onClick:()=>o(ch),children:[/*#__PURE__*/e.jsx(kp,{children:/*#__PURE__*/e.jsx(ue.default,{style:{width:24}})}),"Receive funds"]}),h?.showAlternateFundingMethod&&x.onFundWithCard?.[1]&&/*#__PURE__*/e.jsx(Au,{theme:p.appearance.palette.colorScheme,children:/*#__PURE__*/e.jsxs(Np,{children:["Having trouble or facing location restrictions?"," ",/*#__PURE__*/e.jsx(_p,{onClick:x.onFundWithCard[1],children:"Try a different provider."})]})})]}),/*#__PURE__*/e.jsx(xr,{})]})}},ch={component:()=>{let{wallets:t}=Pi(),{connectors:i}=s.usePrivyInternal(),o=i.filter(Sn).flatMap((e=>e.wallets)),{data:l,setModalData:c,navigate:d,lastScreen:u}=Zn(),{rpcConfig:p,appId:h,createAnalyticsEvent:g,closePrivyModal:m}=s.usePrivyInternal(),y=Gn(),[f,x]=n.useState(void 0),[v,w]=n.useState(!1),C=l?.funding,{reloadBalance:b}=Ou({rpcConfig:p,appId:h,address:"ethereum"===C.chainType?C.address:void 0,chain:"ethereum"===C.chainType?C.chain:void 0}),j="solana"===C.chainType,k=j?C.isUSDC?"USDC":"SOL":C.erc20Address?C.erc20ContractInfo?.symbol:C.chain.nativeCurrency.symbol,T=j?o.find((({address:e})=>e===C.address)):t.find((({address:e})=>Wt(e)===Wt(C.address)));if(!C)return c({errorModalData:{error:Error("Couldn't find funding config"),previousScreen:u||lh},funding:l?.funding,solanaFundingData:l?.solanaFundingData,sendTransaction:l?.sendTransaction}),d(Ds),/*#__PURE__*/e.jsx(e.Fragment,{});n.useEffect((()=>{let e=j?async function(){if("solana"!==C.chainType)return;let e=y.solanaRpcs[C.chain];e?(C.isUSDC?async function({rpc:e,address:t,mintAddress:n}){let r=await e.getTokenAccountsByOwner(t,{mint:n},{encoding:"jsonParsed",commitment:"confirmed"}).send(),a=r.value[0]?.account;return a?BigInt(a.data.parsed.info.tokenAmount.amount):0n}({rpc:e.rpc,address:C.address,mintAddress:Hu(C.chain)}):Uu({rpc:e.rpc,address:C.address})).then((e=>{let t=BigInt(e);f&&t>f&&(w(!0),g({eventName:Bu,payload:{provider:"manual",status:"success",chainType:"solana",address:T?.address,value:C.isUSDC?r.formatUnits(t-f,6):r.formatUnits(t-f,9),token:C.isUSDC?"USDC":"SOL"}})),x(t)})):console.warn("Unable to load solana rpc, skipping balance")}:async function(){"ethereum"===C.chainType&&(async()=>{if(!C.erc20Address)return await b()??BigInt(0);{let{balance:e}=await Vu({chain:C.chain,address:C.address,erc20Address:C.erc20Address,rpcConfig:p,appId:h});return e}})().then((e=>{f&&e>f&&(w(!0),g({eventName:Bu,payload:{provider:"manual",status:"success",chainType:"ethereum",address:T?.address,chainId:C.chain.id,value:r.formatUnits(e-f,C.erc20ContractInfo?.decimals??18),token:C.erc20ContractInfo?.symbol??C.erc20Address??"ETH"}})),x(e)})).catch((()=>x(void 0)))},t=setInterval(e,2e3);return e(),()=>clearInterval(t)}),[f]);let A=n.useMemo((()=>null==f?"":C.isUSDC?a.formatTokenAmount({amount:f,decimals:6}):j?Da(f,3,!0,!0):null!=C.erc20ContractInfo?.decimals?a.formatTokenAmount({amount:f,decimals:C.erc20ContractInfo.decimals}):a.formatWeiAmount({wei:f})),[f,j,C]),S="ethereum"===C.chainType?C.chain.name:zu(C.chain),E=n.useMemo((()=>""===C.uiConfig?.receiveFundsTitle?null:/*#__PURE__*/e.jsx(Cu,{children:C.uiConfig?.receiveFundsTitle??`Receive ${C.amount} ${k??""}`.trim()})),[C.uiConfig?.receiveFundsTitle,C.amount,k]),I=n.useMemo((()=>""===C.uiConfig?.receiveFundsSubtitle?null:/*#__PURE__*/e.jsx(wu,{children:C.uiConfig?.receiveFundsSubtitle??`Scan this code or copy your wallet address to receive funds on ${S}.`})),[C.uiConfig?.receiveFundsSubtitle,S]),P="solana"===C.chainType&&C.isUSDC&&Hu(C.chain)?`?spl-token=${Hu(C.chain)}`:"";/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Cg,{}),E,I,/*#__PURE__*/e.jsxs(Za,{style:{gap:"1rem",margin:E||I?"1rem 0":"0"},children:[/*#__PURE__*/e.jsx(xl,{url:`${C.chainType}:${C.address}${P}`,size:200,squareLogoElement:dh}),/*#__PURE__*/e.jsxs(Au,{theme:y.appearance.palette.colorScheme,children:["Make sure to send funds on ",S,"."]}),/*#__PURE__*/e.jsx(Ru,{title:"Your wallet",errMsg:void 0,showCopyButton:!0,balance:`${A} ${k}`,address:C.address}),v&&/*#__PURE__*/e.jsx(Pr,{onClick:()=>m({shouldCallAuthOnSuccess:!1,isSuccess:!0}),children:"Continue"})]}),/*#__PURE__*/e.jsx(xr,{})]})}};let dh=({...t})=>/*#__PURE__*/e.jsx(hn,{color:"black",...t});let uh=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}],ph=({data:t})=>{let n=t=>"object"==typeof t&&null!==t?/*#__PURE__*/e.jsx(gh,{children:Object.entries(t).map((([t,r])=>/*#__PURE__*/e.jsxs("li",{children:[/*#__PURE__*/e.jsxs("strong",{children:[t,":"]})," ",n(r)]},t)))}):/*#__PURE__*/e.jsx("span",{children:String(t)});/*#__PURE__*/return e.jsx("div",{children:n(t)})};const hh=/*#__PURE__*/o.styled.div.withConfig({displayName:"Message",componentId:"sc-70ec2a4f-0"})(["margin-top:1.5rem;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-md);padding:12px;text-align:left;max-height:310px;overflow:scroll;white-space:pre-wrap;width:100%;font-size:0.875rem;font-weight:400;color:var(--privy-color-foreground);line-height:1.5;-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]);let gh=/*#__PURE__*/o.styled.ul.withConfig({displayName:"MessageList",componentId:"sc-70ec2a4f-1"})(["margin-left:12px !important;white-space:nowrap;&:first-child{margin-left:0 !important;}strong{font-weight:500 !important;}"]);const mh=({data:t,className:n})=>/*#__PURE__*/e.jsx(hh,{className:n,children:/*#__PURE__*/e.jsx(ph,{data:t})});let yh=/*#__PURE__*/o.styled.div.withConfig({displayName:"Container",componentId:"sc-b3a607dd-0"})(["display:flex;flex-direction:column;min-height:72px;"]);var fh=({onBack:t,details:n})=>/*#__PURE__*/e.jsxs(yh,{children:[/*#__PURE__*/e.jsx(Hr,{backFn:t}),/*#__PURE__*/e.jsx(mh,{data:n}),/*#__PURE__*/e.jsx(xr,{})]});const xh=/*#__PURE__*/o.styled(op).withConfig({displayName:"InteractiveLabel",componentId:"sc-b57d0824-0"})(["cursor:pointer;display:inline-flex;gap:8px;align-items:center;color:var(--privy-color-accent);svg{fill:var(--privy-color-accent);}"]);var vh=({iconUrl:t,value:n,symbol:r,usdValue:a,nftName:i,nftCount:o,decimals:s,$isLoading:l})=>{if(l)/*#__PURE__*/return e.jsx(wh,{$isLoading:l});let c=n&&a&&s?function(e,t,n){let r=parseFloat(e),a=parseFloat(n);if(0===r||0===a||Number.isNaN(r)||Number.isNaN(a))return e;let i=Math.ceil(-Math.log10(.01/(a/r))),o=Math.pow(10,i=Math.max(i=Math.min(i,t),1)),s=+(Math.floor(r*o)/o).toFixed(i).replace(/\.?0+$/,"");return Intl.NumberFormat(void 0,{maximumFractionDigits:t}).format(s)}(n,s,a):n;/*#__PURE__*/return e.jsxs("div",{children:[/*#__PURE__*/e.jsxs(wh,{$isLoading:l,children:[t&&/*#__PURE__*/e.jsx(bh,{src:t,alt:"Token icon"}),o&&o>1?o+"x":void 0," ",i,c," ",r]}),a&&/*#__PURE__*/e.jsxs(Ch,{$isLoading:l,children:["$",a]})]})};let wh=/*#__PURE__*/o.styled.span.withConfig({displayName:"Value",componentId:"sc-991db279-0"})(["color:var(--privy-color-foreground);font-size:0.875rem;font-weight:500;line-height:1.375rem;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],Cc);const Ch=/*#__PURE__*/o.styled.span.withConfig({displayName:"Subvalue",componentId:"sc-991db279-1"})(["color:var(--privy-color-foreground-2);font-size:12px;font-weight:400;line-height:18px;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],Cc);let bh=/*#__PURE__*/o.styled.img.withConfig({displayName:"TokenIcon",componentId:"sc-991db279-2"})(["height:14px;width:14px;margin-right:4px;object-fit:contain;"]);const jh=t=>{let{chain:n,transactionDetails:a,isTokenContractInfoLoading:i,symbol:o}=t,{action:s,functionName:l}=a;/*#__PURE__*/return e.jsx(Pu,{children:/*#__PURE__*/e.jsxs(ap,{children:["transaction"!==s&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Action"}),/*#__PURE__*/e.jsx(lp,{children:l})]}),"mint"===l&&"args"in a&&a.args.filter((e=>e)).map(((t,a)=>/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:`Param ${a}`}),/*#__PURE__*/e.jsx(lp,{children:"string"==typeof t&&r.isAddress(t)?/*#__PURE__*/e.jsx(ws,{address:t,url:n?.blockExplorers?.default?.url,showCopyIcon:!1}):t?.toString()})]},a))),"setApprovalForAll"===l&&a.operator&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Operator"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:a.operator,url:n?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),"setApprovalForAll"===l&&void 0!==a.approved&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Set approval to"}),/*#__PURE__*/e.jsx(lp,{children:a.approved?"true":"false"})]}),"transfer"===l||"transferFrom"===l||"safeTransferFrom"===l||"approve"===l?/*#__PURE__*/e.jsxs(e.Fragment,{children:["formattedAmount"in a&&a.formattedAmount&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount"}),/*#__PURE__*/e.jsxs(lp,{$isLoading:i,children:[a.formattedAmount," ",o]})]}),"tokenId"in a&&a.tokenId&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token ID"}),/*#__PURE__*/e.jsx(lp,{children:a.tokenId.toString()})]})]}):null,"safeBatchTransferFrom"===l&&/*#__PURE__*/e.jsxs(e.Fragment,{children:["amounts"in a&&a.amounts&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amounts"}),/*#__PURE__*/e.jsx(lp,{children:a.amounts.join(", ")})]}),"tokenIds"in a&&a.tokenIds&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token IDs"}),/*#__PURE__*/e.jsx(lp,{children:a.tokenIds.join(", ")})]})]}),"approve"===l&&a.spender&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Spender"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:a.spender,url:n?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===l||"safeTransferFrom"===l||"safeBatchTransferFrom"===l)&&a.transferFrom&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Transferring from"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:a.transferFrom,url:n?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===l||"safeTransferFrom"===l||"safeBatchTransferFrom"===l)&&a.transferTo&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Transferring to"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:a.transferTo,url:n?.blockExplorers?.default?.url,showCopyIcon:!1})})]})]})})},kh=({children:t,theme:n})=>/*#__PURE__*/e.jsxs(Th,{$theme:n,children:[/*#__PURE__*/e.jsx(we.default,{width:"20px",height:"20px",color:"var(--privy-color-icon-warning)",strokeWidth:2,style:{flexShrink:0}}),/*#__PURE__*/e.jsx(Ah,{$theme:n,children:t})]});let Th=/*#__PURE__*/o.styled.div.withConfig({displayName:"Container",componentId:"sc-a77c2854-0"})(["display:flex;gap:0.75rem;background-color:var(--privy-color-warn-bg);align-items:flex-start;padding:1rem;border-radius:0.75rem;"]),Ah=/*#__PURE__*/o.styled.div.withConfig({displayName:"Content",componentId:"sc-a77c2854-1"})(["color:",";font-size:1rem;font-weight:400;line-height:1.5;flex:1;text-align:left;"],(e=>"dark"===e.$theme?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)"));const Sh=({variant:t,setPreventMaliciousTransaction:n,colorScheme:r="light",preventMaliciousTransaction:a})=>"warn"===t?/*#__PURE__*/e.jsx(Eh,{children:/*#__PURE__*/e.jsxs(kh,{theme:r,children:[/*#__PURE__*/e.jsx("span",{style:{fontWeight:"500"},children:"Warning: Suspicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This has been flagged as a potentially deceptive request. Approving could put your assets or funds at risk."]})}):"error"===t?/*#__PURE__*/e.jsx(e.Fragment,{children:/*#__PURE__*/e.jsxs(Eh,{children:[/*#__PURE__*/e.jsx(qu,{theme:r,children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx("strong",{children:"This is a malicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This transaction transfers tokens to a known malicious address. Proceeding may result in the loss of valuable assets."]})}),/*#__PURE__*/e.jsxs(Ih,{children:[/*#__PURE__*/e.jsx(Ao,{color:"var(--privy-color-error)",checked:!a,readOnly:!0,onClick:()=>n(!a)}),/*#__PURE__*/e.jsx("span",{children:"I understand and want to proceed anyways."})]})]})}):null;let Eh=/*#__PURE__*/o.styled.div.withConfig({displayName:"BannerContainer",componentId:"sc-ab8a5a0b-0"})(["margin-top:1.5rem;"]),Ih=/*#__PURE__*/o.styled.div.withConfig({displayName:"CheckboxContainer",componentId:"sc-ab8a5a0b-1"})(["display:flex;align-items:center;gap:0.5rem;margin-top:0.75rem;"]);const Ph=({transactionIndex:e,maxIndex:t})=>"number"!=typeof e||0===t?"":` (${e+1} / ${t+1})`,Nh=({img:t,submitError:r,prepareError:a,onClose:i,action:o,title:s,subtitle:l,to:c,tokenAddress:d,network:u,missingFunds:p,fee:h,from:g,cta:m,disabled:y,chain:f,isSubmitting:x,isPreparing:v,isTokenPriceLoading:w,isTokenContractInfoLoading:b,isSponsored:j,symbol:k,balance:T,onClick:A,transactionDetails:S,transactionIndex:E,maxIndex:I,onBack:P,chainName:N,validation:_,hasScanDetails:M,setIsScanDetailsOpen:F,preventMaliciousTransaction:L,setPreventMaliciousTransaction:W,tokensSent:D,tokensReceived:R,isScanning:O,isCancellable:B,functionName:U})=>{let{showTransactionDetails:z,setShowTransactionDetails:H,hasMoreDetails:V,isErc20Ish:$}=(e=>{let[t,r]=n.useState(!1),a=!0,i=!1;return(!e||e.isErc20Ish||"transaction"===e.action)&&(a=!1),a&&(i=Object.entries(e||{}).some((([e,t])=>t&&!["action","isErc20Ish","isNFTIsh"].includes(e)))),{showTransactionDetails:t,setShowTransactionDetails:r,hasMoreDetails:a&&i,isErc20Ish:e?.isErc20Ish}})(S),q=Gn(),G=$&&b||v||w||O;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Hr,{onClose:i,backFn:P}),t&&/*#__PURE__*/e.jsx(Lh,{children:t}),/*#__PURE__*/e.jsxs(Cu,{style:{marginTop:t?"1.5rem":0},children:[s,/*#__PURE__*/e.jsx(Ph,{maxIndex:I,transactionIndex:E})]}),/*#__PURE__*/e.jsx(wu,{children:l}),/*#__PURE__*/e.jsxs(ap,{style:{marginTop:"2rem"},children:[(!!D[0]||G)&&/*#__PURE__*/e.jsxs(ip,{children:[R.length>0?/*#__PURE__*/e.jsx(op,{children:"Send"}):/*#__PURE__*/e.jsx(op,{children:"approve"===o?"Approval amount":"Amount"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:D.map(((t,n)=>/*#__PURE__*/e.jsx(vh,{iconUrl:t.iconUrl,value:"setApprovalForAll"===U?"All":t.value,usdValue:t.usdValue,symbol:t.symbol,nftName:t.nftName,nftCount:t.nftCount,decimals:t.decimals},n)))})]}),R.length>0&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Receive"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:R.map(((t,n)=>/*#__PURE__*/e.jsx(vh,{iconUrl:t.iconUrl,value:t.value,usdValue:t.usdValue,symbol:t.symbol,nftName:t.nftName,nftCount:t.nftCount,decimals:t.decimals},n)))})]}),S&&"spender"in S&&S?.spender?/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Spender"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:S.spender,url:f?.blockExplorers?.default?.url})})]}):null,c&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"To"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:c,url:f?.blockExplorers?.default?.url,showCopyIcon:!0})})]}),d&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token address"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:d,url:f?.blockExplorers?.default?.url})})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Network"}),/*#__PURE__*/e.jsx(lp,{children:u})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(lp,{$isLoading:v||w||void 0===j,children:j?/*#__PURE__*/e.jsxs(Wh,{children:[/*#__PURE__*/e.jsxs(Dh,{children:["Sponsored by ",q.name]}),/*#__PURE__*/e.jsx(C.BoltIcon,{height:16,width:16})]}):h})]}),V&&!M&&/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(ip,{className:"cursor-pointer",onClick:()=>H(!z),children:/*#__PURE__*/e.jsxs(sp,{className:"flex items-center gap-x-1",children:["Details"," ",/*#__PURE__*/e.jsx(C.ChevronDownIcon,{style:{width:"0.75rem",marginLeft:"0.25rem",transform:z?"rotate(180deg)":void 0}})]})}),z&&S&&/*#__PURE__*/e.jsx(jh,{action:o,chain:f,transactionDetails:S,isTokenContractInfoLoading:b,symbol:k})]}),M&&/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(xh,{onClick:()=>F(!0),children:[/*#__PURE__*/e.jsx("span",{className:"text-color-primary",children:"Details"}),/*#__PURE__*/e.jsx(C.ArrowRightIcon,{height:"14px",width:"14px",strokeWidth:"2"})]})})]}),/*#__PURE__*/e.jsx(ar,{}),r?/*#__PURE__*/e.jsx(vl,{style:{marginTop:"2rem"},children:r.message}):a&&0===E?
|
|
24
24
|
/*#__PURE__*/e.jsx(vl,{style:{marginTop:"2rem"},children:a.shortMessage??Fh}):null,/*#__PURE__*/e.jsx(Sh,{variant:_,preventMaliciousTransaction:L,setPreventMaliciousTransaction:W}),/*#__PURE__*/e.jsx(_h,{$useSmallMargins:!(!a&&!r&&"warn"!==_&&"error"!==_),address:g,balance:T,errMsg:v||a||r||!p?void 0:`Add funds on ${f?.name??N} to complete transaction.`}),/*#__PURE__*/e.jsx(Pr,{style:{marginTop:"1rem"},loading:x,disabled:y||v,onClick:A,children:m}),B&&/*#__PURE__*/e.jsx(Rr,{style:{marginTop:"1rem"},onClick:i,isSubmitting:!1,children:"Not now"}),/*#__PURE__*/e.jsx(xr,{})]})};let _h=/*#__PURE__*/o.styled(Ru).withConfig({displayName:"StyledWalletInfoCard",componentId:"sc-4e16a794-0"})(["",""],(e=>e.$useSmallMargins?"margin-top: 0.5rem;":"margin-top: 2rem;")),Mh=/*#__PURE__*/o.styled(ap).withConfig({displayName:"InstructionRows",componentId:"sc-4e16a794-1"})(["margin-top:0.5rem;border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-sm);padding:0.5rem;"]),Fh="There was an error preparing your transaction. Your transaction request will likely fail.",Lh=/*#__PURE__*/o.styled.div.withConfig({displayName:"ImageContainer",componentId:"sc-4e16a794-2"})(["display:flex;width:100%;justify-content:center;max-height:40px;> img{object-fit:contain;border-radius:var(--privy-border-radius-sm);}"]),Wh=/*#__PURE__*/o.styled.span.withConfig({displayName:"SponsoredRow",componentId:"sc-4e16a794-3"})(["display:inline-flex;align-items:center;gap:0.3rem;"]),Dh=/*#__PURE__*/o.styled.span.withConfig({displayName:"SponsoredText",componentId:"sc-4e16a794-4"})(["font-size:14px;font-weight:500;color:var(--privy-color-foreground);"]);let Rh=()=>/*#__PURE__*/e.jsxs(Hh,{children:[/*#__PURE__*/e.jsx($h,{}),/*#__PURE__*/e.jsx(Vh,{})]});const Oh=({transactionError:t,chainId:r,onClose:a,onRetry:i,chainType:o,transactionHash:l})=>{let{chains:c}=s.usePrivyInternal(),[d,u]=n.useState(!1),{errorCode:p,errorMessage:h}=((e,t)=>{if("ethereum"===t)return{errorCode:e.details??e.message,errorMessage:e.shortMessage};let n=e.txSignature,r=e?.transactionMessage||"Something went wrong.";if(Array.isArray(e.logs)){let t=e.logs.find((e=>/insufficient (lamports|funds)/gi.test(e)));t&&(r=t)}return{transactionHash:n,errorMessage:r}})(t,o),g=(({chains:e,chainId:t,chainType:n,transactionHash:r})=>"ethereum"===n?e.find((e=>e.id===t))?.blockExplorers?.default.url??"https://etherscan.io":function(e,t){return`https://explorer.solana.com/tx/${e}?chain=${t}`}(r||"",t))({chains:c,chainId:r,chainType:o,transactionHash:l});/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Hr,{onClose:a}),/*#__PURE__*/e.jsxs(Bh,{children:[/*#__PURE__*/e.jsx(Rh,{}),/*#__PURE__*/e.jsx(Uh,{children:p}),/*#__PURE__*/e.jsx(zh,{children:"Please try again."}),/*#__PURE__*/e.jsxs(Yh,{children:[/*#__PURE__*/e.jsx(Gh,{children:"Error message"}),/*#__PURE__*/e.jsx(Kh,{$clickable:!1,children:h})]}),l&&/*#__PURE__*/e.jsxs(Yh,{children:[/*#__PURE__*/e.jsx(Gh,{children:"Transaction hash"}),/*#__PURE__*/e.jsxs(Zh,{children:["Copy this hash to view details about the transaction on a"," ",/*#__PURE__*/e.jsx("u",{children:/*#__PURE__*/e.jsx("a",{href:g,children:"block explorer"})}),"."]}),/*#__PURE__*/e.jsxs(Kh,{$clickable:!0,onClick:async()=>{await navigator.clipboard.writeText(l),u(!0)},children:[l,/*#__PURE__*/e.jsx(Jh,{clicked:d})]})]}),/*#__PURE__*/e.jsx(qh,{onClick:()=>i({resetNonce:!!l}),children:"Retry transaction"})]}),/*#__PURE__*/e.jsx(wr,{})]})};let Bh=/*#__PURE__*/o.styled.div.withConfig({displayName:"TransactionErrorScreenContainer",componentId:"sc-d58f10e6-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;"]),Uh=/*#__PURE__*/o.styled.span.withConfig({displayName:"ErrorCode",componentId:"sc-d58f10e6-1"})(["color:var(--privy-color-foreground);text-align:center;font-size:1.125rem;font-weight:500;line-height:1.25rem;text-align:center;margin:10px;"]),zh=/*#__PURE__*/o.styled.span.withConfig({displayName:"Subtitle",componentId:"sc-d58f10e6-2"})(["margin-top:4px;margin-bottom:10px;color:var(--privy-color-foreground-3);text-align:center;font-size:0.875rem;font-style:normal;font-weight:400;line-height:20px;letter-spacing:-0.008px;"]),Hh=/*#__PURE__*/o.styled.div.withConfig({displayName:"CircleContainer",componentId:"sc-d58f10e6-3"})(["position:relative;width:60px;height:60px;margin:10px;display:flex;justify-content:center;align-items:center;"]),Vh=/*#__PURE__*/o.styled(he.default).withConfig({displayName:"StyledExclamationCircleIcon",componentId:"sc-d58f10e6-4"})(["position:absolute;width:35px;height:35px;color:var(--privy-color-error);"]),$h=/*#__PURE__*/o.styled.div.withConfig({displayName:"StyledRedCircle",componentId:"sc-d58f10e6-5"})(["position:absolute;width:60px;height:60px;border-radius:50%;background-color:var(--privy-color-error);opacity:0.1;"]),qh=/*#__PURE__*/o.styled(Pr).withConfig({displayName:"RetryButton",componentId:"sc-d58f10e6-6"})(["&&{margin-top:24px;}transition:color 350ms ease,background-color 350ms ease;"]),Gh=/*#__PURE__*/o.styled.span.withConfig({displayName:"TextBoxTitle",componentId:"sc-d58f10e6-7"})(["width:100%;text-align:left;font-size:0.825rem;color:var(--privy-color-foreground);padding:4px;"]),Yh=/*#__PURE__*/o.styled.div.withConfig({displayName:"TextBoxContainer",componentId:"sc-d58f10e6-8"})(["width:100%;margin:5px;display:flex;flex-direction:column;justify-content:center;align-items:center;"]),Zh=/*#__PURE__*/o.styled.text.withConfig({displayName:"HelperText",componentId:"sc-d58f10e6-9"})(["position:relative;width:100%;padding:5px;font-size:0.8rem;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;"]),Kh=/*#__PURE__*/o.styled.span.withConfig({displayName:"TextBox",componentId:"sc-d58f10e6-10"})(["position:relative;width:100%;background-color:var(--privy-color-background-2);padding:8px 12px;border-radius:10px;margin-top:5px;font-size:14px;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;",""],(e=>e.$clickable&&"cursor: pointer;\n transition: background-color 0.3s;\n padding-right: 45px;\n\n &:hover {\n background-color: var(--privy-color-foreground-4);\n }")),Qh=/*#__PURE__*/o.styled(ve.default).withConfig({displayName:"StyledClipboardIcon",componentId:"sc-d58f10e6-11"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),Xh=/*#__PURE__*/o.styled(xe.default).withConfig({displayName:"StyledClipboardCheckIcon",componentId:"sc-d58f10e6-12"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),Jh=({clicked:t})=>t?/*#__PURE__*/e.jsx(Xh,{}):/*#__PURE__*/e.jsx(Qh,{}),eg=({gasUsed:e,effectiveGasPrice:t})=>{if(e&&t)try{return r.toHex(e*t)}catch(e){return}};const tg=({txn:t,receipt:n,transactionInfo:r,onClose:a,tokenPrice:i,tokenSymbol:o,receiptHeader:s,receiptDescription:l})=>/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Hr,{onClose:a}),/*#__PURE__*/e.jsx(Oi,{title:s??"Transaction complete!",description:l??"You're all set."}),/*#__PURE__*/e.jsx(ki,{tokenPrice:i,from:n.from,to:n.to,gas:eg(n),txn:t,transactionInfo:r,tokenSymbol:o}),/*#__PURE__*/e.jsx(ar,{}),/*#__PURE__*/e.jsx(ng,{loading:!1,onClick:a,children:"All Done"}),/*#__PURE__*/e.jsx(Ja,{}),/*#__PURE__*/e.jsx(xr,{})]});let ng=/*#__PURE__*/o.styled(Pr).withConfig({displayName:"SubmitButton",componentId:"sc-f70d0f7a-0"})(["&&{margin-top:24px;}transition:color 350ms ease,background-color 350ms ease;"]);const rg=[{constant:!1,inputs:[{name:"_salt",type:"bytes32"},{name:"_initializer",type:"bytes"}],name:"deployAccount",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],ag=[{name:"from",type:"address"},{name:"param2",type:"address"},{name:"param3",type:"bytes"},{name:"param4",type:"tuple",components:[]},{type:"tuple",components:[{name:"param5",type:"address"},{name:"param6",type:"uint256"},{name:"param7",type:"uint256"},{name:"encodedInitData",type:"bytes"}]}],ig=[{constant:!1,inputs:[{name:"spender",type:"address"},{name:"value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],og=[{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"quantity",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"quantity",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"},{internalType:"uint256[]",name:"quantities",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mintBatch",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"},{internalType:"uint256[]",name:"quantities",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mintBatch",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"quantity",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quantity",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"batchMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"batchMint",outputs:[],stateMutability:"payable",type:"function"}],sg=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],lg=[{constant:!1,inputs:[{name:"_operator",type:"address"},{name:"_approved",type:"bool"}],name:"setApprovalForAll",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],cg=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenId",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],dg=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenIds",type:"uint256[]"},{name:"_amounts",type:"uint256[]"},{name:"_data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],ug=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenId",type:"uint256"},{name:"_amount",type:"uint256"},{name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],pg=(e,t)=>{let n=hg(ig,e);if(n)return{action:"approve",functionName:"approve",isErc20Ish:!0,isNFTIsh:!1,spender:n.args[0],amount:n.args[1]};let r=hg(ep,e);if(r)return{action:"transfer",functionName:"transfer",isErc20Ish:!0,isNFTIsh:!1,transferTo:r.args[0],amount:r.args[1]};if(!t)return{action:"transaction",functionName:"",isErc20Ish:!1,isNFTIsh:!1};let a=hg(rg,e);if(a&&"string"==typeof a.args[1]){let e=gg(a.args[1]);if(e&&e[4].encodedInitData)return pg(e[4].encodedInitData,t)}let i=hg(lg,e);if(i)return{action:"approve",functionName:"setApprovalForAll",isNFTIsh:!0,isErc20Ish:!1,operator:i.args[0],approved:i.args[1]};let o=hg(cg,e);if(o)return{action:"transfer",functionName:"transferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:o.args[0],transferTo:o.args[1],tokenId:o.args[2]};let s=hg(sg,e);if(s)return{action:"transfer",functionName:"safeTransferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:s.args[0],transferTo:s.args[1],tokenId:s.args[2]};let l=hg(ug,e);if(l)return{action:"transfer",functionName:"safeTransferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:l.args[0],transferTo:l.args[1],tokenId:l.args[2],amount:l.args[3]};let c=hg(dg,e);if(c)return{action:"batch transfer",functionName:"safeBatchTransferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:c.args[0],transferTo:c.args[1],tokenIds:c.args[2],amounts:c.args[3]};let d=hg(og,e);return d?{action:"mint",functionName:d.functionName,isNFTIsh:!0,isErc20Ish:!1,args:d.args}:{action:"transaction",isErc20Ish:!1,isNFTIsh:!1}};let hg=(e,t)=>{try{let n=r.decodeFunctionData({abi:e,data:t});return{functionName:n.functionName,args:n.args||[]}}catch(e){return null}},gg=e=>{try{if("string"==typeof e)return r.decodeAbiParameters(ag,`0x${e.slice(10)}`)}catch(e){return null}},mg=e=>`${parseFloat(e).toFixed(2)}`;function yg(e,t){let n=[],r=new Map;if(e)for(let t of e)if(t.in[0]){let e;e="ERC721"===t.asset.type||"approve_for_all"===t.in[0].value?{id:`nft:${t.asset.name}`,nftName:t.asset.name,nftCount:t.in.length}:{id:`token:${t.asset.type}:${t.asset.symbol}:${t.asset.name}`,iconUrl:t.asset.logo_url,value:t.in[0].value,symbol:t.asset.symbol,usdValue:t.in[0].usd_price?mg(t.in[0].usd_price):void 0,decimals:t.asset.decimals},n.push(e)}else if(t.out[0]?.value){let e;e="ERC721"===t.asset.type||"approve_for_all"===t.out[0].value?{id:`nft:${t.asset.name}`,nftName:t.asset.name}:{id:`token:${t.asset.type}:${t.asset.symbol}:${t.asset.name}`,iconUrl:t.asset.logo_url,value:t.out[0].value,symbol:t.asset.symbol,usdValue:t.out[0].usd_price?mg(t.out[0].usd_price):void 0,decimals:t.asset.decimals},r.has(e.id)||r.set(e.id,e)}for(let e of t)for(let t of Object.keys(e.spenders)){let n;n="ERC721"===e.asset.type||"approve_for_all"===e.spenders[t]?.value?{id:`nft:${e.asset.name}`,nftName:e.asset.name}:{id:`token:${e.asset.type}:${e.asset.symbol}:${e.asset.name}`,iconUrl:e.asset.logo_url,value:e.spenders[t]?.value,symbol:e.asset.symbol,usdValue:e.spenders[t]?.usd_price?mg(e.spenders[t]?.usd_price):void 0,decimals:e.asset.decimals},r.has(n.id)||r.set(n.id,n)}return{assetsIn:n,assetsOut:Array.from(r.values())}}const fg=(e,t,r,a)=>{let[i,o]=n.useState(null),{walletProxy:l}=s.usePrivyInternal();return n.useEffect((()=>{i&&o(null),(async()=>{if(!l||!t)return null;let n=[],i=!0,o=await Ni(e,r,t,a).catch((t=>(t.message&&t.message.includes("Insufficient balance for transaction")||t.details&&t.details.includes("insufficient funds")?i=!1:n.push(t),e)));return{tx:o,totalGasEstimate:o.gas,hasFunds:i,errors:n}})().then(o)}),[e]),i};let xg=new an(new rn("There was an issue preparing your transaction",a.ProviderErrors.E32603_DEFAULT_INTERNAL_ERROR.eipCode)),vg=(e,t)=>e?.sendTransaction?"transactionRequest"in e.sendTransaction?e.sendTransaction.transactionRequest:e.sendTransaction.transactionRequests[t]:void 0;const wg={component:()=>{let{data:t,onUserCloseViaDialogOrKeybindRef:i,setModalData:o,navigate:l}=Zn(),{client:c,rpcConfig:d,chains:u,closePrivyModal:p,walletProxy:h,showFiatPrices:g}=s.usePrivyInternal(),{user:m}=w.usePrivyContext(),y=Gn(),[f,x]=n.useState(0),[v,C]=n.useState(0),[b,j]=n.useState(vg(t,f)),[k,T]=n.useState(null),[A,S]=n.useState(),[E,I]=n.useState(!1),[P,N]=n.useState(null),[_,M]=n.useState(null),[F,L]=n.useState(null),[W,D]=n.useState(void 0),[R,O]=n.useState(void 0),[B,U]=n.useState(!1),[z,H]=n.useState(!1),[V,$]=n.useState([]),[q,G]=n.useState([]),[Y,Z]=n.useState("uninitiated"),[K,Q]=n.useState(void 0);if(!b||!t?.sendTransaction||!t?.sendTransaction)/*#__PURE__*/return e.jsx(Ws,{error:Error("Invalid transaction request"),allowlistConfig:y.allowlistConfig,onRetry:()=>{t?.sendTransaction?.onFailure(xg),p({shouldCallAuthOnSuccess:!1})}});let{transactingWalletAddress:X}=t.sendTransaction,J=n.useMemo((()=>u.find((e=>Number(e.id)===Number(b.chainId)))),[b.chainId]),ee=J?.nativeCurrency.symbol??"ETH",te=n.useMemo((()=>pg(b.data,!!y.embeddedWallets.extendedCalldataDecoding)),[b.data]),{action:ne,isErc20Ish:re,isNFTIsh:ae,functionName:ie}=te,{toAddress:oe,tokenAddress:se}=n.useMemo((()=>({toAddress:te.isErc20Ish?te.transferTo:b.to??void 0,tokenAddress:te.isErc20Ish?b.to:void 0})),[te]);n.useEffect((()=>{b.to&&J&&re&&Xu({address:b.to,chain:J,rpcConfig:y.rpcConfig,privyAppId:y.id}).then(T).catch(console.error)}),[b.to,J]);let{tokenPrice:le,isTokenPriceLoading:ce}=Ei(b.chainId),{balance:de}=Ou({rpcConfig:y.rpcConfig,appId:y.id,address:X,chain:J}),ue=function({rpcConfig:e,appId:t,address:i,chain:o,tokenInfo:l}){let{chains:c}=s.usePrivyInternal(),[d,u]=n.useState(null),[p,h]=n.useState(!1),g=n.useMemo((()=>{let n=o||c[0];if(n)return r.createPublicClient({chain:o,transport:r.http(a.getJsonRpcEndpointFromChain(n,e,t))})}),[o,e,t]),m=n.useCallback((async()=>{if(i&&g&&l.address)try{return h(!0),await g.readContract({address:l.address,abi:uh,functionName:"balanceOf",args:[i]})}catch(e){console.error(e)}finally{h(!1)}}),[g,i,l?.address,o]);return n.useEffect((()=>{m().then((e=>null!=e&&u(e)))}),[m]),{balance:d,isLoading:p&&null==d,formattedBalance:a.formatTokenAmount({amount:d??BigInt(0),decimals:l.decimals})}}({rpcConfig:y.rpcConfig,appId:y.id,address:X,tokenInfo:{address:se||"",decimals:k?.decimals??18},chain:J}),pe=n.useMemo((()=>Mt(Number(b.chainId),u,d,{appId:y.id})),[b.chainId,d]),he=fg(b,X,pe,t?.sendTransaction?.prepareTransactionRequest);n.useEffect((()=>{j(vg(t,f))}),[f]),n.useEffect((()=>{t.sendTransaction?.getIsSponsored?t.sendTransaction.getIsSponsored().then(S).catch(console.error):S(!1)}),[t.sendTransaction.getIsSponsored]);let ge=()=>{if(!E)return P?t?.sendTransaction?.onSuccess({hash:P}):F||he?.errors[0]?t?.sendTransaction?.onFailure(F??he?.errors[0]??xg):t?.sendTransaction?.onFailure(new an(new rn("The user rejected the request",a.ProviderErrors.E4001_USER_REJECTED_REQUEST.eipCode))),p({shouldCallAuthOnSuccess:!1})};i.current=ge;let me=!!(t.funding&&t.funding.supportedOptions.length>0),ye=Ia(BigInt(he?.totalGasEstimate??0n),ee),fe=g&&le?Ea(BigInt(he?.totalGasEstimate??0n),le):void 0,xe=Ia(de??0n,ee,void 0,!0),ve=g&&le?Ea(de??0n,le):void 0,we=k&&!ue.isLoading&&re&&"approve"!==ne?`${ue.formattedBalance} ${k.symbol}`:void 0,Ce=t.sendTransaction?.uiOptions?.transactionInfo?.title;Ce||(Ce="approve"===ne?re?"Confirm address":"Confirm action":`Approve ${ne}`);let be=n.useMemo((()=>{if(t.sendTransaction?.uiOptions?.description)return t.sendTransaction?.uiOptions?.description;if("approve"===ne&&"setApprovalForAll"===ie&&te.approved){let t=/*#__PURE__*/e.jsx(ws,{address:te.operator||"",url:J?.blockExplorers?.default?.url});/*#__PURE__*/return e.jsxs(e.Fragment,{children:[y.name," would like your permission for ",t," to transfer tokens on your behalf."]})}if("approve"===ne&&"setApprovalForAll"===ie&&!te.approved){let t=/*#__PURE__*/e.jsx(ws,{address:te.operator||"",url:J?.blockExplorers?.default?.url});/*#__PURE__*/return e.jsxs(e.Fragment,{children:[y.name," would like your permission to revoke permissions of ",t," from transferring tokens on your behalf."]})}return re&&"approve"===ne||re&&"approve"===ne?`${y.name} would like your permission for ${Wt(te.spender)} to spend tokens on your behalf.`:`${y.name} wants your permission to approve the following transaction.`}),[y.name,re,te,t.sendTransaction?.uiOptions.description,ie]),je=t.sendTransaction?.uiOptions?.transactionInfo?.contractInfo?.imgUrl?/*#__PURE__*/e.jsx("img",{src:t.sendTransaction.uiOptions.transactionInfo.contractInfo.imgUrl,alt:t.sendTransaction.uiOptions.transactionInfo.contractInfo.imgAltText}):null,ke=!(!he||he.errors[0]||he.hasFunds||!1!==A),Te=ke&&me,Ae=Te?"Add funds":t.sendTransaction?.uiOptions?.buttonText||(f<v?"Continue":"Approve"),Se=e=>{if(!e)throw Error("Transaction scan failed");if("Success"===e.validation.status&&("Benign"===e.validation.result_type?O("safe"):"Warning"===e.validation.result_type?O("warn"):"Malicious"===e.validation.result_type&&(O("error"),H(!0))),"Success"!==e.simulation.status)throw Error("Simulation failed");{D(e.simulation.params);let{assetsIn:t,assetsOut:n}=yg(e.simulation.assets_diffs,e.simulation.exposures);if(0===n.length&&0===t.length)throw Error("No tokens found");$(n),G(t)}};if(n.useEffect((()=>{t.sendTransaction?.scanTransaction&&y.embeddedWallets.transactionScanning.enabled&&"uninitiated"===Y&&(Z("in progress"),t.sendTransaction.scanTransaction().then((e=>{Se(e),Z("completed")})).catch((()=>Z("failed"))))}),[!!t.sendTransaction?.scanTransaction]),n.useEffect((()=>{t.sendTransaction?.scanTransaction&&"failed"!==Y||((e,n,r)=>{if(C((e=>e?.sendTransaction?"transactionRequest"in e.sendTransaction?0:e.sendTransaction.transactionRequests.length-1:0)(t)),n.isErc20Ish&&n.amount&&r){let e=np({amount:n.amount,decimals:r.decimals});Q(e),$([{value:e,symbol:r?.symbol,decimals:r?.decimals}])}else if(e.value){let t=BigInt(e.value),n=le?Ea(t,le):void 0;$(g&&n?[{value:n}]:[{value:Pa(t),symbol:ee,decimals:18,usdValue:n}])}else $(g?[{value:"$0"}]:[{value:"0",symbol:ee,decimals:18}])})(he?.tx??b,te,k)}),[b,he?.tx,te,k,Y]),_/*#__PURE__*/)return e.jsx(tg,{txn:he?.tx??b,onClose:ge,receipt:_,transactionInfo:t.sendTransaction?.uiOptions.transactionInfo,tokenPrice:le,tokenSymbol:ee,receiptHeader:t.sendTransaction?.uiOptions.successHeader,receiptDescription:t.sendTransaction?.uiOptions.successDescription});if(F)/*#__PURE__*/return e.jsx(Oh,{transactionError:F,transactionHash:P??void 0,chainType:"ethereum",chainId:he?.tx.chainId??b.chainId,onClose:ge,onRetry:({resetNonce:e})=>{L(null);let t={...he?.tx??b};e&&(t.nonce=void 0),j(t)}});let Ee=0!==v&&"number"==typeof f&&0!==f?()=>{x(f-1)}:void 0;return B&&W?/*#__PURE__*/e.jsx(fh,{details:W,onBack:()=>U(!1)}):/*#__PURE__*/e.jsx(Nh,{transactionIndex:f,onBack:Ee,maxIndex:v,disabled:ke&&!me||z,isSubmitting:E,submitError:F,isPreparing:!he,isTokenPriceLoading:ce,isTokenContractInfoLoading:!ae&&!k,prepareError:he?.errors[0],symbol:k?.symbol,chain:J,img:je,title:Ce,subtitle:be,txValue:b.value,fee:fe??ye,isSponsored:A,from:X??"",to:oe,tokenAddress:se??void 0,network:y.chains.find((e=>e.id===b.chainId))?.name??"",transactionDetails:{...te,formattedAmount:K},cta:Ae,missingFunds:ke,action:ne,balance:we??ve??xe,onClose:ge,onClick:Te?async()=>{if(X){if(!me)throw Error("Funding wallet is not enabled");o({...t,funding:{...t.funding,methodScreen:lh,chainType:"ethereum",amount:r.formatEther(BigInt(he?.tx.value??0)+BigInt(he?.totalGasEstimate?.toString()??0)),chain:J},solanaFundingData:t?.solanaFundingData}),l(lh)}}:async()=>{if(f<v)x(f+1);else{I(!0);try{let e=await c.getAccessToken();if(E||!e||!h||!m)return;let n=await t.sendTransaction.onConfirm({transactionRequest:he?.tx??b});if(N(n),t.sendTransaction?.signOnly)return await new Promise((e=>setTimeout(e,rt))),t?.sendTransaction?.onSuccess({hash:n}),p({shouldCallAuthOnSuccess:!1});let r=await pe.waitForTransactionReceipt({hash:n});if("reverted"===r.status)throw Error("Transaction failed");M(r)}catch(e){console.warn({transaction:he?.tx??b,error:e}),L(e)}finally{I(!1)}}},validation:R,hasScanDetails:!!W,setIsScanDetailsOpen:U,preventMaliciousTransaction:z,setPreventMaliciousTransaction:H,tokensSent:V,tokensReceived:q,isScanning:"in progress"===Y,isCancellable:t.sendTransaction?.uiOptions?.isCancellable??!1,functionName:ie})}};function Cg({title:t}){let{currentScreen:n,navigateBack:r,navigate:a,data:i,setModalData:o}=Zn();/*#__PURE__*/return e.jsx(Hr,{title:t,backFn:n===ch?r:n===i?.funding?.methodScreen?i.funding.comingFromSendTransactionScreen?()=>a(wg):void 0:i?.funding?.methodScreen?()=>{let e=i.funding;e.usingDefaultFundingMethod&&(e.usingDefaultFundingMethod=!1),o({funding:e,solanaFundingData:i?.solanaFundingData}),a(e.methodScreen)}:void 0})}const bg={component:()=>{let t=Gn(),{rpcConfig:i,appId:o,closePrivyModal:l,createAnalyticsEvent:c}=s.usePrivyInternal(),{navigate:d,setModalData:u,app:p,data:g}=Zn(),{wallets:m}=Pi(),[y,f]=n.useState(null),[x,v]=n.useState(null),[w,C]=n.useState([]),[b,j]=n.useState(0),[k,T]=n.useState(!1),[A,S]=n.useState(!1),[E,I]=n.useState(!1),[P,N]=n.useState(!1),[_,M]=n.useState(),[F,L]=n.useState();if(!g?.funding||"solana"!==g.funding.chainType)throw Error("Invalid funding data");let{address:W,chain:D,connectedWalletAddress:R}=g.funding,[O,B]=n.useState(g.funding.amount),U=R?m.find((({address:e})=>e===R)):m[0],z=Nn(U?.walletClientType||"unknown"),H=z?.name||"wallet",[V,$]=n.useState(null);n.useEffect((()=>{(async()=>{if(!U)return;let e=await U.getEthereumProvider();$(r.createWalletClient({account:U.address,transport:r.custom(e)}).extend(r.publicActions))})().catch(console.error)}),[U]);let[q,G]=n.useState(0n),Y=Da(q);n.useEffect((()=>{let e=t.solanaRpcs[D];e?Uu({rpc:e.rpc,address:W}).then((e=>G(BigInt(e)))).catch(console.error):console.warn("Unable to load solana rpc, skipping balance")}),[]);let[Z,K]=n.useState(),{tokenPrice:Q}=Ei("solana"),{fundingAmountInBaseUnit:X,fundingAmountInUsd:J}=function({amount:e,fee:t,tokenPrice:n,isUsdc:r}){let a=BigInt(Math.floor(parseFloat(e)*10**(r?6:9))),i=r?a:a+t;return{fundingAmountInBaseUnit:a,fundingAmountInUsd:n?La(a,n):void 0,totalPriceInUsd:n?La(i,n):void 0,totalPriceInNativeCurrency:Da(i),feePriceInNativeCurrency:Da(t),feePriceInUsd:n?La(t,n):void 0}}({amount:O,fee:0n,tokenPrice:Q,isUsdc:g.funding.isUSDC});if(n.useEffect((()=>{(async()=>{if(!V||!U)return;let e=["solana:testnet","solana:devnet"].includes(D);e&&console.warn("Solana testnets are not supported for bridging");let t=a.addToDefaultChains(p.chains).filter((({testnet:t})=>!!t===e)),n=(await rp({chains:t,address:U.address,appId:o,rpcConfig:i})).filter((e=>e.balance>0n));if(n.length<1)return void f(new h.PrivyClientError(`Wallet ${Wt(U.address)} does not have enough funds.`,void 0,h.PrivyErrorCode.INSUFFICIENT_BALANCE));n.sort(((e,t)=>Number(t.balance-e.balance)));let r=(await Promise.allSettled(n.map((async e=>({...e,quote:await Ns({isTestnet:!1,input:Es({amount:X.toString(),user:U.address,recipient:W,destinationChainId:Ts,destinationCurrency:As,originChainId:e.chain.id})})}))))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));if(r.length<1)return void f(new h.PrivyClientError(`Unable to fetch quotes for bridging. Wallet ${Wt(U.address)} does not have enough funds.`,void 0,h.PrivyErrorCode.INSUFFICIENT_BALANCE));let s=r.map((({quote:e,balance:t,chain:n})=>({bridgeTx:_s(e),balance:t,chain:n,isErc20Quote:!1}))).filter((({bridgeTx:e})=>!!e));if(s.length>1)return void C(s);let l=s.at(0);l?(S(!0),K({data:l.bridgeTx.data,to:l.bridgeTx.to,value:l.bridgeTx.value,chain:l.chain})):f(new h.PrivyClientError(`Unable to select bridge option from quotes. Wallet ${Wt(U.address)} does not have enough funds.`,void 0,h.PrivyErrorCode.INSUFFICIENT_BALANCE))})().catch(console.error)}),[V]),n.useEffect((()=>{(async()=>{let e,t;if(!V||!U||k||E||!Z)return;T(!0);let n=r.createPublicClient({chain:Z.chain,transport:r.http(Ft(Z.chain,i,o))});try{e=await n.prepareTransactionRequest({account:U.address,to:Z.to,chain:Z.chain,data:Z.data,value:BigInt(Z.value??0)})}catch(e){console.error(e),w.length>1&&v(e.shortMessage??"Something went wrong")}if(e){T(!1),I(!0);try{await V.switchChain({id:Z.chain.id})}catch(e){await V.addChain({chain:Z.chain}),await V.switchChain({id:Z.chain.id})}try{t=await V.sendTransaction(e)}catch(e){console.error(e),"TransactionExecutionError"===e.name&&(w.length<1?f(new h.PrivyClientError(e.shortMessage,void 0,h.PrivyErrorCode.TRANSACTION_FAILURE)):v(e.shortMessage??"Something went wrong"))}if(t)return await V.waitForTransactionReceipt({hash:t}),A?(L("pending"),void M(t)):(I(!1),N(!0),void c({eventName:Bu,payload:{provider:"external",status:"success",txHash:t,address:U.address,chainId:Z.chain.id,chainType:"ethereum",value:Z.value?r.formatUnits(BigInt(Z.value),18):void 0,token:"ETH",destination:W,destinationClusterName:"mainnet-beta",destinationChainType:"solana",destinationValue:r.formatUnits(X,9),destinationToken:"SOL"}}));I(!1)}else T(!1)})().catch(console.error)}),[V,Z]),Fs({transactionHash:_,isTestnet:!1,bridgingStatus:F,setBridgingStatus:L,onSuccess({transactionHash:e}){S(!1),N(!0),c({eventName:Bu,payload:{provider:"external",status:"success",txHash:e,address:U?.address,chainId:Z?.chain.id,chainType:"ethereum",value:Z?.value?r.formatUnits(BigInt(Z.value),18):void 0,token:"ETH",destination:W,destinationClusterName:"mainnet-beta",destinationChainType:"solana",destinationValue:r.formatUnits(X,9),destinationToken:"SOL"}})},onFailure({error:e}){S(!1),f(e)}}),n.useEffect((()=>{y&&(u({funding:g?.funding,solanaFundingData:g?.solanaFundingData,sendTransaction:g?.sendTransaction,errorModalData:{error:y,previousScreen:Bp}}),d(Ds,!1))}),[y]),n.useEffect((()=>{if(!P)return;let e=setTimeout(l,at);return()=>clearTimeout(e)}),[P]),P/*#__PURE__*/)return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Cg,{}),/*#__PURE__*/e.jsx(Xa,{}),/*#__PURE__*/e.jsxs(Ya,{children:[/*#__PURE__*/e.jsx(se.default,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/e.jsx(Bi,{title:"Success!",description:`You’ve successfully added ${O} SOL to your ${p.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/e.jsx(Ja,{}),/*#__PURE__*/e.jsx(xr,{})]});let ee=w[b];return w.length>1&&ee?/*#__PURE__*/e.jsx(Mp,{displayName:H,configuredFundingChain:D,formattedBalance:Y,fundingAmount:O,fundingCurrency:"SOL",fundingAmountInUsd:J,options:w,selectedOption:ee,isPreparing:k,isSubmitting:E,addressToFund:W,fundingWalletAddress:U?.address||"",errorMessage:x,onSubmit:()=>{g.funding?.amount!==O?async function(){if(U&&ee)try{let e=await Ns({isTestnet:!1,input:Es({amount:X.toString(),user:U.address,recipient:W,destinationChainId:Ts,destinationCurrency:As,originChainId:ee.chain.id})}),t=_s(e);if(!t)throw Error("Invalid transaction request");S(!0),K({data:t.data,to:t.to,value:t.value,chain:ee.chain})}catch(e){console.error(e),f(new h.PrivyClientError("Unable to fetch quotes for bridging",e,h.PrivyErrorCode.INSUFFICIENT_BALANCE))}}().catch(console.error):K({to:ee.bridgeTx.to,data:ee.bridgeTx.data,value:ee.bridgeTx.value,chain:ee.chain})},onSelect:e=>{e!==b&&(v(null),j(e))},onAmountChange:B}):E&&U?/*#__PURE__*/e.jsx(Fp,{walletClientType:U?.walletClientType||"unknown",displayName:H,addressToFund:W,isBridging:A,isErc20Flow:!1,chainId:"solana",chainName:zu(D),totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):
|
|
25
25
|
/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Cg,{}),/*#__PURE__*/e.jsx(Kr,{}),/*#__PURE__*/e.jsx("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/e.jsx(xr,{})]})}},jg=({address:t,accessToken:n,appConfigTheme:r,onClose:a,isLoading:i=!1,exportButtonProps:o})=>/*#__PURE__*/e.jsx(Ca,{title:"Export wallet",subtitle:/*#__PURE__*/e.jsxs(e.Fragment,{children:["Copy either your private key or seed phrase to export your wallet."," ",/*#__PURE__*/e.jsx("a",{href:"https://privy-io.notion.site/Transferring-your-account-9dab9e16c6034a7ab1ff7fa479b02828",target:"blank",rel:"noopener noreferrer",children:"Learn more"})]}),onClose:a,watermark:!0,children:/*#__PURE__*/e.jsxs(kg,{children:[/*#__PURE__*/e.jsx(kh,{theme:r,children:"Never share your private key or seed phrase with anyone."}),/*#__PURE__*/e.jsx(Ru,{title:"Your wallet",address:t,showCopyButton:!0}),/*#__PURE__*/e.jsx("div",{style:{width:"100%"},children:i?/*#__PURE__*/e.jsx(Tg,{}):n&&o&&/*#__PURE__*/e.jsx(Eg,{accessToken:n,dimensions:{height:"44px"},...o})})]})});let kg=/*#__PURE__*/o.styled.div.withConfig({displayName:"ContentContainer",componentId:"sc-e0132ced-0"})(["display:flex;flex-direction:column;gap:1.25rem;text-align:left;"]),Tg=()=>/*#__PURE__*/e.jsx(Ag,{children:/*#__PURE__*/e.jsx(Sg,{children:"Loading..."})}),Ag=/*#__PURE__*/o.styled.div.withConfig({displayName:"PlaceholderContainer",componentId:"sc-e0132ced-1"})(["display:flex;gap:12px;height:44px;"]),Sg=/*#__PURE__*/o.styled.div.withConfig({displayName:"PlaceholderButton",componentId:"sc-e0132ced-2"})(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:16px;font-weight:500;border-radius:var(--privy-border-radius-md);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);"]);function Eg(t){let[r,a]=n.useState(t.dimensions.width),[i,o]=n.useState(void 0),s=n.useRef(null);n.useEffect((()=>{if(s.current&&void 0===r){let{width:e}=s.current.getBoundingClientRect();a(e)}let e=getComputedStyle(document.documentElement);o({background:e.getPropertyValue("--privy-color-background"),background2:e.getPropertyValue("--privy-color-background-2"),foreground3:e.getPropertyValue("--privy-color-foreground-3"),foregroundAccent:e.getPropertyValue("--privy-color-foreground-accent"),accent:e.getPropertyValue("--privy-color-accent"),accentDark:e.getPropertyValue("--privy-color-accent-dark"),success:e.getPropertyValue("--privy-color-success"),colorScheme:e.getPropertyValue("color-scheme")})}),[]);let l="ethereum"===t.chainType&&!t.imported&&!t.isUnifiedWallet;/*#__PURE__*/return e.jsx("div",{ref:s,children:r&&
|
|
26
|
-
/*#__PURE__*/e.jsxs(Pg,{children:[/*#__PURE__*/e.jsx("iframe",{style:{position:"absolute",zIndex:1},width:r,height:t.dimensions.height,allow:"clipboard-write self *",src:Bt(t.origin,`/apps/${t.appId}/embedded-wallets/export`,t.isUnifiedWallet?{v:"1-unified",wallet_id:t.walletId,client_id:t.appClientId,width:`${r}px`,caid:t.clientAnalyticsId,phrase_export:l,...i}:{v:"1",entropy_id:t.entropyId,entropy_id_verifier:t.entropyIdVerifier,hd_wallet_index:t.hdWalletIndex,chain_type:t.chainType,client_id:t.appClientId,width:`${r}px`,caid:t.clientAnalyticsId,phrase_export:l,...i},{token:t.accessToken})}),/*#__PURE__*/e.jsx(Ng,{children:"Loading..."}),l&&/*#__PURE__*/e.jsx(Ng,{children:"Loading..."})]})})}const Ig={component:()=>{let[t,r]=n.useState(null),{authenticated:a,user:i}=w.usePrivyContext(),{closePrivyModal:o,createAnalyticsEvent:l,clientAnalyticsId:c,client:d}=s.usePrivyInternal(),u=Gn(),{data:p,onUserCloseViaDialogOrKeybindRef:h}=Zn(),{onFailure:g,onSuccess:m,origin:y,appId:f,appClientId:x,entropyId:v,entropyIdVerifier:C,walletId:b,hdWalletIndex:j,chainType:k,address:T,isUnifiedWallet:A,imported:S}=p.keyExport,E=e=>{o({shouldCallAuthOnSuccess:!1}),g("string"==typeof e?Error(e):e)},I=()=>{o({shouldCallAuthOnSuccess:!1}),m(),l({eventName:"embedded_wallet_key_export_completed",payload:{walletAddress:T}})};return n.useEffect((()=>{if(!a)return E("User must be authenticated before exporting their wallet");d.getAccessToken().then(r).catch(E)}),[a,i]),h.current=I,/*#__PURE__*/e.jsx(jg,{address:T,accessToken:t,appConfigTheme:u.appearance.palette.colorScheme,onClose:I,isLoading:!t,exportButtonProps:t?{origin:y,appId:f,appClientId:x,clientAnalyticsId:c,entropyId:v,entropyIdVerifier:C,walletId:b,hdWalletIndex:j,isUnifiedWallet:A,imported:S,chainType:k}:void 0})}};let Pg=/*#__PURE__*/o.styled.div.withConfig({displayName:"ButtonContainer",componentId:"sc-e0132ced-3"})(["overflow:visible;position:relative;overflow:none;height:44px;display:flex;gap:12px;"]),Ng=/*#__PURE__*/o.styled.div.withConfig({displayName:"LoadingButton",componentId:"sc-e0132ced-4"})(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:16px;font-weight:500;border-radius:var(--privy-border-radius-md);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);"]);const _g=({connectionFailed:t,onClose:n})=>t?/*#__PURE__*/e.jsx(Ca,{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:T.XCircle,iconVariant:"error",primaryCta:{label:"Close",onClick:n},watermark:!0}):/*#__PURE__*/e.jsx(Ca,{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:n,watermark:!1}),Mg={component:()=>{let{authenticated:t,user:r}=w.usePrivyContext(),{client:a,closePrivyModal:i,createAnalyticsEvent:o,walletProxy:l}=s.usePrivyInternal(),{navigate:c,data:d,setModalData:u,onUserCloseViaDialogOrKeybindRef:p}=Zn(),h=n.useMemo((()=>Date.now()),[]),[g,m]=n.useState(!1),{onCompleteNavigateTo:y,onFailure:f,shouldForceMFA:x,entropyId:v,entropyIdVerifier:C,recoveryMethod:b,connectingWalletAddress:j,isUnifiedWallet:k=!1}=d?.connectWallet,T=e=>{g||(m(!0),f("string"==typeof e?Error(e):e))};return n.useEffect((()=>{let e;return t?l?((async()=>{let t=await a.getAccessToken();if(!t)return T("User must be authenticated and have a Privy wallet before it can be connected");try{k||await l.connect({accessToken:t,entropyId:v,entropyIdVerifier:C}),x&&await l.verifyMfa({accessToken:t});let n=(Date.now()-h)/1e3;y===Ig&&n<1?e=setTimeout((()=>{c(y,!1)}),1e3*(1-n)):c(y,!1)}catch(e){if(Wi(e)&&"privy"===b){let e=await a.getAccessToken();if(!e)return T("User must be authenticated and have a Privy wallet before it can be recovered");try{o({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:j}});let t=await(l?.recover({accessToken:e,entropyId:v,entropyIdVerifier:C}));t?.entropyId||T(Error("Unable to recover wallet")),y?c(y):i({shouldCallAuthOnSuccess:!1}),o({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:j}}),c(y)}catch(e){T("An error has occurred, please try again.")}}else Wi(e)&&"privy"!==b&&"privy-v2"!==b?(u({...d,recoverWallet:{entropyId:v,entropyIdVerifier:C,onCompleteNavigateTo:y,onFailure:f},recoveryOAuthStatus:{provider:b,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),c(Tu(b))):T(e)}})(),()=>clearTimeout(e)):void 0:T("User must be authenticated and have a Privy wallet before it can be connected")}),[t,r,l]),p.current=()=>{T("User exited before wallet could be connected"),i({shouldCallAuthOnSuccess:!1})},/*#__PURE__*/e.jsx(_g,{connectionFailed:g,onClose:()=>i({shouldCallAuthOnSuccess:!1})})}},Fg=({style:t,color:n,...r})=>/*#__PURE__*/e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:n||"currentColor",style:{height:"1.5rem",width:"1.5rem",...t},...r,children:/*#__PURE__*/e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),Lg=t=>{let[r,a]=n.useState(!1);/*#__PURE__*/return e.jsxs(Wg,{color:t.color,onClick:()=>{a(!0),navigator.clipboard.writeText(t.text),setTimeout((()=>a(!1)),1500)},$justCopied:r,children:[r?/*#__PURE__*/e.jsx(Fg,{style:{height:"14px",width:"14px"},strokeWidth:"2"}):/*#__PURE__*/e.jsx(al,{style:{height:"14px",width:"14px"}}),r?"Copied":"Copy"," ",t.itemName?t.itemName:"to Clipboard"]})};let Wg=/*#__PURE__*/o.styled.button.withConfig({displayName:"StyledCopytoClipboardButton",componentId:"sc-46f4187f-0"})(["display:flex;align-items:center;gap:6px;&&{margin:8px 2px;font-size:14px;color:",";font-weight:",";transition:color 350ms ease;:focus,:active{background-color:transparent;border:none;outline:none;box-shadow:none;}:hover{color:",";}:active{color:'var(--privy-color-foreground)';font-weight:medium;}@media (max-width:440px){margin:12px 2px;}}svg{width:14px;height:14px;}"],(e=>e.$justCopied?"var(--privy-color-foreground)":e.color||"var(--privy-color-foreground-3)"),(e=>e.$justCopied?"medium":"normal"),(e=>e.$justCopied?"var(--privy-color-foreground)":"var(--privy-color-foreground-2)"));const Dg=/*#__PURE__*/o.styled.img.withConfig({displayName:"StyledLogo",componentId:"sc-68c1b1ea-0"})(["&&{height:",";width:",";border-radius:16px;margin-bottom:12px;}"],(e=>"sm"===e.size?"65px":"140px"),(e=>"sm"===e.size?"65px":"140px"));let Rg=e=>{if(!r.isHex(e))return e;try{let t=r.hexToString(e);return t.includes("�")?e:t}catch{return e}},Og=e=>{try{let t=S.base64.decode(e),n=(new TextDecoder).decode(t);return n.includes("�")?e:n}catch{return e}},Bg=e=>JSON.stringify(e,null,2),Ug=t=>{let{types:n,primaryType:r,...a}=t.typedData;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(qg,{data:a}),/*#__PURE__*/e.jsx(Lg,{text:Bg(t.typedData),itemName:"full payload to clipboard"})," "]})};const zg=({method:t,messageData:n,copy:r,iconUrl:a,isLoading:i,success:o,walletProxyIsLoading:s,errorMessage:l,isCancellable:c,onSign:d,onCancel:u,onClose:p})=>/*#__PURE__*/e.jsx(Ca,{title:r.title,subtitle:r.description,showClose:!0,onClose:p,icon:T.Edit,iconVariant:"subtle",helpText:l?/*#__PURE__*/e.jsx($g,{children:l}):void 0,primaryCta:{label:r.buttonText,onClick:d,disabled:i||o||s,loading:i},secondaryCta:c?{label:"Not now",onClick:u,disabled:i||o||s}:void 0,watermark:!0,children:/*#__PURE__*/e.jsxs(Ka,{children:[a?/*#__PURE__*/e.jsx(Dg,{style:{alignSelf:"center"},size:"sm",src:a,alt:"app image"}):null,/*#__PURE__*/e.jsxs(Vg,{children:["personal_sign"===t&&/*#__PURE__*/e.jsx(Gg,{children:Rg(n)}),"eth_signTypedData_v4"===t&&/*#__PURE__*/e.jsx(Ug,{typedData:n}),"solana_signMessage"===t&&/*#__PURE__*/e.jsx(Gg,{children:Og(n)})]})]})}),Hg={component:()=>{let{authenticated:t}=w.usePrivyContext(),{initializeWalletProxy:r,closePrivyModal:i}=s.usePrivyInternal(),{navigate:o,data:l,onUserCloseViaDialogOrKeybindRef:c}=Zn(),[d,u]=n.useState(!0),[p,h]=n.useState(""),[g,m]=n.useState(),[y,f]=n.useState(null),[x,v]=n.useState(!1);n.useEffect((()=>{t||o(du)}),[t]),n.useEffect((()=>{r(3e4).then((e=>{u(!1),e||(h("An error has occurred, please try again."),m(new an(new rn(p,a.ProviderErrors.E32603_DEFAULT_INTERNAL_ERROR.eipCode))))}))}),[]);let{method:C,data:b,confirmAndSign:j,onSuccess:k,onFailure:T,uiOptions:A}=l.signMessage,S={title:A?.title||"Sign message",description:A?.description||"Signing this message will not cost you any fees.",buttonText:A?.buttonText||"Sign and continue"},E=e=>{e?k(e):T(g||new an(new rn("The user rejected the request.",a.ProviderErrors.E4001_USER_REJECTED_REQUEST.eipCode))),i({shouldCallAuthOnSuccess:!1}),setTimeout((()=>{f(null),h(""),m(void 0)}),200)};c.current=()=>{E(y)};/*#__PURE__*/return e.jsx(zg,{method:C,messageData:b,copy:S,iconUrl:A?.iconUrl&&"string"==typeof A.iconUrl?A.iconUrl:void 0,isLoading:x,success:null!==y,walletProxyIsLoading:d,errorMessage:p,isCancellable:A?.isCancellable,onSign:async()=>{v(!0),h("");try{let e=await j();f(e),v(!1),setTimeout((()=>{E(e)}),rt)}catch(e){console.error(e),h("An error has occurred, please try again."),m(new an(new rn(p,a.ProviderErrors.E32603_DEFAULT_INTERNAL_ERROR.eipCode))),v(!1)}},onCancel:()=>E(null),onClose:()=>E(y)})}};let Vg=/*#__PURE__*/o.styled.div.withConfig({displayName:"MessageContainer",componentId:"sc-e01d451f-0"})(["flex:1;display:flex;flex-direction:column;gap:16px;"]),$g=/*#__PURE__*/o.styled.p.withConfig({displayName:"ErrorText",componentId:"sc-e01d451f-1"})(["&&{margin:0;width:100%;text-align:center;color:var(--privy-color-error-dark);font-size:14px;line-height:22px;}"]),qg=/*#__PURE__*/o.styled(mh).withConfig({displayName:"StyledDisplayJsonTree",componentId:"sc-e01d451f-2"})(["margin-top:0;"]),Gg=/*#__PURE__*/o.styled(hh).withConfig({displayName:"StyledMessage",componentId:"sc-e01d451f-3"})(["margin-top:0;"]);exports.ASSOCIATED_TOKEN_PROGRAM_ID="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",exports.AccountNotFoundScreen=xs,exports.Address=ws,exports.AffirmativeConsentScreen=tl,exports.AllowlistRejectionScreen=nc,exports.Apple=mt,exports.AuthenticateWithWalletScreen=fc,exports.AwaitingEvmToSolBridgingScreen=bg,exports.AwaitingExternalTransferScreen=Wp,exports.AwaitingPasswordlessCodeScreen=Ed,exports.AwaitingSolToEvmBridgingScreen=Rp,exports.BASE_ACCOUNT_DATA_URI=en,exports.Blobby=hn,exports.BlobbyFooter=xr,exports.BottomPusherContainer=Va,exports.Box=Pu,exports.BrowserExtensionWallet=mn,exports.ButtonLoader=Ar,exports.CLIENT_ANALYTICS_ID_KEY="privy:caid",exports.CODE_VERIFIER_KEY=ot,exports.COINBASE_WALLET_DATA_URI=Jt,exports.CONNECTIONS_HISTORY_KEY=lt,exports.CUSTOMER_ACCESS_TOKEN_COOKIE_KEY="privy-token",exports.CUSTOMER_ACCESS_TOKEN_STORAGE_KEY="privy:token",exports.CaptchaError=$t,exports.CaptchaProvider=({children:t,id:r,captchaSiteKey:a,captchaEnabled:i})=>{let o=n.useRef(null),[s,l]=n.useState(),[c,d]=n.useState(),[u,p]=n.useState(!1),g=n.useMemo((()=>i?u||s||c?!u||s||c?s&&!c?{status:"success",token:s}:c?{status:"error",error:c}:{status:"ready"}:{status:"loading"}:{status:"ready"}:{status:"disabled"}),[i,s,c,u]);/*#__PURE__*/return e.jsx(Vt.Provider,{value:{...g,ref:o,enabled:i,siteKey:a,appId:r,setToken:l,setError:d,setExecuting:p,remove(){i&&(o.current?.remove(),p(!1),d(void 0),l(void 0))},reset(){i&&(o.current?.reset(),p(!1),d(void 0),l(void 0))},execute(){i&&(p(!0),o.current?.execute())},async waitForResult(){if(!i)return"";try{return await function(e,{interval:t=100,timeout:n=5e3}={}){return new Promise(((r,a)=>{let i,o=0,s=()=>{o>=n?a("Max attempts reached without result"):(i=e(),o+=t,null==i?setTimeout(s,t):r(i))};s()}))}((()=>o.current?.getResponse()),{interval:200,timeout:2e4})}catch(e){throw new $t("Captcha failed",null,h.PrivyErrorCode.CAPTCHA_TIMEOUT)}}},children:t})},exports.CaptchaScreen=ac,exports.CenteredItem=$a,exports.CenteredItemWithGap=Ya,exports.CenteredItemWithPadding=Ga,exports.CenteredScreenHeader=Bi,exports.Chip=bc,exports.Chip$1=Ml,exports.CloseButton=Pl,exports.ConnectEmailForm=Ld,exports.ConnectOnlyLandingScreen=xc,exports.ConnectOnlyStatusScreen=Hd,exports.ConnectOrCreateScreen=wd,exports.ConnectPhoneNumberForm=Jc,exports.ConnectionLoader=Cr,exports.ConnectionStatusScreen=mc,exports.CopyableText=cl,exports.CopytoClipboardButton=Lg,exports.DEFAULT_API_TIMEOUT_MS=2e4,exports.DEFAULT_PRIVY_API_URL="https://auth.privy.io",exports.DEFAULT_SUCCESS_SCREEN_DURATION_MS=rt,exports.DEFAULT_SUCCESS_SCREEN_EXTRA_LONG_DURATION_MS=at,exports.DEFAULT_SUCCESS_SCREEN_LONG_DURATION_MS=2500,exports.DEFAULT_TOKENS_DATA=Fa,exports.DEPRECATED_REFRESH_TOKEN="deprecated",exports.Discord=yt,exports.EmailUpdateForm=Cl,exports.EmbeddedButton=Rr,exports.EmbeddedWalletConnectingScreen=Mg,exports.EmbeddedWalletKeyExportScreen=Ig,exports.EmbeddedWalletOnAccountCreateScreen=el,exports.ErrorMessage=vl,exports.ErrorScreen=Ds,exports.ErrorScreenView=Ws,exports.EthereumNullConnector=gn,exports.EthereumWalletConnector=un,exports.Farcaster=kc,exports.FarcasterConnectStatusScreen=Dc,exports.FundingMethodSelectionScreen=lh,exports.Github=ft,exports.Google=xt,exports.Grow=ar,exports.HEADLESS_OAUTH_KEY="privy:headless_oauth",exports.Header=Il,exports.Hide=pr,exports.IDENTITY_TOKEN_COOKIE_KEY="privy-id-token",exports.IDENTITY_TOKEN_STORAGE_KEY="privy:id_token",exports.InjectedWalletIcon=Bd,exports.InputContainerForm=jl,exports.Instagram=vt,exports.JUPITER_SWAP_PROGRAM_IDS=["JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"],exports.LAMPORTS_PER_SOL=Ma,exports.LabelSm=op,exports.LabelXs=Sc,exports.LandingScreen=du,exports.Line=wt,exports.LinkConflictScreen=Ks,exports.LinkedIn=Ct,exports.Loader=kr,exports.LoginMethodButton=dr,exports.LoginMethodIconWrapper=ur,exports.ManualTransferScreen=ch,exports.Metamask=yn,exports.ModalFooter=wr,exports.ModalHeader=Hr,exports.ModalProvider=t=>{let r=Gn(),a=t.authenticated,[i,o]=n.useState(t.initialScreen);n.useEffect((()=>{a||!t.initialScreen||t.initialScreen.isUnauthenticatedScreem||t.setInitialScreen(null)}),[a]);let s=n.useRef(null);n.useEffect((()=>{t.open||(s.current=null)}),[t.open]),n.useEffect((()=>{s.current=null}),[t.initialScreen]);let l={app:r,data:t.data,setModalData:t.setModalData,currentScreen:t.initialScreen,lastScreen:i,navigate:(e,n=!0)=>{t.setInitialScreen(e),n&&o(t.initialScreen)},navigateBack:()=>{t.setInitialScreen(i)},resetNavigation:()=>{t.setInitialScreen(null),o(null)},onUserCloseViaDialogOrKeybindRef:s};/*#__PURE__*/return e.jsxs(Yn.Provider,{value:l,children:[("string"==typeof r.appearance.logo||"img"===r.appearance.logo?.type)&&/*#__PURE__*/e.jsx(Mn,{src:"string"==typeof r.appearance.logo?r.appearance.logo:r.appearance.logo.props.src}),t.children]})},exports.MoonpayStatusScreen=Jp,exports.NetworkIcon=up,exports.NeutralSpinner=Kr,exports.OAUTH_DISABLE_SIGNUP_KEY="privy:oauth_disable_signup",exports.ON_RAMP_COMPLETE_ANALYTICS_EVENT=Bu,exports.OpenLinkButton=Tc,exports.PRIVY_ACCESS_TOKEN_STORAGE_KEY="privy:pat",exports.Phantom=fn,exports.PrimaryButton=Pr,exports.PrivyAppConfigProvider=({children:t,client:r,legacyClient:a,clientConfig:i})=>{let[o,s]=n.useState(null),l=n.useMemo((()=>Hn(o??Vn,i,!!o,"undefined"!=typeof window?window.location.origin:void 0)),[o,i]);return n.useEffect((()=>{if(!o)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:n,defaultChain:r,externalWallets:a,...i}=e;return{...i,...n?{supportedChains:n.map((e=>e.id))}:void 0,...r?{defaultChain:r.id}:void 0,...a?{walletConnect:a.walletConnect?{enabled:a.walletConnect.enabled}:void 0,coinbaseWallet:a.coinbaseWallet,solana:{connectors:a.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(i),t=function(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t,a=0;a<e.length;a++)n=Math.imul(n^(t=e.charCodeAt(a)),2654435761),r=Math.imul(r^t,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&(r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)}(JSON.stringify(e)).toString(),n=`privy:sent:${o.id}:${t}`;localStorage.getItem(n)||(a.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(n,"t"))}),[i,o]),n.useEffect((()=>{o||(async()=>{try{await r.initialize();let e=r.app.getConfig();e.custom_api_url&&a.updateApiUrl(e.custom_api_url),s(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/e.jsx(qn.Provider,{value:{appConfig:l,isServerConfigLoaded:!!o},children:t})},exports.PrivyEventsContext=Jn,exports.PrivyIframeError=Fi,exports.PrivyPluginProvider=({children:t})=>{let r=n.useRef({});/*#__PURE__*/return e.jsx(Xl.Provider,{value:{plugins:r},children:t})},exports.PrivyProviderRpcError=an,exports.PrivyProxyProvider=pn,exports.QrCode=xl,exports.RAYDIUM_SWAP_PROGRAM_IDS=["CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C","CPMDWBwJDtYax9qW7AyRuVC19Cc4L4Vcy4n2BHAbHkCW"],exports.REFRESH_TOKEN_COOKIE_KEY="privy-refresh-token",exports.REFRESH_TOKEN_STORAGE_KEY="privy:refresh_token",exports.RecentlyUsedAccountProvider=({children:t})=>{let r=Gn(),[a,i]=n.useState({});return tr("login",{onComplete:({loginAccount:e})=>{e&&"passkey"!==e.type&&"cross_app"!==e.type&&("wallet"!==e.type||"privy"!==e.walletClientType)&&(Ye.put(ts(r.id),e.type),"wallet"===e.type?(Ye.put(ns(r.id),e.walletClientType),Ye.put(rs(r.id),e.chainType),i({accountType:e.type,walletClientType:e.walletClientType,chainType:e.chainType})):(Ye.del(ns(r.id)),Ye.del(rs(r.id)),i({accountType:e.type})))}}),n.useEffect((()=>{if(!r.id)return;let e=Ye.get(ts(r.id)),t=Ye.get(ns(r.id)),n=Ye.get(rs(r.id));e&&i("wallet"===e?{accountType:e,walletClientType:t,chainType:n}:{accountType:e})}),[r.id]),/*#__PURE__*/e.jsx(es.Provider,{value:a,children:t})},exports.RefactorSpacerBottom=Ja,exports.RefactorSpacerTop=Xa,exports.Row=ip,exports.Rows=ap,exports.RunEffectOnce=nt,exports.SESSION_COOKIE_KEY="privy-session",exports.SOLANA_FUNDING_PLUGIN_ID=Dp,exports.SOLANA_LEDGER_PLUGIN_ID=ec,exports.STATE_CODE_KEY=it,exports.SYSTEM_PROGRAM_ID="11111111111111111111111111111111",exports.ScreenLayout=Ca,exports.ScrollContainer=Fl,exports.SecondaryButton=Fr,exports.SendSolanaTransactionScreenView=({img:t,title:r,subtitle:i,cta:o,instructions:s,network:l,blockExplorerUrl:c,isMissingFunds:d,submitError:u,parseError:p,total:h,swap:g,transactingWalletAddress:m,fee:y,balance:f,disabled:x,isSubmitting:v,isPreparing:w,isTokenPriceLoading:b,onClick:j,onClose:k,onBack:T})=>{let A=w||b,[S,E]=n.useState(!1);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Hr,{onClose:k,backFn:T}),t&&/*#__PURE__*/e.jsx(Lh,{children:t}),/*#__PURE__*/e.jsx(Cu,{style:{marginTop:t?"1.5rem":0},children:r}),/*#__PURE__*/e.jsx(wu,{children:i}),/*#__PURE__*/e.jsxs(ap,{style:{marginTop:"2rem",marginBottom:".5rem"},children:[(h||A)&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount"}),/*#__PURE__*/e.jsx(lp,{$isLoading:A,children:h})]}),g&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Swap"}),/*#__PURE__*/e.jsx(lp,{children:g})]}),l&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Network"}),/*#__PURE__*/e.jsx(lp,{children:l})]}),(y||A)&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(lp,{$isLoading:A,children:y})]})]}),/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(xh,{onClick:()=>E((e=>!e)),children:[/*#__PURE__*/e.jsx("span",{children:"Advanced"}),/*#__PURE__*/e.jsx(C.ChevronDownIcon,{height:"16px",width:"16px",strokeWidth:"2",style:{transition:"all 300ms",transform:S?"rotate(180deg)":void 0}})]})}),S&&/*#__PURE__*/e.jsx(e.Fragment,{children:s.map(((t,n)=>"sol-transfer"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Transfer ",t.withSeed?"with seed":""]})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount"}),/*#__PURE__*/e.jsxs(lp,{children:[a.formatTokenAmount({amount:t.value,decimals:t.token.decimals})," ",t.token.symbol]})]}),!!t.toAccount&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Destination"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.toAccount,url:c})})]})]},n):"spl-transfer"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Transfer ",t.token.symbol]})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount"}),/*#__PURE__*/e.jsx(lp,{children:t.value.toString()})]}),!!t.fromAta&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Source"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.fromAta,url:c})})]}),!!t.toAta&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Destination"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.toAta,url:c})})]}),!!t.token.address&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.token.address,url:c})})]})]},n):"ata-creation"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsx(Sc,{children:"Create token account"})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Program ID"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.program,url:c})})]}),!!t.owner&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Owner"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.owner,url:c})})]})]},n):"create-account"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Create account ",t.withSeed?"with seed":""]})}),!!t.account&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Account"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.account,url:c})})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount"}),/*#__PURE__*/e.jsxs(lp,{children:[a.formatTokenAmount({amount:t.value,decimals:9})," SOL"]})]})]},n):"spl-init-account"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsx(Sc,{children:"Initialize token account"})}),!!t.account&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Account"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.account,url:c})})]}),!!t.mint&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Mint"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mint,url:c})})]}),!!t.owner&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Owner"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.owner,url:c})})]})]},n):"spl-close-account"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsx(Sc,{children:"Close token account"})}),!!t.source&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Source"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.source,url:c})})]}),!!t.destination&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Destination"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.destination,url:c})})]}),!!t.owner&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Owner"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.owner,url:c})})]})]},n):"spl-sync-native"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsx(Sc,{children:"Sync native"})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Program ID"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.program,url:c})})]})]},n):"raydium-swap-base-input"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Raydium swap"," ",t.tokenIn&&t.tokenOut?`${t.tokenIn.symbol} → ${t.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount in"}),/*#__PURE__*/e.jsx(lp,{children:t.amountIn.toString()})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Minimum amount out"}),/*#__PURE__*/e.jsx(lp,{children:t.minimumAmountOut.toString()})]}),t.mintIn&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token in"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintIn,url:c})})]}),t.mintOut&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token out"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintOut,url:c})})]})]},n):"raydium-swap-base-output"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Raydium swap"," ",t.tokenIn&&t.tokenOut?`${t.tokenIn.symbol} → ${t.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Max amount in"}),/*#__PURE__*/e.jsx(lp,{children:t.maxAmountIn.toString()})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount out"}),/*#__PURE__*/e.jsx(lp,{children:t.amountOut.toString()})]}),t.mintIn&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token in"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintIn,url:c})})]}),t.mintOut&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token out"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintOut,url:c})})]})]},n):"jupiter-swap-shared-accounts-route"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Jupiter swap"," ",t.tokenIn&&t.tokenOut?`${t.tokenIn.symbol} → ${t.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"In amount"}),/*#__PURE__*/e.jsx(lp,{children:t.inAmount.toString()})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Quoted out amount"}),/*#__PURE__*/e.jsx(lp,{children:t.quotedOutAmount.toString()})]}),t.mintIn&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token in"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintIn,url:c})})]}),t.mintOut&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token out"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintOut,url:c})})]})]},n):"jupiter-swap-exact-out-route"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Jupiter swap"," ",t.tokenIn&&t.tokenOut?`${t.tokenIn.symbol} → ${t.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Quoted in amount"}),/*#__PURE__*/e.jsx(lp,{children:t.quotedInAmount.toString()})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount out"}),/*#__PURE__*/e.jsx(lp,{children:t.outAmount.toString()})]}),t.mintIn&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token in"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintIn,url:c})})]}),t.mintOut&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token out"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintOut,url:c})})]})]},n):/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Program ID"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.program,url:c})})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Data"}),/*#__PURE__*/e.jsx(lp,{children:t.discriminator})]})]},n)))}),/*#__PURE__*/e.jsx(ar,{}),u?/*#__PURE__*/e.jsx(vl,{style:{marginTop:"2rem"},children:u.message}):p?/*#__PURE__*/e.jsx(vl,{style:{marginTop:"2rem"},children:Fh}):null,/*#__PURE__*/e.jsx(_h,{$useSmallMargins:!(!p&&!u),title:"Your wallet",address:m,balance:f,errMsg:w||p||u||!d?void 0:"Add funds on Solana to complete transaction."}),/*#__PURE__*/e.jsx(Pr,{style:{marginTop:"1rem"},loading:v,disabled:x||w,onClick:j,children:o}),/*#__PURE__*/e.jsx(xr,{})]})},exports.SendTransactionScreen=wg,exports.SignRequestScreen=Hg,exports.SiweFlow=St,exports.SiwsFlow=It,exports.SolanaNullConnector=An,exports.SolanaPriceDisplay=({quantities:t,tokenPrice:n,tokenSymbol:a="SOL",tokenDecimals:i=9})=>{let o=t.reduce(((e,t)=>e+t),0n),s=n&&"SOL"===a&&9===i?La(o,n):void 0,l="SOL"===a&&9===i?Da(o):`${r.formatUnits(o,i)} ${a}`;/*#__PURE__*/return e.jsx(Ba,{children:s?/*#__PURE__*/e.jsx(e.Fragment,{children:"<$0.01"===s?
|
|
27
|
-
/*#__PURE__*/e.jsxs(Ha,{children:[/*#__PURE__*/e.jsx(za,{children:"<"}),"$0.01"]}):s}):l})},exports.SolanaWalletConnector=Tn,exports.Spotify=bt,exports.Subtitle=wu,exports.TOKEN_2022_PROGRAM_ID="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb",exports.TOKEN_PROGRAM_ID="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",exports.TelegramAuthFlow=class{async authenticate(){if(!this.api)throw new h.PrivyClientError("Auth flow has no API instance");try{return await this.api.post(h.telegramAccountAuthenticatePath,{captcha_token:this.meta.captchaToken,telegram_auth_result:this.meta.telegramAuthResult,telegram_web_app_data:this.meta.telegramWebAppData,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(e){throw h.formatApiError(e)}}async link(){if(!this.api)throw new h.PrivyClientError("Auth flow has no API instance");try{return await this.api.post(h.telegramAccountLinkPath,{telegram_auth_result:this.meta.telegramAuthResult,telegram_web_app_data:this.meta.telegramWebAppData})}catch(e){throw h.formatApiError(e)}}constructor(e,t=!1){this.meta={disableSignup:!1},this.meta={captchaToken:e,disableSignup:!1},this.meta.disableSignup=t}},exports.TelegramAuthScreen=ld,exports.Tiktok=jt,exports.Title=Cu,exports.TodoItem=$d,exports.TodoList=Vd,exports.TransactionDetails=ki,exports.TransactionErrorView=Oh,exports.TransferFromWalletScreen=Bp,exports.Twitter=kt,exports.UseWalletsContext=Ii,exports.UserLimitReachedScreen=pc,exports.VERSION="3.0.
|
|
26
|
+
/*#__PURE__*/e.jsxs(Pg,{children:[/*#__PURE__*/e.jsx("iframe",{style:{position:"absolute",zIndex:1},width:r,height:t.dimensions.height,allow:"clipboard-write self *",src:Bt(t.origin,`/apps/${t.appId}/embedded-wallets/export`,t.isUnifiedWallet?{v:"1-unified",wallet_id:t.walletId,client_id:t.appClientId,width:`${r}px`,caid:t.clientAnalyticsId,phrase_export:l,...i}:{v:"1",entropy_id:t.entropyId,entropy_id_verifier:t.entropyIdVerifier,hd_wallet_index:t.hdWalletIndex,chain_type:t.chainType,client_id:t.appClientId,width:`${r}px`,caid:t.clientAnalyticsId,phrase_export:l,...i},{token:t.accessToken})}),/*#__PURE__*/e.jsx(Ng,{children:"Loading..."}),l&&/*#__PURE__*/e.jsx(Ng,{children:"Loading..."})]})})}const Ig={component:()=>{let[t,r]=n.useState(null),{authenticated:a,user:i}=w.usePrivyContext(),{closePrivyModal:o,createAnalyticsEvent:l,clientAnalyticsId:c,client:d}=s.usePrivyInternal(),u=Gn(),{data:p,onUserCloseViaDialogOrKeybindRef:h}=Zn(),{onFailure:g,onSuccess:m,origin:y,appId:f,appClientId:x,entropyId:v,entropyIdVerifier:C,walletId:b,hdWalletIndex:j,chainType:k,address:T,isUnifiedWallet:A,imported:S}=p.keyExport,E=e=>{o({shouldCallAuthOnSuccess:!1}),g("string"==typeof e?Error(e):e)},I=()=>{o({shouldCallAuthOnSuccess:!1}),m(),l({eventName:"embedded_wallet_key_export_completed",payload:{walletAddress:T}})};return n.useEffect((()=>{if(!a)return E("User must be authenticated before exporting their wallet");d.getAccessToken().then(r).catch(E)}),[a,i]),h.current=I,/*#__PURE__*/e.jsx(jg,{address:T,accessToken:t,appConfigTheme:u.appearance.palette.colorScheme,onClose:I,isLoading:!t,exportButtonProps:t?{origin:y,appId:f,appClientId:x,clientAnalyticsId:c,entropyId:v,entropyIdVerifier:C,walletId:b,hdWalletIndex:j,isUnifiedWallet:A,imported:S,chainType:k}:void 0})}};let Pg=/*#__PURE__*/o.styled.div.withConfig({displayName:"ButtonContainer",componentId:"sc-e0132ced-3"})(["overflow:visible;position:relative;overflow:none;height:44px;display:flex;gap:12px;"]),Ng=/*#__PURE__*/o.styled.div.withConfig({displayName:"LoadingButton",componentId:"sc-e0132ced-4"})(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:16px;font-weight:500;border-radius:var(--privy-border-radius-md);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);"]);const _g=({connectionFailed:t,onClose:n})=>t?/*#__PURE__*/e.jsx(Ca,{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:T.XCircle,iconVariant:"error",primaryCta:{label:"Close",onClick:n},watermark:!0}):/*#__PURE__*/e.jsx(Ca,{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:n,watermark:!1}),Mg={component:()=>{let{authenticated:t,user:r}=w.usePrivyContext(),{client:a,closePrivyModal:i,createAnalyticsEvent:o,walletProxy:l}=s.usePrivyInternal(),{navigate:c,data:d,setModalData:u,onUserCloseViaDialogOrKeybindRef:p}=Zn(),h=n.useMemo((()=>Date.now()),[]),[g,m]=n.useState(!1),{onCompleteNavigateTo:y,onFailure:f,shouldForceMFA:x,entropyId:v,entropyIdVerifier:C,recoveryMethod:b,connectingWalletAddress:j,isUnifiedWallet:k=!1}=d?.connectWallet,T=e=>{g||(m(!0),f("string"==typeof e?Error(e):e))};return n.useEffect((()=>{let e;return t?l?((async()=>{let t=await a.getAccessToken();if(!t)return T("User must be authenticated and have a Privy wallet before it can be connected");try{k||await l.connect({accessToken:t,entropyId:v,entropyIdVerifier:C}),x&&await l.verifyMfa({accessToken:t});let n=(Date.now()-h)/1e3;y===Ig&&n<1?e=setTimeout((()=>{c(y,!1)}),1e3*(1-n)):c(y,!1)}catch(e){if(Wi(e)&&"privy"===b){let e=await a.getAccessToken();if(!e)return T("User must be authenticated and have a Privy wallet before it can be recovered");try{o({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:j}});let t=await(l?.recover({accessToken:e,entropyId:v,entropyIdVerifier:C}));t?.entropyId||T(Error("Unable to recover wallet")),y?c(y):i({shouldCallAuthOnSuccess:!1}),o({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:j}}),c(y)}catch(e){T("An error has occurred, please try again.")}}else Wi(e)&&"privy"!==b&&"privy-v2"!==b?(u({...d,recoverWallet:{entropyId:v,entropyIdVerifier:C,onCompleteNavigateTo:y,onFailure:f},recoveryOAuthStatus:{provider:b,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),c(Tu(b))):T(e)}})(),()=>clearTimeout(e)):void 0:T("User must be authenticated and have a Privy wallet before it can be connected")}),[t,r,l]),p.current=()=>{T("User exited before wallet could be connected"),i({shouldCallAuthOnSuccess:!1})},/*#__PURE__*/e.jsx(_g,{connectionFailed:g,onClose:()=>i({shouldCallAuthOnSuccess:!1})})}},Fg=({style:t,color:n,...r})=>/*#__PURE__*/e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:n||"currentColor",style:{height:"1.5rem",width:"1.5rem",...t},...r,children:/*#__PURE__*/e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),Lg=t=>{let[r,a]=n.useState(!1);/*#__PURE__*/return e.jsxs(Wg,{color:t.color,onClick:()=>{a(!0),navigator.clipboard.writeText(t.text),setTimeout((()=>a(!1)),1500)},$justCopied:r,children:[r?/*#__PURE__*/e.jsx(Fg,{style:{height:"14px",width:"14px"},strokeWidth:"2"}):/*#__PURE__*/e.jsx(al,{style:{height:"14px",width:"14px"}}),r?"Copied":"Copy"," ",t.itemName?t.itemName:"to Clipboard"]})};let Wg=/*#__PURE__*/o.styled.button.withConfig({displayName:"StyledCopytoClipboardButton",componentId:"sc-46f4187f-0"})(["display:flex;align-items:center;gap:6px;&&{margin:8px 2px;font-size:14px;color:",";font-weight:",";transition:color 350ms ease;:focus,:active{background-color:transparent;border:none;outline:none;box-shadow:none;}:hover{color:",";}:active{color:'var(--privy-color-foreground)';font-weight:medium;}@media (max-width:440px){margin:12px 2px;}}svg{width:14px;height:14px;}"],(e=>e.$justCopied?"var(--privy-color-foreground)":e.color||"var(--privy-color-foreground-3)"),(e=>e.$justCopied?"medium":"normal"),(e=>e.$justCopied?"var(--privy-color-foreground)":"var(--privy-color-foreground-2)"));const Dg=/*#__PURE__*/o.styled.img.withConfig({displayName:"StyledLogo",componentId:"sc-68c1b1ea-0"})(["&&{height:",";width:",";border-radius:16px;margin-bottom:12px;}"],(e=>"sm"===e.size?"65px":"140px"),(e=>"sm"===e.size?"65px":"140px"));let Rg=e=>{if(!r.isHex(e))return e;try{let t=r.hexToString(e);return t.includes("�")?e:t}catch{return e}},Og=e=>{try{let t=S.base64.decode(e),n=(new TextDecoder).decode(t);return n.includes("�")?e:n}catch{return e}},Bg=e=>JSON.stringify(e,null,2),Ug=t=>{let{types:n,primaryType:r,...a}=t.typedData;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(qg,{data:a}),/*#__PURE__*/e.jsx(Lg,{text:Bg(t.typedData),itemName:"full payload to clipboard"})," "]})};const zg=({method:t,messageData:n,copy:r,iconUrl:a,isLoading:i,success:o,walletProxyIsLoading:s,errorMessage:l,isCancellable:c,onSign:d,onCancel:u,onClose:p})=>/*#__PURE__*/e.jsx(Ca,{title:r.title,subtitle:r.description,showClose:!0,onClose:p,icon:T.Edit,iconVariant:"subtle",helpText:l?/*#__PURE__*/e.jsx($g,{children:l}):void 0,primaryCta:{label:r.buttonText,onClick:d,disabled:i||o||s,loading:i},secondaryCta:c?{label:"Not now",onClick:u,disabled:i||o||s}:void 0,watermark:!0,children:/*#__PURE__*/e.jsxs(Ka,{children:[a?/*#__PURE__*/e.jsx(Dg,{style:{alignSelf:"center"},size:"sm",src:a,alt:"app image"}):null,/*#__PURE__*/e.jsxs(Vg,{children:["personal_sign"===t&&/*#__PURE__*/e.jsx(Gg,{children:Rg(n)}),"eth_signTypedData_v4"===t&&/*#__PURE__*/e.jsx(Ug,{typedData:n}),"solana_signMessage"===t&&/*#__PURE__*/e.jsx(Gg,{children:Og(n)})]})]})}),Hg={component:()=>{let{authenticated:t}=w.usePrivyContext(),{initializeWalletProxy:r,closePrivyModal:i}=s.usePrivyInternal(),{navigate:o,data:l,onUserCloseViaDialogOrKeybindRef:c}=Zn(),[d,u]=n.useState(!0),[p,h]=n.useState(""),[g,m]=n.useState(),[y,f]=n.useState(null),[x,v]=n.useState(!1);n.useEffect((()=>{t||o(du)}),[t]),n.useEffect((()=>{r(3e4).then((e=>{u(!1),e||(h("An error has occurred, please try again."),m(new an(new rn(p,a.ProviderErrors.E32603_DEFAULT_INTERNAL_ERROR.eipCode))))}))}),[]);let{method:C,data:b,confirmAndSign:j,onSuccess:k,onFailure:T,uiOptions:A}=l.signMessage,S={title:A?.title||"Sign message",description:A?.description||"Signing this message will not cost you any fees.",buttonText:A?.buttonText||"Sign and continue"},E=e=>{e?k(e):T(g||new an(new rn("The user rejected the request.",a.ProviderErrors.E4001_USER_REJECTED_REQUEST.eipCode))),i({shouldCallAuthOnSuccess:!1}),setTimeout((()=>{f(null),h(""),m(void 0)}),200)};c.current=()=>{E(y)};/*#__PURE__*/return e.jsx(zg,{method:C,messageData:b,copy:S,iconUrl:A?.iconUrl&&"string"==typeof A.iconUrl?A.iconUrl:void 0,isLoading:x,success:null!==y,walletProxyIsLoading:d,errorMessage:p,isCancellable:A?.isCancellable,onSign:async()=>{v(!0),h("");try{let e=await j();f(e),v(!1),setTimeout((()=>{E(e)}),rt)}catch(e){console.error(e),h("An error has occurred, please try again."),m(new an(new rn(p,a.ProviderErrors.E32603_DEFAULT_INTERNAL_ERROR.eipCode))),v(!1)}},onCancel:()=>E(null),onClose:()=>E(y)})}};let Vg=/*#__PURE__*/o.styled.div.withConfig({displayName:"MessageContainer",componentId:"sc-e01d451f-0"})(["flex:1;display:flex;flex-direction:column;gap:16px;"]),$g=/*#__PURE__*/o.styled.p.withConfig({displayName:"ErrorText",componentId:"sc-e01d451f-1"})(["&&{margin:0;width:100%;text-align:center;color:var(--privy-color-error-dark);font-size:14px;line-height:22px;}"]),qg=/*#__PURE__*/o.styled(mh).withConfig({displayName:"StyledDisplayJsonTree",componentId:"sc-e01d451f-2"})(["margin-top:0;"]),Gg=/*#__PURE__*/o.styled(hh).withConfig({displayName:"StyledMessage",componentId:"sc-e01d451f-3"})(["margin-top:0;"]);exports.ASSOCIATED_TOKEN_PROGRAM_ID="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",exports.AccountNotFoundScreen=xs,exports.Address=ws,exports.AffirmativeConsentScreen=tl,exports.AllowlistRejectionScreen=nc,exports.Apple=mt,exports.AuthenticateWithWalletScreen=fc,exports.AwaitingEvmToSolBridgingScreen=bg,exports.AwaitingExternalTransferScreen=Wp,exports.AwaitingPasswordlessCodeScreen=Ed,exports.AwaitingSolToEvmBridgingScreen=Rp,exports.BASE_ACCOUNT_DATA_URI=en,exports.Blobby=hn,exports.BlobbyFooter=xr,exports.BottomPusherContainer=Va,exports.Box=Pu,exports.BrowserExtensionWallet=mn,exports.ButtonLoader=Ar,exports.CLIENT_ANALYTICS_ID_KEY="privy:caid",exports.CODE_VERIFIER_KEY=ot,exports.COINBASE_WALLET_DATA_URI=Jt,exports.CONNECTIONS_HISTORY_KEY=lt,exports.CUSTOMER_ACCESS_TOKEN_COOKIE_KEY="privy-token",exports.CUSTOMER_ACCESS_TOKEN_STORAGE_KEY="privy:token",exports.CaptchaError=$t,exports.CaptchaProvider=({children:t,id:r,captchaSiteKey:a,captchaEnabled:i})=>{let o=n.useRef(null),[s,l]=n.useState(),[c,d]=n.useState(),[u,p]=n.useState(!1),g=n.useMemo((()=>i?u||s||c?!u||s||c?s&&!c?{status:"success",token:s}:c?{status:"error",error:c}:{status:"ready"}:{status:"loading"}:{status:"ready"}:{status:"disabled"}),[i,s,c,u]);/*#__PURE__*/return e.jsx(Vt.Provider,{value:{...g,ref:o,enabled:i,siteKey:a,appId:r,setToken:l,setError:d,setExecuting:p,remove(){i&&(o.current?.remove(),p(!1),d(void 0),l(void 0))},reset(){i&&(o.current?.reset(),p(!1),d(void 0),l(void 0))},execute(){i&&(p(!0),o.current?.execute())},async waitForResult(){if(!i)return"";try{return await function(e,{interval:t=100,timeout:n=5e3}={}){return new Promise(((r,a)=>{let i,o=0,s=()=>{o>=n?a("Max attempts reached without result"):(i=e(),o+=t,null==i?setTimeout(s,t):r(i))};s()}))}((()=>o.current?.getResponse()),{interval:200,timeout:2e4})}catch(e){throw new $t("Captcha failed",null,h.PrivyErrorCode.CAPTCHA_TIMEOUT)}}},children:t})},exports.CaptchaScreen=ac,exports.CenteredItem=$a,exports.CenteredItemWithGap=Ya,exports.CenteredItemWithPadding=Ga,exports.CenteredScreenHeader=Bi,exports.Chip=bc,exports.Chip$1=Ml,exports.CloseButton=Pl,exports.ConnectEmailForm=Ld,exports.ConnectOnlyLandingScreen=xc,exports.ConnectOnlyStatusScreen=Hd,exports.ConnectOrCreateScreen=wd,exports.ConnectPhoneNumberForm=Jc,exports.ConnectionLoader=Cr,exports.ConnectionStatusScreen=mc,exports.CopyableText=cl,exports.CopytoClipboardButton=Lg,exports.DEFAULT_API_TIMEOUT_MS=2e4,exports.DEFAULT_PRIVY_API_URL="https://auth.privy.io",exports.DEFAULT_SUCCESS_SCREEN_DURATION_MS=rt,exports.DEFAULT_SUCCESS_SCREEN_EXTRA_LONG_DURATION_MS=at,exports.DEFAULT_SUCCESS_SCREEN_LONG_DURATION_MS=2500,exports.DEFAULT_TOKENS_DATA=Fa,exports.DEPRECATED_REFRESH_TOKEN="deprecated",exports.Discord=yt,exports.EmailUpdateForm=Cl,exports.EmbeddedButton=Rr,exports.EmbeddedWalletConnectingScreen=Mg,exports.EmbeddedWalletKeyExportScreen=Ig,exports.EmbeddedWalletOnAccountCreateScreen=el,exports.ErrorMessage=vl,exports.ErrorScreen=Ds,exports.ErrorScreenView=Ws,exports.EthereumNullConnector=gn,exports.EthereumWalletConnector=un,exports.Farcaster=kc,exports.FarcasterConnectStatusScreen=Dc,exports.FundingMethodSelectionScreen=lh,exports.Github=ft,exports.Google=xt,exports.Grow=ar,exports.HEADLESS_OAUTH_KEY="privy:headless_oauth",exports.Header=Il,exports.Hide=pr,exports.IDENTITY_TOKEN_COOKIE_KEY="privy-id-token",exports.IDENTITY_TOKEN_STORAGE_KEY="privy:id_token",exports.InjectedWalletIcon=Bd,exports.InputContainerForm=jl,exports.Instagram=vt,exports.JUPITER_SWAP_PROGRAM_IDS=["JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"],exports.LAMPORTS_PER_SOL=Ma,exports.LabelSm=op,exports.LabelXs=Sc,exports.LandingScreen=du,exports.Line=wt,exports.LinkConflictScreen=Ks,exports.LinkedIn=Ct,exports.Loader=kr,exports.LoginMethodButton=dr,exports.LoginMethodIconWrapper=ur,exports.ManualTransferScreen=ch,exports.Metamask=yn,exports.ModalFooter=wr,exports.ModalHeader=Hr,exports.ModalProvider=t=>{let r=Gn(),a=t.authenticated,[i,o]=n.useState(t.initialScreen);n.useEffect((()=>{a||!t.initialScreen||t.initialScreen.isUnauthenticatedScreem||t.setInitialScreen(null)}),[a]);let s=n.useRef(null);n.useEffect((()=>{t.open||(s.current=null)}),[t.open]),n.useEffect((()=>{s.current=null}),[t.initialScreen]);let l={app:r,data:t.data,setModalData:t.setModalData,currentScreen:t.initialScreen,lastScreen:i,navigate:(e,n=!0)=>{t.setInitialScreen(e),n&&o(t.initialScreen)},navigateBack:()=>{t.setInitialScreen(i)},resetNavigation:()=>{t.setInitialScreen(null),o(null)},onUserCloseViaDialogOrKeybindRef:s};/*#__PURE__*/return e.jsxs(Yn.Provider,{value:l,children:[("string"==typeof r.appearance.logo||"img"===r.appearance.logo?.type)&&/*#__PURE__*/e.jsx(Mn,{src:"string"==typeof r.appearance.logo?r.appearance.logo:r.appearance.logo.props.src}),t.children]})},exports.MoonpayStatusScreen=Jp,exports.NetworkIcon=up,exports.NeutralSpinner=Kr,exports.OAUTH_DISABLE_SIGNUP_KEY="privy:oauth_disable_signup",exports.ON_RAMP_COMPLETE_ANALYTICS_EVENT=Bu,exports.OpenLinkButton=Tc,exports.PRIVY_ACCESS_TOKEN_STORAGE_KEY="privy:pat",exports.Phantom=fn,exports.PrimaryButton=Pr,exports.PrivyAppConfigProvider=({children:t,client:r,legacyClient:a,clientConfig:i,appClientId:o})=>{let[s,l]=n.useState(null),c=n.useMemo((()=>Hn(s??Vn,i,!!s,"undefined"!=typeof window?window.location.origin:void 0,o)),[s,i,o]);return n.useEffect((()=>{if(!s)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:n,defaultChain:r,externalWallets:a,...i}=e;return{...i,...n?{supportedChains:n.map((e=>e.id))}:void 0,...r?{defaultChain:r.id}:void 0,...a?{walletConnect:a.walletConnect?{enabled:a.walletConnect.enabled}:void 0,coinbaseWallet:a.coinbaseWallet,solana:{connectors:a.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(i),t=function(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t,a=0;a<e.length;a++)n=Math.imul(n^(t=e.charCodeAt(a)),2654435761),r=Math.imul(r^t,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&(r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)}(JSON.stringify(e)).toString(),n=`privy:sent:${s.id}:${t}`;localStorage.getItem(n)||(a.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(n,"t"))}),[i,s]),n.useEffect((()=>{s||(async()=>{try{await r.initialize();let e=r.app.getConfig();e.custom_api_url&&a.updateApiUrl(e.custom_api_url),l(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/e.jsx(qn.Provider,{value:{appConfig:c,isServerConfigLoaded:!!s},children:t})},exports.PrivyEventsContext=Jn,exports.PrivyIframeError=Fi,exports.PrivyPluginProvider=({children:t})=>{let r=n.useRef({});/*#__PURE__*/return e.jsx(Xl.Provider,{value:{plugins:r},children:t})},exports.PrivyProviderRpcError=an,exports.PrivyProxyProvider=pn,exports.QrCode=xl,exports.RAYDIUM_SWAP_PROGRAM_IDS=["CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C","CPMDWBwJDtYax9qW7AyRuVC19Cc4L4Vcy4n2BHAbHkCW"],exports.REFRESH_TOKEN_COOKIE_KEY="privy-refresh-token",exports.REFRESH_TOKEN_STORAGE_KEY="privy:refresh_token",exports.RecentlyUsedAccountProvider=({children:t})=>{let r=Gn(),[a,i]=n.useState({});return tr("login",{onComplete:({loginAccount:e})=>{e&&"passkey"!==e.type&&"cross_app"!==e.type&&("wallet"!==e.type||"privy"!==e.walletClientType)&&(Ye.put(ts(r.id),e.type),"wallet"===e.type?(Ye.put(ns(r.id),e.walletClientType),Ye.put(rs(r.id),e.chainType),i({accountType:e.type,walletClientType:e.walletClientType,chainType:e.chainType})):(Ye.del(ns(r.id)),Ye.del(rs(r.id)),i({accountType:e.type})))}}),n.useEffect((()=>{if(!r.id)return;let e=Ye.get(ts(r.id)),t=Ye.get(ns(r.id)),n=Ye.get(rs(r.id));e&&i("wallet"===e?{accountType:e,walletClientType:t,chainType:n}:{accountType:e})}),[r.id]),/*#__PURE__*/e.jsx(es.Provider,{value:a,children:t})},exports.RefactorSpacerBottom=Ja,exports.RefactorSpacerTop=Xa,exports.Row=ip,exports.Rows=ap,exports.RunEffectOnce=nt,exports.SESSION_COOKIE_KEY="privy-session",exports.SOLANA_FUNDING_PLUGIN_ID=Dp,exports.SOLANA_LEDGER_PLUGIN_ID=ec,exports.STATE_CODE_KEY=it,exports.SYSTEM_PROGRAM_ID="11111111111111111111111111111111",exports.ScreenLayout=Ca,exports.ScrollContainer=Fl,exports.SecondaryButton=Fr,exports.SendSolanaTransactionScreenView=({img:t,title:r,subtitle:i,cta:o,instructions:s,network:l,blockExplorerUrl:c,isMissingFunds:d,submitError:u,parseError:p,total:h,swap:g,transactingWalletAddress:m,fee:y,balance:f,disabled:x,isSubmitting:v,isPreparing:w,isTokenPriceLoading:b,onClick:j,onClose:k,onBack:T})=>{let A=w||b,[S,E]=n.useState(!1);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(Hr,{onClose:k,backFn:T}),t&&/*#__PURE__*/e.jsx(Lh,{children:t}),/*#__PURE__*/e.jsx(Cu,{style:{marginTop:t?"1.5rem":0},children:r}),/*#__PURE__*/e.jsx(wu,{children:i}),/*#__PURE__*/e.jsxs(ap,{style:{marginTop:"2rem",marginBottom:".5rem"},children:[(h||A)&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount"}),/*#__PURE__*/e.jsx(lp,{$isLoading:A,children:h})]}),g&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Swap"}),/*#__PURE__*/e.jsx(lp,{children:g})]}),l&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Network"}),/*#__PURE__*/e.jsx(lp,{children:l})]}),(y||A)&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(lp,{$isLoading:A,children:y})]})]}),/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(xh,{onClick:()=>E((e=>!e)),children:[/*#__PURE__*/e.jsx("span",{children:"Advanced"}),/*#__PURE__*/e.jsx(C.ChevronDownIcon,{height:"16px",width:"16px",strokeWidth:"2",style:{transition:"all 300ms",transform:S?"rotate(180deg)":void 0}})]})}),S&&/*#__PURE__*/e.jsx(e.Fragment,{children:s.map(((t,n)=>"sol-transfer"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Transfer ",t.withSeed?"with seed":""]})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount"}),/*#__PURE__*/e.jsxs(lp,{children:[a.formatTokenAmount({amount:t.value,decimals:t.token.decimals})," ",t.token.symbol]})]}),!!t.toAccount&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Destination"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.toAccount,url:c})})]})]},n):"spl-transfer"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Transfer ",t.token.symbol]})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount"}),/*#__PURE__*/e.jsx(lp,{children:t.value.toString()})]}),!!t.fromAta&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Source"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.fromAta,url:c})})]}),!!t.toAta&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Destination"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.toAta,url:c})})]}),!!t.token.address&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.token.address,url:c})})]})]},n):"ata-creation"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsx(Sc,{children:"Create token account"})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Program ID"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.program,url:c})})]}),!!t.owner&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Owner"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.owner,url:c})})]})]},n):"create-account"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Create account ",t.withSeed?"with seed":""]})}),!!t.account&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Account"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.account,url:c})})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount"}),/*#__PURE__*/e.jsxs(lp,{children:[a.formatTokenAmount({amount:t.value,decimals:9})," SOL"]})]})]},n):"spl-init-account"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsx(Sc,{children:"Initialize token account"})}),!!t.account&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Account"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.account,url:c})})]}),!!t.mint&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Mint"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mint,url:c})})]}),!!t.owner&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Owner"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.owner,url:c})})]})]},n):"spl-close-account"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsx(Sc,{children:"Close token account"})}),!!t.source&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Source"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.source,url:c})})]}),!!t.destination&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Destination"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.destination,url:c})})]}),!!t.owner&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Owner"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.owner,url:c})})]})]},n):"spl-sync-native"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsx(Sc,{children:"Sync native"})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Program ID"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.program,url:c})})]})]},n):"raydium-swap-base-input"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Raydium swap"," ",t.tokenIn&&t.tokenOut?`${t.tokenIn.symbol} → ${t.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount in"}),/*#__PURE__*/e.jsx(lp,{children:t.amountIn.toString()})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Minimum amount out"}),/*#__PURE__*/e.jsx(lp,{children:t.minimumAmountOut.toString()})]}),t.mintIn&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token in"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintIn,url:c})})]}),t.mintOut&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token out"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintOut,url:c})})]})]},n):"raydium-swap-base-output"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Raydium swap"," ",t.tokenIn&&t.tokenOut?`${t.tokenIn.symbol} → ${t.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Max amount in"}),/*#__PURE__*/e.jsx(lp,{children:t.maxAmountIn.toString()})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount out"}),/*#__PURE__*/e.jsx(lp,{children:t.amountOut.toString()})]}),t.mintIn&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token in"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintIn,url:c})})]}),t.mintOut&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token out"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintOut,url:c})})]})]},n):"jupiter-swap-shared-accounts-route"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Jupiter swap"," ",t.tokenIn&&t.tokenOut?`${t.tokenIn.symbol} → ${t.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"In amount"}),/*#__PURE__*/e.jsx(lp,{children:t.inAmount.toString()})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Quoted out amount"}),/*#__PURE__*/e.jsx(lp,{children:t.quotedOutAmount.toString()})]}),t.mintIn&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token in"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintIn,url:c})})]}),t.mintOut&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token out"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintOut,url:c})})]})]},n):"jupiter-swap-exact-out-route"===t.type?/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsx(ip,{children:/*#__PURE__*/e.jsxs(Sc,{children:["Jupiter swap"," ",t.tokenIn&&t.tokenOut?`${t.tokenIn.symbol} → ${t.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Quoted in amount"}),/*#__PURE__*/e.jsx(lp,{children:t.quotedInAmount.toString()})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Amount out"}),/*#__PURE__*/e.jsx(lp,{children:t.outAmount.toString()})]}),t.mintIn&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token in"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintIn,url:c})})]}),t.mintOut&&/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Token out"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.mintOut,url:c})})]})]},n):/*#__PURE__*/e.jsxs(Mh,{children:[/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Program ID"}),/*#__PURE__*/e.jsx(lp,{children:/*#__PURE__*/e.jsx(ws,{address:t.program,url:c})})]}),/*#__PURE__*/e.jsxs(ip,{children:[/*#__PURE__*/e.jsx(op,{children:"Data"}),/*#__PURE__*/e.jsx(lp,{children:t.discriminator})]})]},n)))}),/*#__PURE__*/e.jsx(ar,{}),u?/*#__PURE__*/e.jsx(vl,{style:{marginTop:"2rem"},children:u.message}):p?/*#__PURE__*/e.jsx(vl,{style:{marginTop:"2rem"},children:Fh}):null,/*#__PURE__*/e.jsx(_h,{$useSmallMargins:!(!p&&!u),title:"Your wallet",address:m,balance:f,errMsg:w||p||u||!d?void 0:"Add funds on Solana to complete transaction."}),/*#__PURE__*/e.jsx(Pr,{style:{marginTop:"1rem"},loading:v,disabled:x||w,onClick:j,children:o}),/*#__PURE__*/e.jsx(xr,{})]})},exports.SendTransactionScreen=wg,exports.SignRequestScreen=Hg,exports.SiweFlow=St,exports.SiwsFlow=It,exports.SolanaNullConnector=An,exports.SolanaPriceDisplay=({quantities:t,tokenPrice:n,tokenSymbol:a="SOL",tokenDecimals:i=9})=>{let o=t.reduce(((e,t)=>e+t),0n),s=n&&"SOL"===a&&9===i?La(o,n):void 0,l="SOL"===a&&9===i?Da(o):`${r.formatUnits(o,i)} ${a}`;/*#__PURE__*/return e.jsx(Ba,{children:s?/*#__PURE__*/e.jsx(e.Fragment,{children:"<$0.01"===s?
|
|
27
|
+
/*#__PURE__*/e.jsxs(Ha,{children:[/*#__PURE__*/e.jsx(za,{children:"<"}),"$0.01"]}):s}):l})},exports.SolanaWalletConnector=Tn,exports.Spotify=bt,exports.Subtitle=wu,exports.TOKEN_2022_PROGRAM_ID="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb",exports.TOKEN_PROGRAM_ID="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",exports.TelegramAuthFlow=class{async authenticate(){if(!this.api)throw new h.PrivyClientError("Auth flow has no API instance");try{return await this.api.post(h.telegramAccountAuthenticatePath,{captcha_token:this.meta.captchaToken,telegram_auth_result:this.meta.telegramAuthResult,telegram_web_app_data:this.meta.telegramWebAppData,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(e){throw h.formatApiError(e)}}async link(){if(!this.api)throw new h.PrivyClientError("Auth flow has no API instance");try{return await this.api.post(h.telegramAccountLinkPath,{telegram_auth_result:this.meta.telegramAuthResult,telegram_web_app_data:this.meta.telegramWebAppData})}catch(e){throw h.formatApiError(e)}}constructor(e,t=!1){this.meta={disableSignup:!1},this.meta={captchaToken:e,disableSignup:!1},this.meta.disableSignup=t}},exports.TelegramAuthScreen=ld,exports.Tiktok=jt,exports.Title=Cu,exports.TodoItem=$d,exports.TodoList=Vd,exports.TransactionDetails=ki,exports.TransactionErrorView=Oh,exports.TransferFromWalletScreen=Bp,exports.Twitter=kt,exports.UseWalletsContext=Ii,exports.UserLimitReachedScreen=pc,exports.VERSION="3.0.1",exports.Value=lp,exports.WALLET_PROXY_TIMEOUT=3e4,exports.WalletCards=kl,exports.WalletConnectV2WalletConnector=Xn,exports.WalletConnector=cn,exports.WalletIcon=_l,exports.WalletInfoCard=Ru,exports.WalletLink=bi,exports.areWalletArraysEqual=ln,exports.close=()=>{let e=Ll.getState().resolvers;e||console.warn("useActiveWalletStore: Called close while modal was not open"),Ll.setState({isModalOpen:!1}),e?.resolve({wallet:Ll.getState().wallet})},exports.constructURL=Bt,exports.convertInitDataRawToTelegramWebAppData=Yt,exports.createCodeVerifier=ut,exports.createStateCode=pt,exports.createWalletAtIndex=Zi,exports.deriveCodeChallengeFromCodeVerifier=ht,exports.detectCompletingTelegramFlow=function(){let e;return(e=function(){let e=new URLSearchParams(window.location.search),t=Number(e.get("id")||""),n=e.get("hash"),r=Number(e.get("auth_date")||""),a=e.get("first_name");if(t&&a&&r&&n)return Object.fromEntries(e.entries())}())?(Zt(),{flowType:"login-url",authData:e}):(e=function(){let e=window.location.hash;if(!e||!e.startsWith("#tgWebAppData"))return;let t=Yt(e.replace("#tgWebAppData=","")),{user:n,auth_date:r,hash:a}=t;return n&&r&&a?t:void 0}())?(Zt(),{flowType:"web-app",authData:e}):void 0},exports.detectInjectedConnectors=async function({store:e,walletList:t,externalWalletConfig:n,walletChainType:r,timeout:a=3e3}){let i=!1,o=window;return new Promise((s=>{function l(){if(i)return;i=!0,window.removeEventListener("ethereum#initialized",l);let a=e.getProviders();console.debug("Detected injected providers:",a.map((e=>e.info)));let o=[];for(let e of a)t.includes("coinbase_wallet")&&"com.coinbase.wallet"===e.info.rdns||"solana-only"===r&&"app.phantom"===e.info.rdns||o.push({type:e.info.name.toLowerCase().replace(/\s/g,"_"),eip6963InjectedProvider:e});if("solana-only"!==r)for(let e of function(){let e=window,t=e.ethereum;if(!t)return[];let n=[];if(t.providers?.length)for(let e of t.providers)e&&n.push(e);return n.push(e.ethereum),n}()){let t=Pt(e);if(!a.some((e=>e.info.name===t))){if(Nt(e,!0)&&!o.find((e=>"metamask"===e.type))){o.push({type:"metamask",legacyInjectedProvider:e});continue}if("Phantom"===t&&!o.find((e=>"phantom"===e.type))){o.push({type:"phantom",legacyInjectedProvider:e});continue}if("Coinbase Wallet"===t&&!o.find((e=>"coinbase_wallet"===e.type&&"smartWalletOnly"!==n.coinbaseWallet?.config?.preference?.options))){o.push({type:"coinbase_wallet",legacyInjectedProvider:e});continue}o.find((e=>"unknown_browser_extension"===e.type))||o.push({type:"unknown_browser_extension",legacyInjectedProvider:e})}}s(o)}o.ethereum?l():(window.addEventListener("ethereum#initialized",l,{once:!0}),setTimeout((()=>{l()}),a))}))},exports.e=gt,exports.e$1=function(){try{let e="privy:__session_storage__test",t=new Ge;return t.put(e,"blobby"),t.del(e),!0}catch(e){return!1}},exports.e$2=_i,exports.e$3=Ud,exports.embeddedWalletRecoveryScreen=Tu,exports.emitPrivyEvent=nr,exports.errorIndicatesMaxMfaRetries=function(e){return!!Li(e)&&"mfa_verification_max_attempts_reached"===e.type},exports.errorIndicatesMfaCanceled=function(e){return!!function(e){let t=e.type;return"string"==typeof t&&"client_error"===t}(e)&&"MFA canceled"===e.message},exports.errorIndicatesMfaRateLimit=function(e){return!(!Li(e)||!e.message.includes("code 429"))},exports.errorIndicatesMfaTimeout=function(e){return!!Li(e)&&"mfa_timeout"===e.type},exports.errorIndicatesMfaVerificationFailed=function(e){return!!Li(e)&&"missing_or_invalid_mfa"===e.type},exports.errorIndicatesRecoveryIsNeeded=Wi,exports.fetchWalletBalance=Uu,exports.formatChainIdToCAIP2=zt,exports.formatConnectorError=nn,exports.formatErc20TokenAmount=np,exports.formatWalletAddress=Wt,exports.generateTypedDataWithDomainType=e=>{let t={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},n=e.types.EIP712Domain??Object.entries(e.domain).map((([e,n])=>{if(null!=n&&"string"==typeof e&&e in t)return{name:e,type:t[e]}})).filter((e=>void 0!==e));return{...e,types:{...e.types,EIP712Domain:n}}},exports.getChainName=zu,exports.getCodeVerifier=function(){let e=Ye.get(ot);if(!e)throw new h.PrivyClientError("Authentication error.");return e},exports.getEntropyDetailsForUser=Qt,exports.getErc20Balance=Vu,exports.getErc20TokenInfo=Xu,exports.getFormattedUsdFromLamports=La,exports.getGuestCredentialStorageKey=e=>`privy:guest:${e}`,exports.getJsonRpcEndpointFromChain=Ft,exports.getNativeCurrencyFromLamports=Da,exports.getNativeCurrencyFromWei=Ia,exports.getPrivyWalletsWithFilter=Yi,exports.getProviderAccessTokenStorageKey=e=>`privy:cross-app:${e}`,exports.getPublicClient=Mt,exports.getRpcTimeout=dn,exports.getUsdcMintAddress=Hu,exports.getWalletConfigForConnector=wn,exports.i=Cg,exports.invokeUntilSettled=Ot,exports.isBaseConnectedEthereumWallet=sn,exports.isBaseConnectedSolanaWallet=function(e){return"solana"===e.type},exports.isEthereumWalletConnector=function(e){return"ethereum"===e.chainType},exports.isSolanaWalletConnector=Sn,exports.l=zl,exports.loadConnectionHistory=bn,exports.mobileWalletsConfig=vn,exports.open=async()=>{let e,t,n=new Promise(((n,r)=>{e=n,t=r}));return Wl.setState({}),Ll.setState({isModalOpen:!0,resolvers:{resolve:e,reject:t}}),await n},exports.openHref=tt,exports.parseAdditionalSigners=e=>e?.map((e=>({signer_id:e.signerId,override_policy_ids:e.policyIds}))),exports.prepareSiweMessageWithNonce=At,exports.prepareSiwsMessageWithNonce=Et,exports.prepareTransactionRequest=Ni,exports.privyEventsDefault={login:{onComplete:[],onError:[]},logout:{onSuccess:[]},connectWallet:{onSuccess:[],onError:[]},connectOrCreateWallet:{onSuccess:[],onError:[]},createWallet:{onSuccess:[],onError:[]},linkAccount:{onSuccess:[],onError:[]},update:{onSuccess:[],onError:[]},configureMfa:{onMfaRequired:[]},setWalletPassword:{onSuccess:[],onError:[]},setWalletRecovery:{onSuccess:[],onError:[]},signMessage:{onSuccess:[],onError:[]},signTypedData:{onSuccess:[],onError:[]},sendTransaction:{onSuccess:[],onError:[]},signTransaction:{onSuccess:[],onError:[]},accessToken:{onAccessTokenGranted:[],onAccessTokenRemoved:[]},oAuthAuthorization:{onOAuthTokenGrant:[]},fundWallet:{onUserExited:[]},fundSolanaWallet:{onUserExited:[]},customAuth:{onAuthenticated:[],onUnauthenticated:[]}},exports.randomBytes=dt,exports.s=Ye,exports.setActiveWallet=Dl,exports.setExternalWalletState=In,exports.shouldCreateEmbeddedEthWallet=ps,exports.shouldCreateEmbeddedSolWallet=gs,exports.shouldProceedtoEmbeddedWalletCreationFlow=ys,exports.stripUrlOAuthParamsAndRemoveStateCode=Tt,exports.toActiveWalletKey=Rl,exports.toDisplayFromAccountType=Jo,exports.toEmbeddedWalletSetRecoveryScreen=ku,exports.toHex=e=>"string"==typeof e?e:"0x"+e.toString(16),exports.toSolanaWalletClientType=kn,exports.triggerPopup=Di,exports.updateBalance=(e,t,n)=>{Wl.setState((r=>({[e]:{...r[e],[t]:n}})))},exports.useActiveWalletStore=Ll,exports.useAppConfig=Gn,exports.useBalance=(e,t)=>Wl((n=>n[e]?.[t])),exports.useCaptcha=qt,exports.useEmitPrivyEvent=rr,exports.useGetSolPrice=Si,exports.useGetTokenPrice=Ei,exports.useIsModalOpen=()=>Ll((e=>e.isModalOpen)),exports.useIsServerConfigLoaded=()=>{let{isServerConfigLoaded:e}=n.useContext(qn);return e},exports.usePlugins=Jl,exports.usePrivyEventSubscription=tr,exports.usePrivyModal=Zn,exports.useRecentlyUsedLogin=as,exports.useRegisterPlugin=(...e)=>{let{plugins:t}=n.useContext(Xl);n.useEffect((()=>{for(let n of e)t.current[n.id]=n;return()=>{for(let n of e)delete t.current[n.id]}}),[t])},exports.useWalletBalance=Ou,exports.useWallets=Pi,exports.validateEmail=Lt;
|