@bluxcc/react 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1 +1 @@
1
- import{Networks as e,Transaction as t,Horizon as r,rpc as l}from"@stellar/stellar-sdk";import c,{useState as n,useEffect as a,useRef as o,useMemo as i,createContext as s,useContext as u}from"react";import{xBullWalletConnect as d}from"@creit.tech/xbull-wallet-connect";import{isConnected as b,getPublicKey as m,signTransaction as x}from"@lobstrco/signer-extension-api";import p from"@albedo-link/intent";import h,{signTransaction as w}from"@stellar/freighter-api";!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===r&&l.firstChild?l.insertBefore(c,l.firstChild):l.appendChild(c),c.styleSheet?c.styleSheet.cssText=e:c.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 #ccc;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}.bluxcc-fixed{position:fixed}.bluxcc-absolute{position:absolute}.bluxcc-relative{position:relative}.bluxcc-inset-0{inset:0}.bluxcc-bottom-0{bottom:0}.bluxcc-left-0{left:0}.bluxcc-right-0{right:0}.bluxcc-z-10{z-index:10}.bluxcc-z-20{z-index:20}.bluxcc-z-40{z-index:40}.bluxcc-z-\\[9999\\]{z-index:9999}.bluxcc-mx-3{margin-left:.75rem;margin-right:.75rem}.bluxcc-my-1{margin-bottom:.25rem;margin-top:.25rem}.bluxcc-my-4{margin-bottom:1rem;margin-top:1rem}.bluxcc-my-6{margin-bottom:1.5rem;margin-top:1.5rem}.\\!bluxcc-mt-6{margin-top:1.5rem!important}.bluxcc-mb-1{margin-bottom:.25rem}.bluxcc-mb-4{margin-bottom:1rem}.bluxcc-mb-6{margin-bottom:1.5rem}.bluxcc-ml-2{margin-left:.5rem}.bluxcc-ml-4{margin-left:1rem}.bluxcc-ml-auto{margin-left:auto}.bluxcc-mr-1{margin-right:.25rem}.bluxcc-mr-2{margin-right:.5rem}.bluxcc-mt-1{margin-top:.25rem}.bluxcc-mt-4{margin-top:1rem}.bluxcc-mt-6{margin-top:1.5rem}.bluxcc-mt-\\[16px\\]{margin-top:16px}.bluxcc-box-border{box-sizing:border-box}.bluxcc-flex{display:flex}.bluxcc-inline-flex{display:inline-flex}.bluxcc-size-10{height:2.5rem;width:2.5rem}.bluxcc-size-20{height:5rem;width:5rem}.bluxcc-size-5{height:1.25rem;width:1.25rem}.bluxcc-size-8{height:2rem;width:2rem}.bluxcc-size-\\[68px\\]{height:68px;width:68px}.bluxcc-size-\\[73px\\]{height:73px;width:73px}.\\!bluxcc-h-14{height:3.5rem!important}.bluxcc-h-10{height:2.5rem}.bluxcc-h-12{height:3rem}.bluxcc-h-14{height:3.5rem}.bluxcc-h-20{height:5rem}.bluxcc-h-6{height:1.5rem}.bluxcc-h-8{height:2rem}.bluxcc-h-\\[348px\\]{height:348px}.bluxcc-h-\\[60px\\]{height:60px}.bluxcc-h-full{height:100%}.bluxcc-max-h-\\[80px\\]{max-height:80px}.bluxcc-max-h-\\[90vh\\]{max-height:90vh}.\\!bluxcc-w-\\[360px\\]{width:360px!important}.\\!bluxcc-w-\\[68px\\]{width:68px!important}.bluxcc-w-12{width:3rem}.bluxcc-w-20{width:5rem}.bluxcc-w-\\[100px\\]{width:100px}.bluxcc-w-auto{width:auto}.bluxcc-w-full{width:100%}.bluxcc-max-w-\\[180px\\]{max-width:180px}.bluxcc-max-w-\\[90px\\]{max-width:90px}.bluxcc-flex-1{flex:1 1 0%}.bluxcc-flex-shrink-0{flex-shrink:0}.bluxcc-flex-grow{flex-grow:1}@keyframes bluxcc-fadeIn{0%{opacity:0}to{opacity:1}}.bluxcc-animate-fadeIn{animation:bluxcc-fadeIn .5s ease-in-out}@keyframes bluxcc-fadeOut{0%{opacity:1}to{opacity:0}}.bluxcc-animate-fadeOut{animation:bluxcc-fadeOut .5s ease-in-out}@keyframes bluxcc-spin{to{transform:rotate(1turn)}}.bluxcc-animate-spin{animation:bluxcc-spin 1s linear infinite}.\\!bluxcc-cursor-default{cursor:default!important}.bluxcc-cursor-pointer{cursor:pointer}.bluxcc-cursor-text{cursor:text}.bluxcc-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bluxcc-flex-col{flex-direction:column}.bluxcc-items-center{align-items:center}.bluxcc-justify-start{justify-content:flex-start}.bluxcc-justify-center{justify-content:center}.bluxcc-justify-between{justify-content:space-between}.bluxcc-gap-1{gap:.25rem}.bluxcc-gap-2{gap:.5rem}.bluxcc-gap-3{gap:.75rem}.bluxcc-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)))}.bluxcc-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)))}.bluxcc-overflow-hidden{overflow:hidden}.bluxcc-whitespace-nowrap{white-space:nowrap}.bluxcc-rounded-full{border-radius:9999px}.\\!bluxcc-rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.bluxcc-border{border-width:1px}.bluxcc-border-2{border-width:2px}.bluxcc-bg-\\[\\#D9FFF3\\]{--tw-bg-opacity:1;background-color:rgb(217 255 243/var(--tw-bg-opacity,1))}.bluxcc-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bluxcc-bg-transparent{background-color:transparent}.bluxcc-bg-opacity-10{--tw-bg-opacity:0.1}.bluxcc-p-2{padding:.5rem}.bluxcc-px-2{padding-left:.5rem;padding-right:.5rem}.bluxcc-px-3{padding-left:.75rem;padding-right:.75rem}.bluxcc-px-4{padding-left:1rem;padding-right:1rem}.bluxcc-px-6{padding-left:1.5rem;padding-right:1.5rem}.bluxcc-px-\\[10px\\]{padding-left:10px;padding-right:10px}.bluxcc-py-1{padding-bottom:.25rem;padding-top:.25rem}.bluxcc-py-2{padding-bottom:.5rem;padding-top:.5rem}.bluxcc-pb-4{padding-bottom:1rem}.bluxcc-pt-\\[8px\\]{padding-top:8px}.bluxcc-text-center{text-align:center}.bluxcc-text-start{text-align:start}.bluxcc-text-\\[12px\\]{font-size:12px}.bluxcc-text-base{font-size:1rem;line-height:1.5rem}.bluxcc-text-lg{font-size:1.125rem;line-height:1.75rem}.bluxcc-text-sm{font-size:.875rem;line-height:1.25rem}.bluxcc-text-xl{font-size:1.25rem;line-height:1.75rem}.bluxcc-text-xs{font-size:.75rem;line-height:1rem}.bluxcc-font-medium{font-weight:500}.bluxcc-font-normal{font-weight:400}.bluxcc-font-semibold{font-weight:600}.bluxcc-capitalize{text-transform:capitalize}.bluxcc-leading-5{line-height:1.25rem}.bluxcc-leading-\\[28px\\]{line-height:28px}.\\!bluxcc-text-gray-600{--tw-text-opacity:1!important;color:rgb(102 102 102/var(--tw-text-opacity,1))!important}.bluxcc-text-alert-error{--tw-text-opacity:1;color:rgb(236 41 41/var(--tw-text-opacity,1))}.bluxcc-text-gray-600{--tw-text-opacity:1;color:rgb(102 102 102/var(--tw-text-opacity,1))}.bluxcc-text-gray-700{--tw-text-opacity:1;color:rgb(77 77 77/var(--tw-text-opacity,1))}.bluxcc-text-gray-800{--tw-text-opacity:1;color:rgb(51 51 51/var(--tw-text-opacity,1))}.bluxcc-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)}.bluxcc-outline-none{outline:2px solid transparent;outline-offset:2px}.bluxcc-backdrop-blur-\\[1px\\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.bluxcc-transition-\\[border-radius\\,background\\,border-color\\]{transition-duration:.15s;transition-property:border-radius,background,border-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.bluxcc-transition-\\[border-radius\\]{transition-duration:.15s;transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1)}.bluxcc-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.bluxcc-duration-150,.bluxcc-transition-all{transition-duration:.15s}.bluxcc-duration-300{transition-duration:.3s}.placeholder\\:bluxcc-text-gray-400::-moz-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.placeholder\\:bluxcc-text-gray-400::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.placeholder\\:bluxcc-text-gray-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.placeholder\\:bluxcc-text-gray-500::placeholder{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.focus\\:bluxcc-outline-none:focus{outline:2px solid transparent;outline-offset:2px}');const g={mainnet:e.PUBLIC,testnet:e.TESTNET,sandbox:e.SANDBOX,futurenet:e.FUTURENET,standalone:e.STANDALONE},f=({fill:e="#5F6367"})=>c.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_117_204",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},c.createElement("rect",{width:"20",height:"20",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_117_204)"},c.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:e}))),C=({fill:e="#5F6367"})=>c.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_170_30135",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"25"},c.createElement("rect",{y:"0.5",width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_170_30135)"},c.createElement("path",{d:"M16 22.5L6 12.5L16 2.5L17.775 4.275L9.55 12.5L17.775 20.725L16 22.5Z",fill:e}))),v=({fill:e="#5F6367"})=>c.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2032_3674",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2032_3674)"},c.createElement("path",{d:"M5.26689 20L3.99994 18.7331L10.733 12L3.99994 5.26696L5.26689 4L11.9999 10.733L18.733 4L19.9999 5.26696L13.2669 12L19.9999 18.7331L18.733 20L11.9999 13.267L5.26689 20Z",fill:e}))),E=({fill:e="#0C1083"})=>c.createElement("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"bluxcc-animate-spin"},c.createElement("mask",{id:"mask0_2054_770",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"25",height:"24"},c.createElement("rect",{x:"0.5",width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2054_770)"},c.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:e}))),y=()=>c.createElement("svg",{width:"48",height:"49",viewBox:"0 0 48 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2045_4252",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"48",height:"49"},c.createElement("rect",{y:"0.5",width:"48",height:"48",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2045_4252)"},c.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"}))),k=()=>c.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2054_469",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2054_469)"},c.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"}))),N=()=>c.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2054_791",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2054_791)"},c.createElement("path",{d:"M7.25 17.5V2.5H19.25V17.5H7.25ZM8.75 16H17.75V4H8.75V16ZM3.75 21V6.30775H5.25V19.5H15.4423V21H3.75Z",fill:"#4D4D4D"}))),L=({fill:e="#0C1083"})=>c.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2054_838",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2054_838)"},c.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:e}))),S=({fill:e="#0C1083"})=>c.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2054_817",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2054_817)"},c.createElement("path",{d:"M3.5 19.25V4.75L20.7115 12L3.5 19.25ZM5 17L16.85 12L5 7V10.6923L10.423 12L5 13.3077V17Z",fill:e}))),T=({fill:e="#0C1083"})=>c.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2204_971",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16"},c.createElement("rect",{width:"16",height:"16",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2204_971)"},c.createElement("path",{d:"M5.06372 11.8333L7.99955 8.89746L10.9354 11.8333H5.06372Z",fill:e}))),B=()=>c.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("rect",{x:"0.5",y:"0.5",width:"39",height:"39",rx:"19.5",fill:"transparent",stroke:"#00BD81"}),c.createElement("mask",{id:"mask0_2212_3318",maskUnits:"userSpaceOnUse",x:"8",y:"8",width:"24",height:"24"},c.createElement("rect",{x:"8",y:"8",width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2212_3318)"},c.createElement("path",{d:"M19.25 23.6923H20.7595V19.1365L22.6095 20.9865L23.6538 19.9423L20.0095 16.298L16.3558 19.9423L17.4 20.9865L19.25 19.1365V23.6923ZM20.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:"#00BD81"}))),M=()=>c.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("rect",{x:"0.5",y:"0.5",width:"39",height:"39",rx:"19.5",fill:"transparent",stroke:"#00BD81"}),c.createElement("mask",{id:"mask0_2494_9033",maskUnits:"userSpaceOnUse",x:"8",y:"8",width:"24",height:"24"},c.createElement("rect",{x:"8",y:"8",width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2494_9033)"},c.createElement("path",{d:"M12.577 25.9728C12.0142 25.255 11.5587 24.4749 11.2105 23.6326C10.8625 22.7902 10.6321 21.9126 10.5193 20.9998H12.05C12.15 21.7165 12.3334 22.404 12.6 23.0623C12.8667 23.7206 13.2167 24.3331 13.65 24.8998L12.577 25.9728ZM10.5193 18.9998C10.6398 18.087 10.8722 17.2094 11.2165 16.3671C11.5607 15.5247 12.0206 14.7511 12.5963 14.0461L13.65 15.0998C13.2167 15.6665 12.8667 16.279 12.6 16.9373C12.3334 17.5956 12.15 18.2831 12.05 18.9998H10.5193ZM18.95 29.4498C18.0372 29.3433 17.1638 29.1154 16.3298 28.7661C15.4958 28.4167 14.718 27.9626 13.9963 27.4036L15.05 26.2998C15.6334 26.7331 16.25 27.0915 16.9 27.3748C17.55 27.6581 18.2334 27.8498 18.95 27.9498V29.4498ZM15.1 13.6806L13.9963 12.5961C14.7346 12.0306 15.525 11.5764 16.3673 11.2336C17.2096 10.8906 18.0872 10.6626 19 10.5498V12.0498C18.2834 12.1498 17.5959 12.3366 16.9375 12.6103C16.2792 12.8841 15.6667 13.2409 15.1 13.6806ZM20.95 29.4498V27.9498C21.677 27.8498 22.3729 27.6655 23.0375 27.3968C23.7022 27.1283 24.323 26.7691 24.9 26.3191L26.0038 27.4036C25.2655 27.9792 24.471 28.436 23.6203 28.7738C22.7696 29.1116 21.8795 29.337 20.95 29.4498ZM24.95 13.6998C24.3667 13.2665 23.7417 12.9081 23.075 12.6248C22.4084 12.3415 21.7167 12.1498 21 12.0498V10.5498C21.9129 10.6563 22.793 10.8826 23.6403 11.2288C24.4878 11.5748 25.2756 12.0306 26.0038 12.5961L24.95 13.6998ZM27.4038 25.9536L26.35 24.8998C26.7834 24.3331 27.1334 23.7206 27.4 23.0623C27.6667 22.404 27.85 21.7165 27.95 20.9998H29.4808C29.3603 21.9126 29.1279 22.7902 28.7835 23.6326C28.4394 24.4749 27.9795 25.2486 27.4038 25.9536ZM27.95 18.9998C27.85 18.2831 27.6667 17.5956 27.4 16.9373C27.1334 16.279 26.7834 15.6665 26.35 15.0998L27.423 14.0268C27.9859 14.7446 28.4414 15.5247 28.7895 16.3671C29.1375 17.2094 29.368 18.087 29.4808 18.9998H27.95Z",fill:"#00BD81"}),c.createElement("circle",{cx:"20",cy:"20",r:"3",fill:"#00BD81"}))),O=()=>c.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("rect",{x:"0.5",y:"0.5",width:"39",height:"39",rx:"19.5",fill:"transparent",stroke:"#00BD81"}),c.createElement("mask",{id:"mask0_2214_3828",maskUnits:"userSpaceOnUse",x:"8",y:"8",width:"24",height:"24"},c.createElement("rect",{x:"8",y:"8",width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2214_3828)"},c.createElement("path",{d:"M20.0095 23.6923L23.6538 20.048L22.6095 19.004L20.7595 20.854V16.298H19.25V20.854L17.4 19.004L16.3558 20.048L20.0095 23.6923ZM20.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:"#00BD81"}))),_=()=>c.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2265_983",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2265_983)"},c.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"}))),R=({fill:e="#0C1083"})=>c.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2324_772",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2324_772)"},c.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:e}))),z=({fill:e="#0C1083"})=>c.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2097_3575",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"40",height:"40"},c.createElement("rect",{width:"40",height:"40",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2097_3575)"},c.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:e}))),F=()=>c.createElement("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("circle",{cx:"34",cy:"34",r:"34",fill:"#FFDEDE"}),c.createElement("mask",{id:"mask0_2497_9140",maskUnits:"userSpaceOnUse",x:"14",y:"14",width:"40",height:"40"},c.createElement("rect",{x:"14",y:"14",width:"40",height:"40",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2497_9140)"},c.createElement("path",{d:"M33.9995 41.1662C34.2356 41.1662 34.4335 41.0863 34.5933 40.9266C34.753 40.7669 34.8328 40.569 34.8328 40.3328C34.8328 40.0967 34.753 39.8988 34.5933 39.7391C34.4335 39.5794 34.2356 39.4995 33.9995 39.4995C33.7634 39.4995 33.5655 39.5794 33.4058 39.7391C33.246 39.8988 33.1662 40.0967 33.1662 40.3328C33.1662 40.569 33.246 40.7669 33.4058 40.9266C33.5655 41.0863 33.7634 41.1662 33.9995 41.1662ZM33.4162 35.9995H34.5828V25.9995H33.4162V35.9995ZM34.0066 48.4995C32.0019 48.4995 30.1167 48.1191 28.3512 47.3583C26.5856 46.5974 25.0499 45.5648 23.7441 44.2603C22.438 42.9559 21.4041 41.4221 20.6424 39.6591C19.8805 37.8958 19.4995 36.0116 19.4995 34.0066C19.4995 32.0019 19.8799 30.1167 20.6408 28.3512C21.4016 26.5856 22.4342 25.0499 23.7387 23.7441C25.0431 22.438 26.5769 21.4041 28.3399 20.6424C30.1033 19.8805 31.9874 19.4995 33.9924 19.4995C35.9972 19.4995 37.8823 19.8799 39.6478 20.6408C41.4134 21.4016 42.9491 22.4342 44.2549 23.7387C45.561 25.0431 46.5949 26.5769 47.3566 28.3399C48.1185 30.1033 48.4995 31.9874 48.4995 33.9924C48.4995 35.9972 48.1191 37.8823 47.3583 39.6478C46.5974 41.4134 45.5648 42.9491 44.2603 44.2549C42.9559 45.561 41.4222 46.5949 39.6591 47.3566C37.8958 48.1185 36.0116 48.4995 34.0066 48.4995Z",fill:"#EC2929"}))),A=({icon:e,onInfo:t,onBack:r,title:l,closeButton:n=!1,onClose:a})=>{const o=Ve();return c.createElement("div",{className:"bluxcc-flex bluxcc-h-[60px] bluxcc-w-full bluxcc-items-center bluxcc-justify-between"},"info"===e?c.createElement("div",{onClick:t,className:"bluxcc-flex bluxcc-size-5 bluxcc-items-center bluxcc-justify-center"}):"back"===e?c.createElement("div",{onClick:r,className:"bluxcc-flex bluxcc-size-5 bluxcc-cursor-pointer bluxcc-items-center bluxcc-justify-center"},c.createElement(C,{fill:o.value.config.appearance.textColor})):c.createElement("div",{className:"bluxcc-size-5"}),c.createElement("p",{className:"bluxcc-flex-grow bluxcc-select-none bluxcc-text-center bluxcc-text-base bluxcc-font-medium"},l),n?c.createElement("div",{onClick:a,className:"bluxcc-size-5 bluxcc-cursor-pointer"},c.createElement(v,{fill:o.value.config.appearance.textColor})):c.createElement("div",{className:"bluxcc-size-5"}))},D=({isClosing:e,onClose:t,isSticky:r=!1})=>c.createElement("div",{className:"bluxcc-fixed bluxcc-inset-0 bluxcc-z-40 bluxcc-bg-black bluxcc-bg-opacity-10 bluxcc-backdrop-blur-[1px] "+(e&&!r?"bluxcc-animate-fadeOut":"bluxcc-animate-fadeIn"),onClick:t}),I=({isOpen:e,onClose:t=()=>{},onBack:r,onInfo:l,children:i,title:s,icon:u,isSticky:d=!1,closeButton:b=!0})=>{const[m,x]=n("auto"),[p,h]=n(!1),w=o(null),g=Ve(),{isOpening:f,isClosing:C,handleClose:v}=(e=>{const[t,r]=n({isOpening:!0,isClosing:!1,hasTransition:!1});return a((()=>{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:E}=g.value.config;return a((()=>{const e=()=>h(window.innerWidth<760);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),a((()=>{if(!e||!w.current)return;x(w.current.offsetHeight);const t=new ResizeObserver((()=>{w.current&&x(w.current.offsetHeight)}));return t.observe(w.current),()=>t.disconnect()}),[e,i]),e?c.createElement(c.Fragment,null,!g.value.isDemo&&c.createElement(D,{isClosing:C,isSticky:d,onClose:()=>v(t)}),c.createElement("div",{className:`bluxcc-absolute bluxcc-inset-0 bluxcc-z-[9999] bluxcc-flex bluxcc-items-center bluxcc-justify-center ${C&&!d&&"bluxcc-animate-fadeOut"}`,onClick:e=>e.target===e.currentTarget&&v(t)},c.createElement("div",{className:"bluxcc-box-border bluxcc-overflow-hidden bluxcc-shadow-[0px_4px_80px_0px_#00000008] bluxcc-transition-all "+(p?"bluxcc-fixed bluxcc-bottom-0 bluxcc-left-0 bluxcc-max-h-[90vh] bluxcc-w-full !bluxcc-rounded-b-none":"bluxcc-relative !bluxcc-w-[360px]"),style:{height:"number"==typeof m?`${m}px`:m,opacity:C&&!d?"0":"1",transform:p?f||C?"translateY(100%)":"translateY(0%)":"none",transition:"height 300ms ease-in-out, border-radius 300ms, opacity 300ms ease-out "+(p?", transform 300ms ease-out":""),backgroundColor:E.background,color:E.textColor,fontFamily:E.font,letterSpacing:"-0.04px",outlineStyle:"solid",outlineColor:E.borderColor,outlineWidth:E.borderWidth,borderRadius:E.cornerRadius}},c.createElement("div",{ref:w,className:"bluxcc-px-6 bluxcc-pb-4"},c.createElement(A,{icon:u,onInfo:l,onBack:r,title:s,closeButton:b,onClose:()=>v(t)}),i)))):null};var U,W,Z;!function(e){e.Rabet="Rabet",e.Albedo="Albedo",e.Freighter="Freighter",e.Xbull="xBull",e.Lobstr="LOBSTR"}(U||(U={})),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"}(W||(W={})),function(e){e.ONBOARDING="ONBOARDING",e.WRONG_NETWORK="WRONG_NETWORK",e.WAITING="WAITING",e.SUCCESSFUL="SUCCESSFUL",e.PROFILE="PROFILE",e.SIGN_TRANSACTION="SIGN_TRANSACTION",e.SEND="SEND",e.ACTIVITY="ACTIVITY",e.OTP="OTP"}(Z||(Z={}));const V=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"},H={small:"bluxcc-h-8 bluxcc-text-sm bluxcc-gap-1",medium:"bluxcc-h-12 bluxcc-text-sm bluxcc-gap-2",large:"bluxcc-h-14 bluxcc-text-base bluxcc-gap-2"},j=({size:e="large",variant:t="outline",state:r="enabled",children:l,startIcon:n,endIcon:a,onClick:o,style:i,className:s})=>{const u=Ve().value.config.appearance,d={borderRadius:u.cornerRadius,cursor:"disabled"===r?"not-allowed":"pointer",opacity:"disabled"===r?.5:1,pointerEvents:"disabled"===r?"none":void 0,...i};return"outline"===t?Object.assign(d,{border:`1px solid ${u.borderColor}`,color:u.accent,backgroundColor:u.background,borderWidth:u.includeBorders?u.borderWidth:"1px"}):"fill"===t?Object.assign(d,{backgroundColor:u.accent,fontWeight:"500",color:V(u.accent)}):"text"===t&&Object.assign(d,{color:u.accent,backgroundColor:"transparent"}),"selected"===r&&(d.boxShadow=`0 0 0 2px ${u.accent}`),c.createElement("button",{onClick:o,disabled:"disabled"===r,className:`bluxcc-flex bluxcc-justify-center bluxcc-items-center bluxcc-px-[10px] bluxcc-transition-all bluxcc-w-full ${H[e]} ${null!=s?s:""} bluxcc-transition-all bluxcc-duration-300`,style:d},n&&c.createElement("span",null,n),c.createElement("span",null,l),a&&c.createElement("span",null,a))},P=({button:e,onButtonClick:t,appearance:r})=>c.createElement("button",{onClick:t,style:{borderRadius:r.cornerRadius,color:r.accent,borderColor:r.borderColor,backgroundColor:r.background,borderWidth:r.includeBorders?r.borderWidth:"1px"},className:"bluxcc-border bluxcc-px-3 bluxcc-py-1 bluxcc-text-sm bluxcc-font-medium bluxcc-transition-all bluxcc-duration-300"},e),$=({label:e,type:t="text",placeholder:r="Input",error:l,iconRight:a,iconLeft:o,button:i,onButtonClick:s,customLabel:u,value:d,onChange:b})=>{const m=Ve().value.config.appearance,[x,p]=n(!1),h=()=>l?"#ec2929":x?m.accent:m.borderColor;return c.createElement("div",{className:"bluxcc-flex bluxcc-w-full bluxcc-flex-col"},e&&c.createElement("label",{style:{color:l?"#ec2929":m.textColor},className:"bluxcc-mb-1 bluxcc-ml-2 bluxcc-flex bluxcc-justify-between bluxcc-text-sm"},c.createElement("span",null,e),c.createElement("span",null,u)),c.createElement("div",{className:"bluxcc-flex bluxcc-h-14 bluxcc-w-full bluxcc-items-center bluxcc-border bluxcc-px-4 bluxcc-py-2 bluxcc-transition-all",onFocus:()=>p(!0),onBlur:()=>p(!1),onMouseEnter:e=>{x||l||(e.currentTarget.style.borderColor=m.accent)},onMouseLeave:e=>{x||(e.currentTarget.style.borderColor=l?"#ec2929":m.borderColor)},style:{"--tw-ring-color":h(),borderRadius:m.cornerRadius,borderColor:h(),backgroundColor:m.bgField,borderWidth:m.includeBorders?m.borderWidth:"1px"}},o&&c.createElement("div",{className:"bluxcc-mr-2"},o),c.createElement("input",{type:t,value:d,placeholder:r,className:"bluxcc-mr-2 bluxcc-bg-transparent bluxcc-text-gray-700 bluxcc-outline-none placeholder:bluxcc-text-gray-500",style:{color:m.textColor,width:i?"90%":"100%"},onChange:b}),i&&c.createElement(P,{button:i,onButtonClick:s,appearance:m}),a&&c.createElement("div",{className:"bluxcc-ml-2"},a)),l&&c.createElement("p",{className:"bluxcc-ml-2 bluxcc-mt-1 bluxcc-text-xs bluxcc-text-alert-error"},l))},G=()=>c.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.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"})),K=()=>c.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("g",{clipPath:"url(#clip0_54_32)"},c.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"}),c.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"}),c.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"})),c.createElement("defs",null,c.createElement("clipPath",{id:"clip0_54_32"},c.createElement("rect",{width:"24",height:"48",fill:"white",transform:"translate(28.0001 16)"})))),X=()=>c.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.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:"#533ABB"}),c.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:"#533ABB"})),Y=()=>c.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("rect",{width:"80",height:"80",fill:"#14142B"}),c.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"}),c.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"}),c.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"}),c.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"}),c.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"}),c.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"}),c.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"}),c.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"}),c.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=()=>c.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("rect",{width:"80",height:"80",fill:"url(#paint0_linear_131_15)"}),c.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"}),c.createElement("defs",null,c.createElement("linearGradient",{id:"paint0_linear_131_15",x1:"20",y1:"20.625",x2:"108.125",y2:"113.125",gradientUnits:"userSpaceOnUse"},c.createElement("stop",{stopColor:"#33B2CB"}),c.createElement("stop",{offset:"0.28",stopColor:"#1B99B5"})))),J=({fill:e="black"})=>c.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("g",{clipPath:"url(#clip0_44_35)"},c.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}),c.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})),c.createElement("defs",null,c.createElement("clipPath",{id:"clip0_44_35"},c.createElement("rect",{width:"22",height:"18.6157",fill:"white",transform:"translate(9 10)"})))),Q=({fill:e="black"})=>c.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.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})),ee=()=>{const e=Ve().value.config.appearance,[t,r]=n({amount:"",address:"",memo:""}),[l,a]=n({}),o=e=>t=>{r((r=>({...r,[e]:t.target.value}))),a((t=>({...t,[e]:""})))};return c.createElement("div",null,c.createElement("div",{className:"bluxcc-mb-4"},c.createElement($,{type:"number",label:"Amount",placeholder:"0.00",value:t.amount,onChange:o("amount"),error:l.amount,customLabel:c.createElement("span",{onClick:()=>r((e=>({...e,amount:"345.00"}))),style:{color:e.accent},className:"bluxcc-mr-2 bluxcc-inline-flex bluxcc-cursor-pointer"},"Max ",c.createElement(T,{fill:e.accent})),button:c.createElement("span",{className:"bluxcc-flex bluxcc-justify-between bluxcc-gap-1",style:{color:e.textColor,borderColor:e.borderColor}},c.createElement("span",{className:"flex items-center"},c.createElement(Q,{fill:V(e.background)})),"XLM")})),c.createElement("div",{className:"bluxcc-mb-4"},c.createElement($,{label:"To",placeholder:"Enter address",value:t.address,onChange:o("address"),error:l.address,button:"Paste",onButtonClick:async()=>{const e=await navigator.clipboard.readText();r((t=>({...t,address:e})))}})),c.createElement("div",null,c.createElement($,{label:"Memo",placeholder:"Enter Memo (optional)",value:t.memo,onChange:o("memo")})),c.createElement("div",{className:"bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0",style:{borderTopWidth:e.includeBorders?e.borderWidth:"1px",borderTopColor:e.borderColor}})),c.createElement(j,{size:"large",variant:"outline",state:"enabled",onClick:()=>{const e={};t.address||(e.address="Address is required"),t.amount||(e.amount="Amount is required"),a(e),Object.keys(e).length}},"Send"))},te=e=>navigator.clipboard.writeText(e),re=(e,r)=>{try{const l=new t(e,r);return{action:l.operations[0].type,operations:l.operations.length,sender:l.source,estimatedFee:Number(l.fee)/1e7}}catch(e){return null}},le=()=>{var e;const t=Ve();if(!t)throw new Error("useBlux must be used within a ProviderContext.");const{value:r,setValue:l,setRoute:c}=t,{isReady:n,user:a,isAuthenticated:o}=r;return{login:()=>{if(!n)throw new Error("Cannot connect when isReady is false.");if(o)throw new Error("Already connected.");l((e=>e.isModalOpen?e:{...e,isModalOpen:!0}))},logout:()=>{l((e=>({...e,user:{...e.user,wallet:null},isModalOpen:!1,isAuthenticated:!1}))),c(Z.ONBOARDING)},profile:()=>{if(!o)throw new Error("User is not authenticated.");c(Z.PROFILE),l((e=>({...e,isModalOpen:!0})))},sendTransaction:function(e,t){return new Promise(((n,a)=>{let i=r.activeNetwork;if(t&&t.network&&(i=t.network),o||a(new Error("User is not authenticated.")),re(e,i))if(c(Z.SIGN_TRANSACTION),!0===(null==t?void 0:t.isSoroban)){const t={network:i,isSoroban:!0};l((r=>({...r,isModalOpen:!0,signTransaction:{xdr:e,options:t,resolver:n,rejecter:a,result:null}})))}else{const t={network:i,isSoroban:!1};l((r=>({...r,isModalOpen:!0,signTransaction:{xdr:e,options:t,resolver:n,rejecter:a,result:null}})))}else a("Invalid XDR")}))},user:null!=a?a:null,isReady:null!==(e=r.isReady)&&void 0!==e&&e,isAuthenticated:null!=o&&o}},ce=({variant:e="default",startIcon:t,endArrow:r,label:l,onClick:a,onChange:o,onEnter:i,onSubmit:s,inputType:u="text"})=>{const d=Ve(),{appearance:b}=d.value.config,[m,x]=n(l||""),[p,h]=n(!1),[w,g]=n(!1),C=e=>"email"===u?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e):""!==e.trim();return c.createElement("div",{onClick:"input"===e?void 0:a,className:"bluxcc-flex !bluxcc-h-14 bluxcc-w-full bluxcc-items-center bluxcc-border bluxcc-px-[10px] bluxcc-py-2 "+("input"===e?"bluxcc-cursor-text":"bluxcc-cursor-pointer"),style:{borderRadius:b.cornerRadius,color:b.textColor,borderColor:w?b.accent:b.borderColor,backgroundColor:b.bgField,borderWidth:b.includeBorders?b.borderWidth:"1px"},onMouseEnter:t=>{"social"===e||w||(t.currentTarget.style.borderColor=b.accent)},onMouseLeave:t=>{"social"===e||w||(t.currentTarget.style.borderColor=b.borderColor)}},c.createElement("span",{style:{borderRadius:b.cornerRadius,borderColor:b.borderColor,borderWidth:b.includeBorders?b.borderWidth:"1px"},className:"bluxcc-flex bluxcc-size-10 bluxcc-flex-shrink-0 bluxcc-items-center bluxcc-justify-center bluxcc-overflow-hidden bluxcc-border bluxcc-transition-[border-radius] bluxcc-duration-300"},t),c.createElement("div",{className:"bluxcc-relative bluxcc-ml-4 bluxcc-mr-1 bluxcc-flex bluxcc-h-full bluxcc-flex-1 bluxcc-items-center"},"input"===e?c.createElement(c.Fragment,null,c.createElement("input",{type:u,value:m,onChange:e=>{const t=e.target.value;x(t),h(C(t)),null==o||o(t)},onKeyDown:e=>{"Enter"===e.key&&p&&(null==i||i(m))},placeholder:"Email",className:"bluxcc-mr-1 bluxcc-h-full bluxcc-w-full bluxcc-bg-transparent bluxcc-outline-none placeholder:bluxcc-text-gray-400 focus:bluxcc-outline-none",style:{color:b.textColor},onFocus:()=>g(!0),onBlur:()=>{g(!1),C(m)||h(!1)}}),c.createElement("div",{className:"bluxcc-flex bluxcc-h-10 bluxcc-w-[100px] bluxcc-items-center bluxcc-justify-center bluxcc-bg-transparent"},c.createElement("button",{disabled:!p,onClick:()=>null==s?void 0:s(m),className:"bluxcc-absolute bluxcc-right-0 bluxcc-flex bluxcc-h-8 !bluxcc-w-[68px] bluxcc-items-center bluxcc-justify-center bluxcc-border bluxcc-bg-transparent bluxcc-text-sm bluxcc-font-medium bluxcc-transition-[border-radius,background,border-color] bluxcc-duration-150",style:{borderRadius:b.cornerRadius,borderColor:p?b.accent:b.borderColor,color:p?b.accent:"#999999",borderWidth:b.includeBorders?b.borderWidth:"1px"}},"Submit"))):c.createElement("span",{className:"bluxcc-select-none bluxcc-font-medium"},l)),r&&c.createElement("span",{className:"bluxcc-ml-auto bluxcc-mr-1 bluxcc-flex bluxcc-items-center"},c.createElement(f,{fill:b.textColor})))},ne=(e,t=8)=>e.slice(0,t)+"..."+e.slice(-t);function ae(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(),[l,c=""]=r.split(".");if(!c)return l;const n=null!==(t={0:8,1:7,2:6,3:5,4:4,5:3,6:2}[l.length])&&void 0!==t?t:0;if(n>0){const e=`${l}.${c.slice(0,n)}`,t=parseFloat(e);return Number.isInteger(t)?l:t.toFixed(2)}return l}(r))}const oe=()=>{var e;const{logout:t}=le(),r=Ve(),[l,a]=n(!1),{balance:o}=Ge({asset:"native"}),i=null===(e=r.value.user.wallet)||void 0===e?void 0:e.address,s=r.value.config.appearance;return c.createElement("div",{className:"bluxcc-flex bluxcc-flex-col bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-mt-4 bluxcc-size-[73px] bluxcc-rounded-full",style:{background:s.accent}}),c.createElement("p",{className:"bluxcc-mb-4 bluxcc-mt-6 bluxcc-inline-flex bluxcc-cursor-pointer bluxcc-text-base bluxcc-text-gray-700",onClick:()=>{te(i).then((()=>{a(!0),setTimeout((()=>{a(!1)}),1e3)})).catch((()=>{}))}},l?"Copied!":c.createElement("span",{className:"bluxcc-flex bluxcc-items-center bluxcc-gap-1"},i?ne(i,5):"",c.createElement(N,null))),c.createElement("p",{className:"bluxcc-text-center",style:{color:s.accent}},o?ae(o):"N/A"," XLM"),c.createElement("div",{className:"bluxcc-mt-[16px] bluxcc-w-full bluxcc-space-y-2"},c.createElement(ce,{endArrow:!0,label:"Send",startIcon:c.createElement(S,{fill:s.textColor}),onClick:()=>{r.setRoute(Z.SEND)}}),c.createElement(ce,{endArrow:!0,label:"Activity",startIcon:c.createElement(L,{fill:s.textColor}),onClick:()=>{r.setRoute(Z.ACTIVITY)}})),c.createElement("div",{className:"bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0",style:{borderTopWidth:s.includeBorders?s.borderWidth:"1px",borderTopColor:s.borderColor}})),c.createElement(j,{size:"medium",variant:"text",state:"enabled",startIcon:c.createElement(k,null),className:"!bluxcc-text-gray-600",onClick:()=>{t()}},"Logout"))},ie=e=>{switch(e){case"Rabet":return c.createElement(K,null);case"Freighter":return c.createElement(X,null);case"Albedo":return c.createElement(G,null);case"LOBSTR":return c.createElement(q,null);case"xBull":return c.createElement(Y,null);default:return null}},se=async e=>{try{const{passphrase:t}=await e.getNetwork();return t}catch(e){return""}},ue=(e,t)=>({url:e,...t}),de={[g.mainnet]:{name:"Mainnet",horizon:ue("https://horizon.stellar.org"),soroban:ue("https://mainnet.sorobanrpc.com")},[g.testnet]:{name:"Testnet",horizon:ue("https://horizon-testnet.stellar.org"),soroban:ue("https://soroban-testnet.stellar.org")},[g.futurenet]:{name:"Futurenet",horizon:ue("https://horizon-futurenet.stellar.org"),soroban:ue("https://rpc-futurenet.stellar.org")}},be=(e,t)=>{let r=de[e];const l=t[e];if(!r&&!l)throw new Error("Custom network has no transports.");return!r&&l&&(r={name:"Custom Network",horizon:ue(""),soroban:ue("")}),l&&(l.horizon&&(r.horizon=l.horizon),l.soroban&&(r.soroban=l.soroban)),r},me=e=>new Promise((t=>setTimeout(t,e)));async function xe(e,c,n){try{const{horizon:a,soroban:o}=be(c.network,n);if(!a)throw new Error("Horizon RPC was not found.");const i=new r.Server(a.url),s=new t(e,c.network);if(c.isSoroban){const e=new l.Server(o.url),t=await e.sendTransaction(s),r=await(async(e,t)=>{for(let r=0;r<15;++r){const r=await t.getTransaction(e);if("SUCCESS"===r.status)return r;if("FAILED"===r.status)break;await me(1e3)}return null})(t.hash,e);return r}return await i.submitTransaction(s)}catch(e){throw e}}const pe={name:U.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===W.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:")}}},he=e=>{const t=Object.entries(W).find((([,t])=>t===e));if(!t)throw new Error(`Unknown network passphrase: ${e}`);return t[0].toLowerCase()},we={name:U.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,l=await r.sign({xdr:e,publicKey:null==t?void 0:t.address,network:(null==t?void 0:t.networkPassphrase)&&he(null==t?void 0:t.networkPassphrase)});return r.closeConnections(),l}catch(e){throw new Error("Failed to sign the transaction with xBull.")}},getNetwork:async()=>{throw new Error("Failed to get network from xBull")}},ge={name:U.Lobstr,website:"https://lobstr.co",isAvailable:()=>!0,connect:async()=>{try{if(!await b())throw new Error("LOBSTR Wallet is not installed or connected.");return{publicKey:await m()}}catch(e){throw new Error("Failed to connect to LOBSTR.")}},signTransaction:async e=>{try{if(!x)throw new Error("LOBSTR Wallet does not support signing transactions.");return await x(e)}catch(e){throw new Error("Failed to sign the transaction with LOBSTR.")}},getNetwork:async()=>{throw new Error("Failed to get network from LOBSTR")}},fe={name:U.Albedo,website:"https://albedo.link",isAvailable:()=>!0,connect:async()=>{try{return{publicKey:(await p.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:l}=t;return(await p.tx({xdr:e,pubkey:r,network:(null==t?void 0:t.networkPassphrase)&&he(null==t?void 0:t.networkPassphrase),submit:l})).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")}},Ce={name:U.Freighter,website:"https://freighter.app",isAvailable:()=>new Promise((e=>{const t=setTimeout((()=>{e(!1)}),1200);setTimeout((()=>{h.isConnected().then((({isConnected:r,error:l})=>{clearTimeout(t),e(!l&&r)})).catch((()=>{clearTimeout(t),e(!1)}))}),250)})),connect:async()=>{try{if(!await h.isConnected())throw new Error("Freighter Wallet is not installed or connected.");const e=await h.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 Ce.connect()}throw new Error("Failed to connect to Freighter.")}},signTransaction:async(e,t={})=>{try{if(!await h.isConnected())throw new Error("Freighter Wallet is not installed or connected.");return(await w(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 h.isConnected())throw new Error("Freighter Wallet is not installed or connected.");const e=await h.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.")}}},ve={[U.Freighter]:Ce,[U.Rabet]:pe,[U.Albedo]:fe,[U.Xbull]:we,[U.Lobstr]:ge},Ee=async()=>Promise.all(Object.values(ve).map((async e=>{try{const t=await e.isAvailable();return{wallet:e,isAvailable:t}}catch(t){return{wallet:e,isAvailable:!1}}}))),ye=()=>{var e,t,r,l;const i=Ve(),s=o(!1),[u,d]=n(!1),[b,m]=n([]),[x,p]=n(null),{user:h,config:w}=i.value,g=i.value.waitingStatus,f=i.value.config.appearance,{xdr:C,options:v}=i.value.signTransaction;a((()=>{(async()=>{const e=await Ee();m(e)})()}),[]),a((()=>{var e,t;if(!(null===(e=null==h?void 0:h.wallet)||void 0===e?void 0:e.name))return;const r=null===(t=b.find((({wallet:e})=>{var t;return e.name===(null===(t=null==h?void 0:h.wallet)||void 0===t?void 0:t.name)})))||void 0===t?void 0:t.wallet;r&&p(r)}),[b,null==h?void 0:h.wallet]),a((()=>{!s.current&&x&&(s.current=!0,y(x))}),[x]);const y=async e=>{var t;if("signing"===g)try{const r=await(async(e,t,r,l)=>{if(!(null==e?void 0:e.signTransaction))throw new Error("Wallet does not support transaction signing.");return await e.signTransaction(t,{networkPassphrase:l,address:r})})(e,C,null===(t=i.value.user.wallet)||void 0===t?void 0:t.address,v.network),l=await xe(r,v,w.transports||{});i.setValue((e=>({...e,signTransaction:{...e.signTransaction,result:l}}))),l?i.setRoute(Z.SUCCESSFUL):d(!0)}catch(e){throw d(!0),e}else try{const{publicKey:t}=await e.connect();if(t&&""!==t.trim()){const r=await se(e);i.setValue((l=>({...l,user:{...l.user,wallet:{passphrase:r,name:e.name,address:t}}}))),setTimeout((()=>{i.setRoute(Z.SUCCESSFUL)}),400)}}catch(e){throw d(!0),e}};return c.createElement("div",{className:"bluxcc-mt-4 bluxcc-flex bluxcc-w-full bluxcc-select-none bluxcc-flex-col bluxcc-items-center bluxcc-justify-center"},u?c.createElement("div",{className:"bluxcc-mb-6 bluxcc-flex bluxcc-items-center bluxcc-justify-center"},c.createElement(F,null)):c.createElement("div",{className:"bluxcc-mb-6 bluxcc-flex bluxcc-size-20 bluxcc-items-center bluxcc-justify-center bluxcc-overflow-hidden bluxcc-rounded-full bluxcc-border",style:{borderColor:f.borderColor,borderWidth:f.includeBorders?f.borderWidth:"1px"}},ie(null!==(t=null===(e=null==h?void 0:h.wallet)||void 0===e?void 0:e.name)&&void 0!==t?t:"")),c.createElement("div",{className:"bluxcc-flex-col bluxcc-space-y-2 bluxcc-text-center bluxcc-font-medium"},c.createElement("p",{className:"bluxcc-text-xl"},u?""+("connecting"===g?"Login failed":`Signing with ${null===(r=null==h?void 0:h.wallet)||void 0===r?void 0:r.name} failed`):`${"connecting"===g?"Waiting for":"Signing with"} ${null===(l=null==h?void 0:h.wallet)||void 0===l?void 0:l.name}`),c.createElement("p",{className:"bluxcc-text-sm"},u?`Please try ${"connecting"===g?"logging in":"signing"} again.`:("connecting"===g?"Accept connection":"Sign the")+" request in your wallet")),c.createElement("div",{className:"bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0",style:{borderTopWidth:f.includeBorders?f.borderWidth:"1px",borderTopColor:f.borderColor}})),u?c.createElement(j,{onClick:()=>{d(!1),x&&y(x)},state:"enabled",variant:"outline"},"Try again"):c.createElement(j,{state:"enabled",variant:"outline",className:"!bluxcc-cursor-default",startIcon:c.createElement(E,{fill:f.accent})},"connecting"===g?"Connecting":"Signing"))},ke={steexp:{[g.mainnet]:"https://steexp.com",[g.testnet]:"https://testnet.steexp.com",ledgerUrl:"ledger",transactionUrl:"tx",accountUrl:"account"},stellarexpert:{[g.mainnet]:"https://stellar.expert/explorer/public",[g.testnet]:"https://stellar.expert/explorer/testnet",ledgerUrl:"ledger",accountUrl:"account",transactionUrl:"tx"},lumenscan:{[g.mainnet]:"https://lumenscan.io",[g.testnet]:"https://testnet.lumenscan.io",ledgerUrl:"ledgers",accountUrl:"account",operationUrl:"ops",transactionUrl:"txns"},stellarchain:{[g.mainnet]:"https://stellarchain.io",[g.testnet]:"https://testnet.stellarchain.io",[g.futurenet]:"https://futurenet.stellarchain.io",ledgerUrl:"ledgers",accountUrl:"accounts",operationUrl:"operations",transactionUrl:"transactions"}},Ne=(e,t,r,l)=>{let c=ke[t];c||(c=ke.stellarchain);let n=c[e];return n?`${n}/${c[r]}/${l}`:null};var Le=c.memo((({tx:e})=>{const t=Ve(),r=Ne(t.value.activeNetwork,t.value.config.explorer,"transactionUrl",e.hash);return c.createElement("div",{className:"bluxcc-flex bluxcc-items-center bluxcc-justify-between"},c.createElement("div",{className:"bluxcc-flex bluxcc-items-center bluxcc-justify-start bluxcc-gap-3"},c.createElement("div",{className:"bluxcc-flex bluxcc-size-10 bluxcc-items-center bluxcc-justify-center bluxcc-rounded-full",style:{backgroundColor:t.value.config.appearance.background}},(e=>{switch(e){case"Receive":return c.createElement(O,null);case"Send":return c.createElement(B,null);default:return c.createElement(M,null)}})(e.title)),c.createElement("div",{className:"bluxcc-flex bluxcc-flex-col bluxcc-justify-start"},c.createElement("p",{className:"bluxcc-text-start bluxcc-text-xs bluxcc-font-medium",style:{color:t.value.config.appearance.textColor}},e.title),c.createElement("p",{className:"bluxcc-text-sm bluxcc-font-medium"},e.description))),c.createElement("div",{className:"bluxcc-flex bluxcc-items-center bluxcc-gap-2 bluxcc-text-xs bluxcc-text-gray-600"},(e=>{const t=new Date(e);return`${t.getUTCDate()} ${t.toLocaleString("en-US",{month:"long"})}`})(e.date),c.createElement("div",{className:"bluxcc-item-center bluxcc-flex bluxcc-size-8 bluxcc-cursor-pointer bluxcc-justify-center bluxcc-rounded-full",title:"View transaction details",onClick:()=>{r&&window.open(r,"_blank","noopener,noreferrer")},style:{backgroundColor:t.value.config.appearance.bgField}},c.createElement("span",{className:"bluxcc-flex bluxcc-items-center bluxcc-justify-center"},c.createElement(_,null)))))}));const Se=e=>"native"===e.asset_type?"XLM":e.asset_code||"Pool",Te=()=>{var e;const[t,l]=n([]),{transactions:o,loading:i}=Xe({includeOperations:!0}),{value:s}=Ve(),u=null===(e=s.user.wallet)||void 0===e?void 0:e.address,d=Ne(s.activeNetwork,s.config.explorer,"accountUrl",u);return a((()=>{if(!o)return;const e=[];for(const l of o){const c=l.operations[0],n={hash:l.hash,description:"",date:l.created_at,title:(t=c.type,t.replace(/([A-Z])/g," $1").replace(/_/g," ").trim().replace(/\b\w/g,(e=>e.toUpperCase())))};if(l.operations.length>1)n.title="Multi Operation";else if("payment"===c.type){let e="Send";c.to.toLowerCase()===u.toLowerCase()&&(e="Receive"),n.title=e,n.description=`${ae(c.amount)} ${Se(c)}`}else c.type!==r.HorizonApi.OperationResponseType.pathPaymentStrictSend&&c.type!==r.HorizonApi.OperationResponseType.pathPayment||(n.title="Swap",n.description=`Path payment of ${c.amount} ${Se(c)}`);e.push(n)}var t;l(e)}),[o]),c.createElement("div",{className:"bluxcc-flex bluxcc-h-[348px] bluxcc-flex-col bluxcc-justify-between"},i?c.createElement("div",{className:"bluxcc-flex bluxcc-h-full bluxcc-flex-col bluxcc-items-center bluxcc-justify-center bluxcc-text-center bluxcc-text-gray-700"},"Loading activity..."):t.length>0?t.map(((e,r)=>c.createElement("div",{key:r,style:{borderBottomStyle:"dashed",borderBottomWidth:r<t.length-1?s.config.appearance.includeBorders?s.config.appearance.borderWidth:"1px":"0px",borderBottomColor:s.config.appearance.borderColor},className:"bluxcc-p-2"},c.createElement(Le,{tx:e})))):c.createElement("div",{className:"bluxcc-flex bluxcc-h-full bluxcc-flex-col bluxcc-items-center bluxcc-justify-center bluxcc-text-center bluxcc-text-gray-700"},"No activity found"),t.length>0&&d&&c.createElement(j,{state:"enabled",variant:"outline",size:"medium",className:"mt-4",onClick:()=>{d&&window.open(d,"_blank","noopener,noreferrer")}},"See all in explorer"))},Be=e=>{var t;return`${null===(t=e[0])||void 0===t?void 0:t.toUpperCase()}${e.slice(1)}`},Me=()=>{const e=Ve(),t=e.value.waitingStatus,r=e.value.config.appearance,{result:l,options:n}=e.value.signTransaction;let o;if(l)if(n.isSoroban){o=l.txHash}else{o=l.hash}const i=o?Ne(n.network,e.value.config.explorer,"transactionUrl",o):null;a((()=>{"connecting"===t&&setTimeout((()=>{e.setValue((e=>({...e,isModalOpen:!1,isAuthenticated:!0})))}),1e3)}),[]);return c.createElement("div",{className:"bluxcc-mt-4 bluxcc-flex bluxcc-w-full bluxcc-select-none bluxcc-flex-col bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-z-10 bluxcc-mb-6 bluxcc-flex bluxcc-size-[68px] bluxcc-items-center bluxcc-justify-center bluxcc-overflow-hidden bluxcc-rounded-full bluxcc-bg-[#D9FFF3]"},c.createElement("span",{className:"bluxcc-z-20"},c.createElement(y,null))),c.createElement("div",{className:"bluxcc-w-full bluxcc-flex-col bluxcc-space-y-2 bluxcc-text-center bluxcc-font-medium"},c.createElement("p",{className:"bluxcc-text-xl"},"connecting"===t?"Connection":"Transaction"," ","Successful"),c.createElement("p",{className:"bluxcc-text-center bluxcc-text-sm bluxcc-leading-5"},"connecting"===t?`Your account has been successfully connected to ${Be(e.value.config.appName)}`:"Your transaction was successfully completed")),"signing"===t&&o&&"string"==typeof i&&c.createElement(j,{state:"enabled",variant:"outline",size:"small",className:"mt-4",onClick:()=>{i&&window.open(i,"_blank","noopener,noreferrer")}},"See in explorer"),c.createElement("div",{className:"bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0",style:{borderTopWidth:r.includeBorders?r.borderWidth:"1px",borderTopColor:r.borderColor}})),"connecting"===t?c.createElement(j,{state:"enabled",variant:"outline",className:"!bluxcc-cursor-default"},"Logging In"):c.createElement(j,{state:"enabled",variant:"fill",onClick:()=>{if(e.setValue((e=>({...e,isModalOpen:!1}))),"signing"===t){const{resolver:t,result:r}=e.value.signTransaction;t&&r&&t(r)}}},"Done"))},Oe=({otp:e,setOtp:t,error:r})=>{const l=e.length,n=Ve(),{appearance:i}=n.value.config,s=o([]);a((()=>{r&&setTimeout((()=>{var e;return null===(e=s.current[0])||void 0===e?void 0:e.focus()}),1001)}),[r]);const u=e=>{e.preventDefault();const r=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,l);if(!r)return;const c=[...r.split(""),...Array(l-r.length).fill("")];t(c),setTimeout((()=>{var e;return null===(e=s.current[l-1])||void 0===e?void 0:e.focus()}),0)},d=e=>({borderRadius:i.cornerRadius,color:i.accent,background:i.background,borderColor:r?"#FF6666":e?i.accent:i.borderColor,borderWidth:i.includeBorders?i.borderWidth:"1px"});return c.createElement("div",{className:"bluxcc-flex bluxcc-gap-1"},e.map(((r,n)=>c.createElement("input",{key:n,ref:e=>{s.current[n]=e},type:"text",inputMode:"numeric",maxLength:1,value:r,onChange:r=>((r,c)=>{var n;const a=c.target.value.replace(/\D/g,"");if(!a)return;const o=[...e];o[r]=a[0],t(o),r<l-1&&a&&(null===(n=s.current[r+1])||void 0===n||n.focus())})(n,r),onPaste:u,onKeyDown:r=>((r,l)=>{var c;if("Backspace"===l.key){const l=[...e];l[r]?(l[r]="",t(l)):r>0&&(null===(c=s.current[r-1])||void 0===c||c.focus(),l[r-1]="",t(l))}})(n,r),className:"bluxcc-h-14 bluxcc-w-12 bluxcc-border bluxcc-text-center bluxcc-text-lg bluxcc-outline-none",style:d(r)}))))},_e=()=>{const{value:e}=Ve(),t=e.config.appearance,r=e.user.email,[l,o]=n(Array(6).fill("")),[i,s]=n(!1);return a((()=>{const e=l.join("");6===e.length&&(async e=>{s(!1),await new Promise((t=>{setTimeout((()=>{t("123456"===e)}),200)}))||(s(!0),setTimeout((()=>o(Array(6).fill(""))),1e3))})(e)}),[l,r]),c.createElement("div",{className:"bluxcc-mt-4 bluxcc-flex bluxcc-w-full bluxcc-select-none bluxcc-flex-col bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{style:{borderColor:t.borderColor,borderWidth:t.includeBorders?t.borderWidth:"1px"},className:"bluxcc-mb-6 bluxcc-flex bluxcc-h-20 bluxcc-w-20 bluxcc-items-center bluxcc-justify-center bluxcc-overflow-hidden bluxcc-rounded-full bluxcc-border-2"},c.createElement(z,{fill:t.textColor})),c.createElement("div",{className:"bluxcc-flex-col bluxcc-space-y-1 bluxcc-text-center"},c.createElement("p",{className:"bluxcc-text-xl bluxcc-font-medium"},"Enter confirmation code"),i?c.createElement("p",{className:"bluxcc-flex bluxcc-h-10 bluxcc-items-center bluxcc-justify-center bluxcc-text-sm bluxcc-text-alert-error"},"Invalid code, please try again."):c.createElement("p",{className:"bluxcc-h-10 bluxcc-text-sm"},"Please check your email and enter confirmation code below")),c.createElement("div",{className:"bluxcc-mt-6 bluxcc-text-center"},c.createElement(Oe,{otp:l,setOtp:o,error:i})),c.createElement("div",{className:"bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0",style:{borderTopWidth:t.includeBorders?t.borderWidth:"1px",borderTopColor:t.borderColor}})),c.createElement(j,{size:"medium",state:"enabled",variant:"text",onClick:()=>{},style:{color:t.accent}},"Resend code"))},Re=()=>c.createElement("div",null,c.createElement("p",null,"You are on a wrong network.")),ze=({operationsCount:e,sender:t,estimatedFee:r,action:l})=>{const n=Ve().value.config.appearance,a=[{label:"Action",value:Be(l)},{label:"Operations",value:e.toString()},{label:"Sender",value:ne(t,5),isHighlighted:!0,isCopyable:!0},{label:"Estimated Fee",value:`${r} XLM`}];return c.createElement("div",{className:"bluxcc-w-full bluxcc-text-sm bluxcc-text-gray-800"},a.map((({label:e,value:r,isHighlighted:l,isCopyable:a},o)=>c.createElement("div",{key:o,className:"bluxcc-flex bluxcc-justify-between bluxcc-px-4 bluxcc-py-2",style:{borderColor:n.borderColor,borderBottomStyle:"dashed",borderBottomWidth:n.includeBorders?n.borderWidth:"1px"}},c.createElement("span",{style:{color:n.textColor}},e),c.createElement("span",{className:""+(a?"bluxcc-cursor-pointer":""),style:{color:l?n.accent:n.textColor},onClick:()=>a&&te(t)},r)))))},Fe=()=>{var e;const t=Ve(),{balance:r}=Ge({asset:"native"}),l=t.value.config.appearance,{xdr:n,options:a}=t.value.signTransaction,o=re(n,a.network);return o?c.createElement("div",{className:"bluxcc-w-full"},c.createElement("p",{className:"bluxcc-mx-3 bluxcc-my-4 bluxcc-select-none bluxcc-text-center bluxcc-text-sm bluxcc-font-medium"},c.createElement("span",{className:"bluxcc-font-semibold bluxcc-capitalize"},t.value.config.appName," "),"wants your permission to approve the following transaction."),c.createElement(ze,{operationsCount:o.operations,sender:o.sender,estimatedFee:o.estimatedFee.toString(),action:o.action}),c.createElement("div",{className:"bluxcc-mt-4 bluxcc-inline-flex bluxcc-h-14 bluxcc-w-full bluxcc-items-center bluxcc-justify-between bluxcc-border bluxcc-px-4",style:{borderRadius:l.cornerRadius,borderColor:l.borderColor}},c.createElement("div",{className:"bluxcc-inline-flex bluxcc-items-center bluxcc-gap-1 bluxcc-whitespace-nowrap bluxcc-font-medium"},c.createElement("p",{className:"bluxcc-whitespace-nowrap bluxcc-text-sm bluxcc-font-medium"},"Your wallet"),c.createElement("p",{className:"bluxcc-text-xs bluxcc-text-gray-700"},ne(null===(e=t.value.user.wallet)||void 0===e?void 0:e.address,5))),c.createElement("div",{className:"bluxcc-overflow-hidden bluxcc-px-[10px] bluxcc-py-2",style:{borderRadius:l.cornerRadius,backgroundColor:l.accent,color:V(l.accent)}},c.createElement("p",{className:"bluxcc-max-w-[90px] bluxcc-text-xs bluxcc-font-normal"},r?ae(r):"N/A"," XLM"))),c.createElement("div",{className:"bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0",style:{borderTopWidth:l.includeBorders?l.borderWidth:"1px",borderTopColor:l.borderColor}})),c.createElement(j,{size:"large",state:"enabled",variant:"fill",onClick:async()=>{t.setValue((e=>({...e,isModalOpen:!0,waitingStatus:"signing"}))),t.setRoute(Z.WAITING)}},"Approve")):c.createElement("div",null,c.createElement("p",null,"Invalid XDR"))},Ae={[Z.ONBOARDING]:{title:"Log in or Signup",Component:({showAllWallets:e,setShowAllWallets:t})=>{const r=Ve(),[l,a]=n(""),o=r.value.availableWallets,s=i((()=>o.length>3?o.slice(2):[]),[o]),u=i((()=>o.length<=3?o:e?o.slice(2,o.length):o.slice(0,2)),[o,e]),d=()=>{r.setValue((e=>({...e,user:{...e.user,email:l}}))),r.setRoute(Z.OTP)},{appearance:b}=r.value.config,m=r.value.config.loginMethods||[],x=m.includes("passkey"),p=i((()=>[...[...m].filter((e=>"passkey"!==e)),...x?["passkey"]:[]]),[m,x]),h=()=>c.createElement("div",{className:"bluxcc-my-1 bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0 bluxcc-z-10",style:{borderTopWidth:b.includeBorders?b.borderWidth:"1px",borderTopStyle:"dashed",borderTopColor:b.borderColor}}),c.createElement("span",{className:"bluxcc-z-20 bluxcc-w-auto bluxcc-select-none bluxcc-px-2 bluxcc-text-sm bluxcc-font-medium",style:{backgroundColor:b.background,color:b.borderColor}},"or"));return c.createElement("div",{className:"bluxcc-w-full"},r.value.config.appearance.logo&&c.createElement("div",{className:"bluxcc-my-6 bluxcc-flex bluxcc-max-h-[80px] bluxcc-w-full bluxcc-items-center bluxcc-justify-center bluxcc-overflow-hidden"},c.createElement("img",{src:r.value.config.appearance.logo,alt:r.value.config.appName,width:152,height:60,className:"bluxcc-max-h-[80px] bluxcc-max-w-[180px]",loading:"eager",decoding:"async",draggable:"false",style:{contentVisibility:"auto"}})),c.createElement("div",{className:"bluxcc-space-y-2"},p.map(((l,n)=>{const o=p[n+1],i=p[n-1],m=p.includes("wallet"),x=m&&!e&&"wallet"===l&&"email"===o||m&&"email"===l&&"wallet"!==i;return"wallet"===l?c.createElement(c.Fragment,{key:"wallet"},u.map((e=>c.createElement(ce,{key:e.name,...e,label:e.name,startIcon:ie(e.name),onClick:()=>(e=>{r.setValue((t=>({...t,user:{...t.user,wallet:{address:null,passphrase:"",name:e.name}}}))),r.setRoute(Z.WAITING)})(e)}))),s.length>0&&!e&&c.createElement(ce,{endArrow:!0,label:"All Stellar wallets",startIcon:c.createElement(J,{fill:V(b.bgField)}),onClick:()=>t(!0)}),x&&h()):e||"email"!==l?e||"passkey"!==l?null:c.createElement("div",{key:"passkey",className:"!bluxcc-mt-6 bluxcc-flex bluxcc-h-6 bluxcc-cursor-pointer bluxcc-items-center bluxcc-justify-center bluxcc-text-sm bluxcc-font-medium bluxcc-leading-[28px]",style:{color:b.accent}},"Log in with Passkey"):c.createElement(c.Fragment,{key:"email"},c.createElement(c.Fragment,null,c.createElement(ce,{inputType:"email",variant:"input",startIcon:c.createElement(R,{fill:b.textColor}),onChange:e=>a(e),onEnter:d,onSubmit:d}),x&&h()))}))),c.createElement("div",{className:"bluxcc-w-full bluxcc-pt-[8px] bluxcc-text-center bluxcc-text-[12px] bluxcc-font-medium",style:{color:b.textColor}},"Powered by"," ",c.createElement("a",{"aria-label":"blux link",href:"https://blux.cc",target:"_blank",rel:"noreferrer",style:{color:b.accent}},"Blux.cc")))}},[Z.PROFILE]:{title:"Profile",Component:()=>c.createElement(oe,null)},[Z.WAITING]:{title:"",Component:()=>c.createElement(ye,null)},[Z.SUCCESSFUL]:{title:"",Component:()=>c.createElement(Me,null)},[Z.SIGN_TRANSACTION]:{title:"Confirmation",Component:()=>c.createElement(Fe,null)},[Z.SEND]:{title:"Send",Component:()=>c.createElement(ee,null)},[Z.ACTIVITY]:{title:"Activity",Component:()=>c.createElement(Te,null)},[Z.OTP]:{title:"",Component:()=>c.createElement(_e,null)},[Z.WRONG_NETWORK]:{isSticky:!0,title:"Wrong Network",Component:()=>c.createElement(Re,null)}};function De({isOpen:e,closeModal:t}){const{route:r,setRoute:l,value:a}=Ve(),[o,i]=n(!1);let s;r===Z.WAITING&&"signing"!==a.waitingStatus||r===Z.ONBOARDING&&o||r===Z.ACTIVITY||r===Z.SEND||r===Z.OTP?s="back":r===Z.ONBOARDING&&(s="info");const{title:u,Component:d,isSticky:b}=Ae[r],m=r===Z.WRONG_NETWORK||r===Z.WAITING||r===Z.SUCCESSFUL;return c.createElement(I,{isOpen:e,onBack:()=>{r===Z.WAITING||r===Z.OTP&&!a.isAuthenticated?l(Z.ONBOARDING):o?i(!1):r!==Z.SEND&&r!==Z.ACTIVITY||l(Z.PROFILE)},onClose:b?()=>{}:()=>{t();const e=a.waitingStatus,{resolver:l,rejecter:c,result:n}=a.signTransaction;r===Z.SUCCESSFUL&&"signing"===e?l&&n&&l(n):r===Z.SIGN_TRANSACTION&&c&&c({code:4001,message:"User rejected the transaction"})},title:u,isSticky:b,icon:s,closeButton:!m},c.createElement(d,{showAllWallets:o,setShowAllWallets:i}))}const Ie={theme:"light",logo:"",font:"Manrope",accent:"#0c1083",borderWidth:"1px",bgField:"#ffffff",cornerRadius:"32px",textColor:"#000000",background:"#ffffff",includeBorders:!0,borderColor:"#cdceee"},Ue={theme:"dark",logo:"",font:"Manrope",accent:"#ffffff",borderWidth:"1px",bgField:"#1a1a1a",cornerRadius:"32px",textColor:"#ffffff",background:"#000000",includeBorders:!0,borderColor:"#333333"},We=s(null),Ze=({config:e,isDemo:t,children:o})=>{var i;if(0===e.networks.length)throw new Error("no network is set in config.networks");if(!e.networks.includes(e.defaultNetwork))throw new Error("default network is not listed in networks");for(const t of e.networks)if(!de[t]){if(!e.transports)throw new Error("Must set transports for custom networks");if(!e.transports[t])throw new Error("Must set transports for custom networks")}const{horizon:s,soroban:u}=be(e.defaultNetwork,null!==(i=e.transports)&&void 0!==i?i:{}),[d,b]=n(Z.ONBOARDING),[m,x]=n({config:{...e,explorer:e.explorer||"stellarchain",appearance:{...Ie,...e.appearance}},activeNetwork:e.defaultNetwork,isDemo:null!=t&&t,user:{wallet:null,phoneNumber:null,email:null},isModalOpen:!1,isReady:!1,isAuthenticated:!1,waitingStatus:"connecting",signTransaction:{xdr:"",options:{network:"",isSoroban:!1},result:null,rejecter:null,resolver:null},availableWallets:[],servers:{horizon:new r.Server(s.url),soroban:new l.Server(u.url)}});((e,t,r)=>{const[l,c]=n(!1);a((()=>{const t=setInterval((()=>{e.isAuthenticated&&e.user.wallet&&se(ve[e.user.wallet.name]).then((t=>{t&&!e.config.networks.includes(t)?c(!0):c(!1)}))}),200);return()=>{clearInterval(t),c(!1)}}),[e.isAuthenticated,e.config.networks,e.user.wallet]),a((()=>{l?(r(Z.WRONG_NETWORK),t((e=>({...e,isModalOpen:!0})))):t((e=>({...e,isModalOpen:!1})))}),[l])})(m,x,b),a((()=>{x((t=>({...t,config:{...t.config,appearance:{...Ie,...e.appearance}}})))}),[e]),a((()=>{var e;const{horizon:t,soroban:c}=be(m.activeNetwork,null!==(e=m.config.transports)&&void 0!==e?e:{});x((e=>({...e,servers:{horizon:new r.Server(t.url),soroban:new l.Server(c.url)}})))}),[m.config.transports,m.config.networks,m.activeNetwork]);const p=()=>{Ee().then((e=>{const t=e.filter((e=>e.isAvailable)).map((e=>e.wallet));x((e=>({...e,isReady:!0,availableWallets:t}))),(()=>{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)})()}))};a((()=>("complete"===document.readyState?p():window.addEventListener("load",p),()=>{window.removeEventListener("load",p)})),[]);return c.createElement(We.Provider,{value:{value:m,setValue:x,route:d,setRoute:b}},o,c.createElement(De,{isOpen:m.isModalOpen,closeModal:()=>{x((e=>({...e,isModalOpen:!1})))}}))},Ve=()=>{const e=u(We);if(!e)throw new Error("useProvider must be used within a ProviderContext.");return e},He=()=>{const e=Ve();if(!e)throw new Error("Blux hooks must be used within a BluxProvider context.");return e},je=(e,t)=>{var c;if(!t)return{soroban:e.servers.soroban,horizon:e.servers.horizon,networkPassphrase:e.activeNetwork};const{horizon:n,soroban:a}=be(t,null!==(c=e.config.transports)&&void 0!==c?c:{});return{networkPassphrase:t,soroban:new l.Server(a.url),horizon:new r.Server(n.url)}},Pe=e=>{const{value:t}=He(),[r,l]=n(je(t,e));return a((()=>{l(je(t,e||t.activeNetwork))}),[e,t.activeNetwork]),r},$e=e=>{const{value:t}=He(),{horizon:r,networkPassphrase:l}=Pe(null==e?void 0:e.network),[c,o]=n({error:null,loading:!0,account:null});return a((()=>{var l;o({error:null,account:null,loading:!0});const c=null===(l=t.user.wallet)||void 0===l?void 0:l.address;if(!c&&!(null==e?void 0:e.address))return void o({account:null,loading:!1,error:new Error("Both user.wallet.address and address parameter are undefined")});const n=(null==e?void 0:e.address)?e.address:c;r.loadAccount(n).then((e=>{o({error:null,loading:!1,account:e})})).catch((e=>{o({error:e,loading:!1,account:null})}))}),[null==e?void 0:e.address,l,t.user.wallet]),c},Ge=({asset:e,address:t,network:r})=>{const{value:l}=He(),{horizon:c,networkPassphrase:o}=Pe(r),[i,s]=n({error:null,loading:!0,balance:"0"});return a((()=>{var r;s({error:null,loading:!0,balance:"0"});const n=null===(r=l.user.wallet)||void 0===r?void 0:r.address;if(!n&&!t)return void s({loading:!1,balance:"0",error:new Error("Both user.wallet.address and address parameter are undefined")});const a=t||n;c.loadAccount(a).then((t=>{if("native"===e){const e=t.balances.find((e=>"native"===e.asset_type));s({error:null,loading:!1,balance:(null==e?void 0:e.balance)||"0"})}else if("string"==typeof e){const r=e.split(":"),l=t.balances.find((e=>e.asset_code===r[0]&&e.asset_issuer===r[1]));s({error:null,loading:!1,balance:(null==l?void 0:l.balance)||"0"})}})).catch((e=>{s({error:e,loading:!1,balance:"0"})}))}),[t,e,l.user.wallet,o]),i},Ke=()=>{const e=Ve();if(!e)throw new Error("useBlux must be used within a ProviderContext.");const{value:t}=e,[r,l]=n(t.activeNetwork);return a((()=>{l(t.activeNetwork)}),[t.activeNetwork]),r},Xe=e=>{const{value:t}=He(),{horizon:r,networkPassphrase:l}=Pe(null==e?void 0:e.network),[c,o]=n({error:null,loading:!0,transactions:[]});return a((()=>{var l;o({error:null,loading:!0,transactions:[]});const c=null===(l=t.user.wallet)||void 0===l?void 0:l.address;if(!c&&!(null==e?void 0:e.address))return void o({loading:!1,transactions:[],error:new Error("Both user.wallet.address and address parameter are undefined")});const n=(null==e?void 0:e.address)?null==e?void 0:e.address:c;r.transactions().forAccount(n).limit((null==e?void 0:e.limit)||5).order("desc").call().then((t=>{if(null==e?void 0:e.includeOperations){const e=[];for(const r of t.records)e.push(r.operations());Promise.all(e).then((e=>{const r=t.records.map(((t,r)=>({...t,operations:e[r].records})));o({error:null,loading:!1,transactions:r})}))}else o({error:null,loading:!1,transactions:t.records})})).catch((e=>{o({error:e,loading:!1,transactions:[]})}))}),[null==e?void 0:e.address,l,t.user.wallet]),c},Ye=()=>{const e=Ve();if(!e)throw new Error("useBlux must be used within a ProviderContext.");const{value:t,setValue:r}=e;return{switchNetwork:e=>{if(!t.config.networks.includes(e))throw new Error("New network must be defined in config.networks");r({...t,activeNetwork:e})},networks:t.config.networks}};export{Ze as BluxProvider,Ue as defaultDarkTheme,Ie as defaultLightTheme,g as networks,ue as url,$e as useAccount,Ge as useBalance,le as useBlux,Ke as useNetwork,Ye as useSwitchNetwork,Xe as useTransactions};
1
+ import{Networks as e,Transaction as t,Horizon as l,rpc as r}from"@stellar/stellar-sdk";import c,{useState as n,useEffect as a,useRef as o,useMemo as i,createContext as s,useContext as u}from"react";import{xBullWalletConnect as d}from"@creit.tech/xbull-wallet-connect";import{isConnected as b,getPublicKey as m,signTransaction as x}from"@lobstrco/signer-extension-api";import p from"@albedo-link/intent";import w,{signTransaction as h}from"@stellar/freighter-api";!function(e,t){void 0===t&&(t={});var l=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===l&&r.firstChild?r.insertBefore(c,r.firstChild):r.appendChild(c),c.styleSheet?c.styleSheet.cssText=e:c.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 #ccc;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}.bluxcc-fixed{position:fixed}.bluxcc-absolute{position:absolute}.bluxcc-relative{position:relative}.bluxcc-inset-0{inset:0}.bluxcc-bottom-0{bottom:0}.bluxcc-left-0{left:0}.bluxcc-right-0{right:0}.bluxcc-z-10{z-index:10}.bluxcc-z-20{z-index:20}.bluxcc-z-40{z-index:40}.bluxcc-z-\\[9999\\]{z-index:9999}.bluxcc-mx-3{margin-left:.75rem;margin-right:.75rem}.bluxcc-my-1{margin-bottom:.25rem;margin-top:.25rem}.bluxcc-my-4{margin-bottom:1rem;margin-top:1rem}.bluxcc-my-6{margin-bottom:1.5rem;margin-top:1.5rem}.\\!bluxcc-mt-6{margin-top:1.5rem!important}.bluxcc-mb-1{margin-bottom:.25rem}.bluxcc-mb-4{margin-bottom:1rem}.bluxcc-mb-6{margin-bottom:1.5rem}.bluxcc-ml-2{margin-left:.5rem}.bluxcc-ml-4{margin-left:1rem}.bluxcc-ml-auto{margin-left:auto}.bluxcc-mr-1{margin-right:.25rem}.bluxcc-mr-2{margin-right:.5rem}.bluxcc-mr-2\\.5{margin-right:.625rem}.bluxcc-mt-0\\.5{margin-top:.125rem}.bluxcc-mt-1{margin-top:.25rem}.bluxcc-mt-4{margin-top:1rem}.bluxcc-mt-6{margin-top:1.5rem}.bluxcc-mt-\\[16px\\]{margin-top:16px}.bluxcc-box-border{box-sizing:border-box}.bluxcc-flex{display:flex}.bluxcc-inline-flex{display:inline-flex}.bluxcc-size-10{height:2.5rem;width:2.5rem}.bluxcc-size-20{height:5rem;width:5rem}.bluxcc-size-5{height:1.25rem;width:1.25rem}.bluxcc-size-8{height:2rem;width:2rem}.bluxcc-size-\\[68px\\]{height:68px;width:68px}.bluxcc-size-\\[73px\\]{height:73px;width:73px}.\\!bluxcc-h-14{height:3.5rem!important}.bluxcc-h-10{height:2.5rem}.bluxcc-h-12{height:3rem}.bluxcc-h-14{height:3.5rem}.bluxcc-h-20{height:5rem}.bluxcc-h-6{height:1.5rem}.bluxcc-h-8{height:2rem}.bluxcc-h-\\[348px\\]{height:348px}.bluxcc-h-\\[52px\\]{height:52px}.bluxcc-h-\\[60px\\]{height:60px}.bluxcc-h-full{height:100%}.bluxcc-max-h-\\[80px\\]{max-height:80px}.bluxcc-max-h-\\[90vh\\]{max-height:90vh}.\\!bluxcc-w-\\[360px\\]{width:360px!important}.\\!bluxcc-w-\\[68px\\]{width:68px!important}.bluxcc-w-12{width:3rem}.bluxcc-w-20{width:5rem}.bluxcc-w-\\[100px\\]{width:100px}.bluxcc-w-auto{width:auto}.bluxcc-w-full{width:100%}.bluxcc-max-w-\\[180px\\]{max-width:180px}.bluxcc-max-w-\\[90px\\]{max-width:90px}.bluxcc-flex-1{flex:1 1 0%}.bluxcc-flex-shrink-0{flex-shrink:0}.bluxcc-flex-grow{flex-grow:1}@keyframes bluxcc-fadeIn{0%{opacity:0}to{opacity:1}}.bluxcc-animate-fadeIn{animation:bluxcc-fadeIn .5s ease-in-out}@keyframes bluxcc-fadeOut{0%{opacity:1}to{opacity:0}}.bluxcc-animate-fadeOut{animation:bluxcc-fadeOut .5s ease-in-out}@keyframes bluxcc-spin{to{transform:rotate(1turn)}}.bluxcc-animate-spin{animation:bluxcc-spin 1s linear infinite}.\\!bluxcc-cursor-default{cursor:default!important}.bluxcc-cursor-pointer{cursor:pointer}.bluxcc-cursor-text{cursor:text}.bluxcc-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bluxcc-flex-col{flex-direction:column}.bluxcc-items-center{align-items:center}.bluxcc-justify-start{justify-content:flex-start}.bluxcc-justify-center{justify-content:center}.bluxcc-justify-between{justify-content:space-between}.bluxcc-gap-1{gap:.25rem}.bluxcc-gap-2{gap:.5rem}.bluxcc-gap-3{gap:.75rem}.bluxcc-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)))}.bluxcc-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)))}.bluxcc-overflow-hidden{overflow:hidden}.bluxcc-whitespace-nowrap{white-space:nowrap}.bluxcc-rounded-full{border-radius:9999px}.\\!bluxcc-rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.bluxcc-border{border-width:1px}.bluxcc-border-2{border-width:2px}.bluxcc-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bluxcc-bg-transparent{background-color:transparent}.bluxcc-bg-opacity-10{--tw-bg-opacity:0.1}.bluxcc-p-2{padding:.5rem}.bluxcc-px-2{padding-left:.5rem;padding-right:.5rem}.bluxcc-px-3{padding-left:.75rem;padding-right:.75rem}.bluxcc-px-4{padding-left:1rem;padding-right:1rem}.bluxcc-px-6{padding-left:1.5rem;padding-right:1.5rem}.bluxcc-px-\\[10px\\]{padding-left:10px;padding-right:10px}.bluxcc-py-1{padding-bottom:.25rem;padding-top:.25rem}.bluxcc-py-2{padding-bottom:.5rem;padding-top:.5rem}.bluxcc-pb-4{padding-bottom:1rem}.bluxcc-pt-\\[8px\\]{padding-top:8px}.bluxcc-text-center{text-align:center}.bluxcc-text-start{text-align:start}.bluxcc-text-\\[12px\\]{font-size:12px}.bluxcc-text-base{font-size:1rem;line-height:1.5rem}.bluxcc-text-lg{font-size:1.125rem;line-height:1.75rem}.bluxcc-text-sm{font-size:.875rem;line-height:1.25rem}.bluxcc-text-xl{font-size:1.25rem;line-height:1.75rem}.bluxcc-text-xs{font-size:.75rem;line-height:1rem}.bluxcc-font-medium{font-weight:500}.bluxcc-font-normal{font-weight:400}.bluxcc-font-semibold{font-weight:600}.bluxcc-capitalize{text-transform:capitalize}.bluxcc-leading-5{line-height:1.25rem}.bluxcc-leading-\\[28px\\]{line-height:28px}.bluxcc-text-alert-error{--tw-text-opacity:1;color:rgb(236 41 41/var(--tw-text-opacity,1))}.bluxcc-text-gray-600{--tw-text-opacity:1;color:rgb(102 102 102/var(--tw-text-opacity,1))}.bluxcc-text-gray-700{--tw-text-opacity:1;color:rgb(77 77 77/var(--tw-text-opacity,1))}.bluxcc-text-gray-800{--tw-text-opacity:1;color:rgb(51 51 51/var(--tw-text-opacity,1))}.bluxcc-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)}.bluxcc-outline-none{outline:2px solid transparent;outline-offset:2px}.bluxcc-backdrop-blur-\\[1px\\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.bluxcc-transition-\\[border-radius\\,background\\,border-color\\]{transition-duration:.15s;transition-property:border-radius,background,border-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.bluxcc-transition-\\[border-radius\\]{transition-duration:.15s;transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1)}.bluxcc-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.bluxcc-duration-150,.bluxcc-transition-all{transition-duration:.15s}.bluxcc-duration-300{transition-duration:.3s}.focus\\:bluxcc-outline-none:focus{outline:2px solid transparent;outline-offset:2px}');const g={mainnet:e.PUBLIC,testnet:e.TESTNET,sandbox:e.SANDBOX,futurenet:e.FUTURENET,standalone:e.STANDALONE},f=({fill:e="#5F6367"})=>c.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_117_204",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},c.createElement("rect",{width:"20",height:"20",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_117_204)"},c.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:e}))),C=({fill:e="#5F6367"})=>c.createElement("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_170_30135",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"25"},c.createElement("rect",{y:"0.5",width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_170_30135)"},c.createElement("path",{d:"M16 22.5L6 12.5L16 2.5L17.775 4.275L9.55 12.5L17.775 20.725L16 22.5Z",fill:e}))),v=({fill:e="#5F6367"})=>c.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2032_3674",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2032_3674)"},c.createElement("path",{d:"M5.26689 20L3.99994 18.7331L10.733 12L3.99994 5.26696L5.26689 4L11.9999 10.733L18.733 4L19.9999 5.26696L13.2669 12L19.9999 18.7331L18.733 20L11.9999 13.267L5.26689 20Z",fill:e}))),E=({fill:e="#0C1083"})=>c.createElement("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"bluxcc-animate-spin"},c.createElement("mask",{id:"mask0_2054_770",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"25",height:"24"},c.createElement("rect",{x:"0.5",width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2054_770)"},c.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:e}))),y=()=>c.createElement("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("circle",{cx:"34",cy:"34",r:"34",fill:"#DCEFE9"}),c.createElement("rect",{width:"40",height:"40",transform:"translate(14 14)",fill:"#DCEFE9"}),c.createElement("mask",{id:"mask0_2519_3056",maskUnits:"userSpaceOnUse",x:"14",y:"14",width:"40",height:"40"},c.createElement("rect",{x:"14",y:"14",width:"40",height:"40",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2519_3056)"},c.createElement("path",{d:"M31.6347 41.0894L42.8397 29.8844L41.0834 28.1282L31.6347 37.5769L26.8847 32.8269L25.1284 34.5832L31.6347 41.0894ZM34.003 49.8332C31.813 49.8332 29.7545 49.4176 27.8276 48.5865C25.9006 47.7554 24.2245 46.6275 22.7992 45.2028C21.374 43.778 20.2455 42.1026 19.4138 40.1765C18.5824 38.2504 18.1667 36.1925 18.1667 34.0028C18.1667 31.8128 18.5823 29.7543 19.4134 27.8273C20.2445 25.9004 21.3724 24.2243 22.7972 22.799C24.2219 21.3737 25.8973 20.2453 27.8234 19.4136C29.7495 18.5822 31.8074 18.1665 33.9972 18.1665C36.1872 18.1665 38.2456 18.5821 40.1726 19.4132C42.0995 20.2443 43.7756 21.3722 45.2009 22.7969C46.6262 24.2216 47.7547 25.8971 48.5863 27.8232C49.4177 29.7493 49.8334 31.8072 49.8334 33.9969C49.8334 36.1869 49.4179 38.2454 48.5867 40.1723C47.7556 42.0993 46.6277 43.7754 45.203 45.2007C43.7783 46.6259 42.1029 47.7544 40.1767 48.5861C38.2506 49.4175 36.1927 49.8332 34.003 49.8332Z",fill:"#00BD81"}))),k=({fill:e="#666666"})=>c.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2054_469",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2054_469)"},c.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:e}))),N=({fill:e="#4D4D4D"})=>c.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2054_791",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2054_791)"},c.createElement("path",{d:"M7.25 17.5V2.5H19.25V17.5H7.25ZM8.75 16H17.75V4H8.75V16ZM3.75 21V6.30775H5.25V19.5H15.4423V21H3.75Z",fill:e}))),L=({fill:e="#0C1083"})=>c.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2054_838",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2054_838)"},c.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:e}))),S=({fill:e="#0C1083"})=>c.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2054_817",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2054_817)"},c.createElement("path",{d:"M3.5 19.25V4.75L20.7115 12L3.5 19.25ZM5 17L16.85 12L5 7V10.6923L10.423 12L5 13.3077V17Z",fill:e}))),T=({fill:e="#0C1083"})=>c.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2204_971",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16"},c.createElement("rect",{width:"16",height:"16",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2204_971)"},c.createElement("path",{d:"M5.06372 11.8333L7.99955 8.89746L10.9354 11.8333H5.06372Z",fill:e}))),B=()=>c.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("rect",{x:"0.5",y:"0.5",width:"39",height:"39",rx:"19.5",fill:"transparent",stroke:"#00BD81"}),c.createElement("mask",{id:"mask0_2212_3318",maskUnits:"userSpaceOnUse",x:"8",y:"8",width:"24",height:"24"},c.createElement("rect",{x:"8",y:"8",width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2212_3318)"},c.createElement("path",{d:"M19.25 23.6923H20.7595V19.1365L22.6095 20.9865L23.6538 19.9423L20.0095 16.298L16.3558 19.9423L17.4 20.9865L19.25 19.1365V23.6923ZM20.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:"#00BD81"}))),M=()=>c.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("rect",{x:"0.5",y:"0.5",width:"39",height:"39",rx:"19.5",fill:"transparent",stroke:"#00BD81"}),c.createElement("mask",{id:"mask0_2494_9033",maskUnits:"userSpaceOnUse",x:"8",y:"8",width:"24",height:"24"},c.createElement("rect",{x:"8",y:"8",width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2494_9033)"},c.createElement("path",{d:"M12.577 25.9728C12.0142 25.255 11.5587 24.4749 11.2105 23.6326C10.8625 22.7902 10.6321 21.9126 10.5193 20.9998H12.05C12.15 21.7165 12.3334 22.404 12.6 23.0623C12.8667 23.7206 13.2167 24.3331 13.65 24.8998L12.577 25.9728ZM10.5193 18.9998C10.6398 18.087 10.8722 17.2094 11.2165 16.3671C11.5607 15.5247 12.0206 14.7511 12.5963 14.0461L13.65 15.0998C13.2167 15.6665 12.8667 16.279 12.6 16.9373C12.3334 17.5956 12.15 18.2831 12.05 18.9998H10.5193ZM18.95 29.4498C18.0372 29.3433 17.1638 29.1154 16.3298 28.7661C15.4958 28.4167 14.718 27.9626 13.9963 27.4036L15.05 26.2998C15.6334 26.7331 16.25 27.0915 16.9 27.3748C17.55 27.6581 18.2334 27.8498 18.95 27.9498V29.4498ZM15.1 13.6806L13.9963 12.5961C14.7346 12.0306 15.525 11.5764 16.3673 11.2336C17.2096 10.8906 18.0872 10.6626 19 10.5498V12.0498C18.2834 12.1498 17.5959 12.3366 16.9375 12.6103C16.2792 12.8841 15.6667 13.2409 15.1 13.6806ZM20.95 29.4498V27.9498C21.677 27.8498 22.3729 27.6655 23.0375 27.3968C23.7022 27.1283 24.323 26.7691 24.9 26.3191L26.0038 27.4036C25.2655 27.9792 24.471 28.436 23.6203 28.7738C22.7696 29.1116 21.8795 29.337 20.95 29.4498ZM24.95 13.6998C24.3667 13.2665 23.7417 12.9081 23.075 12.6248C22.4084 12.3415 21.7167 12.1498 21 12.0498V10.5498C21.9129 10.6563 22.793 10.8826 23.6403 11.2288C24.4878 11.5748 25.2756 12.0306 26.0038 12.5961L24.95 13.6998ZM27.4038 25.9536L26.35 24.8998C26.7834 24.3331 27.1334 23.7206 27.4 23.0623C27.6667 22.404 27.85 21.7165 27.95 20.9998H29.4808C29.3603 21.9126 29.1279 22.7902 28.7835 23.6326C28.4394 24.4749 27.9795 25.2486 27.4038 25.9536ZM27.95 18.9998C27.85 18.2831 27.6667 17.5956 27.4 16.9373C27.1334 16.279 26.7834 15.6665 26.35 15.0998L27.423 14.0268C27.9859 14.7446 28.4414 15.5247 28.7895 16.3671C29.1375 17.2094 29.368 18.087 29.4808 18.9998H27.95Z",fill:"#00BD81"}),c.createElement("circle",{cx:"20",cy:"20",r:"3",fill:"#00BD81"}))),F=()=>c.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("rect",{x:"0.5",y:"0.5",width:"39",height:"39",rx:"19.5",fill:"transparent",stroke:"#00BD81"}),c.createElement("mask",{id:"mask0_2214_3828",maskUnits:"userSpaceOnUse",x:"8",y:"8",width:"24",height:"24"},c.createElement("rect",{x:"8",y:"8",width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2214_3828)"},c.createElement("path",{d:"M20.0095 23.6923L23.6538 20.048L22.6095 19.004L20.7595 20.854V16.298H19.25V20.854L17.4 19.004L16.3558 20.048L20.0095 23.6923ZM20.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:"#00BD81"}))),O=()=>c.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2265_983",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2265_983)"},c.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"}))),_=({fill:e="#0C1083"})=>c.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2324_772",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},c.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2324_772)"},c.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:e}))),A=({fill:e="#0C1083"})=>c.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("mask",{id:"mask0_2097_3575",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"40",height:"40"},c.createElement("rect",{width:"40",height:"40",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2097_3575)"},c.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:e}))),R=()=>c.createElement("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("circle",{cx:"34",cy:"34",r:"34",fill:"#FFDEDE"}),c.createElement("mask",{id:"mask0_2497_9140",maskUnits:"userSpaceOnUse",x:"14",y:"14",width:"40",height:"40"},c.createElement("rect",{x:"14",y:"14",width:"40",height:"40",fill:"#D9D9D9"})),c.createElement("g",{mask:"url(#mask0_2497_9140)"},c.createElement("path",{d:"M33.9995 41.1662C34.2356 41.1662 34.4335 41.0863 34.5933 40.9266C34.753 40.7669 34.8328 40.569 34.8328 40.3328C34.8328 40.0967 34.753 39.8988 34.5933 39.7391C34.4335 39.5794 34.2356 39.4995 33.9995 39.4995C33.7634 39.4995 33.5655 39.5794 33.4058 39.7391C33.246 39.8988 33.1662 40.0967 33.1662 40.3328C33.1662 40.569 33.246 40.7669 33.4058 40.9266C33.5655 41.0863 33.7634 41.1662 33.9995 41.1662ZM33.4162 35.9995H34.5828V25.9995H33.4162V35.9995ZM34.0066 48.4995C32.0019 48.4995 30.1167 48.1191 28.3512 47.3583C26.5856 46.5974 25.0499 45.5648 23.7441 44.2603C22.438 42.9559 21.4041 41.4221 20.6424 39.6591C19.8805 37.8958 19.4995 36.0116 19.4995 34.0066C19.4995 32.0019 19.8799 30.1167 20.6408 28.3512C21.4016 26.5856 22.4342 25.0499 23.7387 23.7441C25.0431 22.438 26.5769 21.4041 28.3399 20.6424C30.1033 19.8805 31.9874 19.4995 33.9924 19.4995C35.9972 19.4995 37.8823 19.8799 39.6478 20.6408C41.4134 21.4016 42.9491 22.4342 44.2549 23.7387C45.561 25.0431 46.5949 26.5769 47.3566 28.3399C48.1185 30.1033 48.4995 31.9874 48.4995 33.9924C48.4995 35.9972 48.1191 37.8823 47.3583 39.6478C46.5974 41.4134 45.5648 42.9491 44.2603 44.2549C42.9559 45.561 41.4222 46.5949 39.6591 47.3566C37.8958 48.1185 36.0116 48.4995 34.0066 48.4995Z",fill:"#EC2929"}))),D=({icon:e,onInfo:t,onBack:l,title:r,closeButton:n=!1,onClose:a})=>{const o=We();return c.createElement("div",{className:"bluxcc-flex bluxcc-h-[60px] bluxcc-w-full bluxcc-items-center bluxcc-justify-between"},"info"===e?c.createElement("div",{onClick:t,className:"bluxcc-flex bluxcc-size-5 bluxcc-items-center bluxcc-justify-center"}):"back"===e?c.createElement("div",{onClick:l,className:"bluxcc-flex bluxcc-size-5 bluxcc-cursor-pointer bluxcc-items-center bluxcc-justify-center"},c.createElement(C,{fill:o.value.config.appearance.textColor})):c.createElement("div",{className:"bluxcc-size-5"}),c.createElement("p",{className:"bluxcc-flex-grow bluxcc-select-none bluxcc-text-center bluxcc-text-base bluxcc-font-medium"},r),n?c.createElement("div",{onClick:a,className:"bluxcc-size-5 bluxcc-cursor-pointer"},c.createElement(v,{fill:o.value.config.appearance.textColor})):c.createElement("div",{className:"bluxcc-size-5"}))},z=({isClosing:e,onClose:t,isSticky:l=!1})=>c.createElement("div",{className:"bluxcc-fixed bluxcc-inset-0 bluxcc-z-40 bluxcc-bg-black bluxcc-bg-opacity-10 bluxcc-backdrop-blur-[1px] "+(e&&!l?"bluxcc-animate-fadeOut":"bluxcc-animate-fadeIn"),onClick:t}),W=({isOpen:e,onClose:t=()=>{},onBack:l,onInfo:r,children:i,title:s,icon:u,isSticky:d=!1,closeButton:b=!0})=>{const[m,x]=n("auto"),[p,w]=n(!1),h=o(null),g=We(),{isOpening:f,isClosing:C,handleClose:v}=(e=>{const[t,l]=n({isOpening:!0,isClosing:!1,hasTransition:!1});return a((()=>{if(e&&t.isOpening){const e=setTimeout((()=>{l((e=>({...e,isOpening:!1})))}),300);return()=>clearTimeout(e)}}),[e,t.isOpening]),{...t,setHasTransition:e=>l((t=>({...t,hasTransition:e}))),handleClose:e=>{l((e=>({...e,isClosing:!0}))),setTimeout((()=>{l((e=>({...e,isClosing:!1}))),e()}),300)}}})(e),{appearance:E}=g.value.config;return a((()=>{const e=()=>w(window.innerWidth<760);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),a((()=>{if(!e||!h.current)return;x(h.current.offsetHeight);const t=new ResizeObserver((()=>{h.current&&x(h.current.offsetHeight)}));return t.observe(h.current),()=>t.disconnect()}),[e,i]),e?c.createElement(c.Fragment,null,!g.value.isDemo&&c.createElement(z,{isClosing:C,isSticky:d,onClose:()=>v(t)}),c.createElement("div",{className:`bluxcc-absolute bluxcc-inset-0 bluxcc-z-[9999] bluxcc-flex bluxcc-items-center bluxcc-justify-center ${C&&!d&&"bluxcc-animate-fadeOut"}`,onClick:e=>e.target===e.currentTarget&&v(t)},c.createElement("div",{className:"bluxcc-box-border bluxcc-overflow-hidden bluxcc-shadow-[0px_4px_80px_0px_#00000008] bluxcc-transition-all "+(p?"bluxcc-fixed bluxcc-bottom-0 bluxcc-left-0 bluxcc-max-h-[90vh] bluxcc-w-full !bluxcc-rounded-b-none":"bluxcc-relative !bluxcc-w-[360px]"),style:{height:"number"==typeof m?`${m}px`:m,opacity:C&&!d?"0":"1",transform:p?f||C?"translateY(100%)":"translateY(0%)":"none",transition:"height 300ms ease-in-out, border-radius 300ms, opacity 300ms ease-out "+(p?", transform 300ms ease-out":""),backgroundColor:E.background,color:E.textColor,fontFamily:E.font,letterSpacing:"-0.04px",outlineStyle:"solid",outlineColor:E.borderColor,outlineWidth:E.borderWidth,borderRadius:E.cornerRadius}},c.createElement("div",{ref:h,className:"bluxcc-px-6 bluxcc-pb-4"},c.createElement(D,{icon:u,onInfo:r,onBack:l,title:s,closeButton:b,onClose:()=>v(t)}),i)))):null};var I,H,U;!function(e){e.Rabet="Rabet",e.Albedo="Albedo",e.Freighter="Freighter",e.Xbull="xBull",e.Lobstr="LOBSTR",e.Hana="Hana"}(I||(I={})),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"}(H||(H={})),function(e){e.ONBOARDING="ONBOARDING",e.WRONG_NETWORK="WRONG_NETWORK",e.WAITING="WAITING",e.SUCCESSFUL="SUCCESSFUL",e.PROFILE="PROFILE",e.SIGN_TRANSACTION="SIGN_TRANSACTION",e.SEND="SEND",e.ACTIVITY="ACTIVITY",e.OTP="OTP"}(U||(U={}));const V=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"},Z={small:"bluxcc-h-8 bluxcc-text-sm bluxcc-gap-1",medium:"bluxcc-h-10 bluxcc-text-sm bluxcc-gap-2",large:"bluxcc-h-[52px] bluxcc-text-base bluxcc-gap-2"},P=({size:e="large",variant:t="outline",state:l="enabled",children:r,startIcon:n,endIcon:a,onClick:o,style:i,className:s})=>{const u=We().value.config.appearance,d={borderRadius:u.cornerRadius,cursor:"disabled"===l?"not-allowed":"pointer",opacity:"disabled"===l?.5:1,pointerEvents:"disabled"===l?"none":void 0,...i};return"outline"===t?Object.assign(d,{border:`1px solid ${u.borderColor}`,color:u.accent,backgroundColor:u.background,borderWidth:u.includeBorders?u.borderWidth:"1px"}):"fill"===t?Object.assign(d,{backgroundColor:u.accent,fontWeight:"500",color:V(u.accent)}):"text"===t&&Object.assign(d,{color:u.accent,backgroundColor:"transparent"}),"selected"===l&&(d.boxShadow=`0 0 0 2px ${u.accent}`),c.createElement("button",{onClick:o,disabled:"disabled"===l,className:`bluxcc-flex bluxcc-justify-center bluxcc-items-center bluxcc-px-[10px] bluxcc-transition-all bluxcc-w-full ${Z[e]} ${null!=s?s:""} bluxcc-transition-all bluxcc-duration-300`,style:d},n&&c.createElement("span",null,n),c.createElement("span",null,r),a&&c.createElement("span",null,a))},j=({button:e,onButtonClick:t,appearance:l})=>c.createElement("button",{onClick:t,style:{borderRadius:l.cornerRadius,color:l.accent,borderColor:l.borderColor,backgroundColor:l.background,borderWidth:l.includeBorders?l.borderWidth:"1px"},className:"bluxcc-border bluxcc-px-3 bluxcc-py-1 bluxcc-text-sm bluxcc-font-medium bluxcc-transition-all bluxcc-duration-300"},e),$=({label:e,autoFocus:t,type:l="text",placeholder:r="Input",error:a,iconRight:o,iconLeft:i,button:s,onButtonClick:u,customLabel:d,value:b,onChange:m})=>{const x=We().value.config.appearance,[p,w]=n(!1),h=()=>a?"#ec2929":p?x.accent:x.borderColor;return c.createElement("div",{className:"bluxcc-flex bluxcc-w-full bluxcc-flex-col"},e&&c.createElement("label",{style:{color:a?"#ec2929":x.textColor},className:"bluxcc-mb-1 bluxcc-ml-2 bluxcc-flex bluxcc-justify-between bluxcc-text-sm"},c.createElement("span",null,e),c.createElement("span",null,d)),c.createElement("div",{className:"bluxcc-flex bluxcc-h-14 bluxcc-w-full bluxcc-items-center bluxcc-border bluxcc-px-4 bluxcc-py-2 bluxcc-transition-all",onFocus:()=>w(!0),onBlur:()=>w(!1),onMouseEnter:e=>{p||a||(e.currentTarget.style.borderColor=x.accent,e.currentTarget.style.transition="border-color 0.35s ease-in-out")},onMouseLeave:e=>{p||(e.currentTarget.style.borderColor=a?"#ec2929":x.borderColor)},style:{"--tw-ring-color":h(),borderRadius:x.cornerRadius,borderColor:h(),backgroundColor:x.bgField,borderWidth:x.includeBorders?x.borderWidth:"1px"}},i&&c.createElement("div",{className:"bluxcc-mr-2"},i),c.createElement("input",{min:"number"===l?1:void 0,type:l,autoFocus:t,value:b,placeholder:r,className:"bluxcc-mr-2 bluxcc-bg-transparent bluxcc-outline-none",style:{color:x.textColor,width:s?"90%":"100%"},onChange:m}),s&&c.createElement(j,{button:s,onButtonClick:u,appearance:x}),o&&c.createElement("div",{className:"bluxcc-ml-2"},o)),a&&c.createElement("p",{className:"bluxcc-ml-2 bluxcc-mt-1 bluxcc-text-xs bluxcc-text-alert-error"},a))},G=()=>c.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("g",{clipPath:"url(#clip0_238_2232)"},c.createElement("path",{d:"M41.06 12.5H38.94L17.5 63.18L17.565 63.205H23.285L27.5775 53.065C36.4925 56.07 46.155 56.02 55.04 52.9225L59.39 63.205H62.435L62.5 63.18L41.06 12.5ZM41.1025 53.3675C36.76 53.3675 32.445 52.665 28.3275 51.2925L41.3375 20.5325L54.2925 51.1525C50.05 52.6175 45.5925 53.3675 41.1025 53.3675Z",fill:"#0691B7"})),c.createElement("defs",null,c.createElement("clipPath",{id:"clip0_238_2232"},c.createElement("rect",{width:"45",height:"52.5",fill:"white",transform:"translate(17.5 12.5)"})))),K=({fill:e="#221542"})=>c.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("path",{d:"M24 32.6489C24 32.4316 24.177 32.2562 24.3941 32.2493C30.8491 32.0454 36.0454 26.8491 36.2494 20.3941C36.2562 20.177 36.4317 20 36.6489 20H55.6067C55.8239 20 56 20.176 56 20.3932V43.0339C56 43.2512 55.8239 43.4272 55.6067 43.4272H44.7877C44.5705 43.4272 44.3944 43.2511 44.3944 43.0339V33.7948C44.3944 33.3973 43.8568 33.2414 43.6304 33.5683C39.3932 39.6869 32.369 43.7288 24.3941 43.8579C24.1769 43.8615 24 43.6851 24 43.4679V32.6489Z",fill:e}),c.createElement("path",{d:"M56 48.7019C56 48.4846 55.8239 48.3086 55.6067 48.3086H24.3933C24.1761 48.3086 24 48.4846 24 48.7019V59.5209C24 59.7381 24.1761 59.9141 24.3933 59.9141H55.6067C55.8239 59.9141 56 59.7381 56 59.5209V48.7019Z",fill:e})),X=({fill:e="#B8BAC4"})=>c.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("g",{clipPath:"url(#clip0_54_32)"},c.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:e}),c.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"}),c.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:e})),c.createElement("defs",null,c.createElement("clipPath",{id:"clip0_54_32"},c.createElement("rect",{width:"24",height:"48",fill:"white",transform:"translate(28.0001 16)"})))),Y=({fill:e="#310CCC"})=>c.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.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:e}),c.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:e})),q=({fill:e="#C19CFC"})=>c.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("rect",{width:"80",height:"80",fill:"#14142B"}),c.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"}),c.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:e}),c.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:e}),c.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:e}),c.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:e}),c.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:e}),c.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"}),c.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"}),c.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"})),J=({fill:e="black"})=>c.createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("path",{d:"M22.7898 38.3729C29.1931 21.8198 42.7306 18 42.7306 18C42.7306 18 38.3401 22.7294 35.2299 28.5503C32.12 34.3711 30.4735 44.9214 32.3029 47.832C41.267 46.0129 48.5848 35.8263 49.3165 26.9131C52.8484 29.4202 57.9147 33.2796 58.8296 44.7394C58.8296 44.7394 59.308 49.8328 56.2685 54.7441C53.2287 59.6554 46.7554 61.1106 46.7554 61.1106C46.7554 61.1106 40.3524 63.1116 33.4007 61.1106C26.7728 59.2032 17.2916 52.5875 22.7898 38.3729Z",fill:e})),Q=({fill:e="black"})=>c.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.createElement("g",{clipPath:"url(#clip0_44_35)"},c.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}),c.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})),c.createElement("defs",null,c.createElement("clipPath",{id:"clip0_44_35"},c.createElement("rect",{width:"22",height:"18.6157",fill:"white",transform:"translate(9 10)"})))),ee=({fill:e="black"})=>c.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.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})),te=e=>navigator.clipboard.writeText(e),le=(e,l)=>{try{const r=new t(e,l),c=r.operations[0];let n=null;return"payment"===c.type&&(n=c.destination),{action:c.type,operations:r.operations.length,sender:r.source,receiver:n,estimatedFee:Number(r.fee)/1e7}}catch(e){return null}},re=()=>{var e;const t=We();if(!t)throw new Error("useBlux must be used within a ProviderContext.");const{value:l,setValue:r,setRoute:c}=t,{isReady:n,user:a,isAuthenticated:o}=l;return{login:()=>{if(!n)throw new Error("Cannot connect when isReady is false.");if(o)throw new Error("Already connected.");r((e=>e.isModalOpen?e:{...e,isModalOpen:!0}))},logout:()=>{r((e=>({...e,isModalOpen:!1,user:{...e.user,wallet:null},isAuthenticated:!1,waitingStatus:"connecting"}))),c(U.ONBOARDING)},profile:()=>{if(!o)throw new Error("User is not authenticated.");c(U.PROFILE),r((e=>({...e,isModalOpen:!0})))},sendTransaction:function(e,t){return new Promise(((n,a)=>{let i=l.activeNetwork;if(t&&t.network&&(i=t.network),o||a(new Error("User is not authenticated.")),le(e,i))if(c(U.SIGN_TRANSACTION),!0===(null==t?void 0:t.isSoroban)){const t={network:i,isSoroban:!0};r((l=>({...l,isModalOpen:!0,signTransaction:{xdr:e,options:t,resolver:n,rejecter:a,result:null}})))}else{const t={network:i,isSoroban:!1};r((l=>({...l,isModalOpen:!0,signTransaction:{xdr:e,options:t,resolver:n,rejecter:a,result:null}})))}else a("Invalid XDR")}))},user:null!=a?a:null,isReady:null!==(e=l.isReady)&&void 0!==e&&e,isAuthenticated:null!=o&&o}},ce=(e,t)=>{const l=parseInt(e.replace("#",""),16);return`rgba(${l>>16&255}, ${l>>8&255}, ${255&l}, ${t})`},ne=({variant:e="default",startIcon:t,endArrow:l,label:r,onClick:a,onChange:o,onEnter:i,onSubmit:s,inputType:u="text"})=>{const d=We(),{appearance:b}=d.value.config,[m,x]=n(r||""),[p,w]=n(!1),[h,g]=n(!1),C=e=>"email"===u?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e):""!==e.trim(),v="Freighter"===r;return c.createElement("div",{onClick:"input"===e?void 0:a,className:"bluxcc-flex !bluxcc-h-14 bluxcc-w-full bluxcc-items-center bluxcc-border bluxcc-px-[10px] bluxcc-py-2 "+("input"===e?"bluxcc-cursor-text":"bluxcc-cursor-pointer"),style:{borderRadius:b.cornerRadius,color:b.textColor,borderColor:h?b.accent:b.borderColor,backgroundColor:b.bgField,borderWidth:b.includeBorders?b.borderWidth:"1px"},onMouseEnter:t=>{"social"===e||h||(t.currentTarget.style.borderColor=b.accent,t.currentTarget.style.transition="border-color 0.35s ease-in-out")},onMouseLeave:t=>{"social"===e||h||(t.currentTarget.style.borderColor=b.borderColor)}},c.createElement("span",{style:{borderRadius:b.cornerRadius,borderColor:b.borderColor,borderWidth:b.includeBorders?b.borderWidth:"1px"},className:"bluxcc-flex bluxcc-size-10 bluxcc-flex-shrink-0 bluxcc-items-center bluxcc-justify-center bluxcc-overflow-hidden bluxcc-border bluxcc-transition-[border-radius] bluxcc-duration-300"},t),c.createElement("div",{className:"bluxcc-relative bluxcc-ml-4 bluxcc-mr-1 bluxcc-flex bluxcc-h-full bluxcc-flex-1 bluxcc-items-center"},"input"===e?c.createElement(c.Fragment,null,c.createElement("input",{type:u,value:m,onChange:e=>{const t=e.target.value;x(t),w(C(t)),null==o||o(t)},onKeyDown:e=>{"Enter"===e.key&&p&&(null==i||i(m))},placeholder:"Email",className:"bluxcc-mr-1 bluxcc-h-full bluxcc-w-full bluxcc-bg-transparent bluxcc-outline-none focus:bluxcc-outline-none",style:{color:b.textColor},onFocus:()=>g(!0),onBlur:()=>{g(!1),C(m)||w(!1)}}),c.createElement("div",{className:"bluxcc-flex bluxcc-h-10 bluxcc-w-[100px] bluxcc-items-center bluxcc-justify-center bluxcc-bg-transparent"},c.createElement("button",{disabled:!p,onClick:()=>null==s?void 0:s(m),className:"bluxcc-absolute bluxcc-right-0 bluxcc-flex bluxcc-h-8 !bluxcc-w-[68px] bluxcc-items-center bluxcc-justify-center bluxcc-border bluxcc-bg-transparent bluxcc-text-sm bluxcc-font-medium bluxcc-transition-[border-radius,background,border-color] bluxcc-duration-150",style:{borderRadius:b.cornerRadius,borderColor:p?b.accent:b.borderColor,color:p?b.accent:"#999999",borderWidth:b.includeBorders?b.borderWidth:"1px"}},"Submit"))):c.createElement("span",{className:"bluxcc-select-none bluxcc-font-medium"},r)),v&&c.createElement("div",{className:"bluxcc-mr-2.5 bluxcc-px-2 bluxcc-py-1 bluxcc-text-xs bluxcc-font-normal",style:{color:b.accent,borderRadius:b.cornerRadius,backgroundColor:`${ce(b.accent,.1)}`}},"Recent"),l&&c.createElement("span",{className:"bluxcc-ml-auto bluxcc-mr-1 bluxcc-flex bluxcc-items-center"},c.createElement(f,{fill:b.textColor})))},ae=(e,t=8)=>e.slice(0,t)+"..."+e.slice(-t);function oe(e,t=!1){const l="number"==typeof e?e:parseFloat(e);if(isNaN(l)||0===l)return"0";if(l<1e-6)return e.toString();if(t){if(l>=1e6)return`${(l/1e6).toFixed(2)}m`;if(l>=1e3)return`${(l/1e3).toFixed(2)}k`}return function(e){const[t,l]=e.split(".");return l?`${t.replace(/\B(?=(\d{3})+(?!\d))/g,",")}.${l}`:t.replace(/\B(?=(\d{3})+(?!\d))/g,",")}(function(e){var t;const l=e.toString(),[r,c=""]=l.split(".");if(!c)return r;const n=null!==(t={0:8,1:7,2:6,3:5,4:4,5:3,6:2}[r.length])&&void 0!==t?t:0;if(n>0){const e=`${r}.${c.slice(0,n)}`,t=parseFloat(e);return Number.isInteger(t)?r:t.toFixed(2)}return r}(l))}const ie=(e,t)=>{switch(e){case"Rabet":return c.createElement(X,{fill:t?"#ffffff":"#B8BAC4"});case"Freighter":return c.createElement(Y,{fill:t?"#7863FF":"#310CCC"});case"Albedo":return c.createElement(G,null);case"LOBSTR":return c.createElement(J,{fill:t?"#ffffff":"#000000"});case"xBull":return c.createElement(q,{fill:t?"#FFFFFF":"#C19CFC"});case"Hana":return c.createElement(K,{fill:t?"#E6E0F7":"#221542"});default:return null}},se=async e=>{try{const{passphrase:t}=await e.getNetwork();return t}catch(e){return""}},ue=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)},de=(e,t)=>({url:e,...t}),be={[g.mainnet]:{name:"Mainnet",horizon:de("https://horizon.stellar.org"),soroban:de("https://mainnet.sorobanrpc.com")},[g.testnet]:{name:"Testnet",horizon:de("https://horizon-testnet.stellar.org"),soroban:de("https://soroban-testnet.stellar.org")},[g.futurenet]:{name:"Futurenet",horizon:de("https://horizon-futurenet.stellar.org"),soroban:de("https://rpc-futurenet.stellar.org")}},me=(e,t)=>{let l=be[e];const r=t[e];if(!l&&!r)throw new Error("Custom network has no transports.");return!l&&r&&(l={name:"Custom Network",horizon:de(""),soroban:de("")}),r&&(r.horizon&&(l.horizon=r.horizon),r.soroban&&(l.soroban=r.soroban)),l},xe=e=>new Promise((t=>setTimeout(t,e)));async function pe(e,c,n){try{const{horizon:a,soroban:o}=me(c.network,n);if(!a)throw new Error("Horizon RPC was not found.");const i=new l.Server(a.url),s=new t(e,c.network);if(c.isSoroban){const e=new r.Server(o.url),t=await e.sendTransaction(s),l=await(async(e,t)=>{for(let l=0;l<15;++l){const l=await t.getTransaction(e);if("SUCCESS"===l.status)return l;if("FAILED"===l.status)break;await xe(1e3)}return null})(t.hash,e);return l}return await i.submitTransaction(s)}catch(e){throw e}}const we={name:I.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===H.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:")}}},he=e=>{const t=Object.entries(H).find((([,t])=>t===e));if(!t)throw new Error(`Unknown network passphrase: ${e}`);return t[0].toLowerCase()},ge={name:I.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 l=new d,r=await l.sign({xdr:e,publicKey:null==t?void 0:t.address,network:(null==t?void 0:t.networkPassphrase)&&he(null==t?void 0:t.networkPassphrase)});return l.closeConnections(),r}catch(e){throw new Error("Failed to sign the transaction with xBull.")}},getNetwork:async()=>{throw new Error("Failed to get network from xBull")}},fe={name:I.Lobstr,website:"https://lobstr.co",isAvailable:()=>!0,connect:async()=>{try{if(!await b())throw new Error("LOBSTR Wallet is not installed or connected.");return{publicKey:await m()}}catch(e){throw new Error("Failed to connect to LOBSTR.")}},signTransaction:async e=>{try{if(!x)throw new Error("LOBSTR Wallet does not support signing transactions.");return await x(e)}catch(e){throw new Error("Failed to sign the transaction with LOBSTR.")}},getNetwork:async()=>{throw new Error("Failed to get network from LOBSTR")}},Ce={name:I.Albedo,website:"https://albedo.link",isAvailable:()=>!0,connect:async()=>{try{return{publicKey:(await p.publicKey({token:"Connect to Albedo"})).pubkey}}catch(e){throw new Error("Failed to connect to Albedo.")}},signTransaction:async(e,t={})=>{try{const{address:l,submit:r}=t;return(await p.tx({xdr:e,pubkey:l,network:(null==t?void 0:t.networkPassphrase)&&he(null==t?void 0:t.networkPassphrase),submit:r})).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")}},ve={name:I.Freighter,website:"https://freighter.app",isAvailable:()=>new Promise((e=>{const t=setTimeout((()=>{e(!1)}),1500);setTimeout((()=>{w.isConnected().then((({isConnected:l,error:r})=>{clearTimeout(t),e(!r&&l)})).catch((()=>{clearTimeout(t),e(!1)}))}),500)})),connect:async()=>{try{if(!await w.isConnected())throw new Error("Freighter Wallet is not installed or connected.");const e=await w.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 ve.connect()}throw new Error("Failed to connect to Freighter.")}},signTransaction:async(e,t={})=>{try{if(!await w.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 w.isConnected())throw new Error("Freighter Wallet is not installed or connected.");const e=await w.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.")}}},Ee={name:I.Hana,website:"https://www.hanawallet.io/",isAvailable:()=>{var e;return"undefined"!=typeof window&&!!(null===(e=window.hanaWallet)||void 0===e?void 0:e.stellar)},connect:async()=>{try{if(!await window.hanaWallet.stellar.getPublicKey())throw new Error("Hana Wallet is not installed or connected.");return{publicKey:await window.hanaWallet.stellar.getPublicKey()}}catch(e){throw new Error("Failed to connect to Hana wallet.")}},signTransaction:async(e,t={})=>{var l,r;try{const c=null===(r=null===(l=null===window||void 0===window?void 0:window.hanaWallet)||void 0===l?void 0:l.stellar)||void 0===r?void 0:r.signTransaction;if("function"!=typeof c)throw new Error("Hana Wallet does not support signing transactions.");return await c({xdr:e,address:t.address,networkPassphrase:t.networkPassphrase})}catch(e){throw new Error("Failed to sign the transaction with Hana wallet.")}},getNetwork:async()=>{throw new Error("Failed to get network from Hana wallet")}},ye={[I.Freighter]:ve,[I.Rabet]:we,[I.Hana]:Ee,[I.Lobstr]:fe,[I.Albedo]:Ce,[I.Xbull]:ge},ke=async()=>Promise.all(Object.values(ye).map((async e=>{try{const t=await e.isAvailable();return{wallet:e,isAvailable:t}}catch(t){return{wallet:e,isAvailable:!1}}}))),Ne={steexp:{[g.mainnet]:"https://steexp.com",[g.testnet]:"https://testnet.steexp.com",ledgerUrl:"ledger",transactionUrl:"tx",accountUrl:"account"},stellarexpert:{[g.mainnet]:"https://stellar.expert/explorer/public",[g.testnet]:"https://stellar.expert/explorer/testnet",ledgerUrl:"ledger",accountUrl:"account",transactionUrl:"tx"},lumenscan:{[g.mainnet]:"https://lumenscan.io",[g.testnet]:"https://testnet.lumenscan.io",ledgerUrl:"ledgers",accountUrl:"account",operationUrl:"ops",transactionUrl:"txns"},stellarchain:{[g.mainnet]:"https://stellarchain.io",[g.testnet]:"https://testnet.stellarchain.io",[g.futurenet]:"https://futurenet.stellarchain.io",ledgerUrl:"ledgers",accountUrl:"accounts",operationUrl:"operations",transactionUrl:"transactions"}},Le=(e,t,l,r)=>{let c=Ne[t];c||(c=Ne.stellarchain);let n=c[e];return n?`${n}/${c[l]}/${r}`:null};var Se=c.memo((({tx:e})=>{const t=We(),l=Le(t.value.activeNetwork,t.value.config.explorer,"transactionUrl",e.hash);return c.createElement("div",{className:"bluxcc-flex bluxcc-items-center bluxcc-justify-between"},c.createElement("div",{className:"bluxcc-flex bluxcc-items-center bluxcc-justify-start bluxcc-gap-3"},c.createElement("div",{className:"bluxcc-flex bluxcc-size-10 bluxcc-items-center bluxcc-justify-center bluxcc-rounded-full",style:{backgroundColor:t.value.config.appearance.background}},(e=>{switch(e){case"Receive":return c.createElement(F,null);case"Send":return c.createElement(B,null);default:return c.createElement(M,null)}})(e.title)),c.createElement("div",{className:"bluxcc-flex bluxcc-flex-col bluxcc-justify-start"},c.createElement("p",{className:"bluxcc-text-start bluxcc-text-xs bluxcc-font-medium",style:{color:t.value.config.appearance.textColor}},e.title),c.createElement("p",{className:"bluxcc-text-sm bluxcc-font-medium"},e.description))),c.createElement("div",{className:"bluxcc-flex bluxcc-items-center bluxcc-gap-2 bluxcc-text-xs bluxcc-text-gray-600"},(e=>{const t=new Date(e);return`${t.getUTCDate()} ${t.toLocaleString("en-US",{month:"long"})}`})(e.date),c.createElement("div",{className:"bluxcc-item-center bluxcc-flex bluxcc-size-8 bluxcc-cursor-pointer bluxcc-justify-center bluxcc-rounded-full",title:"View transaction details",onClick:()=>{l&&window.open(l,"_blank","noopener,noreferrer")},style:{backgroundColor:t.value.config.appearance.bgField}},c.createElement("span",{className:"bluxcc-flex bluxcc-items-center bluxcc-justify-center"},c.createElement(O,null)))))}));const Te=e=>"native"===e.asset_type?"XLM":e.asset_code||"Pool",Be=e=>{var t;return`${null===(t=e[0])||void 0===t?void 0:t.toUpperCase()}${e.slice(1)}`},Me=({otp:e,setOtp:t,error:l})=>{const r=e.length,n=We(),{appearance:i}=n.value.config,s=o([]);a((()=>{l&&setTimeout((()=>{var e;return null===(e=s.current[0])||void 0===e?void 0:e.focus()}),1001)}),[l]);const u=e=>{e.preventDefault();const l=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,r);if(!l)return;const c=[...l.split(""),...Array(r-l.length).fill("")];t(c),setTimeout((()=>{var e;return null===(e=s.current[r-1])||void 0===e?void 0:e.focus()}),0)},d=e=>({borderRadius:i.cornerRadius,color:i.accent,background:i.bgField,borderColor:l?"#FF6666":e?i.accent:i.borderColor,borderWidth:i.includeBorders?i.borderWidth:"1px"});return c.createElement("div",{className:"bluxcc-flex bluxcc-gap-1"},e.map(((l,n)=>c.createElement("input",{key:n,ref:e=>{s.current[n]=e},type:"text",inputMode:"numeric",maxLength:1,value:l,onChange:l=>((l,c)=>{var n;const a=c.target.value.replace(/\D/g,"");if(!a)return;const o=[...e];o[l]=a[0],t(o),l<r-1&&a&&(null===(n=s.current[l+1])||void 0===n||n.focus())})(n,l),onPaste:u,onKeyDown:l=>((l,r)=>{var c;if("Backspace"===r.key){const r=[...e];r[l]?(r[l]="",t(r)):l>0&&(null===(c=s.current[l-1])||void 0===c||c.focus(),r[l-1]="",t(r))}})(n,l),className:"bluxcc-h-14 bluxcc-w-12 bluxcc-border bluxcc-text-center bluxcc-text-lg bluxcc-outline-none",style:d(l)}))))},Fe=({operationsCount:e,sender:t,receiver:l,network:r,estimatedFee:n,action:a})=>{const o=We().value.config.appearance,i=[{label:"Action",value:Be(a)},{label:"Operations",value:e.toString()},{label:"Sender",value:ae(t,5),isHighlighted:!0,isCopyable:!0,copyValue:t},{label:"Network",value:be[r].name},{label:"Estimated Fee",value:`${n} XLM`}];return l&&i.splice(3,0,{label:"To",value:ae(l,5),isHighlighted:!0,isCopyable:!0,copyValue:l}),c.createElement("div",{className:"bluxcc-w-full bluxcc-text-sm bluxcc-text-gray-800"},i.map((({label:e,value:t,isHighlighted:l,isCopyable:r,copyValue:n},a)=>c.createElement("div",{key:a,className:"bluxcc-flex bluxcc-justify-between bluxcc-px-4 bluxcc-py-2",style:a===i.length-1?{}:{borderBottomColor:o.borderColor,borderBottomStyle:"dashed",borderBottomWidth:o.includeBorders?o.borderWidth:"1px"}},c.createElement("span",{style:{color:o.textColor}},e),c.createElement("span",{className:""+(r?"bluxcc-cursor-pointer":""),style:{color:l?o.accent:o.textColor},onClick:()=>r&&n&&te(n)},t)))))},Oe={[U.ONBOARDING]:{title:"Log in or Signup",Component:c.createElement((()=>{const{value:e,setValue:t,setRoute:l}=We(),[r,a]=n(""),o=e.availableWallets,s=i((()=>o.length>3?o.slice(2):[]),[o]),u=i((()=>o.length<=3?o:e.showAllWallets?o.slice(2,o.length):o.slice(0,2)),[o,e.showAllWallets]),d=()=>{t((e=>({...e,user:{...e.user,email:r}}))),l(U.OTP)},{appearance:b}=e.config,m=e.config.loginMethods||[],x=m.includes("passkey"),p=i((()=>[...[...m].filter((e=>"passkey"!==e)),...x?["passkey"]:[]]),[m,x]),w=()=>c.createElement("div",{className:"bluxcc-my-1 bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0 bluxcc-z-10",style:{borderTopWidth:b.includeBorders?b.borderWidth:"1px",borderTopStyle:"dashed",borderTopColor:b.borderColor}}),c.createElement("span",{className:"bluxcc-z-20 bluxcc-w-auto bluxcc-select-none bluxcc-px-2 bluxcc-text-sm bluxcc-font-medium",style:{backgroundColor:b.background,color:b.borderColor}},"or"));return c.createElement("div",{className:"bluxcc-w-full"},e.config.appearance.logo&&c.createElement("div",{className:"bluxcc-my-6 bluxcc-flex bluxcc-max-h-[80px] bluxcc-w-full bluxcc-items-center bluxcc-justify-center bluxcc-overflow-hidden"},c.createElement("img",{src:e.config.appearance.logo,alt:e.config.appName,width:152,height:60,className:"bluxcc-max-h-[80px] bluxcc-max-w-[180px]",loading:"eager",decoding:"async",draggable:"false",style:{contentVisibility:"auto"}})),c.createElement("div",{className:"bluxcc-space-y-2"},p.map(((r,n)=>{const o=p[n+1],i=p[n-1],m=p.includes("wallet"),x=m&&!e.showAllWallets&&"wallet"===r&&"email"===o||m&&"email"===r&&"wallet"!==i;return"wallet"===r?c.createElement(c.Fragment,{key:"wallet"},u.map((e=>c.createElement(ne,{key:e.name,...e,label:e.name,startIcon:ie(e.name,ue(b.bgField)),onClick:()=>(e=>{t((t=>({...t,user:{...t.user,wallet:{address:null,passphrase:"",name:e.name},waitingStatus:"connecting"}}))),l(U.WAITING)})(e)}))),s.length>0&&!e.showAllWallets&&c.createElement(ne,{endArrow:!0,label:"All Stellar wallets",startIcon:c.createElement(Q,{fill:V(b.bgField)}),onClick:()=>t((e=>({...e,showAllWallets:!0})))}),x&&w()):e.showAllWallets||"email"!==r?e.showAllWallets||"passkey"!==r?null:c.createElement("div",{key:"passkey",className:"!bluxcc-mt-6 bluxcc-flex bluxcc-h-6 bluxcc-cursor-pointer bluxcc-items-center bluxcc-justify-center bluxcc-text-sm bluxcc-font-medium bluxcc-leading-[28px]",style:{color:b.accent}},"Log in with Passkey"):c.createElement(c.Fragment,{key:"email"},c.createElement(c.Fragment,null,c.createElement(ne,{inputType:"email",variant:"input",startIcon:c.createElement(_,{fill:b.textColor}),onChange:e=>a(e),onEnter:d,onSubmit:d}),x&&w()))}))),c.createElement("div",{className:"bluxcc-w-full bluxcc-pt-[8px] bluxcc-text-center bluxcc-text-[12px] bluxcc-font-medium",style:{color:b.textColor}},"Powered by"," ",c.createElement("a",{"aria-label":"blux link",href:"https://blux.cc",target:"_blank",rel:"noreferrer"},"Blux.cc")))}),null)},[U.PROFILE]:{title:"Profile",Component:c.createElement((()=>{var e;const{logout:t}=re(),l=We(),[r,a]=n(!1),{balance:o}=Ze({asset:"native"}),i=l.value.config.appearance,s=null===(e=l.value.user.wallet)||void 0===e?void 0:e.address;return c.createElement("div",{className:"bluxcc-flex bluxcc-flex-col bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-mt-4 bluxcc-size-[73px] bluxcc-rounded-full",style:{background:i.accent}}),c.createElement("p",{className:"bluxcc-mb-4 bluxcc-mt-6 bluxcc-inline-flex bluxcc-cursor-pointer bluxcc-text-base",onClick:()=>{te(s).then((()=>{a(!0),setTimeout((()=>{a(!1)}),1e3)})).catch((()=>{}))},style:{color:i.textColor}},r?"Copied!":c.createElement("span",{className:"bluxcc-flex bluxcc-items-center bluxcc-gap-1"},s?ae(s,5):"",c.createElement(N,{fill:i.textColor}))),c.createElement("p",{className:"bluxcc-text-center bluxcc-text-base",style:{color:i.accent}},o?`${oe(o)} XLM`:"Loading..."),c.createElement("div",{className:"bluxcc-mt-[16px] bluxcc-w-full bluxcc-space-y-2"},c.createElement(ne,{endArrow:!0,label:"Send",startIcon:c.createElement(S,{fill:i.textColor}),onClick:()=>{l.setRoute(U.SEND)}}),c.createElement(ne,{endArrow:!0,label:"Activity",startIcon:c.createElement(L,{fill:i.textColor}),onClick:()=>{l.setRoute(U.ACTIVITY)}})),c.createElement("div",{className:"bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0",style:{borderTopWidth:i.includeBorders?i.borderWidth:"1px",borderTopColor:i.borderColor}})),c.createElement("div",{style:{color:i.textColor},onClick:()=>{t()},className:"bluxcc-flex bluxcc-h-12 bluxcc-w-full bluxcc-cursor-pointer bluxcc-items-center bluxcc-justify-center bluxcc-gap-2"},c.createElement(k,{fill:i.textColor}),"Logout"))}),null)},[U.WAITING]:{title:"",Component:c.createElement((()=>{var e,t,l,r;const i=We(),s=o(!1),[u,d]=n(!1),[b,m]=n([]),[x,p]=n(null),{user:w,config:h}=i.value,g=i.value.waitingStatus,f=i.value.config.appearance,{xdr:C,options:v}=i.value.signTransaction;a((()=>{(async()=>{const e=await ke();m(e)})()}),[]),a((()=>{var e,t;if(!(null===(e=null==w?void 0:w.wallet)||void 0===e?void 0:e.name))return;const l=null===(t=b.find((({wallet:e})=>{var t;return e.name===(null===(t=null==w?void 0:w.wallet)||void 0===t?void 0:t.name)})))||void 0===t?void 0:t.wallet;l&&p(l)}),[b,null==w?void 0:w.wallet]),a((()=>{!s.current&&x&&(s.current=!0,y(x))}),[x]);const y=async e=>{var t;if("signing"===g)try{const l=await(async(e,t,l,r)=>{if(!(null==e?void 0:e.signTransaction))throw new Error("Wallet does not support transaction signing.");return await e.signTransaction(t,{networkPassphrase:r,address:l})})(e,C,null===(t=i.value.user.wallet)||void 0===t?void 0:t.address,v.network),r=await pe(l,v,h.transports||{});i.setValue((e=>({...e,signTransaction:{...e.signTransaction,result:r}}))),r?i.setRoute(U.SUCCESSFUL):d(!0)}catch(e){throw d(!0),e}else try{const{publicKey:t}=await e.connect();if(t&&""!==t.trim()){const l=await se(e);i.setValue((r=>({...r,user:{...r.user,wallet:{passphrase:l,name:e.name,address:t}}}))),setTimeout((()=>{i.setRoute(U.SUCCESSFUL)}),400)}}catch(e){throw d(!0),e}};return c.createElement("div",{className:"bluxcc-mt-4 bluxcc-flex bluxcc-w-full bluxcc-select-none bluxcc-flex-col bluxcc-items-center bluxcc-justify-center"},u?c.createElement("div",{className:"bluxcc-mb-6 bluxcc-flex bluxcc-items-center bluxcc-justify-center"},c.createElement(R,null)):c.createElement("div",{className:"bluxcc-mb-6 bluxcc-flex bluxcc-size-20 bluxcc-items-center bluxcc-justify-center bluxcc-overflow-hidden bluxcc-rounded-full bluxcc-border",style:{borderColor:f.borderColor,borderWidth:f.includeBorders?f.borderWidth:"1px"}},ie(null!==(t=null===(e=null==w?void 0:w.wallet)||void 0===e?void 0:e.name)&&void 0!==t?t:"",ue(f.bgField))),c.createElement("div",{className:"bluxcc-flex-col bluxcc-space-y-2 bluxcc-text-center bluxcc-font-medium"},c.createElement("p",{className:"bluxcc-text-xl"},u?""+("connecting"===g?"Login failed":`Signing with ${null===(l=null==w?void 0:w.wallet)||void 0===l?void 0:l.name} failed`):`${"connecting"===g?"Waiting for":"Signing with"} ${null===(r=null==w?void 0:w.wallet)||void 0===r?void 0:r.name}`),c.createElement("p",{className:"bluxcc-text-sm"},u?`Please try ${"connecting"===g?"logging in":"signing"} again.`:("connecting"===g?"Accept connection":"Sign the")+" request in your wallet")),c.createElement("div",{className:"bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0",style:{borderTopWidth:f.includeBorders?f.borderWidth:"1px",borderTopColor:f.borderColor}})),u?c.createElement(P,{onClick:()=>{d(!1),x&&y(x)},state:"enabled",variant:"outline"},"Try again"):c.createElement(P,{state:"enabled",variant:"outline",className:"!bluxcc-cursor-default",startIcon:c.createElement(E,{fill:f.accent})},"connecting"===g?"Connecting":"Signing"))}),null)},[U.SUCCESSFUL]:{title:"",Component:c.createElement((()=>{const e=We(),t=e.value.waitingStatus,l=e.value.config.appearance,{result:r,options:n}=e.value.signTransaction;let o;if(r)if(n.isSoroban){o=r.txHash}else{o=r.hash}const i=o?Le(n.network,e.value.config.explorer,"transactionUrl",o):null;a((()=>{"connecting"===t&&setTimeout((()=>{e.setValue((e=>({...e,isModalOpen:!1,showAllWallets:!1,isAuthenticated:!0})))}),1e3)}),[]);return c.createElement("div",{className:"bluxcc-mt-4 bluxcc-flex bluxcc-w-full bluxcc-select-none bluxcc-flex-col bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-mb-6 bluxcc-flex bluxcc-size-[68px] bluxcc-items-center bluxcc-justify-center bluxcc-overflow-hidden"},c.createElement(y,null)),c.createElement("div",{className:"bluxcc-w-full bluxcc-flex-col bluxcc-space-y-2 bluxcc-text-center bluxcc-font-medium"},c.createElement("p",{className:"bluxcc-text-xl"},"connecting"===t?"Connection":"Transaction"," ","Successful"),c.createElement("p",{className:"bluxcc-text-center bluxcc-text-sm bluxcc-leading-5"},"connecting"===t?`Your account has been successfully connected to ${Be(e.value.config.appName)}`:"Your transaction was successfully completed")),"signing"===t&&o&&"string"==typeof i&&c.createElement(P,{state:"enabled",variant:"outline",size:"small",className:"mt-4",onClick:()=>{i&&window.open(i,"_blank","noopener,noreferrer")}},"See in explorer"),c.createElement("div",{className:"bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0",style:{borderTopWidth:l.includeBorders?l.borderWidth:"1px",borderTopColor:l.borderColor}})),"connecting"===t?c.createElement(P,{state:"enabled",variant:"outline",className:"!bluxcc-cursor-default"},"Logging In"):c.createElement(P,{state:"enabled",variant:"fill",size:"large",onClick:()=>{if(e.setValue((e=>({...e,isModalOpen:!1}))),"signing"===t){const{resolver:t,result:l}=e.value.signTransaction;t&&l&&t(l)}}},"Done"))}),null)},[U.SIGN_TRANSACTION]:{title:"Confirmation",Component:c.createElement((()=>{var e;const t=We(),{balance:l}=Ze({asset:"native"}),r=t.value.config.appearance,{xdr:n,options:a}=t.value.signTransaction,o=le(n,a.network);return o?c.createElement("div",{className:"bluxcc-w-full"},c.createElement("p",{className:"bluxcc-mx-3 bluxcc-my-4 bluxcc-select-none bluxcc-text-center bluxcc-text-sm bluxcc-font-medium"},c.createElement("span",{className:"bluxcc-font-semibold bluxcc-capitalize"},t.value.config.appName," "),"wants your permission to approve the following transaction."),c.createElement(Fe,{operationsCount:o.operations,sender:o.sender,receiver:o.receiver,network:a.network,estimatedFee:o.estimatedFee.toString(),action:o.action}),c.createElement("div",{className:"bluxcc-mt-4 bluxcc-inline-flex bluxcc-h-14 bluxcc-w-full bluxcc-items-center bluxcc-justify-between bluxcc-border bluxcc-px-4",style:{borderRadius:r.cornerRadius,borderColor:r.borderColor}},c.createElement("div",{className:"bluxcc-inline-flex bluxcc-items-center bluxcc-gap-1 bluxcc-whitespace-nowrap bluxcc-font-medium"},c.createElement("p",{className:"bluxcc-whitespace-nowrap bluxcc-text-sm bluxcc-font-medium"},"Your wallet"),c.createElement("p",{className:"bluxcc-mt-0.5 bluxcc-text-xs",style:{color:`${ce(r.textColor,.8)}`}},(null===(e=t.value.user.wallet)||void 0===e?void 0:e.address)?ae(t.value.user.wallet.address,5):"No address found")),c.createElement("div",{className:"bluxcc-overflow-hidden bluxcc-px-[10px] bluxcc-py-2",style:{borderRadius:r.cornerRadius,backgroundColor:r.bgField,color:r.textColor}},c.createElement("p",{className:"bluxcc-max-w-[90px] bluxcc-text-xs bluxcc-font-normal"},l?oe(l):"0"," XLM"))),c.createElement("div",{className:"bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0",style:{borderTopWidth:r.includeBorders?r.borderWidth:"1px",borderTopColor:r.borderColor}})),c.createElement(P,{size:"large",state:"enabled",variant:"fill",onClick:async()=>{t.setValue((e=>({...e,isModalOpen:!0,waitingStatus:"signing"}))),t.setRoute(U.WAITING)}},"Approve")):c.createElement("div",null,c.createElement("p",null,"Invalid XDR"))}),null)},[U.SEND]:{title:"Send",Component:c.createElement((()=>{const e=We().value.config.appearance,[t,l]=n({amount:"",address:"",memo:""}),[r,a]=n({}),o=e=>t=>{l((l=>({...l,[e]:t.target.value}))),a((t=>({...t,[e]:""})))};return c.createElement("div",null,c.createElement("div",{className:"bluxcc-mb-4"},c.createElement($,{autoFocus:!0,type:"number",label:"Amount",placeholder:"0.00",value:t.amount,onChange:o("amount"),error:r.amount,customLabel:c.createElement("span",{onClick:()=>l((e=>({...e,amount:"345.00"}))),style:{color:e.accent},className:"bluxcc-mr-2 bluxcc-inline-flex bluxcc-cursor-pointer"},"Max ",c.createElement(T,{fill:e.accent})),button:c.createElement("span",{className:"bluxcc-flex bluxcc-justify-between bluxcc-gap-1",style:{color:e.textColor,borderColor:e.borderColor}},c.createElement("span",{className:"flex items-center"},c.createElement(ee,{fill:V(e.background)})),"XLM")})),c.createElement("div",{className:"bluxcc-mb-4"},c.createElement($,{label:"To",placeholder:"Enter address",value:t.address,onChange:o("address"),error:r.address,button:"Paste",onButtonClick:async()=>{const e=await navigator.clipboard.readText();l((t=>({...t,address:e})))}})),c.createElement("div",null,c.createElement($,{label:"Memo",placeholder:"Enter Memo (optional)",value:t.memo,onChange:o("memo")})),c.createElement("div",{className:"bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0",style:{borderTopWidth:e.includeBorders?e.borderWidth:"1px",borderTopColor:e.borderColor}})),c.createElement(P,{size:"large",variant:"outline",state:"enabled",onClick:()=>{const e={};t.address||(e.address="Address is required"),t.amount||(e.amount="Amount is required"),a(e),Object.keys(e).length}},"Send"))}),null)},[U.ACTIVITY]:{title:"Activity",Component:c.createElement((()=>{var e;const[t,r]=n([]),{transactions:o,loading:i}=je({includeOperations:!0}),{value:s}=We(),u=null===(e=s.user.wallet)||void 0===e?void 0:e.address,d=Le(s.activeNetwork,s.config.explorer,"accountUrl",u);a((()=>{if(!o)return;const e=[];for(const r of o){const c=r.operations[0],n={hash:r.hash,description:"",date:r.created_at,title:(t=c.type,t.replace(/([A-Z])/g," $1").replace(/_/g," ").trim().replace(/\b\w/g,(e=>e.toUpperCase())))};if(r.operations.length>1)n.title="Multi Operation";else if("payment"===c.type){let e="Send";c.to.toLowerCase()===u.toLowerCase()&&(e="Receive"),n.title=e,n.description=`${oe(c.amount)} ${Te(c)}`}else c.type!==l.HorizonApi.OperationResponseType.pathPaymentStrictSend&&c.type!==l.HorizonApi.OperationResponseType.pathPayment||(n.title="Swap",n.description=`Path payment of ${c.amount} ${Te(c)}`);e.push(n)}var t;r(e)}),[o]);const b=!i&&0===t.length;return c.createElement("div",{className:"bluxcc-flex bluxcc-h-[348px] bluxcc-flex-col bluxcc-justify-between"},i?c.createElement("div",{className:"bluxcc-flex bluxcc-h-full bluxcc-flex-col bluxcc-items-center bluxcc-justify-center bluxcc-text-center bluxcc-text-gray-700"},"Loading activity..."):b?c.createElement("div",{className:"bluxcc-flex bluxcc-h-full bluxcc-flex-col bluxcc-items-center bluxcc-justify-center bluxcc-text-center bluxcc-text-gray-700"},"No activity found"):t.map(((e,l)=>c.createElement("div",{key:l,style:{borderBottomStyle:"dashed",borderBottomWidth:l<t.length-1?s.config.appearance.includeBorders?s.config.appearance.borderWidth:"1px":"0px",borderBottomColor:s.config.appearance.borderColor},className:"bluxcc-p-2"},c.createElement(Se,{tx:e})))),t.length>0&&d&&c.createElement(P,{state:"enabled",variant:"outline",size:"medium",className:"mt-4",onClick:()=>{d&&window.open(d,"_blank","noopener,noreferrer")}},"See all in explorer"))}),null)},[U.OTP]:{title:"",Component:c.createElement((()=>{const{value:e}=We(),t=e.config.appearance,l=e.user.email,[r,o]=n(Array(6).fill("")),[i,s]=n(!1);return a((()=>{const e=r.join("");6===e.length&&(async e=>{s(!1),await new Promise((t=>{setTimeout((()=>{t("123456"===e)}),200)}))||(s(!0),setTimeout((()=>o(Array(6).fill(""))),1e3))})(e)}),[r,l]),c.createElement("div",{className:"bluxcc-mt-4 bluxcc-flex bluxcc-w-full bluxcc-select-none bluxcc-flex-col bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{style:{borderColor:t.borderColor,borderWidth:t.includeBorders?t.borderWidth:"1px"},className:"bluxcc-mb-6 bluxcc-flex bluxcc-h-20 bluxcc-w-20 bluxcc-items-center bluxcc-justify-center bluxcc-overflow-hidden bluxcc-rounded-full bluxcc-border-2"},c.createElement(A,{fill:t.textColor})),c.createElement("div",{className:"bluxcc-flex-col bluxcc-space-y-1 bluxcc-text-center"},c.createElement("p",{className:"bluxcc-text-xl bluxcc-font-medium"},"Enter confirmation code"),i?c.createElement("p",{className:"bluxcc-flex bluxcc-h-10 bluxcc-items-center bluxcc-justify-center bluxcc-text-sm bluxcc-text-alert-error"},"Invalid code, please try again."):c.createElement("p",{className:"bluxcc-h-10 bluxcc-text-sm"},"Please check your email and enter confirmation code below")),c.createElement("div",{className:"bluxcc-mt-6 bluxcc-text-center"},c.createElement(Me,{otp:r,setOtp:o,error:i})),c.createElement("div",{className:"bluxcc-flex bluxcc-h-8 bluxcc-w-full bluxcc-items-center bluxcc-justify-center"},c.createElement("div",{className:"bluxcc-absolute bluxcc-left-0 bluxcc-right-0",style:{borderTopWidth:t.includeBorders?t.borderWidth:"1px",borderTopColor:t.borderColor}})),c.createElement(P,{size:"medium",state:"enabled",variant:"text",onClick:()=>{},style:{color:t.accent}},"Resend code"))}),null)},[U.WRONG_NETWORK]:{isSticky:!0,title:"Wrong Network",Component:c.createElement((()=>c.createElement("div",null,c.createElement("p",null,"You are on a wrong network."))),null)}};function _e({isOpen:e,closeModal:t}){const{route:l,setRoute:r,value:n,setValue:a}=We();let o;l===U.WAITING&&"signing"!==n.waitingStatus||l===U.ONBOARDING&&n.showAllWallets||l===U.ACTIVITY||l===U.SEND||l===U.OTP?o="back":l===U.ONBOARDING&&(o="info");const{title:i,Component:s,isSticky:u}=Oe[l],d=l===U.WRONG_NETWORK||l===U.WAITING||l===U.SUCCESSFUL;return c.createElement(W,{isOpen:e,onBack:()=>{l===U.WAITING||l===U.OTP&&!n.isAuthenticated?r(U.ONBOARDING):n.showAllWallets?a((e=>({...e,showAllWallets:!1}))):l!==U.SEND&&l!==U.ACTIVITY||r(U.PROFILE)},onClose:u?()=>{}:()=>{t();const e=n.waitingStatus,{resolver:r,rejecter:c,result:a}=n.signTransaction;l===U.SUCCESSFUL&&"signing"===e?r&&a&&r(a):l===U.SIGN_TRANSACTION&&c&&c({code:4001,message:"User rejected the transaction"})},title:i,isSticky:u,icon:o,closeButton:!d},s)}const Ae={theme:"light",logo:"",font:"Manrope",accent:"#0c1083",borderWidth:"1px",bgField:"#ffffff",cornerRadius:"32px",textColor:"#000000",background:"#ffffff",includeBorders:!0,borderColor:"#cdceee"},Re={theme:"dark",logo:"",font:"Manrope",accent:"#ffffff",borderWidth:"1px",bgField:"#1a1a1a",cornerRadius:"32px",textColor:"#ffffff",background:"#000000",includeBorders:!0,borderColor:"#333333"},De=s(null),ze=({config:e,isDemo:t,children:o})=>{var i;if(0===e.networks.length)throw new Error("no network is set in config.networks");if(!e.networks.includes(e.defaultNetwork))throw new Error("default network is not listed in networks");for(const t of e.networks)if(!be[t]){if(!e.transports)throw new Error("Must set transports for custom networks");if(!e.transports[t])throw new Error("Must set transports for custom networks")}const{horizon:s,soroban:u}=me(e.defaultNetwork,null!==(i=e.transports)&&void 0!==i?i:{}),[d,b]=n(U.ONBOARDING),[m,x]=n({config:{...e,explorer:e.explorer||"stellarchain",appearance:{...Ae,...e.appearance}},activeNetwork:e.defaultNetwork,isDemo:null!=t&&t,user:{wallet:null,phoneNumber:null,email:null},isModalOpen:!1,isReady:!1,isAuthenticated:!1,waitingStatus:"connecting",signTransaction:{xdr:"",options:{network:"",isSoroban:!1},result:null,rejecter:null,resolver:null},availableWallets:[],showAllWallets:!1,servers:{horizon:new l.Server(s.url),soroban:new r.Server(u.url)}});((e,t,l)=>{const[r,c]=n(!1);a((()=>{const t=setInterval((()=>{e.isAuthenticated&&e.user.wallet&&se(ye[e.user.wallet.name]).then((t=>{t&&!e.config.networks.includes(t)?c(!0):c(!1)}))}),200);return()=>{clearInterval(t),c(!1)}}),[e.isAuthenticated,e.config.networks,e.user.wallet]),a((()=>{r?(l(U.WRONG_NETWORK),t((e=>({...e,isModalOpen:!0})))):t((e=>({...e,isModalOpen:!1})))}),[r])})(m,x,b),a((()=>{x((t=>({...t,config:{...t.config,appearance:{...Ae,...e.appearance}}})))}),[e]),a((()=>{var e;const{horizon:t,soroban:c}=me(m.activeNetwork,null!==(e=m.config.transports)&&void 0!==e?e:{});x((e=>({...e,servers:{horizon:new l.Server(t.url),soroban:new r.Server(c.url)}})))}),[m.config.transports,m.config.networks,m.activeNetwork]);const p=()=>{ke().then((e=>{const t=e.filter((e=>e.isAvailable)).map((e=>e.wallet));x((e=>({...e,isReady:!0,availableWallets:t}))),(()=>{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)})()}))};a((()=>("complete"===document.readyState?p():window.addEventListener("load",p),()=>{window.removeEventListener("load",p)})),[]);return c.createElement(De.Provider,{value:{value:m,setValue:x,route:d,setRoute:b}},o,c.createElement(_e,{isOpen:m.isModalOpen,closeModal:()=>{x((e=>({...e,isModalOpen:!1})))}}))},We=()=>{const e=u(De);if(!e)throw new Error("useProvider must be used within a ProviderContext.");return e},Ie=()=>{const e=We();if(!e)throw new Error("Blux hooks must be used within a BluxProvider context.");return e},He=(e,t)=>{var c;if(!t)return{soroban:e.servers.soroban,horizon:e.servers.horizon,networkPassphrase:e.activeNetwork};const{horizon:n,soroban:a}=me(t,null!==(c=e.config.transports)&&void 0!==c?c:{});return{networkPassphrase:t,soroban:new r.Server(a.url),horizon:new l.Server(n.url)}},Ue=e=>{const{value:t}=Ie(),[l,r]=n(He(t,e));return a((()=>{r(He(t,e||t.activeNetwork))}),[e,t.activeNetwork]),l},Ve=e=>{const{value:t}=Ie(),{horizon:l,networkPassphrase:r}=Ue(null==e?void 0:e.network),[c,o]=n({error:null,loading:!0,account:null});return a((()=>{var r;o({error:null,account:null,loading:!0});const c=null===(r=t.user.wallet)||void 0===r?void 0:r.address;if(!c&&!(null==e?void 0:e.address))return void o({account:null,loading:!1,error:new Error("Both user.wallet.address and address parameter are undefined")});const n=(null==e?void 0:e.address)?e.address:c;l.loadAccount(n).then((e=>{o({error:null,loading:!1,account:e})})).catch((e=>{o({error:e,loading:!1,account:null})}))}),[null==e?void 0:e.address,r,t.user.wallet]),c},Ze=({asset:e,address:t,network:l})=>{const{value:r}=Ie(),{horizon:c,networkPassphrase:o}=Ue(l),[i,s]=n({error:null,loading:!0,balance:"0"});return a((()=>{var l;s({error:null,loading:!0,balance:"0"});const n=null===(l=r.user.wallet)||void 0===l?void 0:l.address;if(!n&&!t)return void s({loading:!1,balance:"0",error:new Error("Both user.wallet.address and address parameter are undefined")});const a=t||n;c.loadAccount(a).then((t=>{if("native"===e){const e=t.balances.find((e=>"native"===e.asset_type));s({error:null,loading:!1,balance:(null==e?void 0:e.balance)||"0"})}else if("string"==typeof e){const l=e.split(":"),r=t.balances.find((e=>e.asset_code===l[0]&&e.asset_issuer===l[1]));s({error:null,loading:!1,balance:(null==r?void 0:r.balance)||"0"})}})).catch((e=>{s({error:e,loading:!1,balance:"0"})}))}),[t,e,r.user.wallet,o]),i},Pe=()=>{const e=We();if(!e)throw new Error("useBlux must be used within a ProviderContext.");const{value:t}=e,[l,r]=n(t.activeNetwork);return a((()=>{r(t.activeNetwork)}),[t.activeNetwork]),l},je=e=>{const{value:t}=Ie(),{horizon:l,networkPassphrase:r}=Ue(null==e?void 0:e.network),[c,o]=n({error:null,loading:!0,transactions:[]});return a((()=>{var r;o({error:null,loading:!0,transactions:[]});const c=null===(r=t.user.wallet)||void 0===r?void 0:r.address;if(!c&&!(null==e?void 0:e.address))return void o({loading:!1,transactions:[],error:new Error("Both user.wallet.address and address parameter are undefined")});const n=(null==e?void 0:e.address)?null==e?void 0:e.address:c;l.transactions().forAccount(n).limit((null==e?void 0:e.limit)||5).order("desc").call().then((t=>{if(null==e?void 0:e.includeOperations){const e=[];for(const l of t.records)e.push(l.operations());Promise.all(e).then((e=>{const l=t.records.map(((t,l)=>({...t,operations:e[l].records})));o({error:null,loading:!1,transactions:l})}))}else o({error:null,loading:!1,transactions:t.records})})).catch((e=>{o({error:e,loading:!1,transactions:[]})}))}),[null==e?void 0:e.address,r,t.user.wallet]),c},$e=()=>{const e=We();if(!e)throw new Error("useBlux must be used within a ProviderContext.");const{value:t,setValue:l}=e;return{switchNetwork:e=>{if(!t.config.networks.includes(e))throw new Error("New network must be defined in config.networks");l({...t,activeNetwork:e})},networks:t.config.networks}};export{ze as BluxProvider,Re as defaultDarkTheme,Ae as defaultLightTheme,g as networks,de as url,Ve as useAccount,Ze as useBalance,re as useBlux,Pe as useNetwork,$e as useSwitchNetwork,je as useTransactions};
@@ -9,7 +9,8 @@ export declare enum SupportedWallets {
9
9
  Albedo = "Albedo",
10
10
  Freighter = "Freighter",
11
11
  Xbull = "xBull",
12
- Lobstr = "LOBSTR"
12
+ Lobstr = "LOBSTR",
13
+ Hana = "Hana"
13
14
  }
14
15
  /**
15
16
  * Enum defining the various Stellar network environments.
@@ -115,6 +116,7 @@ export interface ContextInterface {
115
116
  isAuthenticated: boolean;
116
117
  availableWallets: WalletInterface[];
117
118
  waitingStatus: 'connecting' | 'signing';
119
+ showAllWallets: boolean;
118
120
  activeNetwork: string;
119
121
  signTransaction: ISignTransaction<boolean>;
120
122
  servers: {
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const handleLogos: (walletName: string) => React.JSX.Element | null;
2
+ declare const handleLogos: (walletName: string, isDark: boolean) => React.JSX.Element | null;
3
3
  export default handleLogos;
@@ -0,0 +1,2 @@
1
+ declare const hexToRgba: (hex: string, alpha: number) => string;
2
+ export default hexToRgba;
@@ -0,0 +1,2 @@
1
+ declare const isBackgroundDark: (bgColor: string) => boolean;
2
+ export default isBackgroundDark;
@@ -2,6 +2,7 @@ declare const getTransactionDetails: (xdr: string, network: string) => {
2
2
  action: "createAccount" | "payment" | "pathPaymentStrictReceive" | "pathPaymentStrictSend" | "createPassiveSellOffer" | "manageSellOffer" | "manageBuyOffer" | "setOptions" | "changeTrust" | "allowTrust" | "accountMerge" | "inflation" | "manageData" | "bumpSequence" | "createClaimableBalance" | "claimClaimableBalance" | "beginSponsoringFutureReserves" | "endSponsoringFutureReserves" | "revokeSponsorship" | "clawback" | "clawbackClaimableBalance" | "setTrustLineFlags" | "liquidityPoolDeposit" | "liquidityPoolWithdraw" | "invokeHostFunction" | "extendFootprintTtl" | "restoreFootprint";
3
3
  operations: number;
4
4
  sender: string;
5
+ receiver: string | null;
5
6
  estimatedFee: number;
6
7
  } | null;
7
8
  export default getTransactionDetails;
@@ -0,0 +1,2 @@
1
+ import { WalletInterface } from '../../types';
2
+ export declare const HanaConfig: WalletInterface;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bluxcc/react",
3
3
  "author": "Blux team",
4
- "version": "0.1.11",
4
+ "version": "0.1.13",
5
5
  "homepage": "https://blux.cc",
6
6
  "description": "Connecting to the Stellar Ecosystem and Beyond",
7
7
  "repository": {
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- interface SummaryProps {
3
- operationsCount: number;
4
- sender: string;
5
- estimatedFee: string;
6
- action: string;
7
- }
8
- declare const Summary: ({ operationsCount, sender, estimatedFee, action, }: SummaryProps) => React.JSX.Element;
9
- export default Summary;