@walletconnect/ethereum-provider 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -61
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +343 -61
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs.js
CHANGED
|
@@ -1,62 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var ns=require("events"),Ie=require("@walletconnect/utils"),rs=require("@walletconnect/universal-provider");const is="wc",os="ethereum_provider",ss=`${is}@${2}:${os}:`,as="https://rpc.walletconnect.com/v1/",Qe=["eth_sendTransaction","personal_sign"],ls=["eth_accounts","eth_requestAccounts","eth_call","eth_getBalance","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],Xe=["chainChanged","accountsChanged"],cs=["message","disconnect","connect"];var ds=Object.defineProperty,hs=Object.defineProperties,us=Object.getOwnPropertyDescriptors,ci=Object.getOwnPropertySymbols,ps=Object.prototype.hasOwnProperty,ms=Object.prototype.propertyIsEnumerable,di=(e,t,n)=>t in e?ds(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hi=(e,t)=>{for(var n in t||(t={}))ps.call(t,n)&&di(e,n,t[n]);if(ci)for(var n of ci(t))ms.call(t,n)&&di(e,n,t[n]);return e},ui=(e,t)=>hs(e,us(t));function Wn(e){return Number(e[0].split(":")[1])}function Fn(e){return`0x${e.toString(16)}`}function fs(e){const{chains:t,optionalChains:n,methods:i,optionalMethods:r,events:o,optionalEvents:a,rpcMap:c}=e;if(!Ie.isValidArray(t))throw new Error("Invalid chains");const h=t,p=i||Qe,f=o||Xe,v={[Wn(h)]:c[Wn(h)]},w={chains:h,methods:p,events:f,rpcMap:v},b=o?.filter(E=>!Xe.includes(E)),I=i?.filter(E=>!Qe.includes(E));if(!n&&!a&&!r&&!(b!=null&&b.length)&&!(I!=null&&I.length))return{required:w};const C=b?.length&&I?.length||!n,M={chains:[...new Set(C?h.concat(n||[]):n)],methods:[...new Set(p.concat(r||[]))],events:[...new Set(f.concat(a||[]))],rpcMap:c};return{required:w,optional:M}}class Rn{constructor(){this.events=new ns.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=ss,this.on=(t,n)=>(this.events.on(t,n),this),this.once=(t,n)=>(this.events.once(t,n),this),this.removeListener=(t,n)=>(this.events.removeListener(t,n),this),this.off=(t,n)=>(this.events.off(t,n),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const n=new Rn;return await n.initialize(t),n}async request(t){return await this.signer.request(t,this.formatChainId(this.chainId))}sendAsync(t,n){this.signer.sendAsync(t,n,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(t);const{required:n,optional:i}=fs(this.rpc);try{const r=await new Promise(async(a,c)=>{var h;this.rpc.showQrModal&&((h=this.modal)==null||h.subscribeModal(p=>{!p.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),c(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(ui(hi({namespaces:{[this.namespace]:n}},i&&{optionalNamespaces:{[this.namespace]:i}}),{pairingTopic:t?.pairingTopic})).then(p=>{a(p)}).catch(p=>{c(new Error(p.message))})});if(!r)return;this.setChainIds(this.rpc.chains);const o=Ie.getAccountsFromNamespaces(r.namespaces,[this.namespace]);this.setAccounts(o),this.events.emit("connect",{chainId:Fn(this.chainId)})}catch(r){throw this.signer.logger.error(r),r}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",t=>{const{params:n}=t,{event:i}=n;i.name==="accountsChanged"?(this.accounts=this.parseAccounts(i.data),this.events.emit("accountsChanged",this.accounts)):i.name==="chainChanged"?this.setChainId(this.formatChainId(i.data)):this.events.emit(i.name,i.data),this.events.emit("session_event",t)}),this.signer.on("chainChanged",t=>{const n=parseInt(t);this.chainId=n,this.events.emit("chainChanged",Fn(this.chainId)),this.persist()}),this.signer.on("session_update",t=>{this.events.emit("session_update",t)}),this.signer.on("session_delete",t=>{this.reset(),this.events.emit("session_delete",t),this.events.emit("disconnect",ui(hi({},Ie.getSdkError("USER_DISCONNECTED")),{data:t.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",t=>{var n,i;this.rpc.showQrModal&&((n=this.modal)==null||n.closeModal(),(i=this.modal)==null||i.openModal({uri:t})),this.events.emit("display_uri",t)})}setHttpProvider(t){this.request({method:"wallet_switchEthereumChain",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return typeof t=="string"?t.startsWith(`${this.namespace}:`):!1}formatChainId(t){return`${this.namespace}:${t}`}parseChainId(t){return Number(t.split(":")[1])}setChainIds(t){const n=t.filter(i=>this.isCompatibleChainId(i)).map(i=>this.parseChainId(i));n.length&&(this.chainId=n[0],this.events.emit("chainChanged",Fn(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const n=this.parseChainId(t);this.chainId=n,this.setHttpProvider(n)}}parseAccountId(t){const[n,i,r]=t.split(":");return{chainId:`${n}:${i}`,address:r}}setAccounts(t){this.accounts=t.filter(n=>this.parseChainId(this.parseAccountId(n).chainId)===this.chainId).map(n=>this.parseAccountId(n).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(t){var n,i;return{chains:((n=t.chains)==null?void 0:n.map(r=>this.formatChainId(r)))||[`${this.namespace}:1`],optionalChains:t.optionalChains?t.optionalChains.map(r=>this.formatChainId(r)):void 0,methods:t?.methods||Qe,events:t?.events||Xe,optionalMethods:t?.optionalMethods||[],optionalEvents:t?.optionalEvents||[],rpcMap:t?.rpcMap||this.buildRpcMap(t.chains.concat(t.optionalChains||[]),t.projectId),showQrModal:(i=t?.showQrModal)!=null?i:!0,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,n){const i={};return t.forEach(r=>{i[r]=this.getRpcUrl(r,n)}),i}async initialize(t){var n,i;if(this.rpc=this.getRpcConfig(t),this.chainId=Wn(this.rpc.chains),this.signer=await rs.UniversalProvider.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal)try{const{Web3Modal:r}=await Promise.resolve().then(function(){return js});this.modal=new r({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains,themeMode:(n=this.rpc.qrModalOptions)==null?void 0:n.themeMode,themeVariables:(i=this.rpc.qrModalOptions)==null?void 0:i.themeVariables})}catch{throw new Error("To use QR modal, please install @web3modal/standalone package")}}loadConnectOpts(t){if(!t)return;const{chains:n,optionalChains:i,rpcMap:r}=t;n&&Ie.isValidArray(n)&&(this.rpc.chains=n.map(o=>this.formatChainId(o)),n.forEach(o=>{this.rpc.rpcMap[o]=r?.[o]||this.getRpcUrl(o)})),i&&Ie.isValidArray(i)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=i?.map(o=>this.formatChainId(o)),i.forEach(o=>{this.rpc.rpcMap[o]=r?.[o]||this.getRpcUrl(o)}))}getRpcUrl(t,n){var i;return((i=this.rpc.rpcMap)==null?void 0:i[t])||`${as}?chainId=eip155:${t}&projectId=${n||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`);this.setChainIds(t?[this.formatChainId(t)]:this.session.namespaces[this.namespace].accounts),this.setAccounts(this.session.namespaces[this.namespace].accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(t){return typeof t=="string"||t instanceof String?[this.parseAccount(t)]:t.map(n=>this.parseAccount(n))}}const gs=Rn,ws=Symbol(),pi=Object.getPrototypeOf,Hn=new WeakMap,vs=e=>e&&(Hn.has(e)?Hn.get(e):pi(e)===Object.prototype||pi(e)===Array.prototype),bs=e=>vs(e)&&e[ws]||null,mi=(e,t=!0)=>{Hn.set(e,t)},Vn=e=>typeof e=="object"&&e!==null,Lt=new WeakMap,tn=new WeakSet,ys=(e=Object.is,t=(p,f)=>new Proxy(p,f),n=p=>Vn(p)&&!tn.has(p)&&(Array.isArray(p)||!(Symbol.iterator in p))&&!(p instanceof WeakMap)&&!(p instanceof WeakSet)&&!(p instanceof Error)&&!(p instanceof Number)&&!(p instanceof Date)&&!(p instanceof String)&&!(p instanceof RegExp)&&!(p instanceof ArrayBuffer),i=p=>{switch(p.status){case"fulfilled":return p.value;case"rejected":throw p.reason;default:throw p}},r=new WeakMap,o=(p,f,v=i)=>{const w=r.get(p);if(w?.[0]===f)return w[1];const b=Array.isArray(p)?[]:Object.create(Object.getPrototypeOf(p));return mi(b,!0),r.set(p,[f,b]),Reflect.ownKeys(p).forEach(I=>{const C=Reflect.get(p,I);tn.has(C)?(mi(C,!1),b[I]=C):C instanceof Promise?Object.defineProperty(b,I,{get(){return v(C)}}):Lt.has(C)?b[I]=Cs(C,v):b[I]=C}),Object.freeze(b)},a=new WeakMap,c=[1,1],h=p=>{if(!Vn(p))throw new Error("object required");const f=a.get(p);if(f)return f;let v=c[0];const w=new Set,b=(R,_=++c[0])=>{v!==_&&(v=_,w.forEach(S=>S(R,_)))};let I=c[1];const C=(R=++c[1])=>(I!==R&&!w.size&&(I=R,E.forEach(([_])=>{const S=_[1](R);S>v&&(v=S)})),v),M=R=>(_,S)=>{const q=[..._];q[1]=[R,...q[1]],b(q,S)},E=new Map,k=(R,_)=>{if(void 0!=="production"&&E.has(R))throw new Error("prop listener already exists");if(w.size){const S=_[3](M(R));E.set(R,[_,S])}else E.set(R,[_])},$=R=>{var _;const S=E.get(R);S&&(E.delete(R),(_=S[1])==null||_.call(S))},O=R=>(w.add(R),w.size===1&&E.forEach(([S,q],rt)=>{if(void 0!=="production"&&q)throw new Error("remove already exists");const Jt=S[3](M(rt));E.set(rt,[S,Jt])}),()=>{w.delete(R),w.size===0&&E.forEach(([S,q],rt)=>{q&&(q(),E.set(rt,[S]))})}),P=Array.isArray(p)?[]:Object.create(Object.getPrototypeOf(p)),G=t(P,{deleteProperty(R,_){const S=Reflect.get(R,_);$(_);const q=Reflect.deleteProperty(R,_);return q&&b(["delete",[_],S]),q},set(R,_,S,q){var rt;const Jt=Reflect.has(R,_),Ce=Reflect.get(R,_,q);if(Jt&&e(Ce,S))return!0;$(_),Vn(S)&&(S=bs(S)||S);let Qt=S;if(!((rt=Object.getOwnPropertyDescriptor(R,_))!=null&&rt.set))if(S instanceof Promise)S.then(bt=>{S.status="fulfilled",S.value=bt,b(["resolve",[_],bt])}).catch(bt=>{S.status="rejected",S.reason=bt,b(["reject",[_],bt])});else{!Lt.has(S)&&n(S)&&(Qt=xt(S));const bt=!tn.has(Qt)&&Lt.get(Qt);bt&&k(_,bt)}return Reflect.set(R,_,Qt,q),b(["set",[_],S,Ce]),!0}});a.set(p,G);const V=[P,C,o,O];return Lt.set(G,V),Reflect.ownKeys(p).forEach(R=>{const _=Object.getOwnPropertyDescriptor(p,R);_.get||_.set?Object.defineProperty(P,R,_):G[R]=p[R]}),G})=>[h,Lt,tn,e,t,n,i,r,o,a,c],[xs]=ys();function xt(e={}){return xs(e)}function Nt(e,t,n){const i=Lt.get(e);void 0!=="production"&&!i&&console.warn("Please use proxy object");let r;const o=[],a=i[3];let c=!1;const p=a(f=>{if(o.push(f),n){t(o.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,c&&t(o.splice(0))}))});return c=!0,()=>{c=!1,p()}}function Cs(e,t){const n=Lt.get(e);void 0!=="production"&&!n&&console.warn("Please use proxy object");const[i,r,o]=n;return o(i,r(),t)}var fi={},en={};en.byteLength=$s,en.toByteArray=ks,en.fromByteArray=Ms;for(var Ct=[],wt=[],Es=typeof Uint8Array<"u"?Uint8Array:Array,zn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ee=0,Is=zn.length;ee<Is;++ee)Ct[ee]=zn[ee],wt[zn.charCodeAt(ee)]=ee;wt["-".charCodeAt(0)]=62,wt["_".charCodeAt(0)]=63;function gi(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var i=n===t?0:4-n%4;return[n,i]}function $s(e){var t=gi(e),n=t[0],i=t[1];return(n+i)*3/4-i}function As(e,t,n){return(t+n)*3/4-n}function ks(e){var t,n=gi(e),i=n[0],r=n[1],o=new Es(As(e,i,r)),a=0,c=r>0?i-4:i,h;for(h=0;h<c;h+=4)t=wt[e.charCodeAt(h)]<<18|wt[e.charCodeAt(h+1)]<<12|wt[e.charCodeAt(h+2)]<<6|wt[e.charCodeAt(h+3)],o[a++]=t>>16&255,o[a++]=t>>8&255,o[a++]=t&255;return r===2&&(t=wt[e.charCodeAt(h)]<<2|wt[e.charCodeAt(h+1)]>>4,o[a++]=t&255),r===1&&(t=wt[e.charCodeAt(h)]<<10|wt[e.charCodeAt(h+1)]<<4|wt[e.charCodeAt(h+2)]>>2,o[a++]=t>>8&255,o[a++]=t&255),o}function Os(e){return Ct[e>>18&63]+Ct[e>>12&63]+Ct[e>>6&63]+Ct[e&63]}function _s(e,t,n){for(var i,r=[],o=t;o<n;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),r.push(Os(i));return r.join("")}function Ms(e){for(var t,n=e.length,i=n%3,r=[],o=16383,a=0,c=n-i;a<c;a+=o)r.push(_s(e,a,a+o>c?c:a+o));return i===1?(t=e[n-1],r.push(Ct[t>>2]+Ct[t<<4&63]+"==")):i===2&&(t=(e[n-2]<<8)+e[n-1],r.push(Ct[t>>10]+Ct[t>>4&63]+Ct[t<<2&63]+"=")),r.join("")}var Zn={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Zn.read=function(e,t,n,i,r){var o,a,c=r*8-i-1,h=(1<<c)-1,p=h>>1,f=-7,v=n?r-1:0,w=n?-1:1,b=e[t+v];for(v+=w,o=b&(1<<-f)-1,b>>=-f,f+=c;f>0;o=o*256+e[t+v],v+=w,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=i;f>0;a=a*256+e[t+v],v+=w,f-=8);if(o===0)o=1-p;else{if(o===h)return a?NaN:(b?-1:1)*(1/0);a=a+Math.pow(2,i),o=o-p}return(b?-1:1)*a*Math.pow(2,o-i)},Zn.write=function(e,t,n,i,r,o){var a,c,h,p=o*8-r-1,f=(1<<p)-1,v=f>>1,w=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=i?0:o-1,I=i?1:-1,C=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-a))<1&&(a--,h*=2),a+v>=1?t+=w/h:t+=w*Math.pow(2,1-v),t*h>=2&&(a++,h/=2),a+v>=f?(c=0,a=f):a+v>=1?(c=(t*h-1)*Math.pow(2,r),a=a+v):(c=t*Math.pow(2,v-1)*Math.pow(2,r),a=0));r>=8;e[n+b]=c&255,b+=I,c/=256,r-=8);for(a=a<<r|c,p+=r;p>0;e[n+b]=a&255,b+=I,a/=256,p-=8);e[n+b-I]|=C*128};/*!
|
|
2
|
-
* The buffer module from node.js, for the browser.
|
|
3
|
-
*
|
|
4
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/(function(e){const t=en,n=Zn,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=k,e.INSPECT_MAX_BYTES=50;const r=2147483647;e.kMaxLength=r,c.TYPED_ARRAY_SUPPORT=o(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const d=new Uint8Array(1),s={foo:function(){return 42}};return Object.setPrototypeOf(s,Uint8Array.prototype),Object.setPrototypeOf(d,s),d.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function a(d){if(d>r)throw new RangeError('The value "'+d+'" is invalid for option "size"');const s=new Uint8Array(d);return Object.setPrototypeOf(s,c.prototype),s}function c(d,s,l){if(typeof d=="number"){if(typeof s=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(d)}return h(d,s,l)}c.poolSize=8192;function h(d,s,l){if(typeof d=="string")return w(d,s);if(ArrayBuffer.isView(d))return I(d);if(d==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d);if(yt(d,ArrayBuffer)||d&&yt(d.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(yt(d,SharedArrayBuffer)||d&&yt(d.buffer,SharedArrayBuffer)))return C(d,s,l);if(typeof d=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const u=d.valueOf&&d.valueOf();if(u!=null&&u!==d)return c.from(u,s,l);const m=M(d);if(m)return m;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof d[Symbol.toPrimitive]=="function")return c.from(d[Symbol.toPrimitive]("string"),s,l);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d)}c.from=function(d,s,l){return h(d,s,l)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function p(d){if(typeof d!="number")throw new TypeError('"size" argument must be of type number');if(d<0)throw new RangeError('The value "'+d+'" is invalid for option "size"')}function f(d,s,l){return p(d),d<=0?a(d):s!==void 0?typeof l=="string"?a(d).fill(s,l):a(d).fill(s):a(d)}c.alloc=function(d,s,l){return f(d,s,l)};function v(d){return p(d),a(d<0?0:E(d)|0)}c.allocUnsafe=function(d){return v(d)},c.allocUnsafeSlow=function(d){return v(d)};function w(d,s){if((typeof s!="string"||s==="")&&(s="utf8"),!c.isEncoding(s))throw new TypeError("Unknown encoding: "+s);const l=$(d,s)|0;let u=a(l);const m=u.write(d,s);return m!==l&&(u=u.slice(0,m)),u}function b(d){const s=d.length<0?0:E(d.length)|0,l=a(s);for(let u=0;u<s;u+=1)l[u]=d[u]&255;return l}function I(d){if(yt(d,Uint8Array)){const s=new Uint8Array(d);return C(s.buffer,s.byteOffset,s.byteLength)}return b(d)}function C(d,s,l){if(s<0||d.byteLength<s)throw new RangeError('"offset" is outside of buffer bounds');if(d.byteLength<s+(l||0))throw new RangeError('"length" is outside of buffer bounds');let u;return s===void 0&&l===void 0?u=new Uint8Array(d):l===void 0?u=new Uint8Array(d,s):u=new Uint8Array(d,s,l),Object.setPrototypeOf(u,c.prototype),u}function M(d){if(c.isBuffer(d)){const s=E(d.length)|0,l=a(s);return l.length===0||d.copy(l,0,0,s),l}if(d.length!==void 0)return typeof d.length!="number"||Un(d.length)?a(0):b(d);if(d.type==="Buffer"&&Array.isArray(d.data))return b(d.data)}function E(d){if(d>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return d|0}function k(d){return+d!=d&&(d=0),c.alloc(+d)}c.isBuffer=function(s){return s!=null&&s._isBuffer===!0&&s!==c.prototype},c.compare=function(s,l){if(yt(s,Uint8Array)&&(s=c.from(s,s.offset,s.byteLength)),yt(l,Uint8Array)&&(l=c.from(l,l.offset,l.byteLength)),!c.isBuffer(s)||!c.isBuffer(l))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(s===l)return 0;let u=s.length,m=l.length;for(let g=0,x=Math.min(u,m);g<x;++g)if(s[g]!==l[g]){u=s[g],m=l[g];break}return u<m?-1:m<u?1:0},c.isEncoding=function(s){switch(String(s).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(s,l){if(!Array.isArray(s))throw new TypeError('"list" argument must be an Array of Buffers');if(s.length===0)return c.alloc(0);let u;if(l===void 0)for(l=0,u=0;u<s.length;++u)l+=s[u].length;const m=c.allocUnsafe(l);let g=0;for(u=0;u<s.length;++u){let x=s[u];if(yt(x,Uint8Array))g+x.length>m.length?(c.isBuffer(x)||(x=c.from(x)),x.copy(m,g)):Uint8Array.prototype.set.call(m,x,g);else if(c.isBuffer(x))x.copy(m,g);else throw new TypeError('"list" argument must be an Array of Buffers');g+=x.length}return m};function $(d,s){if(c.isBuffer(d))return d.length;if(ArrayBuffer.isView(d)||yt(d,ArrayBuffer))return d.byteLength;if(typeof d!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof d);const l=d.length,u=arguments.length>2&&arguments[2]===!0;if(!u&&l===0)return 0;let m=!1;for(;;)switch(s){case"ascii":case"latin1":case"binary":return l;case"utf8":case"utf-8":return Dn(d).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return li(d).length;default:if(m)return u?-1:Dn(d).length;s=(""+s).toLowerCase(),m=!0}}c.byteLength=$;function O(d,s,l){let u=!1;if((s===void 0||s<0)&&(s=0),s>this.length||((l===void 0||l>this.length)&&(l=this.length),l<=0)||(l>>>=0,s>>>=0,l<=s))return"";for(d||(d="utf8");;)switch(d){case"hex":return Go(this,s,l);case"utf8":case"utf-8":return Jt(this,s,l);case"ascii":return bt(this,s,l);case"latin1":case"binary":return Zo(this,s,l);case"base64":return rt(this,s,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ko(this,s,l);default:if(u)throw new TypeError("Unknown encoding: "+d);d=(d+"").toLowerCase(),u=!0}}c.prototype._isBuffer=!0;function P(d,s,l){const u=d[s];d[s]=d[l],d[l]=u}c.prototype.swap16=function(){const s=this.length;if(s%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let l=0;l<s;l+=2)P(this,l,l+1);return this},c.prototype.swap32=function(){const s=this.length;if(s%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let l=0;l<s;l+=4)P(this,l,l+3),P(this,l+1,l+2);return this},c.prototype.swap64=function(){const s=this.length;if(s%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let l=0;l<s;l+=8)P(this,l,l+7),P(this,l+1,l+6),P(this,l+2,l+5),P(this,l+3,l+4);return this},c.prototype.toString=function(){const s=this.length;return s===0?"":arguments.length===0?Jt(this,0,s):O.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(s){if(!c.isBuffer(s))throw new TypeError("Argument must be a Buffer");return this===s?!0:c.compare(this,s)===0},c.prototype.inspect=function(){let s="";const l=e.INSPECT_MAX_BYTES;return s=this.toString("hex",0,l).replace(/(.{2})/g,"$1 ").trim(),this.length>l&&(s+=" ... "),"<Buffer "+s+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(s,l,u,m,g){if(yt(s,Uint8Array)&&(s=c.from(s,s.offset,s.byteLength)),!c.isBuffer(s))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof s);if(l===void 0&&(l=0),u===void 0&&(u=s?s.length:0),m===void 0&&(m=0),g===void 0&&(g=this.length),l<0||u>s.length||m<0||g>this.length)throw new RangeError("out of range index");if(m>=g&&l>=u)return 0;if(m>=g)return-1;if(l>=u)return 1;if(l>>>=0,u>>>=0,m>>>=0,g>>>=0,this===s)return 0;let x=g-m,F=u-l;const tt=Math.min(x,F),Q=this.slice(m,g),et=s.slice(l,u);for(let Y=0;Y<tt;++Y)if(Q[Y]!==et[Y]){x=Q[Y],F=et[Y];break}return x<F?-1:F<x?1:0};function W(d,s,l,u,m){if(d.length===0)return-1;if(typeof l=="string"?(u=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,Un(l)&&(l=m?0:d.length-1),l<0&&(l=d.length+l),l>=d.length){if(m)return-1;l=d.length-1}else if(l<0)if(m)l=0;else return-1;if(typeof s=="string"&&(s=c.from(s,u)),c.isBuffer(s))return s.length===0?-1:G(d,s,l,u,m);if(typeof s=="number")return s=s&255,typeof Uint8Array.prototype.indexOf=="function"?m?Uint8Array.prototype.indexOf.call(d,s,l):Uint8Array.prototype.lastIndexOf.call(d,s,l):G(d,[s],l,u,m);throw new TypeError("val must be string, number or Buffer")}function G(d,s,l,u,m){let g=1,x=d.length,F=s.length;if(u!==void 0&&(u=String(u).toLowerCase(),u==="ucs2"||u==="ucs-2"||u==="utf16le"||u==="utf-16le")){if(d.length<2||s.length<2)return-1;g=2,x/=2,F/=2,l/=2}function tt(et,Y){return g===1?et[Y]:et.readUInt16BE(Y*g)}let Q;if(m){let et=-1;for(Q=l;Q<x;Q++)if(tt(d,Q)===tt(s,et===-1?0:Q-et)){if(et===-1&&(et=Q),Q-et+1===F)return et*g}else et!==-1&&(Q-=Q-et),et=-1}else for(l+F>x&&(l=x-F),Q=l;Q>=0;Q--){let et=!0;for(let Y=0;Y<F;Y++)if(tt(d,Q+Y)!==tt(s,Y)){et=!1;break}if(et)return Q}return-1}c.prototype.includes=function(s,l,u){return this.indexOf(s,l,u)!==-1},c.prototype.indexOf=function(s,l,u){return W(this,s,l,u,!0)},c.prototype.lastIndexOf=function(s,l,u){return W(this,s,l,u,!1)};function V(d,s,l,u){l=Number(l)||0;const m=d.length-l;u?(u=Number(u),u>m&&(u=m)):u=m;const g=s.length;u>g/2&&(u=g/2);let x;for(x=0;x<u;++x){const F=parseInt(s.substr(x*2,2),16);if(Un(F))return x;d[l+x]=F}return x}function R(d,s,l,u){return Je(Dn(s,d.length-l),d,l,u)}function _(d,s,l,u){return Je(Qo(s),d,l,u)}function S(d,s,l,u){return Je(li(s),d,l,u)}function q(d,s,l,u){return Je(Xo(s,d.length-l),d,l,u)}c.prototype.write=function(s,l,u,m){if(l===void 0)m="utf8",u=this.length,l=0;else if(u===void 0&&typeof l=="string")m=l,u=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(u)?(u=u>>>0,m===void 0&&(m="utf8")):(m=u,u=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const g=this.length-l;if((u===void 0||u>g)&&(u=g),s.length>0&&(u<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");m||(m="utf8");let x=!1;for(;;)switch(m){case"hex":return V(this,s,l,u);case"utf8":case"utf-8":return R(this,s,l,u);case"ascii":case"latin1":case"binary":return _(this,s,l,u);case"base64":return S(this,s,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,s,l,u);default:if(x)throw new TypeError("Unknown encoding: "+m);m=(""+m).toLowerCase(),x=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function rt(d,s,l){return s===0&&l===d.length?t.fromByteArray(d):t.fromByteArray(d.slice(s,l))}function Jt(d,s,l){l=Math.min(d.length,l);const u=[];let m=s;for(;m<l;){const g=d[m];let x=null,F=g>239?4:g>223?3:g>191?2:1;if(m+F<=l){let tt,Q,et,Y;switch(F){case 1:g<128&&(x=g);break;case 2:tt=d[m+1],(tt&192)===128&&(Y=(g&31)<<6|tt&63,Y>127&&(x=Y));break;case 3:tt=d[m+1],Q=d[m+2],(tt&192)===128&&(Q&192)===128&&(Y=(g&15)<<12|(tt&63)<<6|Q&63,Y>2047&&(Y<55296||Y>57343)&&(x=Y));break;case 4:tt=d[m+1],Q=d[m+2],et=d[m+3],(tt&192)===128&&(Q&192)===128&&(et&192)===128&&(Y=(g&15)<<18|(tt&63)<<12|(Q&63)<<6|et&63,Y>65535&&Y<1114112&&(x=Y))}}x===null?(x=65533,F=1):x>65535&&(x-=65536,u.push(x>>>10&1023|55296),x=56320|x&1023),u.push(x),m+=F}return Qt(u)}const Ce=4096;function Qt(d){const s=d.length;if(s<=Ce)return String.fromCharCode.apply(String,d);let l="",u=0;for(;u<s;)l+=String.fromCharCode.apply(String,d.slice(u,u+=Ce));return l}function bt(d,s,l){let u="";l=Math.min(d.length,l);for(let m=s;m<l;++m)u+=String.fromCharCode(d[m]&127);return u}function Zo(d,s,l){let u="";l=Math.min(d.length,l);for(let m=s;m<l;++m)u+=String.fromCharCode(d[m]);return u}function Go(d,s,l){const u=d.length;(!s||s<0)&&(s=0),(!l||l<0||l>u)&&(l=u);let m="";for(let g=s;g<l;++g)m+=ts[d[g]];return m}function Ko(d,s,l){const u=d.slice(s,l);let m="";for(let g=0;g<u.length-1;g+=2)m+=String.fromCharCode(u[g]+u[g+1]*256);return m}c.prototype.slice=function(s,l){const u=this.length;s=~~s,l=l===void 0?u:~~l,s<0?(s+=u,s<0&&(s=0)):s>u&&(s=u),l<0?(l+=u,l<0&&(l=0)):l>u&&(l=u),l<s&&(l=s);const m=this.subarray(s,l);return Object.setPrototypeOf(m,c.prototype),m};function at(d,s,l){if(d%1!==0||d<0)throw new RangeError("offset is not uint");if(d+s>l)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(s,l,u){s=s>>>0,l=l>>>0,u||at(s,l,this.length);let m=this[s],g=1,x=0;for(;++x<l&&(g*=256);)m+=this[s+x]*g;return m},c.prototype.readUintBE=c.prototype.readUIntBE=function(s,l,u){s=s>>>0,l=l>>>0,u||at(s,l,this.length);let m=this[s+--l],g=1;for(;l>0&&(g*=256);)m+=this[s+--l]*g;return m},c.prototype.readUint8=c.prototype.readUInt8=function(s,l){return s=s>>>0,l||at(s,1,this.length),this[s]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(s,l){return s=s>>>0,l||at(s,2,this.length),this[s]|this[s+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(s,l){return s=s>>>0,l||at(s,2,this.length),this[s]<<8|this[s+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(s,l){return s=s>>>0,l||at(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+this[s+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(s,l){return s=s>>>0,l||at(s,4,this.length),this[s]*16777216+(this[s+1]<<16|this[s+2]<<8|this[s+3])},c.prototype.readBigUInt64LE=kt(function(s){s=s>>>0,te(s,"offset");const l=this[s],u=this[s+7];(l===void 0||u===void 0)&&Ee(s,this.length-8);const m=l+this[++s]*2**8+this[++s]*2**16+this[++s]*2**24,g=this[++s]+this[++s]*2**8+this[++s]*2**16+u*2**24;return BigInt(m)+(BigInt(g)<<BigInt(32))}),c.prototype.readBigUInt64BE=kt(function(s){s=s>>>0,te(s,"offset");const l=this[s],u=this[s+7];(l===void 0||u===void 0)&&Ee(s,this.length-8);const m=l*2**24+this[++s]*2**16+this[++s]*2**8+this[++s],g=this[++s]*2**24+this[++s]*2**16+this[++s]*2**8+u;return(BigInt(m)<<BigInt(32))+BigInt(g)}),c.prototype.readIntLE=function(s,l,u){s=s>>>0,l=l>>>0,u||at(s,l,this.length);let m=this[s],g=1,x=0;for(;++x<l&&(g*=256);)m+=this[s+x]*g;return g*=128,m>=g&&(m-=Math.pow(2,8*l)),m},c.prototype.readIntBE=function(s,l,u){s=s>>>0,l=l>>>0,u||at(s,l,this.length);let m=l,g=1,x=this[s+--m];for(;m>0&&(g*=256);)x+=this[s+--m]*g;return g*=128,x>=g&&(x-=Math.pow(2,8*l)),x},c.prototype.readInt8=function(s,l){return s=s>>>0,l||at(s,1,this.length),this[s]&128?(255-this[s]+1)*-1:this[s]},c.prototype.readInt16LE=function(s,l){s=s>>>0,l||at(s,2,this.length);const u=this[s]|this[s+1]<<8;return u&32768?u|4294901760:u},c.prototype.readInt16BE=function(s,l){s=s>>>0,l||at(s,2,this.length);const u=this[s+1]|this[s]<<8;return u&32768?u|4294901760:u},c.prototype.readInt32LE=function(s,l){return s=s>>>0,l||at(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},c.prototype.readInt32BE=function(s,l){return s=s>>>0,l||at(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},c.prototype.readBigInt64LE=kt(function(s){s=s>>>0,te(s,"offset");const l=this[s],u=this[s+7];(l===void 0||u===void 0)&&Ee(s,this.length-8);const m=this[s+4]+this[s+5]*2**8+this[s+6]*2**16+(u<<24);return(BigInt(m)<<BigInt(32))+BigInt(l+this[++s]*2**8+this[++s]*2**16+this[++s]*2**24)}),c.prototype.readBigInt64BE=kt(function(s){s=s>>>0,te(s,"offset");const l=this[s],u=this[s+7];(l===void 0||u===void 0)&&Ee(s,this.length-8);const m=(l<<24)+this[++s]*2**16+this[++s]*2**8+this[++s];return(BigInt(m)<<BigInt(32))+BigInt(this[++s]*2**24+this[++s]*2**16+this[++s]*2**8+u)}),c.prototype.readFloatLE=function(s,l){return s=s>>>0,l||at(s,4,this.length),n.read(this,s,!0,23,4)},c.prototype.readFloatBE=function(s,l){return s=s>>>0,l||at(s,4,this.length),n.read(this,s,!1,23,4)},c.prototype.readDoubleLE=function(s,l){return s=s>>>0,l||at(s,8,this.length),n.read(this,s,!0,52,8)},c.prototype.readDoubleBE=function(s,l){return s=s>>>0,l||at(s,8,this.length),n.read(this,s,!1,52,8)};function ut(d,s,l,u,m,g){if(!c.isBuffer(d))throw new TypeError('"buffer" argument must be a Buffer instance');if(s>m||s<g)throw new RangeError('"value" argument is out of bounds');if(l+u>d.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(s,l,u,m){if(s=+s,l=l>>>0,u=u>>>0,!m){const F=Math.pow(2,8*u)-1;ut(this,s,l,u,F,0)}let g=1,x=0;for(this[l]=s&255;++x<u&&(g*=256);)this[l+x]=s/g&255;return l+u},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(s,l,u,m){if(s=+s,l=l>>>0,u=u>>>0,!m){const F=Math.pow(2,8*u)-1;ut(this,s,l,u,F,0)}let g=u-1,x=1;for(this[l+g]=s&255;--g>=0&&(x*=256);)this[l+g]=s/x&255;return l+u},c.prototype.writeUint8=c.prototype.writeUInt8=function(s,l,u){return s=+s,l=l>>>0,u||ut(this,s,l,1,255,0),this[l]=s&255,l+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(s,l,u){return s=+s,l=l>>>0,u||ut(this,s,l,2,65535,0),this[l]=s&255,this[l+1]=s>>>8,l+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(s,l,u){return s=+s,l=l>>>0,u||ut(this,s,l,2,65535,0),this[l]=s>>>8,this[l+1]=s&255,l+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(s,l,u){return s=+s,l=l>>>0,u||ut(this,s,l,4,4294967295,0),this[l+3]=s>>>24,this[l+2]=s>>>16,this[l+1]=s>>>8,this[l]=s&255,l+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(s,l,u){return s=+s,l=l>>>0,u||ut(this,s,l,4,4294967295,0),this[l]=s>>>24,this[l+1]=s>>>16,this[l+2]=s>>>8,this[l+3]=s&255,l+4};function ei(d,s,l,u,m){ai(s,u,m,d,l,7);let g=Number(s&BigInt(4294967295));d[l++]=g,g=g>>8,d[l++]=g,g=g>>8,d[l++]=g,g=g>>8,d[l++]=g;let x=Number(s>>BigInt(32)&BigInt(4294967295));return d[l++]=x,x=x>>8,d[l++]=x,x=x>>8,d[l++]=x,x=x>>8,d[l++]=x,l}function ni(d,s,l,u,m){ai(s,u,m,d,l,7);let g=Number(s&BigInt(4294967295));d[l+7]=g,g=g>>8,d[l+6]=g,g=g>>8,d[l+5]=g,g=g>>8,d[l+4]=g;let x=Number(s>>BigInt(32)&BigInt(4294967295));return d[l+3]=x,x=x>>8,d[l+2]=x,x=x>>8,d[l+1]=x,x=x>>8,d[l]=x,l+8}c.prototype.writeBigUInt64LE=kt(function(s,l=0){return ei(this,s,l,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=kt(function(s,l=0){return ni(this,s,l,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(s,l,u,m){if(s=+s,l=l>>>0,!m){const tt=Math.pow(2,8*u-1);ut(this,s,l,u,tt-1,-tt)}let g=0,x=1,F=0;for(this[l]=s&255;++g<u&&(x*=256);)s<0&&F===0&&this[l+g-1]!==0&&(F=1),this[l+g]=(s/x>>0)-F&255;return l+u},c.prototype.writeIntBE=function(s,l,u,m){if(s=+s,l=l>>>0,!m){const tt=Math.pow(2,8*u-1);ut(this,s,l,u,tt-1,-tt)}let g=u-1,x=1,F=0;for(this[l+g]=s&255;--g>=0&&(x*=256);)s<0&&F===0&&this[l+g+1]!==0&&(F=1),this[l+g]=(s/x>>0)-F&255;return l+u},c.prototype.writeInt8=function(s,l,u){return s=+s,l=l>>>0,u||ut(this,s,l,1,127,-128),s<0&&(s=255+s+1),this[l]=s&255,l+1},c.prototype.writeInt16LE=function(s,l,u){return s=+s,l=l>>>0,u||ut(this,s,l,2,32767,-32768),this[l]=s&255,this[l+1]=s>>>8,l+2},c.prototype.writeInt16BE=function(s,l,u){return s=+s,l=l>>>0,u||ut(this,s,l,2,32767,-32768),this[l]=s>>>8,this[l+1]=s&255,l+2},c.prototype.writeInt32LE=function(s,l,u){return s=+s,l=l>>>0,u||ut(this,s,l,4,2147483647,-2147483648),this[l]=s&255,this[l+1]=s>>>8,this[l+2]=s>>>16,this[l+3]=s>>>24,l+4},c.prototype.writeInt32BE=function(s,l,u){return s=+s,l=l>>>0,u||ut(this,s,l,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),this[l]=s>>>24,this[l+1]=s>>>16,this[l+2]=s>>>8,this[l+3]=s&255,l+4},c.prototype.writeBigInt64LE=kt(function(s,l=0){return ei(this,s,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=kt(function(s,l=0){return ni(this,s,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ri(d,s,l,u,m,g){if(l+u>d.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function ii(d,s,l,u,m){return s=+s,l=l>>>0,m||ri(d,s,l,4),n.write(d,s,l,u,23,4),l+4}c.prototype.writeFloatLE=function(s,l,u){return ii(this,s,l,!0,u)},c.prototype.writeFloatBE=function(s,l,u){return ii(this,s,l,!1,u)};function oi(d,s,l,u,m){return s=+s,l=l>>>0,m||ri(d,s,l,8),n.write(d,s,l,u,52,8),l+8}c.prototype.writeDoubleLE=function(s,l,u){return oi(this,s,l,!0,u)},c.prototype.writeDoubleBE=function(s,l,u){return oi(this,s,l,!1,u)},c.prototype.copy=function(s,l,u,m){if(!c.isBuffer(s))throw new TypeError("argument should be a Buffer");if(u||(u=0),!m&&m!==0&&(m=this.length),l>=s.length&&(l=s.length),l||(l=0),m>0&&m<u&&(m=u),m===u||s.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(u<0||u>=this.length)throw new RangeError("Index out of range");if(m<0)throw new RangeError("sourceEnd out of bounds");m>this.length&&(m=this.length),s.length-l<m-u&&(m=s.length-l+u);const g=m-u;return this===s&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,u,m):Uint8Array.prototype.set.call(s,this.subarray(u,m),l),g},c.prototype.fill=function(s,l,u,m){if(typeof s=="string"){if(typeof l=="string"?(m=l,l=0,u=this.length):typeof u=="string"&&(m=u,u=this.length),m!==void 0&&typeof m!="string")throw new TypeError("encoding must be a string");if(typeof m=="string"&&!c.isEncoding(m))throw new TypeError("Unknown encoding: "+m);if(s.length===1){const x=s.charCodeAt(0);(m==="utf8"&&x<128||m==="latin1")&&(s=x)}}else typeof s=="number"?s=s&255:typeof s=="boolean"&&(s=Number(s));if(l<0||this.length<l||this.length<u)throw new RangeError("Out of range index");if(u<=l)return this;l=l>>>0,u=u===void 0?this.length:u>>>0,s||(s=0);let g;if(typeof s=="number")for(g=l;g<u;++g)this[g]=s;else{const x=c.isBuffer(s)?s:c.from(s,m),F=x.length;if(F===0)throw new TypeError('The value "'+s+'" is invalid for argument "value"');for(g=0;g<u-l;++g)this[g+l]=x[g%F]}return this};const Xt={};function jn(d,s,l){Xt[d]=class extends l{constructor(){super(),Object.defineProperty(this,"message",{value:s.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${d}]`,this.stack,delete this.name}get code(){return d}set code(m){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:m,writable:!0})}toString(){return`${this.name} [${d}]: ${this.message}`}}}jn("ERR_BUFFER_OUT_OF_BOUNDS",function(d){return d?`${d} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),jn("ERR_INVALID_ARG_TYPE",function(d,s){return`The "${d}" argument must be of type number. Received type ${typeof s}`},TypeError),jn("ERR_OUT_OF_RANGE",function(d,s,l){let u=`The value of "${d}" is out of range.`,m=l;return Number.isInteger(l)&&Math.abs(l)>2**32?m=si(String(l)):typeof l=="bigint"&&(m=String(l),(l>BigInt(2)**BigInt(32)||l<-(BigInt(2)**BigInt(32)))&&(m=si(m)),m+="n"),u+=` It must be ${s}. Received ${m}`,u},RangeError);function si(d){let s="",l=d.length;const u=d[0]==="-"?1:0;for(;l>=u+4;l-=3)s=`_${d.slice(l-3,l)}${s}`;return`${d.slice(0,l)}${s}`}function qo(d,s,l){te(s,"offset"),(d[s]===void 0||d[s+l]===void 0)&&Ee(s,d.length-(l+1))}function ai(d,s,l,u,m,g){if(d>l||d<s){const x=typeof s=="bigint"?"n":"";let F;throw g>3?s===0||s===BigInt(0)?F=`>= 0${x} and < 2${x} ** ${(g+1)*8}${x}`:F=`>= -(2${x} ** ${(g+1)*8-1}${x}) and < 2 ** ${(g+1)*8-1}${x}`:F=`>= ${s}${x} and <= ${l}${x}`,new Xt.ERR_OUT_OF_RANGE("value",F,d)}qo(u,m,g)}function te(d,s){if(typeof d!="number")throw new Xt.ERR_INVALID_ARG_TYPE(s,"number",d)}function Ee(d,s,l){throw Math.floor(d)!==d?(te(d,l),new Xt.ERR_OUT_OF_RANGE(l||"offset","an integer",d)):s<0?new Xt.ERR_BUFFER_OUT_OF_BOUNDS:new Xt.ERR_OUT_OF_RANGE(l||"offset",`>= ${l?1:0} and <= ${s}`,d)}const Yo=/[^+/0-9A-Za-z-_]/g;function Jo(d){if(d=d.split("=")[0],d=d.trim().replace(Yo,""),d.length<2)return"";for(;d.length%4!==0;)d=d+"=";return d}function Dn(d,s){s=s||1/0;let l;const u=d.length;let m=null;const g=[];for(let x=0;x<u;++x){if(l=d.charCodeAt(x),l>55295&&l<57344){if(!m){if(l>56319){(s-=3)>-1&&g.push(239,191,189);continue}else if(x+1===u){(s-=3)>-1&&g.push(239,191,189);continue}m=l;continue}if(l<56320){(s-=3)>-1&&g.push(239,191,189),m=l;continue}l=(m-55296<<10|l-56320)+65536}else m&&(s-=3)>-1&&g.push(239,191,189);if(m=null,l<128){if((s-=1)<0)break;g.push(l)}else if(l<2048){if((s-=2)<0)break;g.push(l>>6|192,l&63|128)}else if(l<65536){if((s-=3)<0)break;g.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((s-=4)<0)break;g.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return g}function Qo(d){const s=[];for(let l=0;l<d.length;++l)s.push(d.charCodeAt(l)&255);return s}function Xo(d,s){let l,u,m;const g=[];for(let x=0;x<d.length&&!((s-=2)<0);++x)l=d.charCodeAt(x),u=l>>8,m=l%256,g.push(m),g.push(u);return g}function li(d){return t.toByteArray(Jo(d))}function Je(d,s,l,u){let m;for(m=0;m<u&&!(m+l>=s.length||m>=d.length);++m)s[m+l]=d[m];return m}function yt(d,s){return d instanceof s||d!=null&&d.constructor!=null&&d.constructor.name!=null&&d.constructor.name===s.name}function Un(d){return d!==d}const ts=function(){const d="0123456789abcdef",s=new Array(256);for(let l=0;l<16;++l){const u=l*16;for(let m=0;m<16;++m)s[u+m]=d[l]+d[m]}return s}();function kt(d){return typeof BigInt>"u"?es:d}function es(){throw new Error("BigInt not supported")}})(fi);const dt=xt({selectedChain:void 0,chains:void 0,standaloneChains:void 0,standaloneUri:void 0,isStandalone:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1,walletConnectVersion:1}),T={state:dt,subscribe(e){return Nt(dt,()=>e(dt))},setChains(e){dt.chains=e},setStandaloneChains(e){dt.standaloneChains=e},setStandaloneUri(e){dt.standaloneUri=e},getSelectedChain(){const e=X.client().getNetwork().chain;return e&&(dt.selectedChain=e),dt.selectedChain},setSelectedChain(e){dt.selectedChain=e},setIsStandalone(e){dt.isStandalone=e},setIsCustomDesktop(e){dt.isCustomDesktop=e},setIsCustomMobile(e){dt.isCustomMobile=e},setIsDataLoaded(e){dt.isDataLoaded=e},setIsUiLoaded(e){dt.isUiLoaded=e},setWalletConnectVersion(e){dt.walletConnectVersion=e}},$e=xt({initialized:!1,ethereumClient:void 0}),X={setEthereumClient(e){!$e.initialized&&e&&($e.ethereumClient=e,T.setChains(e.chains),$e.initialized=!0)},client(){if($e.ethereumClient)return $e.ethereumClient;throw new Error("ClientCtrl has no client set")}},nt=xt({address:void 0,profileName:void 0,profileAvatar:void 0,profileLoading:!1,balanceLoading:!1,balance:void 0,isConnected:!1}),J={state:nt,subscribe(e){return Nt(nt,()=>e(nt))},getAccount(){const e=X.client().getAccount();nt.address=e.address,nt.isConnected=e.isConnected},async fetchProfile(e,t){try{nt.profileLoading=!0;const n=t??nt.address,{id:i}=X.client().getDefaultChain();if(n&&i===1){const[r,o]=await Promise.all([X.client().fetchEnsName({address:n,chainId:1}),X.client().fetchEnsAvatar({address:n,chainId:1})]);o&&await e(o),nt.profileName=r,nt.profileAvatar=o}}finally{nt.profileLoading=!1}},async fetchBalance(e){try{nt.balanceLoading=!0;const t=e??nt.address;if(t){const n=await X.client().fetchBalance({address:t});nt.balance={amount:n.formatted,symbol:n.symbol}}}finally{nt.balanceLoading=!1}},setAddress(e){nt.address=e},setIsConnected(e){nt.isConnected=e},resetBalance(){nt.balance=void 0},resetAccount(){nt.address=void 0,nt.isConnected=!1,nt.profileName=void 0,nt.profileAvatar=void 0,nt.balance=void 0}},nn=xt({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chainImages:void 0,tokenImages:void 0,standaloneChains:void 0,enableStandaloneMode:!1,enableNetworkView:!1,enableAccountView:!0,enableExplorer:!0,defaultChain:void 0,explorerAllowList:void 0,explorerDenyList:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),it={state:nn,subscribe(e){return Nt(nn,()=>e(nn))},setConfig(e){var t,n,i,r;if(T.setStandaloneChains(e.standaloneChains),T.setIsStandalone(!!((t=e.standaloneChains)!=null&&t.length)||!!e.enableStandaloneMode),T.setIsCustomMobile(!!((n=e.mobileWallets)!=null&&n.length)),T.setIsCustomDesktop(!!((i=e.desktopWallets)!=null&&i.length)),T.setWalletConnectVersion((r=e.walletConnectVersion)!=null?r:1),e.defaultChain)T.setSelectedChain(e.defaultChain);else if(!T.state.isStandalone){const o=X.client().getDefaultChain();T.setSelectedChain(o)}Object.assign(nn,e)}},wi="https://explorer-api.walletconnect.com";function Ts(e){const t=Object.fromEntries(Object.entries(e).filter(([n,i])=>typeof i<"u"&&i!==null&&i!=="").map(([n,i])=>[n,i.toString()]));return new URLSearchParams(t).toString()}const rn={async fetchWallets(e,t){const n=Ts(t),i=`${wi}/v3/wallets?projectId=${e}&${n}`;return(await fetch(i)).json()},formatImageUrl(e,t){return`${wi}/v3/logo/lg/${t}?projectId=${e}`}},Rt=xt({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},previewWallets:[],recomendedWallets:[]});function on(){const{projectId:e}=it.state;if(!e)throw new Error("projectId is required to work with explorer api");return e}const ot={state:Rt,async getPreviewWallets(e){const{listings:t}=await rn.fetchWallets(on(),e);return Rt.previewWallets=Object.values(t),Rt.previewWallets},async getRecomendedWallets(){const{listings:e}=await rn.fetchWallets(on(),{page:1,entries:6});Rt.recomendedWallets=Object.values(e)},async getPaginatedWallets(e){const{page:t,search:n}=e,{listings:i,total:r}=await rn.fetchWallets(on(),e),o=Object.values(i),a=n?"search":"wallets";return Rt[a]={listings:[...Rt[a].listings,...o],total:r,page:t??1},{listings:o,total:r}},getImageUrl(e){return rn.formatImageUrl(on(),e)},resetSearch(){Rt.search={listings:[],total:0,page:1}}},ft=xt({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),z={state:ft,subscribe(e){return Nt(ft,()=>e(ft))},push(e,t){e!==ft.view&&(ft.view=e,t&&(ft.data=t),ft.history.push(e))},replace(e){ft.view=e,ft.history=[e]},goBack(){if(ft.history.length>1){ft.history.pop();const[e]=ft.history.slice(-1);ft.view=e}}},ne=xt({open:!1}),lt={state:ne,subscribe(e){return Nt(ne,()=>e(ne))},async open(e){return new Promise(t=>{const{isStandalone:n,isUiLoaded:i,isDataLoaded:r}=T.state,{isConnected:o}=J.state,{enableNetworkView:a}=it.state;if(n?(T.setStandaloneUri(e?.uri),T.setStandaloneChains(e?.standaloneChains),z.replace("ConnectWallet")):e!=null&&e.route?z.replace(e.route):o?z.replace("Account"):a?z.replace("SelectNetwork"):z.replace("ConnectWallet"),i&&r)ne.open=!0,t();else{const c=setInterval(()=>{T.state.isUiLoaded&&T.state.isDataLoaded&&(clearInterval(c),ne.open=!0,t())},200)}})},close(){ne.open=!1}};function Bs(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const sn=xt({themeMode:Bs()?"dark":"light"}),Ot={state:sn,subscribe(e){return Nt(sn,()=>e(sn))},setThemeConfig(e){Object.assign(sn,e)}},jt=xt({open:!1,message:"",variant:"success"}),ct={state:jt,subscribe(e){return Nt(jt,()=>e(jt))},openToast(e,t){jt.open=!0,jt.message=e,jt.variant=t},closeToast(){jt.open=!1}},H={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return H.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isEmptyObject(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.getOwnPropertyNames(e).length===0&&Object.getOwnPropertySymbols(e).length===0},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},formatNativeUrl(e,t,n){if(H.isHttpUrl(e))return this.formatUniversalUrl(e,t,n);let i=e;i.includes("://")||(i=e.replaceAll("/","").replaceAll(":",""),i=`${i}://`),this.setWalletConnectDeepLink(i,n);const r=encodeURIComponent(t);return`${i}wc?uri=${r}`},formatUniversalUrl(e,t,n){if(!H.isHttpUrl(e))return this.formatNativeUrl(e,t,n);let i=e;e.endsWith("/")&&(i=e.slice(0,-1)),this.setWalletConnectDeepLink(i,n);const r=encodeURIComponent(t);return`${i}/wc?uri=${r}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){localStorage.setItem(H.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))},setWalletConnectAndroidDeepLink(e){const[t]=e.split("?");localStorage.setItem(H.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))},removeWalletConnectDeepLink(){localStorage.removeItem(H.WALLETCONNECT_DEEPLINK_CHOICE)},isNull(e){return e===null}};typeof window<"u"&&(window.Buffer||(window.Buffer=fi.Buffer),window.global||(window.global=window),window.process||(window.process={env:{}}));var Ps=Object.defineProperty,vi=Object.getOwnPropertySymbols,Ss=Object.prototype.hasOwnProperty,Ls=Object.prototype.propertyIsEnumerable,bi=(e,t,n)=>t in e?Ps(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ns=(e,t)=>{for(var n in t||(t={}))Ss.call(t,n)&&bi(e,n,t[n]);if(vi)for(var n of vi(t))Ls.call(t,n)&&bi(e,n,t[n]);return e};class Rs{constructor(t){this.openModal=lt.open,this.closeModal=lt.close,this.subscribeModal=lt.subscribe,this.setTheme=Ot.setThemeConfig,Ot.setThemeConfig(t),it.setConfig(Ns({enableStandaloneMode:!0},t)),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(function(){return X1});const t=document.createElement("w3m-modal");document.body.insertAdjacentElement("beforeend",t),T.setIsUiLoaded(!0)}}}var js=Object.freeze({__proto__:null,Web3Modal:Rs});/**
|
|
7
|
-
* @license
|
|
8
|
-
* Copyright 2019 Google LLC
|
|
9
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
10
|
-
*/const an=window,Gn=an.ShadowRoot&&(an.ShadyCSS===void 0||an.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Kn=Symbol(),yi=new WeakMap;class xi{constructor(t,n,i){if(this._$cssResult$=!0,i!==Kn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(Gn&&t===void 0){const i=n!==void 0&&n.length===1;i&&(t=yi.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&yi.set(n,t))}return t}toString(){return this.cssText}}const Ds=e=>new xi(typeof e=="string"?e:e+"",void 0,Kn),D=(e,...t)=>{const n=e.length===1?e[0]:t.reduce((i,r,o)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[o+1],e[0]);return new xi(n,e,Kn)},Us=(e,t)=>{Gn?e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet):t.forEach(n=>{const i=document.createElement("style"),r=an.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=n.cssText,e.appendChild(i)})},Ci=Gn?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const i of t.cssRules)n+=i.cssText;return Ds(n)})(e):e;/**
|
|
11
|
-
* @license
|
|
12
|
-
* Copyright 2017 Google LLC
|
|
13
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
|
-
*/var qn;const ln=window,Ei=ln.trustedTypes,Ws=Ei?Ei.emptyScript:"",Ii=ln.reactiveElementPolyfillSupport,Yn={toAttribute(e,t){switch(t){case Boolean:e=e?Ws:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},$i=(e,t)=>t!==e&&(t==t||e==e),Jn={attribute:!0,type:String,converter:Yn,reflect:!1,hasChanged:$i};class re extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var n;this.finalize(),((n=this.h)!==null&&n!==void 0?n:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((n,i)=>{const r=this._$Ep(i,n);r!==void 0&&(this._$Ev.set(r,i),t.push(r))}),t}static createProperty(t,n=Jn){if(n.state&&(n.attribute=!1),this.finalize(),this.elementProperties.set(t,n),!n.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,r=this.getPropertyDescriptor(t,i,n);r!==void 0&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,n,i){return{get(){return this[n]},set(r){const o=this[t];this[n]=r,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Jn}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const n=this.properties,i=[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)];for(const r of i)this.createProperty(r,n[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const r of i)n.unshift(Ci(r))}else t!==void 0&&n.push(Ci(t));return n}static _$Ep(t,n){const i=n.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(n=>n(this))}addController(t){var n,i;((n=this._$ES)!==null&&n!==void 0?n:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var n;(n=this._$ES)===null||n===void 0||n.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,n)=>{this.hasOwnProperty(n)&&(this._$Ei.set(n,this[n]),delete this[n])})}createRenderRoot(){var t;const n=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Us(n,this.constructor.elementStyles),n}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(n=>{var i;return(i=n.hostConnected)===null||i===void 0?void 0:i.call(n)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(n=>{var i;return(i=n.hostDisconnected)===null||i===void 0?void 0:i.call(n)})}attributeChangedCallback(t,n,i){this._$AK(t,i)}_$EO(t,n,i=Jn){var r;const o=this.constructor._$Ep(t,i);if(o!==void 0&&i.reflect===!0){const a=(((r=i.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?i.converter:Yn).toAttribute(n,i.type);this._$El=t,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._$El=null}}_$AK(t,n){var i;const r=this.constructor,o=r._$Ev.get(t);if(o!==void 0&&this._$El!==o){const a=r.getPropertyOptions(o),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?a.converter:Yn;this._$El=o,this[o]=c.fromAttribute(n,a.type),this._$El=null}}requestUpdate(t,n,i){let r=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||$i)(this[t],n)?(this._$AL.has(t)||this._$AL.set(t,n),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,o)=>this[o]=r),this._$Ei=void 0);let n=!1;const i=this._$AL;try{n=this.shouldUpdate(i),n?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(r=>{var o;return(o=r.hostUpdate)===null||o===void 0?void 0:o.call(r)}),this.update(i)):this._$Ek()}catch(r){throw n=!1,this._$Ek(),r}n&&this._$AE(i)}willUpdate(t){}_$AE(t){var n;(n=this._$ES)===null||n===void 0||n.forEach(i=>{var r;return(r=i.hostUpdated)===null||r===void 0?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((n,i)=>this._$EO(i,this[i],n)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}re.finalized=!0,re.elementProperties=new Map,re.elementStyles=[],re.shadowRootOptions={mode:"open"},Ii?.({ReactiveElement:re}),((qn=ln.reactiveElementVersions)!==null&&qn!==void 0?qn:ln.reactiveElementVersions=[]).push("1.6.1");/**
|
|
15
|
-
* @license
|
|
16
|
-
* Copyright 2017 Google LLC
|
|
17
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
|
-
*/var Qn;const cn=window,ie=cn.trustedTypes,Ai=ie?ie.createPolicy("lit-html",{createHTML:e=>e}):void 0,_t=`lit$${(Math.random()+"").slice(9)}$`,ki="?"+_t,Fs=`<${ki}>`,oe=document,Ae=(e="")=>oe.createComment(e),ke=e=>e===null||typeof e!="object"&&typeof e!="function",Oi=Array.isArray,Hs=e=>Oi(e)||typeof e?.[Symbol.iterator]=="function",Oe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_i=/-->/g,Mi=/>/g,Dt=RegExp(`>|[
|
|
19
|
-
\f\r](?:([^\\s"'>=/]+)([
|
|
20
|
-
\f\r]*=[
|
|
21
|
-
\f\r]*(?:[^
|
|
22
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ti=/'/g,Bi=/"/g,Pi=/^(?:script|style|textarea|title)$/i,Si=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),y=Si(1),Z=Si(2),Ut=Symbol.for("lit-noChange"),st=Symbol.for("lit-nothing"),Li=new WeakMap,se=oe.createTreeWalker(oe,129,null,!1),Vs=(e,t)=>{const n=e.length-1,i=[];let r,o=t===2?"<svg>":"",a=Oe;for(let h=0;h<n;h++){const p=e[h];let f,v,w=-1,b=0;for(;b<p.length&&(a.lastIndex=b,v=a.exec(p),v!==null);)b=a.lastIndex,a===Oe?v[1]==="!--"?a=_i:v[1]!==void 0?a=Mi:v[2]!==void 0?(Pi.test(v[2])&&(r=RegExp("</"+v[2],"g")),a=Dt):v[3]!==void 0&&(a=Dt):a===Dt?v[0]===">"?(a=r??Oe,w=-1):v[1]===void 0?w=-2:(w=a.lastIndex-v[2].length,f=v[1],a=v[3]===void 0?Dt:v[3]==='"'?Bi:Ti):a===Bi||a===Ti?a=Dt:a===_i||a===Mi?a=Oe:(a=Dt,r=void 0);const I=a===Dt&&e[h+1].startsWith("/>")?" ":"";o+=a===Oe?p+Fs:w>=0?(i.push(f),p.slice(0,w)+"$lit$"+p.slice(w)+_t+I):p+_t+(w===-2?(i.push(void 0),h):I)}const c=o+(e[n]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Ai!==void 0?Ai.createHTML(c):c,i]};class qe{constructor({strings:t,_$litType$:n},i){let r;this.parts=[];let o=0,a=0;const c=t.length-1,h=this.parts,[p,f]=Vs(t,n);if(this.el=qe.createElement(p,i),se.currentNode=this.el.content,n===2){const v=this.el.content,w=v.firstChild;w.remove(),v.append(...w.childNodes)}for(;(r=se.nextNode())!==null&&h.length<c;){if(r.nodeType===1){if(r.hasAttributes()){const v=[];for(const w of r.getAttributeNames())if(w.endsWith("$lit$")||w.startsWith(_t)){const b=f[a++];if(v.push(w),b!==void 0){const I=r.getAttribute(b.toLowerCase()+"$lit$").split(_t),C=/([.?@])?(.*)/.exec(b);h.push({type:1,index:o,name:C[2],strings:I,ctor:C[1]==="."?Zs:C[1]==="?"?Ks:C[1]==="@"?qs:dn})}else h.push({type:6,index:o})}for(const w of v)r.removeAttribute(w)}if(Pi.test(r.tagName)){const v=r.textContent.split(_t),w=v.length-1;if(w>0){r.textContent=ie?ie.emptyScript:"";for(let b=0;b<w;b++)r.append(v[b],Ae()),se.nextNode(),h.push({type:2,index:++o});r.append(v[w],Ae())}}}else if(r.nodeType===8)if(r.data===ki)h.push({type:2,index:o});else{let v=-1;for(;(v=r.data.indexOf(_t,v+1))!==-1;)h.push({type:7,index:o}),v+=_t.length-1}o++}}static createElement(t,n){const i=oe.createElement("template");return i.innerHTML=t,i}}function ae(e,t,n=e,i){var r,o,a,c;if(t===Ut)return t;let h=i!==void 0?(r=n._$Co)===null||r===void 0?void 0:r[i]:n._$Cl;const p=ke(t)?void 0:t._$litDirective$;return h?.constructor!==p&&((o=h?._$AO)===null||o===void 0||o.call(h,!1),p===void 0?h=void 0:(h=new p(e),h._$AT(e,n,i)),i!==void 0?((a=(c=n)._$Co)!==null&&a!==void 0?a:c._$Co=[])[i]=h:n._$Cl=h),h!==void 0&&(t=ae(e,h._$AS(e,t.values),h,i)),t}class zs{constructor(t,n){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var n;const{el:{content:i},parts:r}=this._$AD,o=((n=t?.creationScope)!==null&&n!==void 0?n:oe).importNode(i,!0);se.currentNode=o;let a=se.nextNode(),c=0,h=0,p=r[0];for(;p!==void 0;){if(c===p.index){let f;p.type===2?f=new Ye(a,a.nextSibling,this,t):p.type===1?f=new p.ctor(a,p.name,p.strings,this,t):p.type===6&&(f=new Ys(a,this,t)),this.u.push(f),p=r[++h]}c!==p?.index&&(a=se.nextNode(),c++)}return o}p(t){let n=0;for(const i of this.u)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}class Ye{constructor(t,n,i,r){var o;this.type=2,this._$AH=st,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=i,this.options=r,this._$Cm=(o=r?.isConnected)===null||o===void 0||o}get _$AU(){var t,n;return(n=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&n!==void 0?n:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&t.nodeType===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=ae(this,t,n),ke(t)?t===st||t==null||t===""?(this._$AH!==st&&this._$AR(),this._$AH=st):t!==this._$AH&&t!==Ut&&this.g(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Hs(t)?this.k(t):this.g(t)}O(t,n=this._$AB){return this._$AA.parentNode.insertBefore(t,n)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==st&&ke(this._$AH)?this._$AA.nextSibling.data=t:this.T(oe.createTextNode(t)),this._$AH=t}$(t){var n;const{values:i,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=qe.createElement(r.h,this.options)),r);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===o)this._$AH.p(i);else{const a=new zs(o,this),c=a.v(this.options);a.p(i),this.T(c),this._$AH=a}}_$AC(t){let n=Li.get(t.strings);return n===void 0&&Li.set(t.strings,n=new qe(t)),n}k(t){Oi(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const o of t)r===n.length?n.push(i=new Ye(this.O(Ae()),this.O(Ae()),this,this.options)):i=n[r],i._$AI(o),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(t=this._$AA.nextSibling,n){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,n);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var n;this._$AM===void 0&&(this._$Cm=t,(n=this._$AP)===null||n===void 0||n.call(this,t))}}class dn{constructor(t,n,i,r,o){this.type=1,this._$AH=st,this._$AN=void 0,this.element=t,this.name=n,this._$AM=r,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=st}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,n=this,i,r){const o=this.strings;let a=!1;if(o===void 0)t=ae(this,t,n,0),a=!ke(t)||t!==this._$AH&&t!==Ut,a&&(this._$AH=t);else{const c=t;let h,p;for(t=o[0],h=0;h<o.length-1;h++)p=ae(this,c[i+h],n,h),p===Ut&&(p=this._$AH[h]),a||(a=!ke(p)||p!==this._$AH[h]),p===st?t=st:t!==st&&(t+=(p??"")+o[h+1]),this._$AH[h]=p}a&&!r&&this.j(t)}j(t){t===st?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Zs extends dn{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===st?void 0:t}}const Gs=ie?ie.emptyScript:"";class Ks extends dn{constructor(){super(...arguments),this.type=4}j(t){t&&t!==st?this.element.setAttribute(this.name,Gs):this.element.removeAttribute(this.name)}}class qs extends dn{constructor(t,n,i,r,o){super(t,n,i,r,o),this.type=5}_$AI(t,n=this){var i;if((t=(i=ae(this,t,n,0))!==null&&i!==void 0?i:st)===Ut)return;const r=this._$AH,o=t===st&&r!==st||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,a=t!==st&&(r===st||o);o&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var n,i;typeof this._$AH=="function"?this._$AH.call((i=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class Ys{constructor(t,n,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){ae(this,t)}}const Ni=cn.litHtmlPolyfillSupport;Ni?.(qe,Ye),((Qn=cn.litHtmlVersions)!==null&&Qn!==void 0?Qn:cn.litHtmlVersions=[]).push("2.6.1");const Js=(e,t,n)=>{var i,r;const o=(i=n?.renderBefore)!==null&&i!==void 0?i:t;let a=o._$litPart$;if(a===void 0){const c=(r=n?.renderBefore)!==null&&r!==void 0?r:null;o._$litPart$=a=new Ye(t.insertBefore(Ae(),c),c,void 0,n??{})}return a._$AI(e),a};/**
|
|
23
|
-
* @license
|
|
24
|
-
* Copyright 2017 Google LLC
|
|
25
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
26
|
-
*/var Xn,tr;class B extends re{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,n;const i=super.createRenderRoot();return(t=(n=this.renderOptions).renderBefore)!==null&&t!==void 0||(n.renderBefore=i.firstChild),i}update(t){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Js(n,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return Ut}}B.finalized=!0,B._$litElement$=!0,(Xn=globalThis.litElementHydrateSupport)===null||Xn===void 0||Xn.call(globalThis,{LitElement:B});const Ri=globalThis.litElementPolyfillSupport;Ri?.({LitElement:B}),((tr=globalThis.litElementVersions)!==null&&tr!==void 0?tr:globalThis.litElementVersions=[]).push("3.2.2");/**
|
|
27
|
-
* @license
|
|
28
|
-
* Copyright 2017 Google LLC
|
|
29
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
30
|
-
*/const L=e=>t=>typeof t=="function"?((n,i)=>(customElements.define(n,i),i))(e,t):((n,i)=>{const{kind:r,elements:o}=i;return{kind:r,elements:o,finisher(a){customElements.define(n,a)}}})(e,t);/**
|
|
31
|
-
* @license
|
|
32
|
-
* Copyright 2017 Google LLC
|
|
33
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
-
*/const Qs=(e,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(n){n.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(n){n.createProperty(t.key,e)}};function j(e){return(t,n)=>n!==void 0?((i,r,o)=>{r.constructor.createProperty(o,i)})(e,t,n):Qs(e,t)}/**
|
|
35
|
-
* @license
|
|
36
|
-
* Copyright 2017 Google LLC
|
|
37
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
-
*/function K(e){return j({...e,state:!0})}/**
|
|
39
|
-
* @license
|
|
40
|
-
* Copyright 2021 Google LLC
|
|
41
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
42
|
-
*/var er;((er=window.HTMLSlotElement)===null||er===void 0?void 0:er.prototype.assignedElements)!=null;/**
|
|
43
|
-
* @license
|
|
44
|
-
* Copyright 2017 Google LLC
|
|
45
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
|
-
*/const Xs={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ta=e=>(...t)=>({_$litDirective$:e,values:t});class ea{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,n,i){this._$Ct=t,this._$AM=n,this._$Ci=i}_$AS(t,n){return this.update(t,n)}update(t,n){return this.render(...n)}}/**
|
|
47
|
-
* @license
|
|
48
|
-
* Copyright 2018 Google LLC
|
|
49
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
50
|
-
*/const pt=ta(class extends ea{constructor(e){var t;if(super(e),e.type!==Xs.ATTRIBUTE||e.name!=="class"||((t=e.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var n,i;if(this.nt===void 0){this.nt=new Set,e.strings!==void 0&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!(!((n=this.st)===null||n===void 0)&&n.has(o))&&this.nt.add(o);return this.render(t)}const r=e.element.classList;this.nt.forEach(o=>{o in t||(r.remove(o),this.nt.delete(o))});for(const o in t){const a=!!t[o];a===this.nt.has(o)||!((i=this.st)===null||i===void 0)&&i.has(o)||(a?(r.add(o),this.nt.add(o)):(r.remove(o),this.nt.delete(o)))}return Ut}});function na(e,t){e.indexOf(t)===-1&&e.push(t)}const ji=(e,t,n)=>Math.min(Math.max(n,e),t),vt={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},_e=e=>typeof e=="number",le=e=>Array.isArray(e)&&!_e(e[0]),ra=(e,t,n)=>{const i=t-e;return((n-e)%i+i)%i+e};function ia(e,t){return le(e)?e[ra(0,e.length,t)]:e}const Di=(e,t,n)=>-n*e+n*t+e,Ui=()=>{},Et=e=>e,nr=(e,t,n)=>t-e===0?1:(n-e)/(t-e);function Wi(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=nr(0,t,i);e.push(Di(n,1,r))}}function oa(e){const t=[0];return Wi(t,e-1),t}function sa(e,t=oa(e.length),n=Et){const i=e.length,r=i-t.length;return r>0&&Wi(t,r),o=>{let a=0;for(;a<i-2&&!(o<t[a+1]);a++);let c=ji(0,1,nr(t[a],t[a+1],o));return c=ia(n,a)(c),Di(e[a],e[a+1],c)}}const Fi=e=>Array.isArray(e)&&_e(e[0]),rr=e=>typeof e=="object"&&Boolean(e.createAnimation),Wt=e=>typeof e=="function",Hi=e=>typeof e=="string",ce={ms:e=>e*1e3,s:e=>e/1e3};function aa(e,t){return t?e*(1e3/t):0}const Vi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,la=1e-7,ca=12;function da(e,t,n,i,r){let o,a,c=0;do a=t+(n-t)/2,o=Vi(a,i,r)-e,o>0?n=a:t=a;while(Math.abs(o)>la&&++c<ca);return a}function Me(e,t,n,i){if(e===t&&n===i)return Et;const r=o=>da(o,0,1,e,n);return o=>o===0||o===1?o:Vi(r(o),t,i)}const ha=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const i=n*e,r=t==="end"?Math.floor(i):Math.ceil(i);return ji(0,1,r/e)},zi={ease:Me(.25,.1,.25,1),"ease-in":Me(.42,0,1,1),"ease-in-out":Me(.42,0,.58,1),"ease-out":Me(0,0,.58,1)},ua=/\((.*?)\)/;function Zi(e){if(Wt(e))return e;if(Fi(e))return Me(...e);if(zi[e])return zi[e];if(e.startsWith("steps")){const t=ua.exec(e);if(t){const n=t[1].split(",");return ha(parseFloat(n[0]),n[1].trim())}}return Et}class Gi{constructor(t,n=[0,1],{easing:i,duration:r=vt.duration,delay:o=vt.delay,endDelay:a=vt.endDelay,repeat:c=vt.repeat,offset:h,direction:p="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=Et,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((v,w)=>{this.resolve=v,this.reject=w}),i=i||vt.easing,rr(i)){const v=i.createAnimation(n);i=v.easing,n=v.keyframes||n,r=v.duration||r}this.repeat=c,this.easing=le(i)?Et:Zi(i),this.updateDuration(r);const f=sa(n,h,le(i)?i.map(Zi):Et);this.tick=v=>{var w;o=o;let b=0;this.pauseTime!==void 0?b=this.pauseTime:b=(v-this.startTime)*this.rate,this.t=b,b/=1e3,b=Math.max(b-o,0),this.playState==="finished"&&this.pauseTime===void 0&&(b=this.totalDuration);const I=b/this.duration;let C=Math.floor(I),M=I%1;!M&&I>=1&&(M=1),M===1&&C--;const E=C%2;(p==="reverse"||p==="alternate"&&E||p==="alternate-reverse"&&!E)&&(M=1-M);const k=b>=this.totalDuration?1:Math.min(M,1),$=f(this.easing(k));t($),this.pauseTime===void 0&&(this.playState==="finished"||b>=this.totalDuration+a)?(this.playState="finished",(w=this.resolve)===null||w===void 0||w.call(this,$)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}var ir=function(){};process.env.NODE_ENV!=="production"&&(ir=function(e,t){if(!e)throw new Error(t)});class pa{setAnimation(t){this.animation=t,t?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const or=new WeakMap;function Ki(e){return or.has(e)||or.set(e,{transforms:[],values:new Map}),or.get(e)}function ma(e,t){return e.has(t)||e.set(t,new pa),e.get(t)}const fa=["","X","Y","Z"],ga=["translate","scale","rotate","skew"],hn={x:"translateX",y:"translateY",z:"translateZ"},qi={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},wa={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:qi,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:Et},skew:qi},de=new Map,sr=e=>`--motion-${e}`,un=["x","y","z"];ga.forEach(e=>{fa.forEach(t=>{un.push(e+t),de.set(sr(e+t),wa[e])})});const va=(e,t)=>un.indexOf(e)-un.indexOf(t),ba=new Set(un),Yi=e=>ba.has(e),ya=(e,t)=>{hn[t]&&(t=hn[t]);const{transforms:n}=Ki(e);na(n,t),e.style.transform=xa(n)},xa=e=>e.sort(va).reduce(Ca,"").trim(),Ca=(e,t)=>`${e} ${t}(var(${sr(t)}))`,ar=e=>e.startsWith("--"),Ji=new Set;function Ea(e){if(!Ji.has(e)){Ji.add(e);try{const{syntax:t,initialValue:n}=de.has(e)?de.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:n})}catch{}}}const lr=(e,t)=>document.createElement("div").animate(e,t),Qi={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{lr({opacity:[1]})}catch{return!1}return!0},finished:()=>Boolean(lr({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{lr({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},cr={},he={};for(const e in Qi)he[e]=()=>(cr[e]===void 0&&(cr[e]=Qi[e]()),cr[e]);const Ia=.015,$a=(e,t)=>{let n="";const i=Math.round(t/Ia);for(let r=0;r<i;r++)n+=e(nr(0,i-1,r))+", ";return n.substring(0,n.length-2)},Xi=(e,t)=>Wt(e)?he.linearEasing()?`linear(${$a(e,t)})`:vt.easing:Fi(e)?Aa(e):e,Aa=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`;function ka(e,t){for(let n=0;n<e.length;n++)e[n]===null&&(e[n]=n?e[n-1]:t());return e}const Oa=e=>Array.isArray(e)?e:[e];function pn(e){return hn[e]&&(e=hn[e]),Yi(e)?sr(e):e}const mn={get:(e,t)=>{t=pn(t);let n=ar(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!n&&n!==0){const i=de.get(t);i&&(n=i.initialValue)}return n},set:(e,t,n)=>{t=pn(t),ar(t)?e.style.setProperty(t,n):e.style[t]=n}};function to(e,t=!0){if(!(!e||e.playState==="finished"))try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}function eo(e,t){var n;let i=t?.toDefaultUnit||Et;const r=e[e.length-1];if(Hi(r)){const o=((n=r.match(/(-?[\d.]+)([a-z%]*)/))===null||n===void 0?void 0:n[2])||"";o&&(i=a=>a+o)}return i}function _a(){return window.__MOTION_DEV_TOOLS_RECORD}function Ma(e,t,n,i={},r){const o=_a(),a=i.record!==!1&&o;let c,{duration:h=vt.duration,delay:p=vt.delay,endDelay:f=vt.endDelay,repeat:v=vt.repeat,easing:w=vt.easing,persist:b=!1,direction:I,offset:C,allowWebkitAcceleration:M=!1}=i;const E=Ki(e),k=Yi(t);let $=he.waapi();k&&ya(e,t);const O=pn(t),P=ma(E.values,O),W=de.get(O);return to(P.animation,!(rr(w)&&P.generator)&&i.record!==!1),()=>{const G=()=>{var _,S;return(S=(_=mn.get(e,O))!==null&&_!==void 0?_:W?.initialValue)!==null&&S!==void 0?S:0};let V=ka(Oa(n),G);const R=eo(V,W);if(rr(w)){const _=w.createAnimation(V,t!=="opacity",G,O,P);w=_.easing,V=_.keyframes||V,h=_.duration||h}if(ar(O)&&(he.cssRegisterProperty()?Ea(O):$=!1),k&&!he.linearEasing()&&(Wt(w)||le(w)&&w.some(Wt))&&($=!1),$){W&&(V=V.map(q=>_e(q)?W.toDefaultUnit(q):q)),V.length===1&&(!he.partialKeyframes()||a)&&V.unshift(G());const _={delay:ce.ms(p),duration:ce.ms(h),endDelay:ce.ms(f),easing:le(w)?void 0:Xi(w,h),direction:I,iterations:v+1,fill:"both"};c=e.animate({[O]:V,offset:C,easing:le(w)?w.map(q=>Xi(q,h)):void 0},_),c.finished||(c.finished=new Promise((q,rt)=>{c.onfinish=q,c.oncancel=rt}));const S=V[V.length-1];c.finished.then(()=>{b||(mn.set(e,O,S),c.cancel())}).catch(Ui),M||(c.playbackRate=1.000001)}else if(r&&k)V=V.map(_=>typeof _=="string"?parseFloat(_):_),V.length===1&&V.unshift(parseFloat(G())),c=new r(_=>{mn.set(e,O,R?R(_):_)},V,Object.assign(Object.assign({},i),{duration:h,easing:w}));else{const _=V[V.length-1];mn.set(e,O,W&&_e(_)?W.toDefaultUnit(_):_)}return a&&o(e,t,V,{duration:h,delay:p,easing:w,repeat:v,offset:C},"motion-one"),P.setAnimation(c),c}}const Ta=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function no(e,t){var n;return typeof e=="string"?t?((n=t[e])!==null&&n!==void 0||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}const Ba=e=>e(),ro=(e,t,n=vt.duration)=>new Proxy({animations:e.map(Ba).filter(Boolean),duration:n,options:t},Sa),Pa=e=>e.animations[0],Sa={get:(e,t)=>{const n=Pa(e);switch(t){case"duration":return e.duration;case"currentTime":return ce.s(n?.[t]||0);case"playbackRate":case"playState":return n?.[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(La)).catch(Ui)),e.finished;case"stop":return()=>{e.animations.forEach(i=>to(i))};case"forEachNative":return i=>{e.animations.forEach(r=>i(r,e))};default:return typeof n?.[t]>"u"?void 0:()=>e.animations.forEach(i=>i[t]())}},set:(e,t,n)=>{switch(t){case"currentTime":n=ce.ms(n);case"currentTime":case"playbackRate":for(let i=0;i<e.animations.length;i++)e.animations[i][t]=n;return!0}return!1}},La=e=>e.finished;function Na(e,t,n){return Wt(e)?e(t,n):e}function Ra(e){return function(n,i,r={}){n=no(n);const o=n.length;ir(Boolean(o),"No valid element provided."),ir(Boolean(i),"No keyframes defined.");const a=[];for(let c=0;c<o;c++){const h=n[c];for(const p in i){const f=Ta(r,p);f.delay=Na(f.delay,c,o);const v=Ma(h,p,i[p],f,e);a.push(v)}}return ro(a,r,r.duration)}}const ja=Ra(Gi);function Da(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}const Ua=5;function io(e,t,n){const i=Math.max(t-Ua,0);return aa(n-e(i),t-i)}const ue={stiffness:100,damping:10,mass:1},Wa=(e=ue.stiffness,t=ue.damping,n=ue.mass)=>t/(2*Math.sqrt(e*n));function Fa(e,t,n){return e<t&&n>=t||e>t&&n<=t}const Ha=({stiffness:e=ue.stiffness,damping:t=ue.damping,mass:n=ue.mass,from:i=0,to:r=1,velocity:o=0,restSpeed:a=2,restDistance:c=.5}={})=>{o=o?ce.s(o):0;const h={done:!1,hasReachedTarget:!1,current:i,target:r},p=r-i,f=Math.sqrt(e/n)/1e3,v=Wa(e,t,n);let w;if(v<1){const b=f*Math.sqrt(1-v*v);w=I=>r-Math.exp(-v*f*I)*((-o+v*f*p)/b*Math.sin(b*I)+p*Math.cos(b*I))}else w=b=>r-Math.exp(-f*b)*(p+(-o+f*p)*b);return b=>{h.current=w(b);const I=b===0?o:io(w,b,h.current),C=Math.abs(I)<=a,M=Math.abs(r-h.current)<=c;return h.done=C&&M,h.hasReachedTarget=Fa(i,r,h.current),h}},dr=10,Va=1e4;function za(e,t=Et){let n,i=dr,r=e(0);const o=[t(r.current)];for(;!r.done&&i<Va;)r=e(i),o.push(t(r.done?r.target:r.current)),n===void 0&&r.hasReachedTarget&&(n=i),i+=dr;const a=i-dr;return o.length===1&&o.push(r.current),{keyframes:o,duration:a/1e3,overshootDuration:(n??a)/1e3}}function oo(e){return _e(e)&&!isNaN(e)}function hr(e){return Hi(e)?parseFloat(e):e}function Za(e){const t=new WeakMap;return(n={})=>{const i=new Map,r=(a=0,c=100,h=0,p=!1)=>{const f=`${a}-${c}-${h}-${p}`;return i.has(f)||i.set(f,e(Object.assign({from:a,to:c,velocity:h,restSpeed:p?.05:2,restDistance:p?.01:.5},n))),i.get(f)},o=(a,c)=>(t.has(a)||t.set(a,za(a,c)),t.get(a));return{createAnimation:(a,c=!0,h,p,f)=>{let v,w,b,I=0,C=Et;const M=a.length;if(c){C=eo(a,p?de.get(pn(p)):void 0);const E=a[M-1];if(b=hr(E),M>1&&a[0]!==null)w=hr(a[0]);else{const k=f?.generator;if(k){const{animation:$,generatorStartTime:O}=f,P=$?.startTime||O||0,W=$?.currentTime||performance.now()-P,G=k(W).current;w=G,I=io(V=>k(V).current,W,G)}else h&&(w=hr(h()))}}if(oo(w)&&oo(b)){const E=r(w,b,I,p?.includes("scale"));v=Object.assign(Object.assign({},o(E,C)),{easing:"linear"}),f&&(f.generator=E,f.generatorStartTime=performance.now())}return v||(v={easing:"ease",duration:o(r(0,100)).overshootDuration}),v}}}}const fn=Za(Ha),Ga={any:0,all:1};function Ka(e,t,{root:n,margin:i,amount:r="any"}={}){if(typeof IntersectionObserver>"u")return()=>{};const o=no(e),a=new WeakMap,c=p=>{p.forEach(f=>{const v=a.get(f.target);if(f.isIntersecting!==Boolean(v))if(f.isIntersecting){const w=t(f);Wt(w)?a.set(f.target,w):h.unobserve(f.target)}else v&&(v(f),a.delete(f.target))})},h=new IntersectionObserver(c,{root:n,rootMargin:i,threshold:typeof r=="number"?r:Ga[r]});return o.forEach(p=>h.observe(p)),()=>h.disconnect()}function ur(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:{originalEvent:n}}))}function so(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:{originalEntry:n}}))}const qa={isActive:e=>Boolean(e.inView),subscribe:(e,{enable:t,disable:n},{inViewOptions:i={}})=>{const{once:r}=i,o=Da(i,["once"]);return Ka(e,a=>{if(t(),so(e,"viewenter",a),!r)return c=>{n(),so(e,"viewleave",c)}},o)}},ao=(e,t,n)=>i=>{i.pointerType&&i.pointerType!=="mouse"||(n(),ur(e,t,i))},Ya={isActive:e=>Boolean(e.hover),subscribe:(e,{enable:t,disable:n})=>{const i=ao(e,"hoverstart",t),r=ao(e,"hoverend",n);return e.addEventListener("pointerenter",i),e.addEventListener("pointerleave",r),()=>{e.removeEventListener("pointerenter",i),e.removeEventListener("pointerleave",r)}}},Ja={isActive:e=>Boolean(e.press),subscribe:(e,{enable:t,disable:n})=>{const i=o=>{n(),ur(e,"pressend",o),window.removeEventListener("pointerup",i)},r=o=>{t(),ur(e,"pressstart",o),window.addEventListener("pointerup",i)};return e.addEventListener("pointerdown",r),()=>{e.removeEventListener("pointerdown",r),window.removeEventListener("pointerup",i)}}},Qa={inView:qa,hover:Ya,press:Ja};[...Object.keys(Qa)];function Xa(e,t={}){return ro([()=>{const n=new Gi(e,[0,1],t);return n.finished.catch(()=>{}),n}],t,t.duration)}function Mt(e,t,n){return(Wt(e)?Xa:ja)(e,t,n)}/**
|
|
51
|
-
* @license
|
|
52
|
-
* Copyright 2018 Google LLC
|
|
53
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
|
-
*/const mt=e=>e??st;var Te={},tl=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},lo={},gt={};let pr;const el=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];gt.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17},gt.getSymbolTotalCodewords=function(t){return el[t]},gt.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},gt.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');pr=t},gt.isKanjiModeEnabled=function(){return typeof pr<"u"},gt.toSJIS=function(t){return pr(t)};var gn={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},e.from=function(i,r){if(e.isValid(i))return i;try{return t(i)}catch{return r}}})(gn);function co(){this.buffer=[],this.length=0}co.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var nl=co;function Be(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}Be.prototype.set=function(e,t,n,i){const r=e*this.size+t;this.data[r]=n,i&&(this.reservedBit[r]=!0)},Be.prototype.get=function(e,t){return this.data[e*this.size+t]},Be.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},Be.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var rl=Be,ho={};(function(e){const t=gt.getSymbolSize;e.getRowColCoords=function(i){if(i===1)return[];const r=Math.floor(i/7)+2,o=t(i),a=o===145?26:Math.ceil((o-13)/(2*r-2))*2,c=[o-7];for(let h=1;h<r-1;h++)c[h]=c[h-1]-a;return c.push(6),c.reverse()},e.getPositions=function(i){const r=[],o=e.getRowColCoords(i),a=o.length;for(let c=0;c<a;c++)for(let h=0;h<a;h++)c===0&&h===0||c===0&&h===a-1||c===a-1&&h===0||r.push([o[c],o[h]]);return r}})(ho);var uo={};const il=gt.getSymbolSize,po=7;uo.getPositions=function(t){const n=il(t);return[[0,0],[n-po,0],[0,n-po]]};var mo={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},e.from=function(r){return e.isValid(r)?parseInt(r,10):void 0},e.getPenaltyN1=function(r){const o=r.size;let a=0,c=0,h=0,p=null,f=null;for(let v=0;v<o;v++){c=h=0,p=f=null;for(let w=0;w<o;w++){let b=r.get(v,w);b===p?c++:(c>=5&&(a+=t.N1+(c-5)),p=b,c=1),b=r.get(w,v),b===f?h++:(h>=5&&(a+=t.N1+(h-5)),f=b,h=1)}c>=5&&(a+=t.N1+(c-5)),h>=5&&(a+=t.N1+(h-5))}return a},e.getPenaltyN2=function(r){const o=r.size;let a=0;for(let c=0;c<o-1;c++)for(let h=0;h<o-1;h++){const p=r.get(c,h)+r.get(c,h+1)+r.get(c+1,h)+r.get(c+1,h+1);(p===4||p===0)&&a++}return a*t.N2},e.getPenaltyN3=function(r){const o=r.size;let a=0,c=0,h=0;for(let p=0;p<o;p++){c=h=0;for(let f=0;f<o;f++)c=c<<1&2047|r.get(p,f),f>=10&&(c===1488||c===93)&&a++,h=h<<1&2047|r.get(f,p),f>=10&&(h===1488||h===93)&&a++}return a*t.N3},e.getPenaltyN4=function(r){let o=0;const a=r.data.length;for(let h=0;h<a;h++)o+=r.data[h];return Math.abs(Math.ceil(o*100/a/5)-10)*t.N4};function n(i,r,o){switch(i){case e.Patterns.PATTERN000:return(r+o)%2===0;case e.Patterns.PATTERN001:return r%2===0;case e.Patterns.PATTERN010:return o%3===0;case e.Patterns.PATTERN011:return(r+o)%3===0;case e.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(o/3))%2===0;case e.Patterns.PATTERN101:return r*o%2+r*o%3===0;case e.Patterns.PATTERN110:return(r*o%2+r*o%3)%2===0;case e.Patterns.PATTERN111:return(r*o%3+(r+o)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}e.applyMask=function(r,o){const a=o.size;for(let c=0;c<a;c++)for(let h=0;h<a;h++)o.isReserved(h,c)||o.xor(h,c,n(r,h,c))},e.getBestMask=function(r,o){const a=Object.keys(e.Patterns).length;let c=0,h=1/0;for(let p=0;p<a;p++){o(p),e.applyMask(p,r);const f=e.getPenaltyN1(r)+e.getPenaltyN2(r)+e.getPenaltyN3(r)+e.getPenaltyN4(r);e.applyMask(p,r),f<h&&(h=f,c=p)}return c}})(mo);var wn={};const Tt=gn,vn=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],bn=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];wn.getBlocksCount=function(t,n){switch(n){case Tt.L:return vn[(t-1)*4+0];case Tt.M:return vn[(t-1)*4+1];case Tt.Q:return vn[(t-1)*4+2];case Tt.H:return vn[(t-1)*4+3];default:return}},wn.getTotalCodewordsCount=function(t,n){switch(n){case Tt.L:return bn[(t-1)*4+0];case Tt.M:return bn[(t-1)*4+1];case Tt.Q:return bn[(t-1)*4+2];case Tt.H:return bn[(t-1)*4+3];default:return}};var fo={},yn={};const Pe=new Uint8Array(512),xn=new Uint8Array(256);(function(){let t=1;for(let n=0;n<255;n++)Pe[n]=t,xn[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)Pe[n]=Pe[n-255]})(),yn.log=function(t){if(t<1)throw new Error("log("+t+")");return xn[t]},yn.exp=function(t){return Pe[t]},yn.mul=function(t,n){return t===0||n===0?0:Pe[xn[t]+xn[n]]},function(e){const t=yn;e.mul=function(i,r){const o=new Uint8Array(i.length+r.length-1);for(let a=0;a<i.length;a++)for(let c=0;c<r.length;c++)o[a+c]^=t.mul(i[a],r[c]);return o},e.mod=function(i,r){let o=new Uint8Array(i);for(;o.length-r.length>=0;){const a=o[0];for(let h=0;h<r.length;h++)o[h]^=t.mul(r[h],a);let c=0;for(;c<o.length&&o[c]===0;)c++;o=o.slice(c)}return o},e.generateECPolynomial=function(i){let r=new Uint8Array([1]);for(let o=0;o<i;o++)r=e.mul(r,new Uint8Array([1,t.exp(o)]));return r}}(fo);const go=fo;function mr(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}mr.prototype.initialize=function(t){this.degree=t,this.genPoly=go.generateECPolynomial(this.degree)},mr.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const i=go.mod(n,this.genPoly),r=this.degree-i.length;if(r>0){const o=new Uint8Array(this.degree);return o.set(i,r),o}return i};var ol=mr,wo={},Bt={},fr={};fr.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var It={};const vo="[0-9]+",sl="[A-Z $%*+\\-./:]+";let Se="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Se=Se.replace(/u/g,"\\u");const al="(?:(?![A-Z0-9 $%*+\\-./:]|"+Se+`)(?:.|[\r
|
|
55
|
-
]))+`;It.KANJI=new RegExp(Se,"g"),It.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),It.BYTE=new RegExp(al,"g"),It.NUMERIC=new RegExp(vo,"g"),It.ALPHANUMERIC=new RegExp(sl,"g");const ll=new RegExp("^"+Se+"$"),cl=new RegExp("^"+vo+"$"),dl=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");It.testKanji=function(t){return ll.test(t)},It.testNumeric=function(t){return cl.test(t)},It.testAlphanumeric=function(t){return dl.test(t)},function(e){const t=fr,n=It;e.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,a){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?o.ccBits[0]:a<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function i(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+r)}}e.from=function(o,a){if(e.isValid(o))return o;try{return i(o)}catch{return a}}}(Bt),function(e){const t=gt,n=wn,i=gn,r=Bt,o=fr,a=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,c=t.getBCHDigit(a);function h(w,b,I){for(let C=1;C<=40;C++)if(b<=e.getCapacity(C,I,w))return C}function p(w,b){return r.getCharCountIndicator(w,b)+4}function f(w,b){let I=0;return w.forEach(function(C){const M=p(C.mode,b);I+=M+C.getBitsLength()}),I}function v(w,b){for(let I=1;I<=40;I++)if(f(w,I)<=e.getCapacity(I,b,r.MIXED))return I}e.from=function(b,I){return o.isValid(b)?parseInt(b,10):I},e.getCapacity=function(b,I,C){if(!o.isValid(b))throw new Error("Invalid QR Code version");typeof C>"u"&&(C=r.BYTE);const M=t.getSymbolTotalCodewords(b),E=n.getTotalCodewordsCount(b,I),k=(M-E)*8;if(C===r.MIXED)return k;const $=k-p(C,b);switch(C){case r.NUMERIC:return Math.floor($/10*3);case r.ALPHANUMERIC:return Math.floor($/11*2);case r.KANJI:return Math.floor($/13);case r.BYTE:default:return Math.floor($/8)}},e.getBestVersionForData=function(b,I){let C;const M=i.from(I,i.M);if(Array.isArray(b)){if(b.length>1)return v(b,M);if(b.length===0)return 1;C=b[0]}else C=b;return h(C.mode,C.getLength(),M)},e.getEncodedBits=function(b){if(!o.isValid(b)||b<7)throw new Error("Invalid QR Code version");let I=b<<12;for(;t.getBCHDigit(I)-c>=0;)I^=a<<t.getBCHDigit(I)-c;return b<<12|I}}(wo);var bo={};const gr=gt,yo=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,hl=1<<14|1<<12|1<<10|1<<4|1<<1,xo=gr.getBCHDigit(yo);bo.getEncodedBits=function(t,n){const i=t.bit<<3|n;let r=i<<10;for(;gr.getBCHDigit(r)-xo>=0;)r^=yo<<gr.getBCHDigit(r)-xo;return(i<<10|r)^hl};var Co={};const ul=Bt;function pe(e){this.mode=ul.NUMERIC,this.data=e.toString()}pe.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},pe.prototype.getLength=function(){return this.data.length},pe.prototype.getBitsLength=function(){return pe.getBitsLength(this.data.length)},pe.prototype.write=function(t){let n,i,r;for(n=0;n+3<=this.data.length;n+=3)i=this.data.substr(n,3),r=parseInt(i,10),t.put(r,10);const o=this.data.length-n;o>0&&(i=this.data.substr(n),r=parseInt(i,10),t.put(r,o*3+1))};var pl=pe;const ml=Bt,wr=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function me(e){this.mode=ml.ALPHANUMERIC,this.data=e}me.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)},me.prototype.getLength=function(){return this.data.length},me.prototype.getBitsLength=function(){return me.getBitsLength(this.data.length)},me.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let i=wr.indexOf(this.data[n])*45;i+=wr.indexOf(this.data[n+1]),t.put(i,11)}this.data.length%2&&t.put(wr.indexOf(this.data[n]),6)};var fl=me,gl=function(t){for(var n=[],i=t.length,r=0;r<i;r++){var o=t.charCodeAt(r);if(o>=55296&&o<=56319&&i>r+1){var a=t.charCodeAt(r+1);a>=56320&&a<=57343&&(o=(o-55296)*1024+a-56320+65536,r+=1)}if(o<128){n.push(o);continue}if(o<2048){n.push(o>>6|192),n.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){n.push(o>>12|224),n.push(o>>6&63|128),n.push(o&63|128);continue}if(o>=65536&&o<=1114111){n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const wl=gl,vl=Bt;function fe(e){this.mode=vl.BYTE,typeof e=="string"&&(e=wl(e)),this.data=new Uint8Array(e)}fe.getBitsLength=function(t){return t*8},fe.prototype.getLength=function(){return this.data.length},fe.prototype.getBitsLength=function(){return fe.getBitsLength(this.data.length)},fe.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)};var bl=fe;const yl=Bt,xl=gt;function ge(e){this.mode=yl.KANJI,this.data=e}ge.getBitsLength=function(t){return t*13},ge.prototype.getLength=function(){return this.data.length},ge.prototype.getBitsLength=function(){return ge.getBitsLength(this.data.length)},ge.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=xl.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
56
|
-
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var Cl=ge,Eo={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,i,r){var o={},a={};a[i]=0;var c=t.PriorityQueue.make();c.push(i,0);for(var h,p,f,v,w,b,I,C,M;!c.empty();){h=c.pop(),p=h.value,v=h.cost,w=n[p]||{};for(f in w)w.hasOwnProperty(f)&&(b=w[f],I=v+b,C=a[f],M=typeof a[f]>"u",(M||C>I)&&(a[f]=I,c.push(f,I),o[f]=p))}if(typeof r<"u"&&typeof a[r]>"u"){var E=["Could not find a path from ",i," to ",r,"."].join("");throw new Error(E)}return o},extract_shortest_path_from_predecessor_list:function(n,i){for(var r=[],o=i;o;)r.push(o),n[o],o=n[o];return r.reverse(),r},find_path:function(n,i,r){var o=t.single_source_shortest_paths(n,i,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(n){var i=t.PriorityQueue,r={},o;n=n||{};for(o in i)i.hasOwnProperty(o)&&(r[o]=i[o]);return r.queue=[],r.sorter=n.sorter||i.default_sorter,r},default_sorter:function(n,i){return n.cost-i.cost},push:function(n,i){var r={value:n,cost:i};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Eo),function(e){const t=Bt,n=pl,i=fl,r=bl,o=Cl,a=It,c=gt,h=Eo.exports;function p(E){return unescape(encodeURIComponent(E)).length}function f(E,k,$){const O=[];let P;for(;(P=E.exec($))!==null;)O.push({data:P[0],index:P.index,mode:k,length:P[0].length});return O}function v(E){const k=f(a.NUMERIC,t.NUMERIC,E),$=f(a.ALPHANUMERIC,t.ALPHANUMERIC,E);let O,P;return c.isKanjiModeEnabled()?(O=f(a.BYTE,t.BYTE,E),P=f(a.KANJI,t.KANJI,E)):(O=f(a.BYTE_KANJI,t.BYTE,E),P=[]),k.concat($,O,P).sort(function(G,V){return G.index-V.index}).map(function(G){return{data:G.data,mode:G.mode,length:G.length}})}function w(E,k){switch(k){case t.NUMERIC:return n.getBitsLength(E);case t.ALPHANUMERIC:return i.getBitsLength(E);case t.KANJI:return o.getBitsLength(E);case t.BYTE:return r.getBitsLength(E)}}function b(E){return E.reduce(function(k,$){const O=k.length-1>=0?k[k.length-1]:null;return O&&O.mode===$.mode?(k[k.length-1].data+=$.data,k):(k.push($),k)},[])}function I(E){const k=[];for(let $=0;$<E.length;$++){const O=E[$];switch(O.mode){case t.NUMERIC:k.push([O,{data:O.data,mode:t.ALPHANUMERIC,length:O.length},{data:O.data,mode:t.BYTE,length:O.length}]);break;case t.ALPHANUMERIC:k.push([O,{data:O.data,mode:t.BYTE,length:O.length}]);break;case t.KANJI:k.push([O,{data:O.data,mode:t.BYTE,length:p(O.data)}]);break;case t.BYTE:k.push([{data:O.data,mode:t.BYTE,length:p(O.data)}])}}return k}function C(E,k){const $={},O={start:{}};let P=["start"];for(let W=0;W<E.length;W++){const G=E[W],V=[];for(let R=0;R<G.length;R++){const _=G[R],S=""+W+R;V.push(S),$[S]={node:_,lastCount:0},O[S]={};for(let q=0;q<P.length;q++){const rt=P[q];$[rt]&&$[rt].node.mode===_.mode?(O[rt][S]=w($[rt].lastCount+_.length,_.mode)-w($[rt].lastCount,_.mode),$[rt].lastCount+=_.length):($[rt]&&($[rt].lastCount=_.length),O[rt][S]=w(_.length,_.mode)+4+t.getCharCountIndicator(_.mode,k))}}P=V}for(let W=0;W<P.length;W++)O[P[W]].end=0;return{map:O,table:$}}function M(E,k){let $;const O=t.getBestModeForData(E);if($=t.from(k,O),$!==t.BYTE&&$.bit<O.bit)throw new Error('"'+E+'" cannot be encoded with mode '+t.toString($)+`.
|
|
57
|
-
Suggested mode is: `+t.toString(O));switch($===t.KANJI&&!c.isKanjiModeEnabled()&&($=t.BYTE),$){case t.NUMERIC:return new n(E);case t.ALPHANUMERIC:return new i(E);case t.KANJI:return new o(E);case t.BYTE:return new r(E)}}e.fromArray=function(k){return k.reduce(function($,O){return typeof O=="string"?$.push(M(O,null)):O.data&&$.push(M(O.data,O.mode)),$},[])},e.fromString=function(k,$){const O=v(k,c.isKanjiModeEnabled()),P=I(O),W=C(P,$),G=h.find_path(W.map,"start","end"),V=[];for(let R=1;R<G.length-1;R++)V.push(W.table[G[R]].node);return e.fromArray(b(V))},e.rawSplit=function(k){return e.fromArray(v(k,c.isKanjiModeEnabled()))}}(Co);const Cn=gt,vr=gn,El=nl,Il=rl,$l=ho,Al=uo,br=mo,yr=wn,kl=ol,En=wo,Ol=bo,_l=Bt,xr=Co;function Ml(e,t){const n=e.size,i=Al.getPositions(t);for(let r=0;r<i.length;r++){const o=i[r][0],a=i[r][1];for(let c=-1;c<=7;c++)if(!(o+c<=-1||n<=o+c))for(let h=-1;h<=7;h++)a+h<=-1||n<=a+h||(c>=0&&c<=6&&(h===0||h===6)||h>=0&&h<=6&&(c===0||c===6)||c>=2&&c<=4&&h>=2&&h<=4?e.set(o+c,a+h,!0,!0):e.set(o+c,a+h,!1,!0))}}function Tl(e){const t=e.size;for(let n=8;n<t-8;n++){const i=n%2===0;e.set(n,6,i,!0),e.set(6,n,i,!0)}}function Bl(e,t){const n=$l.getPositions(t);for(let i=0;i<n.length;i++){const r=n[i][0],o=n[i][1];for(let a=-2;a<=2;a++)for(let c=-2;c<=2;c++)a===-2||a===2||c===-2||c===2||a===0&&c===0?e.set(r+a,o+c,!0,!0):e.set(r+a,o+c,!1,!0)}}function Pl(e,t){const n=e.size,i=En.getEncodedBits(t);let r,o,a;for(let c=0;c<18;c++)r=Math.floor(c/3),o=c%3+n-8-3,a=(i>>c&1)===1,e.set(r,o,a,!0),e.set(o,r,a,!0)}function Cr(e,t,n){const i=e.size,r=Ol.getEncodedBits(t,n);let o,a;for(o=0;o<15;o++)a=(r>>o&1)===1,o<6?e.set(o,8,a,!0):o<8?e.set(o+1,8,a,!0):e.set(i-15+o,8,a,!0),o<8?e.set(8,i-o-1,a,!0):o<9?e.set(8,15-o-1+1,a,!0):e.set(8,15-o-1,a,!0);e.set(i-8,8,1,!0)}function Sl(e,t){const n=e.size;let i=-1,r=n-1,o=7,a=0;for(let c=n-1;c>0;c-=2)for(c===6&&c--;;){for(let h=0;h<2;h++)if(!e.isReserved(r,c-h)){let p=!1;a<t.length&&(p=(t[a]>>>o&1)===1),e.set(r,c-h,p),o--,o===-1&&(a++,o=7)}if(r+=i,r<0||n<=r){r-=i,i=-i;break}}}function Ll(e,t,n){const i=new El;n.forEach(function(h){i.put(h.mode.bit,4),i.put(h.getLength(),_l.getCharCountIndicator(h.mode,e)),h.write(i)});const r=Cn.getSymbolTotalCodewords(e),o=yr.getTotalCodewordsCount(e,t),a=(r-o)*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const c=(a-i.getLengthInBits())/8;for(let h=0;h<c;h++)i.put(h%2?17:236,8);return Nl(i,e,t)}function Nl(e,t,n){const i=Cn.getSymbolTotalCodewords(t),r=yr.getTotalCodewordsCount(t,n),o=i-r,a=yr.getBlocksCount(t,n),c=i%a,h=a-c,p=Math.floor(i/a),f=Math.floor(o/a),v=f+1,w=p-f,b=new kl(w);let I=0;const C=new Array(a),M=new Array(a);let E=0;const k=new Uint8Array(e.buffer);for(let G=0;G<a;G++){const V=G<h?f:v;C[G]=k.slice(I,I+V),M[G]=b.encode(C[G]),I+=V,E=Math.max(E,V)}const $=new Uint8Array(i);let O=0,P,W;for(P=0;P<E;P++)for(W=0;W<a;W++)P<C[W].length&&($[O++]=C[W][P]);for(P=0;P<w;P++)for(W=0;W<a;W++)$[O++]=M[W][P];return $}function Rl(e,t,n,i){let r;if(Array.isArray(e))r=xr.fromArray(e);else if(typeof e=="string"){let p=t;if(!p){const f=xr.rawSplit(e);p=En.getBestVersionForData(f,n)}r=xr.fromString(e,p||40)}else throw new Error("Invalid data");const o=En.getBestVersionForData(r,n);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=o;else if(t<o)throw new Error(`
|
|
58
|
-
The chosen QR Code version cannot contain this amount of data.
|
|
59
|
-
Minimum version required to store current data is: `+o+`.
|
|
60
|
-
`);const a=Ll(t,n,r),c=Cn.getSymbolSize(t),h=new Il(c);return Ml(h,t),Tl(h),Bl(h,t),Cr(h,n,0),t>=7&&Pl(h,t),Sl(h,a),isNaN(i)&&(i=br.getBestMask(h,Cr.bind(null,h,n))),br.applyMask(i,h),Cr(h,n,i),{modules:h,version:t,errorCorrectionLevel:n,maskPattern:i,segments:r}}lo.create=function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let i=vr.M,r,o;return typeof n<"u"&&(i=vr.from(n.errorCorrectionLevel,vr.M),r=En.from(n.version),o=br.from(n.maskPattern),n.toSJISFunc&&Cn.setToSJISFunction(n.toSJISFunc)),Rl(t,r,i,o)};var Io={},Er={};(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let i=n.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+n);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(o){return[o,o]}))),i.length===6&&i.push("F","F");const r=parseInt(i.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+i.slice(0,6).join("")}}e.getOptions=function(i){i||(i={}),i.color||(i.color={});const r=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,o=i.width&&i.width>=21?i.width:void 0,a=i.scale||4;return{width:o,scale:o?4:a,margin:r,color:{dark:t(i.color.dark||"#000000ff"),light:t(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},e.getScale=function(i,r){return r.width&&r.width>=i+r.margin*2?r.width/(i+r.margin*2):r.scale},e.getImageWidth=function(i,r){const o=e.getScale(i,r);return Math.floor((i+r.margin*2)*o)},e.qrToImageData=function(i,r,o){const a=r.modules.size,c=r.modules.data,h=e.getScale(a,o),p=Math.floor((a+o.margin*2)*h),f=o.margin*h,v=[o.color.light,o.color.dark];for(let w=0;w<p;w++)for(let b=0;b<p;b++){let I=(w*p+b)*4,C=o.color.light;if(w>=f&&b>=f&&w<p-f&&b<p-f){const M=Math.floor((w-f)/h),E=Math.floor((b-f)/h);C=v[c[M*a+E]?1:0]}i[I++]=C.r,i[I++]=C.g,i[I++]=C.b,i[I]=C.a}}})(Er),function(e){const t=Er;function n(r,o,a){r.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=a,o.width=a,o.style.height=a+"px",o.style.width=a+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(o,a,c){let h=c,p=a;typeof h>"u"&&(!a||!a.getContext)&&(h=a,a=void 0),a||(p=i()),h=t.getOptions(h);const f=t.getImageWidth(o.modules.size,h),v=p.getContext("2d"),w=v.createImageData(f,f);return t.qrToImageData(w.data,o,h),n(v,p,f),v.putImageData(w,0,0),p},e.renderToDataURL=function(o,a,c){let h=c;typeof h>"u"&&(!a||!a.getContext)&&(h=a,a=void 0),h||(h={});const p=e.render(o,a,h),f=h.type||"image/png",v=h.rendererOpts||{};return p.toDataURL(f,v.quality)}}(Io);var $o={};const jl=Er;function Ao(e,t){const n=e.a/255,i=t+'="'+e.hex+'"';return n<1?i+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function Ir(e,t,n){let i=e+t;return typeof n<"u"&&(i+=" "+n),i}function Dl(e,t,n){let i="",r=0,o=!1,a=0;for(let c=0;c<e.length;c++){const h=Math.floor(c%t),p=Math.floor(c/t);!h&&!o&&(o=!0),e[c]?(a++,c>0&&h>0&&e[c-1]||(i+=o?Ir("M",h+n,.5+p+n):Ir("m",r,0),r=0,o=!1),h+1<t&&e[c+1]||(i+=Ir("h",a),a=0)):r++}return i}$o.render=function(t,n,i){const r=jl.getOptions(n),o=t.modules.size,a=t.modules.data,c=o+r.margin*2,h=r.color.light.a?"<path "+Ao(r.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",p="<path "+Ao(r.color.dark,"stroke")+' d="'+Dl(a,o,r.margin)+'"/>',f='viewBox="0 0 '+c+" "+c+'"',w='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+f+' shape-rendering="crispEdges">'+h+p+`</svg>
|
|
61
|
-
`;return typeof i=="function"&&i(null,w),w};const Ul=tl,$r=lo,ko=Io,Wl=$o;function Ar(e,t,n,i,r){const o=[].slice.call(arguments,1),a=o.length,c=typeof o[a-1]=="function";if(!c&&!Ul())throw new Error("Callback required as last argument");if(c){if(a<2)throw new Error("Too few arguments provided");a===2?(r=n,n=t,t=i=void 0):a===3&&(t.getContext&&typeof r>"u"?(r=i,i=void 0):(r=i,i=n,n=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(n=t,t=i=void 0):a===2&&!t.getContext&&(i=n,n=t,t=void 0),new Promise(function(h,p){try{const f=$r.create(n,i);h(e(f,t,i))}catch(f){p(f)}})}try{const h=$r.create(n,i);r(null,e(h,t,i))}catch(h){r(h)}}Te.create=$r.create,Te.toCanvas=Ar.bind(null,ko.render),Te.toDataURL=Ar.bind(null,ko.renderToDataURL),Te.toString=Ar.bind(null,function(e,t,n){return Wl.render(e,n)});var Fl=Object.defineProperty,Oo=Object.getOwnPropertySymbols,Hl=Object.prototype.hasOwnProperty,Vl=Object.prototype.propertyIsEnumerable,_o=(e,t,n)=>t in e?Fl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,In=(e,t)=>{for(var n in t||(t={}))Hl.call(t,n)&&_o(e,n,t[n]);if(Oo)for(var n of Oo(t))Vl.call(t,n)&&_o(e,n,t[n]);return e};function zl(){var e;const t=(e=Ot.state.themeMode)!=null?e:"dark",n={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[t];return{"--w3m-color-fg-1":n.foreground[1],"--w3m-color-fg-2":n.foreground[2],"--w3m-color-fg-3":n.foreground[3],"--w3m-color-bg-1":n.background[1],"--w3m-color-bg-2":n.background[2],"--w3m-color-bg-3":n.background[3],"--w3m-color-overlay":n.overlay}}function Zl(){return{"--w3m-accent-color":"#3396FF","--w3m-accent-fill-color":"#FFFFFF","--w3m-z-index":"89","--w3m-background-color":"#3396FF","--w3m-background-border-radius":"8px","--w3m-container-border-radius":"30px","--w3m-wallet-icon-border-radius":"15px","--w3m-input-border-radius":"28px","--w3m-button-border-radius":"10px","--w3m-notification-border-radius":"36px","--w3m-secondary-button-border-radius":"28px","--w3m-icon-button-border-radius":"50%","--w3m-button-hover-highlight-border-radius":"10px","--w3m-text-big-bold-size":"20px","--w3m-text-big-bold-weight":"600","--w3m-text-big-bold-line-height":"24px","--w3m-text-big-bold-letter-spacing":"-0.03em","--w3m-text-big-bold-text-transform":"none","--w3m-text-xsmall-bold-size":"10px","--w3m-text-xsmall-bold-weight":"700","--w3m-text-xsmall-bold-line-height":"12px","--w3m-text-xsmall-bold-letter-spacing":"0.02em","--w3m-text-xsmall-bold-text-transform":"uppercase","--w3m-text-xsmall-regular-size":"12px","--w3m-text-xsmall-regular-weight":"600","--w3m-text-xsmall-regular-line-height":"14px","--w3m-text-xsmall-regular-letter-spacing":"-0.03em","--w3m-text-xsmall-regular-text-transform":"none","--w3m-text-small-thin-size":"14px","--w3m-text-small-thin-weight":"500","--w3m-text-small-thin-line-height":"16px","--w3m-text-small-thin-letter-spacing":"-0.03em","--w3m-text-small-thin-text-transform":"none","--w3m-text-small-regular-size":"14px","--w3m-text-small-regular-weight":"600","--w3m-text-small-regular-line-height":"16px","--w3m-text-small-regular-letter-spacing":"-0.03em","--w3m-text-small-regular-text-transform":"none","--w3m-text-medium-regular-size":"16px","--w3m-text-medium-regular-weight":"600","--w3m-text-medium-regular-line-height":"20px","--w3m-text-medium-regular-letter-spacing":"-0.03em","--w3m-text-medium-regular-text-transform":"none","--w3m-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--w3m-success-color":"rgb(38,181,98)","--w3m-error-color":"rgb(242, 90, 103)"}}function Gl(){const{themeVariables:e}=Ot.state;return{"--w3m-background-image-url":e!=null&&e["--w3m-background-image-url"]?`url(${e["--w3m-background-image-url"]})`:"none"}}const N={setTheme(){const e=document.querySelector(":root"),{themeVariables:t}=Ot.state;if(e){const n=In(In(In(In({},zl()),Zl()),t),Gl());Object.entries(n).forEach(([i,r])=>e.style.setProperty(i,r))}},globalCss:D`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent}button::after{content:'';position:absolute;inset:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button w3m-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--w3m-accent-fill-color);background:var(--w3m-accent-color)}`},Kl=D`button{display:flex;border-radius:var(--w3m-button-hover-highlight-border-radius);flex-direction:column;transition:background-color .2s ease;justify-content:center;padding:5px;width:100px}button:hover{background-color:var(--w3m-color-overlay)}button>div{display:flex;justify-content:center;align-items:center;width:32px;height:32px;box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);background-color:var(--w3m-accent-color);border-radius:var(--w3m-icon-button-border-radius);margin-bottom:4px}button path{fill:var(--w3m-accent-fill-color)}`;var ql=Object.defineProperty,Yl=Object.getOwnPropertyDescriptor,$n=(e,t,n,i)=>{for(var r=i>1?void 0:i?Yl(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&ql(t,n,r),r};let we=class extends B{constructor(){super(...arguments),this.icon=void 0,this.label="",this.onClick=()=>null}render(){return y`<button @click="${this.onClick}"><div>${this.icon}</div><w3m-text variant="xsmall-regular" color="accent">${this.label}</w3m-text></button>`}};we.styles=[N.globalCss,Kl],$n([j()],we.prototype,"icon",2),$n([j()],we.prototype,"label",2),$n([j()],we.prototype,"onClick",2),we=$n([L("w3m-box-button")],we);const Jl=D`button{border-radius:var(--w3m-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--w3m-accent-color)}button path{fill:var(--w3m-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--w3m-color-overlay)}button:disabled::after{background-color:transparent}.w3m-icon-left svg{margin-right:5px}.w3m-icon-right svg{margin-left:5px}button:hover::after{background-color:var(--w3m-color-overlay)}button:disabled{background-color:var(--w3m-color-bg-3)}`;var Ql=Object.defineProperty,Xl=Object.getOwnPropertyDescriptor,Le=(e,t,n,i)=>{for(var r=i>1?void 0:i?Xl(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&Ql(t,n,r),r};let Ft=class extends B{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null}render(){const e={"w3m-icon-left":this.iconLeft!==void 0,"w3m-icon-right":this.iconRight!==void 0};return y`<button class="${pt(e)}" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<w3m-text variant="small-regular" color="inverse"><slot></slot></w3m-text>${this.iconRight}</button>`}};Ft.styles=[N.globalCss,Jl],Le([j()],Ft.prototype,"disabled",2),Le([j()],Ft.prototype,"iconLeft",2),Le([j()],Ft.prototype,"iconRight",2),Le([j()],Ft.prototype,"onClick",2),Ft=Le([L("w3m-button")],Ft);const t0=D`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--w3m-button-border-radius);color:var(--w3m-accent-fill-color);background-color:var(--w3m-accent-color)}button::after{content:'';inset:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--w3m-color-overlay)}button:hover::after{background-color:var(--w3m-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--w3m-color-bg-3);color:var(--w3m-color-fg-3)}.w3m-secondary{color:var(--w3m-accent-color);background-color:transparent}.w3m-secondary::after{display:none}`;var e0=Object.defineProperty,n0=Object.getOwnPropertyDescriptor,kr=(e,t,n,i)=>{for(var r=i>1?void 0:i?n0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&e0(t,n,r),r};let Ne=class extends B{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const e={"w3m-secondary":this.variant==="secondary"};return y`<button ?disabled="${this.disabled}" class="${pt(e)}"><slot></slot></button>`}};Ne.styles=[N.globalCss,t0],kr([j()],Ne.prototype,"disabled",2),kr([j()],Ne.prototype,"variant",2),Ne=kr([L("w3m-button-big")],Ne);const U={CROSS_ICON:Z`<svg width="12" height="12" viewBox="0 0 12 12"><path d="M9.94 11A.75.75 0 1 0 11 9.94L7.414 6.353a.5.5 0 0 1 0-.708L11 2.061A.75.75 0 1 0 9.94 1L6.353 4.586a.5.5 0 0 1-.708 0L2.061 1A.75.75 0 0 0 1 2.06l3.586 3.586a.5.5 0 0 1 0 .708L1 9.939A.75.75 0 1 0 2.06 11l3.586-3.586a.5.5 0 0 1 .708 0L9.939 11Z" fill="#fff"/></svg>`,WALLET_CONNECT_LOGO:Z`<svg width="178" height="29" viewBox="0 0 178 29" id="w3m-wc-logo"><path d="M10.683 7.926c5.284-5.17 13.85-5.17 19.134 0l.636.623a.652.652 0 0 1 0 .936l-2.176 2.129a.343.343 0 0 1-.478 0l-.875-.857c-3.686-3.607-9.662-3.607-13.348 0l-.937.918a.343.343 0 0 1-.479 0l-2.175-2.13a.652.652 0 0 1 0-.936l.698-.683Zm23.633 4.403 1.935 1.895a.652.652 0 0 1 0 .936l-8.73 8.543a.687.687 0 0 1-.956 0L20.37 17.64a.172.172 0 0 0-.239 0l-6.195 6.063a.687.687 0 0 1-.957 0l-8.73-8.543a.652.652 0 0 1 0-.936l1.936-1.895a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .239 0l6.195-6.064a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .24 0l6.195-6.064a.687.687 0 0 1 .956 0ZM48.093 20.948l2.338-9.355c.139-.515.258-1.07.416-1.942.12.872.258 1.427.357 1.942l2.022 9.355h4.181l3.528-13.874h-3.21l-1.943 8.523a24.825 24.825 0 0 0-.456 2.457c-.158-.931-.317-1.625-.495-2.438l-1.883-8.542h-4.201l-2.042 8.542a41.204 41.204 0 0 0-.475 2.438 41.208 41.208 0 0 0-.476-2.438l-1.903-8.542h-3.349l3.508 13.874h4.083ZM63.33 21.304c1.585 0 2.596-.654 3.11-1.605-.059.297-.078.595-.078.892v.357h2.655V15.22c0-2.735-1.248-4.32-4.3-4.32-2.636 0-4.36 1.466-4.52 3.487h2.914c.1-.891.734-1.426 1.705-1.426.911 0 1.407.515 1.407 1.11 0 .435-.258.693-1.03.792l-1.388.159c-2.061.257-3.825 1.01-3.825 3.19 0 1.982 1.645 3.092 3.35 3.092Zm.891-2.041c-.773 0-1.348-.436-1.348-1.19 0-.733.655-1.09 1.645-1.268l.674-.119c.575-.118.892-.218 1.09-.396v.912c0 1.228-.892 2.06-2.06 2.06ZM70.398 7.074v13.874h2.874V7.074h-2.874ZM74.934 7.074v13.874h2.874V7.074h-2.874ZM84.08 21.304c2.735 0 4.5-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922H81.92ZM94.92 21.146c.633 0 1.248-.1 1.525-.179v-2.18c-.218.04-.475.06-.693.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.338v-2.24h-2.338V7.788H91.47v3.448H89.37v2.24h2.1v4.201c0 2.3 1.15 3.469 3.45 3.469ZM104.62 21.304c3.924 0 6.302-2.299 6.599-5.608h-3.111c-.238 1.803-1.506 3.032-3.369 3.032-2.2 0-3.746-1.784-3.746-4.796 0-2.953 1.605-4.638 3.805-4.638 1.883 0 2.953 1.15 3.171 2.834h3.191c-.317-3.448-2.854-5.41-6.342-5.41-3.984 0-7.036 2.695-7.036 7.214 0 4.677 2.676 7.372 6.838 7.372ZM117.449 21.304c2.993 0 5.114-1.882 5.114-5.172 0-3.23-2.121-5.233-5.114-5.233-2.972 0-5.093 2.002-5.093 5.233 0 3.29 2.101 5.172 5.093 5.172Zm0-2.22c-1.327 0-2.18-1.09-2.18-2.952 0-1.903.892-2.973 2.18-2.973 1.308 0 2.2 1.07 2.2 2.973 0 1.862-.872 2.953-2.2 2.953ZM126.569 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.229-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM137.464 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.228-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM149.949 21.304c2.735 0 4.499-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922h-3.984ZM160.876 21.304c3.013 0 4.658-1.645 4.975-4.201h-2.874c-.099 1.07-.713 1.982-2.001 1.982-1.309 0-2.2-1.21-2.2-2.993 0-1.942 1.03-2.933 2.259-2.933 1.209 0 1.803.872 1.883 1.882h2.873c-.218-2.358-1.823-4.142-4.776-4.142-2.874 0-5.153 1.903-5.153 5.193 0 3.25 1.923 5.212 5.014 5.212ZM172.067 21.146c.634 0 1.248-.1 1.526-.179v-2.18c-.218.04-.476.06-.694.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.339v-2.24h-2.339V7.788h-2.854v3.448h-2.1v2.24h2.1v4.201c0 2.3 1.15 3.469 3.449 3.469Z" fill="#fff"/></svg>`,WALLET_CONNECT_ICON:Z`<svg width="28" height="20" viewBox="0 0 28 20"><g clip-path="url(#a)"><path d="M7.386 6.482c3.653-3.576 9.575-3.576 13.228 0l.44.43a.451.451 0 0 1 0 .648L19.55 9.033a.237.237 0 0 1-.33 0l-.606-.592c-2.548-2.496-6.68-2.496-9.228 0l-.648.634a.237.237 0 0 1-.33 0L6.902 7.602a.451.451 0 0 1 0-.647l.483-.473Zm16.338 3.046 1.339 1.31a.451.451 0 0 1 0 .648l-6.035 5.909a.475.475 0 0 1-.662 0L14.083 13.2a.119.119 0 0 0-.166 0l-4.283 4.194a.475.475 0 0 1-.662 0l-6.035-5.91a.451.451 0 0 1 0-.647l1.338-1.31a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0Z" fill="#000000"/></g><defs><clipPath id="a"><path fill="#ffffff" d="M0 0h28v20H0z"/></clipPath></defs></svg>`,WALLET_CONNECT_ICON_COLORED:Z`<svg width="96" height="96" fill="none"><path fill="#fff" d="M25.322 33.597c12.525-12.263 32.83-12.263 45.355 0l1.507 1.476a1.547 1.547 0 0 1 0 2.22l-5.156 5.048a.814.814 0 0 1-1.134 0l-2.074-2.03c-8.737-8.555-22.903-8.555-31.64 0l-2.222 2.175a.814.814 0 0 1-1.134 0l-5.156-5.049a1.547 1.547 0 0 1 0-2.22l1.654-1.62Zm56.019 10.44 4.589 4.494a1.547 1.547 0 0 1 0 2.22l-20.693 20.26a1.628 1.628 0 0 1-2.267 0L48.283 56.632a.407.407 0 0 0-.567 0L33.03 71.012a1.628 1.628 0 0 1-2.268 0L10.07 50.75a1.547 1.547 0 0 1 0-2.22l4.59-4.494a1.628 1.628 0 0 1 2.267 0l14.687 14.38c.156.153.41.153.567 0l14.685-14.38a1.628 1.628 0 0 1 2.268 0l14.687 14.38c.156.153.41.153.567 0l14.686-14.38a1.628 1.628 0 0 1 2.268 0Z"/><path stroke="#000" d="M25.672 33.954c12.33-12.072 32.325-12.072 44.655 0l1.508 1.476a1.047 1.047 0 0 1 0 1.506l-5.157 5.048a.314.314 0 0 1-.434 0l-2.074-2.03c-8.932-8.746-23.409-8.746-32.34 0l-2.222 2.174a.314.314 0 0 1-.434 0l-5.157-5.048a1.047 1.047 0 0 1 0-1.506l1.655-1.62Zm55.319 10.44 4.59 4.494a1.047 1.047 0 0 1 0 1.506l-20.694 20.26a1.128 1.128 0 0 1-1.568 0l-14.686-14.38a.907.907 0 0 0-1.267 0L32.68 70.655a1.128 1.128 0 0 1-1.568 0L10.42 50.394a1.047 1.047 0 0 1 0-1.506l4.59-4.493a1.128 1.128 0 0 1 1.567 0l14.687 14.379a.907.907 0 0 0 1.266 0l-.35-.357.35.357 14.686-14.38a1.128 1.128 0 0 1 1.568 0l14.687 14.38a.907.907 0 0 0 1.267 0l14.686-14.38a1.128 1.128 0 0 1 1.568 0Z"/></svg>`,BACK_ICON:Z`<svg width="10" height="18" viewBox="0 0 10 18"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.735.179a.75.75 0 0 1 .087 1.057L2.92 8.192a1.25 1.25 0 0 0 0 1.617l5.902 6.956a.75.75 0 1 1-1.144.97L1.776 10.78a2.75 2.75 0 0 1 0-3.559L7.678.265A.75.75 0 0 1 8.735.18Z" fill="#fff"/></svg>`,COPY_ICON:Z`<svg width="24" height="24" fill="none"><path fill="#fff" fill-rule="evenodd" d="M7.01 7.01c.03-1.545.138-2.5.535-3.28A5 5 0 0 1 9.73 1.545C10.8 1 12.2 1 15 1c2.8 0 4.2 0 5.27.545a5 5 0 0 1 2.185 2.185C23 4.8 23 6.2 23 9c0 2.8 0 4.2-.545 5.27a5 5 0 0 1-2.185 2.185c-.78.397-1.735.505-3.28.534l-.001.01c-.03 1.54-.138 2.493-.534 3.27a5 5 0 0 1-2.185 2.186C13.2 23 11.8 23 9 23c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C1 19.2 1 17.8 1 15c0-2.8 0-4.2.545-5.27A5 5 0 0 1 3.73 7.545C4.508 7.149 5.46 7.04 7 7.01h.01ZM15 15.5c-1.425 0-2.403-.001-3.162-.063-.74-.06-1.139-.172-1.427-.319a3.5 3.5 0 0 1-1.53-1.529c-.146-.288-.257-.686-.318-1.427C8.501 11.403 8.5 10.425 8.5 9c0-1.425.001-2.403.063-3.162.06-.74.172-1.139.318-1.427a3.5 3.5 0 0 1 1.53-1.53c.288-.146.686-.257 1.427-.318.759-.062 1.737-.063 3.162-.063 1.425 0 2.403.001 3.162.063.74.06 1.139.172 1.427.318a3.5 3.5 0 0 1 1.53 1.53c.146.288.257.686.318 1.427.062.759.063 1.737.063 3.162 0 1.425-.001 2.403-.063 3.162-.06.74-.172 1.139-.319 1.427a3.5 3.5 0 0 1-1.529 1.53c-.288.146-.686.257-1.427.318-.759.062-1.737.063-3.162.063ZM7 8.511c-.444.009-.825.025-1.162.052-.74.06-1.139.172-1.427.318a3.5 3.5 0 0 0-1.53 1.53c-.146.288-.257.686-.318 1.427-.062.759-.063 1.737-.063 3.162 0 1.425.001 2.403.063 3.162.06.74.172 1.139.318 1.427a3.5 3.5 0 0 0 1.53 1.53c.288.146.686.257 1.427.318.759.062 1.737.063 3.162.063 1.425 0 2.403-.001 3.162-.063.74-.06 1.139-.172 1.427-.319a3.5 3.5 0 0 0 1.53-1.53c.146-.287.257-.685.318-1.426.027-.337.043-.718.052-1.162H15c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C7 13.2 7 11.8 7 9v-.489Z" clip-rule="evenodd"/></svg>`,RETRY_ICON:Z`<svg width="15" height="16" viewBox="0 0 15 16"><path d="M6.464 2.03A.75.75 0 0 0 5.403.97L2.08 4.293a1 1 0 0 0 0 1.414L5.403 9.03a.75.75 0 0 0 1.06-1.06L4.672 6.177a.25.25 0 0 1 .177-.427h2.085a4 4 0 1 1-3.93 4.746c-.077-.407-.405-.746-.82-.746-.414 0-.755.338-.7.748a5.501 5.501 0 1 0 5.45-6.248H4.848a.25.25 0 0 1-.177-.427L6.464 2.03Z" fill="#fff"/></svg>`,DESKTOP_ICON:Z`<svg width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 5.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C2.204 1 3.13 1 4.98 1h6.04c1.85 0 2.775 0 3.466.394a3 3 0 0 1 1.12 1.12C16 3.204 16 4.13 16 5.98v1.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C13.796 12 12.87 12 11.02 12H4.98c-1.85 0-2.775 0-3.466-.394a3 3 0 0 1-1.12-1.12C0 9.796 0 8.87 0 7.02V5.98ZM4.98 2.5h6.04c.953 0 1.568.001 2.034.043.446.04.608.108.69.154a1.5 1.5 0 0 1 .559.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033v1.04c0 .952-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.046-.243.114-.69.154-.466.042-1.08.043-2.033.043H4.98c-.952 0-1.568-.001-2.034-.043-.446-.04-.608-.108-.69-.154a1.5 1.5 0 0 1-.559-.56c-.046-.08-.114-.243-.154-.69-.042-.465-.043-1.08-.043-2.033V5.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.046.243-.114.69-.154.465-.042 1.08-.043 2.033-.043Z" fill="#fff"/><path d="M4 14.25a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,MOBILE_ICON:Z`<svg width="16" height="16" viewBox="0 0 16 16"><path d="M6.75 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 4.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C5.204 0 6.136 0 8 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C13 2.204 13 3.13 13 4.98v6.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C10.796 16 9.864 16 8 16s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C3 13.796 3 12.87 3 11.02V4.98Zm8.5 0v6.04c0 .953-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.046-.08-.114-.243-.154-.69-.042-.466-.043-1.08-.043-2.033V4.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.045.243-.113.693-.154C6.42 1.501 7.041 1.5 8 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033Z" fill="#fff"/></svg>`,ARROW_DOWN_ICON:Z`<svg width="14" height="14" viewBox="0 0 14 14"><path d="M2.28 7.47a.75.75 0 0 0-1.06 1.06l5.25 5.25a.75.75 0 0 0 1.06 0l5.25-5.25a.75.75 0 0 0-1.06-1.06l-3.544 3.543a.25.25 0 0 1-.426-.177V.75a.75.75 0 0 0-1.5 0v10.086a.25.25 0 0 1-.427.176L2.28 7.47Z" fill="#fff"/></svg>`,ARROW_UP_RIGHT_ICON:Z`<svg width="15" height="14" fill="none"><path d="M4.5 1.75A.75.75 0 0 1 5.25 1H12a1.5 1.5 0 0 1 1.5 1.5v6.75a.75.75 0 0 1-1.5 0V4.164a.25.25 0 0 0-.427-.176L4.061 11.5A.75.75 0 0 1 3 10.44l7.513-7.513a.25.25 0 0 0-.177-.427H5.25a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`,ARROW_RIGHT_ICON:Z`<svg width="6" height="14" viewBox="0 0 6 14"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.181 1.099a.75.75 0 0 1 1.024.279l2.433 4.258a2.75 2.75 0 0 1 0 2.729l-2.433 4.257a.75.75 0 1 1-1.303-.744L4.335 7.62a1.25 1.25 0 0 0 0-1.24L1.902 2.122a.75.75 0 0 1 .28-1.023Z" fill="#fff"/></svg>`,QRCODE_ICON:Z`<svg width="25" height="24" viewBox="0 0 25 24"><path d="M23.748 9a.748.748 0 0 0 .748-.752c-.018-2.596-.128-4.07-.784-5.22a6 6 0 0 0-2.24-2.24c-1.15-.656-2.624-.766-5.22-.784a.748.748 0 0 0-.752.748c0 .414.335.749.748.752 1.015.007 1.82.028 2.494.088.995.09 1.561.256 1.988.5.7.398 1.28.978 1.679 1.678.243.427.41.993.498 1.988.061.675.082 1.479.09 2.493a.753.753 0 0 0 .75.749ZM3.527.788C4.677.132 6.152.022 8.747.004A.748.748 0 0 1 9.5.752a.753.753 0 0 1-.749.752c-1.014.007-1.818.028-2.493.088-.995.09-1.561.256-1.988.5-.7.398-1.28.978-1.679 1.678-.243.427-.41.993-.499 1.988-.06.675-.081 1.479-.088 2.493A.753.753 0 0 1 1.252 9a.748.748 0 0 1-.748-.752c.018-2.596.128-4.07.784-5.22a6 6 0 0 1 2.24-2.24ZM1.252 15a.748.748 0 0 0-.748.752c.018 2.596.128 4.07.784 5.22a6 6 0 0 0 2.24 2.24c1.15.656 2.624.766 5.22.784a.748.748 0 0 0 .752-.748.753.753 0 0 0-.749-.752c-1.014-.007-1.818-.028-2.493-.089-.995-.089-1.561-.255-1.988-.498a4.5 4.5 0 0 1-1.679-1.68c-.243-.426-.41-.992-.499-1.987-.06-.675-.081-1.479-.088-2.493A.753.753 0 0 0 1.252 15ZM22.996 15.749a.753.753 0 0 1 .752-.749c.415 0 .751.338.748.752-.018 2.596-.128 4.07-.784 5.22a6 6 0 0 1-2.24 2.24c-1.15.656-2.624.766-5.22.784a.748.748 0 0 1-.752-.748c0-.414.335-.749.748-.752 1.015-.007 1.82-.028 2.494-.089.995-.089 1.561-.255 1.988-.498a4.5 4.5 0 0 0 1.679-1.68c.243-.426.41-.992.498-1.987.061-.675.082-1.479.09-2.493Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 11h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 4H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1ZM13.5 6.5A2.5 2.5 0 0 1 16 4h2a2.5 2.5 0 0 1 2.5 2.5v2A2.5 2.5 0 0 1 18 11h-2a2.5 2.5 0 0 1-2.5-2.5v-2Zm2.5-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1ZM7 13a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 20h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 13H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1Z" fill="#fff"/><path d="M13.5 15.5c0-.465 0-.697.038-.89a2 2 0 0 1 1.572-1.572C15.303 13 15.535 13 16 13v2.5h-2.5ZM18 13c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89H18V13ZM18 17.5h2.5c0 .465 0 .697-.038.89a2 2 0 0 1-1.572 1.572C18.697 20 18.465 20 18 20v-2.5ZM13.5 17.5H16V20c-.465 0-.697 0-.89-.038a2 2 0 0 1-1.572-1.572c-.038-.193-.038-.425-.038-.89Z" fill="#fff"/></svg>`,SCAN_ICON:Z`<svg width="16" height="16" fill="none"><path fill="#fff" d="M10 15.216c0 .422.347.763.768.74 1.202-.064 2.025-.222 2.71-.613a5.001 5.001 0 0 0 1.865-1.866c.39-.684.549-1.507.613-2.709a.735.735 0 0 0-.74-.768.768.768 0 0 0-.76.732c-.009.157-.02.306-.032.447-.073.812-.206 1.244-.384 1.555-.31.545-.761.996-1.306 1.306-.311.178-.743.311-1.555.384-.141.013-.29.023-.447.032a.768.768 0 0 0-.732.76ZM10 .784c0 .407.325.737.732.76.157.009.306.02.447.032.812.073 1.244.206 1.555.384a3.5 3.5 0 0 1 1.306 1.306c.178.311.311.743.384 1.555.013.142.023.29.032.447a.768.768 0 0 0 .76.732.734.734 0 0 0 .74-.768c-.064-1.202-.222-2.025-.613-2.71A5 5 0 0 0 13.477.658c-.684-.39-1.507-.549-2.709-.613a.735.735 0 0 0-.768.74ZM5.232.044A.735.735 0 0 1 6 .784a.768.768 0 0 1-.732.76c-.157.009-.305.02-.447.032-.812.073-1.244.206-1.555.384A3.5 3.5 0 0 0 1.96 3.266c-.178.311-.311.743-.384 1.555-.013.142-.023.29-.032.447A.768.768 0 0 1 .784 6a.735.735 0 0 1-.74-.768c.064-1.202.222-2.025.613-2.71A5 5 0 0 1 2.523.658C3.207.267 4.03.108 5.233.044ZM5.268 14.456a.768.768 0 0 1 .732.76.734.734 0 0 1-.768.74c-1.202-.064-2.025-.222-2.71-.613a5 5 0 0 1-1.865-1.866c-.39-.684-.549-1.507-.613-2.709A.735.735 0 0 1 .784 10c.407 0 .737.325.76.732.009.157.02.306.032.447.073.812.206 1.244.384 1.555a3.5 3.5 0 0 0 1.306 1.306c.311.178.743.311 1.555.384.142.013.29.023.447.032Z"/></svg>`,CHECKMARK_ICON:Z`<svg width="13" height="12" viewBox="0 0 13 12"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.155.132a.75.75 0 0 1 .232 1.035L5.821 11.535a1 1 0 0 1-1.626.09L.665 7.21a.75.75 0 1 1 1.17-.937L4.71 9.867a.25.25 0 0 0 .406-.023L11.12.364a.75.75 0 0 1 1.035-.232Z" fill="#fff"/></svg>`,HELP_ETH_IMG:Z`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#j)"><rect width="60" height="60" rx="30" fill="#987DE8"/><path fill-rule="evenodd" clip-rule="evenodd" d="m15.48 28.367 11.966-19.3c1.174-1.892 3.927-1.892 5.1 0l11.97 19.306a6 6 0 0 1 .9 3.142v.028a6 6 0 0 1-1.154 3.56L33.227 50.208c-1.599 2.188-4.864 2.188-6.461 0L15.733 35.095a6 6 0 0 1-1.154-3.538v-.029a6 6 0 0 1 .9-3.161Z" fill="#fff"/><path d="M30.84 10.112a.992.992 0 0 0-.844-.464V24.5l12.598 5.53c.081-.466-.001-.963-.27-1.398L30.84 10.112Z" fill="#643CDD"/><path d="M29.996 9.648a.991.991 0 0 0-.845.465l-11.489 18.53a1.991 1.991 0 0 0-.264 1.387l12.598-5.53V9.648Z" fill="#BDADEB"/><path d="M29.996 50.544a.994.994 0 0 0 .808-.41l11.235-15.38c.307-.434-.193-.988-.658-.72L31.49 39.71a2.998 2.998 0 0 1-1.494.398v10.437Z" fill="#643CDD"/><path d="M17.966 34.762 29.19 50.134c.2.274.503.41.807.41V40.108a2.998 2.998 0 0 1-1.493-.398l-9.884-5.676c-.468-.27-.971.292-.653.728Z" fill="#BDADEB"/><path d="M42.594 30.03 29.996 24.5v13.138a3 3 0 0 0 1.495-.399l10.149-5.83c.525-.31.856-.823.954-1.38Z" fill="#401AB3"/><path d="M29.996 37.638V24.462l-12.598 5.566c.098.564.437 1.083.974 1.392l10.13 5.82c.462.265.978.398 1.494.398Z" fill="#7C5AE2"/></g><rect class="help-img-highlight" x=".5" y=".5" width="59" height="59" rx="29.5"/><defs><clipPath id="j"><rect width="60" height="60" rx="30" fill="#fff"/></clipPath></defs></svg>`,HELP_PAINTING_IMG:Z`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#k)"><rect width="60" height="60" rx="3" fill="#C653C6"/><path d="M52.094 47.344c0-4.246-1.436-9.557-5.885-12.4a2.876 2.876 0 0 0-1.615-3.891v-.819a4.037 4.037 0 0 0-1.34-3.007 4.75 4.75 0 0 0-2.41-6.252v-5.506c0-6.248-5.065-11.313-11.313-11.313-6.247 0-11.312 5.065-11.312 11.313v2.152a3.343 3.343 0 0 0-1.18 5.045 4.738 4.738 0 0 0-1.633 3.584 4.73 4.73 0 0 0 .956 2.858 5.218 5.218 0 0 0-2.358 6.815c-3.06 4.129-6.098 8.298-6.098 15.64 0 2.668.364 4.856.731 6.385.184.765.368 1.366.509 1.78a12.721 12.721 0 0 0 .225.611l.015.037.005.011.001.004v.002h.001l.92-.393-.92.394.26.606h38.26l.291-.49-.86-.51.86.51v-.001l.002-.002.002-.005.01-.017.035-.06.127-.225c.108-.195.26-.477.441-.835.363-.714.845-1.732 1.328-2.953.959-2.427 1.945-5.725 1.945-9.068Z" fill="#E87DE8" stroke="#fff" stroke-width="2"/><path fill-rule="evenodd" clip-rule="evenodd" d="M26.5 29.5c-3-.5-5.5-3-5.503-7l.002-7c0-.466 0-.698.026-.893a3 3 0 0 1 2.582-2.582c.195-.026.428-.026.893-.026 2 0 2.5-2.5 2.5-2.5s0 2.5 2.5 2.5c1.398 0 2.097 0 2.648.229a3 3 0 0 1 1.624 1.623c.228.552.228 1.25.228 2.649v6c0 4-3 7-6.5 7 1.35.23 4 0 6.5-2v9.53C34 38.5 31.495 40 28 40s-6-1.5-6-2.97L24 34l2.5 1.5v-6ZM26 47h4.5c2.5 0 3 4 3 5.5h-3l-1-1.5H26v-4Zm-6.25 5.5H24V57h-8c0-1 1-4.5 3.75-4.5Z" fill="#fff"/></g><rect class="help-img-highlight" x=".5" y=".5" width="59" height="59" rx="2.5"/><defs><clipPath id="k"><rect width="60" height="60" rx="3" fill="#fff"/></clipPath></defs></svg>`,HELP_CHART_IMG:Z`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#l)"><path d="M0 25.01C0 15.76 0 11.133 1.97 7.678a15 15 0 0 1 5.598-5.597C11.023.11 15.648.11 24.9.11h10.2c9.251 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.597C60 11.133 60 15.758 60 25.01v10.2c0 9.252 0 13.877-1.97 17.332a15 15 0 0 1-5.598 5.598c-3.455 1.97-8.08 1.97-17.332 1.97H24.9c-9.251 0-13.877 0-17.332-1.97a14.999 14.999 0 0 1-5.597-5.598C0 49.087 0 44.462 0 35.21v-10.2Z" fill="#1DC956"/><path d="M.5 25.01c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.289a14.5 14.5 0 0 1 5.412-5.41c1.639-.936 3.579-1.418 6.289-1.661C16.822.61 20.265.61 24.9.61h10.2c4.635 0 8.078 0 10.795.245 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.579 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.795-.244 2.71-.726 4.65-1.66 6.29a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.412C1.47 50.655.988 48.716.745 46.005.5 43.288.5 39.845.5 35.21v-10.2Z" stroke="#fff" stroke-opacity=".1"/><path d="M16.109 60c-3.833-.179-6.41-.645-8.541-1.86a15 15 0 0 1-5.598-5.598C.553 50.057.155 46.967.043 41.985l4.146-1.382a4 4 0 0 0 2.48-2.39l4.654-12.409a2 2 0 0 1 2.505-1.195l2.526.842a2 2 0 0 0 2.422-1.003l2.968-5.938c.81-1.62 3.185-1.415 3.705.32l3.774 12.581a2 2 0 0 0 3.025 1.09l3.342-2.228c.27-.18.49-.422.646-.706l5.297-9.712a2 2 0 0 1 1.428-1.016l4.134-.689a2 2 0 0 1 1.61.437l3.892 3.243a2 2 0 0 0 2.694-.122l4.633-4.632C60 19.28 60 21.88 60 25.01v10.2c0 9.252 0 13.877-1.97 17.332a14.998 14.998 0 0 1-5.598 5.598c-2.131 1.215-4.708 1.681-8.54 1.86H16.108Z" fill="#2BEE6C"/><path d="M.072 43.03a112.37 112.37 0 0 1-.048-2.093l3.85-1.283a3 3 0 0 0 1.86-1.793l4.653-12.408a3 3 0 0 1 3.758-1.793l2.526.842a1 1 0 0 0 1.21-.501l2.97-5.938c1.214-2.43 4.775-2.123 5.556.48l3.774 12.58a1 1 0 0 0 1.513.545l3.341-2.227a1 1 0 0 0 .323-.353l5.298-9.712a3 3 0 0 1 2.14-1.523l4.135-.69a3 3 0 0 1 2.414.655l3.892 3.244a1 1 0 0 0 1.347-.061l5.28-5.28c.046.845.077 1.752.097 2.732l-3.962 3.962a3 3 0 0 1-4.042.183l-3.893-3.243a1 1 0 0 0-.804-.218l-4.135.689a1 1 0 0 0-.714.507l-5.297 9.712c-.233.427-.565.79-.97 1.06l-3.34 2.228a3 3 0 0 1-4.538-1.635l-3.775-12.58c-.26-.868-1.447-.97-1.852-.16l-2.969 5.937a3 3 0 0 1-3.632 1.505l-2.526-.842a1 1 0 0 0-1.252.597L7.606 38.564a5 5 0 0 1-3.1 2.988L.072 43.029Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M49.5 19a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z" fill="#2BEE6C"/><path d="M47.5 19a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" fill="#fff"/><path d="M45 .283v59.654c-.63.042-1.294.074-2 .098V.185c.706.025 1.37.056 2 .098Z" fill="#fff"/><path class="help-img-highlight" d="M.5 25.01c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.289a14.5 14.5 0 0 1 5.412-5.41c1.639-.936 3.579-1.418 6.289-1.661C16.822.61 20.265.61 24.9.61h10.2c4.635 0 8.078 0 10.795.245 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.579 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.795-.244 2.71-.726 4.65-1.66 6.29a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.412C1.47 50.655.988 48.716.745 46.005.5 43.288.5 39.845.5 35.21v-10.2Z"/></g><defs><clipPath id="l"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,HELP_KEY_IMG:Z`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#m)"><path fill="#EB8B47" d="M0 24.9c0-9.252 0-13.878 1.97-17.332A15 15 0 0 1 7.569 1.97C11.023 0 15.648 0 24.9 0h10.2c9.251 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.022 60 15.648 60 24.899v10.2c0 9.252 0 13.878-1.97 17.332a15.001 15.001 0 0 1-5.598 5.598c-3.455 1.97-8.08 1.97-17.332 1.97H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.351 0 35.1V24.9Z"/><path class="help-img-highlight" d="M.5 24.9c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.29a14.5 14.5 0 0 1 5.412-5.41C9.455 1.468 11.395.986 14.105.743 16.822.5 20.265.5 24.9.5h10.2c4.635 0 8.078 0 10.795.244 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.58 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.796-.244 2.71-.726 4.65-1.66 6.289a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.411c-.935-1.64-1.417-3.58-1.66-6.29C.5 43.178.5 39.734.5 35.1V24.9Z"/><path fill="#FF974C" stroke="#fff" stroke-width="2" d="M39.192 29.192c5.077-5.077 5.077-13.308 0-18.385-5.076-5.077-13.308-5.077-18.384 0-5.077 5.077-5.077 13.308 0 18.385l1.287 1.291c1.137 1.142 1.706 1.712 2.097 2.387.267.462.472.957.608 1.473.2.755.2 1.56.2 3.171V48.75c0 1.077 0 1.615.134 2.119a4 4 0 0 0 .407.984c.262.45.643.831 1.404 1.592l.294.295c.654.654.982.981 1.365 1.086.26.07.533.07.792 0 .383-.105.71-.432 1.365-1.086l3.478-3.479c.655-.654.982-.981 1.087-1.365a1.5 1.5 0 0 0 0-.791c-.105-.384-.432-.711-1.087-1.365l-.478-.479c-.655-.654-.982-.981-1.087-1.365a1.5 1.5 0 0 1 0-.791c.105-.384.432-.711 1.087-1.365l.478-.479c.655-.654.982-.981 1.087-1.365a1.5 1.5 0 0 0 0-.791c-.105-.384-.432-.711-1.087-1.365l-.492-.493c-.65-.65-.974-.974-1.08-1.355a1.5 1.5 0 0 1-.003-.788c.102-.382.425-.71 1.069-1.364l5.46-5.547Z"/><circle cx="30" cy="17" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2"/></g><defs><clipPath id="m"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,HELP_USER_IMG:Z`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#n)"><rect width="60" height="60" fill="#00ACE6" rx="30"/><path fill="#1AC6FF" stroke="#fff" stroke-width="2" d="M59 73c0 16.016-12.984 29-29 29S1 89.016 1 73c0-16.017 11-29 29-29s29 12.983 29 29ZM18.69 19.902a11 11 0 0 1 9.281-8.692 14.842 14.842 0 0 1 4.058 0 11 11 0 0 1 9.28 8.692c.178.866.322 1.75.44 2.625.132.977.132 1.968 0 2.945a39.467 39.467 0 0 1-.44 2.625 11 11 0 0 1-9.28 8.692 14.862 14.862 0 0 1-4.058 0 11 11 0 0 1-9.28-8.692 39.467 39.467 0 0 1-.44-2.625 11.004 11.004 0 0 1 0-2.945c.118-.876.262-1.759.44-2.625Z"/><circle cx="24.5" cy="23.5" r="1.5" fill="#fff"/><circle cx="35.5" cy="23.5" r="1.5" fill="#fff"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m31 20-3 8h4"/></g><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="29.5"/><defs><clipPath id="n"><rect width="60" height="60" fill="#fff" rx="30"/></clipPath></defs></svg>`,HELP_LOCK_IMG:Z`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><rect width="60" height="60" fill="#C653C6" rx="3"/><path fill="#fff" d="M20.034 15.216C20 15.607 20 16.07 20 17v2.808c0 1.13 0 1.696-.2 2.11a1.78 1.78 0 0 1-.584.714c-.366.28-1.051.42-2.423.7a7.076 7.076 0 0 0-1.597.511 9.001 9.001 0 0 0-4.353 4.353C10 30.005 10 32.336 10 37c0 4.663 0 6.995.843 8.804a9.001 9.001 0 0 0 4.353 4.353C17.005 51 19.336 51 24 51h12c4.663 0 6.995 0 8.804-.843a9.001 9.001 0 0 0 4.353-4.353C50 43.995 50 41.664 50 37c0-4.663 0-6.995-.843-8.804a9.001 9.001 0 0 0-4.353-4.353 7.076 7.076 0 0 0-1.597-.511c-1.372-.28-2.057-.42-2.423-.7a1.78 1.78 0 0 1-.583-.715C40 21.505 40 20.94 40 19.809V17c0-.929 0-1.393-.034-1.784a9 9 0 0 0-8.182-8.182C31.393 7 30.93 7 30 7s-1.393 0-1.784.034a9 9 0 0 0-8.182 8.182Z"/><path fill="#E87DE8" d="M22 17c0-.929 0-1.393.044-1.784a7 7 0 0 1 6.172-6.172C28.606 9 29.071 9 30 9s1.393 0 1.784.044a7 7 0 0 1 6.172 6.172c.044.39.044.855.044 1.784v4.5a1.5 1.5 0 0 1-3 0V17c0-.93 0-1.394-.077-1.78a4 4 0 0 0-3.143-3.143C31.394 12 30.93 12 30 12s-1.394 0-1.78.077a4 4 0 0 0-3.143 3.143C25 15.606 25 16.07 25 17v4.5a1.5 1.5 0 0 1-3 0V17Z"/><path fill="#E87DE8" fill-rule="evenodd" d="M12 36.62c0-4.317 0-6.476.92-8.088a7 7 0 0 1 2.612-2.612c1.612-.92 3.77-.92 8.088-.92h6.855c.469 0 .703 0 .906.017 2.73.222 4.364 2.438 4.619 4.983.27-2.698 2.111-5 5.015-5A6.985 6.985 0 0 1 48 31.985v5.395c0 4.317 0 6.476-.92 8.088a7 7 0 0 1-2.612 2.612c-1.612.92-3.77.92-8.088.92h-5.855c-.469 0-.703 0-.906-.017-2.73-.222-4.364-2.438-4.619-4.983-.258 2.583-1.943 4.818-4.714 4.99-.155.01-.335.01-.694.01-.55 0-.825 0-1.057-.015a7 7 0 0 1-6.52-6.52C12 42.233 12 41.958 12 41.408V36.62Zm21.24-.273a4 4 0 1 0-6.478 0c.985 1.36 1.479 2.039 1.564 2.229.178.398.176.818.174 1.247V42.5a1.5 1.5 0 0 0 3 0v-2.677c-.002-.429-.004-.85.174-1.247.085-.19.579-.87 1.565-2.229Z" clip-rule="evenodd"/><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="2.5"/></svg>`,HELP_COMPAS_IMG:Z`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><rect width="60" height="60" fill="#1DC956" rx="30"/><circle cx="30" cy="29.999" r="3" fill="#fff"/><path fill="#2BEE6C" stroke="#fff" stroke-width="2" d="m45.316 17.9-.88-.425.88.424a7.9 7.9 0 0 1 .026-.053c.093-.192.21-.432.26-.687l-.819-.162.819.162a2 2 0 0 0-.239-1.405c-.132-.224-.32-.412-.472-.562a8.415 8.415 0 0 1-.042-.042l-.042-.042c-.15-.151-.338-.34-.562-.472l-.508.862.508-.862a2 2 0 0 0-1.405-.239c-.255.05-.495.167-.687.26l-.053.026-15.05 7.246-.108.052c-1.131.545-1.843.887-2.456 1.374a6.994 6.994 0 0 0-1.13 1.13c-.487.613-.83 1.325-1.375 2.457l-.051.108-7.247 15.05-.025.053c-.094.192-.21.431-.26.686a2 2 0 0 0 .239 1.406l.855-.505-.856.505c.133.224.321.411.473.562l.042.042.041.042c.15.151.338.34.563.472a2 2 0 0 0 1.405.239l-.195-.981.195.98c.255-.05.494-.166.686-.26l.054-.025-.419-.87.419.87 15.05-7.247.107-.051c1.132-.545 1.844-.888 2.457-1.374a7.002 7.002 0 0 0 1.13-1.13c.487-.614.83-1.325 1.374-2.457l.052-.108 7.246-15.05Z"/><path fill="#1DC956" d="m33.376 32.723-2.669-3.43-14.85 14.849.206.205a1 1 0 0 0 1.141.194l15.105-7.273a3 3 0 0 0 1.067-4.545Z"/><path fill="#86F999" d="m26.624 27.276 2.669 3.43 14.85-14.849-.206-.205a1 1 0 0 0-1.141-.194L27.69 22.731a3 3 0 0 0-1.067 4.545Z"/><circle cx="30" cy="30" r="3" fill="#fff" transform="rotate(45 30 30)"/><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="29.5"/></svg>`,HELP_NOUN_IMG:Z`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><rect width="60" height="60" fill="#794CFF" rx="3"/><path fill="#987DE8" stroke="#fff" stroke-width="2" d="M33 22.5v-1H16v5H8.5V36H13v-5h3v7.5h17V31h1v7.5h17v-17H34v5h-1v-4Z"/><path fill="#fff" d="M37.5 25h10v10h-10z"/><path fill="#4019B2" d="M42.5 25h5v10h-5z"/><path fill="#fff" d="M19.5 25h10v10h-10z"/><path fill="#4019B2" d="M24.5 25h5v10h-5z"/><path fill="#fff" d="M12 30.5h4V37h-4v-6.5Z"/><rect class="help-img-highlight" width="59" height="59" x=".5" y=".5" rx="2.5"/></svg>`,HELP_DAO_IMG:Z`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#o)"><path fill="#EB8B47" d="M0 24.9c0-9.252 0-13.878 1.97-17.332A15 15 0 0 1 7.569 1.97C11.023 0 15.648 0 24.9 0h10.2c9.251 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.022 60 15.648 60 24.899v10.2c0 9.252 0 13.878-1.97 17.332a15.001 15.001 0 0 1-5.598 5.598c-3.455 1.97-8.08 1.97-17.332 1.97H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.351 0 35.1V24.9Z"/><path class="help-img-highlight" d="M.5 24.9c0-4.635 0-8.078.244-10.795.244-2.71.726-4.65 1.66-6.29a14.5 14.5 0 0 1 5.412-5.41C9.455 1.468 11.395.986 14.105.743 16.822.5 20.265.5 24.9.5h10.2c4.635 0 8.078 0 10.795.244 2.71.243 4.65.725 6.29 1.66a14.5 14.5 0 0 1 5.41 5.411c.935 1.64 1.417 3.58 1.66 6.29.244 2.717.245 6.16.245 10.794v10.2c0 4.635 0 8.078-.244 10.796-.244 2.71-.726 4.65-1.66 6.289a14.5 14.5 0 0 1-5.412 5.41c-1.639.936-3.579 1.418-6.289 1.661-2.717.244-6.16.244-10.795.244H24.9c-4.635 0-8.078 0-10.795-.244-2.71-.243-4.65-.725-6.29-1.66a14.5 14.5 0 0 1-5.41-5.411c-.935-1.64-1.417-3.58-1.66-6.29C.5 43.178.5 39.734.5 35.1V24.9Z"/><path fill="#FF974C" stroke="#fff" stroke-width="2" d="M19 52c5.523 0 10-4.477 10-10s-4.477-10-10-10S9 36.477 9 42s4.477 10 10 10Z"/><path fill="#fff" fill-rule="evenodd" d="M42.844 8.326a1 1 0 0 0-1.687 0L28.978 27.463A1 1 0 0 0 29.822 29h24.357a1 1 0 0 0 .843-1.537L42.844 8.326Z" clip-rule="evenodd"/><path fill="#FF974C" fill-rule="evenodd" d="M42.335 11.646c.324.115.571.504 1.066 1.28l7.332 11.523c.562.883.843 1.325.792 1.69a1 1 0 0 1-.342.623c-.28.238-.803.238-1.85.238H34.667c-1.047 0-1.57 0-1.85-.238a1 1 0 0 1-.342-.623c-.051-.365.23-.806.792-1.69l7.332-11.523c.495-.776.742-1.165 1.066-1.28a1 1 0 0 1 .67 0ZM35 27a7 7 0 0 0 7-7 7 7 0 0 0 7 7H35Z" clip-rule="evenodd"/><path fill="#FF974C" stroke="#fff" stroke-width="2" d="M10.106 9.357c-.109.32-.107.682-.106.975V25.668c-.001.293-.003.654.106.975a2 2 0 0 0 1.251 1.25c.32.11.682.108.975.107H19c5.523 0 10-4.477 10-10S24.523 8 19 8h-6.668c-.293-.001-.654-.003-.975.106a2 2 0 0 0-1.25 1.251Z"/><circle cx="19" cy="18" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2"/><circle cx="19" cy="41.999" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2"/></g><defs><clipPath id="o"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,SEARCH_ICON:Z`<svg width="20" height="21"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.432 13.992c-.354-.353-.91-.382-1.35-.146a5.5 5.5 0 1 1 2.265-2.265c-.237.441-.208.997.145 1.35l3.296 3.296a.75.75 0 1 1-1.06 1.061l-3.296-3.296Zm.06-5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" fill="#949E9E"/></svg>`,HELP_ICON:Z`<svg width="11" height="17" viewBox="0 0 11 17"><path fill="#fff" d="M5.22 2.97c-1.07 0-2.25.843-2.25 2.25a.75.75 0 0 1-1.5 0c0-2.393 2.019-3.75 3.75-3.75 1.73 0 3.75 1.357 3.75 3.75 0 1.64-1.038 2.466-1.785 3.057-.802.635-1.215.984-1.215 1.693a.75.75 0 1 1-1.5 0c0-1.466.985-2.24 1.681-2.788l.103-.081C7.007 6.504 7.47 6.08 7.47 5.22c0-1.407-1.181-2.25-2.25-2.25ZM5.22 14.97a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z"/></svg>`,WALLET_ICON:Z`<svg width="15" height="14" fill="none" viewBox="0 0 15 14"><path fill="#fff" fill-rule="evenodd" d="M.64 9.2v-3h.001c.009-1.857.07-2.886.525-3.682a4 4 0 0 1 1.492-1.493C3.58.5 4.813.5 7.28.5h3.735c.58 0 .871 0 1.114.04A3 3 0 0 1 14.6 3.011c.04.243.04.533.04 1.114 0 .58 0 .871-.04 1.114a3 3 0 0 1-2.471 2.47c-.243.041-.533.041-1.114.041h-.777c.178.307.302.648.362 1.011.04.243.04.533.04 1.114 0 .58 0 .871-.04 1.114a3 3 0 0 1-2.471 2.47c-.243.041-.533.041-1.114.041H4.507A3.867 3.867 0 0 1 .64 9.633V9.2ZM7.28 2h3.735c.64 0 .779.005.87.02a1.5 1.5 0 0 1 1.235 1.236c.015.09.02.229.02.869s-.005.779-.02.87a1.5 1.5 0 0 1-1.236 1.235c-.09.015-.229.02-.869.02H4.023c-.697 0-1.345.21-1.883.572V6.25h.001c.004-.791.015-1.383.059-1.867.056-.629.157-.926.269-1.122a2.5 2.5 0 0 1 .932-.933c.197-.111.494-.212 1.123-.268C5.173 2 6.019 2 7.28 2Zm-.265 5.75H4.023c-1.04 0-1.883.843-1.883 1.883A2.367 2.367 0 0 0 4.507 12h2.508c.64 0 .779-.005.87-.02a1.5 1.5 0 0 0 1.235-1.236c.015-.09.02-.229.02-.869s-.005-.779-.02-.87A1.5 1.5 0 0 0 7.884 7.77c-.09-.015-.228-.02-.869-.02Z" clip-rule="evenodd"/></svg>`,NETWORK_PLACEHOLDER:Z`<svg width="28" height="28" fill="none" viewBox="0 0 28 28"><mask id="p" width="26" height="28" x="1" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#D9D9D9" d="M12 1.172a4 4 0 0 1 4 0l8.124 4.69a4 4 0 0 1 2 3.465v9.381a4 4 0 0 1-2 3.464L16 26.862a4 4 0 0 1-4 0l-8.124-4.69a4 4 0 0 1-2-3.464V9.327a4 4 0 0 1 2-3.464L12 1.173Z"/></mask><g mask="url(#p)"><path id="network-placeholder-fill" fill="#fff" d="M0 0h28v28H0z"/><path id="network-placeholder-dash" stroke="#000" stroke-dasharray="2 2" d="m8.953 2.931 2.032-1.173.25.433 1.015-.586c.269-.155.553-.271.844-.35l-.13-.483a4.003 4.003 0 0 1 2.071 0l-.13.483c.293.079.576.195.845.35l1.016.586.25-.433 2.03 1.173-.25.433 2.032 1.173.25-.433 2.03 1.172-.25.433 1.016.587c.269.155.512.342.725.556l.354-.354a4.003 4.003 0 0 1 1.035 1.794l-.483.129c.078.292.12.596.12.906v1.172h.5v2.346h-.5v2.345h.5v2.345h-.5v1.173c0 .31-.042.614-.12.906l.483.13a4.003 4.003 0 0 1-1.035 1.793l-.354-.354a3.498 3.498 0 0 1-.725.556l-1.015.586.25.434-2.031 1.172-.25-.433-2.031 1.173.25.433-2.031 1.172-.25-.433-1.016.587a3.494 3.494 0 0 1-.844.35l.13.482a4.003 4.003 0 0 1-2.071 0l.13-.483a3.496 3.496 0 0 1-.845-.35l-1.015-.586-.25.433-2.032-1.172.25-.433-2.03-1.173-.25.433L4.89 22.76l.25-.434-1.015-.586a3.498 3.498 0 0 1-.725-.556l-.354.354a4.003 4.003 0 0 1-1.035-1.794l.483-.13a3.497 3.497 0 0 1-.12-.905v-1.173h-.5V15.19h.5v-2.345h-.5v-2.346h.5V9.327c0-.31.042-.614.12-.906l-.483-.13a4.003 4.003 0 0 1 1.035-1.793l.354.354c.213-.214.456-.401.725-.556l1.015-.587-.25-.433 2.031-1.172.25.433 2.031-1.173-.25-.433Z"/><path fill="#798686" stroke="#fff" d="M14.243 13.563 14 13.428l-.243.135-6.388 3.549-.024.013c-.432.24-.79.44-1.053.622-.266.184-.516.405-.636.722a1.5 1.5 0 0 0 0 1.062c.12.317.37.538.636.722.263.183.62.382 1.053.622l.024.013 3.164 1.758.088.049c1.164.646 1.857 1.032 2.607 1.162.51.09 1.033.09 1.544 0 .75-.13 1.443-.516 2.606-1.162l.09-.05 3.163-1.757.024-.013c.432-.24.79-.44 1.053-.622.266-.184.516-.405.636-.722l-.468-.177.468.177a1.5 1.5 0 0 0 0-1.062l-.468.177.468-.177c-.12-.317-.37-.538-.636-.722-.263-.183-.62-.382-1.053-.622l-.024-.013-6.388-3.55Z"/><path fill="#9EA9A9" stroke="#fff" d="M14.243 8.563 14 8.428l-.243.135-6.388 3.549-.024.013c-.432.24-.79.44-1.053.622-.266.184-.516.405-.636.722a1.5 1.5 0 0 0 0 1.062c.12.316.37.537.636.722.263.183.62.382 1.053.622l.024.013 3.164 1.758.088.049c1.164.646 1.857 1.032 2.607 1.162.51.09 1.033.09 1.544 0 .75-.13 1.443-.516 2.606-1.162l.09-.05 3.163-1.757.024-.013c.432-.24.79-.44 1.053-.622.266-.184.516-.405.636-.722l-.468-.177.468.177a1.5 1.5 0 0 0 0-1.062l-.468.177.468-.177c-.12-.316-.37-.537-.636-.722-.263-.183-.62-.382-1.053-.622l-.024-.013-6.388-3.55Z"/><path fill="#C9CFCF" stroke="#fff" d="m22.344 9.53-.468-.176.468.177a1.5 1.5 0 0 0 0-1.062l-.468.177.468-.177c-.12-.317-.37-.537-.636-.722-.263-.183-.62-.382-1.053-.622l-.024-.013-3.163-1.758-.09-.05c-1.163-.645-1.856-1.03-2.606-1.161a4.5 4.5 0 0 0-1.544 0c-.75.13-1.443.516-2.607 1.162l-.088.05-3.164 1.757-.024.013c-.432.24-.79.44-1.053.622-.266.185-.516.405-.636.722a1.5 1.5 0 0 0 0 1.062c.12.317.37.537.636.722.263.183.62.382 1.053.622l.024.013 3.164 1.758.088.049c1.164.646 1.857 1.032 2.607 1.162.51.09 1.033.09 1.544 0 .75-.13 1.443-.516 2.606-1.162l.09-.05 3.163-1.757.024-.013c.432-.24.79-.44 1.053-.622.266-.184.516-.405.636-.722Z"/></g></svg>`,WALLET_PLACEHOLDER:Z`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#q)"><path id="wallet-placeholder-fill" fill="#fff" d="M0 24.9c0-9.251 0-13.877 1.97-17.332a15 15 0 0 1 5.598-5.597C11.023 0 15.648 0 24.9 0h10.2c9.252 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.023 60 15.648 60 24.9v10.2c0 9.252 0 13.877-1.97 17.332a15.001 15.001 0 0 1-5.598 5.597C48.977 60 44.352 60 35.1 60H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.352 0 35.1V24.9Z"/><path id="wallet-placeholder-dash" stroke="#000" stroke-dasharray="4 4" stroke-width="1.5" d="M.04 41.708a231.598 231.598 0 0 1-.039-4.403l.75-.001L.75 35.1v-2.55H0v-5.1h.75V24.9l.001-2.204h-.75c.003-1.617.011-3.077.039-4.404l.75.016c.034-1.65.099-3.08.218-4.343l-.746-.07c.158-1.678.412-3.083.82-4.316l.713.236c.224-.679.497-1.296.827-1.875a14.25 14.25 0 0 1 1.05-1.585L3.076 5.9A15 15 0 0 1 5.9 3.076l.455.596a14.25 14.25 0 0 1 1.585-1.05c.579-.33 1.196-.603 1.875-.827l-.236-.712C10.812.674 12.217.42 13.895.262l.07.746C15.23.89 16.66.824 18.308.79l-.016-.75C19.62.012 21.08.004 22.695.001l.001.75L24.9.75h2.55V0h5.1v.75h2.55l2.204.001v-.75c1.617.003 3.077.011 4.404.039l-.016.75c1.65.034 3.08.099 4.343.218l.07-.746c1.678.158 3.083.412 4.316.82l-.236.713c.679.224 1.296.497 1.875.827a14.24 14.24 0 0 1 1.585 1.05l.455-.596A14.999 14.999 0 0 1 56.924 5.9l-.596.455c.384.502.735 1.032 1.05 1.585.33.579.602 1.196.827 1.875l.712-.236c.409 1.233.663 2.638.822 4.316l-.747.07c.119 1.264.184 2.694.218 4.343l.75-.016c.028 1.327.036 2.787.039 4.403l-.75.001.001 2.204v2.55H60v5.1h-.75v2.55l-.001 2.204h.75a231.431 231.431 0 0 1-.039 4.404l-.75-.016c-.034 1.65-.099 3.08-.218 4.343l.747.07c-.159 1.678-.413 3.083-.822 4.316l-.712-.236a10.255 10.255 0 0 1-.827 1.875 14.242 14.242 0 0 1-1.05 1.585l.596.455a14.997 14.997 0 0 1-2.824 2.824l-.455-.596c-.502.384-1.032.735-1.585 1.05-.579.33-1.196.602-1.875.827l.236.712c-1.233.409-2.638.663-4.316.822l-.07-.747c-1.264.119-2.694.184-4.343.218l.016.75c-1.327.028-2.787.036-4.403.039l-.001-.75-2.204.001h-2.55V60h-5.1v-.75H24.9l-2.204-.001v.75a231.431 231.431 0 0 1-4.404-.039l.016-.75c-1.65-.034-3.08-.099-4.343-.218l-.07.747c-1.678-.159-3.083-.413-4.316-.822l.236-.712a10.258 10.258 0 0 1-1.875-.827 14.252 14.252 0 0 1-1.585-1.05l-.455.596A14.999 14.999 0 0 1 3.076 54.1l.596-.455a14.24 14.24 0 0 1-1.05-1.585 10.259 10.259 0 0 1-.827-1.875l-.712.236C.674 49.188.42 47.783.262 46.105l.746-.07C.89 44.77.824 43.34.79 41.692l-.75.016Z"/><path fill="#fff" fill-rule="evenodd" d="M35.643 32.145c-.297-.743-.445-1.114-.401-1.275a.42.42 0 0 1 .182-.27c.134-.1.463-.1 1.123-.1.742 0 1.499.046 2.236-.05a6 6 0 0 0 5.166-5.166c.051-.39.051-.855.051-1.784 0-.928 0-1.393-.051-1.783a6 6 0 0 0-5.166-5.165c-.39-.052-.854-.052-1.783-.052h-7.72c-4.934 0-7.401 0-9.244 1.051a8 8 0 0 0-2.985 2.986C16.057 22.28 16.003 24.58 16 29 15.998 31.075 16 33.15 16 35.224A7.778 7.778 0 0 0 23.778 43H28.5c1.394 0 2.09 0 2.67-.116a6 6 0 0 0 4.715-4.714c.115-.58.115-1.301.115-2.744 0-1.31 0-1.964-.114-2.49a4.998 4.998 0 0 0-.243-.792Z" clip-rule="evenodd"/><path fill="#9EA9A9" fill-rule="evenodd" d="M37 18h-7.72c-2.494 0-4.266.002-5.647.126-1.361.122-2.197.354-2.854.728a6.5 6.5 0 0 0-2.425 2.426c-.375.657-.607 1.492-.729 2.853-.11 1.233-.123 2.777-.125 4.867 0 .7 0 1.05.097 1.181.096.13.182.181.343.2.163.02.518-.18 1.229-.581a6.195 6.195 0 0 1 3.053-.8H37c.977 0 1.32-.003 1.587-.038a4.5 4.5 0 0 0 3.874-3.874c.036-.268.039-.611.039-1.588 0-.976-.003-1.319-.038-1.587a4.5 4.5 0 0 0-3.875-3.874C38.32 18.004 37.977 18 37 18Zm-7.364 12.5h-7.414a4.722 4.722 0 0 0-4.722 4.723 6.278 6.278 0 0 0 6.278 6.278H28.5c1.466 0 1.98-.008 2.378-.087a4.5 4.5 0 0 0 3.535-3.536c.08-.397.087-.933.087-2.451 0-1.391-.009-1.843-.08-2.17a3.5 3.5 0 0 0-2.676-2.676c-.328-.072-.762-.08-2.108-.08Z" clip-rule="evenodd"/></g><defs><clipPath id="q"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`,TOKEN_PLACEHOLDER:Z`<svg width="60" height="60" viewBox="0 0 60 60" fill="none"><rect id="token-placeholder-fill" width="58" height="58" x="1" y="1" fill="#fff" rx="29"/><path fill="#3B4040" stroke="#fff" stroke-width="2" d="M32 10a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v5.566c0 .357.192.685.495.875a16.001 16.001 0 0 1 4.256 3.894c.667.88.33 2.113-.627 2.665l-2.494 1.44c-.956.552-2.166.204-2.913-.609a9.12 9.12 0 1 0 .064 12.267c.739-.82 1.945-1.181 2.907-.64l2.509 1.415c.962.542 1.312 1.77.654 2.658a16 16 0 0 1-4.356 4.028c-.303.19-.495.518-.495.875V50a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-2.992c0-.602-.528-1.065-1.13-1.032-.579.032-1.16.032-1.74 0-.602-.032-1.13.43-1.13 1.032V50a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-5.566c0-.357-.192-.685-.495-.875a16 16 0 0 1 0-27.118c.303-.19.495-.517.495-.875V10a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2.992c0 .601.528 1.064 1.13 1.032.58-.032 1.161-.032 1.74 0 .602.033 1.13-.43 1.13-1.032V10Z"/><rect id="token-placeholder-dash" width="58" height="58" x="1" y="1" stroke="#000" stroke-dasharray="6 6" stroke-width="2" rx="29"/></svg>`,ACCOUNT_COPY:Z`<svg width="14" height="14" fill="none" viewBox="0 0 14 14"><path fill="#fff" fill-rule="evenodd" d="M4.003 4.005c.012-1.225.074-1.936.391-2.491a3 3 0 0 1 1.12-1.12C6.204 0 7.136 0 9 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C14 2.204 14 3.136 14 5s0 2.795-.394 3.486a3 3 0 0 1-1.12 1.12c-.555.317-1.266.379-2.491.391l.002.003c-.012 1.222-.075 1.932-.391 2.486a3 3 0 0 1-1.12 1.12C7.796 14 6.864 14 5 14s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C0 11.796 0 10.864 0 9s0-2.795.394-3.486a3 3 0 0 1 1.12-1.12c.554-.316 1.264-.379 2.486-.391l.003.002ZM9 8.5c-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.045-.08-.113-.243-.154-.693C5.501 6.58 5.5 5.959 5.5 5c0-.959.001-1.58.043-2.05.04-.45.109-.613.154-.693a1.5 1.5 0 0 1 .56-.56c.08-.045.243-.113.693-.154C7.42 1.501 8.041 1.5 9 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.045.08.113.243.154.693.042.47.043 1.091.043 2.05 0 .959-.001 1.58-.043 2.05-.04.45-.109.613-.154.693a1.5 1.5 0 0 1-.56.56c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043ZM4 5.503a13.77 13.77 0 0 0-1.05.04c-.45.04-.613.109-.693.154a1.5 1.5 0 0 0-.56.56c-.045.08-.113.243-.154.693C1.501 7.42 1.5 8.041 1.5 9c0 .959.001 1.58.043 2.05.04.45.109.613.154.693a1.5 1.5 0 0 0 .56.56c.08.045.243.113.693.154.47.042 1.091.043 2.05.043.959 0 1.58-.001 2.05-.043.45-.04.613-.109.693-.154a1.5 1.5 0 0 0 .56-.56c.045-.08.113-.242.154-.693.025-.283.035-.619.04-1.05-1.534-.003-2.358-.037-2.983-.394a3 3 0 0 1-1.12-1.12c-.357-.625-.39-1.449-.394-2.983Z" clip-rule="evenodd"/></svg>`,ACCOUNT_DISCONNECT:Z`<svg width="16" height="14" fill="none" viewBox="0 0 16 14"><path fill="#fff" d="M9.677 1.5h-2.61c-1.261 0-2.107.001-2.757.06-.629.056-.926.157-1.122.268a2.5 2.5 0 0 0-.933.933c-.112.196-.212.493-.269 1.122-.058.65-.06 1.496-.06 2.757v.72c0 1.26.002 2.107.06 2.756.057.63.157.927.27 1.123a2.5 2.5 0 0 0 .932.933c.196.111.493.212 1.122.268.65.059 1.496.06 2.757.06h2.61a.75.75 0 1 1 0 1.5h-2.61c-2.467 0-3.7 0-4.622-.525a4 4 0 0 1-1.493-1.493C.427 11.06.427 9.827.427 7.36v-.72c0-2.467 0-3.7.525-4.622A4 4 0 0 1 2.445.525C3.366 0 4.6 0 7.067 0h2.61a.75.75 0 1 1 0 1.5Z"/><path fill="#fff" d="M10.896 11.03a.75.75 0 0 1 0-1.06l1.793-1.793a.25.25 0 0 0-.176-.427H8.177a.75.75 0 0 1 0-1.5h4.336a.25.25 0 0 0 .176-.427L10.896 4.03a.75.75 0 0 1 1.061-1.06l3.323 3.323a1 1 0 0 1 0 1.414l-3.323 3.323a.75.75 0 0 1-1.06 0Z"/></svg>`},r0=D`.w3m-custom-placeholder{inset:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--w3m-background-border-radius) * .9)}.w3m-custom-placeholder{background-color:var(--w3m-background-color);background-image:var(--w3m-background-image-url);background-position:center;background-size:cover}.w3m-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.w3m-toolbar img,.w3m-toolbar svg{height:28px;object-position:left center;object-fit:contain}#w3m-wc-logo path{fill:var(--w3m-accent-fill-color)}.w3m-action-btn{width:28px;height:28px;border-radius:var(--w3m-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;transition:background-color,.2s ease;background-color:var(--w3m-color-bg-1);box-shadow:0 0 0 1px var(--w3m-color-overlay)}.w3m-action-btn:hover{background-color:var(--w3m-color-bg-2)}.w3m-action-btn svg{display:block;object-position:center}.w3m-action-btn path{fill:var(--w3m-color-fg-1)}.w3m-actions{display:flex}.w3m-actions button:first-child{margin-right:16px}.w3m-help-active button:first-child{background-color:var(--w3m-color-fg-1)}.w3m-help-active button:first-child path{fill:var(--w3m-color-bg-1)}`;var i0=Object.defineProperty,o0=Object.getOwnPropertyDescriptor,Mo=(e,t,n,i)=>{for(var r=i>1?void 0:i?o0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&i0(t,n,r),r};let An=class extends B{constructor(){super(),this.isHelp=!1,this.unsubscribeRouter=void 0,this.unsubscribeRouter=z.subscribe(e=>{this.isHelp=e.view==="Help"})}disconnectedCallback(){var e;(e=this.unsubscribeRouter)==null||e.call(this)}onHelp(){z.push("Help")}logoTemplate(){var e;const t=(e=Ot.state.themeVariables)==null?void 0:e["--w3m-logo-image-url"];return t?y`<img src="${t}">`:U.WALLET_CONNECT_LOGO}render(){const e={"w3m-actions":!0,"w3m-help-active":this.isHelp};return y`<div class="w3m-custom-placeholder"></div><div class="w3m-toolbar">${this.logoTemplate()}<div class="${pt(e)}"><button class="w3m-action-btn" @click="${this.onHelp}">${U.HELP_ICON}</button> <button class="w3m-action-btn" @click="${lt.close}">${U.CROSS_ICON}</button></div></div>`}};An.styles=[N.globalCss,r0],Mo([K()],An.prototype,"isHelp",2),An=Mo([L("w3m-modal-backcard")],An);const s0=D`main{padding:20px;padding-top:0;width:100%}`;var a0=Object.defineProperty,l0=Object.getOwnPropertyDescriptor,c0=(e,t,n,i)=>{for(var r=i>1?void 0:i?l0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&a0(t,n,r),r};let Or=class extends B{render(){return y`<main><slot></slot></main>`}};Or.styles=[N.globalCss,s0],Or=c0([L("w3m-modal-content")],Or);const d0=D`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--w3m-color-bg-2)}`;var h0=Object.defineProperty,u0=Object.getOwnPropertyDescriptor,p0=(e,t,n,i)=>{for(var r=i>1?void 0:i?u0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&h0(t,n,r),r};let _r=class extends B{render(){return y`<footer><slot></slot></footer>`}};_r.styles=[N.globalCss,d0],_r=p0([L("w3m-modal-footer")],_r);const m0=D`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.w3m-border{border-bottom:1px solid var(--w3m-color-bg-2);margin-bottom:20px}header button{padding:15px 20px;transition:opacity .2s ease}@media(hover:hover){header button:hover{opacity:.5}}.w3m-back-btn{position:absolute;left:0}.w3m-action-btn{position:absolute;right:0}path{fill:var(--w3m-accent-color)}`;var f0=Object.defineProperty,g0=Object.getOwnPropertyDescriptor,Re=(e,t,n,i)=>{for(var r=i>1?void 0:i?g0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&f0(t,n,r),r};let Ht=class extends B{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return y`<button class="w3m-back-btn" @click="${z.goBack}">${U.BACK_ICON}</button>`}actionBtnTemplate(){return y`<button class="w3m-action-btn" @click="${this.onAction}">${this.actionIcon}</button>`}render(){const e={"w3m-border":this.border},t=z.state.history.length>1,n=this.title?y`<w3m-text variant="big-bold">${this.title}</w3m-text>`:y`<slot></slot>`;return y`<header class="${pt(e)}">${t?this.backBtnTemplate():null} ${n} ${this.onAction?this.actionBtnTemplate():null}</header>`}};Ht.styles=[N.globalCss,m0],Re([j()],Ht.prototype,"title",2),Re([j()],Ht.prototype,"onAction",2),Re([j()],Ht.prototype,"actionIcon",2),Re([j()],Ht.prototype,"border",2),Ht=Re([L("w3m-modal-header")],Ht);const w0={1:"692ed6ba-e569-459a-556a-776476829e00",42161:"600a9a04-c1b9-42ca-6785-9b4b6ff85200",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00"};var ve=(e=>(e.metaMask="metaMask",e.trust="trust",e.phantom="phantom",e.brave="brave",e.spotEthWallet="spotEthWallet",e.exodus="exodus",e.tokenPocket="tokenPocket",e.frame="frame",e.tally="tally",e.coinbaseWallet="coinbaseWallet",e.core="core",e.bitkeep="bitkeep",e.mathWallet="mathWallet",e.opera="opera",e.tokenary="tokenary",e["1inch"]="1inch",e.kuCoinWallet="kuCoinWallet",e.ledger="ledger",e))(ve||{});const Vt={injectedPreset:{metaMask:{name:"MetaMask",icon:"619537c0-2ff3-4c78-9ed8-a05e7567f300",url:"https://metamask.io",isMobile:!0,isInjected:!0},trust:{name:"Trust",icon:"0528ee7e-16d1-4089-21e3-bbfb41933100",url:"https://trustwallet.com",isMobile:!0,isInjected:!0},spotEthWallet:{name:"Spot",icon:"1bf33a89-b049-4a1c-d1f6-4dd7419ee400",url:"https://www.spot-wallet.com",isMobile:!0,isInjected:!0},phantom:{name:"Phantom",icon:"62471a22-33cb-4e65-5b54-c3d9ea24b900",url:"https://phantom.app",isInjected:!0},core:{name:"Core",icon:"35f9c46e-cc57-4aa7-315d-e6ccb2a1d600",url:"https://core.app",isMobile:!0,isInjected:!0},bitkeep:{name:"BitKeep",icon:"3f7075d0-4ab7-4db5-404d-3e4c05e6fe00",url:"https://bitkeep.com",isMobile:!0,isInjected:!0},tokenPocket:{name:"TokenPocket",icon:"f3119826-4ef5-4d31-4789-d4ae5c18e400",url:"https://www.tokenpocket.pro",isMobile:!0,isInjected:!0},mathWallet:{name:"MathWallet",icon:"26a8f588-3231-4411-60ce-5bb6b805a700",url:"https://mathwallet.org",isMobile:!0,isInjected:!0},exodus:{name:"Exodus",icon:"4c16cad4-cac9-4643-6726-c696efaf5200",url:"https://www.exodus.com",isMobile:!0,isDesktop:!0,isInjected:!0},kuCoinWallet:{name:"KuCoin Wallet",icon:"1e47340b-8fd7-4ad6-17e7-b2bd651fae00",url:"https://kuwallet.com",isMobile:!0,isInjected:!0},ledger:{name:"Ledger",icon:"a7f416de-aa03-4c5e-3280-ab49269aef00",url:"https://www.ledger.com",isDesktop:!0},brave:{name:"Brave",icon:"125e828e-9936-4451-a8f2-949c119b7400",url:"https://brave.com/wallet",isInjected:!0},frame:{name:"Frame",icon:"cd492418-ea85-4ef1-aeed-1c9e20b58900",url:"https://frame.sh",isInjected:!0},tally:{name:"Tally",icon:"98d2620c-9fc8-4a1c-31bc-78d59d00a300",url:"https://tallyho.org",isInjected:!0},coinbaseWallet:{name:"Coinbase",icon:"f8068a7f-83d7-4190-1f94-78154a12c600",url:"https://www.coinbase.com/wallet",isInjected:!0},opera:{name:"Opera",icon:"877fa1a4-304d-4d45-ca8e-f76d1a556f00",url:"https://www.opera.com/crypto",isInjected:!0},tokenary:{name:"Tokenary",icon:"5e481041-dc3c-4a81-373a-76bbde91b800",url:"https://tokenary.io",isDesktop:!0,isInjected:!0},["1inch"]:{name:"1inch Wallet",icon:"dce1ee99-403f-44a9-9f94-20de30616500",url:"https://1inch.io/wallet",isMobile:!0}},getInjectedId(e){if(e.toUpperCase()!=="INJECTED"&&e.length)return e;const{ethereum:t,spotEthWallet:n,coinbaseWalletExtension:i}=window;return t?t.isTrust||t.isTrustWallet?"trust":t.isPhantom?"phantom":t.isBraveWallet?"brave":n?"spotEthWallet":t.isExodus?"exodus":t.isTokenPocket?"tokenPocket":t.isFrame?"frame":t.isTally?"tally":i?"coinbaseWallet":t.isAvalanche?"core":t.isBitKeep?"bitkeep":t.isMathWallet?"mathWallet":t.isOpera?"opera":t.isTokenary?"tokenary":t.isOneInchIOSWallet||t.isOneInchAndroidWallet?"1inch":t.isKuCoinWallet?"kuCoinWallet":t.isMetaMask?"metaMask":"injected":"metaMask"},getInjectedName(e){var t,n;if(e.length&&e.toUpperCase()!=="INJECTED")return e;const i=Vt.getInjectedId("");return(n=(t=Vt.injectedPreset[i])==null?void 0:t.name)!=null?n:"Injected"}},v0={ETH:{icon:"692ed6ba-e569-459a-556a-776476829e00"},WETH:{icon:"692ed6ba-e569-459a-556a-776476829e00"},AVAX:{icon:"30c46e53-e989-45fb-4549-be3bd4eb3b00"},FTM:{icon:"06b26297-fe0c-4733-5d6b-ffa5498aac00"},BNB:{icon:"93564157-2e8e-4ce7-81df-b264dbee9b00"},MATIC:{icon:"41d04d42-da3b-4453-8506-668cc0727900"},OP:{icon:"ab9c186a-c52f-464b-2906-ca59d760a400"},xDAI:{icon:"02b53f6a-e3d4-479e-1cb4-21178987d100"},EVMOS:{icon:"f926ff41-260d-4028-635e-91913fc28e00"},METIS:{icon:"3897a66d-40b9-4833-162f-a2c90531c900"},IOTX:{icon:"34e68754-e536-40da-c153-6ef2e7188a00"}};var b0=Object.defineProperty,To=Object.getOwnPropertySymbols,y0=Object.prototype.hasOwnProperty,x0=Object.prototype.propertyIsEnumerable,Bo=(e,t,n)=>t in e?b0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,C0=(e,t)=>{for(var n in t||(t={}))y0.call(t,n)&&Bo(e,n,t[n]);if(To)for(var n of To(t))x0.call(t,n)&&Bo(e,n,t[n]);return e};const A={MOBILE_BREAKPOINT:600,W3M_RECENT_WALLET:"W3M_RECENT_WALLET",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",rejectStandaloneButtonComponent(){const{isStandalone:e}=T.state;if(e)throw new Error("Web3Modal button components are not available in standalone mode.")},getShadowRootElement(e,t){const n=e.renderRoot.querySelector(t);if(!n)throw new Error(`${t} not found`);return n},getWalletId(e){return Vt.getInjectedId(e)},getWalletIcon(e){var t,n;const i=(t=Vt.injectedPreset[e])==null?void 0:t.icon,{projectId:r,walletImages:o}=it.state;return(n=o?.[e])!=null?n:r&&i?ot.getImageUrl(i):""},getWalletName(e,t=!1){const n=Vt.getInjectedName(e);return t?n.split(" ")[0]:n},getChainIcon(e){var t;const n=w0[e],{projectId:i,chainImages:r}=it.state;return(t=r?.[e])!=null?t:i&&n?ot.getImageUrl(n):""},getTokenIcon(e){var t,n;const i=(t=v0[e])==null?void 0:t.icon,{projectId:r,tokenImages:o}=it.state;return(n=o?.[e])!=null?n:r&&i?ot.getImageUrl(i):""},isMobileAnimation(){return window.innerWidth<=A.MOBILE_BREAKPOINT},async preloadImage(e){const t=new Promise((n,i)=>{const r=new Image;r.onload=n,r.onerror=i,r.src=e});return Promise.race([t,H.wait(3e3)])},getErrorMessage(e){return e instanceof Error?e.message:"Unknown Error"},debounce(e,t=500){let n;return(...i)=>{function r(){e(...i)}n&&clearTimeout(n),n=setTimeout(r,t)}},async handleMobileLinking(e){H.removeWalletConnectDeepLink();const{standaloneUri:t,selectedChain:n}=T.state,{links:i,name:r}=e;function o(a){let c="";i!=null&&i.universal?c=H.formatUniversalUrl(i.universal,a,r):i!=null&&i.native&&(c=H.formatNativeUrl(i.native,a,r)),H.openHref(c,"_self")}t?(A.setRecentWallet(e),o(t)):(await X.client().connectWalletConnect(a=>{o(a)},n?.id),A.setRecentWallet(e),lt.close())},async handleAndroidLinking(){H.removeWalletConnectDeepLink();const{standaloneUri:e,selectedChain:t}=T.state;e?H.openHref(e,"_self"):(await X.client().connectWalletConnect(n=>{H.setWalletConnectAndroidDeepLink(n),H.openHref(n,"_self")},t?.id),lt.close())},async handleUriCopy(){const{standaloneUri:e}=T.state;if(e)await navigator.clipboard.writeText(e);else{const t=X.client().walletConnectUri;await navigator.clipboard.writeText(t)}ct.openToast("Link copied","success")},async handleConnectorConnection(e,t){try{const{selectedChain:n}=T.state;await X.client().connectConnector(e,n?.id),lt.close()}catch(n){console.error(n),t?t():ct.openToast(A.getErrorMessage(n),"error")}},getCustomWallets(){var e;const{desktopWallets:t,mobileWallets:n}=it.state;return(e=H.isMobile()?n:t)!=null?e:[]},getCustomImageUrls(){const{chainImages:e,walletImages:t}=it.state,n=Object.values(e??{}),i=Object.values(t??{});return Object.values([...n,...i])},getConnectorImageUrls(){return X.client().getConnectors().map(({id:e})=>Vt.getInjectedId(e)).map(e=>A.getWalletIcon(e))},truncate(e,t=8){return e.length<=t?e:`${e.substring(0,4)}...${e.substring(e.length-4)}`},generateAvatarColors(e){var t;const n=(t=e.match(/.{1,7}/g))==null?void 0:t.splice(0,5),i=[];n?.forEach(o=>{let a=0;for(let h=0;h<o.length;h+=1)a=o.charCodeAt(h)+((a<<5)-a),a=a&a;const c=[0,0,0];for(let h=0;h<3;h+=1){const p=a>>h*8&255;c[h]=p}i.push(`rgb(${c[0]}, ${c[1]}, ${c[2]})`)});const r=document.querySelector(":root");if(r){const o={"--w3m-color-av-1":i[0],"--w3m-color-av-2":i[1],"--w3m-color-av-3":i[2],"--w3m-color-av-4":i[3],"--w3m-color-av-5":i[4]};Object.entries(o).forEach(([a,c])=>r.style.setProperty(a,c))}},setRecentWallet(e){const{walletConnectVersion:t}=T.state;localStorage.setItem(A.W3M_RECENT_WALLET,JSON.stringify({[t]:e}))},getRecentWallet(){const e=localStorage.getItem(A.W3M_RECENT_WALLET);if(e){const{walletConnectVersion:t}=T.state,n=JSON.parse(e);if(n[t])return n[t]}},getExtensionWallets(){const e=[];for(const[t,n]of Object.entries(Vt.injectedPreset))n!=null&&n.isInjected&&!n.isDesktop&&e.push(C0({id:t},n));return e},caseSafeIncludes(e,t){return e.toUpperCase().includes(t.toUpperCase())},openWalletExplorerUrl(){H.openHref(A.EXPLORER_WALLET_URL,"_blank")}},E0=D`.w3m-router{overflow:hidden;will-change:transform}.w3m-content{display:flex;flex-direction:column}`;var I0=Object.defineProperty,$0=Object.getOwnPropertyDescriptor,Mr=(e,t,n,i)=>{for(var r=i>1?void 0:i?$0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&I0(t,n,r),r};let je=class extends B{constructor(){super(),this.view=z.state.view,this.prevView=z.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=z.subscribe(e=>{this.view!==e.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([e])=>{const t=`${e.contentRect.height}px`;this.oldHeight!=="0px"&&(Mt(this.routerEl,{height:[this.oldHeight,t]},{duration:.2}),Mt(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.03})),this.oldHeight=t}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var e,t;(e=this.unsubscribe)==null||e.call(this),(t=this.resizeObserver)==null||t.disconnect()}get routerEl(){return A.getShadowRootElement(this,".w3m-router")}get contentEl(){return A.getShadowRootElement(this,".w3m-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return y`<w3m-connect-wallet-view></w3m-connect-wallet-view>`;case"SelectNetwork":return y`<w3m-select-network-view></w3m-select-network-view>`;case"InjectedConnector":return y`<w3m-injected-connector-view></w3m-injected-connector-view>`;case"InstallConnector":return y`<w3m-install-connector-view></w3m-install-connector-view>`;case"GetWallet":return y`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"DesktopConnector":return y`<w3m-desktop-connector-view></w3m-desktop-connector-view>`;case"WalletExplorer":return y`<w3m-wallet-explorer-view></w3m-wallet-explorer-view>`;case"Qrcode":return y`<w3m-qrcode-view></w3m-qrcode-view>`;case"Help":return y`<w3m-help-view></w3m-help-view>`;case"Account":return y`<w3m-account-view></w3m-account-view>`;case"SwitchNetwork":return y`<w3m-switch-network-view></w3m-switch-network-view>`;case"Connectors":return y`<w3m-connectors-view></w3m-connectors-view>`;default:return y`<div>Not Found</div>`}}async onChangeRoute(){await Mt(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15}).finished,this.view=z.state.view}render(){return y`<div class="w3m-router"><div class="w3m-content">${this.viewTemplate()}</div></div>`}};je.styles=[N.globalCss,E0],Mr([K()],je.prototype,"view",2),Mr([K()],je.prototype,"prevView",2),je=Mr([L("w3m-modal-router")],je);const A0=D`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:10px 15px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--w3m-notification-border-radius);border:1px solid var(--w3m-color-overlay);background-color:var(--w3m-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--w3m-color-bg-3)}}.w3m-success path{fill:var(--w3m-accent-color)}.w3m-error path{fill:var(--w3m-error-color)}`;var k0=Object.defineProperty,O0=Object.getOwnPropertyDescriptor,Po=(e,t,n,i)=>{for(var r=i>1?void 0:i?O0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&k0(t,n,r),r};let kn=class extends B{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=ct.subscribe(e=>{e.open?(this.open=!0,this.timeout=setTimeout(()=>ct.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var e;(e=this.unsubscribe)==null||e.call(this),clearTimeout(this.timeout),ct.closeToast()}render(){const{message:e,variant:t}=ct.state,n={"w3m-success":t==="success","w3m-error":t==="error"};return this.open?y`<div class="${pt(n)}">${t==="success"?U.CHECKMARK_ICON:null} ${t==="error"?U.CROSS_ICON:null}<w3m-text variant="small-regular">${e}</w3m-text></div>`:null}};kn.styles=[N.globalCss,A0],Po([K()],kn.prototype,"open",2),kn=Po([L("w3m-modal-toast")],kn);const _0=D`button{padding:5px;border-radius:var(--w3m-button-hover-highlight-border-radius);transition:all .2s ease;display:flex;flex-direction:column;align-items:center;justify-content:center;width:80px;height:90px}w3m-network-image{width:54px;height:59px}w3m-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;margin-top:5px}button:hover{background-color:var(--w3m-color-overlay)}`;var M0=Object.defineProperty,T0=Object.getOwnPropertyDescriptor,On=(e,t,n,i)=>{for(var r=i>1?void 0:i?T0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&M0(t,n,r),r};let be=class extends B{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.chainId=""}render(){return y`<button @click="${this.onClick}"><w3m-network-image chainId="${this.chainId}"></w3m-network-image><w3m-text variant="xsmall-regular">${this.name}</w3m-text></button>`}};be.styles=[N.globalCss,_0],On([j()],be.prototype,"onClick",2),On([j()],be.prototype,"name",2),On([j()],be.prototype,"chainId",2),be=On([L("w3m-network-button")],be);const B0=D`div{width:inherit;height:inherit}.polygon-stroke{stroke:var(--w3m-color-overlay)}svg{width:100%;height:100%;margin:0}#network-placeholder-fill{fill:var(--w3m-color-bg-3)}#network-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var P0=Object.defineProperty,S0=Object.getOwnPropertyDescriptor,So=(e,t,n,i)=>{for(var r=i>1?void 0:i?S0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&P0(t,n,r),r};let _n=class extends B{constructor(){super(...arguments),this.chainId=""}render(){const e=A.getChainIcon(this.chainId);return e?y`<div><svg width="54" height="59" viewBox="0 0 54 59" fill="none"><defs><clipPath id="polygon"><path d="M17.033 4.964c3.852-2.262 5.778-3.393 7.84-3.77a11.807 11.807 0 0 1 4.254 0c2.062.377 3.988 1.508 7.84 3.77l6.066 3.562c3.852 2.263 5.777 3.394 7.13 5.022a12.268 12.268 0 0 1 2.127 3.747c.71 2.006.71 4.268.71 8.793v7.124c0 4.525 0 6.787-.71 8.793a12.268 12.268 0 0 1-2.126 3.747c-1.354 1.628-3.28 2.76-7.131 5.022l-6.066 3.562c-3.852 2.262-5.778 3.393-7.84 3.771a11.814 11.814 0 0 1-4.254 0c-2.062-.378-3.988-1.509-7.84-3.77l-6.066-3.563c-3.852-2.263-5.778-3.394-7.13-5.022a12.268 12.268 0 0 1-2.127-3.747C1 40 1 37.737 1 33.212v-7.124c0-4.525 0-6.787.71-8.793a12.268 12.268 0 0 1 2.127-3.747c1.352-1.628 3.278-2.76 7.13-5.022l6.066-3.562Z"/></clipPath></defs><image clip-path="url(#polygon)" href="${e}" width="58" height="59" x="-2" y="0"/><path class="polygon-stroke" d="M17.22 5.295c3.877-2.277 5.737-3.363 7.72-3.726a11.44 11.44 0 0 1 4.12 0c1.983.363 3.844 1.45 7.72 3.726l6.065 3.562c3.876 2.276 5.731 3.372 7.032 4.938a11.896 11.896 0 0 1 2.06 3.63c.683 1.928.688 4.11.688 8.663v7.124c0 4.553-.005 6.735-.688 8.664a11.896 11.896 0 0 1-2.06 3.63c-1.3 1.565-3.156 2.66-7.032 4.937l-6.065 3.563c-3.877 2.276-5.737 3.362-7.72 3.725a11.46 11.46 0 0 1-4.12 0c-1.983-.363-3.844-1.449-7.72-3.726l-6.065-3.562c-3.876-2.276-5.731-3.372-7.032-4.938a11.885 11.885 0 0 1-2.06-3.63c-.682-1.928-.688-4.11-.688-8.663v-7.124c0-4.553.006-6.735.688-8.664a11.885 11.885 0 0 1 2.06-3.63c1.3-1.565 3.156-2.66 7.032-4.937l6.065-3.562Z" stroke="#fff"/></svg></div>`:y`${U.NETWORK_PLACEHOLDER}`}};_n.styles=[N.globalCss,B0],So([j()],_n.prototype,"chainId",2),_n=So([L("w3m-network-image")],_n);const L0=.1,Lo=2.5,At=7;function Tr(e,t,n){return e===t?!1:(e-t<0?t-e:e-t)<=n+L0}function N0(e,t){const n=Array.prototype.slice.call(Te.create(e,{errorCorrectionLevel:t}).modules.data,0),i=Math.sqrt(n.length);return n.reduce((r,o,a)=>(a%i===0?r.push([o]):r[r.length-1].push(o))&&r,[])}const R0={generate(e,t,n,i){const r=i==="light"?"#141414":"#fff",o=i==="light"?"#fff":"#141414",a=[],c=N0(e,"Q"),h=t/c.length,p=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];p.forEach(({x:C,y:M})=>{const E=(c.length-At)*h*C,k=(c.length-At)*h*M,$=.32;for(let O=0;O<p.length;O+=1){const P=h*(At-O*2);a.push(Z`<rect fill="${O%2===0?r:o}" height="${P}" rx="${P*$}" ry="${P*$}" width="${P}" x="${E+h*O}" y="${k+h*O}">`)}});const f=Math.floor((n+25)/h),v=c.length/2-f/2,w=c.length/2+f/2-1,b=[];c.forEach((C,M)=>{C.forEach((E,k)=>{if(c[M][k]&&!(M<At&&k<At||M>c.length-(At+1)&&k<At||M<At&&k>c.length-(At+1))&&!(M>v&&M<w&&k>v&&k<w)){const $=M*h+h/2,O=k*h+h/2;b.push([$,O])}})});const I={};return b.forEach(([C,M])=>{I[C]?I[C].push(M):I[C]=[M]}),Object.entries(I).map(([C,M])=>{const E=M.filter(k=>M.every($=>!Tr(k,$,h)));return[Number(C),E]}).forEach(([C,M])=>{M.forEach(E=>{a.push(Z`<circle cx="${C}" cy="${E}" fill="${r}" r="${h/Lo}">`)})}),Object.entries(I).filter(([C,M])=>M.length>1).map(([C,M])=>{const E=M.filter(k=>M.some($=>Tr(k,$,h)));return[Number(C),E]}).map(([C,M])=>{M.sort((k,$)=>k<$?-1:1);const E=[];for(const k of M){const $=E.find(O=>O.some(P=>Tr(k,P,h)));$?$.push(k):E.push([k])}return[C,E.map(k=>[k[0],k[k.length-1]])]}).forEach(([C,M])=>{M.forEach(([E,k])=>{a.push(Z`<line x1="${C}" x2="${C}" y1="${E}" y2="${k}" stroke="${r}" stroke-width="${h/(Lo/2)}" stroke-linecap="round">`)})}),a}},j0=D`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;width:100%;aspect-ratio:1/1;animation:fadeIn ease .2s}svg:first-child,w3m-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}w3m-wallet-image{transform:translateY(-50%) translateX(-50%)}w3m-wallet-image{width:25%;height:25%;border-radius:15px}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--w3m-accent-color)}svg:first-child path:last-child{stroke:var(--w3m-color-overlay)}`;var D0=Object.defineProperty,U0=Object.getOwnPropertyDescriptor,De=(e,t,n,i)=>{for(var r=i>1?void 0:i?U0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&D0(t,n,r),r};let zt=class extends B{constructor(){super(...arguments),this.uri="",this.size=0,this.logoSrc="",this.walletId=""}svgTemplate(){var e;const t=(e=Ot.state.themeMode)!=null?e:"light";return Z`<svg height="${this.size}" width="${this.size}">${R0.generate(this.uri,this.size,this.size/4,t)}</svg>`}render(){return y`<div>${this.walletId||this.logoSrc?y`<w3m-wallet-image walletId="${mt(this.walletId)}" src="${mt(this.logoSrc)}"></w3m-wallet-image>`:U.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}</div>`}};zt.styles=[N.globalCss,j0],De([j()],zt.prototype,"uri",2),De([j({type:Number})],zt.prototype,"size",2),De([j()],zt.prototype,"logoSrc",2),De([j()],zt.prototype,"walletId",2),zt=De([L("w3m-qrcode")],zt);const W0=D`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--w3m-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:transparent;position:absolute;background-color:var(--w3m-color-bg-3);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay)}input::placeholder{color:transparent}svg{margin-right:4px}.w3m-placeholder{top:0;left:50%;transform:translateX(-50%);transition:.2s all ease;pointer-events:none;display:flex;align-items:center;justify-content:center;height:100%;width:fit-content;position:relative}input:focus-within+.w3m-placeholder,input:not(:placeholder-shown)+.w3m-placeholder{transform:translateX(10px);left:0}w3m-text{opacity:1;transition:.2s opacity ease}input:focus-within+.w3m-placeholder w3m-text,input:not(:placeholder-shown)+.w3m-placeholder w3m-text{opacity:0}input:focus-within,input:not(:placeholder-shown){color:var(--w3m-color-fg-1)}input:focus-within{box-shadow:inset 0 0 0 1px var(--w3m-accent-color)}path{fill:var(--w3m-color-fg-2)}`;var F0=Object.defineProperty,H0=Object.getOwnPropertyDescriptor,No=(e,t,n,i)=>{for(var r=i>1?void 0:i?H0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&F0(t,n,r),r};let Mn=class extends B{constructor(){super(...arguments),this.onChange=()=>null}render(){const e=H.isMobile()?"Search mobile wallets":"Search desktop wallets";return y`<input type="text" @input="${this.onChange}" placeholder="${e}"><div class="w3m-placeholder">${U.SEARCH_ICON}<w3m-text color="secondary" variant="small-thin">${e}</w3m-text></div>`}};Mn.styles=[N.globalCss,W0],No([j()],Mn.prototype,"onChange",2),Mn=No([L("w3m-search-input")],Mn);const V0=D`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--w3m-accent-color)}`;var z0=Object.defineProperty,Z0=Object.getOwnPropertyDescriptor,G0=(e,t,n,i)=>{for(var r=i>1?void 0:i?Z0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&z0(t,n,r),r};let Br=class extends B{render(){return y`<svg viewBox="0 0 50 50" width="24" height="24"><circle cx="25" cy="25" r="20" fill="none" stroke-width="4" stroke="#fff"/></svg>`}};Br.styles=[N.globalCss,V0],Br=G0([L("w3m-spinner")],Br);const K0=D`span{font-style:normal;font-family:var(--w3m-font-family);font-feature-settings:'tnum' on,'lnum' on,'case' on}.w3m-xsmall-bold{font-family:var(--w3m-text-xsmall-bold-font-family);font-weight:var(--w3m-text-xsmall-bold-weight);font-size:var(--w3m-text-xsmall-bold-size);line-height:var(--w3m-text-xsmall-bold-line-height);letter-spacing:var(--w3m-text-xsmall-bold-letter-spacing);text-transform:var(--w3m-text-xsmall-bold-text-transform)}.w3m-xsmall-regular{font-family:var(--w3m-text-xsmall-regular-font-family);font-weight:var(--w3m-text-xsmall-regular-weight);font-size:var(--w3m-text-xsmall-regular-size);line-height:var(--w3m-text-xsmall-regular-line-height);letter-spacing:var(--w3m-text-xsmall-regular-letter-spacing);text-transform:var(--w3m-text-xsmall-regular-text-transform)}.w3m-small-thin{font-family:var(--w3m-text-small-thin-font-family);font-weight:var(--w3m-text-small-thin-weight);font-size:var(--w3m-text-small-thin-size);line-height:var(--w3m-text-small-thin-line-height);letter-spacing:var(--w3m-text-small-thin-letter-spacing);text-transform:var(--w3m-text-small-thin-text-transform)}.w3m-small-regular{font-family:var(--w3m-text-small-regular-font-family);font-weight:var(--w3m-text-small-regular-weight);font-size:var(--w3m-text-small-regular-size);line-height:var(--w3m-text-small-regular-line-height);letter-spacing:var(--w3m-text-small-regular-letter-spacing);text-transform:var(--w3m-text-small-regular-text-transform)}.w3m-medium-regular{font-family:var(--w3m-text-medium-regular-font-family);font-weight:var(--w3m-text-medium-regular-weight);font-size:var(--w3m-text-medium-regular-size);line-height:var(--w3m-text-medium-regular-line-height);letter-spacing:var(--w3m-text-medium-regular-letter-spacing);text-transform:var(--w3m-text-medium-regular-text-transform)}.w3m-big-bold{font-family:var(--w3m-text-big-bold-font-family);font-weight:var(--w3m-text-big-bold-weight);font-size:var(--w3m-text-big-bold-size);line-height:var(--w3m-text-big-bold-line-height);letter-spacing:var(--w3m-text-big-bold-letter-spacing);text-transform:var(--w3m-text-big-bold-text-transform)}:host(*){color:var(--w3m-color-fg-1)}.w3m-color-primary{color:var(--w3m-color-fg-1)}.w3m-color-secondary{color:var(--w3m-color-fg-2)}.w3m-color-tertiary{color:var(--w3m-color-fg-3)}.w3m-color-inverse{color:var(--w3m-accent-fill-color)}.w3m-color-accnt{color:var(--w3m-accent-color)}.w3m-color-error{color:var(--w3m-error-color)}`;var q0=Object.defineProperty,Y0=Object.getOwnPropertyDescriptor,Pr=(e,t,n,i)=>{for(var r=i>1?void 0:i?Y0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&q0(t,n,r),r};let Ue=class extends B{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const e={"w3m-big-bold":this.variant==="big-bold","w3m-medium-regular":this.variant==="medium-regular","w3m-small-regular":this.variant==="small-regular","w3m-small-thin":this.variant==="small-thin","w3m-xsmall-regular":this.variant==="xsmall-regular","w3m-xsmall-bold":this.variant==="xsmall-bold","w3m-color-primary":this.color==="primary","w3m-color-secondary":this.color==="secondary","w3m-color-tertiary":this.color==="tertiary","w3m-color-inverse":this.color==="inverse","w3m-color-accnt":this.color==="accent","w3m-color-error":this.color==="error"};return y`<span><slot class="${pt(e)}"></slot></span>`}};Ue.styles=[N.globalCss,K0],Pr([j()],Ue.prototype,"variant",2),Pr([j()],Ue.prototype,"color",2),Ue=Pr([L("w3m-text")],Ue);const J0=D`div{overflow:hidden;position:relative;border-radius:50%}div::after{content:'';position:absolute;inset:0;border-radius:50%;border:1px solid var(--w3m-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}svg{width:100%;height:100%}#token-placeholder-fill{fill:var(--w3m-color-bg-3)}#token-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var Q0=Object.defineProperty,X0=Object.getOwnPropertyDescriptor,Ro=(e,t,n,i)=>{for(var r=i>1?void 0:i?X0(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&Q0(t,n,r),r};let Tn=class extends B{constructor(){super(...arguments),this.symbol=void 0}render(){var e;const t=A.getTokenIcon((e=this.symbol)!=null?e:"");return t?y`<div><img src="${t}" alt="${this.id}"></div>`:U.TOKEN_PLACEHOLDER}};Tn.styles=[N.globalCss,J0],Ro([j()],Tn.prototype,"symbol",2),Tn=Ro([L("w3m-token-image")],Tn);const tc=D`button{transition:all .2s ease;width:100%;height:100%;border-radius:var(--w3m-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:hover{background-color:var(--w3m-color-overlay)}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}w3m-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}w3m-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--w3m-wallet-icon-border-radius);margin-bottom:5px}.w3m-sublabel{margin-top:2px}`;var ec=Object.defineProperty,nc=Object.getOwnPropertyDescriptor,Pt=(e,t,n,i)=>{for(var r=i>1?void 0:i?nc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&ec(t,n,r),r};let $t=class extends B{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.src=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?y`<w3m-text class="w3m-sublabel" variant="xsmall-bold" color="tertiary">RECENT</w3m-text>`:this.installed?y`<w3m-text class="w3m-sublabel" variant="xsmall-bold" color="tertiary">INSTALLED</w3m-text>`:null}render(){var e;return y`<button @click="${this.onClick}"><div><w3m-wallet-image walletId="${this.walletId}" .src="${this.src}"></w3m-wallet-image><w3m-text variant="xsmall-regular">${(e=this.label)!=null?e:A.getWalletName(this.name,!0)}</w3m-text>${this.sublabelTemplate()}</div></button>`}};$t.styles=[N.globalCss,tc],Pt([j()],$t.prototype,"onClick",2),Pt([j()],$t.prototype,"name",2),Pt([j()],$t.prototype,"walletId",2),Pt([j()],$t.prototype,"label",2),Pt([j()],$t.prototype,"src",2),Pt([j()],$t.prototype,"installed",2),Pt([j()],$t.prototype,"recent",2),$t=Pt([L("w3m-wallet-button")],$t);const rc=D`div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;inset:0;border-radius:inherit;border:1px solid var(--w3m-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var ic=Object.defineProperty,oc=Object.getOwnPropertyDescriptor,Sr=(e,t,n,i)=>{for(var r=i>1?void 0:i?oc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&ic(t,n,r),r};let We=class extends B{constructor(){super(...arguments),this.walletId=void 0,this.src=void 0}render(){var e;const t=A.getWalletId((e=this.walletId)!=null?e:""),n=A.getWalletId(t),i=this.src?this.src:A.getWalletIcon(n);return y`${i.length?y`<div><img src="${i}" alt="${this.id}"></div>`:U.WALLET_PLACEHOLDER}`}};We.styles=[N.globalCss,rc],Sr([j()],We.prototype,"walletId",2),Sr([j()],We.prototype,"src",2),We=Sr([L("w3m-wallet-image")],We);var sc=Object.defineProperty,ac=Object.getOwnPropertyDescriptor,lc=(e,t,n,i)=>{for(var r=i>1?void 0:i?ac(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&sc(t,n,r),r};let jo=class extends B{constructor(){super(),this.unwatchAccount=void 0,J.getAccount(),this.fetchProfile(),this.fetchBalance(),this.unwatchAccount=X.client().watchAccount(e=>{const{address:t}=J.state;e.address!==t&&(this.fetchProfile(e.address),this.fetchBalance(e.address)),J.setAddress(e.address),J.setIsConnected(e.isConnected)})}disconnectedCallback(){var e;(e=this.unwatchAccount)==null||e.call(this)}async fetchProfile(e){var t;const n=(t=T.state.chains)==null?void 0:t.find(i=>i.id===1);if(it.state.enableAccountView&&n)try{await J.fetchProfile(A.preloadImage,e)}catch(i){console.error(i),ct.openToast(A.getErrorMessage(i),"error")}}async fetchBalance(e){if(it.state.enableAccountView)try{await J.fetchBalance(e)}catch(t){console.error(t),ct.openToast(A.getErrorMessage(t),"error")}}};jo=lc([L("w3m-account-context")],jo);var cc=Object.defineProperty,dc=Object.getOwnPropertyDescriptor,Do=(e,t,n,i)=>{for(var r=i>1?void 0:i?dc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&cc(t,n,r),r};let Lr=class extends B{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(e){try{e!=null&&e.length&&await Promise.all(e.map(async t=>A.preloadImage(t)))}catch{console.info("Unsuccessful attempt at preloading some images")}}async preloadListings(){var e;if(it.state.enableExplorer){const{standaloneChains:t,chains:n,walletConnectVersion:i}=T.state,r=t?.join(",");await Promise.all([ot.getPreviewWallets({page:1,entries:10,chains:r,device:H.isMobile()?"mobile":"desktop",version:i}),ot.getRecomendedWallets()]),T.setIsDataLoaded(!0);const{previewWallets:o,recomendedWallets:a}=ot.state,c=(e=n?.map(p=>A.getChainIcon(p.id)))!=null?e:[],h=[...o,...a].map(p=>p.image_url.lg);await this.loadImages([...c,...h])}else T.setIsDataLoaded(!0)}async preloadCustomImages(){const e=A.getCustomImageUrls();await this.loadImages(e)}async preloadConnectorImages(){if(!T.state.isStandalone){const e=A.getConnectorImageUrls();await this.loadImages(e)}}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages(),this.preloadConnectorImages()]))}catch(e){console.error(e),ct.openToast("Failed preloading","error")}}};Do([K()],Lr.prototype,"preload",2),Lr=Do([L("w3m-explorer-context")],Lr);var hc=Object.defineProperty,uc=Object.getOwnPropertyDescriptor,Uo=(e,t,n,i)=>{for(var r=i>1?void 0:i?uc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&hc(t,n,r),r};let Nr=class extends B{constructor(){super(),this.activeChainId=void 0,this.unwatchNetwork=void 0;const e=T.getSelectedChain();this.activeChainId=e?.id,this.unwatchNetwork=X.client().watchNetwork(t=>{const n=t.chain;n&&this.activeChainId!==n.id&&(T.setSelectedChain(n),this.activeChainId=n.id,J.resetBalance(),this.fetchBalance())})}disconnectedCallback(){var e;(e=this.unwatchNetwork)==null||e.call(this)}async fetchBalance(){if(it.state.enableAccountView)try{await J.fetchBalance()}catch(e){console.error(e),ct.openToast(A.getErrorMessage(e),"error")}}};Uo([K()],Nr.prototype,"activeChainId",2),Nr=Uo([L("w3m-network-context")],Nr);var pc=Object.defineProperty,mc=Object.getOwnPropertyDescriptor,fc=(e,t,n,i)=>{for(var r=i>1?void 0:i?mc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&pc(t,n,r),r};let Wo=class extends B{constructor(){super(),this.unsubscribeTheme=void 0,N.setTheme(),this.unsubscribeTheme=Ot.subscribe(N.setTheme)}disconnectedCallback(){var e;(e=this.unsubscribeTheme)==null||e.call(this)}};Wo=fc([L("w3m-theme-context")],Wo);const gc=D`:host{all:initial}div{display:flex;align-items:center;background-color:var(--w3m-color-overlay);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);border-radius:var(--w3m-button-border-radius);padding:4px 4px 4px 8px}div button{border-radius:var(--w3m-secondary-button-border-radius);padding:4px 8px;padding-left:4px;height:auto;margin-left:10px;color:var(--w3m-accent-fill-color);background-color:var(--w3m-accent-color)}.w3m-no-avatar{padding-left:8px}button::after{content:'';inset:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--w3m-color-overlay)}button:hover::after{background-color:var(--w3m-color-overlay)}w3m-avatar{margin-right:6px}w3m-button-big w3m-avatar{margin-left:-5px}`;var wc=Object.defineProperty,vc=Object.getOwnPropertyDescriptor,Rr=(e,t,n,i)=>{for(var r=i>1?void 0:i?vc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&wc(t,n,r),r};let ye=class extends B{constructor(){super(),this.balance="hide",this.avatar="show",A.rejectStandaloneButtonComponent()}onOpen(){const{isStandalone:e}=T.state;e||lt.open({route:"Account"})}accountTemplate(){const e=this.avatar==="show";return y`${e?y`<w3m-avatar></w3m-avatar>`:null}<w3m-address-text></w3m-address-text>`}render(){const e=this.balance==="show",t={"w3m-no-avatar":this.avatar==="hide"};return e?y`<div><w3m-balance></w3m-balance><button @click="${this.onOpen}" class="${pt(t)}">${this.accountTemplate()}</button></div>`:y`<w3m-button-big @click="${this.onOpen}">${this.accountTemplate()}</w3m-button-big>`}};ye.styles=[N.globalCss,gc],Rr([j()],ye.prototype,"balance",2),Rr([j()],ye.prototype,"avatar",2),ye=Rr([L("w3m-account-button")],ye);const bc=D`button{display:flex;border-radius:var(--w3m-button-hover-highlight-border-radius);flex-direction:column;transition:background-color .2s ease;justify-content:center;padding:5px;width:100px}button:hover{background-color:var(--w3m-color-overlay)}button:disabled{pointer-events:none}w3m-network-image{width:32px;height:32px}w3m-text{margin-top:4px}`;var yc=Object.defineProperty,xc=Object.getOwnPropertyDescriptor,jr=(e,t,n,i)=>{for(var r=i>1?void 0:i?xc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&yc(t,n,r),r};let Fe=class extends B{constructor(){super(),this.chainId="",this.label="",this.unsubscribeNetwork=void 0;const{selectedChain:e}=T.state;this.chainId=e?.id.toString(),this.label=e?.name,this.unsubscribeNetwork=T.subscribe(({selectedChain:t})=>{this.chainId=t?.id.toString(),this.label=t?.name})}disconnectedCallback(){var e;(e=this.unsubscribeNetwork)==null||e.call(this)}onClick(){z.push("SelectNetwork")}render(){const{chains:e,selectedChain:t}=T.state,n=e?.map(o=>o.id),i=t&&n?.includes(t.id),r=e&&e.length<=1&&i;return y`<button @click="${this.onClick}" ?disabled="${r}"><w3m-network-image chainId="${mt(this.chainId)}"></w3m-network-image><w3m-text variant="xsmall-regular" color="accent">${this.label}</w3m-text></button>`}};Fe.styles=[N.globalCss,bc],jr([K()],Fe.prototype,"chainId",2),jr([K()],Fe.prototype,"label",2),Fe=jr([L("w3m-account-network-button")],Fe);const Cc=D`@keyframes slide{0%{background-position:0 0}100%{background-position:200px 0}}w3m-text{padding:1px 0}.w3m-loading{background:linear-gradient(270deg,var(--w3m-color-fg-1) 36.33%,var(--w3m-color-fg-3) 42.07%,var(--w3m-color-fg-1) 83.3%);background-size:200px 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation-name:slide;animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear}`;var Ec=Object.defineProperty,Ic=Object.getOwnPropertyDescriptor,He=(e,t,n,i)=>{for(var r=i>1?void 0:i?Ic(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&Ec(t,n,r),r};let Zt=class extends B{constructor(){super(),this.address=void 0,this.name=void 0,this.loading=!0,this.variant="button",this.unsubscribeAccount=void 0,this.address=J.state.address,this.name=J.state.profileName,this.loading=!!J.state.profileLoading,this.unsubscribeAccount=J.subscribe(({address:e,profileName:t,profileLoading:n})=>{this.address=e,this.name=t,this.loading=!!n})}disconnectedCallback(){var e;(e=this.unsubscribeAccount)==null||e.call(this)}render(){var e;const t=this.variant==="button",n={"w3m-loading":this.loading};return y`<w3m-text class="${pt(n)}" variant="${t?"medium-regular":"big-bold"}" color="${t?"inverse":"primary"}">${this.name?this.name:A.truncate((e=this.address)!=null?e:"")}</w3m-text>`}};Zt.styles=[N.globalCss,Cc],He([K()],Zt.prototype,"address",2),He([K()],Zt.prototype,"name",2),He([K()],Zt.prototype,"loading",2),He([j()],Zt.prototype,"variant",2),Zt=He([L("w3m-address-text")],Zt);const ht={allowedExplorerListings(e){const{explorerAllowList:t,explorerDenyList:n}=it.state;let i=[...e];return t&&(i=i.filter(r=>t.includes(r.id))),n&&(i=i.filter(r=>!n.includes(r.id))),i},walletsWithInjected(e){let t=[...e??[]];if(window.ethereum){const n=A.getWalletName("");t=t.filter(({name:i})=>!A.caseSafeIncludes(i,n))}return t},connectorWallets(){const{isStandalone:e}=T.state;if(e)return[];let t=X.client().getConnectors();return!window.ethereum&&H.isMobile()&&(t=t.filter(({id:n})=>n!=="injected"&&n!==ve.metaMask)),t},walletTemplatesWithRecent(e,t){let n=[...e];if(t){const i=A.getRecentWallet();n=n.filter(r=>!r.values.includes(i?.name)),n.splice(1,0,t)}return n},deduplicateExplorerListingsFromConnectors(e){const{isStandalone:t}=T.state;if(t)return e;const n=X.client().getConnectors().map(({name:i})=>i.toUpperCase());return e.filter(({name:i})=>!n.includes(i.toUpperCase()))}},$c=D`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 10),0,0)}}.w3m-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px}.w3m-slider::after,.w3m-slider::before{content:'';height:100%;width:50px;z-index:2;position:absolute;background:linear-gradient(to right,var(--w3m-color-bg-1) 0,transparent 100%);top:0}.w3m-slider::before{left:0}.w3m-slider::after{right:0;transform:rotateZ(180deg)}.w3m-track{display:flex;width:calc(70px * 20);animation:scroll 20s linear infinite}.w3m-action{padding:30px 0 10px 0;display:flex;justify-content:center;align-items:center;flex-direction:column}.w3m-action w3m-button-big:last-child{margin-top:10px}w3m-wallet-image{width:60px;height:60px;margin:0 5px;box-shadow:0 2px 4px -2px rgba(0,0,0,.12),0 4px 4px -2px rgba(0,0,0,.08);border-radius:15px}w3m-button-big{margin:0 5px}`;var Ac=Object.defineProperty,kc=Object.getOwnPropertyDescriptor,Oc=(e,t,n,i)=>{for(var r=i>1?void 0:i?kc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&Ac(t,n,r),r};let Dr=class extends B{onGoToQrcode(){z.push("Qrcode")}onGoToConnectors(){z.push("Connectors")}onGoToGetWallet(){z.push("GetWallet")}getConnectors(){let e=ht.connectorWallets();return window.ethereum||(e=e.filter(({id:t})=>t!=="injected"&&t!==ve.metaMask)),e}render(){const{previewWallets:e}=ot.state,t=e.length,n=[...e,...e],i=this.getConnectors().length>0;return y`<w3m-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${U.QRCODE_ICON}"></w3m-modal-header><w3m-modal-content>${t?y`<div class="w3m-slider"><div class="w3m-track">${n.map(({image_url:r})=>y`<w3m-wallet-image src="${r.lg}"></w3m-wallet-image>`)}</div></div>`:null}<div class="w3m-action"><div><w3m-button-big @click="${A.handleAndroidLinking}"><w3m-text variant="medium-normal" color="inverse">${i?"WalletConnect":"Select Wallet"}</w3m-text></w3m-button-big>${i?y`<w3m-button-big @click="${this.onGoToConnectors}"><w3m-text variant="medium-normal" color="inverse">Other</w3m-text></w3m-button-big>`:null}</div><w3m-button-big variant="secondary" @click="${this.onGoToGetWallet}"><w3m-text variant="medium-regular" color="accent">I don’t have a wallet</w3m-text></w3m-button-big></div></w3m-modal-content>`}};Dr.styles=[N.globalCss,$c],Dr=Oc([L("w3m-android-wallet-selection")],Dr);const _c=D`@keyframes slide{0%{transform:translateX(-50px)}100%{transform:translateX(200px)}}.w3m-placeholder,img{border-radius:50%;box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);display:block;position:relative;overflow:hidden!important;background-color:var(--w3m-color-av-1);background-image:radial-gradient(at 66% 77%,var(--w3m-color-av-2) 0,transparent 50%),radial-gradient(at 29% 97%,var(--w3m-color-av-3) 0,transparent 50%),radial-gradient(at 99% 86%,var(--w3m-color-av-4) 0,transparent 50%),radial-gradient(at 29% 88%,var(--w3m-color-av-5) 0,transparent 50%);transform:translateZ(0)}.w3m-loader{width:50px;height:100%;background:linear-gradient(270deg,transparent 0,rgba(255,255,255,.4) 30%,transparent 100%);animation-name:slide;animation-duration:1.5s;transform:translateX(-50px);animation-iteration-count:infinite;animation-timing-function:linear;animation-delay:.55s}.w3m-small{width:24px;height:24px}.w3m-medium{width:60px;height:60px}`;var Mc=Object.defineProperty,Tc=Object.getOwnPropertyDescriptor,Ve=(e,t,n,i)=>{for(var r=i>1?void 0:i?Tc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&Mc(t,n,r),r};let Gt=class extends B{constructor(){super(),this.address=void 0,this.avatar=void 0,this.loading=!0,this.size="small",this.unsubscribeAccount=void 0,this.address=J.state.address,this.avatar=J.state.profileAvatar,this.loading=!!J.state.profileLoading,this.unsubscribeAccount=J.subscribe(({address:e,profileAvatar:t,profileLoading:n})=>{this.address=e,this.avatar=t,this.loading=!!n})}disconnectedCallback(){var e;(e=this.unsubscribeAccount)==null||e.call(this)}render(){const e={"w3m-placeholder":!0,"w3m-small":this.size==="small","w3m-medium":this.size==="medium"};return this.avatar?y`<img class="${pt(e)}" src="${this.avatar}">`:this.address?(A.generateAvatarColors(this.address),y`<div class="${pt(e)}">${this.loading?y`<div class="w3m-loader"></div>`:null}</div>`):null}};Gt.styles=[N.globalCss,_c],Ve([K()],Gt.prototype,"address",2),Ve([K()],Gt.prototype,"avatar",2),Ve([K()],Gt.prototype,"loading",2),Ve([j()],Gt.prototype,"size",2),Gt=Ve([L("w3m-avatar")],Gt);const Bc=D`div{display:flex;align-items:center}w3m-token-image{width:28px;height:28px;margin-right:6px}`;var Pc=Object.defineProperty,Sc=Object.getOwnPropertyDescriptor,Ur=(e,t,n,i)=>{for(var r=i>1?void 0:i?Sc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&Pc(t,n,r),r};let ze=class extends B{constructor(){var e,t;super(),this.symbol=void 0,this.amount=void 0,this.unsubscribeAccount=void 0,this.symbol=(e=J.state.balance)==null?void 0:e.symbol,this.amount=(t=J.state.balance)==null?void 0:t.amount,this.unsubscribeAccount=J.subscribe(({balance:n})=>{this.symbol=n?.symbol,this.amount=n?.amount})}disconnectedCallback(){var e;(e=this.unsubscribeAccount)==null||e.call(this)}render(){let e="_._";return this.amount==="0.0"&&(e=0),this.amount&&this.amount.length>6&&(e=parseFloat(this.amount).toFixed(3)),y`<div><w3m-token-image symbol="${mt(this.symbol)}"></w3m-token-image><w3m-text variant="medium-regular" color="primary">${e} ${this.symbol}</w3m-text></div>`}};ze.styles=[N.globalCss,Bc],Ur([K()],ze.prototype,"symbol",2),Ur([K()],ze.prototype,"amount",2),ze=Ur([L("w3m-balance")],ze);const Lc=D`:host{all:initial}svg{width:28px;height:20px;margin:-1px 3px 0 -5px}svg path{fill:var(--w3m-accent-fill-color)}button:disabled svg path{fill:var(--w3m-color-fg-3)}w3m-spinner{margin:0 10px 0 0}`;var Nc=Object.defineProperty,Rc=Object.getOwnPropertyDescriptor,Bn=(e,t,n,i)=>{for(var r=i>1?void 0:i?Rc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&Nc(t,n,r),r};let Kt=class extends B{constructor(){super(),this.loading=!1,this.label="Connect Wallet",this.icon="show",this.modalUnsub=void 0,A.rejectStandaloneButtonComponent(),this.modalUnsub=lt.subscribe(e=>{e.open&&(this.loading=!0),e.open||(this.loading=!1)})}disconnectedCallback(){var e;(e=this.modalUnsub)==null||e.call(this)}iconTemplate(){return this.icon==="show"?U.WALLET_CONNECT_ICON:null}onClick(){J.state.isConnected?this.onDisconnect():this.onConnect()}onConnect(){this.loading=!0;const{enableNetworkView:e}=it.state,{chains:t,selectedChain:n}=T.state,i=t?.length&&t.length>1;e||i&&!n?lt.open({route:"SelectNetwork"}):lt.open({route:"ConnectWallet"})}onDisconnect(){X.client().disconnect(),J.resetAccount()}render(){return y`<w3m-button-big .disabled="${this.loading}" @click="${this.onClick}">${this.loading?y`<w3m-spinner></w3m-spinner><w3m-text variant="medium-regular" color="accent">Connecting...</w3m-text>`:y`${this.iconTemplate()}<w3m-text variant="medium-regular" color="inverse">${this.label}</w3m-text>`}</w3m-button-big>`}};Kt.styles=[N.globalCss,Lc],Bn([K()],Kt.prototype,"loading",2),Bn([j()],Kt.prototype,"label",2),Bn([j()],Kt.prototype,"icon",2),Kt=Bn([L("w3m-connect-button")],Kt);var jc=Object.defineProperty,Dc=Object.getOwnPropertyDescriptor,xe=(e,t,n,i)=>{for(var r=i>1?void 0:i?Dc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&jc(t,n,r),r};let St=class extends B{constructor(){super(),this.isConnected=!1,this.label="Connect Wallet",this.icon="show",this.avatar="show",this.balance="hide",this.unsubscribeAccount=void 0,A.rejectStandaloneButtonComponent(),this.isConnected=J.state.isConnected,this.unsubscribeAccount=J.subscribe(({isConnected:e})=>{this.isConnected=e})}disconnectedCallback(){var e;(e=this.unsubscribeAccount)==null||e.call(this)}render(){const{enableAccountView:e}=it.state,t=mt(this.balance),n=mt(this.label),i=mt(this.icon),r=mt(this.avatar);return this.isConnected&&e?y`<w3m-account-button balance="${t}" avatar="${r}"></w3m-account-button>`:y`<w3m-connect-button label="${this.isConnected?"Disconnect":n}" icon="${i}"></w3m-connect-button>`}};xe([K()],St.prototype,"isConnected",2),xe([j()],St.prototype,"label",2),xe([j()],St.prototype,"icon",2),xe([j()],St.prototype,"avatar",2),xe([j()],St.prototype,"balance",2),St=xe([L("w3m-core-button")],St);const Uc=D`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.w3m-desktop-title,.w3m-mobile-title{display:flex;align-items:center}.w3m-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.w3m-desktop-title{margin-bottom:10px;padding:0 10px}.w3m-subtitle{display:flex;align-items:center}.w3m-subtitle:last-child path{fill:var(--w3m-color-fg-3)}.w3m-desktop-title svg,.w3m-mobile-title svg{margin-right:6px}.w3m-desktop-title path,.w3m-mobile-title path{fill:var(--w3m-accent-color)}`;var Wc=Object.defineProperty,Fc=Object.getOwnPropertyDescriptor,Hc=(e,t,n,i)=>{for(var r=i>1?void 0:i?Fc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&Wc(t,n,r),r};let Wr=class extends B{onDesktopWallet(e){z.push("DesktopConnector",{DesktopConnector:e})}onInjectedWallet(){z.push("InjectedConnector")}onInstallConnector(){z.push("InstallConnector",{InstallConnector:{id:"metaMask",name:"MetaMask",isMobile:!0,url:"https://metamask.io"}})}async onConnectorWallet(e){window.ethereum?e==="injected"||e===ve.metaMask?this.onInjectedWallet():await A.handleConnectorConnection(e):this.onInstallConnector()}desktopWalletsTemplate(){const{desktopWallets:e}=it.state;return e?.map(({id:t,name:n,links:{universal:i,native:r}})=>y`<w3m-wallet-button walletId="${t}" name="${n}" .onClick="${()=>this.onDesktopWallet({name:n,walletId:t,universal:i,native:r})}"></w3m-wallet-button>`)}previewWalletsTemplate(){let e=ht.allowedExplorerListings(ot.state.previewWallets);return e=ht.deduplicateExplorerListingsFromConnectors(e),e.map(({name:t,desktop:{universal:n,native:i},homepage:r,image_url:o,id:a})=>y`<w3m-wallet-button src="${o.lg}" name="${t}" .onClick="${()=>this.onDesktopWallet({walletId:a,name:t,native:i,universal:n||r,icon:o.lg})}"></w3m-wallet-button>`)}connectorWalletsTemplate(){return ht.connectorWallets().map(({id:e,name:t,ready:n})=>y`<w3m-wallet-button .installed="${["injected","metaMask"].includes(e)&&n}" name="${t}" walletId="${e}" .onClick="${async()=>this.onConnectorWallet(e)}"></w3m-wallet-button>`)}recentWalletTemplate(){const e=A.getRecentWallet();if(!e)return;const{id:t,name:n,links:i,image:r}=e;return y`<w3m-wallet-button .recent="${!0}" name="${n}" walletId="${mt(t)}" src="${mt(r)}" .onClick="${()=>this.onDesktopWallet({name:n,walletId:t,universal:i?.universal,native:i?.native,icon:r})}"></w3m-wallet-button>`}render(){const{standaloneUri:e}=T.state,t=this.desktopWalletsTemplate(),n=this.previewWalletsTemplate(),i=this.connectorWalletsTemplate(),r=this.recentWalletTemplate(),o=[...t??[],...n],a=[...i,...o],c=ht.walletTemplatesWithRecent(a,r),h=ht.walletTemplatesWithRecent(o,r),p=e?h:c,f=p.length>4;let v=[];f?v=p.slice(0,3):v=p;const w=!!v.length;return y`<w3m-modal-header border="${!0}" title="Connect your wallet" .onAction="${A.handleUriCopy}" .actionIcon="${U.COPY_ICON}"></w3m-modal-header><w3m-modal-content><div class="w3m-mobile-title"><div class="w3m-subtitle">${U.MOBILE_ICON}<w3m-text variant="small-regular" color="accent">Mobile</w3m-text></div><div class="w3m-subtitle">${U.SCAN_ICON}<w3m-text variant="small-regular" color="secondary">Scan with your wallet</w3m-text></div></div><w3m-walletconnect-qr></w3m-walletconnect-qr></w3m-modal-content>${w?y`<w3m-modal-footer><div class="w3m-desktop-title">${U.DESKTOP_ICON}<w3m-text variant="small-regular" color="accent">Desktop</w3m-text></div><div class="w3m-grid">${v} ${f?y`<w3m-view-all-wallets-button></w3m-view-all-wallets-button>`:null}</div></w3m-modal-footer>`:null}`}};Wr.styles=[N.globalCss,Uc],Wr=Hc([L("w3m-desktop-wallet-selection")],Wr);const Vc=D`div{background-color:var(--w3m-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--w3m-color-bg-3);text-align:center}a{color:var(--w3m-accent-color);text-decoration:none;transition:opacity .2s ease-in-out}a:hover{opacity:.8}`;var zc=Object.defineProperty,Zc=Object.getOwnPropertyDescriptor,Gc=(e,t,n,i)=>{for(var r=i>1?void 0:i?Zc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&zc(t,n,r),r};let Fr=class extends B{render(){const{termsOfServiceUrl:e,privacyPolicyUrl:t}=it.state;return e??t?y`<div><w3m-text variant="small-regular" color="secondary">By connecting your wallet to this app, you agree to the app's<br>${e?y`<a href="${e}" target="_blank" rel="noopener noreferrer">Terms of Service</a>`:null} ${e&&t?"and":null} ${t?y`<a href="${t}" target="_blank" rel="noopener noreferrer">Privacy Policy</a>`:null}</w3m-text></div>`:null}};Fr.styles=[N.globalCss,Vc],Fr=Gc([L("w3m-legal-notice")],Fr);const Kc=D`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var qc=Object.defineProperty,Yc=Object.getOwnPropertyDescriptor,Jc=(e,t,n,i)=>{for(var r=i>1?void 0:i?Yc(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&qc(t,n,r),r};let Hr=class extends B{onGoToQrcode(){z.push("Qrcode")}async onConnectorWallet(e){await A.handleConnectorConnection(e)}mobileWalletsTemplate(){const{mobileWallets:e}=it.state,t=ht.walletsWithInjected(e);if(t.length)return t.map(({id:n,name:i,links:{universal:r,native:o}})=>y`<w3m-wallet-button name="${i}" walletId="${n}" .onClick="${async()=>A.handleMobileLinking({links:{native:o,universal:r},name:i,id:n})}"></w3m-wallet-button>`)}previewWalletsTemplate(){const{previewWallets:e}=ot.state;let t=ht.walletsWithInjected(e);return t=ht.allowedExplorerListings(t),t=ht.deduplicateExplorerListingsFromConnectors(t),t.map(({image_url:n,name:i,mobile:{native:r,universal:o},id:a})=>y`<w3m-wallet-button name="${i}" src="${n.lg}" .onClick="${async()=>A.handleMobileLinking({links:{native:r,universal:o},name:i,id:a,image:n.lg})}"></w3m-wallet-button>`)}connectorWalletsTemplate(){let e=ht.connectorWallets();return window.ethereum||(e=e.filter(({id:t})=>t!=="injected"&&t!==ve.metaMask)),e.map(({name:t,id:n,ready:i})=>y`<w3m-wallet-button .installed="${["injected","metaMask"].includes(n)&&i}" name="${t}" walletId="${n}" .onClick="${async()=>this.onConnectorWallet(n)}"></w3m-wallet-button>`)}recentWalletTemplate(){const e=A.getRecentWallet();if(!e)return;const{id:t,name:n,links:i,image:r}=e;return y`<w3m-wallet-button .recent="${!0}" name="${n}" walletId="${mt(t)}" src="${mt(r)}" .onClick="${async()=>A.handleMobileLinking({name:n,id:t,links:i,image:r})}"></w3m-wallet-button>`}render(){const{standaloneUri:e}=T.state,t=this.connectorWalletsTemplate(),n=this.mobileWalletsTemplate(),i=this.previewWalletsTemplate(),r=this.recentWalletTemplate(),o=n??i,a=[...t,...o],c=ht.walletTemplatesWithRecent(a,r),h=ht.walletTemplatesWithRecent(o,r),p=e?h:c,f=p.length>8;let v=[];f?v=p.slice(0,7):v=p;const w=v.slice(0,4),b=v.slice(4,8),I=!!v.length;return y`<w3m-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${U.QRCODE_ICON}"></w3m-modal-header>${I?y`<w3m-modal-content><div class="w3m-grid">${w} ${b.length?y`${b} ${f?y`<w3m-view-all-wallets-button></w3m-view-all-wallets-button>`:null}`:null}</div></w3m-modal-content>`:null}`}};Hr.styles=[N.globalCss,Kc],Hr=Jc([L("w3m-mobile-wallet-selection")],Hr);const Qc=D`:host{all:initial}.w3m-overlay{inset:0;position:fixed;z-index:var(--w3m-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,.3);opacity:0;pointer-events:none}@media(max-height:720px) and (orientation:landscape){.w3m-overlay{overflow:scroll;align-items:flex-start}}.w3m-open{pointer-events:auto}.w3m-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--w3m-background-border-radius) var(--w3m-background-border-radius) var(--w3m-container-border-radius) var(--w3m-container-border-radius);border:1px solid var(--w3m-color-overlay);overflow:hidden}.w3m-card{width:100%;position:relative;border-radius:var(--w3m-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--w3m-color-overlay);background-color:var(--w3m-color-bg-1);color:var(--w3m-color-fg-1)}@media(max-width:600px){.w3m-container{max-width:440px;border-radius:var(--w3m-background-border-radius) var(--w3m-background-border-radius) 0 0}.w3m-card{border-radius:var(--w3m-container-border-radius) var(--w3m-container-border-radius) 0 0}.w3m-overlay{align-items:flex-end}}@media(max-width:440px){.w3m-container{border:0}}`;var Xc=Object.defineProperty,t1=Object.getOwnPropertyDescriptor,Fo=(e,t,n,i)=>{for(var r=i>1?void 0:i?t1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&Xc(t,n,r),r};let Ze=class extends B{constructor(){super(),this.open=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=lt.subscribe(e=>{e.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var e;(e=this.unsubscribeModal)==null||e.call(this)}get overlayEl(){return A.getShadowRootElement(this,".w3m-overlay")}get containerEl(){return A.getShadowRootElement(this,".w3m-container")}toggleBodyScroll(e){document.querySelector("body")&&(e?document.getElementById("w3m-styles")?.remove():document.head.insertAdjacentHTML("beforeend",'<style id="w3m-styles">html,body{touch-action:none;overflow:hidden;overscroll-behavior:contain;}</style>'))}onCloseModal(e){e.target===e.currentTarget&<.close()}async onOpenModalEvent(){this.toggleBodyScroll(!1);const e=.2;await Mt(this.containerEl,{y:0},{duration:0}).finished,Mt(this.overlayEl,{opacity:[0,1]},{duration:.2,delay:e}),Mt(this.containerEl,A.isMobileAnimation()?{y:["50vh",0]}:{scale:[.98,1]},{scale:{easing:fn({velocity:.4})},y:{easing:fn({mass:.5})},delay:e}),this.addKeyboardEvents(),this.open=!0}async onCloseModalEvent(){this.toggleBodyScroll(!0),this.removeKeyboardEvents(),await Promise.all([Mt(this.containerEl,A.isMobileAnimation()?{y:[0,"50vh"]}:{scale:[1,.98]},{scale:{easing:fn({velocity:0})},y:{easing:fn({mass:.5})}}).finished,Mt(this.overlayEl,{opacity:[1,0]},{duration:.2}).finished]),this.open=!1}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",e=>{var t;e.key==="Escape"?lt.close():e.key==="Tab"&&((t=e.target)!=null&&t.tagName.includes("W3M-")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var e;(e=this.abortController)==null||e.abort(),this.abortController=void 0}managedModalContextTemplate(){const{isStandalone:e}=T.state;return e?null:y`<w3m-account-context></w3m-account-context><w3m-network-context></w3m-network-context>`}render(){const e={"w3m-overlay":!0,"w3m-open":this.open};return y`<w3m-explorer-context></w3m-explorer-context><w3m-theme-context></w3m-theme-context>${this.managedModalContextTemplate()}<div id="w3m-modal" class="${pt(e)}" @click="${this.onCloseModal}" role="alertdialog" aria-modal="true"><div class="w3m-container" tabindex="0">${this.open?y`<w3m-modal-backcard></w3m-modal-backcard><div class="w3m-card"><w3m-modal-router></w3m-modal-router><w3m-modal-toast></w3m-modal-toast></div>`:null}</div></div>`}};Ze.styles=[N.globalCss,Qc],Fo([K()],Ze.prototype,"open",2),Ze=Fo([L("w3m-modal")],Ze);const e1=D`:host{all:initial}w3m-network-image{margin-left:-6px;margin-right:6px;width:28px;height:28px}`;var n1=Object.defineProperty,r1=Object.getOwnPropertyDescriptor,Pn=(e,t,n,i)=>{for(var r=i>1?void 0:i?r1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&n1(t,n,r),r};let qt=class extends B{constructor(){super(),this.chainId="",this.label="",this.wrongNetwork=!1,this.unsubscribeNetwork=void 0,A.rejectStandaloneButtonComponent();const{selectedChain:e}=T.state;this.onSetChainData(e),this.unsubscribeNetwork=T.subscribe(({selectedChain:t})=>{this.onSetChainData(t)})}disconnectedCallback(){var e;(e=this.unsubscribeNetwork)==null||e.call(this)}onSetChainData(e){if(e){const{chains:t}=T.state,n=t?.map(i=>i.id);this.chainId=e.id.toString(),this.wrongNetwork=!(n!=null&&n.includes(e.id)),this.label=this.wrongNetwork?"Wrong Network":e.name}}onClick(){lt.open({route:"SelectNetwork"})}render(){var e;const{chains:t}=T.state,n=t&&t.length>1;return y`<w3m-button-big @click="${this.onClick}" ?disabled="${!n}"><w3m-network-image chainId="${mt(this.chainId)}"></w3m-network-image><w3m-text variant="medium-regular" color="inverse">${(e=this.label)!=null&&e.length?this.label:"Select Network"}</w3m-text></w3m-button-big>`}};qt.styles=[N.globalCss,e1],Pn([K()],qt.prototype,"chainId",2),Pn([K()],qt.prototype,"label",2),Pn([K()],qt.prototype,"wrongNetwork",2),qt=Pn([L("w3m-network-switch")],qt);const i1=D`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--w3m-button-hover-highlight-border-radius);transition:background-color .2s ease;height:100%;justify-content:flex-start}.w3m-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--w3m-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--w3m-color-bg-2);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay)}button:hover{background-color:var(--w3m-color-overlay)}.w3m-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--w3m-wallet-icon-border-radius)/ 2);border:1px solid var(--w3m-color-overlay)}.w3m-icons svg{width:21px;height:21px}.w3m-icons img:nth-child(1),.w3m-icons img:nth-child(2),.w3m-icons svg:nth-child(1),.w3m-icons svg:nth-child(2){margin-bottom:4px}w3m-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--w3m-color-bg-3)}#wallet-placeholder-dash{stroke:var(--w3m-color-overlay)}`;var o1=Object.defineProperty,s1=Object.getOwnPropertyDescriptor,a1=(e,t,n,i)=>{for(var r=i>1?void 0:i?s1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&o1(t,n,r),r};let Vr=class extends B{onClick(){z.push("WalletExplorer")}render(){const{previewWallets:e}=ot.state,t=A.getCustomWallets(),n=[...e,...t].reverse().slice(0,4);return y`<button @click="${this.onClick}"><div class="w3m-icons">${n.map(i=>{var r;const o=(r=i.image_url)==null?void 0:r.lg;if(o)return y`<img src="${o}">`;const a=A.getWalletId(i.id),c=A.getWalletIcon(a);return c?y`<img src="${c}">`:U.WALLET_PLACEHOLDER})}</div><w3m-text variant="xsmall-regular">View All</w3m-text></button>`}};Vr.styles=[N.globalCss,i1],Vr=a1([L("w3m-view-all-wallets-button")],Vr);const l1=D`.w3m-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var c1=Object.defineProperty,d1=Object.getOwnPropertyDescriptor,Ho=(e,t,n,i)=>{for(var r=i>1?void 0:i?d1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&c1(t,n,r),r};let Sn=class extends B{constructor(){super(),this.uri="",this.createConnectionAndWait()}get overlayEl(){return A.getShadowRootElement(this,".w3m-qr-container")}async createConnectionAndWait(e=0){var t;H.removeWalletConnectDeepLink();try{const{standaloneUri:n}=T.state;n?setTimeout(()=>this.uri=n,0):(await X.client().connectWalletConnect(i=>this.uri=i,(t=T.state.selectedChain)==null?void 0:t.id),lt.close())}catch(n){console.error(n),ct.openToast("Connection request declined","error"),e<2&&this.createConnectionAndWait(e+1)}}render(){return y`<div class="w3m-qr-container">${this.uri?y`<w3m-qrcode size="${this.overlayEl.offsetWidth}" uri="${this.uri}"></w3m-qrcode>`:y`<w3m-spinner></w3m-spinner>`}</div>`}};Sn.styles=[N.globalCss,l1],Ho([K()],Sn.prototype,"uri",2),Sn=Ho([L("w3m-walletconnect-qr")],Sn);const h1=D`.w3m-profile{display:flex;justify-content:space-between;align-items:flex-start;padding-top:20px}.w3m-connection-badge{background-color:var(--w3m-color-bg-2);box-shadow:inset 0 0 0 1px var(--w3m-color-overlay);padding:6px 10px 6px 26px;position:relative;border-radius:28px}.w3m-connection-badge::before{content:'';position:absolute;width:10px;height:10px;left:10px;background-color:var(--w3m-success-color);border-radius:50%;top:50%;margin-top:-5px;box-shadow:0 1px 4px 1px var(--w3m-success-color),inset 0 0 0 1px var(--w3m-color-overlay)}.w3m-footer{display:flex;justify-content:space-between}w3m-address-text{margin-top:10px;display:block}.w3m-balance{border-top:1px solid var(--w3m-color-bg-2);padding:11px 20px}`;var u1=Object.defineProperty,p1=Object.getOwnPropertyDescriptor,m1=(e,t,n,i)=>{for(var r=i>1?void 0:i?p1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&u1(t,n,r),r};let zr=class extends B{onDisconnect(){lt.close(),X.client().disconnect(),J.resetAccount()}async onCopyAddress(){var e;await navigator.clipboard.writeText((e=J.state.address)!=null?e:""),ct.openToast("Address copied","success")}render(){return y`<w3m-modal-content><div class="w3m-profile"><div class="w3m-info"><w3m-avatar size="medium"></w3m-avatar><w3m-address-text variant="modal"></w3m-address-text></div><div class="w3m-connection-badge"><w3m-text variant="small-regular" color="secondary">Connected</w3m-text></div></div></w3m-modal-content><div class="w3m-balance"><w3m-balance></w3m-balance></div><w3m-modal-footer><div class="w3m-footer"><w3m-account-network-button></w3m-account-network-button><w3m-box-button label="Copy Address" .onClick="${this.onCopyAddress}" .icon="${U.ACCOUNT_COPY}"></w3m-box-button><w3m-box-button label="Disconnect" .onClick="${this.onDisconnect}" .icon="${U.ACCOUNT_DISCONNECT}"></w3m-box-button></div></w3m-modal-footer>`}};zr.styles=[N.globalCss,h1],zr=m1([L("w3m-account-view")],zr);var f1=Object.defineProperty,g1=Object.getOwnPropertyDescriptor,w1=(e,t,n,i)=>{for(var r=i>1?void 0:i?g1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&f1(t,n,r),r};let Zr=class extends B{viewTemplate(){return H.isAndroid()?y`<w3m-android-wallet-selection></w3m-android-wallet-selection>`:H.isMobile()?y`<w3m-mobile-wallet-selection></w3m-mobile-wallet-selection>`:y`<w3m-desktop-wallet-selection></w3m-desktop-wallet-selection>`}render(){return y`${this.viewTemplate()}<w3m-legal-notice></w3m-legal-notice>`}};Zr.styles=[N.globalCss],Zr=w1([L("w3m-connect-wallet-view")],Zr);const v1=D`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}`;var b1=Object.defineProperty,y1=Object.getOwnPropertyDescriptor,x1=(e,t,n,i)=>{for(var r=i>1?void 0:i?y1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&b1(t,n,r),r};let Gr=class extends B{async onConnectorWallet(e){await A.handleConnectorConnection(e)}connectorWalletsTemplate(){let e=ht.connectorWallets();return window.ethereum||(e=e.filter(({id:t})=>t!=="injected"&&t!==ve.metaMask)),e.map(({name:t,id:n,ready:i})=>y`<w3m-wallet-button .installed="${["injected","metaMask"].includes(n)&&i}" name="${t}" walletId="${n}" .onClick="${async()=>this.onConnectorWallet(n)}"></w3m-wallet-button>`)}render(){const e=this.connectorWalletsTemplate();return y`<w3m-modal-header title="Other wallets"></w3m-modal-header><w3m-modal-content><div class="w3m-grid">${e}</div></w3m-modal-content>`}};Gr.styles=[N.globalCss,v1],Gr=x1([L("w3m-connectors-view")],Gr);const C1=D`.w3m-wrapper{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;flex-direction:column}.w3m-connecting-title{display:flex;align-items:center;justify-content:center;margin-bottom:16px}w3m-spinner{margin-right:10px}w3m-wallet-image{border-radius:15px;width:25%;aspect-ratio:1/1;margin-bottom:20px}.w3m-install-actions{display:flex}.w3m-install-actions w3m-button{margin:0 5px;opacity:1}`;var E1=Object.defineProperty,I1=Object.getOwnPropertyDescriptor,Vo=(e,t,n,i)=>{for(var r=i>1?void 0:i?I1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&E1(t,n,r),r};let Ln=class extends B{constructor(){super(),this.uri="",this.createConnectionAndWait()}getRouterData(){var e;const t=(e=z.state.data)==null?void 0:e.DesktopConnector;if(!t)throw new Error("Missing router data");return t}onFormatAndRedirect(e){const{native:t,universal:n,name:i}=this.getRouterData();if(t){const r=H.formatNativeUrl(t,e,i);H.openHref(r,"_self")}else if(n){const r=H.formatUniversalUrl(n,e,i);H.openHref(r,"_blank")}}async createConnectionAndWait(e=0){var t;H.removeWalletConnectDeepLink();const{standaloneUri:n}=T.state,{name:i,walletId:r,native:o,universal:a,icon:c}=this.getRouterData(),h={name:i,id:r,links:{native:o,universal:a},image:c};if(n)A.setRecentWallet(h),this.onFormatAndRedirect(n);else try{await X.client().connectWalletConnect(p=>{this.uri=p,this.onFormatAndRedirect(p)},(t=T.state.selectedChain)==null?void 0:t.id),A.setRecentWallet(h),lt.close()}catch{ct.openToast("Connection request declined","error"),e<2&&this.createConnectionAndWait(e+1)}}onConnectWithMobile(){z.push("Qrcode")}onGoToWallet(){const{universal:e,name:t}=this.getRouterData();if(e){const n=H.formatUniversalUrl(e,this.uri,t);H.openHref(n,"_blank")}}render(){const{name:e,icon:t,universal:n,walletId:i}=this.getRouterData(),r=A.getWalletName(e);return y`<w3m-modal-header title="${r}"></w3m-modal-header><w3m-modal-content><div class="w3m-wrapper">${t?y`<w3m-wallet-image src="${t}" size="lg"></w3m-wallet-image>`:y`<w3m-wallet-image size="lg" walletid="${mt(i)}"></w3m-wallet-image>`}<div class="w3m-connecting-title"><w3m-spinner></w3m-spinner><w3m-text variant="big-bold" color="secondary">${`Continue in ${r}...`}</w3m-text></div><div class="w3m-install-actions"><w3m-button .onClick="${async()=>this.createConnectionAndWait()}" .iconRight="${U.RETRY_ICON}">Retry</w3m-button>${n?y`<w3m-button .onClick="${this.onGoToWallet.bind(this)}" .iconLeft="${U.ARROW_UP_RIGHT_ICON}">Go to Wallet</w3m-button>`:y`<w3m-button .onClick="${this.onConnectWithMobile}" .iconLeft="${U.MOBILE_ICON}">Connect with Mobile</w3m-button>`}</div></div></w3m-modal-content>`}};Ln.styles=[N.globalCss,C1],Vo([K()],Ln.prototype,"uri",2),Ln=Vo([L("w3m-desktop-connector-view")],Ln);const $1=D`.w3m-info-text{margin:5px 0 15px;max-width:320px;text-align:center}.w3m-wallet-item{margin:0 -20px 0 0;padding-right:20px;display:flex;align-items:center;border-bottom:1px solid var(--w3m-color-bg-2)}.w3m-wallet-item:last-child{margin-bottom:-20px;border-bottom:0}.w3m-wallet-content{margin-left:20px;height:60px;display:flex;flex:1;align-items:center;justify-content:space-between}.w3m-footer-actions{display:flex;flex-direction:column;align-items:center;padding:20px 0;border-top:1px solid var(--w3m-color-bg-2)}w3m-wallet-image{display:block;width:40px;height:40px;border-radius:10px}`;var A1=Object.defineProperty,k1=Object.getOwnPropertyDescriptor,O1=(e,t,n,i)=>{for(var r=i>1?void 0:i?k1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&A1(t,n,r),r};let Kr=class extends B{onGet(e){H.openHref(e,"_blank")}render(){const{recomendedWallets:e}=ot.state,t=A.getCustomWallets().slice(0,6),n=e.length,i=t.length;return y`<w3m-modal-header title="Get a wallet"></w3m-modal-header><w3m-modal-content>${n?e.map(({name:r,image_url:o,homepage:a})=>y`<div class="w3m-wallet-item"><w3m-wallet-image src="${o.lg}"></w3m-wallet-image><div class="w3m-wallet-content"><w3m-text variant="medium-regular">${r}</w3m-text><w3m-button .iconRight="${U.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGet(a)}">Get</w3m-button></div></div>`):null} ${i?t.map(({name:r,id:o,links:a})=>y`<div class="w3m-wallet-item"><w3m-wallet-image walletId="${o}"></w3m-wallet-image><div class="w3m-wallet-content"><w3m-text variant="medium-regular">${r}</w3m-text><w3m-button .iconRight="${U.ARROW_RIGHT_ICON}" .onClick="${()=>this.onGet(a.universal)}">Get</w3m-button></div></div>`):null}</w3m-modal-content><div class="w3m-footer-actions"><w3m-text variant="medium-regular">Not what you're looking for?</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">With hundreds of wallets out there, there's something for everyone</w3m-text><w3m-button .onClick="${A.openWalletExplorerUrl}" .iconRight="${U.ARROW_UP_RIGHT_ICON}">Explore Wallets</w3m-button></div>`}};Kr.styles=[N.globalCss,$1],Kr=O1([L("w3m-get-wallet-view")],Kr);const _1=D`.w3m-footer-actions{display:flex;justify-content:center}.w3m-footer-actions w3m-button{margin:0 5px}.w3m-info-container{display:flex;flex-direction:column;justify-content:center;align-items:center;margin-bottom:20px}.w3m-info-container:last-child{margin-bottom:0}.w3m-info-text{margin-top:5px;text-align:center}.w3m-images svg{margin:0 2px 5px;width:55px;height:55px}.help-img-highlight{stroke:var(--w3m-color-overlay)}`;var M1=Object.defineProperty,T1=Object.getOwnPropertyDescriptor,B1=(e,t,n,i)=>{for(var r=i>1?void 0:i?T1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&M1(t,n,r),r};let qr=class extends B{constructor(){super(...arguments),this.learnUrl="https://ethereum.org/en/wallets/"}onGet(){it.state.enableExplorer?z.push("GetWallet"):A.openWalletExplorerUrl()}onLearnMore(){H.openHref(this.learnUrl,"_blank")}render(){return y`<w3m-modal-header title="What is a wallet?"></w3m-modal-header><w3m-modal-content><div class="w3m-info-container"><div class="w3m-images">${U.HELP_CHART_IMG} ${U.HELP_PAINTING_IMG} ${U.HELP_ETH_IMG}</div><w3m-text variant="medium-regular">A home for your digital assets</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs.</w3m-text></div><div class="w3m-info-container"><div class="w3m-images">${U.HELP_KEY_IMG} ${U.HELP_USER_IMG} ${U.HELP_LOCK_IMG}</div><w3m-text variant="medium-regular">One login for all of web3</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">Log in to any app by connecting your wallet. Say goodbye to countless passwords!</w3m-text></div><div class="w3m-info-container"><div class="w3m-images">${U.HELP_COMPAS_IMG} ${U.HELP_NOUN_IMG} ${U.HELP_DAO_IMG}</div><w3m-text variant="medium-regular">Your gateway to a new web</w3m-text><w3m-text variant="small-thin" color="secondary" class="w3m-info-text">With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more.</w3m-text></div><div class="w3m-footer-actions"><w3m-button .onClick="${this.onGet.bind(this)}" .iconLeft="${U.WALLET_ICON}">Get a Wallet</w3m-button><w3m-button .onClick="${this.onLearnMore.bind(this)}" .iconRight="${U.ARROW_UP_RIGHT_ICON}">Learn More</w3m-button></div></w3m-modal-content>`}};qr.styles=[N.globalCss,_1],qr=B1([L("w3m-help-view")],qr);const P1=D`.w3m-injected-wrapper{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;flex-direction:column}.w3m-connecting-title{display:flex;align-items:center;justify-content:center;margin-bottom:20px}w3m-spinner{margin-right:10px}w3m-wallet-image{border-radius:15px;width:25%;aspect-ratio:1/1;margin-bottom:20px}w3m-button{opacity:0}.w3m-injected-error w3m-button{opacity:1}`;var S1=Object.defineProperty,L1=Object.getOwnPropertyDescriptor,Yr=(e,t,n,i)=>{for(var r=i>1?void 0:i?L1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&S1(t,n,r),r};let Ge=class extends B{constructor(){super(),this.connecting=!0,this.error=!1,this.connector=X.client().getConnectorById("injected"),this.onConnect()}async onConnect(){const{ready:e}=this.connector;e&&(this.error=!1,this.connecting=!0,await A.handleConnectorConnection("injected",()=>{this.error=!0,this.connecting=!1}))}render(){const e=A.getWalletName(this.connector.name),t=A.getWalletId(this.connector.id),n={"w3m-injected-wrapper":!0,"w3m-injected-error":this.error};return y`<w3m-modal-header title="${e}"></w3m-modal-header><w3m-modal-content><div class="${pt(n)}"><w3m-wallet-image walletId="${t}" size="lg"></w3m-wallet-image><div class="w3m-connecting-title">${this.connecting?y`<w3m-spinner></w3m-spinner>`:null}<w3m-text variant="big-bold" color="${this.error?"error":"secondary"}">${this.error?"Connection declined":`Continue in ${e}...`}</w3m-text></div><w3m-button .onClick="${this.onConnect.bind(this)}" .disabled="${!this.error}" .iconRight="${U.RETRY_ICON}">Try Again</w3m-button></div></w3m-modal-content>`}};Ge.styles=[N.globalCss,P1],Yr([K()],Ge.prototype,"connecting",2),Yr([K()],Ge.prototype,"error",2),Ge=Yr([L("w3m-injected-connector-view")],Ge);const N1=D`.w3m-injected-wrapper{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;flex-direction:column}.w3m-connecting-title{display:flex;align-items:center;justify-content:center;margin-bottom:16px}.w3m-install-title{display:flex;align-items:center;justify-content:center;flex-direction:column}.w3m-install-title w3m-text:last-child{margin-top:10px;max-width:240px}.w3m-install-actions{display:flex;margin-top:15px;align-items:center;flex-direction:column}@media(max-width:355px){.w3m-install-actions{flex-direction:column;align-items:center}}w3m-wallet-image{border-radius:15px;width:25%;aspect-ratio:1/1;margin-bottom:20px}w3m-button{opacity:0}.w3m-install-actions w3m-button{margin:5px;opacity:1}.w3m-info-text{text-align:center}`;var R1=Object.defineProperty,j1=Object.getOwnPropertyDescriptor,D1=(e,t,n,i)=>{for(var r=i>1?void 0:i?j1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&R1(t,n,r),r};let Jr=class extends B{getRouterData(){var e;const t=(e=z.state.data)==null?void 0:e.InstallConnector;if(!t)throw new Error("Missing router data");return t}onInstall(){const{url:e}=this.getRouterData();H.openHref(e,"_blank")}onMobile(){const{name:e}=this.getRouterData();z.push("ConnectWallet"),ct.openToast(`Scan the code with ${e}`,"success")}render(){const{name:e,id:t,isMobile:n}=this.getRouterData();return y`<w3m-modal-header title="${e}"></w3m-modal-header><w3m-modal-content><div class="w3m-injected-wrapper"><w3m-wallet-image walletId="${t}" size="lg"></w3m-wallet-image><div class="w3m-install-title"><w3m-text variant="big-bold">Install ${e}</w3m-text><w3m-text color="secondary" variant="small-thin" class="w3m-info-text">To connect ${e}, install the browser extension.</w3m-text></div><div class="w3m-install-actions"><w3m-button .onClick="${this.onInstall.bind(this)}" .iconLeft="${U.ARROW_DOWN_ICON}">Install Extension</w3m-button>${n?y`<w3m-button .onClick="${this.onMobile.bind(this)}" .iconLeft="${U.MOBILE_ICON}">${e} Mobile</w3m-button>`:null}</div></div></w3m-modal-content>`}};Jr.styles=[N.globalCss,N1],Jr=D1([L("w3m-install-connector-view")],Jr);var U1=Object.defineProperty,W1=Object.getOwnPropertyDescriptor,F1=(e,t,n,i)=>{for(var r=i>1?void 0:i?W1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&U1(t,n,r),r};let Qr=class extends B{render(){return y`<w3m-modal-header title="Scan the code" .onAction="${A.handleUriCopy}" .actionIcon="${U.COPY_ICON}"></w3m-modal-header><w3m-modal-content><w3m-walletconnect-qr></w3m-walletconnect-qr></w3m-modal-content>`}};Qr.styles=[N.globalCss],Qr=F1([L("w3m-qrcode-view")],Qr);const H1=D`.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);margin:-5px -10px;justify-content:space-between}`;var V1=Object.defineProperty,z1=Object.getOwnPropertyDescriptor,Z1=(e,t,n,i)=>{for(var r=i>1?void 0:i?z1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&V1(t,n,r),r};let Xr=class extends B{async onSelectChain(e){try{const{selectedChain:t,walletConnectVersion:n}=T.state,{isConnected:i}=J.state;i?t?.id===e.id?z.replace("Account"):n===2?(await X.client().switchNetwork({chainId:e.id}),z.replace("Account")):z.push("SwitchNetwork",{SwitchNetwork:e}):(z.push("ConnectWallet"),T.setSelectedChain(e))}catch(t){console.error(t),ct.openToast(A.getErrorMessage(t),"error")}}render(){const{chains:e}=T.state;return y`<w3m-modal-header title="Select network"></w3m-modal-header><w3m-modal-content><div class="w3m-grid">${e?.map(t=>y`<w3m-network-button name="${t.name}" chainId="${t.id}" .onClick="${async()=>this.onSelectChain(t)}">${t.name}</w3m-network-button>`)}</div></w3m-modal-content>`}};Xr.styles=[N.globalCss,H1],Xr=Z1([L("w3m-select-network-view")],Xr);const G1=D`.w3m-wrapper{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1/1;flex-direction:column}.w3m-connecting-title{display:flex;align-items:center;justify-content:center;margin-bottom:16px}w3m-spinner{margin-right:10px}w3m-network-image{width:96px;height:96px;margin-bottom:20px}w3m-button{opacity:0}.w3m-error w3m-button{opacity:1}`;var K1=Object.defineProperty,q1=Object.getOwnPropertyDescriptor,zo=(e,t,n,i)=>{for(var r=i>1?void 0:i?q1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&K1(t,n,r),r};let Nn=class extends B{constructor(){super(),this.error=!1,this.onSwitchNetwork()}getRouterData(){var e;const t=(e=z.state.data)==null?void 0:e.SwitchNetwork;if(!t)throw new Error("Missing router data");return t}async onSwitchNetwork(){try{this.error=!1;const e=this.getRouterData();await X.client().switchNetwork({chainId:e.id}),T.setSelectedChain(e),z.replace("Account")}catch{this.error=!0}}render(){const{id:e,name:t}=this.getRouterData(),n={"w3m-wrapper":!0,"w3m-error":this.error};return y`<w3m-modal-header title="${`Connect to ${t}`}"></w3m-modal-header><w3m-modal-content><div class="${pt(n)}"><w3m-network-image chainId="${e}"></w3m-network-image><div class="w3m-connecting-title">${this.error?null:y`<w3m-spinner></w3m-spinner>`}<w3m-text variant="big-bold" color="${this.error?"error":"secondary"}">${this.error?"Connection declined":"Approve in your wallet"}</w3m-text></div><w3m-button .onClick="${this.onSwitchNetwork.bind(this)}" .disabled="${!this.error}" .iconRight="${U.RETRY_ICON}">Try Again</w3m-button></div></w3m-modal-content>`}};Nn.styles=[N.globalCss,G1],zo([K()],Nn.prototype,"error",2),Nn=zo([L("w3m-switch-network-view")],Nn);const Y1=D`w3m-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.w3m-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}w3m-modal-content::after,w3m-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}w3m-modal-content::before{box-shadow:0 -1px 0 0 var(--w3m-color-bg-1);background:linear-gradient(var(--w3m-color-bg-1),rgba(255,255,255,0))}w3m-modal-content::after{box-shadow:0 1px 0 0 var(--w3m-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--w3m-color-bg-1));top:calc(100% - 20px)}w3m-modal-content::-webkit-scrollbar{display:none}.w3m-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.w3m-empty,.w3m-loading{display:flex}.w3m-loading .w3m-placeholder-block{height:100%}.w3m-end-reached .w3m-placeholder-block{height:0;opacity:0}.w3m-empty .w3m-placeholder-block{opacity:1;height:100%}w3m-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var J1=Object.defineProperty,Q1=Object.getOwnPropertyDescriptor,Ke=(e,t,n,i)=>{for(var r=i>1?void 0:i?Q1(t,n):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(r=(i?a(t,n,r):a(r))||r);return i&&r&&J1(t,n,r),r};const ti=40;let Yt=class extends B{constructor(){super(...arguments),this.loading=!ot.state.wallets.listings.length,this.firstFetch=!ot.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=A.debounce(e=>{e.length>=3?(this.firstFetch=!0,this.endReached=!1,this.search=e,ot.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),ot.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var e;(e=this.intersectionObserver)==null||e.disconnect()}get placeholderEl(){return A.getShadowRootElement(this,".w3m-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([e])=>{e.isIntersecting&&!(this.search&&this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:e,search:t}=ot.state,{listings:n,total:i}=this.search?t:e;return i<=ti||n.length>=i}async fetchWallets(){var e;const{wallets:t,search:n}=ot.state,i=A.getExtensionWallets(),{listings:r,total:o,page:a}=this.search?n:t;if(!this.endReached&&(this.firstFetch||o>ti&&r.length<o))try{this.loading=!0;const c=(e=T.state.standaloneChains)==null?void 0:e.join(","),{listings:h}=await ot.getPaginatedWallets({page:this.firstFetch?1:a+1,entries:ti,device:H.isMobile()?"mobile":"desktop",search:this.search,version:T.state.walletConnectVersion,chains:c}),p=h.map(({image_url:v})=>v.lg),f=i.map(({id:v})=>A.getWalletIcon(v));await Promise.all([...p.map(async v=>A.preloadImage(v)),...f.map(async v=>A.preloadImage(v)),H.wait(300)]),this.endReached=this.isLastPage()}catch(c){console.error(c),ct.openToast(A.getErrorMessage(c),"error")}finally{this.loading=!1,this.firstFetch=!1}}onConnectCustom({name:e,id:t,links:n}){H.isMobile()?A.handleMobileLinking({links:n,name:e,id:t}):z.push("DesktopConnector",{DesktopConnector:{name:e,walletId:t,universal:n.universal,native:n.native}})}onConnectListing(e){if(H.isMobile()){const{id:t,image_url:n}=e,{native:i,universal:r}=e.mobile;A.handleMobileLinking({links:{native:i,universal:r},name:e.name,id:t,image:n.lg})}else z.push("DesktopConnector",{DesktopConnector:{name:e.name,icon:e.image_url.lg,universal:e.desktop.universal||e.homepage,native:e.desktop.native}})}onConnectExtension(e){A.getWalletId("")===e.id?z.push("InjectedConnector"):z.push("InstallConnector",{InstallConnector:e})}onSearchChange(e){const{value:t}=e.target;this.searchDebounce(t)}render(){const{wallets:e,search:t}=ot.state,{isStandalone:n}=T.state;let{listings:i}=this.search?t:e;i=ht.allowedExplorerListings(i);const r=this.loading&&!i.length,o=this.search.length>=3;let a=!n&&!H.isMobile()?A.getExtensionWallets():[],c=A.getCustomWallets();o&&(a=a.filter(({name:v})=>A.caseSafeIncludes(v,this.search)),c=c.filter(({name:v})=>A.caseSafeIncludes(v,this.search)));const h=!this.loading&&!i.length&&!a.length,p=Math.max(a.length,i.length),f={"w3m-loading":r,"w3m-end-reached":this.endReached||!this.loading,"w3m-empty":h};return y`<w3m-modal-header><w3m-search-input .onChange="${this.onSearchChange.bind(this)}"></w3m-search-input></w3m-modal-header><w3m-modal-content class="${pt(f)}"><div class="w3m-grid">${r?null:[...Array(p)].map((v,w)=>y`${c[w]?y`<w3m-wallet-button name="${c[w].name}" walletId="${c[w].id}" .onClick="${()=>this.onConnectCustom(c[w])}"></w3m-wallet-button>`:null} ${a[w]?y`<w3m-wallet-button name="${a[w].name}" walletId="${a[w].id}" .onClick="${()=>this.onConnectExtension(a[w])}"></w3m-wallet-button>`:null} ${i[w]?y`<w3m-wallet-button src="${i[w].image_url.lg}" name="${i[w].name}" walletId="${i[w].id}" .onClick="${()=>this.onConnectListing(i[w])}"></w3m-wallet-button>`:null}`)}</div><div class="w3m-placeholder-block">${h?y`<w3m-text variant="big-bold" color="secondary">No results found</w3m-text>`:null} ${!h&&this.loading?y`<w3m-spinner></w3m-spinner>`:null}</div></w3m-modal-content>`}};Yt.styles=[N.globalCss,Y1],Ke([K()],Yt.prototype,"loading",2),Ke([K()],Yt.prototype,"firstFetch",2),Ke([K()],Yt.prototype,"search",2),Ke([K()],Yt.prototype,"endReached",2),Yt=Ke([L("w3m-wallet-explorer-view")],Yt);var X1=Object.freeze({__proto__:null,get W3mAccountButton(){return ye},get W3mConnectButton(){return Kt},get W3mCoreButton(){return St},get W3mModal(){return Ze},get W3mNetworkSwitch(){return qt}});exports.EthereumProvider=gs,exports.OPTIONAL_EVENTS=cs,exports.OPTIONAL_METHODS=ls,exports.REQUIRED_EVENTS=Xe,exports.REQUIRED_METHODS=Qe,exports.default=Rn;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var T=require("events"),h=require("@walletconnect/utils"),P=require("@walletconnect/universal-provider");function R(n){if(n&&n.__esModule)return n;var t=Object.create(null);return n&&Object.keys(n).forEach(function(e){if(e!=="default"){var s=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:function(){return n[e]}})}}),t.default=n,Object.freeze(t)}const S="wc",j="ethereum_provider",N=`${S}@${2}:${j}:`,q="https://rpc.walletconnect.com/v1/",u=["eth_sendTransaction","personal_sign"],D=["eth_accounts","eth_requestAccounts","eth_call","eth_getBalance","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],m=["chainChanged","accountsChanged"],$=["message","disconnect","connect"];var U=Object.defineProperty,Q=Object.defineProperties,L=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,_=(n,t,e)=>t in n?U(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,O=(n,t)=>{for(var e in t||(t={}))V.call(t,e)&&_(n,e,t[e]);if(w)for(var e of w(t))H.call(t,e)&&_(n,e,t[e]);return n},y=(n,t)=>Q(n,L(t));function I(n){return Number(n[0].split(":")[1])}function C(n){return`0x${n.toString(16)}`}function z(n){const{chains:t,optionalChains:e,methods:s,optionalMethods:i,events:a,optionalEvents:l,rpcMap:c}=n;if(!h.isValidArray(t))throw new Error("Invalid chains");const o=t,r=s||u,E=a||m,b={[I(o)]:c[I(o)]},f={chains:o,methods:r,events:E,rpcMap:b},d=a?.filter(v=>!m.includes(v)),p=s?.filter(v=>!u.includes(v));if(!e&&!l&&!i&&!(d!=null&&d.length)&&!(p!=null&&p.length))return{required:f};const M=d?.length&&p?.length||!e,A={chains:[...new Set(M?o.concat(e||[]):e)],methods:[...new Set(r.concat(i||[]))],events:[...new Set(E.concat(l||[]))],rpcMap:c};return{required:f,optional:A}}class g{constructor(){this.events=new T.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=N,this.on=(t,e)=>(this.events.on(t,e),this),this.once=(t,e)=>(this.events.once(t,e),this),this.removeListener=(t,e)=>(this.events.removeListener(t,e),this),this.off=(t,e)=>(this.events.off(t,e),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const e=new g;return await e.initialize(t),e}async request(t){return await this.signer.request(t,this.formatChainId(this.chainId))}sendAsync(t,e){this.signer.sendAsync(t,e,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(t);const{required:e,optional:s}=z(this.rpc);try{const i=await new Promise(async(l,c)=>{var o;this.rpc.showQrModal&&((o=this.modal)==null||o.subscribeModal(r=>{!r.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),c(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(y(O({namespaces:{[this.namespace]:e}},s&&{optionalNamespaces:{[this.namespace]:s}}),{pairingTopic:t?.pairingTopic})).then(r=>{l(r)}).catch(r=>{c(new Error(r.message))})});if(!i)return;this.setChainIds(this.rpc.chains);const a=h.getAccountsFromNamespaces(i.namespaces,[this.namespace]);this.setAccounts(a),this.events.emit("connect",{chainId:C(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",t=>{const{params:e}=t,{event:s}=e;s.name==="accountsChanged"?(this.accounts=this.parseAccounts(s.data),this.events.emit("accountsChanged",this.accounts)):s.name==="chainChanged"?this.setChainId(this.formatChainId(s.data)):this.events.emit(s.name,s.data),this.events.emit("session_event",t)}),this.signer.on("chainChanged",t=>{const e=parseInt(t);this.chainId=e,this.events.emit("chainChanged",C(this.chainId)),this.persist()}),this.signer.on("session_update",t=>{this.events.emit("session_update",t)}),this.signer.on("session_delete",t=>{this.reset(),this.events.emit("session_delete",t),this.events.emit("disconnect",y(O({},h.getSdkError("USER_DISCONNECTED")),{data:t.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",t=>{var e,s;this.rpc.showQrModal&&((e=this.modal)==null||e.closeModal(),(s=this.modal)==null||s.openModal({uri:t})),this.events.emit("display_uri",t)})}setHttpProvider(t){this.request({method:"wallet_switchEthereumChain",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return typeof t=="string"?t.startsWith(`${this.namespace}:`):!1}formatChainId(t){return`${this.namespace}:${t}`}parseChainId(t){return Number(t.split(":")[1])}setChainIds(t){const e=t.filter(s=>this.isCompatibleChainId(s)).map(s=>this.parseChainId(s));e.length&&(this.chainId=e[0],this.events.emit("chainChanged",C(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const e=this.parseChainId(t);this.chainId=e,this.setHttpProvider(e)}}parseAccountId(t){const[e,s,i]=t.split(":");return{chainId:`${e}:${s}`,address:i}}setAccounts(t){this.accounts=t.filter(e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId).map(e=>this.parseAccountId(e).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(t){var e,s;return{chains:((e=t.chains)==null?void 0:e.map(i=>this.formatChainId(i)))||[`${this.namespace}:1`],optionalChains:t.optionalChains?t.optionalChains.map(i=>this.formatChainId(i)):void 0,methods:t?.methods||u,events:t?.events||m,optionalMethods:t?.optionalMethods||[],optionalEvents:t?.optionalEvents||[],rpcMap:t?.rpcMap||this.buildRpcMap(t.chains.concat(t.optionalChains||[]),t.projectId),showQrModal:(s=t?.showQrModal)!=null?s:!0,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,e){const s={};return t.forEach(i=>{s[i]=this.getRpcUrl(i,e)}),s}async initialize(t){var e,s;if(this.rpc=this.getRpcConfig(t),this.chainId=I(this.rpc.chains),this.signer=await P.UniversalProvider.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal)try{const{Web3Modal:i}=await Promise.resolve().then(function(){return R(require("@web3modal/standalone"))});this.modal=new i({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains,themeMode:(e=this.rpc.qrModalOptions)==null?void 0:e.themeMode,themeVariables:(s=this.rpc.qrModalOptions)==null?void 0:s.themeVariables})}catch{throw new Error("To use QR modal, please install @web3modal/standalone package")}}loadConnectOpts(t){if(!t)return;const{chains:e,optionalChains:s,rpcMap:i}=t;e&&h.isValidArray(e)&&(this.rpc.chains=e.map(a=>this.formatChainId(a)),e.forEach(a=>{this.rpc.rpcMap[a]=i?.[a]||this.getRpcUrl(a)})),s&&h.isValidArray(s)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=s?.map(a=>this.formatChainId(a)),s.forEach(a=>{this.rpc.rpcMap[a]=i?.[a]||this.getRpcUrl(a)}))}getRpcUrl(t,e){var s;return((s=this.rpc.rpcMap)==null?void 0:s[t])||`${q}?chainId=eip155:${t}&projectId=${e||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`);this.setChainIds(t?[this.formatChainId(t)]:this.session.namespaces[this.namespace].accounts),this.setAccounts(this.session.namespaces[this.namespace].accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(t){return typeof t=="string"||t instanceof String?[this.parseAccount(t)]:t.map(e=>this.parseAccount(e))}}const G=g;exports.EthereumProvider=G,exports.OPTIONAL_EVENTS=$,exports.OPTIONAL_METHODS=D,exports.REQUIRED_EVENTS=m,exports.REQUIRED_METHODS=u,exports.default=g;
|
|
62
2
|
//# sourceMappingURL=index.cjs.js.map
|