@bluxcc/react 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +2 -2
  2. package/dist/assets/Icons.d.ts +14 -1
  3. package/dist/assets/bluxLogo.d.ts +3 -1
  4. package/dist/assets/logos.d.ts +12 -6
  5. package/dist/chains.d.ts +8 -0
  6. package/dist/components/Button/index.d.ts +13 -6
  7. package/dist/components/CardItem/index.d.ts +14 -0
  8. package/dist/components/Input/OTPInput.d.ts +8 -0
  9. package/dist/components/Input/index.d.ts +16 -0
  10. package/dist/components/Modal/Header/index.d.ts +3 -3
  11. package/dist/components/Modal/index.d.ts +3 -5
  12. package/dist/components/Transaction/History/index.d.ts +10 -0
  13. package/dist/components/Transaction/Summery/index.d.ts +9 -0
  14. package/dist/constants/index.d.ts +6 -4
  15. package/dist/containers/BluxModal/content.d.ts +11 -0
  16. package/dist/containers/BluxModal/index.d.ts +7 -0
  17. package/dist/containers/ConnectModal/content.d.ts +11 -0
  18. package/dist/containers/ConnectModal/index.d.ts +2 -1
  19. package/dist/containers/Pages/Activity/index.d.ts +3 -0
  20. package/dist/containers/Pages/ConfirmCode/index.d.ts +3 -0
  21. package/dist/containers/Pages/OnBoarding/index.d.ts +7 -0
  22. package/dist/containers/Pages/Profile/index.d.ts +3 -0
  23. package/dist/containers/Pages/Send/index.d.ts +3 -0
  24. package/dist/containers/Pages/SignTransaction/index.d.ts +3 -0
  25. package/dist/containers/Pages/Successful/index.d.ts +3 -0
  26. package/dist/containers/Pages/Waiting/index.d.ts +3 -0
  27. package/dist/context/provider.d.ts +3 -4
  28. package/dist/hooks/useAccount.d.ts +12 -0
  29. package/dist/hooks/useBlux.d.ts +4 -2
  30. package/dist/index.cjs.js +1 -1
  31. package/dist/index.cjs.js.map +1 -1
  32. package/dist/index.d.ts +3 -0
  33. package/dist/index.esm.js +1 -1
  34. package/dist/index.esm.js.map +1 -1
  35. package/dist/networks.d.ts +8 -0
  36. package/dist/types/index.d.ts +114 -23
  37. package/dist/useStellar/index.d.ts +2 -0
  38. package/dist/useStellar/useBalance.d.ts +8 -0
  39. package/dist/utils/BN.d.ts +3 -0
  40. package/dist/utils/capitalizeFirstLetter.d.ts +2 -0
  41. package/dist/utils/getBorderRadius.d.ts +2 -1
  42. package/dist/utils/getContrastColor.d.ts +2 -0
  43. package/dist/utils/getHorizonServer.d.ts +6 -0
  44. package/dist/utils/getInitialHeight.d.ts +2 -0
  45. package/dist/utils/getNetworkByPassphrase.d.ts +1 -2
  46. package/dist/utils/getTransactionDetails.d.ts +6 -0
  47. package/dist/utils/handleIcons.d.ts +2 -1
  48. package/dist/utils/handleLogos.d.ts +3 -0
  49. package/dist/utils/humanizeAmount.d.ts +3 -0
  50. package/dist/utils/initializeRabetMobile.d.ts +2 -1
  51. package/dist/utils/mappedWallets.d.ts +4 -3
  52. package/dist/utils/setWalletNetwork.d.ts +3 -0
  53. package/dist/utils/signTransactionHandler.d.ts +3 -0
  54. package/dist/utils/stellar/getExplorerUrl.d.ts +2 -0
  55. package/dist/utils/stellar/getNetworkByPassphrase.d.ts +2 -0
  56. package/dist/utils/stellar/getNetworkPassphrase.d.ts +2 -0
  57. package/dist/utils/stellar/getStellarServer.d.ts +6 -0
  58. package/dist/utils/stellar/getTransactionDetails.d.ts +7 -0
  59. package/dist/utils/stellar/signTransaction.d.ts +3 -0
  60. package/dist/utils/stellar/submitTransaction.d.ts +3 -0
  61. package/dist/utils/submitTransaction.d.ts +2 -0
  62. package/dist/wallets/configs/albedoConfig.d.ts +2 -2
  63. package/dist/wallets/configs/freighterConfig.d.ts +2 -2
  64. package/dist/wallets/configs/lobstrConfig.d.ts +2 -2
  65. package/dist/wallets/configs/rabetConfig.d.ts +2 -2
  66. package/dist/wallets/configs/xbullConfig.d.ts +2 -2
  67. package/dist/wallets/walletsConfig.d.ts +2 -2
  68. package/package.json +4 -8
package/dist/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
1
  import './tailwind.css';
2
+ export * from './networks';
3
+ export * from './useStellar';
2
4
  export { useBlux } from './hooks/useBlux';
5
+ export { defaultAppearance } from './constants';
3
6
  export { BluxProvider } from './context/provider';
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import e,{useState as t,useEffect as a,useContext as n,useRef as r,createContext as i}from"react";import l from"clsx";import s from"@albedo-link/intent";import o,{signTransaction as c}from"@stellar/freighter-api";import{isConnected as Q,getPublicKey as d,signTransaction as B}from"@lobstrco/signer-extension-api";import{xBullWalletConnect as F}from"@creit.tech/xbull-wallet-connect";!function(e,t){void 0===t&&(t={});var a=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===a&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.right-4{right:1rem}.z-40{z-index:40}.z-\\[9999\\]{z-index:9999}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mb-1{margin-bottom:.25rem}.mb-4{margin-bottom:1rem}.mr-4{margin-right:1rem}.mt-3{margin-top:.75rem}.mt-8{margin-top:2rem}.flex{display:flex}.inline-flex{display:inline-flex}.size-6{height:1.5rem;width:1.5rem}.h-10{height:2.5rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-20{height:5rem}.\\!w-\\[360px\\]{width:360px!important}.w-10{width:2.5rem}.w-20{width:5rem}.w-4{width:1rem}.w-full{width:100%}.flex-1{flex:1 1 0%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-fadeIn{animation:fadeIn .5s ease-in-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.animate-fadeOut{animation:fadeOut .5s ease-in-out}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-\\[10px\\]{gap:10px}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-2{border-width:2px}.border-none{border-style:none}.border-lightRed-300{--tw-border-opacity:1;border-color:rgb(255 102 102/var(--tw-border-opacity,1))}.border-primary-100{--tw-border-opacity:1;border-color:rgb(205 206 238/var(--tw-border-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.bg-primary-200{--tw-bg-opacity:1;background-color:rgb(162 164 246/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-opacity-\\[0\\.05\\]{--tw-bg-opacity:0.05}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-4{padding-top:1rem}.pb-4,.py-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pl-2{padding-left:.5rem}.pr-4{padding-right:1rem}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.hover\\:bg-primary-100:hover{--tw-bg-opacity:1;background-color:rgb(205 206 238/var(--tw-bg-opacity,1))}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRhaWx3aW5kLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxpQkFBQSx1QkFBYyxDQUFkLHVCQUFjLENBQWQsa0JBQWMsQ0FBZCxrQkFBYyxDQUFkLGFBQWMsQ0FBZCxhQUFjLENBQWQsYUFBYyxDQUFkLGNBQWMsQ0FBZCxjQUFjLENBQWQsWUFBYyxDQUFkLFlBQWMsQ0FBZCxpQkFBYyxDQUFkLHFDQUFjLENBQWQsNkJBQWMsQ0FBZCw0QkFBYyxDQUFkLDJCQUFjLENBQWQsY0FBYyxDQUFkLG1CQUFjLENBQWQscUJBQWMsQ0FBZCxzQkFBYyxDQUFkLHVCQUFjLENBQWQsaUJBQWMsQ0FBZCwwQkFBYyxDQUFkLDJCQUFjLENBQWQsbUNBQWMsQ0FBZCxpQ0FBYyxDQUFkLDBCQUFjLENBQWQscUJBQWMsQ0FBZCw2QkFBYyxDQUFkLFdBQWMsQ0FBZCxpQkFBYyxDQUFkLGVBQWMsQ0FBZCxnQkFBYyxDQUFkLGlCQUFjLENBQWQsYUFBYyxDQUFkLGVBQWMsQ0FBZCxZQUFjLENBQWQsa0JBQWMsQ0FBZCxvQkFBYyxDQUFkLDBCQUFjLENBQWQsd0JBQWMsQ0FBZCx5QkFBYyxDQUFkLDBCQUFjLENBQWQsc0JBQWMsQ0FBZCx1QkFBYyxDQUFkLHdCQUFjLENBQWQscUJBQWMsQ0FBZCxtQkFBYyxDQUFkLHFCQUFjLENBQWQsb0JBQWMsQ0FBZCxvQkFBYyxDQUFkLFdBQUEsdUJBQWMsQ0FBZCx1QkFBYyxDQUFkLGtCQUFjLENBQWQsa0JBQWMsQ0FBZCxhQUFjLENBQWQsYUFBYyxDQUFkLGFBQWMsQ0FBZCxjQUFjLENBQWQsY0FBYyxDQUFkLFlBQWMsQ0FBZCxZQUFjLENBQWQsaUJBQWMsQ0FBZCxxQ0FBYyxDQUFkLDZCQUFjLENBQWQsNEJBQWMsQ0FBZCwyQkFBYyxDQUFkLGNBQWMsQ0FBZCxtQkFBYyxDQUFkLHFCQUFjLENBQWQsc0JBQWMsQ0FBZCx1QkFBYyxDQUFkLGlCQUFjLENBQWQsMEJBQWMsQ0FBZCwyQkFBYyxDQUFkLG1DQUFjLENBQWQsaUNBQWMsQ0FBZCwwQkFBYyxDQUFkLHFCQUFjLENBQWQsNkJBQWMsQ0FBZCxXQUFjLENBQWQsaUJBQWMsQ0FBZCxlQUFjLENBQWQsZ0JBQWMsQ0FBZCxpQkFBYyxDQUFkLGFBQWMsQ0FBZCxlQUFjLENBQWQsWUFBYyxDQUFkLGtCQUFjLENBQWQsb0JBQWMsQ0FBZCwwQkFBYyxDQUFkLHdCQUFjLENBQWQseUJBQWMsQ0FBZCwwQkFBYyxDQUFkLHNCQUFjLENBQWQsdUJBQWMsQ0FBZCx3QkFBYyxDQUFkLHFCQUFjLENBQWQsbUJBQWMsQ0FBZCxxQkFBYyxDQUFkLG9CQUFjLENBQWQsb0JBQWMsQ0FBZCxnRUFBYyxDQUFkLGlCQUFBLHNCQUFjLENBQWQscUJBQWMsQ0FBZCxlQUFBLGVBQWMsQ0FBZCxXQUFBLDZCQUFjLENBQWQsNEJBQWMsQ0FBZCx1Q0FBYyxDQUFkLGdIQUFjLENBQWQsOEJBQWMsQ0FBZCxlQUFjLENBQWQsZUFBYyxDQUFkLGFBQWMsQ0FBZCxVQUFjLENBQWQsS0FBQSxtQkFBYyxDQUFkLFFBQWMsQ0FBZCxHQUFBLG9CQUFjLENBQWQsYUFBYyxDQUFkLFFBQWMsQ0FBZCxvQkFBQSx3Q0FBYyxDQUFkLGdDQUFjLENBQWQsa0JBQUEsaUJBQWMsQ0FBZCxtQkFBYyxDQUFkLEVBQUEsYUFBYyxDQUFkLHVCQUFjLENBQWQsU0FBQSxrQkFBYyxDQUFkLGtCQUFBLDRCQUFjLENBQWQsbUdBQWMsQ0FBZCxhQUFjLENBQWQsOEJBQWMsQ0FBZCxNQUFBLGFBQWMsQ0FBZCxRQUFBLGFBQWMsQ0FBZCxhQUFjLENBQWQsaUJBQWMsQ0FBZCx1QkFBYyxDQUFkLElBQUEsYUFBYyxDQUFkLElBQUEsU0FBYyxDQUFkLE1BQUEsd0JBQWMsQ0FBZCxvQkFBYyxDQUFkLGFBQWMsQ0FBZCxzQ0FBQSw2QkFBYyxDQUFkLGFBQWMsQ0FBZCxtQkFBYyxDQUFkLGNBQWMsQ0FBZCwrQkFBYyxDQUFkLG1CQUFjLENBQWQsc0JBQWMsQ0FBZCxtQkFBYyxDQUFkLFFBQWMsQ0FBZCxTQUFjLENBQWQsY0FBQSxtQkFBYyxDQUFkLHVGQUFBLHlCQUFjLENBQWQsNEJBQWMsQ0FBZCxxQkFBYyxDQUFkLGdCQUFBLFlBQWMsQ0FBZCxpQkFBQSxlQUFjLENBQWQsU0FBQSx1QkFBYyxDQUFkLHdEQUFBLFdBQWMsQ0FBZCxjQUFBLDRCQUFjLENBQWQsbUJBQWMsQ0FBZCw0QkFBQSx1QkFBYyxDQUFkLDZCQUFBLHlCQUFjLENBQWQsWUFBYyxDQUFkLFFBQUEsaUJBQWMsQ0FBZCxtREFBQSxRQUFjLENBQWQsU0FBQSxRQUFjLENBQWQsZ0JBQUEsU0FBYyxDQUFkLFdBQUEsZUFBYyxDQUFkLFFBQWMsQ0FBZCxTQUFjLENBQWQsT0FBQSxTQUFjLENBQWQsU0FBQSxlQUFjLENBQWQsbURBQUEsYUFBYyxDQUFkLFNBQWMsQ0FBZCx5Q0FBQSxhQUFjLENBQWQsU0FBYyxDQUFkLHFCQUFBLGNBQWMsQ0FBZCxVQUFBLGNBQWMsQ0FBZCwrQ0FBQSxhQUFjLENBQWQscUJBQWMsQ0FBZCxVQUFBLFdBQWMsQ0FBZCxjQUFjLENBQWQsMkNBQUEsWUFBYyxDQUVkLE9BQUEsY0FBbUIsQ0FBbkIsVUFBQSxpQkFBbUIsQ0FBbkIsVUFBQSxpQkFBbUIsQ0FBbkIsU0FBQSxPQUFtQixDQUFuQixTQUFBLFVBQW1CLENBQW5CLE1BQUEsVUFBbUIsQ0FBbkIsWUFBQSxZQUFtQixDQUFuQixNQUFBLG1CQUFtQixDQUFuQixnQkFBbUIsQ0FBbkIsTUFBQSxvQkFBbUIsQ0FBbkIsTUFBQSxrQkFBbUIsQ0FBbkIsTUFBQSxpQkFBbUIsQ0FBbkIsTUFBQSxpQkFBbUIsQ0FBbkIsTUFBQSxlQUFtQixDQUFuQixNQUFBLFlBQW1CLENBQW5CLGFBQUEsbUJBQW1CLENBQW5CLFFBQUEsYUFBbUIsQ0FBbkIsWUFBbUIsQ0FBbkIsTUFBQSxhQUFtQixDQUFuQixNQUFBLGFBQW1CLENBQW5CLE1BQUEsV0FBbUIsQ0FBbkIsTUFBQSxXQUFtQixDQUFuQixlQUFBLHFCQUFtQixDQUFuQixNQUFBLFlBQW1CLENBQW5CLE1BQUEsVUFBbUIsQ0FBbkIsS0FBQSxVQUFtQixDQUFuQixRQUFBLFVBQW1CLENBQW5CLFFBQUEsV0FBbUIsQ0FBbkIsV0FBQSw2TEFBbUIsQ0FBbkIsa0JBQUEsR0FBQSxTQUFtQixDQUFuQixHQUFBLFNBQW1CLENBQUEsQ0FBbkIsZ0JBQUEsZ0NBQW1CLENBQW5CLG1CQUFBLEdBQUEsU0FBbUIsQ0FBbkIsR0FBQSxTQUFtQixDQUFBLENBQW5CLGlCQUFBLGlDQUFtQixDQUFuQixnQkFBQSxHQUFBLHVCQUFtQixDQUFBLENBQW5CLGNBQUEsaUNBQW1CLENBQW5CLGdCQUFBLGNBQW1CLENBQW5CLGdCQUFBLGNBQW1CLENBQW5CLGFBQUEsd0JBQW1CLENBQW5CLHFCQUFtQixDQUFuQixnQkFBbUIsQ0FBbkIsVUFBQSxxQkFBbUIsQ0FBbkIsY0FBQSxrQkFBbUIsQ0FBbkIsZ0JBQUEsc0JBQW1CLENBQW5CLGlCQUFBLDZCQUFtQixDQUFuQixjQUFBLFFBQW1CLENBQW5CLHlDQUFBLHNCQUFtQixDQUFuQixvREFBbUIsQ0FBbkIsdURBQW1CLENBQW5CLGlCQUFBLGVBQW1CLENBQW5CLGNBQUEsb0JBQW1CLENBQW5CLFFBQUEsZ0JBQW1CLENBQW5CLFVBQUEsZ0JBQW1CLENBQW5CLGFBQUEsaUJBQW1CLENBQW5CLHFCQUFBLHFCQUFtQixDQUFuQix3REFBbUIsQ0FBbkIsb0JBQUEscUJBQW1CLENBQW5CLHdEQUFtQixDQUFuQixVQUFBLGlCQUFtQixDQUFuQixrREFBbUIsQ0FBbkIsYUFBQSxpQkFBbUIsQ0FBbkIsd0RBQW1CLENBQW5CLGdCQUFBLGlCQUFtQixDQUFuQix3REFBbUIsQ0FBbkIsWUFBQSxpQkFBbUIsQ0FBbkIsc0RBQW1CLENBQW5CLHNCQUFBLG9CQUFtQixDQUFuQixNQUFBLG1CQUFtQixDQUFuQixvQkFBbUIsQ0FBbkIsTUFBQSxvQkFBbUIsQ0FBbkIsaUJBQW1CLENBQW5CLE1BQUEsZ0JBQW1CLENBQW5CLFlBQUEsbUJBQW1CLENBQW5CLE1BQUEsc0JBQW1CLENBQW5CLE1BQUEsa0JBQW1CLENBQW5CLE1BQUEsa0JBQW1CLENBQW5CLGFBQUEsaUJBQW1CLENBQW5CLGVBQUEsY0FBbUIsQ0FBbkIsV0FBQSxjQUFtQixDQUFuQixrQkFBbUIsQ0FBbkIsU0FBQSxrQkFBbUIsQ0FBbkIsbUJBQW1CLENBQW5CLFNBQUEsaUJBQW1CLENBQW5CLG1CQUFtQixDQUFuQixTQUFBLGlCQUFtQixDQUFuQixtQkFBbUIsQ0FBbkIsYUFBQSxlQUFtQixDQUFuQixlQUFBLGVBQW1CLENBQW5CLFlBQUEsbUJBQW1CLENBQW5CLCtDQUFtQixDQUFuQixRQUFBLGdMQUFtQixDQUFuQixZQUFBLHdCQUFtQixDQUFuQixxSkFBbUIsQ0FBbkIsNklBQW1CLENBQW5CLHFLQUFtQixDQUFuQixrREFBbUIsQ0FBbkIsbUJBQUEsd0JBQW1CLENBQW5CLHlGQUFtQixDQUFuQixrREFBbUIsQ0FBbkIsY0FBQSx1QkFBbUIsQ0FBbkIsY0FBQSx1QkFBbUIsQ0FBbkIsYUFBQSxrREFBbUIsQ0FBbkIsVUFBQSxpREFBbUIsQ0FGbkIsNkJBQUEsaUJBR0EsQ0FIQSx3REFHQSIsImZpbGUiOiJ0YWlsd2luZC5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyJAdGFpbHdpbmQgYmFzZTtcbkB0YWlsd2luZCBjb21wb25lbnRzO1xuQHRhaWx3aW5kIHV0aWxpdGllcztcbiJdfQ== */');const C={none:"0px",full:"32px",sm:"4px",md:"8px",lg:"12px"},m=e=>C[e]||"0px",w=()=>e.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("mask",{id:"mask0_0_3021",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},e.createElement("rect",{width:"20",height:"20",fill:"#D9D9D9"})),e.createElement("g",{mask:"url(#mask0_0_3021)"},e.createElement("path",{d:"M9.16601 14.1662H10.8327V9.1662H9.16601V14.1662ZM9.99935 7.49953C10.2355 7.49953 10.4334 7.41967 10.5931 7.25995C10.7528 7.10023 10.8327 6.90231 10.8327 6.6662C10.8327 6.43009 10.7528 6.23217 10.5931 6.07245C10.4334 5.91273 10.2355 5.83286 9.99935 5.83286C9.76324 5.83286 9.56532 5.91273 9.4056 6.07245C9.24588 6.23217 9.16601 6.43009 9.16601 6.6662C9.16601 6.90231 9.24588 7.10023 9.4056 7.25995C9.56532 7.41967 9.76324 7.49953 9.99935 7.49953ZM9.99935 18.3329C8.84657 18.3329 7.76324 18.1141 6.74935 17.6766C5.73546 17.2391 4.85352 16.6454 4.10352 15.8954C3.35352 15.1454 2.75977 14.2634 2.32227 13.2495C1.88477 12.2356 1.66602 11.1523 1.66602 9.99953C1.66602 8.84675 1.88477 7.76342 2.32227 6.74953C2.75977 5.73564 3.35352 4.8537 4.10352 4.1037C4.85352 3.3537 5.73546 2.75995 6.74935 2.32245C7.76324 1.88495 8.84657 1.6662 9.99935 1.6662C11.1521 1.6662 12.2355 1.88495 13.2493 2.32245C14.2632 2.75995 15.1452 3.3537 15.8952 4.1037C16.6452 4.8537 17.2389 5.73564 17.6764 6.74953C18.1139 7.76342 18.3327 8.84675 18.3327 9.99953C18.3327 11.1523 18.1139 12.2356 17.6764 13.2495C17.2389 14.2634 16.6452 15.1454 15.8952 15.8954C15.1452 16.6454 14.2632 17.2391 13.2493 17.6766C12.2355 18.1141 11.1521 18.3329 9.99935 18.3329ZM9.99935 16.6662C11.8605 16.6662 13.4368 16.0204 14.7285 14.7287C16.0202 13.437 16.666 11.8606 16.666 9.99953C16.666 8.13842 16.0202 6.56203 14.7285 5.27036C13.4368 3.9787 11.8605 3.33287 9.99935 3.33287C8.13824 3.33287 6.56185 3.9787 5.27018 5.27036C3.97852 6.56203 3.33268 8.13842 3.33268 9.99953C3.33268 11.8606 3.97852 13.437 5.27018 14.7287C6.56185 16.0204 8.13824 16.6662 9.99935 16.6662Z",fill:"#1C1B1F"}))),u=()=>e.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("mask",{id:"mask0_117_204",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},e.createElement("rect",{width:"20",height:"20",fill:"#D9D9D9"})),e.createElement("g",{mask:"url(#mask0_117_204)"},e.createElement("path",{d:"M6.67929 18.0448L5.49658 16.862L12.3587 9.99996L5.49658 3.13788L6.67929 1.95517L14.7241 9.99996L6.67929 18.0448Z",fill:"#5F6367"}))),p=()=>e.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("mask",{id:"mask0_170_30135",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"25"},e.createElement("rect",{y:"0.5",width:"24",height:"24",fill:"#D9D9D9"})),e.createElement("g",{mask:"url(#mask0_170_30135)"},e.createElement("path",{d:"M16 22.5L6 12.5L16 2.5L17.775 4.275L9.55 12.5L17.775 20.725L16 22.5Z",fill:"#5F6367"}))),h=()=>e.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("mask",{id:"mask0_170_30138",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"25"},e.createElement("rect",{y:"0.5",width:"24",height:"24",fill:"#D9D9D9"})),e.createElement("g",{mask:"url(#mask0_170_30138)"},e.createElement("path",{d:"M4.8 21.5L3 19.7L10.2 12.5L3 5.3L4.8 3.5L12 10.7L19.2 3.5L21 5.3L13.8 12.5L21 19.7L19.2 21.5L12 14.3L4.8 21.5Z",fill:"#5F6367"}))),b=()=>e.createElement("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"animate-spin"},e.createElement("path",{d:"M10 20.5C8.63333 20.5 7.34167 20.2375 6.125 19.7125C4.90833 19.1875 3.84583 18.4708 2.9375 17.5625C2.02917 16.6542 1.3125 15.5917 0.7875 14.375C0.2625 13.1583 0 11.8667 0 10.5C0 9.11667 0.2625 7.82083 0.7875 6.6125C1.3125 5.40417 2.02917 4.34583 2.9375 3.4375C3.84583 2.52917 4.90833 1.8125 6.125 1.2875C7.34167 0.7625 8.63333 0.5 10 0.5C10.2833 0.5 10.5208 0.595833 10.7125 0.7875C10.9042 0.979167 11 1.21667 11 1.5C11 1.78333 10.9042 2.02083 10.7125 2.2125C10.5208 2.40417 10.2833 2.5 10 2.5C7.78333 2.5 5.89583 3.27917 4.3375 4.8375C2.77917 6.39583 2 8.28333 2 10.5C2 12.7167 2.77917 14.6042 4.3375 16.1625C5.89583 17.7208 7.78333 18.5 10 18.5C12.2167 18.5 14.1042 17.7208 15.6625 16.1625C17.2208 14.6042 18 12.7167 18 10.5C18 10.2167 18.0958 9.97917 18.2875 9.7875C18.4792 9.59583 18.7167 9.5 19 9.5C19.2833 9.5 19.5208 9.59583 19.7125 9.7875C19.9042 9.97917 20 10.2167 20 10.5C20 11.8667 19.7375 13.1583 19.2125 14.375C18.6875 15.5917 17.9708 16.6542 17.0625 17.5625C16.1542 18.4708 15.0958 19.1875 13.8875 19.7125C12.6792 20.2375 11.3833 20.5 10 20.5Z",fill:"#5F6367"})),x=({icon:t,onInfo:a,onBack:n,modalHeader:r,closeButton:i=!1,onClose:l})=>e.createElement("div",{className:"w-full flex items-center justify-between h-16"},e.createElement("div",null,"info"===t?e.createElement("button",{onClick:a,className:"size-6 flex justify-center items-center hover:bg-primary-100 rounded-full transition duration-300"},e.createElement(w,null)):e.createElement("button",{onClick:n,className:"cursor-pointer flex justify-center items-center"},e.createElement(p,null))),e.createElement("p",{className:"text-lg font-semibold text-center flex-1 select-none"},r),i?e.createElement("button",{onClick:l,className:"cursor-pointer"},e.createElement(h,null)):e.createElement("div",{className:"w-4"})),E=({isClosing:t,onClose:a})=>e.createElement("div",{className:l("fixed inset-0 z-40 bg-black bg-opacity-[0.05]",t?"animate-fadeOut":"animate-fadeIn"),onClick:a}),U=({isOpen:i,onClose:s=()=>{},onBack:o,onInfo:c,children:Q,className:d,modalHeader:B,icon:F,initialHeight:C,closeButton:w=!1})=>{const u=n(q),{isOpening:p,isClosing:h,hasTransition:b,handleClose:U,setHasTransition:L}=(e=>{const[n,r]=t({isOpening:!0,isClosing:!1,hasTransition:!1});return a((()=>{if(e&&n.isOpening){const e=setTimeout((()=>{r((e=>({...e,isOpening:!1})))}),300);return()=>clearTimeout(e)}}),[e,n.isOpening]),{...n,setHasTransition:e=>r((t=>({...t,hasTransition:e}))),handleClose:e=>{r((e=>({...e,isClosing:!0}))),setTimeout((()=>{r((e=>({...e,isClosing:!1}))),e()}),300)}}})(i),[f,g]=t(null),[k,y]=t(!1),W=r(null),N=r(!0),v=r(Q),M=r(C),Z=u?.value.appearance||ee;a((()=>{if(!i)return g(null),y(!1),N.current=!0,v.current=Q,void(M.current=C)}),[i,C]),a((()=>{if(!i||!W.current)return;const e=()=>{const e=W.current?.offsetHeight;if(e)return N.current?(M.current=e,void(N.current=!1)):void(e!==M.current&&(g(e),y(!0),M.current=e))};k&&L(!0);const t=new ResizeObserver(e);return t.observe(W.current),e(),()=>t.disconnect()}),[i,Q]);const D=N.current?C:f??M.current;return i?e.createElement(e.Fragment,null,!u?.value.isDemo&&e.createElement(E,{isClosing:h,onClose:()=>U(s)}),e.createElement("div",{className:l("absolute inset-0 flex items-center justify-center z-[9999]",h&&"animate-fadeOut"),onClick:e=>e.target===e.currentTarget&&U(s)},e.createElement("div",{className:l("overflow-hidden border",d,Z.font&&`!font-[${Z.font}]`),style:{height:`${D}px`,transform:p?"scale(0.98)":"scale(1)",opacity:p?"0":"1",transition:p?"transform 300ms ease-out, opacity 300ms ease-out":b?"height 300ms ease-in-out":"none",backgroundColor:Z.background,color:Z.textColor,fontFamily:Z.font,borderRadius:m(Z.cornerRadius)}},e.createElement("div",{ref:W,className:"px-6 pb-4"},e.createElement(x,{icon:F,onInfo:c,onBack:o,modalHeader:B,closeButton:w,onClose:()=>U(s)}),Q)))):null},L=({onClick:t,className:a,disabled:r,children:i})=>{const s=n(q),o=s?.value.appearance||ee;return e.createElement("button",{disabled:r,onClick:t,style:{borderRadius:m(o.cornerRadius)},className:l("w-full relative flex items-center h-14 border border-primary-100 transition-colors duration-200 my-2 pl-2 pr-4",a),onMouseEnter:e=>{e.currentTarget.style.borderColor=o.accent},onMouseLeave:e=>{e.currentTarget.style.borderColor="#cdceee"}},i)},f=()=>{const t=n(q),a=t?.value.appearance||ee;return e.createElement("div",{className:"flex flex-col items-center justify-center pb-5"},e.createElement("div",{className:"w-20 h-20 bg-primary-200 rounded-full"}),e.createElement("p",{className:"text-xl font-medium mt-3 mb-1"},"Connected to ",t?.value.user.wallet?.name),e.createElement("p",{className:"text-base cursor-pointer",style:{color:a.accent},onClick:()=>{var e;e=t?.value.user.wallet?.address,navigator.clipboard.writeText(e)}},((e,t=8)=>e.slice(0,t)+"..."+e.slice(-t))(t?.value.user.wallet?.address)),e.createElement(L,{disabled:!0,onClick:()=>{t?.setValue((e=>({...e,user:{wallet:null},openModal:!1,isConnecting:!1,isAuthenticated:!1})))},className:"mt-8 font-medium w-full inline-flex justify-center items-center gap-[10px] border-none text-white bg-gray-400 cursor-disabled"},"Disconnect"))},g=()=>e.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("g",{clipPath:"url(#clip0_44_43)"},e.createElement("path",{d:"M60 0H20C8.9543 0 0 8.9543 0 20V60C0 71.0457 8.9543 80 20 80H60C71.0457 80 80 71.0457 80 60V20C80 8.9543 71.0457 0 60 0Z",fill:"white"}),e.createElement("path",{d:"M41.1831 23H39.8169L26 55.8213L26.0419 55.8375H29.7281L32.4944 49.2707C38.2396 51.2168 44.4666 51.1844 50.1924 49.1784L52.9958 55.8375H54.9581L55 55.8213L41.1831 23ZM41.2105 49.4666C38.412 49.4666 35.6312 49.0116 32.9777 48.1228L41.3619 28.202L49.7107 48.0321C46.9767 48.9809 44.1041 49.4666 41.2105 49.4666Z",fill:"#0691B7"})),e.createElement("defs",null,e.createElement("clipPath",{id:"clip0_44_43"},e.createElement("rect",{width:"80",height:"80",rx:"40",fill:"white"})))),k=()=>e.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("g",{clipPath:"url(#clip0_54_32)"},e.createElement("path",{d:"M60 0H20C8.9543 0 0 8.9543 0 20V60C0 71.0457 8.9543 80 20 80H60C71.0457 80 80 71.0457 80 60V20C80 8.9543 71.0457 0 60 0Z",fill:"white"}),e.createElement("g",{clipPath:"url(#clip1_54_32)"},e.createElement("path",{d:"M39.898 61.6041C38.776 62.2821 37.324 62.3741 36.07 61.6801L32.782 59.8601C29.404 57.9961 28.194 53.7401 30.088 50.3761L33.282 44.6981L38.256 59.5521C38.556 60.4561 39.156 61.1621 39.896 61.6061L39.898 61.6041ZM50.746 32.0461L46.51 44.6961L39.898 32.9501L49.154 16.4981C49.614 15.6801 50.854 15.9381 50.95 16.8681L51.664 23.5781C51.972 26.4341 51.656 29.3221 50.744 32.0461H50.746Z",fill:"#B8BAC4"}),e.createElement("path",{d:"M46.5099 44.6961L41.5399 59.5501C41.2379 60.4501 40.6399 61.1541 39.8999 61.6021C39.1579 61.1581 38.5539 60.4521 38.2579 59.5501L33.2839 44.6961L39.8979 32.9501L46.5099 44.6961Z",fill:"black"}),e.createElement("path",{d:"M39.8979 32.9499L33.2799 44.6959L29.0459 32.0459C28.1339 29.3199 27.8179 26.4339 28.1259 23.5779L28.8399 16.8679C28.9399 15.9359 30.1759 15.6779 30.6339 16.4979L39.8979 32.9499ZM47.0099 59.8599L43.7239 61.6799C42.4639 62.3739 41.0179 62.2799 39.8979 61.6019C40.6399 61.1539 41.2379 60.4499 41.5379 59.5499L46.5079 44.6959L49.7019 50.3739C51.5959 53.7379 50.3859 57.9939 47.0099 59.8599Z",fill:"#B8BAC4"}))),e.createElement("defs",null,e.createElement("clipPath",{id:"clip0_54_32"},e.createElement("rect",{width:"80",height:"80",rx:"40",fill:"white"})),e.createElement("clipPath",{id:"clip1_54_32"},e.createElement("rect",{width:"24",height:"48",fill:"white",transform:"translate(28.0001 16)"})))),y=()=>e.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("g",{clipPath:"url(#clip0_44_59)"},e.createElement("path",{d:"M60 0H20C8.9543 0 0 8.9543 0 20V60C0 71.0457 8.9543 80 20 80H60C71.0457 80 80 71.0457 80 60V20C80 8.9543 71.0457 0 60 0Z",fill:"#533ABB"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.1224 25.6667C34.9877 21.2577 30.9854 18 26.2222 18C20.5766 18 16 22.5766 16 28.2222C16 33.8678 20.5766 38.4444 26.2222 38.4444C30.9854 38.4444 34.9877 35.1868 36.1224 30.7778H44.963V39.2963H50.0741V30.7778H53.4814V39.2963H58.5926V30.7778H62V25.6667H36.1224ZM31.3333 28.2222C31.3333 31.045 29.045 33.3333 26.2222 33.3333C23.3995 33.3333 21.1111 31.045 21.1111 28.2222C21.1111 25.3995 23.3995 23.1111 26.2222 23.1111C29.045 23.1111 31.3333 25.3995 31.3333 28.2222Z",fill:"white"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M41.8776 56.3333C43.0123 60.7423 47.0146 64 51.7778 64C57.4234 64 62 59.4233 62 53.7777C62 48.1321 57.4234 43.5555 51.7778 43.5555C47.0146 43.5555 43.0123 46.8132 41.8776 51.2222H33.037V42.7036H27.9259V51.2222H24.5186V42.7036H19.4075V51.2222H16V56.3333H41.8776ZM46.6667 53.7777C46.6667 50.955 48.955 48.6666 51.7778 48.6666C54.6005 48.6666 56.8889 50.955 56.8889 53.7777C56.8889 56.6005 54.6005 58.8888 51.7778 58.8888C48.955 58.8888 46.6667 56.6005 46.6667 53.7777Z",fill:"white"})),e.createElement("defs",null,e.createElement("clipPath",{id:"clip0_44_59"},e.createElement("rect",{width:"80",height:"80",rx:"40",fill:"white"})))),W=()=>e.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("g",{clipPath:"url(#clip0_24_16)"},e.createElement("path",{d:"M28 0H4C1.79086 0 0 1.79086 0 4V28C0 30.2091 1.79086 32 4 32H28C30.2091 32 32 30.2091 32 28V4C32 1.79086 30.2091 0 28 0Z",fill:"#14142B"}),e.createElement("path",{d:"M12.5884 10.1192C12.9996 9.40702 13.4773 9.11038 13.9622 9.0815C14.946 9.01648 17.1453 10.6363 16.4495 11.5981L17.753 13.8721C18.5858 14.57 19.4291 15.1197 20.2932 15.4847C20.1317 16.1609 20.5078 16.4032 20.8871 16.6418C20.3812 15.7561 21.3719 15.2642 21.9058 16.1429C22.4574 16.9166 22.6051 17.7194 22.2748 18.3448C21.7863 19.2813 20.4759 19.9753 19.882 20.8467C21.0911 19.7513 22.7175 19.8743 23.3605 18.6014C23.7609 17.8131 22.7597 15.4776 22.2924 14.6894C21.5685 13.4781 20.6656 13.8288 20.5637 14.2193C19.6045 13.695 18.7508 12.8634 17.8794 12.1691C18.2869 11.8113 18.5189 11.2942 18.073 11.0157C17.1593 10.4374 16.0984 8.70912 14.7211 8.37272C14.5839 8.3388 14.4443 8.32045 14.3055 8.32045C13.5876 8.32045 12.8856 8.80732 12.5884 10.1192Z",fill:"#4E4B66"}),e.createElement("path",{d:"M14.9389 30.75C16.0205 30.75 17.0747 30.6048 18.0739 30.3353C11.9225 31.9888 8.16245 24.9459 12.8379 19.9934C11.1163 19.5272 10.0098 17.7916 10.1185 15.7197C0.829113 22.5315 5.23505 30.75 14.9389 30.75ZM18.0757 30.3348C18.0854 30.332 18.0949 30.3298 18.1045 30.327C18.095 30.3295 18.0852 30.3323 18.0757 30.3348Z",fill:"#C19CFC"}),e.createElement("path",{d:"M16.0876 8.23906C16.4884 8.49938 16.8641 8.84646 17.212 9.19711C20.469 8.48496 18.4101 5.33196 20.1035 4.09918C17.9639 4.84393 19.3095 8.33651 16.0876 8.23906Z",fill:"#C19CFC"}),e.createElement("path",{d:"M10.758 10.7953L12.5884 10.1192C12.1422 6.43112 17.2156 4.9343 15.5011 1.25C15.4273 5.4223 10.3468 5.5164 10.758 10.7953Z",fill:"#C19CFC"}),e.createElement("path",{d:"M15.3921 18.8004C16.3019 18.381 17.2085 17.8131 18.1185 18.0807C17.1205 17.4265 15.8945 17.741 14.6577 17.8277C12.9959 17.9434 11.3096 17.7987 10.1184 15.7198C10.6245 18.3484 12.9679 19.9175 15.3921 18.8004Z",fill:"#C19CFC"}),e.createElement("path",{d:"M14.7245 5.41512C13.688 6.80365 12.3495 8.1487 12.5884 10.1191C12.9431 8.5535 13.8744 8.16295 14.7211 8.37265C16.0983 8.70905 17.1593 10.4373 18.0729 11.0157C18.5189 11.2942 18.2869 11.8112 17.8794 12.169C18.7508 12.8633 19.6045 13.6949 20.5636 14.2193C20.6656 13.8287 21.5685 13.4781 22.2924 14.6893C22.7597 15.4775 23.7609 17.813 23.3605 18.6013C22.7174 19.8742 21.091 19.7512 19.882 20.8466C19.1443 19.48 17.6688 19.1328 16.1756 18.9124C16.7834 18.4459 17.4017 18.0265 18.1185 18.0807C17.2085 17.813 16.3019 18.3809 15.3921 18.8003C12.9679 19.9175 10.6245 18.3483 10.1184 15.7197C10.0097 17.7915 11.1162 19.5271 12.8379 19.9934C8.15458 24.9541 11.935 32.012 18.1045 30.327C23.3676 28.8877 27.25 23.9526 27.25 18.0807C27.25 12.8742 24.1965 8.4017 19.833 6.45282C20.0334 7.60615 20.2863 8.71972 18.266 10.2456C17.6301 9.69595 16.9204 8.77782 16.0876 8.23902C17.9673 8.29692 18.2906 7.13255 18.663 6.00452C17.4629 5.61227 16.21 5.41307 14.9507 5.41307C14.8753 5.41307 14.7999 5.41382 14.7245 5.41512ZM14.6367 11.6486C14.8686 11.6954 15.104 11.8907 15.3184 12.1113C15.6662 12.4692 15.9965 12.5309 16.4179 12.1548L17.753 13.872L16.4494 11.598C16.432 11.7788 16.2879 11.8221 16.1124 11.8112C15.8068 11.7919 15.4213 11.5727 15.0168 11.5725C14.8913 11.5725 14.764 11.5936 14.6367 11.6486ZM20.8871 16.6417C21.1014 16.2693 21.3928 16.027 21.9058 16.1428C21.7087 15.8184 21.4494 15.6809 21.2262 15.6809C20.8443 15.6809 20.5678 16.0829 20.8871 16.6417Z",fill:"#C19CFC"}),e.createElement("path",{d:"M13.7759 6.65183C13.0345 7.65315 12.4232 8.73095 12.5884 10.1193C12.9431 8.55365 13.8744 8.1631 14.7211 8.3728C16.0983 8.7092 17.1593 10.4375 18.073 11.0159C18.5189 11.2943 18.2869 11.8114 17.8794 12.1692C18.7508 12.8635 19.6045 13.6951 20.5637 14.2194C20.6656 13.8289 21.5685 13.4782 22.2924 14.6895C22.7597 15.4777 23.7609 17.8132 23.3605 18.6015C22.7175 19.8743 21.091 19.7514 19.882 20.8468C19.1443 19.4802 17.6688 19.133 16.1756 18.9126C16.7834 18.4461 17.4017 18.0267 18.1185 18.0808C17.2085 17.8132 16.3019 18.3811 15.3921 18.8005C12.9679 19.9176 10.6245 18.3485 10.1184 15.7199C10.0097 17.7917 11.1162 19.5273 12.8379 19.9935C9.78828 23.2224 10.3259 27.3405 12.7745 29.358C19.6398 30.7463 26.1045 25.3555 26.1045 18.0808C26.1045 13.5903 23.6029 9.70343 19.9525 7.81245C19.8857 8.53923 19.4992 9.3166 18.266 10.2458C17.6301 9.6961 16.9204 8.778 16.0876 8.23918C17.3349 8.27535 17.9005 7.77648 18.2449 7.10368C17.1735 6.7622 16.0535 6.59073 14.9327 6.59073C14.5466 6.59073 14.1603 6.61098 13.7759 6.65183Z",fill:"#14142B"}),e.createElement("path",{d:"M12.8379 19.9934C8.15458 24.9541 11.935 32.012 18.1045 30.327C11.0461 30.645 11.7452 22.3943 16.2213 20.0477C17.8304 20.2719 19.4885 20.5577 20.2863 22.0326C21.4913 20.9409 23.1179 21.0601 23.7644 19.7872C24.0244 19.2776 23.6943 18.117 23.3042 17.1477C23.4588 17.7446 23.5184 18.2941 23.3605 18.6013C22.7174 19.8742 21.091 19.7512 19.882 20.8466C19.1443 19.48 17.6688 19.1328 16.1756 18.9124C16.7834 18.4459 17.4017 18.0265 18.1185 18.0807C17.2085 17.813 16.3019 18.3809 15.3921 18.8003C12.9679 19.9175 10.6245 18.3483 10.1184 15.7197C10.0097 17.7915 11.1162 19.5271 12.8379 19.9934Z",fill:"#262338"}),e.createElement("path",{d:"M11.6567 10.5833L13.487 10.2405C13.0409 6.55242 17.59 5.66667 15.8595 2.25C15.8595 5.66667 11.0561 5.62132 11.6567 10.5833Z",fill:"#14142B"})),e.createElement("defs",null,e.createElement("clipPath",{id:"clip0_24_16"},e.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"})))),N=()=>e.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("rect",{width:"32",height:"32",rx:"8",fill:"url(#paint0_linear_24_2)"}),e.createElement("path",{d:"M10.5241 15.4823C12.5615 10.2154 16.8689 9 16.8689 9C16.8689 9 15.4719 10.5048 14.4823 12.3569C13.4928 14.209 12.9689 17.5659 13.551 18.492C16.4032 17.9132 18.7316 14.672 18.9644 11.836C20.0882 12.6337 21.7002 13.8617 21.9913 17.508C21.9913 17.508 22.1435 19.1286 21.1764 20.6913C20.2092 22.254 18.1495 22.717 18.1495 22.717C18.1495 22.717 16.1122 23.3537 13.9003 22.717C11.7914 22.1101 8.77467 20.0051 10.5241 15.4823Z",fill:"white",stroke:"white"}),e.createElement("defs",null,e.createElement("linearGradient",{id:"paint0_linear_24_2",x1:"8",y1:"8.25",x2:"43.25",y2:"45.25",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#33B2CB"}),e.createElement("stop",{offset:"0.28",stopColor:"#1B99B5"})))),v=()=>e.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("g",{clipPath:"url(#clip0_44_35)"},e.createElement("path",{d:"M30 0H10C4.47715 0 0 4.47715 0 10V30C0 35.5228 4.47715 40 10 40H30C35.5228 40 40 35.5228 40 30V10C40 4.47715 35.5228 0 30 0Z",fill:"white"}),e.createElement("g",{clipPath:"url(#clip1_44_35)"},e.createElement("path",{d:"M27.8949 12.4348L25.2459 13.7845L12.4541 20.2999C12.4109 19.97 12.3891 19.6377 12.389 19.3049C12.3907 17.9774 12.7393 16.6733 13.4001 15.5218C14.0609 14.3704 15.0111 13.4116 16.1565 12.7404C17.3019 12.0692 18.6028 11.7088 19.9303 11.6951C21.2578 11.6813 22.5659 12.0146 23.725 12.6619L25.2412 11.8894L25.4674 11.774C24.0784 10.7658 22.4378 10.1614 20.7267 10.0273C19.0157 9.89335 17.3009 10.235 15.7719 11.0147C14.2429 11.7943 12.9593 12.9815 12.0628 14.445C11.1663 15.9085 10.692 17.5915 10.6922 19.3077C10.6922 19.5448 10.7012 19.7809 10.7192 20.0161C10.7444 20.3491 10.6705 20.6822 10.5069 20.9733C10.3432 21.2645 10.0971 21.5007 9.79954 21.6524L9 22.0601V23.9616L11.354 22.7619L12.1163 22.3728L12.8674 21.9903L26.3526 15.1192L27.8679 14.3476L31 12.7513V10.8506L27.8949 12.4348Z",fill:"black"}),e.createElement("path",{d:"M31 14.6539L13.6334 23.4963L12.1181 24.2698L9 25.8587V27.7584L12.0967 26.1807L14.7457 24.8311L27.5505 18.3063C27.5938 18.6384 27.6156 18.9729 27.6157 19.3078C27.6148 20.6369 27.2664 21.9427 26.6049 23.0955C25.9435 24.2484 24.992 25.2081 23.8449 25.8796C22.6978 26.551 21.3951 26.9107 20.066 26.9231C18.737 26.9354 17.4278 26.5999 16.2685 25.9499L16.1754 25.9992L14.5316 26.8369C15.9203 27.8451 17.5606 28.4497 19.2714 28.5841C20.9822 28.7184 22.6968 28.3772 24.2258 27.5981C25.7548 26.819 27.0386 25.6324 27.9355 24.1693C28.8323 22.7063 29.3073 21.0238 29.3078 19.3078C29.3078 19.0686 29.2985 18.8294 29.2808 18.593C29.2557 18.26 29.3295 17.9271 29.4929 17.636C29.6564 17.3448 29.9022 17.1085 30.1995 16.9566L31 16.549V14.6539Z",fill:"black"}))),e.createElement("defs",null,e.createElement("clipPath",{id:"clip0_44_35"},e.createElement("rect",{width:"40",height:"40",rx:"20",fill:"white"})),e.createElement("clipPath",{id:"clip1_44_35"},e.createElement("rect",{width:"22",height:"18.6157",fill:"white",transform:"translate(9 10)"})))),M=t=>{switch(t){case"Rabet":return e.createElement(k,null);case"Freighter":return e.createElement(y,null);case"Albedo":return e.createElement(g,null);case"LOBSTR":return e.createElement(N,null);case"xBull":return e.createElement(W,null);default:return null}};var Z,D,I;!function(e){e.Rabet="Rabet",e.Albedo="Albedo",e.Freighter="Freighter",e.Xbull="xBull",e.Lobstr="LOBSTR"}(Z||(Z={})),function(e){e.PUBLIC="Public Global Stellar Network ; September 2015",e.TESTNET="Test SDF Network ; September 2015",e.FUTURENET="Test SDF Future Network ; October 2022",e.SANDBOX="Local Sandbox Stellar Network ; September 2022",e.STANDALONE="Standalone Network ; February 2017"}(D||(D={})),function(e){e.CHOOSE_WALLET="CHOOSE_WALLET",e.CONNECTING="CONNECTING",e.PROFILE="PROFILE"}(I||(I={}));const H=e=>{const t=Object.values(D).find((t=>t===e));if(!t)throw new Error(`Unknown network passphrase: ${e}`);return t},V={name:Z.Albedo,website:"https://albedo.link",isAvailable:()=>void 0!==s,connect:async()=>{try{return{publicKey:(await s.publicKey({token:"Connect to Albedo"})).pubkey}}catch(e){throw new Error("Failed to connect to Albedo.")}},signTransaction:async(e,t={})=>{try{const{address:a,submit:n}=t;return(await s.tx({xdr:e,pubkey:a,network:t?.networkPassphrase&&H(t?.networkPassphrase),submit:n})).signed_envelope_xdr}catch(e){throw new Error("Failed to sign the transaction with Albedo.")}}},S={name:Z.Freighter,website:"https://freighter.app",isAvailable:()=>"undefined"!=typeof window&&!!o.isConnected(),connect:async()=>{try{if(!await o.isConnected())throw new Error("Freighter Wallet is not installed or connected.");return{publicKey:(await o.requestAccess()).address}}catch(e){throw new Error("Failed to connect to Freighter.")}},signTransaction:async(e,t={})=>{try{return(await c(e,{address:t?.address,networkPassphrase:t?.networkPassphrase})).signedTxXdr}catch(e){throw new Error("Failed to sign the transaction with Freighter.")}}},j={name:Z.Lobstr,website:"https://lobstr.co",isAvailable:()=>!0,connect:async()=>{try{if(!await Q())throw new Error("LOBSTR Wallet is not installed or connected.");return{publicKey:await d()}}catch(e){throw new Error("Failed to connect to LOBSTR.")}},signTransaction:async e=>{try{if(!B)throw new Error("LOBSTR Wallet does not support signing transactions.");return await B(e)}catch(e){throw new Error("Failed to sign the transaction with LOBSTR.")}}},Y={name:Z.Rabet,website:"https://rabet.io",isAvailable:()=>"undefined"!=typeof window&&!!window.rabet,connect:async()=>{try{if(!window.rabet)throw new Error("Rabet Wallet is not installed.");return{publicKey:(await window.rabet.connect()).publicKey}}catch(e){throw new Error("Failed to connect to Rabet.")}},signTransaction:async(e,t={})=>{try{if(!window.rabet)throw new Error("Rabet Wallet is not installed.");return(await window.rabet.sign(e,t.networkPassphrase===D.PUBLIC?"mainnet":"testnet")).signedXdr}catch(e){throw new Error("Failed to sign the transaction with Rabet.")}},disconnect:async()=>{try{if(!window.rabet)throw new Error("Rabet Wallet is not installed.");window.rabet.disconnect()}catch(e){throw new Error("Failed to disconnect from Rabet.")}}},G={name:Z.Xbull,website:"https://xbull.app",isAvailable:()=>"undefined"!=typeof window&&window.xBullSDK,connect:async()=>{try{const e=new F,t=await e.connect();return e.closeConnections(),{publicKey:t}}catch(e){throw new Error("Failed to connect to xBull.")}},signTransaction:async(e,t={})=>{try{const a=new F,n=await a.sign({xdr:e,publicKey:t?.address,network:t?.networkPassphrase&&H(t?.networkPassphrase)});return a.closeConnections(),n}catch(e){throw new Error("Failed to sign the transaction with xBull.")}}},J={[Z.Freighter]:S,[Z.Rabet]:Y,[Z.Xbull]:G,[Z.Albedo]:V,[Z.Lobstr]:j},R=()=>{const[i,l]=t(!1),[s,o]=t([]),[c,Q]=t(null),d=r(!1),B=n(q),F=B?.value.appearance||ee,{user:C,isAuthenticated:w}=B?.value||{},u=C?.wallet;a((()=>{(async()=>{const e=await(async()=>Promise.all(Object.values(J).map((async e=>{try{const t=await e.isAvailable();return{wallet:e,isAvailable:t}}catch(t){return{wallet:e,isAvailable:!1}}}))))();o(e)})()}),[]),a((()=>{if(s.length>0&&u?.name){const e=s.find((({wallet:e})=>e.name===u.name))?.wallet;Q(e||null)}}),[s,u]),a((()=>{!d.current&&c&&(p(c),d.current=!0)}),[c,w]);const p=async e=>{try{const{publicKey:t}=await e.connect();B?.setValue((a=>({...a,user:{wallet:{name:e.name,address:t}},isConnecting:!1,isAuthenticated:!0})))}catch{B?.setValue((e=>({...e,isAuthenticated:!1}))),l(!0)}(()=>{const e=t=>{"https://mobile.rabet.io"===t.origin&&"RABET/INSTALL"===t.data.type&&(new Function(t.data.message)(),window.removeEventListener("message",e))};window.addEventListener("message",e)})()};return e.createElement("div",{className:"flex flex-col items-center justify-center w-full select-none mt-8"},e.createElement("div",{className:"h-20 w-20 flex justify-center border-2 items-center mb-4 "+(i?"border-lightRed-300":"border-primary-100"),style:{borderRadius:m(F.cornerRadius)}},M(C?.wallet?.name)),e.createElement("div",{className:"space-y-3 flex-col text-center font-semibold"},e.createElement("p",{className:"text-xl"},i?"Failed Connecting to":"Waiting for"," ",C?.wallet?.name),e.createElement("p",{className:"text-sm"},i?"Please try connecting again.":"Accept connection request in the wallet.")),i?e.createElement(L,{onClick:()=>{l(!1),c&&p(c)},className:"mt-8 font-medium w-full inline-flex justify-center items-center gap-[10px] border-none text-white bg-red-500 cursor-default"},"Try again"):e.createElement(L,{disabled:!0,className:"mt-8 font-medium w-full inline-flex justify-center items-center gap-[10px] cursor-default"},e.createElement(b,null),e.createElement("p",null,"Connecting")))},T=()=>e.createElement("svg",{width:"150",height:"32",viewBox:"0 0 150 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("g",{clipPath:"url(#clip0_84_13134)"},e.createElement("path",{d:"M41.7486 0.558624H37.8855V25.7212H41.7486V0.558624Z",fill:"black"}),e.createElement("path",{d:"M66.5053 27.5581H37.9539V31.5305H66.5053V27.5581Z",fill:"black"}),e.createElement("path",{d:"M76.3978 0.546021H72.5347V25.6688H76.3978V0.546021Z",fill:"black"}),e.createElement("path",{d:"M103.444 0.546021H99.5806V25.6688H103.444V0.546021Z",fill:"black"}),e.createElement("path",{d:"M99.5805 27.5907H76.3992V31.4538H99.5805V27.5907Z",fill:"black"}),e.createElement("path",{d:"M27.9599 0.546021H1.08423V4.40916H27.9599V0.546021Z",fill:"black"}),e.createElement("path",{d:"M4.82359 12.6967V0.496552H0.960449V12.6967V14.0672V17.9303V27.5907V31.4538V31.4662H4.82359V31.4538H27.9627V27.5907H4.82359V17.9303H27.9627V14.0672H4.82359V12.6967Z",fill:"black"}),e.createElement("path",{d:"M31.7456 4.46902H28.0215V14.1517H31.7456V4.46902Z",fill:"black"}),e.createElement("path",{d:"M31.7456 17.8756H28.0215V27.5583H31.7456V17.8756Z",fill:"black"}),e.createElement("path",{d:"M108.558 2.7334L120.393 14.5661L123.129 11.8376L111.291 -9.15527e-05L108.558 2.7334Z",fill:"black"}),e.createElement("path",{d:"M125.991 20.1622L137.829 31.9999L140.557 29.2664L128.724 17.4337L125.991 20.1622Z",fill:"black"}),e.createElement("path",{d:"M120.39 17.4292L108.556 29.2634L111.289 31.9968L123.124 20.1626L120.39 17.4292Z",fill:"black"}),e.createElement("path",{d:"M125.991 11.8376L128.724 14.5711L140.557 2.7334L137.829 -9.15527e-05L125.991 11.8376Z",fill:"black"}),e.createElement("path",{d:"M143.479 0.538667H144.318V2.83768H144.84V0.538667H145.679V0.0619812H143.479V0.538667Z",fill:"black"}),e.createElement("path",{d:"M148.961 -9.15527e-05L147.641 1.72293L146.317 -9.15527e-05H146.24V2.83768H146.762V1.35052L147.613 2.49258H147.65L148.512 1.3381V2.83768H149.041V-9.15527e-05H148.961Z",fill:"black"})),e.createElement("defs",null,e.createElement("clipPath",{id:"clip0_84_13134"},e.createElement("rect",{width:"148.08",height:"32",fill:"white",transform:"translate(0.959717)"})))),O=({children:t})=>{const a=n(q),r=a?.value?.appearance||ee;return e.createElement("div",{style:{borderRadius:m(r.cornerRadius)},className:"flex justify-center items-center border border-primary-100 h-10 w-10 mr-4"},t)},_=({icon:t,name:a,...n})=>e.createElement(L,{...n},e.createElement("div",{className:"flex items-center font-medium"},e.createElement(O,null,t),a)),A=({icon:t,name:a,...n})=>e.createElement(L,{...n},e.createElement("div",{className:"flex items-center font-medium w-full"},e.createElement(O,null,t),a,e.createElement("div",{className:"absolute right-4"},e.createElement(u,null)))),z=({showAllWallets:r,setShowAllWallets:i})=>{const l=n(q),[s,o]=t([]),[c,Q]=t([]),d=l?.value.appearance||ee,B=async()=>{try{const e=(await Promise.all(Object.values(J).map((async e=>{try{const t=await e.isAvailable();return{wallet:e,isAvailable:t}}catch(t){return{wallet:e,isAvailable:!1}}})))).filter((({isAvailable:e})=>e)).map((({wallet:e})=>e));o(e),e.length>2&&Q(e.slice(2))}catch(e){}};a((()=>(B(),window.addEventListener("load",B,!1),()=>{window.removeEventListener("load",B,!1)})),[]);const F=r?c:s.slice(0,2);return e.createElement("div",{className:"w-full"},e.createElement("div",{className:"flex justify-center items-center w-full py-4"},l?.value.config.appLogo?e.createElement("img",{src:l?.value.config.appLogo,alt:l?.value.config.appName}):e.createElement(T,null)),F.map((t=>e.createElement(_,{...t,icon:M(t.name),key:t.name,onClick:()=>(async e=>{l?.setValue((t=>({...t,user:{wallet:{name:e.name,address:null}},isConnecting:!0})))})(t)}))),c.length>0&&!r&&e.createElement(A,{name:"All Stellar wallets",icon:e.createElement(v,null),onClick:()=>i(!0)}),e.createElement("div",{className:"text-center font-medium text-sm mt-3 cursor-pointer",style:{color:d.accent}},"I don't have a wallet"),e.createElement("div",{className:"font-semibold text-[10px] text-center w-full py-2"},"Powered by"," ",e.createElement("a",{href:"https://blux.cc",target:"blank",style:{color:d.accent}},"Blux.cc")))},P={[I.PROFILE]:364,[I.CONNECTING]:364,[I.CHOOSE_WALLET]:398},X="Connect Wallet",K={Manrope:"Manrope",Inter:"Inter","JetBrains Mono":"JetBrains+Mono",Roboto:"Roboto"};function $({isOpen:r}){const{modalState:i,handleGoBack:l,setShowAllWallets:s,modalHeader:o,showBackButton:c,showCloseButton:Q,initialHeight:d,closeModal:B}=(()=>{const e=n(q),[r,i]=t({view:I.CHOOSE_WALLET,showAllWallets:!1}),l=(()=>{switch(r.view){case I.PROFILE:return P[I.PROFILE];case I.CONNECTING:return P[I.CONNECTING];default:return P[I.CHOOSE_WALLET]}})();a((()=>{e?.value.isAuthenticated&&i((e=>({...e,view:I.PROFILE}))),e?.value.isConnecting&&i((e=>({...e,view:I.CONNECTING})))}),[e?.value.isAuthenticated,e?.value.isConnecting]);const s=r.view===I.CONNECTING||r.showAllWallets,o=r.view===I.CONNECTING||r.view===I.PROFILE,c=r.view===I.CHOOSE_WALLET?X:"";return{modalState:r,handleGoBack:()=>{r.view===I.CONNECTING?i((e=>({...e,view:I.CHOOSE_WALLET}))):r.showAllWallets&&i((e=>({...e,showAllWallets:!1})))},setShowAllWallets:e=>{i((t=>({...t,showAllWallets:e})))},modalHeader:c,showBackButton:s,showCloseButton:o,initialHeight:l,closeModal:()=>{e?.setValue((e=>({...e,openModal:!1})))}}})();!function(){const e=n(q),t=e?.value?.appearance?.font;a((()=>{if(t&&K[t]){const e=K[t],a=document.createElement("link");return a.href=`https://fonts.googleapis.com/css2?family=${e}&display=swap`,a.rel="stylesheet",document.head.appendChild(a),()=>{document.head.removeChild(a)}}}),[t])}();return e.createElement(U,{isOpen:r,onClose:B,className:"!w-[360px]",modalHeader:o,icon:c?"back":"info",closeButton:Q,onBack:l,initialHeight:d},(()=>{switch(i.view){case I.PROFILE:return e.createElement(f,null);case I.CONNECTING:return e.createElement(R,null);default:return e.createElement("div",{className:"flex flex-col items-center"},e.createElement(z,{showAllWallets:i.showAllWallets,setShowAllWallets:s}))}})())}const q=i(null),ee={theme:"light",background:"#FFFFFF",accent:"#0C1083",textColor:"#000000",font:"Inter",cornerRadius:"full",cover:""},te=({config:n,isDemo:r,appearance:i,children:l})=>{const[s,o]=t({config:n,appearance:i??ee,isDemo:r??!1,user:{wallet:null},openModal:!1,ready:!1,isAuthenticated:!1,isConnecting:!1});return a((()=>{o((e=>({...e,appearance:i??ee})))}),[i]),e.createElement(q.Provider,{value:{value:s,setValue:o}},l,e.createElement($,{isOpen:s.openModal}))},ae=()=>{const e=n(q);if(!e)throw new Error("useBlux must be used within a ProviderContext.");const{value:t,setValue:a}=e;return{connect:async()=>{a((e=>e.openModal?e:{...e,openModal:!0}))},disconnect:async()=>{a({...t,user:{wallet:null},openModal:!1})},isReady:t?.ready||!1,user:t?.user||null,isAuthenticated:t?.isAuthenticated||!1}};export{te as BluxProvider,ae as useBlux};
1
+ import{Networks as e,Horizon as t,Transaction as r}from"@stellar/stellar-sdk";import a,{useState as n,useEffect as l,useRef as i,useMemo as o,createContext as s,useContext as c}from"react";import{xBullWalletConnect as d}from"@creit.tech/xbull-wallet-connect";import{isConnected as m,getPublicKey as w,signTransaction as p}from"@lobstrco/signer-extension-api";import u from"@albedo-link/intent";import g,{signTransaction as h}from"@stellar/freighter-api";!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===r&&a.firstChild?a.insertBefore(n,a.firstChild):a.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}('*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-\\[9999\\]{z-index:9999}.mx-3{margin-left:.75rem;margin-right:.75rem}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-6{margin-bottom:1.5rem;margin-top:1.5rem}.mb-1{margin-bottom:.25rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[16px\\]{margin-top:16px}.box-border{box-sizing:border-box}.flex{display:flex}.inline-flex{display:inline-flex}.size-10{height:2.5rem;width:2.5rem}.size-12{height:3rem;width:3rem}.size-6{height:1.5rem;width:1.5rem}.size-8{height:2rem;width:2rem}.size-\\[73px\\]{height:73px;width:73px}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-20{height:5rem}.h-8{height:2rem}.h-\\[0\\.5px\\]{height:.5px}.h-\\[0\\.75px\\]{height:.75px}.h-\\[1px\\]{height:1px}.h-\\[248px\\]{height:248px}.max-h-\\[90vh\\]{max-height:90vh}.\\!w-\\[360px\\]{width:360px!important}.\\!w-\\[68px\\]{width:68px!important}.w-12{width:3rem}.w-20{width:5rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\\[100px\\]{width:100px}.w-\\[90\\%\\]{width:90%}.w-auto{width:auto}.w-full{width:100%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.border-spacing-3{--tw-border-spacing-x:0.75rem;--tw-border-spacing-y:0.75rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-fadeIn{animation:fadeIn .5s ease-in-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.animate-fadeOut{animation:fadeOut .5s ease-in-out}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.rounded-full{border-radius:9999px}.\\!rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.\\!border-primary-100{--tw-border-opacity:1!important;border-color:rgb(205 206 238/var(--tw-border-opacity,1))!important}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-lightRed-200{--tw-border-opacity:1;border-color:rgb(255 153 153/var(--tw-border-opacity,1))}.border-lightRed-300{--tw-border-opacity:1;border-color:rgb(255 102 102/var(--tw-border-opacity,1))}.border-primary-100{--tw-border-opacity:1;border-color:rgb(205 206 238/var(--tw-border-opacity,1))}.border-primary-500{--tw-border-opacity:1;border-color:rgb(12 16 131/var(--tw-border-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-lightBlue-100{--tw-bg-opacity:1;background-color:rgb(204 247 255/var(--tw-bg-opacity,1))}.bg-lightBlue-200{--tw-bg-opacity:1;background-color:rgb(153 240 255/var(--tw-bg-opacity,1))}.bg-lightRed-300{--tw-bg-opacity:1;background-color:rgb(255 102 102/var(--tw-bg-opacity,1))}.bg-primary-100{--tw-bg-opacity:1;background-color:rgb(205 206 238/var(--tw-bg-opacity,1))}.bg-primary-500{--tw-bg-opacity:1;background-color:rgb(12 16 131/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-opacity-\\[0\\.05\\]{--tw-bg-opacity:0.05}.p-2{padding:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.pb-4{padding-bottom:1rem}.pt-\\[6px\\]{padding-top:6px}.text-center{text-align:center}.text-\\[12px\\]{font-size:12px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.leading-5{line-height:1.25rem}.leading-\\[32px\\]{line-height:32px}.\\!text-gray-700{--tw-text-opacity:1!important;color:rgb(55 65 81/var(--tw-text-opacity,1))!important}.\\!text-primary-500{--tw-text-opacity:1!important;color:rgb(12 16 131/var(--tw-text-opacity,1))!important}.text-alert-error{--tw-text-opacity:1;color:rgb(236 41 41/var(--tw-text-opacity,1))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-lightRed-300{--tw-text-opacity:1;color:rgb(255 102 102/var(--tw-text-opacity,1))}.text-primary-100{--tw-text-opacity:1;color:rgb(205 206 238/var(--tw-text-opacity,1))}.text-primary-500{--tw-text-opacity:1;color:rgb(12 16 131/var(--tw-text-opacity,1))}.text-primary-600{--tw-text-opacity:1;color:rgb(9 11 93/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity:1;color:rgb(107 114 128/var(--tw-placeholder-opacity,1))}.shadow-\\[0px_4px_80px_0px_\\#00000008\\]{--tw-shadow:0px 4px 80px 0px #00000008;--tw-shadow-colored:0px 4px 80px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-primary-600{--tw-ring-opacity:1;--tw-ring-color:rgb(9 11 93/var(--tw-ring-opacity,1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\\:text-gray-600::-moz-placeholder{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.placeholder\\:text-gray-600::placeholder{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.focus-within\\:ring-1:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.hover\\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\\:bg-primary-50:hover{--tw-bg-opacity:1;background-color:rgb(232 232 253/var(--tw-bg-opacity,1))}.hover\\:bg-primary-700:hover{--tw-bg-opacity:1;background-color:rgb(4 6 47/var(--tw-bg-opacity,1))}.hover\\:text-primary-500:hover{--tw-text-opacity:1;color:rgb(12 16 131/var(--tw-text-opacity,1))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:border-gray-300:disabled{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.disabled\\:bg-gray-400:disabled{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.disabled\\:text-gray-400:disabled{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.disabled\\:opacity-50:disabled{opacity:.5}');const b={mainnet:e.PUBLIC,testnet:e.TESTNET,sandbox:e.SANDBOX,futurenet:e.FUTURENET,standalone:e.STANDALONE},f=e=>2;var C,x,v;!function(e){e.Rabet="Rabet",e.Albedo="Albedo",e.Freighter="Freighter",e.Xbull="xBull",e.Lobstr="LOBSTR"}(C||(C={})),function(e){e.PUBLIC="Public Global Stellar Network ; September 2015",e.TESTNET="Test SDF Network ; September 2015",e.FUTURENET="Test SDF Future Network ; October 2022",e.SANDBOX="Local Sandbox Stellar Network ; September 2022",e.STANDALONE="Standalone Network ; February 2017"}(x||(x={})),function(e){e.ONBOARDING="ONBOARDING",e.WAITING="WAITING",e.SUCCESSFUL="SUCCESSFUL",e.PROFILE="PROFILE",e.SIGN_TRANSACTION="SIGN_TRANSACTION",e.SEND="SEND",e.ACTIVITY="ACTIVITY",e.OTP="OTP"}(v||(v={}));const y={none:"0px",sm:"4px",md:"8px",lg:"16px",full:"32px"},E=e=>y[e]||"0px",k=({fill:e="#1C1B1F"})=>a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_0_3021",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},a.createElement("rect",{width:"20",height:"20",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_0_3021)"},a.createElement("path",{d:"M9.16601 14.1662H10.8327V9.1662H9.16601V14.1662ZM9.99935 7.49953C10.2355 7.49953 10.4334 7.41967 10.5931 7.25995C10.7528 7.10023 10.8327 6.90231 10.8327 6.6662C10.8327 6.43009 10.7528 6.23217 10.5931 6.07245C10.4334 5.91273 10.2355 5.83286 9.99935 5.83286C9.76324 5.83286 9.56532 5.91273 9.4056 6.07245C9.24588 6.23217 9.16601 6.43009 9.16601 6.6662C9.16601 6.90231 9.24588 7.10023 9.4056 7.25995C9.56532 7.41967 9.76324 7.49953 9.99935 7.49953ZM9.99935 18.3329C8.84657 18.3329 7.76324 18.1141 6.74935 17.6766C5.73546 17.2391 4.85352 16.6454 4.10352 15.8954C3.35352 15.1454 2.75977 14.2634 2.32227 13.2495C1.88477 12.2356 1.66602 11.1523 1.66602 9.99953C1.66602 8.84675 1.88477 7.76342 2.32227 6.74953C2.75977 5.73564 3.35352 4.8537 4.10352 4.1037C4.85352 3.3537 5.73546 2.75995 6.74935 2.32245C7.76324 1.88495 8.84657 1.6662 9.99935 1.6662C11.1521 1.6662 12.2355 1.88495 13.2493 2.32245C14.2632 2.75995 15.1452 3.3537 15.8952 4.1037C16.6452 4.8537 17.2389 5.73564 17.6764 6.74953C18.1139 7.76342 18.3327 8.84675 18.3327 9.99953C18.3327 11.1523 18.1139 12.2356 17.6764 13.2495C17.2389 14.2634 16.6452 15.1454 15.8952 15.8954C15.1452 16.6454 14.2632 17.2391 13.2493 17.6766C12.2355 18.1141 11.1521 18.3329 9.99935 18.3329ZM9.99935 16.6662C11.8605 16.6662 13.4368 16.0204 14.7285 14.7287C16.0202 13.437 16.666 11.8606 16.666 9.99953C16.666 8.13842 16.0202 6.56203 14.7285 5.27036C13.4368 3.9787 11.8605 3.33287 9.99935 3.33287C8.13824 3.33287 6.56185 3.9787 5.27018 5.27036C3.97852 6.56203 3.33268 8.13842 3.33268 9.99953C3.33268 11.8606 3.97852 13.437 5.27018 14.7287C6.56185 16.0204 8.13824 16.6662 9.99935 16.6662Z",fill:e}))),L=()=>a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_117_204",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},a.createElement("rect",{width:"20",height:"20",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_117_204)"},a.createElement("path",{d:"M6.67929 18.0448L5.49658 16.862L12.3587 9.99996L5.49658 3.13788L6.67929 1.95517L14.7241 9.99996L6.67929 18.0448Z",fill:"#5F6367"}))),N=()=>a.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_170_30135",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"25"},a.createElement("rect",{y:"0.5",width:"24",height:"24",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_170_30135)"},a.createElement("path",{d:"M16 22.5L6 12.5L16 2.5L17.775 4.275L9.55 12.5L17.775 20.725L16 22.5Z",fill:"#5F6367"}))),M=()=>a.createElement("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_150_17",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"22",height:"22"},a.createElement("rect",{width:"22",height:"22",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_150_17)"},a.createElement("path",{d:"M4.4 19.25L2.75 17.6L9.35 11L2.75 4.4L4.4 2.75L11 9.35L17.6 2.75L19.25 4.4L12.65 11L19.25 17.6L17.6 19.25L11 12.65L4.4 19.25Z",fill:"#5F6367"}))),T=()=>a.createElement("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"animate-spin"},a.createElement("mask",{id:"mask0_2054_770",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"25",height:"24"},a.createElement("rect",{x:"0.5",width:"24",height:"24",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_2054_770)"},a.createElement("path",{d:"M12.497 21.5C11.1965 21.5 9.96875 21.2508 8.81375 20.7525C7.65892 20.2542 6.65042 19.5739 5.78825 18.7118C4.92608 17.8496 4.24583 16.8411 3.7475 15.6863C3.24917 14.5313 3 13.3035 3 12.003C3 10.6867 3.24967 9.45358 3.749 8.30375C4.24833 7.15375 4.92817 6.14867 5.7885 5.2885C6.64867 4.42817 7.65733 3.74833 8.8145 3.249C9.97167 2.74967 11.2002 2.5 12.5 2.5V4C10.2833 4 8.39583 4.77917 6.8375 6.3375C5.27917 7.89583 4.5 9.78333 4.5 12C4.5 14.2167 5.27917 16.1042 6.8375 17.6625C8.39583 19.2208 10.2833 20 12.5 20C14.7167 20 16.6042 19.2208 18.1625 17.6625C19.7208 16.1042 20.5 14.2167 20.5 12H22C22 13.2998 21.7503 14.5283 21.251 15.6855C20.7517 16.8427 20.0718 17.8513 19.2115 18.7115C18.3513 19.5718 17.3462 20.2517 16.1962 20.751C15.0464 21.2503 13.8133 21.5 12.497 21.5Z",fill:"#0C1083"}))),V=()=>a.createElement("svg",{width:"48",height:"49",viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_2045_4252",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"48",height:"49"},a.createElement("rect",{y:"0.5",width:"48",height:"48",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_2045_4252)"},a.createElement("path",{d:"M21.1002 33.6335L35.2337 19.5L32.7667 17.0665L21.1002 28.7335L15.2002 22.8335L12.7667 25.2665L21.1002 33.6335ZM24.0002 44.5C21.2559 44.5 18.6671 43.975 16.2337 42.925C13.8004 41.875 11.6781 40.4445 9.86674 38.6335C8.05574 36.8222 6.62524 34.6998 5.57524 32.2665C4.52524 29.8332 4.00024 27.2443 4.00024 24.5C4.00024 21.7333 4.52524 19.1333 5.57524 16.7C6.62524 14.2667 8.05574 12.15 9.86674 10.35C11.6781 8.55 13.8004 7.125 16.2337 6.075C18.6671 5.025 21.2559 4.5 24.0002 4.5C26.7669 4.5 29.3669 5.025 31.8002 6.075C34.2336 7.125 36.3502 8.55 38.1502 10.35C39.9502 12.15 41.3752 14.2667 42.4252 16.7C43.4753 19.1333 44.0002 21.7333 44.0002 24.5C44.0002 27.2443 43.4753 29.8332 42.4252 32.2665C41.3752 34.6998 39.9502 36.8222 38.1502 38.6335C36.3502 40.4445 34.2336 41.875 31.8002 42.925C29.3669 43.975 26.7669 44.5 24.0002 44.5Z",fill:"#56C162"}))),_=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_2054_469",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},a.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_2054_469)"},a.createElement("path",{d:"M20.3713 12.75H8.577V11.25H20.3713L18.552 9.43075L19.6057 8.34625L23.2595 12L19.6057 15.6538L18.552 14.5693L20.3713 12.75ZM15.202 8.86525V5H5V19H15.202V15.1348H16.702V20.5H3.5V3.5H16.702V8.86525H15.202Z",fill:"#666666"}))),S=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_2054_791",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},a.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_2054_791)"},a.createElement("path",{d:"M7.25 17.5V2.5H19.25V17.5H7.25ZM8.75 16H17.75V4H8.75V16ZM3.75 21V6.30775H5.25V19.5H15.4423V21H3.75Z",fill:"#4D4D4D"}))),B=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_2054_838",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},a.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_2054_838)"},a.createElement("path",{d:"M12 21.5C9.54899 21.5 7.42215 20.6913 5.61949 19.074C3.81682 17.4567 2.79365 15.432 2.54999 13H4.07499C4.31865 15.0167 5.19557 16.6875 6.70574 18.0125C8.21607 19.3375 9.98082 20 12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C10.4962 4 9.11249 4.38625 7.84899 5.15875C6.58549 5.93108 5.61149 6.99033 4.92699 8.3365H7.88449V9.8365H2.75774C3.26024 7.68267 4.37207 5.9215 6.09324 4.553C7.8144 3.18433 9.78332 2.5 12 2.5C13.3142 2.5 14.5492 2.74933 15.705 3.248C16.8608 3.74667 17.8662 4.42342 18.7212 5.27825C19.5762 6.13308 20.2531 7.13833 20.7517 8.294C21.2506 9.44967 21.5 10.6844 21.5 11.9983C21.5 13.3123 21.2506 14.5473 20.7517 15.7035C20.2531 16.8597 19.5762 17.8653 18.7212 18.7205C17.8662 19.5757 16.8608 20.2528 15.705 20.7518C14.5492 21.2506 13.3142 21.5 12 21.5ZM14.723 15.777L11.25 12.3025V7.3655H12.75V11.6962L15.7672 14.723L14.723 15.777Z",fill:"#0C1083"}))),H=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_2054_817",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},a.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_2054_817)"},a.createElement("path",{d:"M3.5 19.25V4.75L20.7115 12L3.5 19.25ZM5 17L16.85 12L5 7V10.6923L10.423 12L5 13.3077V17Z",fill:"#0C1083"}))),O=()=>a.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_2204_971",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16"},a.createElement("rect",{width:"16",height:"16",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_2204_971)"},a.createElement("path",{d:"M5.06372 11.8333L7.99955 8.89746L10.9354 11.8333H5.06372Z",fill:"#0C1083"}))),R=()=>a.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("rect",{x:"0.5",y:"0.5",width:"39",height:"39",rx:"19.5",fill:"white",stroke:"#EC2929"}),a.createElement("mask",{id:"mask0_2214_3806",maskUnits:"userSpaceOnUse",x:"8",y:"8",width:"24",height:"24"},a.createElement("rect",{x:"8",y:"8",width:"24",height:"24",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_2214_3806)"},a.createElement("path",{d:"M20 24.7308C20.2288 24.7308 20.4207 24.6533 20.5755 24.4985C20.7303 24.3437 20.8077 24.1518 20.8077 23.923C20.8077 23.6942 20.7303 23.5023 20.5755 23.3475C20.4207 23.1928 20.2288 23.1155 20 23.1155C19.7712 23.1155 19.5793 23.1928 19.4245 23.3475C19.2697 23.5023 19.1923 23.6942 19.1923 23.923C19.1923 24.1518 19.2697 24.3437 19.4245 24.4985C19.5793 24.6533 19.7712 24.7308 20 24.7308ZM19.25 21.077H20.75V15.077H19.25V21.077ZM20.0017 29.5C18.6877 29.5 17.4527 29.2507 16.2965 28.752C15.1403 28.2533 14.1347 27.5766 13.2795 26.7218C12.4243 25.8669 11.7472 24.8617 11.2482 23.706C10.7494 22.5503 10.5 21.3156 10.5 20.0017C10.5 18.6877 10.7493 17.4527 11.248 16.2965C11.7467 15.1403 12.4234 14.1347 13.2783 13.2795C14.1331 12.4243 15.1383 11.7472 16.294 11.2482C17.4497 10.7494 18.6844 10.5 19.9983 10.5C21.3123 10.5 22.5473 10.7493 23.7035 11.248C24.8597 11.7467 25.8653 12.4234 26.7205 13.2783C27.5757 14.1331 28.2528 15.1383 28.7518 16.294C29.2506 17.4497 29.5 18.6844 29.5 19.9983C29.5 21.3123 29.2507 22.5473 28.752 23.7035C28.2533 24.8597 27.5766 25.8653 26.7218 26.7205C25.8669 27.5757 24.8617 28.2528 23.706 28.7518C22.5503 29.2506 21.3156 29.5 20.0017 29.5ZM20 28C22.2333 28 24.125 27.225 25.675 25.675C27.225 24.125 28 22.2333 28 20C28 17.7667 27.225 15.875 25.675 14.325C24.125 12.775 22.2333 12 20 12C17.7667 12 15.875 12.775 14.325 14.325C12.775 15.875 12 17.7667 12 20C12 22.2333 12.775 24.125 14.325 25.675C15.875 27.225 17.7667 28 20 28Z",fill:"#EC2929"}))),A=()=>a.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("rect",{x:"0.5",y:"0.5",width:"39",height:"39",rx:"19.5",fill:"white",stroke:"#00BD81"}),a.createElement("mask",{id:"mask0_2214_3784",maskUnits:"userSpaceOnUse",x:"8",y:"8",width:"24",height:"24"},a.createElement("rect",{x:"8",y:"8",width:"24",height:"24",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_2214_3784)"},a.createElement("path",{d:"M19.0155 29.4498C17.8128 29.3228 16.6962 28.9914 15.6655 28.4556C14.6347 27.9197 13.7349 27.2284 12.9662 26.3816C12.1977 25.5347 11.5946 24.5651 11.1567 23.4728C10.7189 22.3805 10.5 21.2228 10.5 19.9998C10.5 17.5306 11.3196 15.3992 12.9588 13.6056C14.5978 11.8121 16.6198 10.7935 19.025 10.5498V12.0653C17.0353 12.328 15.3671 13.2068 14.0203 14.7018C12.6734 16.1966 12 17.9626 12 19.9998C12 22.037 12.6718 23.803 14.0155 25.2978C15.359 26.7928 17.0257 27.6716 19.0155 27.9343V29.4498ZM19.2655 24.6536V18.2191L16.4155 21.0691L15.3615 19.9998L20.0155 15.3461L24.6693 19.9998L23.6 21.0536L20.7653 18.2191V24.6536H19.2655ZM21.0155 29.4498V27.9343C21.7423 27.8446 22.4349 27.663 23.0932 27.3893C23.7516 27.1155 24.359 26.7587 24.9155 26.3191L26.0038 27.4036C25.2859 27.9587 24.5058 28.4103 23.6635 28.7583C22.8212 29.1065 21.9385 29.337 21.0155 29.4498ZM24.9193 13.6998C24.3564 13.2665 23.7484 12.9081 23.0953 12.6248C22.4421 12.3415 21.752 12.155 21.025 12.0653V10.5498C21.948 10.6563 22.8291 10.8851 23.6683 11.2363C24.5074 11.5876 25.2859 12.0409 26.0038 12.5961L24.9193 13.6998ZM27.4038 25.9691L26.3345 24.8998C26.7678 24.3435 27.123 23.7361 27.4 23.0778C27.677 22.4195 27.8603 21.7268 27.95 20.9998H29.4653C29.3652 21.9228 29.1355 22.8055 28.776 23.6478C28.4163 24.4901 27.9589 25.2639 27.4038 25.9691ZM27.95 18.9998C27.8603 18.2728 27.677 17.5801 27.4 16.9218C27.123 16.2635 26.7678 15.6561 26.3345 15.0998L27.423 14.0113C27.9653 14.7293 28.4131 15.5095 28.7663 16.3518C29.1194 17.1941 29.3524 18.0768 29.4653 18.9998H27.95Z",fill:"#00BD81"}))),Z=()=>a.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_2265_983",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},a.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_2265_983)"},a.createElement("path",{d:"M8.00081 14.3337C7.13248 14.3337 6.31304 14.1672 5.54248 13.8343C4.77193 13.5014 4.09993 13.0482 3.52648 12.4747C2.95293 11.9012 2.4997 11.2292 2.16681 10.4587C1.83393 9.6881 1.66748 8.86866 1.66748 8.00033C1.66748 7.1251 1.83393 6.30394 2.16681 5.53683C2.4997 4.76972 2.95293 4.09944 3.52648 3.52599C4.09993 2.95244 4.77193 2.49921 5.54248 2.16633C6.31304 1.83344 7.13248 1.66699 8.00081 1.66699C8.87604 1.66699 9.6972 1.83344 10.4643 2.16633C11.2314 2.49921 11.9017 2.95244 12.4751 3.52599C13.0487 4.09944 13.5019 4.76972 13.8348 5.53683C14.1677 6.30394 14.3341 7.1251 14.3341 8.00033C14.3341 8.86866 14.1677 9.6881 13.8348 10.4587C13.5019 11.2292 13.0487 11.9012 12.4751 12.4747C11.9017 13.0482 11.2314 13.5014 10.4643 13.8343C9.6972 14.1672 8.87604 14.3337 8.00081 14.3337ZM8.00081 13.3195C8.34104 12.8683 8.62737 12.4132 8.85982 11.9542C9.09226 11.4952 9.28159 10.9934 9.42782 10.449H6.57381C6.72859 11.0106 6.92009 11.5208 7.14832 11.9798C7.37643 12.4388 7.66059 12.8854 8.00081 13.3195ZM6.70982 13.1362C6.45426 12.7695 6.22476 12.3527 6.02132 11.8857C5.81787 11.4185 5.65976 10.9397 5.54698 10.449H3.28548C3.63759 11.1413 4.10981 11.723 4.70215 12.194C5.29448 12.6649 5.9637 12.9789 6.70982 13.1362ZM9.29182 13.1362C10.0379 12.9789 10.7071 12.6649 11.2995 12.194C11.8918 11.723 12.364 11.1413 12.7161 10.449H10.4546C10.3204 10.9439 10.1516 11.4249 9.94815 11.892C9.74482 12.3591 9.52604 12.7738 9.29182 13.1362ZM2.86615 9.44899H5.34448C5.30259 9.20122 5.2722 8.95827 5.25331 8.72016C5.23454 8.48216 5.22515 8.24222 5.22515 8.00033C5.22515 7.75844 5.23454 7.51849 5.25331 7.28049C5.2722 7.04238 5.30259 6.79944 5.34448 6.55166H2.86615C2.80204 6.7781 2.75293 7.01355 2.71881 7.25799C2.68459 7.50244 2.66748 7.74988 2.66748 8.00033C2.66748 8.25077 2.68459 8.49822 2.71881 8.74266C2.75293 8.98711 2.80204 9.22255 2.86615 9.44899ZM6.34431 9.44899H9.65732C9.69909 9.20122 9.72943 8.96044 9.74831 8.72666C9.76709 8.49288 9.77648 8.25077 9.77648 8.00033C9.77648 7.74988 9.76709 7.50777 9.74831 7.27399C9.72943 7.04022 9.69909 6.79944 9.65732 6.55166H6.34431C6.30254 6.79944 6.2722 7.04022 6.25331 7.27399C6.23454 7.50777 6.22515 7.74988 6.22515 8.00033C6.22515 8.25077 6.23454 8.49288 6.25331 8.72666C6.2722 8.96044 6.30254 9.20122 6.34431 9.44899ZM10.6571 9.44899H13.1355C13.1996 9.22255 13.2487 8.98711 13.2828 8.74266C13.317 8.49822 13.3341 8.25077 13.3341 8.00033C13.3341 7.74988 13.317 7.50244 13.2828 7.25799C13.2487 7.01355 13.1996 6.7781 13.1355 6.55166H10.6571C10.699 6.79944 10.7294 7.04238 10.7483 7.28049C10.7671 7.51849 10.7765 7.75844 10.7765 8.00033C10.7765 8.24222 10.7671 8.48216 10.7483 8.72016C10.7294 8.95827 10.699 9.20122 10.6571 9.44899ZM10.4546 5.55166H12.7161C12.3598 4.85077 11.8908 4.2691 11.3091 3.80666C10.7275 3.34433 10.055 3.0281 9.29182 2.85799C9.54737 3.24599 9.7747 3.67038 9.97382 4.13116C10.173 4.59183 10.3333 5.06533 10.4546 5.55166ZM6.57381 5.55166H9.42782C9.27304 4.99433 9.07837 4.48083 8.84382 4.01116C8.60915 3.54149 8.32815 3.09816 8.00081 2.68116C7.67348 3.09816 7.39248 3.54149 7.15781 4.01116C6.92326 4.48083 6.72859 4.99433 6.57381 5.55166ZM3.28548 5.55166H5.54698C5.66831 5.06533 5.82859 4.59183 6.02781 4.13116C6.22693 3.67038 6.45426 3.24599 6.70982 2.85799C5.94226 3.0281 5.26876 3.34544 4.68931 3.80999C4.10976 4.27444 3.64181 4.85499 3.28548 5.55166Z",fill:"#666666"}))),D=()=>a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_2324_772",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},a.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_2324_772)"},a.createElement("path",{d:"M12 1.59619L21.5 7.25369V20.4999H2.5V7.25369L12 1.59619ZM12 12.6499L19.8 7.99994L12 3.34994L4.2 7.99994L12 12.6499ZM12 14.4037L4 9.62294V18.9999H20V9.62294L12 14.4037Z",fill:"#0C1083"}))),F=()=>a.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_2097_3575",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"40",height:"40"},a.createElement("rect",{width:"40",height:"40",fill:"#D9D9D9"})),a.createElement("g",{mask:"url(#mask0_2097_3575)"},a.createElement("path",{d:"M20 2.66113L35.8334 12.0903V34.1674H4.16669V12.0903L20 2.66113ZM20 21.0841L33 13.3341L20 5.58405L7.00002 13.3341L20 21.0841ZM20 24.007L6.66669 16.0391V31.6674H33.3334V16.0391L20 24.007Z",fill:"#0C1083"}))),I=({icon:e,onInfo:t,onBack:r,title:n,closeButton:l=!1,onClose:i})=>a.createElement("div",{className:"w-full flex items-center justify-between h-16"},"info"===e?a.createElement("button",{onClick:t,className:"size-6 flex justify-center items-center hover:bg-gray-100 rounded-full transition duration-300"},a.createElement(k,null)):"back"===e?a.createElement("button",{onClick:r,className:"size-6 cursor-pointer flex justify-center items-center"},a.createElement(N,null)):a.createElement("div",{className:"size-6"}),a.createElement("p",{className:"text-lg font-semibold text-center flex-grow select-none"},n),l?a.createElement("button",{onClick:i,className:"cursor-pointer"},a.createElement(M,null)):a.createElement("div",{className:"w-6"})),z=({isClosing:e,onClose:t})=>a.createElement("div",{className:"fixed inset-0 z-40 bg-black bg-opacity-[0.05] "+(e?"animate-fadeOut":"animate-fadeIn"),onClick:t}),U=({isOpen:e,onClose:t=()=>{},onBack:r,onInfo:o,children:s,title:c,icon:d,closeButton:m=!0})=>{const[w,p]=n("auto"),[u,g]=n(!1),h=i(null),b=Ze(),{isOpening:f,isClosing:C,handleClose:x}=(e=>{const[t,r]=n({isOpening:!0,isClosing:!1,hasTransition:!1});return l((()=>{if(e&&t.isOpening){const e=setTimeout((()=>{r((e=>({...e,isOpening:!1})))}),300);return()=>clearTimeout(e)}}),[e,t.isOpening]),{...t,setHasTransition:e=>r((t=>({...t,hasTransition:e}))),handleClose:e=>{r((e=>({...e,isClosing:!0}))),setTimeout((()=>{r((e=>({...e,isClosing:!1}))),e()}),300)}}})(e),{appearance:v}=b.value.config,y=E(v.cornerRadius);return l((()=>{const e=()=>g(window.innerWidth<450);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),l((()=>{if(!e||!h.current)return;p(h.current.offsetHeight);const t=new ResizeObserver((()=>{h.current&&p(h.current.offsetHeight)}));return t.observe(h.current),()=>t.disconnect()}),[e,s]),e?a.createElement(a.Fragment,null,!b.value.isDemo&&a.createElement(z,{isClosing:C,onClose:()=>x(t)}),a.createElement("div",{className:`absolute inset-0 flex items-center justify-center z-[9999] ${C&&"animate-fadeOut"}`,onClick:e=>e.target===e.currentTarget&&x(t)},a.createElement("div",{className:"overflow-hidden shadow-[0px_4px_80px_0px_#00000008] border border-primary-100 box-border transition-all "+(u?"fixed bottom-0 left-0 w-full max-h-[90vh] !rounded-b-none":"relative !w-[360px]"),style:{height:"number"==typeof w?`${w}px`:w,opacity:C?"0":"1",transform:u?f||C?"translateY(100%)":"translateY(0%)":"none",transition:"height 300ms ease-in-out, opacity 300ms ease-out"+(u?", transform 300ms ease-out":""),backgroundColor:v.background,color:v.textColor,fontFamily:v.font,letterSpacing:"-0.03px",borderRadius:y}},a.createElement("div",{ref:h,className:"px-6 pb-4"},a.createElement(I,{icon:d,onInfo:o,onBack:r,title:c,closeButton:m,onClose:()=>x(t)}),s)))):null},P={small:"h-8 text-sm gap-1",medium:"h-12 text-sm gap-2",large:"h-14 text-base gap-2"},j={outline:"border border-primary-500 text-primary-600 hover:bg-primary-50 disabled:border-gray-300 disabled:text-gray-400",text:"!text-gray-700 hover:bg-gray-50 disabled:text-gray-400",fill:"bg-primary-500 text-white hover:bg-primary-700 disabled:bg-gray-400"},W={enabled:"!border-primary-100",disabled:"pointer-events-none",selected:"ring-2 ring-primary-600"},$=({size:e="large",variant:t="outline",state:r="enabled",children:n,startIcon:l,endIcon:i,onClick:o,style:s,className:c})=>{const d=Ze(),m=E(d.value.config.appearance.cornerRadius);return a.createElement("button",{onClick:o,className:`flex justify-center items-center px-[10px] transition-all disabled:cursor-not-allowed disabled:opacity-50 w-full ${P[e]} ${j[t]} ${W[r]} ${c}`,disabled:"disabled"===r,style:{borderRadius:m,...s}},l&&a.createElement("span",null,l),a.createElement("span",null,n),i&&a.createElement("span",null,i))},G=({button:e,onButtonClick:t,borderRadius:r})=>a.createElement("button",{onClick:t,style:{borderRadius:r},className:"bg-white border border-primary-100 text-primary-500 text-sm font-semibold px-3 py-1"},e),K=({label:e,placeholder:t="Input",error:r,helperText:n,iconRight:l,iconLeft:i,button:o,onButtonClick:s,customLabel:c,value:d,onChange:m})=>{const w=Ze(),p=E(w.value.config.appearance.cornerRadius);return a.createElement("div",{className:"w-full flex flex-col"},e&&a.createElement("label",{className:"flex justify-between text-sm ml-2 mb-1 "+(r?"text-lightRed-300":"text-gray-800")},a.createElement("span",null,e),a.createElement("span",null,c)),a.createElement("div",{className:`flex items-center w-full border px-3 py-2 transition-all \n ${r?"border-lightRed-300":"border-primary-100"} \n focus-within:ring-1`,style:{"--tw-ring-color":w.value.config.appearance.accent,borderRadius:p}},i&&a.createElement("div",{className:"mr-2"},i),a.createElement("input",{type:"text",value:d,placeholder:t,className:"bg-transparent outline-none text-gray-700 placeholder-gray-500 w-[90%] mr-2",onChange:m}),o&&a.createElement(G,{button:o,onButtonClick:s,borderRadius:p}),l&&a.createElement("div",{className:"ml-2"},l)),n&&a.createElement("p",{className:"text-xs mt-1 "+(r?"text-lightRed-300":"text-gray-400")},n))},X=()=>a.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M41.1831 23H39.8169L26 55.8213L26.0419 55.8375H29.7281L32.4944 49.2707C38.2396 51.2168 44.4666 51.1844 50.1924 49.1784L52.9958 55.8375H54.9581L55 55.8213L41.1831 23ZM41.2105 49.4666C38.412 49.4666 35.6312 49.0116 32.9777 48.1228L41.3619 28.202L49.7107 48.0321C46.9767 48.9809 44.1041 49.4666 41.2105 49.4666Z",fill:"#0691B7"})),Y=()=>a.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("g",{clipPath:"url(#clip0_54_32)"},a.createElement("path",{d:"M39.898 61.6041C38.776 62.2821 37.324 62.3741 36.07 61.6801L32.782 59.8601C29.404 57.9961 28.194 53.7401 30.088 50.3761L33.282 44.6981L38.256 59.5521C38.556 60.4561 39.156 61.1621 39.896 61.6061L39.898 61.6041ZM50.746 32.0461L46.51 44.6961L39.898 32.9501L49.154 16.4981C49.614 15.6801 50.854 15.9381 50.95 16.8681L51.664 23.5781C51.972 26.4341 51.656 29.3221 50.744 32.0461H50.746Z",fill:"#B8BAC4"}),a.createElement("path",{d:"M46.5099 44.6961L41.5399 59.5501C41.2379 60.4501 40.6399 61.1541 39.8999 61.6021C39.1579 61.1581 38.5539 60.4521 38.2579 59.5501L33.2839 44.6961L39.8979 32.9501L46.5099 44.6961Z",fill:"black"}),a.createElement("path",{d:"M39.8979 32.9499L33.2799 44.6959L29.0459 32.0459C28.1339 29.3199 27.8179 26.4339 28.1259 23.5779L28.8399 16.8679C28.9399 15.9359 30.1759 15.6779 30.6339 16.4979L39.8979 32.9499ZM47.0099 59.8599L43.7239 61.6799C42.4639 62.3739 41.0179 62.2799 39.8979 61.6019C40.6399 61.1539 41.2379 60.4499 41.5379 59.5499L46.5079 44.6959L49.7019 50.3739C51.5959 53.7379 50.3859 57.9939 47.0099 59.8599Z",fill:"#B8BAC4"})),a.createElement("defs",null,a.createElement("clipPath",{id:"clip0_54_32"},a.createElement("rect",{width:"24",height:"48",fill:"white",transform:"translate(28.0001 16)"})))),q=()=>a.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("rect",{width:"80",height:"80",fill:"#533ABB"}),a.createElement("path",{d:"M36.1224 25.6667C34.9877 21.2577 30.9854 18 26.2222 18C20.5766 18 16 22.5766 16 28.2222C16 33.8678 20.5766 38.4444 26.2222 38.4444C30.9854 38.4444 34.9877 35.1868 36.1224 30.7778H44.963V39.2963H50.0741V30.7778H53.4814V39.2963H58.5926V30.7778H62V25.6667H36.1224ZM31.3333 28.2222C31.3333 31.045 29.045 33.3333 26.2222 33.3333C23.3995 33.3333 21.1111 31.045 21.1111 28.2222C21.1111 25.3995 23.3995 23.1111 26.2222 23.1111C29.045 23.1111 31.3333 25.3995 31.3333 28.2222Z",fill:"white"}),a.createElement("path",{d:"M41.8776 56.3333C43.0123 60.7423 47.0146 64 51.7778 64C57.4234 64 62 59.4233 62 53.7777C62 48.1321 57.4234 43.5555 51.7778 43.5555C47.0146 43.5555 43.0123 46.8132 41.8776 51.2222H33.037V42.7036H27.9259V51.2222H24.5186V42.7036H19.4075V51.2222H16V56.3333H41.8776ZM46.6667 53.7777C46.6667 50.955 48.955 48.6666 51.7778 48.6666C54.6005 48.6666 56.8889 50.955 56.8889 53.7777C56.8889 56.6005 54.6005 58.8888 51.7778 58.8888C48.955 58.8888 46.6667 56.6005 46.6667 53.7777Z",fill:"white"})),J=()=>a.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("rect",{width:"80",height:"80",fill:"#14142B"}),a.createElement("path",{d:"M31.4709 25.298C32.4989 23.5176 33.6931 22.7759 34.9056 22.7037C37.3649 22.5412 42.8633 26.5906 41.1236 28.9951L44.3825 34.6802C46.4644 36.425 48.5728 37.7992 50.7331 38.7119C50.3293 40.4023 51.2694 41.0081 52.2177 41.6045C50.9529 39.3902 53.4296 38.1604 54.7645 40.3573C56.1435 42.2914 56.5128 44.2986 55.6869 45.862C54.4658 48.2032 51.1897 49.9382 49.7051 52.1168C52.7276 49.3783 56.7936 49.6856 58.4012 46.5034C59.4023 44.5328 56.8993 38.6941 55.7311 36.7234C53.9213 33.6954 51.6641 34.5719 51.4091 35.5484C49.0112 34.2374 46.8769 32.1586 44.6984 30.4227C45.7173 29.5283 46.2973 28.2356 45.1824 27.5394C42.8983 26.0936 40.2459 21.7728 36.8026 20.9318C36.4598 20.847 36.1106 20.8011 35.7638 20.8011C33.9691 20.8011 32.2139 22.0183 31.4709 25.298Z",fill:"#4E4B66"}),a.createElement("path",{d:"M37.3473 76.875C40.0511 76.875 42.6867 76.5119 45.1848 75.8381C29.8061 79.9719 20.4061 62.3648 32.0948 49.9836C27.7906 48.8179 25.0244 44.4789 25.2962 39.2993C2.07278 56.3288 13.0876 76.875 37.3473 76.875ZM45.1893 75.8369C45.2134 75.83 45.2371 75.8244 45.2613 75.8175C45.2376 75.8238 45.213 75.8306 45.1893 75.8369Z",fill:"#C19CFC"}),a.createElement("path",{d:"M40.2192 20.5976C41.2212 21.2484 42.1605 22.1161 43.0301 22.9927C51.1726 21.2124 46.0253 13.3299 50.2589 10.2479C44.9099 12.1098 48.2739 20.8412 40.2192 20.5976Z",fill:"#C19CFC"}),a.createElement("path",{d:"M26.8951 26.9884L31.4711 25.2979C30.3556 16.0778 43.0391 12.3357 38.7527 3.125C38.5683 13.5557 25.8671 13.791 26.8951 26.9884Z",fill:"#C19CFC"}),a.createElement("path",{d:"M38.4804 47.0009C40.7549 45.9524 43.0213 44.5328 45.2963 45.2018C42.8014 43.5662 39.7365 44.3524 36.6443 44.5693C32.4899 44.8584 28.2741 44.4967 25.2961 39.2994C26.5614 45.8709 32.4198 49.7938 38.4804 47.0009Z",fill:"#C19CFC"}),a.createElement("path",{d:"M36.8114 13.5378C34.22 17.0091 30.8738 20.3717 31.4711 25.2978C32.358 21.3837 34.6862 20.4074 36.8028 20.9316C40.246 21.7726 42.8984 26.0934 45.1825 27.5392C46.2975 28.2354 45.7175 29.5281 44.6985 30.4225C46.877 32.1584 49.0113 34.2372 51.4092 35.5482C51.6642 34.5717 53.9215 33.6952 55.7311 36.7232C56.8994 38.6939 59.4025 44.5326 58.4013 46.5032C56.7937 49.6854 52.7277 49.3781 49.7051 52.1166C47.8608 48.7001 44.1722 47.8319 40.439 47.2809C41.9587 46.1148 43.5043 45.0662 45.2963 45.2017C43.0213 44.5326 40.755 45.9522 38.4804 47.0008C32.4198 49.7937 26.5614 45.8707 25.2962 39.2992C25.0244 44.4787 27.7906 48.8178 32.0948 49.9834C20.3866 62.3852 29.8376 80.03 45.2613 75.8175C58.4191 72.2194 68.125 59.8815 68.125 45.2017C68.125 32.1856 60.4915 21.0042 49.5827 16.1321C50.0835 19.0154 50.7158 21.7993 45.6651 25.6141C44.0753 24.2399 42.3011 21.9446 40.2191 20.5976C44.9184 20.7423 45.7265 17.8314 46.6576 15.0113C43.6573 14.0307 40.5251 13.5327 37.3768 13.5327C37.1884 13.5327 36.9999 13.5346 36.8114 13.5378ZM36.592 29.1214C37.1715 29.2386 37.7602 29.7267 38.296 30.2782C39.1656 31.1731 39.9915 31.3272 41.045 30.3869L44.3826 34.68L41.1237 28.9949C41.08 29.4471 40.7199 29.5552 40.281 29.5281C39.5171 29.4799 38.5533 28.9317 37.5421 28.9312C37.2284 28.9312 36.9102 28.9841 36.592 29.1214ZM52.2178 41.6043C52.7536 40.6734 53.4821 40.0676 54.7646 40.3571C54.272 39.5461 53.6237 39.2022 53.0655 39.2022C52.1108 39.2022 51.4197 40.2072 52.2178 41.6043Z",fill:"#C19CFC"}),a.createElement("path",{d:"M34.4399 16.6296C32.5865 19.1329 31.0581 21.8274 31.4711 25.2982C32.358 21.3841 34.6862 20.4077 36.8028 20.932C40.246 21.773 42.8984 26.0937 45.1825 27.5396C46.2975 28.2358 45.7175 29.5285 44.6985 30.4229C46.877 32.1588 49.0113 34.2376 51.4093 35.5486C51.6642 34.5722 53.9215 33.6956 55.7311 36.7236C56.8994 38.6942 59.4025 44.533 58.4013 46.5036C56.7938 49.6858 52.7277 49.3785 49.7051 52.117C47.8608 48.7006 44.1722 47.8324 40.439 47.2814C41.9587 46.1152 43.5043 45.0666 45.2963 45.2021C43.0213 44.533 40.755 45.9526 38.4805 47.0012C32.4198 49.7941 26.5614 45.8711 25.2962 39.2996C25.0244 44.4791 27.7906 48.8181 32.0948 49.9838C24.4708 58.056 25.8148 68.3512 31.9363 73.395C49.0996 76.8656 65.2613 63.3887 65.2613 45.2021C65.2613 33.9757 59.0073 24.2586 49.8813 19.5311C49.7143 21.3481 48.7482 23.2915 45.6651 25.6144C44.0753 24.2402 42.3011 21.945 40.2191 20.5979C43.3373 20.6884 44.7513 19.4412 45.6123 17.7592C42.9339 16.9055 40.134 16.4768 37.3318 16.4768C36.3666 16.4768 35.401 16.5274 34.4399 16.6296Z",fill:"#14142B"}),a.createElement("path",{d:"M32.0948 49.9834C20.3866 62.3853 29.8376 80.03 45.2613 75.8175C27.6154 76.6125 29.3631 55.9857 40.5533 50.1193C44.5761 50.6797 48.7213 51.3942 50.7158 55.0814C53.7284 52.3523 57.7949 52.6503 59.4111 49.4681C60.0612 48.1941 59.2358 45.2926 58.2606 42.8694C58.6471 44.3616 58.796 45.7353 58.4013 46.5033C56.7937 49.6854 52.7277 49.3781 49.7051 52.1166C47.8608 48.7001 44.1722 47.8319 40.439 47.2809C41.9587 46.1148 43.5043 45.0663 45.2963 45.2017C43.0213 44.5326 40.755 45.9523 38.4804 47.0008C32.4198 49.7937 26.5614 45.8708 25.2962 39.2992C25.0244 44.4788 27.7906 48.8178 32.0948 49.9834Z",fill:"#262338"}),a.createElement("path",{d:"M29.1416 26.4583L33.7175 25.6012C32.6021 16.3811 43.9749 14.1667 39.6486 5.625C39.6486 14.1667 27.6402 14.0533 29.1416 26.4583Z",fill:"#14142B"})),Q=()=>a.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("rect",{width:"80",height:"80",fill:"url(#paint0_linear_131_15)"}),a.createElement("path",{d:"M36.739 24.5C18.081 38.109 20.5055 59.3364 40.1713 59.3364C51.7479 59.3364 58.5892 51.6392 56.239 41C55 34.5 48.239 27.9485 48.239 28.5C48.239 38 40.739 45 33.739 47C31.739 30 43.239 21 43.239 21C43.239 21 39.7388 22.3119 36.739 24.5Z",fill:"white"}),a.createElement("defs",null,a.createElement("linearGradient",{id:"paint0_linear_131_15",x1:"20",y1:"20.625",x2:"108.125",y2:"113.125",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#33B2CB"}),a.createElement("stop",{offset:"0.28",stopColor:"#1B99B5"})))),ee=({fill:e="black"})=>a.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("g",{clipPath:"url(#clip0_44_35)"},a.createElement("path",{d:"M27.8949 12.4346L25.2459 13.7842L12.4541 20.2997C12.4109 19.9698 12.3891 19.6374 12.389 19.3047C12.3907 17.9771 12.7393 16.673 13.4001 15.5216C14.0609 14.3702 15.0111 13.4113 16.1565 12.7401C17.3019 12.0689 18.6028 11.7086 19.9303 11.6948C21.2578 11.6811 22.5659 12.0144 23.725 12.6617L25.2412 11.8891L25.4674 11.7737C24.0784 10.7656 22.4378 10.1611 20.7267 10.0271C19.0157 9.8931 17.3009 10.2348 15.7719 11.0144C14.2429 11.794 12.9593 12.9812 12.0628 14.4448C11.1663 15.9083 10.692 17.5912 10.6922 19.3075C10.6922 19.5445 10.7012 19.7806 10.7192 20.0158C10.7444 20.3489 10.6705 20.6819 10.5069 20.9731C10.3432 21.2642 10.0971 21.5005 9.79954 21.6521L9 22.0598V23.9614L11.354 22.7616L12.1163 22.3726L12.8674 21.99L26.3526 15.119L27.8679 14.3473L31 12.751V10.8504L27.8949 12.4346Z",fill:e}),a.createElement("path",{d:"M31 14.6539L13.6334 23.4963L12.1181 24.2698L9 25.8586V27.7584L12.0967 26.1807L14.7457 24.8311L27.5505 18.3063C27.5938 18.6384 27.6156 18.9729 27.6157 19.3078C27.6148 20.6369 27.2664 21.9427 26.6049 23.0955C25.9435 24.2484 24.992 25.2081 23.8449 25.8796C22.6978 26.551 21.3951 26.9107 20.066 26.9231C18.737 26.9354 17.4278 26.5999 16.2685 25.9499L16.1754 25.9992L14.5316 26.8369C15.9203 27.8451 17.5606 28.4497 19.2714 28.584C20.9822 28.7184 22.6968 28.3771 24.2258 27.5981C25.7548 26.819 27.0386 25.6324 27.9355 24.1693C28.8323 22.7063 29.3073 21.0238 29.3078 19.3078C29.3078 19.0686 29.2985 18.8294 29.2808 18.5929C29.2557 18.26 29.3295 17.9271 29.4929 17.636C29.6564 17.3448 29.9022 17.1085 30.1995 16.9566L31 16.5489V14.6539Z",fill:e})),a.createElement("defs",null,a.createElement("clipPath",{id:"clip0_44_35"},a.createElement("rect",{width:"22",height:"18.6157",fill:"white",transform:"translate(9 10)"})))),te=({fill:e="black"})=>a.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M12.7847 3.8762L11.1792 4.69416L3.42667 8.64294C3.40045 8.443 3.38726 8.24156 3.38718 8.03991C3.38824 7.23531 3.59948 6.44495 3.99999 5.74711C4.40049 5.04928 4.97635 4.46818 5.67054 4.06138C6.36472 3.65458 7.15314 3.4362 7.9577 3.42786C8.76225 3.41952 9.55503 3.62152 10.2575 4.01385L11.1764 3.54563L11.3135 3.47568C10.4717 2.86469 9.47736 2.49834 8.44036 2.41713C7.40337 2.33591 6.36411 2.543 5.43745 3.01549C4.51079 3.48799 3.73281 4.20749 3.1895 5.09449C2.64619 5.98149 2.3587 7.00143 2.35881 8.0416C2.35881 8.18526 2.36426 8.32836 2.37517 8.47089C2.39044 8.67273 2.34567 8.87458 2.2465 9.05105C2.14733 9.22751 1.99818 9.3707 1.81782 9.4626L1.33325 9.70968V10.8622L2.75989 10.135L3.2219 9.89922L3.67713 9.66737L11.85 5.5031L12.7684 5.03545L14.6666 4.068V2.91608L12.7847 3.8762ZM14.6666 5.22104L4.1414 10.5801L3.22302 11.0489L1.33325 12.0118V13.1632L3.21005 12.207L4.81551 11.389L12.576 7.43462C12.6022 7.63588 12.6154 7.83863 12.6155 8.0416C12.615 8.84713 12.4038 9.63852 12.0029 10.3372C11.602 11.0359 11.0253 11.6176 10.3302 12.0245C9.63497 12.4314 8.84544 12.6494 8.03995 12.6569C7.23446 12.6644 6.44101 12.4611 5.7384 12.0671L5.68199 12.097L4.68577 12.6047C5.52738 13.2157 6.52152 13.5822 7.55835 13.6636C8.59519 13.745 9.63434 13.5382 10.561 13.066C11.4877 12.5938 12.2658 11.8747 12.8093 10.988C13.3528 10.1013 13.6407 9.08162 13.641 8.0416C13.641 7.89662 13.6354 7.75165 13.6247 7.60836C13.6094 7.40659 13.6541 7.20481 13.7532 7.02837C13.8523 6.85193 14.0012 6.70869 14.1814 6.61665L14.6666 6.36957V5.22104Z",fill:e})),re=()=>{const[e,t]=n(""),[r,l]=n("");return a.createElement("div",null,a.createElement("div",{className:"mb-4"},a.createElement(K,{label:"Amount",placeholder:"0.00",value:e,onChange:e=>t(e.target.value),customLabel:a.createElement("span",{onClick:()=>{t("345.00")},className:"inline-flex text-primary-500 mr-2"},"Max",a.createElement(O,null)),button:a.createElement("span",{className:"flex justify-between gap-1 text-black"},a.createElement("span",{className:"flex justify-center items-center"},a.createElement(te,{fill:"black"})),"XLM")})),a.createElement("div",{className:"mb-4"},a.createElement(K,{label:"To",placeholder:"Enter address",value:r,onChange:e=>l(e.target.value),button:"Paste",onButtonClick:()=>{navigator.clipboard.readText().then((e=>l(e)))}})),a.createElement("div",{className:"w-full my-4 mb-8"},a.createElement("div",{className:"absolute left-0 right-0 bg-primary-100 h-[0.5px]"})),a.createElement($,{size:"large",variant:"outline",state:"enabled",onClick:()=>{}},"Send"))},ae=({variant:e="default",startIcon:t,endArrow:r,label:l,onClick:i,onChange:o,onEnter:s,onSubmit:c,inputType:d="text"})=>{const m=Ze(),{appearance:w}=m.value.config,p=E(w.cornerRadius),[u,g]=n(l||""),[h,b]=n(!1),[f,C]=n(!1),x=e=>"email"===d?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e):""!==e.trim();return a.createElement("div",{onClick:"input"===e?void 0:i,className:"flex items-center w-full h-14 border transition-all px-[10px] py-2 "+("input"===e?"cursor-text":"cursor-pointer"),style:{borderRadius:p,color:w.textColor,borderColor:f?w.accent:"#cdceee"},onMouseEnter:t=>{"social"===e||f||(t.currentTarget.style.borderColor=w.accent)},onMouseLeave:t=>{"social"===e||f||(t.currentTarget.style.borderColor="#cdceee")}},a.createElement("span",{style:{borderRadius:p},className:"flex-shrink-0 flex justify-center items-center border border-primary-100 size-10 overflow-hidden"},t),a.createElement("div",{className:"relative flex-1 flex items-center ml-4 mr-1"},"input"===e?a.createElement(a.Fragment,null,a.createElement("input",{type:d,value:u,onChange:e=>{const t=e.target.value;g(t),b(x(t)),null==o||o(t)},onKeyDown:e=>{"Enter"===e.key&&h&&(null==s||s(u))},placeholder:"Email",className:"bg-transparent outline-none placeholder:text-gray-600 w-full mr-1",style:{color:w.textColor},onFocus:()=>C(!0),onBlur:()=>{C(!1),x(u)||b(!1)}}),a.createElement("div",{className:"bg-transparent w-[100px] h-10 flex justify-center items-center"},a.createElement("button",{disabled:!h,onClick:()=>null==c?void 0:c(u),style:{borderRadius:p,color:h?w.accent:"#9ca3af",borderColor:h?w.accent:"#9ca3af"},className:"absolute right-0 bg-white border text-sm font-medium flex justify-center items-center h-8 !w-[68px]"},"Submit"))):a.createElement("span",{className:"font-medium"},l)),r&&a.createElement("span",{className:"ml-auto mr-1 flex items-center"},a.createElement(L,null)))},ne=e=>navigator.clipboard.writeText(e),le=(e,t=8)=>e.slice(0,t)+"..."+e.slice(-t),ie=e=>{const t=Object.entries(x).find((([,t])=>t===e));if(!t)throw new Error(`Unknown network passphrase: ${e}`);return t[0].toLowerCase()},oe={public:"https://horizon.stellar.org",testnet:"https://horizon-testnet.stellar.org",futurenet:"https://horizon-futurenet.stellar.org"},se={theme:"light",background:"#ffffff",accent:"#0C1083",textColor:"#000000",font:"Inter",cornerRadius:"full",cover:""},ce=({publicKey:e,passphrase:r})=>{const[a,i]=n(null),[o,s]=n(!0),[c,d]=n(null);return l((()=>{let a=!0,n=null;const l=async t=>{try{const r=await t.loadAccount(e);if(!a)return;i((e=>{return{id:r.id,sequence:r.sequence,subentry_count:r.subentry_count,thresholds:r.thresholds,balances:r.balances,xlmBalance:(t=r.balances,(null===(a=t.find((e=>"native"===e.asset_type)))||void 0===a?void 0:a.balance)||"0"),transactions:null==e?void 0:e.transactions};var t,a})),d(null)}catch(e){a&&!c&&(d(e.message),i(null))}},o=async t=>{try{const r=await t.transactions().forAccount(e).limit(10).order("desc").call();if(!a)return;i((e=>e?{...e,transactions:r.records}:null))}catch(e){a&&!c&&d(e.message)}};return(async()=>{if(!e)return d("No public key provided"),void s(!1);try{const i=(e=>{const r=oe[e];return new t.Server(r)})(ie(r));s(!0),await Promise.all([l(i),o(i)]),n=i.operations().forAccount(e).cursor("now").stream({onmessage:()=>l(i),onerror:e=>{a&&!c&&d(e.data.message)}})}finally{a&&s(!1)}})(),()=>{a=!1,n&&n()}}),[e,r]),{account:a,loading:o,error:c}};function de(e,t=!1){const r="number"==typeof e?e:parseFloat(e);if(isNaN(r)||0===r)return"0";if(r<1e-6)return e.toString();if(t){if(r>=1e6)return`${(r/1e6).toFixed(2)}m`;if(r>=1e3)return`${(r/1e3).toFixed(2)}k`}return function(e){const[t,r]=e.split(".");return r?`${t.replace(/\B(?=(\d{3})+(?!\d))/g,",")}.${r}`:t.replace(/\B(?=(\d{3})+(?!\d))/g,",")}(function(e){var t;const r=e.toString(),[a,n=""]=r.split(".");if(!n)return a;const l=null!==(t={0:8,1:7,2:6,3:5,4:4,5:3,6:2}[a.length])&&void 0!==t?t:0;return l>0?`${a}.${n.slice(0,l)}`:a}(r))}const me=()=>{var e,t,r;const i=Ze(),{disconnect:o}=De(),[s,c]=n((null===(e=i.value.user.wallet)||void 0===e?void 0:e.address)||""),{account:d}=ce({publicKey:null===(t=i.value.user.wallet)||void 0===t?void 0:t.address,passphrase:i.value.config.networks[0]});l((()=>{var e;c(null===(e=i.value.user.wallet)||void 0===e?void 0:e.address)}),[null===(r=i.value.user.wallet)||void 0===r?void 0:r.address]);return a.createElement("div",{className:"flex flex-col items-center justify-center"},a.createElement("div",{className:"size-[73px] rounded-full bg-lightBlue-200 mt-4"}),a.createElement("p",{className:"inline-flex gap-1 text-base cursor-pointer text-gray-700 mt-6 mb-4",onClick:()=>{var e;ne(null===(e=i.value.user.wallet)||void 0===e?void 0:e.address)}},s?le(s,5):"",a.createElement(S,null)),a.createElement("p",{className:"text-primary-500 text-center"},d?de(d.xlmBalance):"N/A"," XLM"),a.createElement("div",{className:"space-y-2 mt-[16px] w-full"},a.createElement(ae,{endArrow:!0,label:"Send",startIcon:a.createElement(H,null),onClick:()=>{i.setRoute(v.SEND)}}),a.createElement(ae,{endArrow:!0,label:"Activity",startIcon:a.createElement(B,null),onClick:()=>{i.setRoute(v.ACTIVITY)}})),a.createElement("div",{className:"w-full flex justify-center items-center h-8"},a.createElement("div",{className:"absolute left-0 right-0 bg-primary-100 h-[1px]"})),a.createElement($,{size:"medium",variant:"text",state:"enabled",startIcon:a.createElement(_,null),onClick:()=>{o()}},"Disconnect"))},we=e=>{switch(e){case"Rabet":return a.createElement(Y,null);case"Freighter":return a.createElement(q,null);case"Albedo":return a.createElement(X,null);case"LOBSTR":return a.createElement(Q,null);case"xBull":return a.createElement(J,null);default:return null}},pe=async(e,a,n,l)=>{if(!(null==e?void 0:e.signTransaction))throw new Error("Wallet does not support transaction signing.");const i=await e.signTransaction(a,{networkPassphrase:l,address:n}),o=await(async(e,a)=>{try{const n=new t.Server("https://horizon-testnet.stellar.org"),l=new r(e,a);return await n.submitTransaction(l)}catch(e){throw e}})(i,l);return o},ue={name:C.Rabet,website:"https://rabet.io",isAvailable:()=>new Promise((e=>{setTimeout((()=>e("undefined"!=typeof window&&!!window.rabet)),250)})),connect:async()=>{try{if(!window.rabet)throw new Error("Rabet Wallet is not installed.");return{publicKey:(await window.rabet.connect()).publicKey}}catch(e){throw new Error("Failed to connect to Rabet.")}},signTransaction:async(e,t={})=>{try{if(!window.rabet)throw new Error("Rabet Wallet is not installed.");return(await window.rabet.sign(e,t.networkPassphrase===x.PUBLIC?"mainnet":"testnet")).xdr}catch(e){throw new Error("Failed to sign the transaction with Rabet.")}},disconnect:async()=>{try{if(!window.rabet)throw new Error("Rabet Wallet is not installed.");window.rabet.disconnect()}catch(e){throw new Error("Failed to disconnect from Rabet.")}},getNetwork:async()=>{try{if(!window.rabet)throw new Error("Rabet Wallet is not installed.");return await window.rabet.getNetwork()}catch(e){throw new Error("Error getting network from Rabet:")}}},ge={name:C.Xbull,website:"https://xbull.app",isAvailable:()=>new Promise((e=>{setTimeout((()=>e("undefined"!=typeof window&&!!window.xBullSDK)),250)})),connect:async()=>{try{const e=new d,t=await e.connect();return e.closeConnections(),{publicKey:t}}catch(e){throw new Error("Failed to connect to xBull.")}},signTransaction:async(e,t={})=>{try{const r=new d,a=await r.sign({xdr:e,publicKey:null==t?void 0:t.address,network:(null==t?void 0:t.networkPassphrase)&&ie(null==t?void 0:t.networkPassphrase)});return r.closeConnections(),a}catch(e){throw new Error("Failed to sign the transaction with xBull.")}},getNetwork:async()=>{throw new Error("Failed to get network from xBull")}},he={name:C.Lobstr,website:"https://lobstr.co",isAvailable:async()=>!0,connect:async()=>{try{if(!await m())throw new Error("LOBSTR Wallet is not installed or connected.");return{publicKey:await w()}}catch(e){throw new Error("Failed to connect to LOBSTR.")}},signTransaction:async e=>{try{if(!p)throw new Error("LOBSTR Wallet does not support signing transactions.");return await p(e)}catch(e){throw new Error("Failed to sign the transaction with LOBSTR.")}},getNetwork:async()=>{throw new Error("Failed to get network from LOBSTR")}},be={name:C.Albedo,website:"https://albedo.link",isAvailable:()=>void 0!==u,connect:async()=>{try{return{publicKey:(await u.publicKey({token:"Connect to Albedo"})).pubkey}}catch(e){throw new Error("Failed to connect to Albedo.")}},signTransaction:async(e,t={})=>{try{const{address:r,submit:a}=t;return(await u.tx({xdr:e,pubkey:r,network:(null==t?void 0:t.networkPassphrase)&&ie(null==t?void 0:t.networkPassphrase),submit:a})).signed_envelope_xdr}catch(e){throw new Error("Failed to sign the transaction with Albedo.")}},getNetwork:async()=>{throw new Error("Failed to get network from albedo")}},fe={name:C.Freighter,website:"https://freighter.app",isAvailable:()=>new Promise((e=>{const t=setTimeout((()=>e(!1)),250);g.isConnected().then((({isConnected:r,error:a})=>{clearTimeout(t),e(!a&&r)})).catch((()=>{clearTimeout(t),e(!1)}))})),connect:async()=>{try{if(!await g.isConnected())throw new Error("Freighter Wallet is not installed or connected.");const e=await g.requestAccess();if(e.error&&"The user rejected this request."===e.error.message)throw new Error("Failed to connect to Freighter");if(""===e.address.trim())throw new Error("Failed to connect to Freighter.");return{publicKey:e.address}}catch(e){if("Failed to connect to Freighter."===e.message){return await fe.connect()}throw new Error("Failed to connect to Freighter.")}},signTransaction:async(e,t={})=>{try{if(!await g.isConnected())throw new Error("Freighter Wallet is not installed or connected.");return(await h(e,{address:null==t?void 0:t.address,networkPassphrase:null==t?void 0:t.networkPassphrase})).signedTxXdr}catch(e){throw new Error("Failed to sign the transaction with Freighter.")}},getNetwork:async()=>{try{if(!await g.isConnected())throw new Error("Freighter Wallet is not installed or connected.");const e=await g.getNetwork();if(e.error)throw new Error("Failed to get network from Freighter");return{network:e.network,passphrase:e.networkPassphrase}}catch(e){throw new Error("Failed to disconnect from Rabet.")}}},Ce={[C.Freighter]:fe,[C.Rabet]:ue,[C.Xbull]:ge,[C.Albedo]:be,[C.Lobstr]:he},xe=async()=>Promise.all(Object.values(Ce).map((async e=>{try{const t=await e.isAvailable();return{wallet:e,isAvailable:t}}catch(t){return{wallet:e,isAvailable:!1}}}))),ve=()=>{var e,t,r;const o=Ze(),s=i(!1),[c,d]=n(!1),[m,w]=n([]),[p,u]=n(null),{user:g}=o.value||{},h=o.value.waitingStatus,{xdr:b,resolver:f}=o.value.signTransaction;l((()=>{(async()=>{const e=await xe();w(e)})()}),[]),l((()=>{var e,t;if(!(null===(e=null==g?void 0:g.wallet)||void 0===e?void 0:e.name))return;const r=null===(t=m.find((({wallet:e})=>{var t;return e.name===(null===(t=null==g?void 0:g.wallet)||void 0===t?void 0:t.name)})))||void 0===t?void 0:t.wallet;r&&u(r)}),[m,null==g?void 0:g.wallet]),l((()=>{!s.current&&p&&(s.current=!0,C(p))}),[p]);const C=async e=>{var t;try{if("signing"===h){const r=await pe(e,b,null===(t=o.value.user.wallet)||void 0===t?void 0:t.address,o.value.config.networks[0]);f&&f(r),o.setValue((e=>({...e,signTransaction:{...e.signTransaction,result:r}}))),r?o.setRoute(v.SUCCESSFUL):d(!0)}else{const{publicKey:t}=await e.connect();if(t&&""!==t.trim()){const r=await(async(e,t)=>{try{const{passphrase:t}=await e.getNetwork();return t}catch(e){return t[0]}})(e,o.value.config.networks);o.setValue((a=>({...a,user:{...a.user,wallet:{passphrase:r,name:e.name,address:t}}}))),setTimeout((()=>{o.setRoute(v.SUCCESSFUL)}),400)}}}catch(e){throw d(!0),e}};return a.createElement("div",{className:"flex flex-col items-center justify-center w-full select-none mt-4"},a.createElement("div",{className:"h-20 w-20 flex justify-center border-2 rounded-full overflow-hidden items-center mb-6 "+(c?"border-lightRed-200":"border-primary-100")},we(null!==(t=null===(e=null==g?void 0:g.wallet)||void 0===e?void 0:e.name)&&void 0!==t?t:"")),a.createElement("div",{className:"space-y-1 flex-col text-center font-semibold"},a.createElement("p",{className:"text-xl"},c?"Failed "+("connecting"===h?"connecting to":"signing with"):""+("connecting"===h?"Waiting for":"Signing with")," ",null===(r=null==g?void 0:g.wallet)||void 0===r?void 0:r.name),a.createElement("p",{className:"text-sm"},c?`Please try ${"connecting"===h?"connecting":"signing"} again.`:("connecting"===h?"Accept connection":"Sign the")+" request in your wallet")),a.createElement("div",{className:"w-full flex justify-center items-center h-8"},a.createElement("div",{className:"absolute left-0 right-0 bg-primary-100 h-[1px]"})),c?a.createElement($,{onClick:()=>{d(!1),p&&C(p)},className:"text-white bg-lightRed-300 hover:text-primary-500"},"Try again"):a.createElement($,{state:"enabled",variant:"outline",startIcon:a.createElement(T,null)},"connecting"===h?"Connecting":"Signing"))},ye=(e,t)=>`https://stellar.expert/explorer/${ie(e)}/${t}`;var Ee=a.memo((({amount:e,date:t,status:r,action:n,hash:l})=>{const i=Ze();return a.createElement("div",{className:"flex items-center justify-between"},a.createElement("div",{className:"flex items-center gap-3"},a.createElement("div",{className:"w-8 h-8 flex items-center justify-center rounded-full "+("success"===r?"bg-green-100 text-green-600":"bg-red-100 text-red-600")},"success"===r?a.createElement(A,null):a.createElement(R,null)),a.createElement("div",null,a.createElement("p",{className:"text-xs text-gray-700 font-medium"},n),a.createElement("p",{className:"text-sm font-medium"},e," XLM"))),a.createElement("div",{className:"text-xs text-gray-500 flex items-center gap-2"},t,a.createElement("div",{className:"flex justify-center item-center rounded-full size-8 cursor-pointer bg-gray-50",title:"View transaction details",onClick:()=>{const e=ye(i.value.config.networks[0],`tx/${l}`);window.open(e,"_blank","noopener,noreferrer")}},a.createElement("span",{className:"flex justify-center items-center"},a.createElement(Z,null)))))}));const ke=()=>{var e;const t=Ze(),{account:r}=ce({publicKey:null===(e=t.value.user.wallet)||void 0===e?void 0:e.address,passphrase:t.value.config.networks[0]}),n=(null==r?void 0:r.transactions)||[];return a.createElement("div",null,a.createElement("div",{className:"my-4 h-[248px]"},n.map(((e,t)=>a.createElement("div",{key:t,className:"p-2 "+(t<n.length-1?"border-b border-dashed border-gray-300":"")},a.createElement(Ee,{amount:e.id.slice(0,5),date:e.created_at,status:e.successful?"success":"failed",action:e.memo_type,hash:e.hash}))))),a.createElement($,{state:"enabled",variant:"outline",size:"medium",className:"mt-4",onClick:()=>{var e;const r=ye(t.value.config.networks[0],`${null===(e=t.value.user.wallet)||void 0===e?void 0:e.address}`);window.open(r,"_blank","noopener,noreferrer")}},"See all in explorer"))},Le=()=>{const e=Ze(),t=e.value.waitingStatus;l((()=>{"connecting"===t&&setTimeout((()=>{e.setValue((e=>({...e,isModalOpen:!1,isAuthenticated:!0})))}),1e3),"signing"===t&&setTimeout((()=>{e.setValue((e=>({...e,isModalOpen:!1})))}),1e4)}),[]);return a.createElement("div",{className:"flex flex-col items-center justify-center w-full select-none mt-4"},a.createElement("div",{className:"size-12 flex justify-center rounded-full overflow-hidden items-center mb-6"},a.createElement(V,null)),a.createElement("div",{className:"space-y-1 w-full flex-col text-center"},a.createElement("p",{className:"text-xl font-semibold"},"connecting"===t?"Connection":"Transaction"," Successful"),a.createElement("p",{className:"text-sm text-center font-medium leading-5"},"connecting"===t?"Your account has been successfully connected":"Your transaction was successfully completed")),"signing"===t&&a.createElement($,{state:"enabled",variant:"outline",size:"small",className:"mt-4",onClick:()=>{var t;const r=null===(t=e.value.signTransaction.result)||void 0===t?void 0:t.hash;if(r){const t=ye(e.value.config.networks[0],`tx/${r}`);window.open(t,"_blank","noopener,noreferrer")}}},"See in explorer"),a.createElement("div",{className:"w-full my-4"},a.createElement("div",{className:"absolute left-0 right-0 bg-primary-100 h-[1px]"})),"connecting"===t?a.createElement($,{state:"enabled",variant:"outline"},"Logging In"):a.createElement($,{state:"enabled",variant:"fill"},"Done"))},Ne=e=>{const t=e.replace("#","");return(.299*parseInt(t.substring(0,2),16)+.587*parseInt(t.substring(2,4),16)+.114*parseInt(t.substring(4,6),16))/255>.5?"#000000":"#FFFFFF"},Me=({fill:e="black"})=>a.createElement("svg",{width:"150",height:"32",viewBox:"0 0 150 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("g",{clipPath:"url(#clip0_84_13134)"},a.createElement("path",{d:"M41.7486 0.558624H37.8855V25.7212H41.7486V0.558624Z",fill:e}),a.createElement("path",{d:"M66.5053 27.5581H37.9539V31.5305H66.5053V27.5581Z",fill:e}),a.createElement("path",{d:"M76.3978 0.546021H72.5347V25.6688H76.3978V0.546021Z",fill:e}),a.createElement("path",{d:"M103.444 0.546021H99.5806V25.6688H103.444V0.546021Z",fill:e}),a.createElement("path",{d:"M99.5805 27.5907H76.3992V31.4538H99.5805V27.5907Z",fill:e}),a.createElement("path",{d:"M27.9599 0.546021H1.08423V4.40916H27.9599V0.546021Z",fill:e}),a.createElement("path",{d:"M4.82359 12.6967V0.496552H0.960449V12.6967V14.0672V17.9303V27.5907V31.4538V31.4662H4.82359V31.4538H27.9627V27.5907H4.82359V17.9303H27.9627V14.0672H4.82359V12.6967Z",fill:e}),a.createElement("path",{d:"M31.7456 4.46902H28.0215V14.1517H31.7456V4.46902Z",fill:e}),a.createElement("path",{d:"M31.7456 17.8756H28.0215V27.5583H31.7456V17.8756Z",fill:e}),a.createElement("path",{d:"M108.558 2.7334L120.393 14.5661L123.129 11.8376L111.291 -9.15527e-05L108.558 2.7334Z",fill:e}),a.createElement("path",{d:"M125.991 20.1622L137.829 31.9999L140.557 29.2664L128.724 17.4337L125.991 20.1622Z",fill:e}),a.createElement("path",{d:"M120.39 17.4292L108.556 29.2634L111.289 31.9968L123.124 20.1626L120.39 17.4292Z",fill:e}),a.createElement("path",{d:"M125.991 11.8376L128.724 14.5711L140.557 2.7334L137.829 -9.15527e-05L125.991 11.8376Z",fill:e}),a.createElement("path",{d:"M143.479 0.538667H144.318V2.83768H144.84V0.538667H145.679V0.0619812H143.479V0.538667Z",fill:e}),a.createElement("path",{d:"M148.961 -9.15527e-05L147.641 1.72293L146.317 -9.15527e-05H146.24V2.83768H146.762V1.35052L147.613 2.49258H147.65L148.512 1.3381V2.83768H149.041V-9.15527e-05H148.961Z",fill:e})),a.createElement("defs",null,a.createElement("clipPath",{id:"clip0_84_13134"},a.createElement("rect",{width:"148.08",height:"32",fill:"white",transform:"translate(0.959717)"})))),Te=({otp:e,setOtp:t,error:r})=>{const n=e.length,o=Ze(),{appearance:s}=o.value.config,c=i([]),d=E(s.cornerRadius);l((()=>{r&&setTimeout((()=>{var e;return null===(e=c.current[0])||void 0===e?void 0:e.focus()}),1001)}),[r]);const m=e=>{e.preventDefault();const r=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,n);if(!r)return;const a=[...r.split(""),...Array(n-r.length).fill("")];t(a),setTimeout((()=>{var e;return null===(e=c.current[n-1])||void 0===e?void 0:e.focus()}),0)},w=e=>({borderRadius:"full"===s.cornerRadius?"20px":d,color:s.textColor,background:s.background,borderColor:r?"#FF6666":e?s.accent:"#cdceee"});return a.createElement("div",{className:"flex gap-1"},e.map(((r,l)=>a.createElement("input",{key:l,ref:e=>{c.current[l]=e},type:"text",inputMode:"numeric",maxLength:1,value:r,onChange:r=>((r,a)=>{var l;const i=a.target.value.replace(/\D/g,"");if(!i)return;const o=[...e];o[r]=i[0],t(o),r<n-1&&i&&(null===(l=c.current[r+1])||void 0===l||l.focus())})(l,r),onPaste:m,onKeyDown:r=>((r,a)=>{var n;if("Backspace"===a.key){const a=[...e];a[r]?(a[r]="",t(a)):r>0&&(null===(n=c.current[r-1])||void 0===n||n.focus(),a[r-1]="",t(a))}})(l,r),className:"w-12 h-14 text-center text-lg outline-none border",style:w(r)}))))},Ve=()=>{const{value:e}=Ze(),t=e.user.email,[r,i]=n(Array(6).fill("")),[o,s]=n(!1);return l((()=>{const e=r.join("");6===e.length&&(async e=>{s(!1),await new Promise((t=>{setTimeout((()=>{t("123456"===e)}),200)}))||(s(!0),setTimeout((()=>i(Array(6).fill(""))),1e3))})(e)}),[r,t]),a.createElement("div",{className:"flex flex-col items-center justify-center w-full select-none mt-4"},a.createElement("div",{className:"h-20 w-20 flex justify-center border-2 rounded-full overflow-hidden items-center mb-6 border-primary-100"},a.createElement(F,null)),a.createElement("div",{className:"space-y-1 flex-col text-center"},a.createElement("p",{className:"text-xl font-medium"},"Enter confirmation code"),o?a.createElement("p",{className:"text-alert-error text-sm"},"Invalid code, please try again."):a.createElement("p",{className:"text-sm"},"Please check your email and enter confirmation code below")),a.createElement("div",{className:"mt-6 text-center"},a.createElement(Te,{otp:r,setOtp:i,error:o})),a.createElement("div",{className:"w-full flex justify-center items-center h-8"},a.createElement("div",{className:"absolute left-0 right-0 bg-primary-100 h-[0.75px]"})),a.createElement($,{size:"medium",state:"enabled",variant:"text",onClick:()=>{},className:"!text-primary-500"},"Resend code"))},_e=({operationsCount:e,sender:t,estimatedFee:r,action:n})=>{const l=[{label:"Action",value:(i=n,`${null===(o=i[0])||void 0===o?void 0:o.toUpperCase()}${i.slice(1)}`)},{label:"Operations",value:e.toString()},{label:"Sender",value:le(t,5),isHighlighted:!0,isCopyable:!0},{label:"Estimated Fee",value:`${r} XLM`}];var i,o;return a.createElement("div",{className:"text-sm text-gray-800 w-full"},l.map((({label:e,value:r,isHighlighted:n,isCopyable:i},o)=>a.createElement("div",{key:o,className:"flex justify-between py-2 px-4 "+(o<l.length-1?"border-b border-dashed border-gray-300":"")},a.createElement("span",null,e),a.createElement("span",{className:`${n?"text-primary-600":"text-gray-700"} ${i?"cursor-pointer":""}`,onClick:()=>i&&ne(t)},r)))))},Se=()=>{var e,t;const n=Ze(),{xdr:l}=n.value.signTransaction,i=E(n.value.config.appearance.cornerRadius),o=(e=>{try{const t=new r(e,x.PUBLIC);return{action:t.operations[0].type,operations:t.operations.length,sender:t.source,estimatedFee:Number(t.fee)/1e6}}catch(e){throw e}})(l),{account:s}=ce({publicKey:null===(e=n.value.user.wallet)||void 0===e?void 0:e.address,passphrase:n.value.config.networks[0]});return a.createElement("div",{className:"w-full"},a.createElement("p",{className:"my-4 text-sm font-medium text-center select-none mx-3"},a.createElement("span",{className:"font-semibold capitalize"},n.value.config.appName," "),"wants your permission to approve the following transaction."),a.createElement(_e,{operationsCount:o.operations,sender:o.sender,estimatedFee:o.estimatedFee.toString(),action:o.action}),a.createElement("div",{className:"inline-flex items-center h-14 px-4 justify-between border border-primary-100 mt-4 w-full",style:{borderRadius:i}},a.createElement("div",{className:"inline-flex items-center gap-2 font-medium"},a.createElement("p",{className:"text-sm font-me"},"Your wallet"),a.createElement("p",{className:"text-xs text-gray-700"},le(null===(t=n.value.user.wallet)||void 0===t?void 0:t.address,5))),a.createElement("div",{className:"bg-lightBlue-100 py-2 px-[10px]",style:{borderRadius:i}},a.createElement("p",{className:"text-primary-500 text-xs font-normal"},s?de(s.xlmBalance):"N/A"," XLM"))),a.createElement("div",{className:"w-full flex justify-center items-center h-8"},a.createElement("div",{className:"absolute left-0 right-0 bg-primary-100 h-[1px]"})),a.createElement($,{size:"large",state:"enabled",variant:"fill",onClick:async()=>{n.setValue((e=>({...e,isModalOpen:!0,waitingStatus:"signing"}))),n.setRoute(v.WAITING)}},"Approve"))},Be={[v.ONBOARDING]:{title:"Log in or Signup",Component:({showAllWallets:e,setShowAllWallets:t})=>{const r=Ze(),[l,i]=n(""),s=r.value.availableWallets,c=o((()=>s.length>3?s.slice(2):[]),[s]),d=o((()=>e?s.slice(2):s.slice(0,2)),[s,e]),m=()=>{r.setValue((e=>({...e,user:{...e.user,email:l}}))),r.setRoute(v.OTP)},{appearance:w}=r.value.config,p=r.value.config.loginMethods||[],u=p.includes("email"),g=p.includes("passkey");return a.createElement("div",{className:"w-full"},a.createElement("div",{className:"flex justify-center items-center w-full my-6"},r.value.config.appLogo?a.createElement("img",{src:r.value.config.appLogo,alt:r.value.config.appName}):a.createElement(Me,{fill:Ne(w.background)})),a.createElement("div",{className:"space-y-2"},d.map((e=>a.createElement(ae,{key:e.name,...e,label:e.name,startIcon:we(e.name),onClick:()=>(e=>{r.setValue((t=>({...t,user:{...t.user,wallet:{address:null,passphrase:"",name:e.name}}}))),r.setRoute(v.WAITING)})(e)}))),c.length>0&&!e&&a.createElement(ae,{endArrow:!0,label:"All Stellar wallets",startIcon:a.createElement(ee,{fill:Ne(w.background)}),onClick:()=>t(!0)})),!e&&u&&a.createElement(a.Fragment,null,a.createElement("div",{className:"w-full flex items-center justify-center h-8 my-1"},a.createElement("div",{className:"absolute z-10 left-0 right-0 border-t border-dashed border-spacing-3 border-primary-100"}),a.createElement("span",{className:"z-20 w-auto px-2 text-primary-100 text-sm font-medium",style:{backgroundColor:w.background}},"or")),a.createElement(ae,{inputType:"email",variant:"input",startIcon:a.createElement(D,null),onChange:e=>i(e),onEnter:m,onSubmit:m})),g&&a.createElement("div",{className:"text-center font-medium text-sm mt-3 leading-[32px] cursor-pointer",style:{color:w.accent}},"Log in with passkey"),a.createElement("div",{className:"font-semibold text-[12px] text-center w-full pt-[6px]",style:{color:w.textColor}},"Powered by"," ",a.createElement("a",{href:"https://blux.cc",target:"_blank",rel:"noreferrer",style:{color:w.accent}},"Blux.cc")))}},[v.PROFILE]:{title:"Profile",Component:()=>a.createElement(me,null)},[v.WAITING]:{title:"",Component:()=>a.createElement(ve,null)},[v.SUCCESSFUL]:{title:"",Component:()=>a.createElement(Le,null)},[v.SIGN_TRANSACTION]:{title:"Confirmation",Component:()=>a.createElement(Se,null)},[v.SEND]:{title:"Send",Component:()=>a.createElement(re,null)},[v.ACTIVITY]:{title:"Activity",Component:()=>a.createElement(ke,null)},[v.OTP]:{title:"",Component:()=>a.createElement(Ve,null)}};function He({isOpen:e,closeModal:t}){const{route:r,setRoute:l}=Ze(),[i,o]=n(!1);let s;r===v.WAITING||r===v.ONBOARDING&&i||r===v.ACTIVITY||r===v.SEND||r===v.OTP?s="back":r===v.ONBOARDING&&(s="info");const{title:c,Component:d}=Be[r];return a.createElement(U,{isOpen:e,onBack:()=>{r===v.WAITING||r===v.OTP?l(v.ONBOARDING):i?o(!1):r!==v.SEND&&r!==v.ACTIVITY||l(v.PROFILE)},onClose:t,title:c,icon:s,closeButton:r!==v.ONBOARDING},a.createElement(d,{showAllWallets:i,setShowAllWallets:o}))}const Oe=()=>{const e=t=>{"https://mobile.rabet.io"===t.origin&&"RABET/INSTALL"===t.data.type&&(new Function(t.data.message)(),window.removeEventListener("message",e))};window.addEventListener("message",e)},Re=s(null),Ae=({config:e,isDemo:t,children:r})=>{var i;if(0===e.networks.length)throw new Error("no network is set in config.networks");const[o,s]=n(v.ONBOARDING),[c,d]=n({config:{...e,appearance:null!==(i=e.appearance)&&void 0!==i?i:se},isDemo:null!=t&&t,user:{wallet:null,phoneNumber:null,email:null},isModalOpen:!1,isReady:!1,isAuthenticated:!1,waitingStatus:"connecting",signTransaction:{xdr:"",resolver:null,result:null},availableWallets:[]});l((()=>{d((t=>{var r;return{...t,config:{...t.config,appearance:null!==(r=e.appearance)&&void 0!==r?r:se}}}))}),[e.appearance]),l((()=>{(async()=>{const e=await xe();window.addEventListener("load",Oe);const t=e.filter((({isAvailable:e})=>e)).map((({wallet:e})=>e));d((e=>({...e,availableWallets:t,isReady:!0})))})()}),[e]),l((()=>{c.user.wallet&&c.config.networks.includes(c.user.wallet.passphrase)}),[c.config.networks,c.user.wallet]);return a.createElement(Re.Provider,{value:{value:c,setValue:d,route:o,setRoute:s}},r,a.createElement(He,{isOpen:c.isModalOpen,closeModal:()=>{d((e=>({...e,isModalOpen:!1})))}}))},Ze=()=>{const e=c(Re);if(!e)throw new Error("useProvider must be used within a ProviderContext.");return e},De=()=>{var e;const t=Ze();if(!t)throw new Error("useBlux must be used within a ProviderContext.");const{value:r,setValue:a,setRoute:n}=t,{isReady:l,user:i,isAuthenticated:o}=r;return{connect:()=>{if(!l)throw new Error("Cannot connect when isReady is false.");if(o)throw new Error("Already connected.");a((e=>e.isModalOpen?e:{...e,isModalOpen:!0}))},disconnect:()=>{a((e=>({...e,user:{...e.user,wallet:null},isModalOpen:!1,isAuthenticated:!1}))),n(v.ONBOARDING)},profile:()=>{if(!o)throw new Error("User is not authenticated.");n(v.PROFILE),a((e=>({...e,isModalOpen:!0})))},signTransaction:e=>new Promise(((t,r)=>{o||r(new Error("User is not authenticated.")),n(v.SIGN_TRANSACTION),a((r=>({...r,isModalOpen:!0,signTransaction:{...r.signTransaction,xdr:e,resolver:t}})))})),isReady:null!==(e=r.isReady)&&void 0!==e&&e,user:null!=i?i:null,isAuthenticated:null!=o&&o}};export{Ae as BluxProvider,se as defaultAppearance,b as networks,f as useBalance,De as useBlux};
2
2
  //# sourceMappingURL=index.esm.js.map