(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('._wallet-connect-button_lthz6_1{padding:var(--talisman-connect-button-gutter, 0);color:var(--talisman-connect-button-foreground, inherit);background:var(--talisman-connect-button-background, none);border-radius:var(--talisman-connect-border-radius, 0)}._modal-overrides_1jr96_1{--modal-background: var(--talisman-connect-modal-background, #fafafa);--modal-foreground: var(--talisman-connect-modal-foreground, #222);--modal-control-background: var( --talisman-connect-control-background, #f2f2f2 );--modal-active-background: var(--talisman-connect-active-background, #d2d2d2);--modal-border-radius: var(--talisman-connect-border-radius, 1rem);--modal-gutter: var(--talisman-connect-modal-gutter, 2rem);--modal-width: var(--talisman-connect-modal-min-width, 90%);--modal-max-width: var(--talisman-connect-modal-max-width, 470px);--modal-min-height: var(--talisman-connect-modal-min-height, auto);--modal-max-height: var(--talisman-connect-modal-max-height, 80vh);--modal-font-family: var(--talisman-connect-font-family, sans-serif);--modal-header-font-size: var( --talisman-connect-modal-header-font-size, 1.5rem );--modal-z-index: var(--talisman-connect-modal-z-index, 999)}._modal-overrides_1jr96_1>*+*{margin-top:2rem}._flex_1jr96_28{display:flex;align-items:center;gap:1rem}button._row-button_1jr96_34,button._row-button-unavailable_1jr96_35{display:flex;justify-content:space-between;align-items:center;padding:calc(var(--modal-gutter) * .5);border-radius:calc(var(--modal-border-radius) * .75);border:none;outline:none;font:inherit;color:inherit;background:var(--modal-control-background);cursor:pointer;width:100%;margin-bottom:.5rem}button._row-button-unavailable_1jr96_35{opacity:30%}button._row-button_1jr96_34:hover{background:var(--modal-active-background)}a._row-button_1jr96_34{text-decoration:none;color:inherit}._message_1jr96_64{text-align:center;opacity:.7}._message_1jr96_64:first-letter{text-transform:capitalize}._no-extension-message_1jr96_73{padding:1rem 2rem 2rem;text-align:center;opacity:.7}._lds-dual-ring_8bn90_1{display:inline-block;width:auto;height:100%}._lds-dual-ring_8bn90_1:after{content:" ";opacity:.8;display:block;width:64px;height:64px;margin:8px;border-radius:50%;border:6px solid currentColor;border-color:currentColor transparent currentColor transparent;animation:_lds-dual-ring_8bn90_1 1.2s linear infinite}@keyframes _lds-dual-ring_8bn90_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}')),document.head.appendChild(a)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})(); "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react"),Ot=require("react-dom");function Ct(n){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const s in n)if(s!=="default"){const u=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(a,s,u.get?u:{enumerable:!0,get:()=>n[s]})}}return a.default=n,Object.freeze(a)}const H=Ct(k);var yt={exports:{}},Ye={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var xt;function Tt(){if(xt)return Ye;xt=1;var n=k,a=Symbol.for("react.element"),s=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,y=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,x={key:!0,ref:!0,__self:!0,__source:!0};function _(j,h,P){var g,R={},N=null,B=null;P!==void 0&&(N=""+P),h.key!==void 0&&(N=""+h.key),h.ref!==void 0&&(B=h.ref);for(g in h)u.call(h,g)&&!x.hasOwnProperty(g)&&(R[g]=h[g]);if(j&&j.defaultProps)for(g in h=j.defaultProps,h)R[g]===void 0&&(R[g]=h[g]);return{$$typeof:a,type:j,key:N,ref:B,props:R,_owner:y.current}}return Ye.Fragment=s,Ye.jsx=_,Ye.jsxs=_,Ye}var We={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var _t;function Pt(){return _t||(_t=1,process.env.NODE_ENV!=="production"&&function(){var n=k,a=Symbol.for("react.element"),s=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),j=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),re=Symbol.iterator,be="@@iterator";function J(e){if(e===null||typeof e!="object")return null;var t=re&&e[re]||e[be];return typeof t=="function"?t:null}var A=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o=1&&v>=0&&i[m]!==E[v];)v--;for(;m>=1&&v>=0;m--,v--)if(i[m]!==E[v]){if(m!==1||v!==1)do if(m--,v--,v<0||i[m]!==E[v]){var C=` `+i[m].replace(" at new "," at ");return e.displayName&&C.includes("")&&(C=C.replace("",e.displayName)),typeof e=="function"&&X.set(e,C),C}while(m>=1&&v>=0);break}}}finally{fe=!1,$.current=d,O(),Error.prepareStackTrace=c}var Y=e?e.displayName||e.name:"",I=Y?F(Y):"";return typeof e=="function"&&X.set(e,I),I}function He(e,t,r){return Re(e,!1)}function qe(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Q(e,t,r){if(e==null)return"";if(typeof e=="function")return Re(e,qe(e));if(typeof e=="string")return F(e);switch(e){case P:return F("Suspense");case g:return F("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case h:return He(e.render);case R:return Q(e.type,t,r);case N:{var o=e,c=o._payload,d=o._init;try{return Q(d(c),t,r)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,Oe={},Ce=A.ReactDebugCurrentFrame;function ee(e){if(e){var t=e._owner,r=Q(e.type,e._source,t?t.type:null);Ce.setExtraStackFrame(r)}else Ce.setExtraStackFrame(null)}function Je(e,t,r,o,c){{var d=Function.call.bind(Z);for(var l in e)if(d(e,l)){var i=void 0;try{if(typeof e[l]!="function"){var E=Error((o||"React class")+": "+r+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}i=e[l](t,l,o,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(m){i=m}i&&!(i instanceof Error)&&(ee(c),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",r,l,typeof i),ee(null)),i instanceof Error&&!(i.message in Oe)&&(Oe[i.message]=!0,ee(c),b("Failed %s type: %s",r,i.message),ee(null))}}}var Ke=Array.isArray;function de(e){return Ke(e)}function Xe(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function Qe(e){try{return Te(e),!1}catch{return!0}}function Te(e){return""+e}function Pe(e){if(Qe(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(e)),Te(e)}var G=A.ReactCurrentOwner,et={key:!0,ref:!0,__self:!0,__source:!0},Ne,Le,pe;pe={};function tt(e){if(Z.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function rt(e){if(Z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function nt(e,t){if(typeof e.ref=="string"&&G.current&&t&&G.current.stateNode!==t){var r=T(G.current.type);pe[r]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(G.current.type),e.ref),pe[r]=!0)}}function ot(e,t){{var r=function(){Ne||(Ne=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function at(e,t){{var r=function(){Le||(Le=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var st=function(e,t,r,o,c,d,l){var i={$$typeof:a,type:e,key:t,ref:r,props:l,_owner:d};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:c}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function it(e,t,r,o,c){{var d,l={},i=null,E=null;r!==void 0&&(Pe(r),i=""+r),rt(t)&&(Pe(t.key),i=""+t.key),tt(t)&&(E=t.ref,nt(t,c));for(d in t)Z.call(t,d)&&!et.hasOwnProperty(d)&&(l[d]=t[d]);if(e&&e.defaultProps){var m=e.defaultProps;for(d in m)l[d]===void 0&&(l[d]=m[d])}if(i||E){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&ot(l,v),E&&at(l,v)}return st(e,i,E,c,o,G.current,l)}}var me=A.ReactCurrentOwner,Ae=A.ReactDebugCurrentFrame;function U(e){if(e){var t=e._owner,r=Q(e.type,e._source,t?t.type:null);Ae.setExtraStackFrame(r)}else Ae.setExtraStackFrame(null)}var ve;ve=!1;function he(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function $e(){{if(me.current){var e=T(me.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function lt(e){return""}var De={};function ct(e){{var t=$e();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=` Check the top-level render call using <`+r+">.")}return t}}function Fe(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=ct(t);if(De[r])return;De[r]=!0;var o="";e&&e._owner&&e._owner!==me.current&&(o=" It was passed a child from "+T(e._owner.type)+"."),U(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,o),U(null)}}function Ie(e,t){{if(typeof e!="object")return;if(de(e))for(var r=0;r",i=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,i)}var v=it(e,t,r,c,d);if(v==null)return v;if(l){var C=t.children;if(C!==void 0)if(o)if(de(C)){for(var Y=0;Y0?"{key: someKey, "+S.join(": ..., ")+": ...}":"{key: someKey}";if(!Me[I+ge]){var ht=S.length>0?"{"+S.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`,ge,I,ht,I),Me[I+ge]=!0}}return e===u?ft(v):ut(v),v}}function dt(e,t,r){return Ue(e,t,r,!0)}function pt(e,t,r){return Ue(e,t,r,!1)}var mt=pt,vt=dt;We.Fragment=u,We.jsx=mt,We.jsxs=vt}()),We}process.env.NODE_ENV==="production"?yt.exports=Tt():yt.exports=Pt();var p=yt.exports,Nt=Object.defineProperty,Lt=(n,a,s)=>a in n?Nt(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s,f=(n,a,s)=>Lt(n,typeof a!="symbol"?a+"":a,s);class Ze extends Error{constructor(a,s){super(a),f(this,"name","WalletError"),f(this,"wallet"),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Ze),this.wallet=s}}class At extends Ze{constructor(){super(...arguments),f(this,"name","AuthError")}}class Ve extends Ze{constructor(){super(...arguments),f(this,"name","NotInstalledError")}}class te{constructor(){f(this,"extensionName",""),f(this,"title",""),f(this,"installUrl",""),f(this,"logo",{src:"",alt:""}),f(this,"_extension"),f(this,"_signer"),f(this,"transformError",a=>a.message.includes("pending authorization request")?new At(a.message,this):a),f(this,"enable",async a=>{var s;if(!a)throw new Error("MissingParamsError: Dapp name is required.");if(!this.installed)throw new Ve(`Refresh the browser if ${this.title} is already installed.`,this);try{const u=this.rawExtension,y=await((s=u==null?void 0:u.enable)==null?void 0:s.call(u,a));if(!y)throw new Ve(`${this.title} is installed but is not returned by the 'Wallet.enable(dappname)' function`,this);const x={...y,name:this.extensionName,version:u.version??"?"};this._extension=x,this._signer=x==null?void 0:x.signer}catch(u){throw this.transformError(u)}}),f(this,"getAccounts",async a=>{if(!this._extension)throw new Ve("The 'Wallet.enable(dappname)' function should be called first.",this);return(await this._extension.accounts.get(a)).map(s=>{var u,y;return{...s,source:(u=this._extension)==null?void 0:u.name,wallet:this,signer:(y=this._extension)==null?void 0:y.signer}})}),f(this,"subscribeAccounts",async a=>{if(!this._extension)throw new Ve("The 'Wallet.enable(dappname)' function should be called first.",this);return this._extension.accounts.subscribe(s=>{const u=s.map(y=>{var x,_;return{...y,source:(x=this._extension)==null?void 0:x.name,wallet:this,signer:(_=this._extension)==null?void 0:_.signer}});a(u)})})}get extension(){return this._extension}get signer(){return this._signer}get installed(){var a;const s=window;return!!((a=s==null?void 0:s.injectedWeb3)!=null&&a[this.extensionName])}get rawExtension(){var a;const s=window;return(a=s==null?void 0:s.injectedWeb3)==null?void 0:a[this.extensionName]}}const $t="data:image/svg+xml,%3csvg%20viewBox='0%200%2080%2080'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M80%2040C80%2017.909%2062.091%200%2040%200S0%2017.909%200%2040s17.909%2040%2040%2040%2040-17.909%2040-40Z'/%3e%3cpath%20fill='%2314202a'%20fill-rule='evenodd'%20d='M65.7%2033.5H53.9l-9.3-21.2c-.1-.3-.4-.5-.7-.5H36c-.3%200-.6.2-.7.5L26%2033.5H14.3c-.4%200-.8.3-.8.8v5.5c0%20.4.3.8.8.8H23l-9%2020.6c-.1.2-.1.5.1.7.1.2.4.3.6.3h6.8c.3%200%20.6-.2.7-.5L40%2019.4l17.8%2042.3c.1.3.4.5.7.5h6.8c.3%200%20.5-.1.6-.3.1-.2.2-.5.1-.7l-9-20.6h8.7c.4%200%20.8-.3.8-.8v-5.5c-.1-.5-.4-.8-.8-.8Z'/%3e%3c/svg%3e";class Dt extends te{constructor(){super(...arguments),f(this,"extensionName","aleph-zero"),f(this,"title","Aleph Zero Signer"),f(this,"installUrl","https://alephzero.org/signer"),f(this,"noExtensionMessage","You can use any Polkadot compatible wallet but we recommend using Talisman"),f(this,"logo",{src:$t,alt:"Aleph Zero Logo"})}}const Ft="data:image/svg+xml,%3csvg%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20120%20120'%3e%3cdefs%3e%3cradialGradient%20id='a'%20cx='-164.98'%20cy='566.58'%20r='1'%20gradientTransform='matrix(-15%20136.5%20135.36%2014.88%20-79032.62%2014076.16)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23704bff'/%3e%3cstop%20offset='.21'%20stop-color='%23c549ff'/%3e%3c/radialGradient%3e%3c/defs%3e%3cpath%20d='M0%2023.09A23.09%2023.09%200%200%201%2023.09%200H120v17.72a16.6%2016.6%200%200%201-16.6%2016.6H57.84a23.09%2023.09%200%200%200-23.09%2023.09v5.87a23.1%2023.1%200%200%200%2023.09%2023.1h45.56A16.6%2016.6%200%200%201%20120%20103v17H23.09A23.09%2023.09%200%200%201%200%2096.91ZM58.84%2044h46.73A14.43%2014.43%200%200%201%20120%2058.4v3.89a14.43%2014.43%200%200%201-14.43%2014.43H58.84A14.44%2014.44%200%200%201%2044.4%2062.29V58.4A14.44%2014.44%200%200%201%2058.84%2044Z'%20style='fill-rule:evenodd;fill:url(%23a)'/%3e%3c/svg%3e";class It extends te{constructor(){super(...arguments),f(this,"extensionName","enkrypt"),f(this,"title","Enkrypt"),f(this,"installUrl","https://www.enkrypt.com/#overview"),f(this,"noExtensionMessage","You can use any Polkadot compatible wallet but we recommend using Talisman"),f(this,"logo",{src:Ft,alt:"Enkrypt Logo"})}}const Mt="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m31.631%2011.315-12.371%201.61a.325.325%200%200%200-.187.09l-1.018%201.003a.327.327%200%200%201-.459%200l-.178-.176a.32.32%200%200%201%200-.456l1.215-1.197a.32.32%200%200%200%200-.456L16.23%209.366a.327.327%200%200%200-.458%200l-2.405%202.367a.32.32%200%200%200%200%20.456l1.216%201.197a.32.32%200%200%201%200%20.456l-.179.176a.327.327%200%200%201-.458%200l-1.018-1.002a.327.327%200%200%200-.187-.091L.368%2011.315c-.308-.04-.492.33-.271.548l2.698%202.655c.206.202.06.55-.23.55a.321.321%200%200%200-.228.55l2.529%202.489c.041.04.093.07.15.084l8.608%202.136c.07.017.132.057.177.113l1.331%201.675c.238.325.639.7.639.7a.327.327%200%200%200%20.458%200s.332-.332.639-.7L18.2%2020.44a.325.325%200%200%201%20.176-.113l8.608-2.136a.326.326%200%200%200%20.15-.084l2.53-2.489a.321.321%200%200%200-.23-.55.321.321%200%200%201-.229-.55l2.698-2.655c.22-.217.037-.588-.271-.548Z'%20fill='%23ED145B'/%3e%3c/svg%3e";class Ut extends te{constructor(){super(...arguments),f(this,"extensionName","fearless-wallet"),f(this,"title","Fearless Wallet"),f(this,"installUrl","https://chrome.google.com/webstore/detail/fearless-wallet/nhlnehondigmgckngjomcpcefcdplmgc"),f(this,"noExtensionMessage","You can use any Polkadot compatible wallet but we recommend using Talisman"),f(this,"logo",{src:Mt,alt:"Fearless Wallet Logo"})}}const Yt="data:image/svg+xml,%3csvg%20viewBox='0%200%2064%2064'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='%231f2326'%20fill-rule='evenodd'%20d='M64%2032C64%2014.327%2049.673%200%2032%200%2014.327%200%200%2014.327%200%2032c0%2017.673%2014.327%2032%2032%2032%2017.673%200%2032-14.327%2032-32Z'/%3e%3clinearGradient%20id='a'%20x1='0'%20y1='64'%20x2='64'%20y2='64'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2329ccb9'/%3e%3cstop%20offset='.495'%20stop-color='%230091ff'/%3e%3cstop%20offset='1'%20stop-color='%23ff66b7'/%3e%3c/linearGradient%3e%3cpath%20fill='url(%23a)'%20fill-rule='evenodd'%20d='M14.878%2054.95C7.891%2049.73%203.368%2041.393%203.368%2032%203.368%2016.187%2016.187%203.368%2032%203.368c13.051%200%2027.302%207.8%2030.749%2019.744C58.897%209.764%2046.591%200%2032%200%2014.327%200%200%2014.327%200%2032c0%2017.673%2014.327%2032%2032%2032%2017.673%200%2032-14.327%2032-32v-1.684h-1.758l-.234-.003a57.376%2057.376%200%200%201-3.863-.202c-2.401-.208-5.14-.616-7.004-1.36-3-1.2-4.695-2.788-6.63-4.646l-.112-.108c-1.939-1.862-4.117-3.955-7.893-5.732-3.719-1.75-7.831-1.469-10.854-.847a27.51%2027.51%200%200%200-3.781%201.07c-.372.134-.74.277-1.105.43-1.52.64-2.997%201.398-4.489%202.1%200%200%202.928.804%204.377%201.252.052.017.134.043.24.079a16.952%2016.952%200%200%201%203.668%201.752c1.563%201.004%202.858%202.268%203.39%203.819-3.317.436-6.428%201.892-8.754%203.26a35.814%2035.814%200%200%200-4.369%203.038c-.189.156-3.183%202.795-3.183%202.795s3.863.411%205.77.795c1.267.256%202.977.667%204.76%201.29%201.792.624%203.602%201.443%205.104%202.492%201.505%201.05%202.607%202.265%203.151%203.655%201.584%204.049.03%207.993-3.091%2010.211-3.085%202.192-7.774%202.714-12.462-.506Zm10.918%205.007a12.918%2012.918%200%200%200%203.495-1.755c4.247-3.02%206.482-8.549%204.277-14.184-.867-2.214-2.522-3.907-4.36-5.19-1.842-1.286-3.961-2.227-5.922-2.911-1.19-.413-2.4-.767-3.626-1.061.41-.267.825-.525%201.246-.773%202.592-1.525%205.857-2.925%208.988-2.925%204.719%200%208.234%201.448%2011.589%203.002.305.14.611.285.919.429%202.999%201.407%206.148%202.884%209.807%202.884%203.549%200%206.313-1.003%208.218-2.04C58.73%2049.627%2046.65%2060.632%2031.999%2060.632c-2.13%200-4.206-.233-6.204-.674Zm30.992-26.594c-1.261.43-2.79.742-4.578.742-2.87%200-5.337-1.15-8.468-2.61-.275-.129-.556-.26-.843-.392-3.135-1.452-6.762-2.99-11.483-3.27-.633-3.126-3.002-5.262-5.032-6.566-.222-.143-.447-.28-.675-.413.203-.048.41-.094.623-.137%202.727-.562%205.983-.702%208.74.596%203.273%201.54%205.12%203.313%207.04%205.158l.066.063c1.976%201.898%204.066%203.887%207.713%205.344%202.026.809%204.649%201.244%206.897%201.485Z'/%3e%3c/svg%3e";class Wt extends te{constructor(){super(...arguments),f(this,"extensionName","manta-wallet-js"),f(this,"title","Manta Wallet"),f(this,"installUrl","https://chrome.google.com/webstore/detail/manta-wallet/enabgbdfcbaehmbigakijjabdpdnimlg"),f(this,"noExtensionMessage","You can use any Polkadot compatible wallet but we recommend using Talisman"),f(this,"logo",{src:Yt,alt:"Manta Logo"})}}const Bt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20324%20324'%20style='enable-background:new%200%200%20324%20324'%20xml:space='preserve'%3e%3cradialGradient%20id='a'%20cx='8.15'%20cy='19.93'%20r='372.636'%20gradientTransform='matrix(1%200%200%20-1%200%20326)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='.053'%20style='stop-color:%23d7d3e9'/%3e%3cstop%20offset='.193'%20style='stop-color:%23a19cde'/%3e%3cstop%20offset='.383'%20style='stop-color:%23696bd9'/%3e%3cstop%20offset='.54'%20style='stop-color:%233a5ae7'/%3e%3cstop%20offset='.773'%20style='stop-color:%23225fe7'/%3e%3cstop%20offset='1'%20style='stop-color:%230883d1'/%3e%3c/radialGradient%3e%3cpath%20d='M84.1%200h155.8C286.3%200%20324%2037.7%20324%2084.1v155.8c0%2046.5-37.7%2084.1-84.1%2084.1H84.1C37.7%20324%200%20286.3%200%20239.9V84.1C0%2037.7%2037.7%200%2084.1%200z'%20style='fill:url(%23a)'/%3e%3cpath%20d='M275%20166.7v3c-18.4%202.9-58%209.8-77.5%2017.2-7%202.7-12.5%208.1-15.2%2015.1-7.4%2019.4-14.4%2059.2-17.3%2077.7h-6c-2.9-18.5-9.9-58.4-17.3-77.7-2.7-6.9-8.2-12.4-15.2-15.1-19.5-7.5-59-14.3-77.5-17.2v-6c18.4-2.9%2058-9.8%2077.5-17.2%207-2.7%2012.5-8.1%2015.2-15.1%207.5-19.4%2014.4-59.2%2017.3-77.7h6c2.9%2018.5%209.9%2058.3%2017.3%2077.7%202.7%206.9%208.2%2012.4%2015.2%2015.1%2019.5%207.4%2059.1%2014.3%2077.5%2017.2v3z'%20style='fill:%23fff'/%3e%3c/svg%3e";class Vt extends te{constructor(){super(...arguments),f(this,"extensionName","polkadot-js"),f(this,"title","Nova Wallet"),f(this,"noExtensionMessage","You can use any Polkadot js compatible option but we recommend using Nova Wallet"),f(this,"installUrl","https://novawallet.io"),f(this,"logo",{src:Bt,alt:"Nova Wallet Logo"})}}const zt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='15%2015%20140%20140'%20style='enable-background:new%200%200%20170%20170;zoom:1'%20xml:space='preserve'%3e%3ccircle%20cx='85'%20cy='85'%20r='70'%20style='fill:%23ff8c00'/%3e%3cpath%20d='M85%2034.7c-20.8%200-37.8%2016.9-37.8%2037.8%200%204.2.7%208.3%202%2012.3.9%202.7%203.9%204.2%206.7%203.3%202.7-.9%204.2-3.9%203.3-6.7-1.1-3.1-1.6-6.4-1.5-9.7.4-14.1%2011.8-25.7%2025.9-26.4%2015.7-.8%2028.7%2011.7%2028.7%2027.2%200%2014.5-11.4%2026.4-25.7%2027.2%200%200-5.3.3-7.9.7-1.3.2-2.3.4-3%20.5-.3.1-.6-.2-.5-.5l.9-4.4L81%2073.4c.6-2.8-1.2-5.6-4-6.2-2.8-.6-5.6%201.2-6.2%204%200%200-11.8%2055-11.9%2055.6-.6%202.8%201.2%205.6%204%206.2%202.8.6%205.6-1.2%206.2-4%20.1-.6%201.7-7.9%201.7-7.9%201.2-5.6%205.8-9.7%2011.2-10.4%201.2-.2%205.9-.5%205.9-.5%2019.5-1.5%2034.9-17.8%2034.9-37.7%200-20.9-17-37.8-37.8-37.8zm2.7%2087c-3.4-.7-6.8%201.4-7.5%204.9-.7%203.4%201.4%206.8%204.9%207.5%203.4.7%206.8-1.4%207.5-4.9.7-3.5-1.4-6.8-4.9-7.5z'%20style='fill:%23fff'/%3e%3c/svg%3e";let Zt=class extends te{constructor(){super(...arguments),f(this,"extensionName","polkadot-js"),f(this,"title","Polkadot.js"),f(this,"noExtensionMessage","You can use any Polkadot compatible wallet but we recommend using Talisman"),f(this,"installUrl","https://polkadot.js.org/extension/"),f(this,"logo",{src:zt,alt:"Polkadotjs Logo"})}};const Gt="data:image/svg+xml,%3csvg%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%3e%3ccircle%20cx='64'%20cy='64'%20r='64'/%3e%3cpath%20d='M106.34%2028.67a27.44%2027.44%200%200%200-8.2-4.78%2046%2046%200%200%200-15.61-2.82%2076%2076%200%200%200-22.48%203.1%2055%2055%200%200%200-9.8%203.5l-.16.07a62.5%2062.5%200%200%201%2013.47-1.24A39.59%2039.59%200%200%201%2077%2028.93a23.67%2023.67%200%200%201%207.07%204.12%2017.05%2017.05%200%200%201%206.17%2013.43A26.43%2026.43%200%200%201%2086.83%2059a51.08%2051.08%200%200%201-11.76%2014.42%2078.89%2078.89%200%200%201-22.91%2014%2073.11%2073.11%200%200%201-24.53%205.48%2044.63%2044.63%200%200%201-13.14-1.25%2029.41%2029.41%200%200%200%208.82%204.4%2050.59%2050.59%200%200%200%2017.51%202.1%2084.75%2084.75%200%200%200%2028.47-6.4%2091.72%2091.72%200%200%200%2026.59-16.21%2059.26%2059.26%200%200%200%2013.66-16.76%2030.81%2030.81%200%200%200%204-14.52%2019.79%2019.79%200%200%200-7.2-15.59Z'%20style='fill:%23e30b7b'/%3e%3cpath%20d='M65.56%2080.54c1-.66%202-1.34%203-2-1.69-.4-3.44-.86-5-1.33-4.76-1.47-3.17-7.82-2-9.38a68.72%2068.72%200%200%200%207.14-13.4c1.49-4.1.19-9.22-.49-11.36-.12-.33-.24-.67-.34-1l-1.84-5.56a19.56%2019.56%200%200%200-2.53-4.67%207.58%207.58%200%200%200-6-3.14%2016.22%2016.22%200%200%200-3.74.33c-2%20.32-4%20.68-6%201a1%201%200%200%201-.21%200c.48.61.9%201.14%201.3%201.67.59.8%201.17%201.62%201.77%202.42A8.63%208.63%200%200%201%2052.34%2039a17.49%2017.49%200%200%201-.24%203.32%2070.31%2070.31%200%200%200-5.45%208.89L31.74%2080.62a1.34%201.34%200%200%200-.07.18l.06.06%205-3%20.06.07q-8.03%2012.87-16.08%2025.74h.05L23%20102.4c-.63%201.54-1.22%203-1.84%204.54A9.49%209.49%200%200%200%2024%20105.4a7.82%207.82%200%200%200%202.1-2.49l.42.71.29-.35c3.73-4.73%207.59-9.36%2011.63-13.84a107.25%20107.25%200%200%201%209.77-9.77A23.36%2023.36%200%200%201%2053%2076.35a5.4%205.4%200%200%201%202-.59l-2.59%202.79c1.88-1%202.15-.31%204-1.27l.21.22c1.62%201.92%205.27%202.6%207.77%202.82a7.53%207.53%200%200%201%201.17.22Z'%20style='fill:%23fff'/%3e%3c/svg%3e";class Ht extends te{constructor(){super(...arguments),f(this,"extensionName","polkagate"),f(this,"title","PolkaGate"),f(this,"noExtensionMessage","You can use any Polkadot compatible wallet but we recommend using Talisman"),f(this,"installUrl","https://chrome.google.com/webstore/detail/polkagate-the-gateway-to/ginchbkmljhldofnbjabmeophlhdldgp"),f(this,"logo",{src:Gt,alt:"PolkaGate Logo"})}}const qt="data:image/svg+xml,%3csvg%20width='66'%20height='100'%20viewBox='0%200%2066%20100'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M66%2036.1V22.2L11%200%200%205.6v43.1l41.8%2016.7-22.2%209.5v-7.3L9.4%2063.4%200%2067.8v26.4l11%205.6%2055-25V57L16.8%2037.1V24.9l39.6%2015.9%209.6-4.7Z'%20fill='url(%23a)'/%3e%3cdefs%3e%3clinearGradient%20id='a'%20x1='0'%20y1='0'%20x2='90.967'%20y2='59.017'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='.21'%20stop-color='%2361FEC0'/%3e%3cstop%20offset='.92'%20stop-color='%230425FE'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";class Jt extends te{constructor(){super(...arguments),f(this,"extensionName","subwallet-js"),f(this,"title","SubWallet"),f(this,"installUrl","https://chrome.google.com/webstore/detail/subwallet/onhogfjeacnfoofkfgppdlbmlmnplgbn?hl=en&authuser=0"),f(this,"noExtensionMessage","You can use any Polkadot compatible wallet but we recommend using Talisman"),f(this,"logo",{src:qt,alt:"Subwallet Logo"})}}const Kt="data:image/svg+xml,%3csvg%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='%23d5ff5c'%20fill-rule='evenodd'%20d='M0%2070.25c0%2021.255%200%2031.883%204.463%2039.852a35%2035%200%200%200%2013.435%2013.435C25.867%20128%2036.495%20128%2057.75%20128h12.5c21.255%200%2031.883%200%2039.852-4.463a35%2035%200%200%200%2013.435-13.435C128%20102.133%20128%2091.505%20128%2070.25v-12.5c0-21.255%200-31.883-4.463-39.852a35%2035%200%200%200-13.435-13.435C102.133%200%2091.505%200%2070.25%200h-12.5C36.495%200%2025.867%200%2017.898%204.463A35%2035%200%200%200%204.463%2017.898C0%2025.867%200%2036.495%200%2057.75Z'/%3e%3cpath%20fill='%23fd4848'%20fill-rule='evenodd'%20d='m33.879%2035.117-.5%2019.165c8.107%204.168%2015.75%204.075%2024.74%202.063%203.56-1.397%206.056-1.702%209.511%200%209.067%202.816%2016.969%201.95%2025.185-2.243l-.485-19.187c0-10.805-7.004-14.962-14.632-12.739-.779.232-1.944%201.274-1.944%202.207l-.181%2018.733a1.77%201.77%200%201%201-3.538-.015V20.067a8.838%208.838%200%200%200-17.675%200V43.1a1.77%201.77%200%201%201-3.538.015l-.176-18.743c0-.923-1.109-1.96-1.882-2.192-8.8-2.61-14.88%202.538-14.88%2012.936Zm2.475%2023.843a48.43%2048.43%200%200%201-5.209-2.254c-4.73-2.269-12.095-1.562-17.072%204.111-2.274%202.6-.515%206.36%202.77%207.448%201.583.526%203.017%201.413%204.353%202.408l.464.336c4.132%202.965%206.793%207.406%207.056%2012.486l.253%204.812a31.616%2031.616%200%200%200%2019.428%2025.959%2038.59%2038.59%200%200%200%2029.327%200%2031.616%2031.616%200%200%200%2019.429-25.959c.046-.825.061-1.65.051-2.465l.124-2.347c.263-5.08%202.924-9.52%207.056-12.486l.464-.336c1.34-.995%202.77-1.882%204.353-2.408%203.285-1.089%205.05-4.849%202.77-7.448-4.978-5.673-12.343-6.375-17.072-4.11-1.718.825-3.435%201.65-5.21%202.253l-3.62%201.238-.01.041c-6.654%201.842-12.12%201.847-18.398-.742-3.177-1.31-6.38-1.558-9.48%200-5.967%201.856-12.048%202.64-18.206.701l-3.626-1.238Zm26.665%2044.732c13.39%200%2024.241-15.596%2024.241-15.596S76.41%2072.499%2063.02%2072.499c-13.385%200-24.236%2015.597-24.236%2015.597s10.851%2015.596%2024.24%2015.596Zm10.883-15.596c0%206.01-4.872%2010.882-10.883%2010.882-6.01%200-10.882-4.872-10.882-10.882s4.872-10.883%2010.882-10.883%2010.883%204.872%2010.883%2010.883Zm-10.883%204.936a4.936%204.936%200%201%200%200-9.872%204.936%204.936%200%200%200%200%209.872Z'/%3e%3c/svg%3e";class kt extends te{constructor(){super(...arguments),f(this,"extensionName","talisman"),f(this,"title","Talisman"),f(this,"installUrl","https://talisman.xyz/download"),f(this,"noExtensionMessage","You can use any Polkadot compatible wallet but we recommend using Talisman"),f(this,"logo",{src:Kt,alt:"Talisman Logo"})}}const St=[new kt,new Vt,new Jt,new Wt,new Ht,new Ut,new It,new Zt,new Dt];function Rt(){return St}function Xt(n){return St.find(a=>a.extensionName===n)}const Qt={};function er({wallet:n,onClick:a,onError:s,children:u,Component:y,className:x="",dappName:_}){const[j,h]=k.useState();k.useEffect(()=>()=>void(j==null?void 0:j()),[j]);const P=async()=>{if(!n.installed)return void(s==null?void 0:s(new Ve(`${n.extensionName} not installed`,n)));if(!j)try{await n.enable(_);const g=await n.subscribeAccounts(R=>{a==null||a(R),R||s==null||s()});h(g)}catch(g){console.log(">>> err:WalletSelectButton",g),s==null||s(g)}};return k.cloneElement(y||p.jsx("button",{}),{className:`${Qt["wallet-select-button"]} wallet-select-button ${x}`,children:u,onClick:P})}const tr={"wallet-connect-button":"_wallet-connect-button_lthz6_1"},rr=({onClick:n,children:a,Component:s,className:u=""})=>k.cloneElement(s||p.jsx("button",{}),{className:`${tr["wallet-connect-button"]} ${u}`,children:a,onClick:()=>n==null?void 0:n(Rt())});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('._lds-dual-ring_8bn90_1{display:inline-block;width:auto;height:100%}._lds-dual-ring_8bn90_1:after{content:" ";opacity:.8;display:block;width:64px;height:64px;margin:8px;border-radius:50%;border:6px solid currentColor;border-color:currentColor transparent currentColor transparent;animation:_lds-dual-ring_8bn90_1 1.2s linear infinite}@keyframes _lds-dual-ring_8bn90_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._modal_pf7vp_1{box-sizing:border-box;position:fixed;top:0;right:0;bottom:0;left:0;background-color:#0009;display:flex;flex-direction:column;align-items:center;justify-content:center;transition:all .3s ease-in-out;overflow:hidden;z-index:var(--modal-z-index, 999);animation:_modal-enter_pf7vp_1 .2s ease-in-out}@keyframes _modal-enter_pf7vp_1{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}._modal_pf7vp_1 svg{width:unset;height:unset}._modal-content_pf7vp_34{box-sizing:border-box;font-family:var(--modal-font-family, inherit);background:var(--modal-background);color:var(--modal-foreground, #121212);border-radius:var(--modal-border-radius);padding:var(--modal-gutter, "32px 30px");width:var(--modal-width, 90%);max-width:var(--modal-max-width, 470px);min-height:var(--modal-min-height, auto);max-height:var(--modal-max-height, 320px);display:grid;grid-template-columns:auto;grid-template-rows:max-content 1fr max-content}._modal-content-body_pf7vp_50{overflow-y:auto;max-height:100%}._modal-header_pf7vp_55{display:grid;grid-template-columns:32px 1fr 32px;justify-items:center;align-items:center;font-size:var(--modal-header-font-size, 1.5rem);text-align:center}._modal-header_pf7vp_55:after{content:"";display:block;margin-bottom:var(--modal-gutter)}._modal-content-footer_pf7vp_71:before{content:"";display:block;margin-top:var(--modal-gutter)}button._icon-button_pf7vp_78{padding:0;border:none;outline:none;font:inherit;color:inherit;background:none;cursor:pointer;display:inline-flex;align-items:center;align-self:baseline;opacity:.5}')),document.head.appendChild(n)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();var bt={exports:{}},Be={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Et;function nr(){if(Et)return Be;Et=1;var n=k,a=Symbol.for("react.element"),s=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,y=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,x={key:!0,ref:!0,__self:!0,__source:!0};function _(j,h,P){var g,R={},N=null,B=null;P!==void 0&&(N=""+P),h.key!==void 0&&(N=""+h.key),h.ref!==void 0&&(B=h.ref);for(g in h)u.call(h,g)&&!x.hasOwnProperty(g)&&(R[g]=h[g]);if(j&&j.defaultProps)for(g in h=j.defaultProps,h)R[g]===void 0&&(R[g]=h[g]);return{$$typeof:a,type:j,key:N,ref:B,props:R,_owner:y.current}}return Be.Fragment=s,Be.jsx=_,Be.jsxs=_,Be}var ze={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var jt;function or(){return jt||(jt=1,process.env.NODE_ENV!=="production"&&function(){var n=k,a=Symbol.for("react.element"),s=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),j=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),re=Symbol.iterator,be="@@iterator";function J(e){if(e===null||typeof e!="object")return null;var t=re&&e[re]||e[be];return typeof t=="function"?t:null}var A=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(e){{for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o=1&&v>=0&&i[m]!==E[v];)v--;for(;m>=1&&v>=0;m--,v--)if(i[m]!==E[v]){if(m!==1||v!==1)do if(m--,v--,v<0||i[m]!==E[v]){var C=` `+i[m].replace(" at new "," at ");return e.displayName&&C.includes("")&&(C=C.replace("",e.displayName)),typeof e=="function"&&X.set(e,C),C}while(m>=1&&v>=0);break}}}finally{fe=!1,$.current=d,O(),Error.prepareStackTrace=c}var Y=e?e.displayName||e.name:"",I=Y?F(Y):"";return typeof e=="function"&&X.set(e,I),I}function He(e,t,r){return Re(e,!1)}function qe(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function Q(e,t,r){if(e==null)return"";if(typeof e=="function")return Re(e,qe(e));if(typeof e=="string")return F(e);switch(e){case P:return F("Suspense");case g:return F("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case h:return He(e.render);case R:return Q(e.type,t,r);case N:{var o=e,c=o._payload,d=o._init;try{return Q(d(c),t,r)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,Oe={},Ce=A.ReactDebugCurrentFrame;function ee(e){if(e){var t=e._owner,r=Q(e.type,e._source,t?t.type:null);Ce.setExtraStackFrame(r)}else Ce.setExtraStackFrame(null)}function Je(e,t,r,o,c){{var d=Function.call.bind(Z);for(var l in e)if(d(e,l)){var i=void 0;try{if(typeof e[l]!="function"){var E=Error((o||"React class")+": "+r+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}i=e[l](t,l,o,r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(m){i=m}i&&!(i instanceof Error)&&(ee(c),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",o||"React class",r,l,typeof i),ee(null)),i instanceof Error&&!(i.message in Oe)&&(Oe[i.message]=!0,ee(c),b("Failed %s type: %s",r,i.message),ee(null))}}}var Ke=Array.isArray;function de(e){return Ke(e)}function Xe(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,r=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r}}function Qe(e){try{return Te(e),!1}catch{return!0}}function Te(e){return""+e}function Pe(e){if(Qe(e))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(e)),Te(e)}var G=A.ReactCurrentOwner,et={key:!0,ref:!0,__self:!0,__source:!0},Ne,Le,pe;pe={};function tt(e){if(Z.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function rt(e){if(Z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function nt(e,t){if(typeof e.ref=="string"&&G.current&&t&&G.current.stateNode!==t){var r=T(G.current.type);pe[r]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',T(G.current.type),e.ref),pe[r]=!0)}}function ot(e,t){{var r=function(){Ne||(Ne=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}}function at(e,t){{var r=function(){Le||(Le=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}}var st=function(e,t,r,o,c,d,l){var i={$$typeof:a,type:e,key:t,ref:r,props:l,_owner:d};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:c}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function it(e,t,r,o,c){{var d,l={},i=null,E=null;r!==void 0&&(Pe(r),i=""+r),rt(t)&&(Pe(t.key),i=""+t.key),tt(t)&&(E=t.ref,nt(t,c));for(d in t)Z.call(t,d)&&!et.hasOwnProperty(d)&&(l[d]=t[d]);if(e&&e.defaultProps){var m=e.defaultProps;for(d in m)l[d]===void 0&&(l[d]=m[d])}if(i||E){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&ot(l,v),E&&at(l,v)}return st(e,i,E,c,o,G.current,l)}}var me=A.ReactCurrentOwner,Ae=A.ReactDebugCurrentFrame;function U(e){if(e){var t=e._owner,r=Q(e.type,e._source,t?t.type:null);Ae.setExtraStackFrame(r)}else Ae.setExtraStackFrame(null)}var ve;ve=!1;function he(e){return typeof e=="object"&&e!==null&&e.$$typeof===a}function $e(){{if(me.current){var e=T(me.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function lt(e){return""}var De={};function ct(e){{var t=$e();if(!t){var r=typeof e=="string"?e:e.displayName||e.name;r&&(t=` Check the top-level render call using <`+r+">.")}return t}}function Fe(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var r=ct(t);if(De[r])return;De[r]=!0;var o="";e&&e._owner&&e._owner!==me.current&&(o=" It was passed a child from "+T(e._owner.type)+"."),U(e),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,o),U(null)}}function Ie(e,t){{if(typeof e!="object")return;if(de(e))for(var r=0;r",i=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,i)}var v=it(e,t,r,c,d);if(v==null)return v;if(l){var C=t.children;if(C!==void 0)if(o)if(de(C)){for(var Y=0;Y0?"{key: someKey, "+S.join(": ..., ")+": ...}":"{key: someKey}";if(!Me[I+ge]){var ht=S.length>0?"{"+S.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`,ge,I,ht,I),Me[I+ge]=!0}}return e===u?ft(v):ut(v),v}}function dt(e,t,r){return Ue(e,t,r,!0)}function pt(e,t,r){return Ue(e,t,r,!1)}var mt=pt,vt=dt;ze.Fragment=u,ze.jsx=mt,ze.jsxs=vt}()),ze}process.env.NODE_ENV==="production"?bt.exports=nr():bt.exports=or();var W=bt.exports;const ar=n=>H.createElement("svg",{width:10,height:18,viewBox:"0 0 10 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},H.createElement("path",{d:"M9 1L0.999999 9L9 17",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),sr=n=>H.createElement("svg",{width:32,height:32,viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},H.createElement("path",{d:"M30 10L10 30",stroke:"currentColor",strokeWidth:3.33333,strokeLinecap:"round",strokeLinejoin:"round"}),H.createElement("path",{d:"M10 10L30 30",stroke:"currentColor",strokeWidth:3.33333,strokeLinecap:"round",strokeLinejoin:"round"}));function ir(n,a){k.useEffect(()=>{const s=u=>{const y=n==null?void 0:n.current;!y||y.contains(u.target)||a(u)};return document.addEventListener("mousedown",s),document.addEventListener("touchstart",s),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("touchstart",s)}},[n,a])}const lr="_modal_pf7vp_1",ye={modal:lr,"modal-enter":"_modal-enter_pf7vp_1","modal-content":"_modal-content_pf7vp_34","modal-content-body":"_modal-content-body_pf7vp_50","modal-header":"_modal-header_pf7vp_55","modal-content-footer":"_modal-content-footer_pf7vp_71","icon-button":"_icon-button_pf7vp_78"};function cr(n,a){const s=document.createElement("div");s.setAttribute("id",n);const u=a?document.getElementById(a):document.body;return u&&u.appendChild(s),s}function ur({children:n,wrapperId:a="react-portal-wrapper",appId:s}){const[u,y]=k.useState(null);return k.useEffect(()=>{let x=document.getElementById(a),_=!1;return x||(_=!0,x=cr(a,s)),y(x),()=>{_&&x!=null&&x.parentNode&&x.parentNode.removeChild(x)}},[s,a]),u===null?null:Ot.createPortal(n,u)}function fr(n){const{children:a,isOpen:s,handleClose:u,handleBack:y,title:x,className:_="",footer:j,appId:h}=n,P=k.useRef(null),g=k.useRef(null);return ir(g,u),k.useEffect(()=>{const R=N=>N.key==="Escape"?u():null;return document.body.addEventListener("keydown",R),()=>{document.body.removeEventListener("keydown",R)}},[u]),s?W.jsx(ur,{wrapperId:"react-portal-modal-container",appId:h,children:W.jsx("div",{ref:P,className:`${ye.modal} ${_}`,children:W.jsxs("div",{ref:g,className:ye["modal-content"],children:[W.jsxs("header",{className:ye["modal-header"],children:[W.jsx("span",{children:y&&W.jsx("button",{onClick:y,className:ye["icon-button"],children:W.jsx(ar,{})})}),W.jsx("div",{children:x}),W.jsx("button",{onClick:u,className:ye["icon-button"],children:W.jsx(sr,{width:24,height:24})})]}),W.jsx("main",{className:ye["modal-content-body"],children:a}),j&&W.jsx("footer",{className:ye["modal-content-footer"],children:j})]})})}):null}const dr=(n,a=4,s=4)=>`${n.substring(0,a)}…${n.substring(n.length-s)}`,wt=n=>H.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},H.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),pr="_flex_1jr96_28",mr="_message_1jr96_64",q={"modal-overrides":"_modal-overrides_1jr96_1",flex:pr,"row-button":"_row-button_1jr96_34","row-button-unavailable":"_row-button-unavailable_1jr96_35",message:mr,"no-extension-message":"_no-extension-message_1jr96_73"};function vr(n){const{items:a,onClick:s}=n;return a?p.jsx(p.Fragment,{children:a==null?void 0:a.map(u=>p.jsxs("button",{className:q["row-button"],onClick:()=>s==null?void 0:s(u),children:[p.jsxs("span",{style:{textAlign:"left"},children:[p.jsx("div",{children:u.name}),p.jsx("div",{style:{fontSize:"small",opacity:.5},children:dr(u.address)})]}),p.jsx(wt,{})]},`${u.source}-${u.address}`))}):null}function hr({wallet:n}){return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:q["no-extension-message"],children:n==null?void 0:n.noExtensionMessage}),p.jsx("a",{className:q["row-button"],href:n==null?void 0:n.installUrl,target:"_blank",rel:"noreferrer noopener",children:p.jsxs("button",{className:q["row-button"],children:[p.jsxs("span",{className:q.flex,children:[p.jsx("img",{src:n==null?void 0:n.logo.src,alt:n==null?void 0:n.logo.alt,width:32,height:32}),"Install ",n==null?void 0:n.title]}),p.jsx(wt,{})]})})]})}const gr={"lds-dual-ring":"_lds-dual-ring_8bn90_1"},yr=()=>p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{width:"100%",display:"inline-flex",justifyContent:"center"},children:p.jsx("div",{className:gr["lds-dual-ring"]})}),p.jsx("div",{style:{textAlign:"center",margin:"2rem 2rem 0"},children:"If this is taking a while, please refresh the browser."})]});function br({wallet:n}){return p.jsxs("div",{className:q["no-extension-message"],children:[p.jsx("div",{children:"No accounts found."}),p.jsxs("div",{children:["Add an account in ",n==null?void 0:n.title," to get started."]})]})}function wr(n){localStorage.setItem("@talisman-connect/selected-wallet-name",n.extensionName);const a=new CustomEvent("@talisman-connect/wallet-selected",{detail:n});document.dispatchEvent(a),console.info("Event: @talisman-connect/wallet-selected",n)}const xr=n=>H.createElement("svg",{width:25,height:24,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n},H.createElement("path",{d:"M21.5 15V19C21.5 19.5304 21.2893 20.0391 20.9142 20.4142C20.5391 20.7893 20.0304 21 19.5 21H5.5C4.96957 21 4.46086 20.7893 4.08579 20.4142C3.71071 20.0391 3.5 19.5304 3.5 19V15",stroke:"#A5A5A5",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),H.createElement("path",{d:"M7.5 10L12.5 15L17.5 10",stroke:"#A5A5A5",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),H.createElement("path",{d:"M12.5 15V3",stroke:"#A5A5A5",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function _r({items:n,makeInstallable:a,onClick:s}){return n?p.jsx(p.Fragment,{children:n.map((u,y)=>p.jsx(Er,{makeInstallable:a,onClick:s,wallet:u},y))}):null}const Er=({makeInstallable:n,onClick:a,wallet:s})=>{const u=s.installed||s.extensionName=="talisman"||n,y=n||s.extensionName==="talisman"&&!s.installed,x=()=>a==null?void 0:a(s),_=()=>window.open(s.installUrl,"_blank","noopener,noreferrer"),j=s.installed?x:y?_:void 0;return p.jsxs("button",{className:u?q["row-button"]:q["row-button-unavailable"],onClick:j,children:[p.jsxs("span",{className:q.flex,children:[p.jsx("img",{src:s.logo.src,alt:s.logo.alt,width:32,height:32}),s.installed?"":"Get ",s.title]}),s.installed?p.jsx(wt,{}):y?p.jsx(xr,{}):"Not Installed"]})};function jr(n){const{onWalletConnectOpen:a,onWalletConnectClose:s,onWalletSelected:u,onUpdatedAccounts:y,onAccountSelected:x,onError:_,triggerComponent:j,showAccountsList:h,header:P,footer:g,dappName:R,walletList:N,onlyShowInstalled:B,makeInstallable:re,open:be=!1}=n,[J,A]=k.useState(),[b,je]=k.useState(),[w,ne]=k.useState(),[oe,ke]=k.useState(),[K,V]=k.useState(),[we,Se]=k.useState(),[ae,T]=k.useState(!1),L=k.useCallback(()=>{const O=Rt(),$=O.filter(F=>F.installed);return $.find(F=>F.extensionName==="talisman")||$.unshift(new kt),je((B?$:N)||O),T(!0),V(!1),a&&a(O),O},[a]),D=k.useCallback(()=>{T(!1),ne(void 0),A(void 0),V(!1),s&&s()},[s]);k.useEffect(()=>()=>{we&&Object.values(we).forEach(O=>{O==null||O()})}),k.useEffect(()=>{be&&L()},[L,be]),k.useEffect(()=>{w||A(void 0)},[w]),k.useEffect(()=>{_&&_(J||void 0)},[J,_]);const se=k.useCallback(async O=>{A(void 0),ne(O);try{V(!0),await O.enable(R);const $=await O.subscribeAccounts(M=>{V(!1),ke(M),y&&y(M)});Se({[O.extensionName]:$}),O.installed&&wr(O),!h&&O.installed&&D()}catch($){A($),V(!1),_==null||_($)}u&&u(O)},[R,_,D,y,u,h]),ie=J?`${w==null?void 0:w.title} error`:`Select ${w==null?void 0:w.title} account`,le=K?"Loading...":"Haven't got a wallet yet?",ce=w!=null&&w.installed?ie:le,ue=w?ce:P||"Connect wallet",z=oe==null?void 0:oe.filter(O=>O.source===(w==null?void 0:w.extensionName)),Ee=K===!1&&(w==null?void 0:w.installed)&&z&&(z==null?void 0:z.length)>0;return p.jsxs(p.Fragment,{children:[j&&k.cloneElement(j,{onClick:O=>{var M,F;O.stopPropagation();const $=L();(F=(M=j.props).onClick)==null||F.call(M,$)}}),p.jsxs(fr,{className:q["modal-overrides"],title:ue,footer:g,handleClose:D,handleBack:w?()=>ne(void 0):void 0,isOpen:ae,children:[!w&&p.jsx(_r,{items:b,onClick:se,makeInstallable:re}),w&&K&&p.jsx(yr,{}),w&&!(w!=null&&w.installed)&&K===!1&&p.jsx(hr,{wallet:w}),w&&(w==null?void 0:w.installed)&&h&&K===!1&&p.jsxs(p.Fragment,{children:[!Ee&&p.jsx(br,{wallet:w}),Ee&&p.jsx(vr,{items:z,onClick:O=>{x&&x(O),D()}})]}),J&&p.jsx("div",{className:q.message,children:J.message})]})]})}function kr(){const n=localStorage.getItem("@talisman-connect/selected-wallet-name"),a=Xt(n);return a==null?void 0:a.extension}exports.WalletConnectButton=rr;exports.WalletSelect=jr;exports.WalletSelectButton=er;exports.web3FromSource=kr;