(c!=null&&!(2&c.__u)?1:0))for(u=t-1,r=t+1;u>=0||r =u.zero&&g<=u.nine)return g-u.zero;if(g>=u.A&&g<=u.F)return g-(u.A-10);if(g>=u.a&&g<=u.f)return g-(u.a-10)}function f(g,h={}){let b=g;h.size&&((0,n.assertSize)(b,{size:h.size}),b=(0,r.pad)(b,{dir:"right",size:h.size}));let p=b.slice(2);p.length%2&&(p=`0${p}`);const _=p.length/2,j=new Uint8Array(_);for(let P=0,v=0;P<_;P++){const E=d(p.charCodeAt(v++)),l=d(p.charCodeAt(v++));if(E===void 0||l===void 0)throw new e.BaseError(`Invalid byte sequence ("${p[v-2]}${p[v-1]}" in "${p}").`);j[P]=E*16+l}return j}function c(g,h){const b=(0,i.numberToHex)(g,h);return f(b)}function m(g,h={}){const b=a.encode(g);return typeof h.size=="number"?((0,n.assertSize)(b,{size:h.size}),(0,r.pad)(b,{dir:"right",size:h.size})):b}return Ht}var Vo={},Qf;function Ne(){if(Qf)return Vo;Qf=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.keccak256=i;const e=s0(),o=ke(),r=he(),n=te();function i(a,t){const s=t||"hex",u=(0,e.keccak_256)((0,o.isHex)(a,{strict:!1})?(0,r.toBytes)(a):a);return s==="bytes"?u:(0,n.toHex)(u)}return Vo}var En={},Wo={},Ko={},el;function D1(){if(el)return Ko;el=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.hashSignature=n;const e=he(),o=Ne(),r=i=>(0,o.keccak256)((0,e.toBytes)(i));function n(i){return r(i)}return Ko}var jn={},Zo={},tl;function G1(){if(tl)return Zo;tl=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.normalizeSignature=o;const e=se();function o(r){let n=!0,i="",a=0,t="",s=!1;for(let u=0;u=0;){const s=i[0];for(let a=0;a`}};dn.styles=[L.globalCss,Ji];dn=ts([N("wcm-info-footer")],dn);const U={CROSS_ICON:j``,WALLET_CONNECT_LOGO:j``,WALLET_CONNECT_ICON:j``,WALLET_CONNECT_ICON_COLORED:j``,BACK_ICON:j``,COPY_ICON:j``,RETRY_ICON:j``,DESKTOP_ICON:j``,MOBILE_ICON:j``,ARROW_DOWN_ICON:j``,ARROW_UP_RIGHT_ICON:j``,ARROW_RIGHT_ICON:j``,QRCODE_ICON:j``,SCAN_ICON:j``,CHECKMARK_ICON:j``,SEARCH_ICON:j``,WALLET_PLACEHOLDER:j``,GLOBE_ICON:j``},ns=B`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;var rs=Object.defineProperty,os=Object.getOwnPropertyDescriptor,is=(t,e,n,o)=>{for(var r=o>1?void 0:o?os(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&rs(e,n,r),r};let un=class extends S{render(){return f``}};un.styles=[L.globalCss,ns];un=is([N("wcm-modal-backcard")],un);const ss=B`main{padding:20px;padding-top:0;width:100%}`;var ls=Object.defineProperty,as=Object.getOwnPropertyDescriptor,cs=(t,e,n,o)=>{for(var r=o>1?void 0:o?as(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&ls(e,n,r),r};let hn=class extends S{render(){return f`Not Found`}}async onChangeRoute(){await he(this.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,this.view=k.state.view,he(this.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})}render(){return f``}};Ve.styles=[L.globalCss,ws];Rn([q()],Ve.prototype,"view",2);Rn([q()],Ve.prototype,"prevView",2);Ve=Rn([N("wcm-modal-router")],Ve);const ys=B`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;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(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var xs=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,to=(t,e,n,o)=>{for(var r=o>1?void 0:o?$s(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&xs(e,n,r),r};let ct=class extends S{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=re.subscribe(t=>{t.open?(this.open=!0,this.timeout=setTimeout(()=>re.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var t;(t=this.unsubscribe)==null||t.call(this),clearTimeout(this.timeout),re.closeToast()}render(){const{message:t,variant:e}=re.state,n={"wcm-success":e==="success","wcm-error":e==="error"};return this.open?f`${this.viewTemplate()}${e==="success"?U.CHECKMARK_ICON:null} ${e==="error"?U.CROSS_ICON:null}`:null}};ct.styles=[L.globalCss,ys];to([q()],ct.prototype,"open",2);ct=to([N("wcm-modal-toast")],ct);const Cs=.1,Rr=2.5,J=7;function tn(t,e,n){return t===e?!1:(t-e<0?e-t:t-e)<=n+Cs}function _s(t,e){const n=Array.prototype.slice.call(ki.create(t,{errorCorrectionLevel:e}).modules.data,0),o=Math.sqrt(n.length);return n.reduce((r,i,s)=>(s%o===0?r.push([i]):r[r.length-1].push(i))&&r,[])}const Es={generate(t,e,n){const o="#141414",r="#ffffff",i=[],s=_s(t,"Q"),l=e/s.length,a=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];a.forEach(({x:b,y:g})=>{const D=(s.length-J)*l*b,p=(s.length-J)*l*g,E=.45;for(let y=0;y${this.walletId||this.imageUrl?f``}};le.styles=[L.globalCss,As];De([M()],le.prototype,"uri",2);De([M({type:Number})],le.prototype,"size",2);De([M()],le.prototype,"imageId",2);De([M()],le.prototype,"walletId",2);De([M()],le.prototype,"imageUrl",2);le=De([N("wcm-qrcode")],le);const Is=B`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-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:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var Ts=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,no=(t,e,n,o)=>{for(var r=o>1?void 0:o?Rs(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Ts(e,n,r),r};let dt=class extends S{constructor(){super(...arguments),this.onChange=()=>null}render(){return f` ${U.SEARCH_ICON}`}};dt.styles=[L.globalCss,Is];no([M()],dt.prototype,"onChange",2);dt=no([N("wcm-search-input")],dt);const Ms=B`@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(--wcm-accent-color)}`;var Ss=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Ls=(t,e,n,o)=>{for(var r=o>1?void 0:o?Ds(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Ss(e,n,r),r};let mn=class extends S{render(){return f``}};mn.styles=[L.globalCss,Ms];mn=Ls([N("wcm-spinner")],mn);const Ns=B`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var Bs=Object.defineProperty,Ws=Object.getOwnPropertyDescriptor,Mn=(t,e,n,o)=>{for(var r=o>1?void 0:o?Ws(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Bs(e,n,r),r};let Ze=class extends S{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const t={"wcm-big-bold":this.variant==="big-bold","wcm-medium-regular":this.variant==="medium-regular","wcm-small-regular":this.variant==="small-regular","wcm-small-thin":this.variant==="small-thin","wcm-xsmall-regular":this.variant==="xsmall-regular","wcm-xsmall-bold":this.variant==="xsmall-bold","wcm-color-primary":this.color==="primary","wcm-color-secondary":this.color==="secondary","wcm-color-tertiary":this.color==="tertiary","wcm-color-inverse":this.color==="inverse","wcm-color-accnt":this.color==="accent","wcm-color-error":this.color==="error"};return f``:U.WALLET_PLACEHOLDER}`}};Re.styles=[L.globalCss,Hs];pt([M()],Re.prototype,"walletId",2);pt([M()],Re.prototype,"imageId",2);pt([M()],Re.prototype,"imageUrl",2);Re=pt([N("wcm-wallet-image")],Re);var qs=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,ro=(t,e,n,o)=>{for(var r=o>1?void 0:o?Vs(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&qs(e,n,r),r};let pn=class extends S{constructor(){super(),this.preload=!0,this.preloadData()}async loadImages(t){try{t!=null&&t.length&&await Promise.all(t.map(async e=>T.preloadImage(e)))}catch{console.info("Unsuccessful attempt at preloading some images",t)}}async preloadListings(){if(fe.state.enableExplorer){await z.getRecomendedWallets(),K.setIsDataLoaded(!0);const{recomendedWallets:t}=z.state,e=t.map(n=>T.getWalletIcon(n));await this.loadImages(e)}else K.setIsDataLoaded(!0)}async preloadCustomImages(){const t=T.getCustomImageUrls();await this.loadImages(t)}async preloadData(){try{this.preload&&(this.preload=!1,await Promise.all([this.preloadListings(),this.preloadCustomImages()]))}catch(t){console.error(t),re.openToast("Failed preloading","error")}}};ro([q()],pn.prototype,"preload",2);pn=ro([N("wcm-explorer-context")],pn);var Zs=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Ys=(t,e,n,o)=>{for(var r=o>1?void 0:o?Ks(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Zs(e,n,r),r};let Mr=class extends S{constructor(){super(),this.unsubscribeTheme=void 0,L.setTheme(),this.unsubscribeTheme=Pe.subscribe(L.setTheme)}disconnectedCallback(){var t;(t=this.unsubscribeTheme)==null||t.call(this)}};Mr=Ys([N("wcm-theme-context")],Mr);const Gs=B`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Qs=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,Xs=(t,e,n,o)=>{for(var r=o>1?void 0:o?Js(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Qs(e,n,r),r};let gn=class extends S{onGoToQrcode(){k.push("Qrcode")}render(){const{recomendedWallets:t}=z.state,e=[...t,...t],n=O.RECOMMENDED_WALLET_AMOUNT*2;return f`${U.MOBILE_ICON}${this.svgLoaderTemplate()}${U.MOBILE_ICON}${U.SCAN_ICON}${U.DESKTOP_ICON}${a} ${l?f``:null}};vn.styles=[L.globalCss,ll];vn=dl([N("wcm-legal-notice")],vn);const ul=B`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var hl=Object.defineProperty,fl=Object.getOwnPropertyDescriptor,ml=(t,e,n,o)=>{for(var r=o>1?void 0:o?fl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&hl(e,n,r),r};let bn=class extends S{onQrcode(){k.push("Qrcode")}render(){const{explorerExcludedWalletIds:t,enableExplorer:e}=fe.state,n=t!=="ALL"&&e,o=ie.manualWalletsTemplate(),r=ie.recomendedWalletsTemplate();let s=[ie.recentWalletTemplate(),...o,...r];s=s.filter(Boolean);const l=s.length>8||n;let a=[];l?a=s.slice(0,7):a=s;const c=!!a.length;return f`${a} ${l?f``}};Ke.styles=[L.globalCss,pl];Sn([q()],Ke.prototype,"open",2);Sn([q()],Ke.prototype,"active",2);Ke=Sn([N("wcm-modal")],Ke);const vl=B`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var bl=Object.defineProperty,yl=Object.getOwnPropertyDescriptor,Qe=(t,e,n,o)=>{for(var r=o>1?void 0:o?yl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&bl(e,n,r),r};let we=class extends S{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){O.isMobile()?k.replace("MobileConnecting"):k.replace("MobileQrcodeConnecting")}onDesktop(){k.replace("DesktopConnecting")}onWeb(){k.replace("WebConnecting")}render(){return f`${this.open?f``:null}${this.isRetry?f``}};we.styles=[L.globalCss,vl];Qe([M({type:Boolean})],we.prototype,"isMobile",2);Qe([M({type:Boolean})],we.prototype,"isDesktop",2);Qe([M({type:Boolean})],we.prototype,"isWeb",2);Qe([M({type:Boolean})],we.prototype,"isRetry",2);we=Qe([N("wcm-platform-selection")],we);const xl=B`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var $l=Object.defineProperty,Cl=Object.getOwnPropertyDescriptor,_l=(t,e,n,o)=>{for(var r=o>1?void 0:o?Cl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&$l(e,n,r),r};let yn=class extends S{onClick(){k.push("WalletExplorer")}render(){const{recomendedWallets:t}=z.state,e=Ae.manualWallets(),n=[...t,...e].reverse().slice(0,4);return f``}};yn.styles=[L.globalCss,xl];yn=_l([N("wcm-view-all-wallets-button")],yn);const El=B`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var Al=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,gt=(t,e,n,o)=>{for(var r=o>1?void 0:o?Pl(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Al(e,n,r),r};let Me=class extends S{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout(()=>{const{walletConnectUri:t}=K.state;this.uri=t},0)}get overlayEl(){return T.getShadowRootElement(this,".wcm-qr-container")}render(){return f`${this.uri?f``}};Me.styles=[L.globalCss,El];gt([M()],Me.prototype,"walletId",2);gt([M()],Me.prototype,"imageId",2);gt([q()],Me.prototype,"uri",2);Me=gt([N("wcm-walletconnect-qr")],Me);var Ol=Object.defineProperty,Il=Object.getOwnPropertyDescriptor,Tl=(t,e,n,o)=>{for(var r=o>1?void 0:o?Il(e,n):e,i=t.length-1,s;i>=0;i--)(s=t[i])&&(r=(o?s(e,n,r):s(r))||r);return o&&r&&Ol(e,n,r),r};let xn=class extends S{viewTemplate(){return O.isAndroid()&&!O.isTelegram()?f`${o?null:i} ${o?null:s} ${o?null:n.map(c=>f`${c?f`${l?f`5&&(E+=3+R-5)}for(var y=0;y=0?(T>0&&(l.lastNeed=T-1),T):--I=0?(T>0&&(l.lastNeed=T-2),T):--I=0?(T>0&&(T===2?T=0:l.lastNeed=T-3),T):0))}function a(l,R,S){if((R[0]&192)!==128)return l.lastNeed=0,"�";if(l.lastNeed>1&&R.length>1){if((R[1]&192)!==128)return l.lastNeed=1,"�";if(l.lastNeed>2&&R.length>2&&(R[2]&192)!==128)return l.lastNeed=2,"�"}}function p(l){var R=this.lastTotal-this.lastNeed,S=a(this,l);if(S!==void 0)return S;if(this.lastNeed<=l.length)return l.copy(this.lastChar,R,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,R,0,l.length),this.lastNeed-=l.length}function u(l,R){var S=c(this,l,R);if(!this.lastNeed)return l.toString("utf8",R);this.lastTotal=S;var I=l.length-(S-this.lastNeed);return l.copy(this.lastChar,0,I),l.toString("utf8",R,I)}function m(l){var R=l&&l.length?this.write(l):"";return this.lastNeed?R+"�":R}function o(l,R){if((l.length-R)%2===0){var S=l.toString("utf16le",R);if(S){var I=S.charCodeAt(S.length-1);if(I>=55296&&I<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=l[l.length-1],l.toString("utf16le",R,l.length-1)}function h(l){var R=l&&l.length?this.write(l):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return R+this.lastChar.toString("utf16le",0,S)}return R}function s(l,R){var S=(l.length-R)%3;return S===0?l.toString("base64",R):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=l[l.length-1]:(this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1]),l.toString("base64",R,l.length-S))}function f(l){var R=l&&l.length?this.write(l):"";return this.lastNeed?R+this.lastChar.toString("base64",0,3-this.lastNeed):R}function E(l){return l.toString(this.encoding)}function y(l){return l&&l.length?this.write(l):""}return Kn}var Qn,Ra;function Us(){if(Ra)return Qn;Ra=1;var e=Yt().codes.ERR_STREAM_PREMATURE_CLOSE;function r(i){var c=!1;return function(){if(!c){c=!0;for(var a=arguments.length,p=new Array(a),u=0;u0)if(typeof O!="string"&&!le.objectMode&&Object.getPrototypeOf(O)!==t.prototype&&(O=i(O)),Q)le.endEmitted?T(P,new l):Y(P,le,O,!0);else if(le.ended)T(P,new E);else{if(le.destroyed)return!1;le.reading=!1,le.decoder&&!Z?(O=le.decoder.write(O),le.objectMode||O.length!==0?Y(P,le,O,!1):B(P,le)):Y(P,le,O,!1)}else Q||(le.reading=!1,B(P,le))}return!le.ended&&(le.length0;return a(R,I,T,function(q){y||(y=q),q&&l.forEach(p),!I&&(l.forEach(p),E(y))})});return s.reduce(u)}return ni=o,ni}var Aa;function sl(){return Aa||(Aa=1,function(e,r){r=e.exports=nl(),r.Stream=r,r.Readable=r,r.Writable=rl(),r.Duplex=Kt(),r.Transform=il(),r.PassThrough=Ch(),r.finished=Us(),r.pipeline=Mh()}(nn,nn.exports)),nn.exports}var ii,Ta;function kh(){if(Ta)return ii;Ta=1;const{Transform:e}=sl();return ii=r=>class ol extends e{constructor(t,g,i,c,a){super(a),this._rate=t,this._capacity=g,this._delimitedSuffix=i,this._hashBitLength=c,this._options=a,this._state=new r,this._state.initialize(t,g),this._finalized=!1}_transform(t,g,i){let c=null;try{this.update(t,g)}catch(a){c=a}i(c)}_flush(t){let g=null;try{this.push(this.digest())}catch(i){g=i}t(g)}update(t,g){if(!Buffer.isBuffer(t)&&typeof t!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(t)||(t=Buffer.from(t,g)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let g=this._state.squeeze(this._hashBitLength/8);return t!==void 0&&(g=g.toString(t)),this._resetState(),g}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new ol(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}},ii}var si,La;function Ih(){if(La)return si;La=1;const{Transform:e}=sl();return si=r=>class al extends e{constructor(t,g,i,c){super(c),this._rate=t,this._capacity=g,this._delimitedSuffix=i,this._options=c,this._state=new r,this._state.initialize(t,g),this._finalized=!1}_transform(t,g,i){let c=null;try{this.update(t,g)}catch(a){c=a}i(c)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,g){if(!Buffer.isBuffer(t)&&typeof t!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(t)||(t=Buffer.from(t,g)),this._state.absorb(t),this}squeeze(t,g){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(t);return g!==void 0&&(i=i.toString(g)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new al(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}},si}var oi,Ba;function xh(){if(Ba)return oi;Ba=1;const e=kh(),r=Ih();return oi=function(n){const t=e(n),g=r(n);return function(i,c){switch(typeof i=="string"?i.toLowerCase():i){case"keccak224":return new t(1152,448,null,224,c);case"keccak256":return new t(1088,512,null,256,c);case"keccak384":return new t(832,768,null,384,c);case"keccak512":return new t(576,1024,null,512,c);case"sha3-224":return new t(1152,448,6,224,c);case"sha3-256":return new t(1088,512,6,256,c);case"sha3-384":return new t(832,768,6,384,c);case"sha3-512":return new t(576,1024,6,512,c);case"shake128":return new g(1344,256,31,c);case"shake256":return new g(1088,512,31,c);default:throw new Error("Invald algorithm: "+i)}}},oi}var ai={},Na;function Ah(){if(Na)return ai;Na=1;const e=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return ai.p1600=function(r){for(let n=0;n<24;++n){const t=r[0]^r[10]^r[20]^r[30]^r[40],g=r[1]^r[11]^r[21]^r[31]^r[41],i=r[2]^r[12]^r[22]^r[32]^r[42],c=r[3]^r[13]^r[23]^r[33]^r[43],a=r[4]^r[14]^r[24]^r[34]^r[44],p=r[5]^r[15]^r[25]^r[35]^r[45],u=r[6]^r[16]^r[26]^r[36]^r[46],m=r[7]^r[17]^r[27]^r[37]^r[47],o=r[8]^r[18]^r[28]^r[38]^r[48],h=r[9]^r[19]^r[29]^r[39]^r[49];let s=o^(i<<1|c>>>31),f=h^(c<<1|i>>>31);const E=r[0]^s,y=r[1]^f,l=r[10]^s,R=r[11]^f,S=r[20]^s,I=r[21]^f,T=r[30]^s,q=r[31]^f,D=r[40]^s,H=r[41]^f;s=t^(a<<1|p>>>31),f=g^(p<<1|a>>>31);const G=r[2]^s,X=r[3]^f,Y=r[12]^s,re=r[13]^f,F=r[22]^s,d=r[23]^f,_=r[32]^s,C=r[33]^f,M=r[42]^s,x=r[43]^f;s=i^(u<<1|m>>>31),f=c^(m<<1|u>>>31);const B=r[4]^s,j=r[5]^f,A=r[14]^s,b=r[15]^f,N=r[24]^s,te=r[25]^f,K=r[34]^s,$=r[35]^f,W=r[44]^s,J=r[45]^f;s=a^(o<<1|h>>>31),f=p^(h<<1|o>>>31);const ee=r[6]^s,oe=r[7]^f,P=r[16]^s,O=r[17]^f,Z=r[26]^s,Q=r[27]^f,ae=r[36]^s,le=r[37]^f,ne=r[46]^s,fe=r[47]^f;s=u^(t<<1|g>>>31),f=m^(g<<1|t>>>31);const He=r[8]^s,me=r[9]^f,he=r[18]^s,ve=r[19]^f,pe=r[28]^s,we=r[29]^f,je=r[38]^s,ye=r[39]^f,k=r[48]^s,w=r[49]^f,v=E,L=y,U=R<<4|l>>>28,V=l<<4|R>>>28,z=S<<3|I>>>29,de=I<<3|S>>>29,ce=q<<9|T>>>23,ue=T<<9|q>>>23,be=D<<18|H>>>14,se=H<<18|D>>>14,_e=G<<1|X>>>31,At=X<<1|G>>>31,Ee=re<<12|Y>>>20,Re=Y<<12|re>>>20,Tt=F<<10|d>>>22,Se=d<<10|F>>>22,Ce=C<<13|_>>>19,Lt=_<<13|C>>>19,Me=M<<2|x>>>30,ke=x<<2|M>>>30,Bt=j<<30|B>>>2,Ie=B<<30|j>>>2,xe=A<<6|b>>>26,Nt=b<<6|A>>>26,Ae=te<<11|N>>>21,Te=N<<11|te>>>21,Pt=K<<15|$>>>17,Le=$<<15|K>>>17,Be=J<<29|W>>>3,Ot=W<<29|J>>>3,Ne=ee<<28|oe>>>4,Pe=oe<<28|ee>>>4,Ft=O<<23|P>>>9,Oe=P<<23|O>>>9,Fe=Z<<25|Q>>>7,at=Q<<25|Z>>>7,ut=ae<<21|le>>>11,ct=le<<21|ae>>>11,lt=fe<<24|ne>>>8,ht=ne<<24|fe>>>8,dt=He<<27|me>>>5,ft=me<<27|He>>>5,pt=he<<20|ve>>>12,gt=ve<<20|he>>>12,mt=we<<7|pe>>>25,wt=pe<<7|we>>>25,yt=je<<8|ye>>>24,bt=ye<<8|je>>>24,vt=k<<14|w>>>18,_t=w<<14|k>>>18;r[0]=v^~Ee&Ae,r[1]=L^~Re&Te,r[10]=Ne^~pt&z,r[11]=Pe^~gt&de,r[20]=_e^~xe&Fe,r[21]=At^~Nt&at,r[30]=dt^~U&Tt,r[31]=ft^~V&Se,r[40]=Bt^~Ft&mt,r[41]=Ie^~Oe&wt,r[2]=Ee^~Ae&ut,r[3]=Re^~Te&ct,r[12]=pt^~z&Ce,r[13]=gt^~de&Lt,r[22]=xe^~Fe&yt,r[23]=Nt^~at&bt,r[32]=U^~Tt&Pt,r[33]=V^~Se&Le,r[42]=Ft^~mt&ce,r[43]=Oe^~wt&ue,r[4]=Ae^~ut&vt,r[5]=Te^~ct&_t,r[14]=z^~Ce&Be,r[15]=de^~Lt&Ot,r[24]=Fe^~yt&be,r[25]=at^~bt&se,r[34]=Tt^~Pt<,r[35]=Se^~Le&ht,r[44]=mt^~ce&Me,r[45]=wt^~ue&ke,r[6]=ut^~vt&v,r[7]=ct^~_t&L,r[16]=Ce^~Be&Ne,r[17]=Lt^~Ot&Pe,r[26]=yt^~be&_e,r[27]=bt^~se&At,r[36]=Pt^~lt&dt,r[37]=Le^~ht&ft,r[46]=ce^~Me&Bt,r[47]=ue^~ke&Ie,r[8]=vt^~v&Ee,r[9]=_t^~L&Re,r[18]=Be^~Ne&pt,r[19]=Ot^~Pe>,r[28]=be^~_e&xe,r[29]=se^~At&Nt,r[38]=lt^~dt&U,r[39]=ht^~ft&V,r[48]=Me^~Bt&Ft,r[49]=ke^~Ie&Oe,r[0]^=e[n*2],r[1]^=e[n*2+1]}},ai}var ui,Pa;function Th(){if(Pa)return ui;Pa=1;const e=Ah();function r(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}return r.prototype.initialize=function(n,t){for(let g=0;g<50;++g)this.state[g]=0;this.blockSize=n/8,this.count=0,this.squeezing=!1},r.prototype.absorb=function(n){for(let t=0;t
[a-zA-Z$_][a-zA-Z0-9$_]*)(?
q))}}function l(y){const I=y.match(/^(.*)\[(\d+)?\]$/);return I?[I[2]?Number(I[2]):null,I[1]]:void 0}return Pn}var Mr={},In={},ml;function jr(){if(ml)return In;ml=1,Object.defineProperty(In,"__esModule",{value:!0}),In.toFunctionSelector=void 0;const e=it(),o=ku(),r=n=>(0,e.slice)((0,o.toSignatureHash)(n),0,4);return In.toFunctionSelector=r,In}var bl;function Rt(){if(bl)return Mr;bl=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.getAbiItem=a,Mr.isArgOfType=t,Mr.getAmbiguousTypes=s;const e=_e(),o=ke(),r=We(),n=Jr(),i=jr();function a(u){const{abi:d,args:f=[],name:c}=u,m=(0,o.isHex)(c,{strict:!1}),g=d.filter(b=>m?b.type==="function"?(0,i.toFunctionSelector)(b)===c:b.type==="event"?(0,n.toEventSelector)(b)===c:!1:"name"in b&&b.name===c);if(g.length===0)return;if(g.length===1)return g[0];let h;for(const b of g){if(!("inputs"in b))continue;if(!f||f.length===0){if(!b.inputs||b.inputs.length===0)return b;continue}if(!b.inputs||b.inputs.length===0||b.inputs.length!==f.length)continue;if(f.every((_,j)=>{const P="inputs"in b&&b.inputs[j];return P?t(_,P):!1})){if(h&&"inputs"in h&&h.inputs){const _=s(b.inputs,h.inputs,f);if(_)throw new e.AbiItemAmbiguityError({abiItem:b,type:_[0]},{abiItem:h,type:_[1]})}h=b}}return h||g[0]}function t(u,d){const f=typeof u,c=d.type;switch(c){case"address":return(0,r.isAddress)(u,{strict:!1});case"bool":return f==="boolean";case"function":return f==="string";case"string":return f==="string";default:return c==="tuple"&&"components"in d?Object.values(d.components).every((m,g)=>t(Object.values(u)[g],m)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(c)?f==="number"||f==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(c)?f==="string"||u instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(c)?Array.isArray(u)&&u.every(m=>t(m,{...d,type:c.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function s(u,d,f){for(const c in u){const m=u[c],g=d[c];if(m.type==="tuple"&&g.type==="tuple"&&"components"in m&&"components"in g)return s(m.components,g.components,f[c]);const h=[m.type,g.type];if(h.includes("address")&&h.includes("bytes20")?!0:h.includes("address")&&h.includes("string")?(0,r.isAddress)(f[c],{strict:!1}):h.includes("address")&&h.includes("bytes")?(0,r.isAddress)(f[c],{strict:!1}):!1)return h}}return Mr}var hl;function Pr(){if(hl)return Uo;hl=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.encodeEventTopics=d;const e=_e(),o=h0(),r=he(),n=Ne(),i=Jr(),a=st(),t=St(),s=Rt(),u="/docs/contract/encodeEventTopics";function d(c){var P;const{abi:m,eventName:g,args:h}=c;let b=m[0];if(g){const v=(0,s.getAbiItem)({abi:m,name:g});if(!v)throw new e.AbiEventNotFoundError(g,{docsPath:u});b=v}if(b.type!=="event")throw new e.AbiEventNotFoundError(void 0,{docsPath:u});const p=(0,t.formatAbiItem)(b),_=(0,i.toEventSelector)(p);let j=[];if(h&&"inputs"in b){const v=(P=b.inputs)==null?void 0:P.filter(l=>"indexed"in l&&l.indexed),E=Array.isArray(h)?h:Object.values(h).length>0?(v==null?void 0:v.map(l=>h[l.name]))??[]:[];E.length>0&&(j=(v==null?void 0:v.map((l,y)=>Array.isArray(E[y])?E[y].map((I,w)=>f({param:l,value:E[y][w]})):typeof E[y]<"u"&&E[y]!==null?f({param:l,value:E[y]}):null))??[])}return[_,...j]}function f({param:c,value:m}){if(c.type==="string"||c.type==="bytes")return(0,n.keccak256)((0,r.toBytes)(m));if(c.type==="tuple"||c.type.match(/^(.*)\[(\d+)?\]$/))throw new o.FilterTypeNotSupportedError(c.type);return(0,a.encodeAbiParameters)([c],[m])}return Uo}var Jo={},yl;function $u(){if(yl)return Jo;yl=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.createFilterRequestScope=e;function e(o,{method:r}){var i,a;const n={};return o.transport.type==="fallback"&&((a=(i=o.transport).onResponse)==null||a.call(i,({method:t,response:s,status:u,transport:d})=>{u==="success"&&r===t&&(n[s]=d.request)})),t=>n[t]||o.request}return Jo}var gl;function rd(){if(gl)return zo;gl=1,Object.defineProperty(zo,"__esModule",{value:!0}),zo.createContractEventFilter=n;const e=Pr(),o=te(),r=$u();async function n(i,a){const{address:t,abi:s,args:u,eventName:d,fromBlock:f,strict:c,toBlock:m}=a,g=(0,r.createFilterRequestScope)(i,{method:"eth_newFilter"}),h=d?(0,e.encodeEventTopics)({abi:s,args:u,eventName:d}):void 0,b=await i.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof f=="bigint"?(0,o.numberToHex)(f):f,toBlock:typeof m=="bigint"?(0,o.numberToHex)(m):m,topics:h}]});return{abi:s,args:u,eventName:d,id:b,request:g(b),strict:!!c,type:"event"}}return zo}var Yo={},Xo={},pl;function Be(){if(pl)return Xo;pl=1,Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.parseAccount=e;function e(o){return typeof o=="string"?{address:o,type:"json-rpc"}:o}return Xo}var Qo={},ei={},_l;function y0(){if(_l)return ei;_l=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.prepareEncodeFunctionData=a;const e=_e(),o=jr(),r=St(),n=Rt(),i="/docs/contract/encodeFunctionData";function a(t){const{abi:s,args:u,functionName:d}=t;let f=s[0];if(d){const c=(0,n.getAbiItem)({abi:s,args:u,name:d});if(!c)throw new e.AbiFunctionNotFoundError(d,{docsPath:i});f=c}if(f.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:i});return{abi:[f],functionName:(0,o.toFunctionSelector)((0,r.formatAbiItem)(f))}}return ei}var vl;function Ye(){if(vl)return Qo;vl=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.encodeFunctionData=n;const e=Fe(),o=st(),r=y0();function n(i){const{args:a}=i,{abi:t,functionName:s}=(()=>{var c;return i.abi.length===1&&((c=i.functionName)!=null&&c.startsWith("0x"))?i:(0,r.prepareEncodeFunctionData)(i)})(),u=t[0],d=s,f="inputs"in u&&u.inputs?(0,o.encodeAbiParameters)(u.inputs,a??[]):void 0;return(0,e.concatHex)([d,f??"0x"])}return Qo}var ti={},xe={},_t={},El;function nd(){return El||(El=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.solidityPanic=_t.solidityError=_t.panicReasons=void 0,_t.panicReasons={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},_t.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},_t.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}),_t}var ri={},ni={},oi={},vt={},jl;function g0(){if(jl)return vt;jl=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.RecursiveReadLimitExceededError=vt.PositionOutOfBoundsError=vt.NegativeOffsetError=void 0;const e=se();class o extends e.BaseError{constructor({offset:a}){super(`Offset \`${a}\` cannot be negative.`,{name:"NegativeOffsetError"})}}vt.NegativeOffsetError=o;class r extends e.BaseError{constructor({length:a,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${a}\`).`,{name:"PositionOutOfBoundsError"})}}vt.PositionOutOfBoundsError=r;class n extends e.BaseError{constructor({count:a,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${a}\`).`,{name:"RecursiveReadLimitExceededError"})}}return vt.RecursiveReadLimitExceededError=n,vt}var Pl;function oo(){if(Pl)return oi;Pl=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.createCursor=r;const e=g0(),o={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new e.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(n){if(n<0||n>this.bytes.length-1)throw new e.PositionOutOfBoundsError({length:this.bytes.length,position:n})},decrementPosition(n){if(n<0)throw new e.NegativeOffsetError({offset:n});const i=this.position-n;this.assertPosition(i),this.position=i},getReadCount(n){return this.positionReadCount.get(n||this.position)||0},incrementPosition(n){if(n<0)throw new e.NegativeOffsetError({offset:n});const i=this.position+n;this.assertPosition(i),this.position=i},inspectByte(n){const i=n??this.position;return this.assertPosition(i),this.bytes[i]},inspectBytes(n,i){const a=i??this.position;return this.assertPosition(a+n-1),this.bytes.subarray(a,a+n)},inspectUint8(n){const i=n??this.position;return this.assertPosition(i),this.bytes[i]},inspectUint16(n){const i=n??this.position;return this.assertPosition(i+1),this.dataView.getUint16(i)},inspectUint24(n){const i=n??this.position;return this.assertPosition(i+2),(this.dataView.getUint16(i)<<8)+this.dataView.getUint8(i+2)},inspectUint32(n){const i=n??this.position;return this.assertPosition(i+3),this.dataView.getUint32(i)},pushByte(n){this.assertPosition(this.position),this.bytes[this.position]=n,this.position++},pushBytes(n){this.assertPosition(this.position+n.length-1),this.bytes.set(n,this.position),this.position+=n.length},pushUint8(n){this.assertPosition(this.position),this.bytes[this.position]=n,this.position++},pushUint16(n){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,n),this.position+=2},pushUint24(n){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,n>>8),this.dataView.setUint8(this.position+2,n&255),this.position+=3},pushUint32(n){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,n),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const n=this.inspectByte();return this.position++,n},readBytes(n,i){this.assertReadLimit(),this._touch();const a=this.inspectBytes(n);return this.position+=i??n,a},readUint8(){this.assertReadLimit(),this._touch();const n=this.inspectUint8();return this.position+=1,n},readUint16(){this.assertReadLimit(),this._touch();const n=this.inspectUint16();return this.position+=2,n},readUint24(){this.assertReadLimit(),this._touch();const n=this.inspectUint24();return this.position+=3,n},readUint32(){this.assertReadLimit(),this._touch();const n=this.inspectUint32();return this.position+=4,n},get remaining(){return this.bytes.length-this.position},setPosition(n){const i=this.position;return this.assertPosition(n),this.position=n,()=>this.position=i},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const n=this.getReadCount();this.positionReadCount.set(this.position,n+1),n>0&&this.recursiveReadCount++}};function r(n,{recursiveReadLimit:i=8192}={}){const a=Object.create(o);return a.bytes=n,a.dataView=new DataView(n.buffer,n.byteOffset,n.byteLength),a.positionReadCount=new Map,a.recursiveReadLimit=i,a}return oi}var zt={},wl;function od(){if(wl)return zt;wl=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.fromBytes=i,zt.bytesToBigInt=a,zt.bytesToBool=t,zt.bytesToNumber=s,zt.bytesToString=u;const e=Zr(),o=Jt(),r=Ie(),n=te();function i(d,f){const c=typeof f=="string"?{to:f}:f,m=c.to;return m==="number"?s(d,c):m==="bigint"?a(d,c):m==="boolean"?t(d,c):m==="string"?u(d,c):(0,n.bytesToHex)(d,c)}function a(d,f={}){typeof f.size<"u"&&(0,r.assertSize)(d,{size:f.size});const c=(0,n.bytesToHex)(d,f);return(0,r.hexToBigInt)(c,f)}function t(d,f={}){let c=d;if(typeof f.size<"u"&&((0,r.assertSize)(c,{size:f.size}),c=(0,o.trim)(c)),c.length>1||c[0]>1)throw new e.InvalidBytesBooleanError(c);return!!c[0]}function s(d,f={}){typeof f.size<"u"&&(0,r.assertSize)(d,{size:f.size});const c=(0,n.bytesToHex)(d,f);return(0,r.hexToNumber)(c,f)}function u(d,f={}){let c=d;return typeof f.size<"u"&&((0,r.assertSize)(c,{size:f.size}),c=(0,o.trim)(c,{dir:"right"})),new TextDecoder().decode(c)}return zt}var Al;function Yt(){if(Al)return ni;Al=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.decodeAbiParameters=f;const e=_e(),o=Je(),r=oo(),n=Ve(),i=it(),a=Jt(),t=od(),s=he(),u=te(),d=st();function f(l,y){const I=typeof y=="string"?(0,s.hexToBytes)(y):y,w=(0,r.createCursor)(I);if((0,n.size)(I)===0&&l.length>0)throw new e.AbiDecodingZeroDataError;if((0,n.size)(y)&&(0,n.size)(y)<32)throw new e.AbiDecodingDataSizeTooSmallError({data:typeof y=="string"?y:(0,u.bytesToHex)(y),params:l,size:(0,n.size)(y)});let B=0;const q=[];for(let T=0;T