@dcl/landing-site 0.0.1-23619144615.commit-9dd6c8c → 0.0.1-23620719480.commit-7d049a4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/assets/{AnimatedBackground-BX21LYI2.js → AnimatedBackground-DX3pYC8p.js} +2 -2
  2. package/assets/CardMedia-BbWfJnV6.js +1 -0
  3. package/assets/FooterLanding-B-J0C7o7.js +1 -0
  4. package/assets/WearablePreview-5a_PGNGB.js +4 -0
  5. package/assets/{add-DaN_WwVR.js → add-DpCWcXle.js} +1 -1
  6. package/assets/{all-wallets-Dnuhj0Og.js → all-wallets-DYP41Blj.js} +1 -1
  7. package/assets/{app-store-CcYHqDTq.js → app-store-BIJURF6-.js} +1 -1
  8. package/assets/{apple-BP0ixQ55.js → apple-D_uhLxZR.js} +1 -1
  9. package/assets/{arrow-bottom-DCVMAr8H.js → arrow-bottom-BW6Wv-sI.js} +1 -1
  10. package/assets/{arrow-bottom-circle-BcZjyH_3.js → arrow-bottom-circle-DqG729cm.js} +1 -1
  11. package/assets/{arrow-left-B8e4P5ki.js → arrow-left-DKYDNC-4.js} +1 -1
  12. package/assets/{arrow-right-Cb1MhLlX.js → arrow-right-CUusNHsj.js} +1 -1
  13. package/assets/{arrow-top-CsxZbNjO.js → arrow-top-D-Mz_CFK.js} +1 -1
  14. package/assets/{auto-track-BOxo_bvT.js → auto-track-E6PeBcrf.js} +1 -1
  15. package/assets/{bank-CmtjeWfr.js → bank-MJMbfg0_.js} +1 -1
  16. package/assets/{basic-DzuqKs2l.js → basic-0JGqszRD.js} +1 -1
  17. package/assets/{browser-DQjkDFvi.js → browser-COSkSQBs.js} +1 -1
  18. package/assets/{card-C3dOAVqt.js → card-DSHncbWU.js} +1 -1
  19. package/assets/ccip-C4IsyTPG.js +1 -0
  20. package/assets/{checkmark-iVuMZlIm.js → checkmark-DI59iwl2.js} +1 -1
  21. package/assets/{checkmark-bold-ButdL_LZ.js → checkmark-bold-B5b_aVMV.js} +1 -1
  22. package/assets/{chevron-bottom-jJpGeUUx.js → chevron-bottom-CY0ZrVMi.js} +1 -1
  23. package/assets/{chevron-left-Ch61xlSU.js → chevron-left-D9UeLaSu.js} +1 -1
  24. package/assets/{chevron-right-BTWePK-z.js → chevron-right-DYngCl4M.js} +1 -1
  25. package/assets/{chevron-top-DT7Y9DlB.js → chevron-top-B1oJ3Ys-.js} +1 -1
  26. package/assets/{chrome-store-WwSkA5JI.js → chrome-store-NOx8tFXN.js} +1 -1
  27. package/assets/{clock-DLLelcN_.js → clock-Bgb07TMb.js} +1 -1
  28. package/assets/{close-2B53ZcOr.js → close-KCBaR1NE.js} +1 -1
  29. package/assets/{coinPlaceholder-BqU1Y-z1.js → coinPlaceholder-Boyy4C0R.js} +1 -1
  30. package/assets/{compass-Dkii6WBH.js → compass-B9h18XpL.js} +1 -1
  31. package/assets/{copy-CtlKkDiy.js → copy-D53IumqM.js} +1 -1
  32. package/assets/{core-CTGAiloq.js → core-R9E8jRfz.js} +5 -5
  33. package/assets/cursor-CV1p_vON.js +3 -0
  34. package/assets/{cursor-transparent-Cna8_emv.js → cursor-transparent-DTeFmaoS.js} +1 -1
  35. package/assets/{desktop-DVSar6pk.js → desktop-C_-SbpNe.js} +1 -1
  36. package/assets/{disconnect-DWAlWLSE.js → disconnect-PiZpxCb1.js} +1 -1
  37. package/assets/{discord-qzKpdTIN.js → discord-Ddxf1KxO.js} +1 -1
  38. package/assets/download_background-3Nr6BckL.webp +0 -0
  39. package/assets/{etherscan-Dq8VeI1F.js → etherscan-DLwVtVtu.js} +1 -1
  40. package/assets/{exclamation-triangle-DB0vGdPg.js → exclamation-triangle-QRWeaoZe.js} +1 -1
  41. package/assets/{extension-DrmX2qvD.js → extension-DvbWY6Gw.js} +1 -1
  42. package/assets/{external-link-CQ-Po7zU.js → external-link-DMiMWTiv.js} +1 -1
  43. package/assets/{facebook-Cj_V7srz.js → facebook-SSsHPp9C.js} +1 -1
  44. package/assets/{farcaster-j1zJY7FO.js → farcaster-BTLGHT3x.js} +1 -1
  45. package/assets/{filters-CoTrUOjM.js → filters-DZsYIsNJ.js} +1 -1
  46. package/assets/{github-BiFTJBr4.js → github-Dcyo6j15.js} +1 -1
  47. package/assets/{google-CoUxHqlc.js → google-DYxpzCSX.js} +1 -1
  48. package/assets/{help-circle-CmYFWRl7.js → help-circle-DNcCzixn.js} +1 -1
  49. package/assets/{id-DT3gYsIn.js → id-lWMRvKeR.js} +1 -1
  50. package/assets/{image-2xI41_yv.js → image-Dkv4odMi.js} +1 -1
  51. package/assets/{index-DiIGGt9K.js → index-3HiQP60Y.js} +2 -2
  52. package/assets/{index-4qKnY3-Z.js → index-B1E2WS85.js} +1 -1
  53. package/assets/{index-DZDTS3ye.js → index-B6eeSsO_.js} +3 -3
  54. package/assets/index-B74VE1YN.js +1 -0
  55. package/assets/index-B9flaZuC.js +1 -0
  56. package/assets/{index-YmvX5-ha.js → index-BPb2uPKM.js} +2 -2
  57. package/assets/index-Bht5LsEk.js +51 -0
  58. package/assets/{index-WOcjF2jM.js → index-C2r3Z22e.js} +1 -1
  59. package/assets/{index-DrVu52Xh.js → index-CLRaSgqZ.js} +1 -1
  60. package/assets/{index-Bk20Akf-.js → index-CZIwBdGf.js} +1 -1
  61. package/assets/{index-DI7YJmGL.js → index-CiW7T_au.js} +1 -1
  62. package/assets/index-D12nVzQv.js +1 -0
  63. package/assets/{index-BwH4aTS1.js → index-D3FZgr7d.js} +32 -32
  64. package/assets/{index-SuZZOLV8.js → index-DY64NG3j.js} +3 -3
  65. package/assets/{index-BrKy0seX.js → index-DjQ6ERI-.js} +2 -2
  66. package/assets/{index-D8K5W9P2.js → index-DkCEfHSR.js} +1 -1
  67. package/assets/index-IP4riM96.js +54 -0
  68. package/assets/index-RAUtC1cy.js +7 -0
  69. package/assets/{index-CXihcgXx.js → index-UCPBu_lb.js} +1 -1
  70. package/assets/{index.es-jzCaEkpf.js → index.es--N24oLp1.js} +8 -8
  71. package/assets/{index.umd--3ii-zIl.js → index.umd-Dgcb5DdO.js} +1 -1
  72. package/assets/{info-DjLA3veR.js → info-D9Dnp2wV.js} +1 -1
  73. package/assets/{info-circle-3PDrwt0H.js → info-circle-CoOUPZNE.js} +1 -1
  74. package/assets/{lightbulb-DhWVBMDA.js → lightbulb-BI3j8u3m.js} +1 -1
  75. package/assets/macos_launcher-tAnkzoV6.webp +0 -0
  76. package/assets/macos_launching_decentraland-D20EhlLN.webp +0 -0
  77. package/assets/macos_recent_download-BanUqEgV.webp +0 -0
  78. package/assets/{mail-BsPt7fsq.js → mail-ORINOCWr.js} +1 -1
  79. package/assets/{mobile-CgXcD3VR.js → mobile-CeHPXPkA.js} +1 -1
  80. package/assets/{more-DIJuTEs0.js → more-BHYLEFMC.js} +1 -1
  81. package/assets/{network-placeholder-66B326HU.js → network-placeholder-Co5Aa3yr.js} +1 -1
  82. package/assets/{nftPlaceholder-BLN_a1sQ.js → nftPlaceholder-CxGQvhMT.js} +1 -1
  83. package/assets/{node-COcrmc-E.js → node-s4RJ8AH_.js} +3 -3
  84. package/assets/{off-D2UQbFAS.js → off-0iXyYdfj.js} +1 -1
  85. package/assets/{play-store-SCtH_5I1.js → play-store-DTDi2JaH.js} +1 -1
  86. package/assets/{plus-DHy0b-9d.js → plus-Cy_-oevD.js} +1 -1
  87. package/assets/{qr-code-PfdfX8iw.js → qr-code-B6dfioLK.js} +1 -1
  88. package/assets/{recycle-horizontal-BuVlk9dd.js → recycle-horizontal-pLpXl48q.js} +1 -1
  89. package/assets/{refresh-LidcEqi6.js → refresh-CTkry1V3.js} +1 -1
  90. package/assets/{reown-logo-CAccVEkV.js → reown-logo-CQXrQocw.js} +1 -1
  91. package/assets/{search-oQ7C4gac.js → search-DcUtq8nY.js} +1 -1
  92. package/assets/{secp256k1-r2Z-F5jQ.js → secp256k1-DJPw0Lkb.js} +1 -1
  93. package/assets/{secp256k1-SQKxdWJA.js → secp256k1-DOK1Amgu.js} +1 -1
  94. package/assets/{send-Czq-woFq.js → send-CsUMCf__.js} +1 -1
  95. package/assets/{swapHorizontal-BLAZ4GpX.js → swapHorizontal-DajxR-U8.js} +1 -1
  96. package/assets/{swapHorizontalBold-CeMDPZ2B.js → swapHorizontalBold-D2-VHGIC.js} +1 -1
  97. package/assets/{swapHorizontalMedium-CVCZLiVS.js → swapHorizontalMedium-BrH7SgNo.js} +1 -1
  98. package/assets/{swapHorizontalRoundedBold-D00KZQV-.js → swapHorizontalRoundedBold-BNx29FQu.js} +1 -1
  99. package/assets/{swapVertical-CtlfdZa9.js → swapVertical-Bn92nmT-.js} +1 -1
  100. package/assets/swiper-react-Cgkj8mB9.js +1 -0
  101. package/assets/{telegram-DiYfT0lk.js → telegram-Bd7lhcuu.js} +1 -1
  102. package/assets/{three-dots-BpX8IpHh.js → three-dots-D4kB_6oe.js} +1 -1
  103. package/assets/{twitch-CSH-Nxxc.js → twitch-ERVkAQ9g.js} +1 -1
  104. package/assets/{twitterIcon-DiNCGGjL.js → twitterIcon-DFWSkf23.js} +1 -1
  105. package/assets/{verify-B4Hhnjw3.js → verify-CFOj0EIL.js} +1 -1
  106. package/assets/{verify-filled-BO8MFee3.js → verify-filled-8hbZ53qu.js} +1 -1
  107. package/assets/{w3m-modal-Ch3BGvga.js → w3m-modal-Q-diaHtC.js} +1 -1
  108. package/assets/{wallet-CNUrWE3L.js → wallet-CJTAh7zl.js} +1 -1
  109. package/assets/{wallet-placeholder-CtQg5prg.js → wallet-placeholder-Dgu0MUjk.js} +1 -1
  110. package/assets/{walletconnect-DxVGyv5n.js → walletconnect-SwR0ilZs.js} +1 -1
  111. package/assets/{warning-circle-BNcoUtgr.js → warning-circle-DqGA6JWs.js} +1 -1
  112. package/assets/windows_downloads_folder-BjMDtSd-.webp +0 -0
  113. package/assets/windows_launching_decentraland-Bg5TsdCP.webp +0 -0
  114. package/assets/windows_setup-Dzomx64Q.webp +0 -0
  115. package/assets/{x-C0p-xVca.js → x-Bhp20IfI.js} +1 -1
  116. package/index.html +2 -2
  117. package/package.json +3 -3
  118. package/assets/FooterLanding-r_hZlF_u.js +0 -1
  119. package/assets/ccip-Z16c_UnO.js +0 -1
  120. package/assets/cursor-h29Fyu_C.js +0 -3
  121. package/assets/index-BGXseWrC.js +0 -7
  122. package/assets/index-BHPQscxU.js +0 -51
  123. package/assets/index-BopA34hw.js +0 -1
  124. package/assets/index-DSHMyLVX.js +0 -1
  125. package/assets/swiper-react-ZPE95VoW.js +0 -1
@@ -0,0 +1,7 @@
1
+ import{aX as Po,p as he,N as mr,a$ as uu,f as J,Q as re,b0 as Vr,b1 as hu,P as du}from"./index-D3FZgr7d.js";import{i as wt}from"./inherits_browser-BlmhoU4v.js";import{w as fu,t as gu,c as pu,i as mu}from"./index-B74VE1YN.js";import{p as vu,a as bu}from"./hooks.module-Dz_XB4AG.js";const wu=Object.freeze(Object.defineProperty({__proto__:null,EventEmitter:Po,default:Po},Symbol.toStringTag,{value:"Module"}));var js={exports:{}},ls,Oo;function yu(){if(Oo)return ls;Oo=1;var e=1e3,t=e*60,r=t*60,n=r*24,i=n*7,s=n*365.25;ls=function(d,w){w=w||{};var b=typeof d;if(b==="string"&&d.length>0)return a(d);if(b==="number"&&isFinite(d))return w.long?h(d):l(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function a(d){if(d=String(d),!(d.length>100)){var w=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(w){var b=parseFloat(w[1]),I=(w[2]||"ms").toLowerCase();switch(I){case"years":case"year":case"yrs":case"yr":case"y":return b*s;case"weeks":case"week":case"w":return b*i;case"days":case"day":case"d":return b*n;case"hours":case"hour":case"hrs":case"hr":case"h":return b*r;case"minutes":case"minute":case"mins":case"min":case"m":return b*t;case"seconds":case"second":case"secs":case"sec":case"s":return b*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return b;default:return}}}}function l(d){var w=Math.abs(d);return w>=n?Math.round(d/n)+"d":w>=r?Math.round(d/r)+"h":w>=t?Math.round(d/t)+"m":w>=e?Math.round(d/e)+"s":d+"ms"}function h(d){var w=Math.abs(d);return w>=n?f(d,w,n,"day"):w>=r?f(d,w,r,"hour"):w>=t?f(d,w,t,"minute"):w>=e?f(d,w,e,"second"):d+" ms"}function f(d,w,b,I){var O=w>=b*1.5;return Math.round(d/b)+" "+I+(O?"s":"")}return ls}function _u(e){r.debug=r,r.default=r,r.coerce=h,r.disable=s,r.enable=i,r.enabled=a,r.humanize=yu(),r.destroy=f,Object.keys(e).forEach(d=>{r[d]=e[d]}),r.names=[],r.skips=[],r.formatters={};function t(d){let w=0;for(let b=0;b<d.length;b++)w=(w<<5)-w+d.charCodeAt(b),w|=0;return r.colors[Math.abs(w)%r.colors.length]}r.selectColor=t;function r(d){let w,b=null,I,O;function N(...P){if(!N.enabled)return;const M=N,x=Number(new Date),T=x-(w||x);M.diff=T,M.prev=w,M.curr=x,w=x,P[0]=r.coerce(P[0]),typeof P[0]!="string"&&P.unshift("%O");let $=0;P[0]=P[0].replace(/%([a-zA-Z%])/g,(F,G)=>{if(F==="%%")return"%";$++;const q=r.formatters[G];if(typeof q=="function"){const W=P[$];F=q.call(M,W),P.splice($,1),$--}return F}),r.formatArgs.call(M,P),(M.log||r.log).apply(M,P)}return N.namespace=d,N.useColors=r.useColors(),N.color=r.selectColor(d),N.extend=n,N.destroy=r.destroy,Object.defineProperty(N,"enabled",{enumerable:!0,configurable:!1,get:()=>b!==null?b:(I!==r.namespaces&&(I=r.namespaces,O=r.enabled(d)),O),set:P=>{b=P}}),typeof r.init=="function"&&r.init(N),N}function n(d,w){const b=r(this.namespace+(typeof w>"u"?":":w)+d);return b.log=this.log,b}function i(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let w;const b=(typeof d=="string"?d:"").split(/[\s,]+/),I=b.length;for(w=0;w<I;w++)b[w]&&(d=b[w].replace(/\*/g,".*?"),d[0]==="-"?r.skips.push(new RegExp("^"+d.slice(1)+"$")):r.names.push(new RegExp("^"+d+"$")))}function s(){const d=[...r.names.map(l),...r.skips.map(l).map(w=>"-"+w)].join(",");return r.enable(""),d}function a(d){if(d[d.length-1]==="*")return!0;let w,b;for(w=0,b=r.skips.length;w<b;w++)if(r.skips[w].test(d))return!1;for(w=0,b=r.names.length;w<b;w++)if(r.names[w].test(d))return!0;return!1}function l(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function h(d){return d instanceof Error?d.stack||d.message:d}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var Eu=_u;(function(e,t){var r={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/landing-site/0.0.1-23620719480.commit-7d049a4"};t.formatArgs=i,t.save=s,t.load=a,t.useColors=n,t.storage=l(),t.destroy=(()=>{let f=!1;return()=>{f||(f=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(f){if(f[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+f[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const d="color: "+this.color;f.splice(1,0,d,"color: inherit");let w=0,b=0;f[0].replace(/%[a-zA-Z%]/g,I=>{I!=="%%"&&(w++,I==="%c"&&(b=w))}),f.splice(b,0,d)}t.log=console.debug||console.log||(()=>{});function s(f){try{f?t.storage.setItem("debug",f):t.storage.removeItem("debug")}catch{}}function a(){let f;try{f=t.storage.getItem("debug")}catch{}return!f&&typeof he<"u"&&"env"in he&&(f=r.DEBUG),f}function l(){try{return localStorage}catch{}}e.exports=Eu(t);const{formatters:h}=e.exports;h.j=function(f){try{return JSON.stringify(f)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}})(js,js.exports);var Su=js.exports,Ru=dn;dn.default=dn;dn.stable=gc;dn.stableStringify=gc;var si="[...]",dc="[Circular]",gr=[],hr=[];function fc(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function dn(e,t,r,n){typeof n>"u"&&(n=fc()),Hs(e,"",0,[],void 0,0,n);var i;try{hr.length===0?i=JSON.stringify(e,t,r):i=JSON.stringify(e,pc(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;gr.length!==0;){var s=gr.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function Dr(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:e}),gr.push([n,r,t,i])):hr.push([t,r,e]):(n[r]=e,gr.push([n,r,t]))}function Hs(e,t,r,n,i,s,a){s+=1;var l;if(typeof e=="object"&&e!==null){for(l=0;l<n.length;l++)if(n[l]===e){Dr(dc,e,t,i);return}if(typeof a.depthLimit<"u"&&s>a.depthLimit){Dr(si,e,t,i);return}if(typeof a.edgesLimit<"u"&&r+1>a.edgesLimit){Dr(si,e,t,i);return}if(n.push(e),Array.isArray(e))for(l=0;l<e.length;l++)Hs(e[l],l,l,n,e,s,a);else{var h=Object.keys(e);for(l=0;l<h.length;l++){var f=h[l];Hs(e[f],f,l,n,e,s,a)}}n.pop()}}function Mu(e,t){return e<t?-1:e>t?1:0}function gc(e,t,r,n){typeof n>"u"&&(n=fc());var i=Us(e,"",0,[],void 0,0,n)||e,s;try{hr.length===0?s=JSON.stringify(i,t,r):s=JSON.stringify(i,pc(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;gr.length!==0;){var a=gr.pop();a.length===4?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return s}function Us(e,t,r,n,i,s,a){s+=1;var l;if(typeof e=="object"&&e!==null){for(l=0;l<n.length;l++)if(n[l]===e){Dr(dc,e,t,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof a.depthLimit<"u"&&s>a.depthLimit){Dr(si,e,t,i);return}if(typeof a.edgesLimit<"u"&&r+1>a.edgesLimit){Dr(si,e,t,i);return}if(n.push(e),Array.isArray(e))for(l=0;l<e.length;l++)Us(e[l],l,l,n,e,s,a);else{var h={},f=Object.keys(e).sort(Mu);for(l=0;l<f.length;l++){var d=f[l];Us(e[d],d,l,n,e,s,a),h[d]=e[d]}if(typeof i<"u")gr.push([i,t,e]),i[t]=h;else return h}n.pop()}}function pc(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(hr.length>0)for(var n=0;n<hr.length;n++){var i=hr[n];if(i[1]===t&&i[0]===r){r=i[2],hr.splice(n,1);break}}return e.call(this,t,r)}}var mc={},fn={},ci={};Object.defineProperty(ci,"__esModule",{value:!0});ci.walletLogo=void 0;const Cu=(e,t)=>{let r;switch(e){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};ci.walletLogo=Cu;var li={};Object.defineProperty(li,"__esModule",{value:!0});li.LINK_API_URL=void 0;li.LINK_API_URL="https://www.walletlink.org";var z={},Zs={exports:{}};const mn=mr(uu);Zs.exports;(function(e){(function(t,r){function n(R,o){if(!R)throw new Error(o||"Assertion failed")}function i(R,o){R.super_=o;var u=function(){};u.prototype=o.prototype,R.prototype=new u,R.prototype.constructor=R}function s(R,o,u){if(s.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,R!==null&&((o==="le"||o==="be")&&(u=o,o=10),this._init(R||0,o||10,u||"be"))}typeof t=="object"?t.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=mn.Buffer}catch{}s.isBN=function(o){return o instanceof s?!0:o!==null&&typeof o=="object"&&o.constructor.wordSize===s.wordSize&&Array.isArray(o.words)},s.max=function(o,u){return o.cmp(u)>0?o:u},s.min=function(o,u){return o.cmp(u)<0?o:u},s.prototype._init=function(o,u,g){if(typeof o=="number")return this._initNumber(o,u,g);if(typeof o=="object")return this._initArray(o,u,g);u==="hex"&&(u=16),n(u===(u|0)&&u>=2&&u<=36),o=o.toString().replace(/\s+/g,"");var p=0;o[0]==="-"&&(p++,this.negative=1),p<o.length&&(u===16?this._parseHex(o,p,g):(this._parseBase(o,u,p),g==="le"&&this._initArray(this.toArray(),u,g)))},s.prototype._initNumber=function(o,u,g){o<0&&(this.negative=1,o=-o),o<67108864?(this.words=[o&67108863],this.length=1):o<4503599627370496?(this.words=[o&67108863,o/67108864&67108863],this.length=2):(n(o<9007199254740992),this.words=[o&67108863,o/67108864&67108863,1],this.length=3),g==="le"&&this._initArray(this.toArray(),u,g)},s.prototype._initArray=function(o,u,g){if(n(typeof o.length=="number"),o.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(o.length/3),this.words=new Array(this.length);for(var p=0;p<this.length;p++)this.words[p]=0;var v,S,k=0;if(g==="be")for(p=o.length-1,v=0;p>=0;p-=3)S=o[p]|o[p-1]<<8|o[p-2]<<16,this.words[v]|=S<<k&67108863,this.words[v+1]=S>>>26-k&67108863,k+=24,k>=26&&(k-=26,v++);else if(g==="le")for(p=0,v=0;p<o.length;p+=3)S=o[p]|o[p+1]<<8|o[p+2]<<16,this.words[v]|=S<<k&67108863,this.words[v+1]=S>>>26-k&67108863,k+=24,k>=26&&(k-=26,v++);return this._strip()};function l(R,o){var u=R.charCodeAt(o);if(u>=48&&u<=57)return u-48;if(u>=65&&u<=70)return u-55;if(u>=97&&u<=102)return u-87;n(!1,"Invalid character in "+R)}function h(R,o,u){var g=l(R,u);return u-1>=o&&(g|=l(R,u-1)<<4),g}s.prototype._parseHex=function(o,u,g){this.length=Math.ceil((o.length-u)/6),this.words=new Array(this.length);for(var p=0;p<this.length;p++)this.words[p]=0;var v=0,S=0,k;if(g==="be")for(p=o.length-1;p>=u;p-=2)k=h(o,u,p)<<v,this.words[S]|=k&67108863,v>=18?(v-=18,S+=1,this.words[S]|=k>>>26):v+=8;else{var m=o.length-u;for(p=m%2===0?u+1:u;p<o.length;p+=2)k=h(o,u,p)<<v,this.words[S]|=k&67108863,v>=18?(v-=18,S+=1,this.words[S]|=k>>>26):v+=8}this._strip()};function f(R,o,u,g){for(var p=0,v=0,S=Math.min(R.length,u),k=o;k<S;k++){var m=R.charCodeAt(k)-48;p*=g,m>=49?v=m-49+10:m>=17?v=m-17+10:v=m,n(m>=0&&v<g,"Invalid character"),p+=v}return p}s.prototype._parseBase=function(o,u,g){this.words=[0],this.length=1;for(var p=0,v=1;v<=67108863;v*=u)p++;p--,v=v/u|0;for(var S=o.length-g,k=S%p,m=Math.min(S,S-k)+g,c=0,y=g;y<m;y+=p)c=f(o,y,y+p,u),this.imuln(v),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(k!==0){var V=1;for(c=f(o,y,o.length,u),y=0;y<k;y++)V*=u;this.imuln(V),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},s.prototype.copy=function(o){o.words=new Array(this.length);for(var u=0;u<this.length;u++)o.words[u]=this.words[u];o.length=this.length,o.negative=this.negative,o.red=this.red};function d(R,o){R.words=o.words,R.length=o.length,R.negative=o.negative,R.red=o.red}if(s.prototype._move=function(o){d(o,this)},s.prototype.clone=function(){var o=new s(null);return this.copy(o),o},s.prototype._expand=function(o){for(;this.length<o;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=w}catch{s.prototype.inspect=w}else s.prototype.inspect=w;function w(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],O=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(o,u){o=o||10,u=u|0||1;var g;if(o===16||o==="hex"){g="";for(var p=0,v=0,S=0;S<this.length;S++){var k=this.words[S],m=((k<<p|v)&16777215).toString(16);v=k>>>24-p&16777215,p+=2,p>=26&&(p-=26,S--),v!==0||S!==this.length-1?g=b[6-m.length]+m+g:g=m+g}for(v!==0&&(g=v.toString(16)+g);g.length%u!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(o===(o|0)&&o>=2&&o<=36){var c=I[o],y=O[o];g="";var V=this.clone();for(V.negative=0;!V.isZero();){var H=V.modrn(y).toString(o);V=V.idivn(y),V.isZero()?g=H+g:g=b[c-H.length]+H+g}for(this.isZero()&&(g="0"+g);g.length%u!==0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var o=this.words[0];return this.length===2?o+=this.words[1]*67108864:this.length===3&&this.words[2]===1?o+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-o:o},s.prototype.toJSON=function(){return this.toString(16,2)},a&&(s.prototype.toBuffer=function(o,u){return this.toArrayLike(a,o,u)}),s.prototype.toArray=function(o,u){return this.toArrayLike(Array,o,u)};var N=function(o,u){return o.allocUnsafe?o.allocUnsafe(u):new o(u)};s.prototype.toArrayLike=function(o,u,g){this._strip();var p=this.byteLength(),v=g||Math.max(1,p);n(p<=v,"byte array longer than desired length"),n(v>0,"Requested array length <= 0");var S=N(o,v),k=u==="le"?"LE":"BE";return this["_toArrayLike"+k](S,p),S},s.prototype._toArrayLikeLE=function(o,u){for(var g=0,p=0,v=0,S=0;v<this.length;v++){var k=this.words[v]<<S|p;o[g++]=k&255,g<o.length&&(o[g++]=k>>8&255),g<o.length&&(o[g++]=k>>16&255),S===6?(g<o.length&&(o[g++]=k>>24&255),p=0,S=0):(p=k>>>24,S+=2)}if(g<o.length)for(o[g++]=p;g<o.length;)o[g++]=0},s.prototype._toArrayLikeBE=function(o,u){for(var g=o.length-1,p=0,v=0,S=0;v<this.length;v++){var k=this.words[v]<<S|p;o[g--]=k&255,g>=0&&(o[g--]=k>>8&255),g>=0&&(o[g--]=k>>16&255),S===6?(g>=0&&(o[g--]=k>>24&255),p=0,S=0):(p=k>>>24,S+=2)}if(g>=0)for(o[g--]=p;g>=0;)o[g--]=0},Math.clz32?s.prototype._countBits=function(o){return 32-Math.clz32(o)}:s.prototype._countBits=function(o){var u=o,g=0;return u>=4096&&(g+=13,u>>>=13),u>=64&&(g+=7,u>>>=7),u>=8&&(g+=4,u>>>=4),u>=2&&(g+=2,u>>>=2),g+u},s.prototype._zeroBits=function(o){if(o===0)return 26;var u=o,g=0;return u&8191||(g+=13,u>>>=13),u&127||(g+=7,u>>>=7),u&15||(g+=4,u>>>=4),u&3||(g+=2,u>>>=2),u&1||g++,g},s.prototype.bitLength=function(){var o=this.words[this.length-1],u=this._countBits(o);return(this.length-1)*26+u};function P(R){for(var o=new Array(R.bitLength()),u=0;u<o.length;u++){var g=u/26|0,p=u%26;o[u]=R.words[g]>>>p&1}return o}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,u=0;u<this.length;u++){var g=this._zeroBits(this.words[u]);if(o+=g,g!==26)break}return o},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(o){return this.negative!==0?this.abs().inotn(o).iaddn(1):this.clone()},s.prototype.fromTwos=function(o){return this.testn(o-1)?this.notn(o).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(o){for(;this.length<o.length;)this.words[this.length++]=0;for(var u=0;u<o.length;u++)this.words[u]=this.words[u]|o.words[u];return this._strip()},s.prototype.ior=function(o){return n((this.negative|o.negative)===0),this.iuor(o)},s.prototype.or=function(o){return this.length>o.length?this.clone().ior(o):o.clone().ior(this)},s.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},s.prototype.iuand=function(o){var u;this.length>o.length?u=o:u=this;for(var g=0;g<u.length;g++)this.words[g]=this.words[g]&o.words[g];return this.length=u.length,this._strip()},s.prototype.iand=function(o){return n((this.negative|o.negative)===0),this.iuand(o)},s.prototype.and=function(o){return this.length>o.length?this.clone().iand(o):o.clone().iand(this)},s.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},s.prototype.iuxor=function(o){var u,g;this.length>o.length?(u=this,g=o):(u=o,g=this);for(var p=0;p<g.length;p++)this.words[p]=u.words[p]^g.words[p];if(this!==u)for(;p<u.length;p++)this.words[p]=u.words[p];return this.length=u.length,this._strip()},s.prototype.ixor=function(o){return n((this.negative|o.negative)===0),this.iuxor(o)},s.prototype.xor=function(o){return this.length>o.length?this.clone().ixor(o):o.clone().ixor(this)},s.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},s.prototype.inotn=function(o){n(typeof o=="number"&&o>=0);var u=Math.ceil(o/26)|0,g=o%26;this._expand(u),g>0&&u--;for(var p=0;p<u;p++)this.words[p]=~this.words[p]&67108863;return g>0&&(this.words[p]=~this.words[p]&67108863>>26-g),this._strip()},s.prototype.notn=function(o){return this.clone().inotn(o)},s.prototype.setn=function(o,u){n(typeof o=="number"&&o>=0);var g=o/26|0,p=o%26;return this._expand(g+1),u?this.words[g]=this.words[g]|1<<p:this.words[g]=this.words[g]&~(1<<p),this._strip()},s.prototype.iadd=function(o){var u;if(this.negative!==0&&o.negative===0)return this.negative=0,u=this.isub(o),this.negative^=1,this._normSign();if(this.negative===0&&o.negative!==0)return o.negative=0,u=this.isub(o),o.negative=1,u._normSign();var g,p;this.length>o.length?(g=this,p=o):(g=o,p=this);for(var v=0,S=0;S<p.length;S++)u=(g.words[S]|0)+(p.words[S]|0)+v,this.words[S]=u&67108863,v=u>>>26;for(;v!==0&&S<g.length;S++)u=(g.words[S]|0)+v,this.words[S]=u&67108863,v=u>>>26;if(this.length=g.length,v!==0)this.words[this.length]=v,this.length++;else if(g!==this)for(;S<g.length;S++)this.words[S]=g.words[S];return this},s.prototype.add=function(o){var u;return o.negative!==0&&this.negative===0?(o.negative=0,u=this.sub(o),o.negative^=1,u):o.negative===0&&this.negative!==0?(this.negative=0,u=o.sub(this),this.negative=1,u):this.length>o.length?this.clone().iadd(o):o.clone().iadd(this)},s.prototype.isub=function(o){if(o.negative!==0){o.negative=0;var u=this.iadd(o);return o.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var g=this.cmp(o);if(g===0)return this.negative=0,this.length=1,this.words[0]=0,this;var p,v;g>0?(p=this,v=o):(p=o,v=this);for(var S=0,k=0;k<v.length;k++)u=(p.words[k]|0)-(v.words[k]|0)+S,S=u>>26,this.words[k]=u&67108863;for(;S!==0&&k<p.length;k++)u=(p.words[k]|0)+S,S=u>>26,this.words[k]=u&67108863;if(S===0&&k<p.length&&p!==this)for(;k<p.length;k++)this.words[k]=p.words[k];return this.length=Math.max(this.length,k),p!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(o){return this.clone().isub(o)};function M(R,o,u){u.negative=o.negative^R.negative;var g=R.length+o.length|0;u.length=g,g=g-1|0;var p=R.words[0]|0,v=o.words[0]|0,S=p*v,k=S&67108863,m=S/67108864|0;u.words[0]=k;for(var c=1;c<g;c++){for(var y=m>>>26,V=m&67108863,H=Math.min(c,o.length-1),C=Math.max(0,c-R.length+1);C<=H;C++){var A=c-C|0;p=R.words[A]|0,v=o.words[C]|0,S=p*v+V,y+=S/67108864|0,V=S&67108863}u.words[c]=V|0,m=y|0}return m!==0?u.words[c]=m|0:u.length--,u._strip()}var x=function(o,u,g){var p=o.words,v=u.words,S=g.words,k=0,m,c,y,V=p[0]|0,H=V&8191,C=V>>>13,A=p[1]|0,B=A&8191,U=A>>>13,ee=p[2]|0,_=ee&8191,E=ee>>>13,D=p[3]|0,j=D&8191,K=D>>>13,X=p[4]|0,Z=X&8191,le=X>>>13,Et=p[5]|0,pe=Et&8191,me=Et>>>13,Ft=p[6]|0,fe=Ft&8191,ge=Ft>>>13,Nt=p[7]|0,de=Nt&8191,ue=Nt>>>13,st=p[8]|0,ve=st&8191,be=st>>>13,_r=p[9]|0,we=_r&8191,ye=_r>>>13,Er=v[0]|0,_e=Er&8191,Ee=Er>>>13,Sr=v[1]|0,Se=Sr&8191,Re=Sr>>>13,Rr=v[2]|0,Me=Rr&8191,Ce=Rr>>>13,Mr=v[3]|0,ke=Mr&8191,Ie=Mr>>>13,Cr=v[4]|0,xe=Cr&8191,Ae=Cr>>>13,kr=v[5]|0,Te=kr&8191,Ne=kr>>>13,Ir=v[6]|0,Le=Ir&8191,Pe=Ir>>>13,xr=v[7]|0,Oe=xr&8191,$e=xr>>>13,Ar=v[8]|0,Be=Ar&8191,Fe=Ar>>>13,Tr=v[9]|0,De=Tr&8191,je=Tr>>>13;g.negative=o.negative^u.negative,g.length=19,m=Math.imul(H,_e),c=Math.imul(H,Ee),c=c+Math.imul(C,_e)|0,y=Math.imul(C,Ee);var zt=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(zt>>>26)|0,zt&=67108863,m=Math.imul(B,_e),c=Math.imul(B,Ee),c=c+Math.imul(U,_e)|0,y=Math.imul(U,Ee),m=m+Math.imul(H,Se)|0,c=c+Math.imul(H,Re)|0,c=c+Math.imul(C,Se)|0,y=y+Math.imul(C,Re)|0;var qt=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(qt>>>26)|0,qt&=67108863,m=Math.imul(_,_e),c=Math.imul(_,Ee),c=c+Math.imul(E,_e)|0,y=Math.imul(E,Ee),m=m+Math.imul(B,Se)|0,c=c+Math.imul(B,Re)|0,c=c+Math.imul(U,Se)|0,y=y+Math.imul(U,Re)|0,m=m+Math.imul(H,Me)|0,c=c+Math.imul(H,Ce)|0,c=c+Math.imul(C,Me)|0,y=y+Math.imul(C,Ce)|0;var Jt=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,m=Math.imul(j,_e),c=Math.imul(j,Ee),c=c+Math.imul(K,_e)|0,y=Math.imul(K,Ee),m=m+Math.imul(_,Se)|0,c=c+Math.imul(_,Re)|0,c=c+Math.imul(E,Se)|0,y=y+Math.imul(E,Re)|0,m=m+Math.imul(B,Me)|0,c=c+Math.imul(B,Ce)|0,c=c+Math.imul(U,Me)|0,y=y+Math.imul(U,Ce)|0,m=m+Math.imul(H,ke)|0,c=c+Math.imul(H,Ie)|0,c=c+Math.imul(C,ke)|0,y=y+Math.imul(C,Ie)|0;var Gt=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,m=Math.imul(Z,_e),c=Math.imul(Z,Ee),c=c+Math.imul(le,_e)|0,y=Math.imul(le,Ee),m=m+Math.imul(j,Se)|0,c=c+Math.imul(j,Re)|0,c=c+Math.imul(K,Se)|0,y=y+Math.imul(K,Re)|0,m=m+Math.imul(_,Me)|0,c=c+Math.imul(_,Ce)|0,c=c+Math.imul(E,Me)|0,y=y+Math.imul(E,Ce)|0,m=m+Math.imul(B,ke)|0,c=c+Math.imul(B,Ie)|0,c=c+Math.imul(U,ke)|0,y=y+Math.imul(U,Ie)|0,m=m+Math.imul(H,xe)|0,c=c+Math.imul(H,Ae)|0,c=c+Math.imul(C,xe)|0,y=y+Math.imul(C,Ae)|0;var Zt=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,m=Math.imul(pe,_e),c=Math.imul(pe,Ee),c=c+Math.imul(me,_e)|0,y=Math.imul(me,Ee),m=m+Math.imul(Z,Se)|0,c=c+Math.imul(Z,Re)|0,c=c+Math.imul(le,Se)|0,y=y+Math.imul(le,Re)|0,m=m+Math.imul(j,Me)|0,c=c+Math.imul(j,Ce)|0,c=c+Math.imul(K,Me)|0,y=y+Math.imul(K,Ce)|0,m=m+Math.imul(_,ke)|0,c=c+Math.imul(_,Ie)|0,c=c+Math.imul(E,ke)|0,y=y+Math.imul(E,Ie)|0,m=m+Math.imul(B,xe)|0,c=c+Math.imul(B,Ae)|0,c=c+Math.imul(U,xe)|0,y=y+Math.imul(U,Ae)|0,m=m+Math.imul(H,Te)|0,c=c+Math.imul(H,Ne)|0,c=c+Math.imul(C,Te)|0,y=y+Math.imul(C,Ne)|0;var Kt=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,m=Math.imul(fe,_e),c=Math.imul(fe,Ee),c=c+Math.imul(ge,_e)|0,y=Math.imul(ge,Ee),m=m+Math.imul(pe,Se)|0,c=c+Math.imul(pe,Re)|0,c=c+Math.imul(me,Se)|0,y=y+Math.imul(me,Re)|0,m=m+Math.imul(Z,Me)|0,c=c+Math.imul(Z,Ce)|0,c=c+Math.imul(le,Me)|0,y=y+Math.imul(le,Ce)|0,m=m+Math.imul(j,ke)|0,c=c+Math.imul(j,Ie)|0,c=c+Math.imul(K,ke)|0,y=y+Math.imul(K,Ie)|0,m=m+Math.imul(_,xe)|0,c=c+Math.imul(_,Ae)|0,c=c+Math.imul(E,xe)|0,y=y+Math.imul(E,Ae)|0,m=m+Math.imul(B,Te)|0,c=c+Math.imul(B,Ne)|0,c=c+Math.imul(U,Te)|0,y=y+Math.imul(U,Ne)|0,m=m+Math.imul(H,Le)|0,c=c+Math.imul(H,Pe)|0,c=c+Math.imul(C,Le)|0,y=y+Math.imul(C,Pe)|0;var Qt=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,m=Math.imul(de,_e),c=Math.imul(de,Ee),c=c+Math.imul(ue,_e)|0,y=Math.imul(ue,Ee),m=m+Math.imul(fe,Se)|0,c=c+Math.imul(fe,Re)|0,c=c+Math.imul(ge,Se)|0,y=y+Math.imul(ge,Re)|0,m=m+Math.imul(pe,Me)|0,c=c+Math.imul(pe,Ce)|0,c=c+Math.imul(me,Me)|0,y=y+Math.imul(me,Ce)|0,m=m+Math.imul(Z,ke)|0,c=c+Math.imul(Z,Ie)|0,c=c+Math.imul(le,ke)|0,y=y+Math.imul(le,Ie)|0,m=m+Math.imul(j,xe)|0,c=c+Math.imul(j,Ae)|0,c=c+Math.imul(K,xe)|0,y=y+Math.imul(K,Ae)|0,m=m+Math.imul(_,Te)|0,c=c+Math.imul(_,Ne)|0,c=c+Math.imul(E,Te)|0,y=y+Math.imul(E,Ne)|0,m=m+Math.imul(B,Le)|0,c=c+Math.imul(B,Pe)|0,c=c+Math.imul(U,Le)|0,y=y+Math.imul(U,Pe)|0,m=m+Math.imul(H,Oe)|0,c=c+Math.imul(H,$e)|0,c=c+Math.imul(C,Oe)|0,y=y+Math.imul(C,$e)|0;var Yt=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,m=Math.imul(ve,_e),c=Math.imul(ve,Ee),c=c+Math.imul(be,_e)|0,y=Math.imul(be,Ee),m=m+Math.imul(de,Se)|0,c=c+Math.imul(de,Re)|0,c=c+Math.imul(ue,Se)|0,y=y+Math.imul(ue,Re)|0,m=m+Math.imul(fe,Me)|0,c=c+Math.imul(fe,Ce)|0,c=c+Math.imul(ge,Me)|0,y=y+Math.imul(ge,Ce)|0,m=m+Math.imul(pe,ke)|0,c=c+Math.imul(pe,Ie)|0,c=c+Math.imul(me,ke)|0,y=y+Math.imul(me,Ie)|0,m=m+Math.imul(Z,xe)|0,c=c+Math.imul(Z,Ae)|0,c=c+Math.imul(le,xe)|0,y=y+Math.imul(le,Ae)|0,m=m+Math.imul(j,Te)|0,c=c+Math.imul(j,Ne)|0,c=c+Math.imul(K,Te)|0,y=y+Math.imul(K,Ne)|0,m=m+Math.imul(_,Le)|0,c=c+Math.imul(_,Pe)|0,c=c+Math.imul(E,Le)|0,y=y+Math.imul(E,Pe)|0,m=m+Math.imul(B,Oe)|0,c=c+Math.imul(B,$e)|0,c=c+Math.imul(U,Oe)|0,y=y+Math.imul(U,$e)|0,m=m+Math.imul(H,Be)|0,c=c+Math.imul(H,Fe)|0,c=c+Math.imul(C,Be)|0,y=y+Math.imul(C,Fe)|0;var Xt=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,m=Math.imul(we,_e),c=Math.imul(we,Ee),c=c+Math.imul(ye,_e)|0,y=Math.imul(ye,Ee),m=m+Math.imul(ve,Se)|0,c=c+Math.imul(ve,Re)|0,c=c+Math.imul(be,Se)|0,y=y+Math.imul(be,Re)|0,m=m+Math.imul(de,Me)|0,c=c+Math.imul(de,Ce)|0,c=c+Math.imul(ue,Me)|0,y=y+Math.imul(ue,Ce)|0,m=m+Math.imul(fe,ke)|0,c=c+Math.imul(fe,Ie)|0,c=c+Math.imul(ge,ke)|0,y=y+Math.imul(ge,Ie)|0,m=m+Math.imul(pe,xe)|0,c=c+Math.imul(pe,Ae)|0,c=c+Math.imul(me,xe)|0,y=y+Math.imul(me,Ae)|0,m=m+Math.imul(Z,Te)|0,c=c+Math.imul(Z,Ne)|0,c=c+Math.imul(le,Te)|0,y=y+Math.imul(le,Ne)|0,m=m+Math.imul(j,Le)|0,c=c+Math.imul(j,Pe)|0,c=c+Math.imul(K,Le)|0,y=y+Math.imul(K,Pe)|0,m=m+Math.imul(_,Oe)|0,c=c+Math.imul(_,$e)|0,c=c+Math.imul(E,Oe)|0,y=y+Math.imul(E,$e)|0,m=m+Math.imul(B,Be)|0,c=c+Math.imul(B,Fe)|0,c=c+Math.imul(U,Be)|0,y=y+Math.imul(U,Fe)|0,m=m+Math.imul(H,De)|0,c=c+Math.imul(H,je)|0,c=c+Math.imul(C,De)|0,y=y+Math.imul(C,je)|0;var er=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(er>>>26)|0,er&=67108863,m=Math.imul(we,Se),c=Math.imul(we,Re),c=c+Math.imul(ye,Se)|0,y=Math.imul(ye,Re),m=m+Math.imul(ve,Me)|0,c=c+Math.imul(ve,Ce)|0,c=c+Math.imul(be,Me)|0,y=y+Math.imul(be,Ce)|0,m=m+Math.imul(de,ke)|0,c=c+Math.imul(de,Ie)|0,c=c+Math.imul(ue,ke)|0,y=y+Math.imul(ue,Ie)|0,m=m+Math.imul(fe,xe)|0,c=c+Math.imul(fe,Ae)|0,c=c+Math.imul(ge,xe)|0,y=y+Math.imul(ge,Ae)|0,m=m+Math.imul(pe,Te)|0,c=c+Math.imul(pe,Ne)|0,c=c+Math.imul(me,Te)|0,y=y+Math.imul(me,Ne)|0,m=m+Math.imul(Z,Le)|0,c=c+Math.imul(Z,Pe)|0,c=c+Math.imul(le,Le)|0,y=y+Math.imul(le,Pe)|0,m=m+Math.imul(j,Oe)|0,c=c+Math.imul(j,$e)|0,c=c+Math.imul(K,Oe)|0,y=y+Math.imul(K,$e)|0,m=m+Math.imul(_,Be)|0,c=c+Math.imul(_,Fe)|0,c=c+Math.imul(E,Be)|0,y=y+Math.imul(E,Fe)|0,m=m+Math.imul(B,De)|0,c=c+Math.imul(B,je)|0,c=c+Math.imul(U,De)|0,y=y+Math.imul(U,je)|0;var tr=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(tr>>>26)|0,tr&=67108863,m=Math.imul(we,Me),c=Math.imul(we,Ce),c=c+Math.imul(ye,Me)|0,y=Math.imul(ye,Ce),m=m+Math.imul(ve,ke)|0,c=c+Math.imul(ve,Ie)|0,c=c+Math.imul(be,ke)|0,y=y+Math.imul(be,Ie)|0,m=m+Math.imul(de,xe)|0,c=c+Math.imul(de,Ae)|0,c=c+Math.imul(ue,xe)|0,y=y+Math.imul(ue,Ae)|0,m=m+Math.imul(fe,Te)|0,c=c+Math.imul(fe,Ne)|0,c=c+Math.imul(ge,Te)|0,y=y+Math.imul(ge,Ne)|0,m=m+Math.imul(pe,Le)|0,c=c+Math.imul(pe,Pe)|0,c=c+Math.imul(me,Le)|0,y=y+Math.imul(me,Pe)|0,m=m+Math.imul(Z,Oe)|0,c=c+Math.imul(Z,$e)|0,c=c+Math.imul(le,Oe)|0,y=y+Math.imul(le,$e)|0,m=m+Math.imul(j,Be)|0,c=c+Math.imul(j,Fe)|0,c=c+Math.imul(K,Be)|0,y=y+Math.imul(K,Fe)|0,m=m+Math.imul(_,De)|0,c=c+Math.imul(_,je)|0,c=c+Math.imul(E,De)|0,y=y+Math.imul(E,je)|0;var rr=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(rr>>>26)|0,rr&=67108863,m=Math.imul(we,ke),c=Math.imul(we,Ie),c=c+Math.imul(ye,ke)|0,y=Math.imul(ye,Ie),m=m+Math.imul(ve,xe)|0,c=c+Math.imul(ve,Ae)|0,c=c+Math.imul(be,xe)|0,y=y+Math.imul(be,Ae)|0,m=m+Math.imul(de,Te)|0,c=c+Math.imul(de,Ne)|0,c=c+Math.imul(ue,Te)|0,y=y+Math.imul(ue,Ne)|0,m=m+Math.imul(fe,Le)|0,c=c+Math.imul(fe,Pe)|0,c=c+Math.imul(ge,Le)|0,y=y+Math.imul(ge,Pe)|0,m=m+Math.imul(pe,Oe)|0,c=c+Math.imul(pe,$e)|0,c=c+Math.imul(me,Oe)|0,y=y+Math.imul(me,$e)|0,m=m+Math.imul(Z,Be)|0,c=c+Math.imul(Z,Fe)|0,c=c+Math.imul(le,Be)|0,y=y+Math.imul(le,Fe)|0,m=m+Math.imul(j,De)|0,c=c+Math.imul(j,je)|0,c=c+Math.imul(K,De)|0,y=y+Math.imul(K,je)|0;var nr=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(nr>>>26)|0,nr&=67108863,m=Math.imul(we,xe),c=Math.imul(we,Ae),c=c+Math.imul(ye,xe)|0,y=Math.imul(ye,Ae),m=m+Math.imul(ve,Te)|0,c=c+Math.imul(ve,Ne)|0,c=c+Math.imul(be,Te)|0,y=y+Math.imul(be,Ne)|0,m=m+Math.imul(de,Le)|0,c=c+Math.imul(de,Pe)|0,c=c+Math.imul(ue,Le)|0,y=y+Math.imul(ue,Pe)|0,m=m+Math.imul(fe,Oe)|0,c=c+Math.imul(fe,$e)|0,c=c+Math.imul(ge,Oe)|0,y=y+Math.imul(ge,$e)|0,m=m+Math.imul(pe,Be)|0,c=c+Math.imul(pe,Fe)|0,c=c+Math.imul(me,Be)|0,y=y+Math.imul(me,Fe)|0,m=m+Math.imul(Z,De)|0,c=c+Math.imul(Z,je)|0,c=c+Math.imul(le,De)|0,y=y+Math.imul(le,je)|0;var ir=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(ir>>>26)|0,ir&=67108863,m=Math.imul(we,Te),c=Math.imul(we,Ne),c=c+Math.imul(ye,Te)|0,y=Math.imul(ye,Ne),m=m+Math.imul(ve,Le)|0,c=c+Math.imul(ve,Pe)|0,c=c+Math.imul(be,Le)|0,y=y+Math.imul(be,Pe)|0,m=m+Math.imul(de,Oe)|0,c=c+Math.imul(de,$e)|0,c=c+Math.imul(ue,Oe)|0,y=y+Math.imul(ue,$e)|0,m=m+Math.imul(fe,Be)|0,c=c+Math.imul(fe,Fe)|0,c=c+Math.imul(ge,Be)|0,y=y+Math.imul(ge,Fe)|0,m=m+Math.imul(pe,De)|0,c=c+Math.imul(pe,je)|0,c=c+Math.imul(me,De)|0,y=y+Math.imul(me,je)|0;var is=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(is>>>26)|0,is&=67108863,m=Math.imul(we,Le),c=Math.imul(we,Pe),c=c+Math.imul(ye,Le)|0,y=Math.imul(ye,Pe),m=m+Math.imul(ve,Oe)|0,c=c+Math.imul(ve,$e)|0,c=c+Math.imul(be,Oe)|0,y=y+Math.imul(be,$e)|0,m=m+Math.imul(de,Be)|0,c=c+Math.imul(de,Fe)|0,c=c+Math.imul(ue,Be)|0,y=y+Math.imul(ue,Fe)|0,m=m+Math.imul(fe,De)|0,c=c+Math.imul(fe,je)|0,c=c+Math.imul(ge,De)|0,y=y+Math.imul(ge,je)|0;var ss=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(ss>>>26)|0,ss&=67108863,m=Math.imul(we,Oe),c=Math.imul(we,$e),c=c+Math.imul(ye,Oe)|0,y=Math.imul(ye,$e),m=m+Math.imul(ve,Be)|0,c=c+Math.imul(ve,Fe)|0,c=c+Math.imul(be,Be)|0,y=y+Math.imul(be,Fe)|0,m=m+Math.imul(de,De)|0,c=c+Math.imul(de,je)|0,c=c+Math.imul(ue,De)|0,y=y+Math.imul(ue,je)|0;var os=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(os>>>26)|0,os&=67108863,m=Math.imul(we,Be),c=Math.imul(we,Fe),c=c+Math.imul(ye,Be)|0,y=Math.imul(ye,Fe),m=m+Math.imul(ve,De)|0,c=c+Math.imul(ve,je)|0,c=c+Math.imul(be,De)|0,y=y+Math.imul(be,je)|0;var as=(k+m|0)+((c&8191)<<13)|0;k=(y+(c>>>13)|0)+(as>>>26)|0,as&=67108863,m=Math.imul(we,De),c=Math.imul(we,je),c=c+Math.imul(ye,De)|0,y=Math.imul(ye,je);var cs=(k+m|0)+((c&8191)<<13)|0;return k=(y+(c>>>13)|0)+(cs>>>26)|0,cs&=67108863,S[0]=zt,S[1]=qt,S[2]=Jt,S[3]=Gt,S[4]=Zt,S[5]=Kt,S[6]=Qt,S[7]=Yt,S[8]=Xt,S[9]=er,S[10]=tr,S[11]=rr,S[12]=nr,S[13]=ir,S[14]=is,S[15]=ss,S[16]=os,S[17]=as,S[18]=cs,k!==0&&(S[19]=k,g.length++),g};Math.imul||(x=M);function T(R,o,u){u.negative=o.negative^R.negative,u.length=R.length+o.length;for(var g=0,p=0,v=0;v<u.length-1;v++){var S=p;p=0;for(var k=g&67108863,m=Math.min(v,o.length-1),c=Math.max(0,v-R.length+1);c<=m;c++){var y=v-c,V=R.words[y]|0,H=o.words[c]|0,C=V*H,A=C&67108863;S=S+(C/67108864|0)|0,A=A+k|0,k=A&67108863,S=S+(A>>>26)|0,p+=S>>>26,S&=67108863}u.words[v]=k,g=S,S=p}return g!==0?u.words[v]=g:u.length--,u._strip()}function $(R,o,u){return T(R,o,u)}s.prototype.mulTo=function(o,u){var g,p=this.length+o.length;return this.length===10&&o.length===10?g=x(this,o,u):p<63?g=M(this,o,u):p<1024?g=T(this,o,u):g=$(this,o,u),g},s.prototype.mul=function(o){var u=new s(null);return u.words=new Array(this.length+o.length),this.mulTo(o,u)},s.prototype.mulf=function(o){var u=new s(null);return u.words=new Array(this.length+o.length),$(this,o,u)},s.prototype.imul=function(o){return this.clone().mulTo(o,this)},s.prototype.imuln=function(o){var u=o<0;u&&(o=-o),n(typeof o=="number"),n(o<67108864);for(var g=0,p=0;p<this.length;p++){var v=(this.words[p]|0)*o,S=(v&67108863)+(g&67108863);g>>=26,g+=v/67108864|0,g+=S>>>26,this.words[p]=S&67108863}return g!==0&&(this.words[p]=g,this.length++),this.length=o===0?1:this.length,u?this.ineg():this},s.prototype.muln=function(o){return this.clone().imuln(o)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(o){var u=P(o);if(u.length===0)return new s(1);for(var g=this,p=0;p<u.length&&u[p]===0;p++,g=g.sqr());if(++p<u.length)for(var v=g.sqr();p<u.length;p++,v=v.sqr())u[p]!==0&&(g=g.mul(v));return g},s.prototype.iushln=function(o){n(typeof o=="number"&&o>=0);var u=o%26,g=(o-u)/26,p=67108863>>>26-u<<26-u,v;if(u!==0){var S=0;for(v=0;v<this.length;v++){var k=this.words[v]&p,m=(this.words[v]|0)-k<<u;this.words[v]=m|S,S=k>>>26-u}S&&(this.words[v]=S,this.length++)}if(g!==0){for(v=this.length-1;v>=0;v--)this.words[v+g]=this.words[v];for(v=0;v<g;v++)this.words[v]=0;this.length+=g}return this._strip()},s.prototype.ishln=function(o){return n(this.negative===0),this.iushln(o)},s.prototype.iushrn=function(o,u,g){n(typeof o=="number"&&o>=0);var p;u?p=(u-u%26)/26:p=0;var v=o%26,S=Math.min((o-v)/26,this.length),k=67108863^67108863>>>v<<v,m=g;if(p-=S,p=Math.max(0,p),m){for(var c=0;c<S;c++)m.words[c]=this.words[c];m.length=S}if(S!==0)if(this.length>S)for(this.length-=S,c=0;c<this.length;c++)this.words[c]=this.words[c+S];else this.words[0]=0,this.length=1;var y=0;for(c=this.length-1;c>=0&&(y!==0||c>=p);c--){var V=this.words[c]|0;this.words[c]=y<<26-v|V>>>v,y=V&k}return m&&y!==0&&(m.words[m.length++]=y),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(o,u,g){return n(this.negative===0),this.iushrn(o,u,g)},s.prototype.shln=function(o){return this.clone().ishln(o)},s.prototype.ushln=function(o){return this.clone().iushln(o)},s.prototype.shrn=function(o){return this.clone().ishrn(o)},s.prototype.ushrn=function(o){return this.clone().iushrn(o)},s.prototype.testn=function(o){n(typeof o=="number"&&o>=0);var u=o%26,g=(o-u)/26,p=1<<u;if(this.length<=g)return!1;var v=this.words[g];return!!(v&p)},s.prototype.imaskn=function(o){n(typeof o=="number"&&o>=0);var u=o%26,g=(o-u)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(u!==0&&g++,this.length=Math.min(g,this.length),u!==0){var p=67108863^67108863>>>u<<u;this.words[this.length-1]&=p}return this._strip()},s.prototype.maskn=function(o){return this.clone().imaskn(o)},s.prototype.iaddn=function(o){return n(typeof o=="number"),n(o<67108864),o<0?this.isubn(-o):this.negative!==0?this.length===1&&(this.words[0]|0)<=o?(this.words[0]=o-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(o),this.negative=1,this):this._iaddn(o)},s.prototype._iaddn=function(o){this.words[0]+=o;for(var u=0;u<this.length&&this.words[u]>=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},s.prototype.isubn=function(o){if(n(typeof o=="number"),n(o<67108864),o<0)return this.iaddn(-o);if(this.negative!==0)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u<this.length&&this.words[u]<0;u++)this.words[u]+=67108864,this.words[u+1]-=1;return this._strip()},s.prototype.addn=function(o){return this.clone().iaddn(o)},s.prototype.subn=function(o){return this.clone().isubn(o)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(o,u,g){var p=o.length+g,v;this._expand(p);var S,k=0;for(v=0;v<o.length;v++){S=(this.words[v+g]|0)+k;var m=(o.words[v]|0)*u;S-=m&67108863,k=(S>>26)-(m/67108864|0),this.words[v+g]=S&67108863}for(;v<this.length-g;v++)S=(this.words[v+g]|0)+k,k=S>>26,this.words[v+g]=S&67108863;if(k===0)return this._strip();for(n(k===-1),k=0,v=0;v<this.length;v++)S=-(this.words[v]|0)+k,k=S>>26,this.words[v]=S&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(o,u){var g=this.length-o.length,p=this.clone(),v=o,S=v.words[v.length-1]|0,k=this._countBits(S);g=26-k,g!==0&&(v=v.ushln(g),p.iushln(g),S=v.words[v.length-1]|0);var m=p.length-v.length,c;if(u!=="mod"){c=new s(null),c.length=m+1,c.words=new Array(c.length);for(var y=0;y<c.length;y++)c.words[y]=0}var V=p.clone()._ishlnsubmul(v,1,m);V.negative===0&&(p=V,c&&(c.words[m]=1));for(var H=m-1;H>=0;H--){var C=(p.words[v.length+H]|0)*67108864+(p.words[v.length+H-1]|0);for(C=Math.min(C/S|0,67108863),p._ishlnsubmul(v,C,H);p.negative!==0;)C--,p.negative=0,p._ishlnsubmul(v,1,H),p.isZero()||(p.negative^=1);c&&(c.words[H]=C)}return c&&c._strip(),p._strip(),u!=="div"&&g!==0&&p.iushrn(g),{div:c||null,mod:p}},s.prototype.divmod=function(o,u,g){if(n(!o.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var p,v,S;return this.negative!==0&&o.negative===0?(S=this.neg().divmod(o,u),u!=="mod"&&(p=S.div.neg()),u!=="div"&&(v=S.mod.neg(),g&&v.negative!==0&&v.iadd(o)),{div:p,mod:v}):this.negative===0&&o.negative!==0?(S=this.divmod(o.neg(),u),u!=="mod"&&(p=S.div.neg()),{div:p,mod:S.mod}):this.negative&o.negative?(S=this.neg().divmod(o.neg(),u),u!=="div"&&(v=S.mod.neg(),g&&v.negative!==0&&v.isub(o)),{div:S.div,mod:v}):o.length>this.length||this.cmp(o)<0?{div:new s(0),mod:this}:o.length===1?u==="div"?{div:this.divn(o.words[0]),mod:null}:u==="mod"?{div:null,mod:new s(this.modrn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new s(this.modrn(o.words[0]))}:this._wordDiv(o,u)},s.prototype.div=function(o){return this.divmod(o,"div",!1).div},s.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},s.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},s.prototype.divRound=function(o){var u=this.divmod(o);if(u.mod.isZero())return u.div;var g=u.div.negative!==0?u.mod.isub(o):u.mod,p=o.ushrn(1),v=o.andln(1),S=g.cmp(p);return S<0||v===1&&S===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},s.prototype.modrn=function(o){var u=o<0;u&&(o=-o),n(o<=67108863);for(var g=(1<<26)%o,p=0,v=this.length-1;v>=0;v--)p=(g*p+(this.words[v]|0))%o;return u?-p:p},s.prototype.modn=function(o){return this.modrn(o)},s.prototype.idivn=function(o){var u=o<0;u&&(o=-o),n(o<=67108863);for(var g=0,p=this.length-1;p>=0;p--){var v=(this.words[p]|0)+g*67108864;this.words[p]=v/o|0,g=v%o}return this._strip(),u?this.ineg():this},s.prototype.divn=function(o){return this.clone().idivn(o)},s.prototype.egcd=function(o){n(o.negative===0),n(!o.isZero());var u=this,g=o.clone();u.negative!==0?u=u.umod(o):u=u.clone();for(var p=new s(1),v=new s(0),S=new s(0),k=new s(1),m=0;u.isEven()&&g.isEven();)u.iushrn(1),g.iushrn(1),++m;for(var c=g.clone(),y=u.clone();!u.isZero();){for(var V=0,H=1;!(u.words[0]&H)&&V<26;++V,H<<=1);if(V>0)for(u.iushrn(V);V-- >0;)(p.isOdd()||v.isOdd())&&(p.iadd(c),v.isub(y)),p.iushrn(1),v.iushrn(1);for(var C=0,A=1;!(g.words[0]&A)&&C<26;++C,A<<=1);if(C>0)for(g.iushrn(C);C-- >0;)(S.isOdd()||k.isOdd())&&(S.iadd(c),k.isub(y)),S.iushrn(1),k.iushrn(1);u.cmp(g)>=0?(u.isub(g),p.isub(S),v.isub(k)):(g.isub(u),S.isub(p),k.isub(v))}return{a:S,b:k,gcd:g.iushln(m)}},s.prototype._invmp=function(o){n(o.negative===0),n(!o.isZero());var u=this,g=o.clone();u.negative!==0?u=u.umod(o):u=u.clone();for(var p=new s(1),v=new s(0),S=g.clone();u.cmpn(1)>0&&g.cmpn(1)>0;){for(var k=0,m=1;!(u.words[0]&m)&&k<26;++k,m<<=1);if(k>0)for(u.iushrn(k);k-- >0;)p.isOdd()&&p.iadd(S),p.iushrn(1);for(var c=0,y=1;!(g.words[0]&y)&&c<26;++c,y<<=1);if(c>0)for(g.iushrn(c);c-- >0;)v.isOdd()&&v.iadd(S),v.iushrn(1);u.cmp(g)>=0?(u.isub(g),p.isub(v)):(g.isub(u),v.isub(p))}var V;return u.cmpn(1)===0?V=p:V=v,V.cmpn(0)<0&&V.iadd(o),V},s.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var u=this.clone(),g=o.clone();u.negative=0,g.negative=0;for(var p=0;u.isEven()&&g.isEven();p++)u.iushrn(1),g.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;g.isEven();)g.iushrn(1);var v=u.cmp(g);if(v<0){var S=u;u=g,g=S}else if(v===0||g.cmpn(1)===0)break;u.isub(g)}while(!0);return g.iushln(p)},s.prototype.invm=function(o){return this.egcd(o).a.umod(o)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(o){return this.words[0]&o},s.prototype.bincn=function(o){n(typeof o=="number");var u=o%26,g=(o-u)/26,p=1<<u;if(this.length<=g)return this._expand(g+1),this.words[g]|=p,this;for(var v=p,S=g;v!==0&&S<this.length;S++){var k=this.words[S]|0;k+=v,v=k>>>26,k&=67108863,this.words[S]=k}return v!==0&&(this.words[S]=v,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(o){var u=o<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this._strip();var g;if(this.length>1)g=1;else{u&&(o=-o),n(o<=67108863,"Number is too big");var p=this.words[0]|0;g=p===o?0:p<o?-1:1}return this.negative!==0?-g|0:g},s.prototype.cmp=function(o){if(this.negative!==0&&o.negative===0)return-1;if(this.negative===0&&o.negative!==0)return 1;var u=this.ucmp(o);return this.negative!==0?-u|0:u},s.prototype.ucmp=function(o){if(this.length>o.length)return 1;if(this.length<o.length)return-1;for(var u=0,g=this.length-1;g>=0;g--){var p=this.words[g]|0,v=o.words[g]|0;if(p!==v){p<v?u=-1:p>v&&(u=1);break}}return u},s.prototype.gtn=function(o){return this.cmpn(o)===1},s.prototype.gt=function(o){return this.cmp(o)===1},s.prototype.gten=function(o){return this.cmpn(o)>=0},s.prototype.gte=function(o){return this.cmp(o)>=0},s.prototype.ltn=function(o){return this.cmpn(o)===-1},s.prototype.lt=function(o){return this.cmp(o)===-1},s.prototype.lten=function(o){return this.cmpn(o)<=0},s.prototype.lte=function(o){return this.cmp(o)<=0},s.prototype.eqn=function(o){return this.cmpn(o)===0},s.prototype.eq=function(o){return this.cmp(o)===0},s.red=function(o){return new Q(o)},s.prototype.toRed=function(o){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),o.convertTo(this)._forceRed(o)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(o){return this.red=o,this},s.prototype.forceRed=function(o){return n(!this.red,"Already a number in reduction context"),this._forceRed(o)},s.prototype.redAdd=function(o){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},s.prototype.redIAdd=function(o){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},s.prototype.redSub=function(o){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},s.prototype.redISub=function(o){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},s.prototype.redShl=function(o){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},s.prototype.redMul=function(o){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},s.prototype.redIMul=function(o){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(o){return n(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var L={k256:null,p224:null,p192:null,p25519:null};function F(R,o){this.name=R,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}F.prototype._tmp=function(){var o=new s(null);return o.words=new Array(Math.ceil(this.n/13)),o},F.prototype.ireduce=function(o){var u=o,g;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),g=u.bitLength();while(g>this.n);var p=g<this.n?-1:u.ucmp(this.p);return p===0?(u.words[0]=0,u.length=1):p>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},F.prototype.split=function(o,u){o.iushrn(this.n,0,u)},F.prototype.imulK=function(o){return o.imul(this.k)};function G(){F.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(G,F),G.prototype.split=function(o,u){for(var g=4194303,p=Math.min(o.length,9),v=0;v<p;v++)u.words[v]=o.words[v];if(u.length=p,o.length<=9){o.words[0]=0,o.length=1;return}var S=o.words[9];for(u.words[u.length++]=S&g,v=10;v<o.length;v++){var k=o.words[v]|0;o.words[v-10]=(k&g)<<4|S>>>22,S=k}S>>>=22,o.words[v-10]=S,S===0&&o.length>10?o.length-=10:o.length-=9},G.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var u=0,g=0;g<o.length;g++){var p=o.words[g]|0;u+=p*977,o.words[g]=u&67108863,u=p*64+(u/67108864|0)}return o.words[o.length-1]===0&&(o.length--,o.words[o.length-1]===0&&o.length--),o};function q(){F.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(q,F);function W(){F.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(W,F);function ie(){F.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(ie,F),ie.prototype.imulK=function(o){for(var u=0,g=0;g<o.length;g++){var p=(o.words[g]|0)*19+u,v=p&67108863;p>>>=26,o.words[g]=v,u=p}return u!==0&&(o.words[o.length++]=u),o},s._prime=function(o){if(L[o])return L[o];var u;if(o==="k256")u=new G;else if(o==="p224")u=new q;else if(o==="p192")u=new W;else if(o==="p25519")u=new ie;else throw new Error("Unknown prime "+o);return L[o]=u,u};function Q(R){if(typeof R=="string"){var o=s._prime(R);this.m=o.p,this.prime=o}else n(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}Q.prototype._verify1=function(o){n(o.negative===0,"red works only with positives"),n(o.red,"red works only with red numbers")},Q.prototype._verify2=function(o,u){n((o.negative|u.negative)===0,"red works only with positives"),n(o.red&&o.red===u.red,"red works only with red numbers")},Q.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):(d(o,o.umod(this.m)._forceRed(this)),o)},Q.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},Q.prototype.add=function(o,u){this._verify2(o,u);var g=o.add(u);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},Q.prototype.iadd=function(o,u){this._verify2(o,u);var g=o.iadd(u);return g.cmp(this.m)>=0&&g.isub(this.m),g},Q.prototype.sub=function(o,u){this._verify2(o,u);var g=o.sub(u);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},Q.prototype.isub=function(o,u){this._verify2(o,u);var g=o.isub(u);return g.cmpn(0)<0&&g.iadd(this.m),g},Q.prototype.shl=function(o,u){return this._verify1(o),this.imod(o.ushln(u))},Q.prototype.imul=function(o,u){return this._verify2(o,u),this.imod(o.imul(u))},Q.prototype.mul=function(o,u){return this._verify2(o,u),this.imod(o.mul(u))},Q.prototype.isqr=function(o){return this.imul(o,o.clone())},Q.prototype.sqr=function(o){return this.mul(o,o)},Q.prototype.sqrt=function(o){if(o.isZero())return o.clone();var u=this.m.andln(3);if(n(u%2===1),u===3){var g=this.m.add(new s(1)).iushrn(2);return this.pow(o,g)}for(var p=this.m.subn(1),v=0;!p.isZero()&&p.andln(1)===0;)v++,p.iushrn(1);n(!p.isZero());var S=new s(1).toRed(this),k=S.redNeg(),m=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new s(2*c*c).toRed(this);this.pow(c,m).cmp(k)!==0;)c.redIAdd(k);for(var y=this.pow(c,p),V=this.pow(o,p.addn(1).iushrn(1)),H=this.pow(o,p),C=v;H.cmp(S)!==0;){for(var A=H,B=0;A.cmp(S)!==0;B++)A=A.redSqr();n(B<C);var U=this.pow(y,new s(1).iushln(C-B-1));V=V.redMul(U),y=U.redSqr(),H=H.redMul(y),C=B}return V},Q.prototype.invm=function(o){var u=o._invmp(this.m);return u.negative!==0?(u.negative=0,this.imod(u).redNeg()):this.imod(u)},Q.prototype.pow=function(o,u){if(u.isZero())return new s(1).toRed(this);if(u.cmpn(1)===0)return o.clone();var g=4,p=new Array(1<<g);p[0]=new s(1).toRed(this),p[1]=o;for(var v=2;v<p.length;v++)p[v]=this.mul(p[v-1],o);var S=p[0],k=0,m=0,c=u.bitLength()%26;for(c===0&&(c=26),v=u.length-1;v>=0;v--){for(var y=u.words[v],V=c-1;V>=0;V--){var H=y>>V&1;if(S!==p[0]&&(S=this.sqr(S)),H===0&&k===0){m=0;continue}k<<=1,k|=H,m++,!(m!==g&&(v!==0||V!==0))&&(S=this.mul(S,p[k]),m=0,k=0)}c=26}return S},Q.prototype.convertTo=function(o){var u=o.umod(this.m);return u===o?u.clone():u},Q.prototype.convertFrom=function(o){var u=o.clone();return u.red=null,u},s.mont=function(o){return new se(o)};function se(R){Q.call(this,R),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(se,Q),se.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},se.prototype.convertFrom=function(o){var u=this.imod(o.mul(this.rinv));return u.red=null,u},se.prototype.imul=function(o,u){if(o.isZero()||u.isZero())return o.words[0]=0,o.length=1,o;var g=o.imul(u),p=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=g.isub(p).iushrn(this.shift),S=v;return v.cmp(this.m)>=0?S=v.isub(this.m):v.cmpn(0)<0&&(S=v.iadd(this.m)),S._forceRed(this)},se.prototype.mul=function(o,u){if(o.isZero()||u.isZero())return new s(0)._forceRed(this);var g=o.mul(u),p=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=g.isub(p).iushrn(this.shift),S=v;return v.cmp(this.m)>=0?S=v.isub(this.m):v.cmpn(0)<0&&(S=v.iadd(this.m)),S._forceRed(this)},se.prototype.invm=function(o){var u=this.imod(o._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(e,J)})(Zs);var ui=Zs.exports,vn={},Ot={};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.errorValues=Ot.standardErrorCodes=void 0;Ot.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}};Ot.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}};var hi={},di={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=Ot,r="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(b,I=r){if(b&&Number.isInteger(b)){const O=b.toString();if(d(t.errorValues,O))return t.errorValues[O].message;if(h(b))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return I}e.getMessageFromCode=n;function i(b){if(!Number.isInteger(b))return!1;const I=b.toString();return!!(t.errorValues[I]||h(b))}e.isValidCode=i;function s(b){var I;if(typeof b=="number")return b;if(a(b))return(I=b.code)!==null&&I!==void 0?I:b.errorCode}e.getErrorCode=s;function a(b){return typeof b=="object"&&b!==null&&(typeof b.code=="number"||typeof b.errorCode=="number")}function l(b,{shouldIncludeStack:I=!1}={}){const O={};if(b&&typeof b=="object"&&!Array.isArray(b)&&d(b,"code")&&i(b.code)){const N=b;O.code=N.code,N.message&&typeof N.message=="string"?(O.message=N.message,d(N,"data")&&(O.data=N.data)):(O.message=n(O.code),O.data={originalError:f(b)})}else O.code=t.standardErrorCodes.rpc.internal,O.message=w(b,"message")?b.message:r,O.data={originalError:f(b)};return I&&(O.stack=w(b,"stack")?b.stack:void 0),O}e.serialize=l;function h(b){return b>=-32099&&b<=-32e3}function f(b){return b&&typeof b=="object"&&!Array.isArray(b)?Object.assign({},b):b}function d(b,I){return Object.prototype.hasOwnProperty.call(b,I)}function w(b,I){return typeof b=="object"&&b!==null&&I in b&&typeof b[I]=="string"}})(di);Object.defineProperty(hi,"__esModule",{value:!0});hi.standardErrors=void 0;const Ke=Ot,vc=di;hi.standardErrors={rpc:{parse:e=>lt(Ke.standardErrorCodes.rpc.parse,e),invalidRequest:e=>lt(Ke.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>lt(Ke.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>lt(Ke.standardErrorCodes.rpc.methodNotFound,e),internal:e=>lt(Ke.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return lt(t,e)},invalidInput:e=>lt(Ke.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>lt(Ke.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>lt(Ke.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>lt(Ke.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>lt(Ke.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>lt(Ke.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>Nr(Ke.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>Nr(Ke.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>Nr(Ke.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>Nr(Ke.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>Nr(Ke.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>Nr(Ke.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new yc(t,r,n)}}};function lt(e,t){const[r,n]=bc(t);return new wc(e,r||(0,vc.getMessageFromCode)(e),n)}function Nr(e,t){const[r,n]=bc(t);return new yc(e,r||(0,vc.getMessageFromCode)(e),n)}function bc(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}let wc=class extends Error{constructor(t,r,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,n!==void 0&&(this.data=n)}},yc=class extends wc{constructor(t,r,n){if(!ku(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}};function ku(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}var fi={},Qr={};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.isErrorResponse=void 0;function Iu(e){return e.errorMessage!==void 0}Qr.isErrorResponse=Iu;var Yr={};Object.defineProperty(Yr,"__esModule",{value:!0});Yr.LIB_VERSION=void 0;Yr.LIB_VERSION="3.9.3";Object.defineProperty(fi,"__esModule",{value:!0});fi.serializeError=void 0;const xu=Qr,Au=Yr,Tu=Ot,Nu=di;function Lu(e,t){const r=(0,Nu.serialize)(Pu(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",Au.LIB_VERSION),n.searchParams.set("code",r.code.toString());const i=Ou(r.data,t);return i&&n.searchParams.set("method",i),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}fi.serializeError=Lu;function Pu(e){return typeof e=="string"?{message:e,code:Tu.standardErrorCodes.rpc.internal}:(0,xu.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e}function Ou(e,t){const r=e?.method;if(r)return r;if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t)){if(t.length>0)return t[0].method}else return t.method}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const t=Ot;Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});const r=hi;Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}});const n=fi;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const i=di;Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return i.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}})})(vn);var qe={};Object.defineProperty(qe,"__esModule",{value:!0});qe.ProviderType=qe.RegExpString=qe.IntNumber=qe.BigIntString=qe.AddressString=qe.HexString=qe.OpaqueType=void 0;function bn(){return e=>e}qe.OpaqueType=bn;qe.HexString=bn();qe.AddressString=bn();qe.BigIntString=bn();function $u(e){return Math.floor(e)}qe.IntNumber=$u;qe.RegExpString=bn();var $o;(function(e){e.CoinbaseWallet="CoinbaseWallet",e.MetaMask="MetaMask",e.Unselected=""})($o||(qe.ProviderType=$o={}));var Bu=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(z,"__esModule",{value:!0});z.isMobileWeb=z.getLocation=z.isInIFrame=z.createQrUrl=z.getFavicon=z.range=z.isBigNumber=z.ensureParsedJSONObject=z.ensureBN=z.ensureRegExpString=z.ensureIntNumber=z.ensureBuffer=z.ensureAddressString=z.ensureEvenLengthHexString=z.ensureHexString=z.isHexString=z.prepend0x=z.strip0x=z.has0xPrefix=z.hexStringFromIntNumber=z.intNumberFromHexString=z.bigIntStringFromBN=z.hexStringFromBuffer=z.hexStringToUint8Array=z.uint8ArrayToHex=z.randomBytesHex=void 0;const Ht=Bu(ui),vr=vn,ft=qe,_c=/^[0-9]*$/,Ec=/^[a-f0-9]*$/;function Fu(e){return Sc(crypto.getRandomValues(new Uint8Array(e)))}z.randomBytesHex=Fu;function Sc(e){return[...e].map(t=>t.toString(16).padStart(2,"0")).join("")}z.uint8ArrayToHex=Sc;function Du(e){return new Uint8Array(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}z.hexStringToUint8Array=Du;function ju(e,t=!1){const r=e.toString("hex");return(0,ft.HexString)(t?`0x${r}`:r)}z.hexStringFromBuffer=ju;function Hu(e){return(0,ft.BigIntString)(e.toString(10))}z.bigIntStringFromBN=Hu;function Uu(e){return(0,ft.IntNumber)(new Ht.default(yn(e,!1),16).toNumber())}z.intNumberFromHexString=Uu;function Vu(e){return(0,ft.HexString)(`0x${new Ht.default(e).toString(16)}`)}z.hexStringFromIntNumber=Vu;function Ks(e){return e.startsWith("0x")||e.startsWith("0X")}z.has0xPrefix=Ks;function gi(e){return Ks(e)?e.slice(2):e}z.strip0x=gi;function Rc(e){return Ks(e)?`0x${e.slice(2)}`:`0x${e}`}z.prepend0x=Rc;function wn(e){if(typeof e!="string")return!1;const t=gi(e).toLowerCase();return Ec.test(t)}z.isHexString=wn;function Mc(e,t=!1){if(typeof e=="string"){const r=gi(e).toLowerCase();if(Ec.test(r))return(0,ft.HexString)(t?`0x${r}`:r)}throw vr.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}z.ensureHexString=Mc;function yn(e,t=!1){let r=Mc(e,!1);return r.length%2===1&&(r=(0,ft.HexString)(`0${r}`)),t?(0,ft.HexString)(`0x${r}`):r}z.ensureEvenLengthHexString=yn;function Wu(e){if(typeof e=="string"){const t=gi(e).toLowerCase();if(wn(t)&&t.length===40)return(0,ft.AddressString)(Rc(t))}throw vr.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}z.ensureAddressString=Wu;function zu(e){if(re.isBuffer(e))return e;if(typeof e=="string"){if(wn(e)){const t=yn(e,!1);return re.from(t,"hex")}return re.from(e,"utf8")}throw vr.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)}z.ensureBuffer=zu;function Cc(e){if(typeof e=="number"&&Number.isInteger(e))return(0,ft.IntNumber)(e);if(typeof e=="string"){if(_c.test(e))return(0,ft.IntNumber)(Number(e));if(wn(e))return(0,ft.IntNumber)(new Ht.default(yn(e,!1),16).toNumber())}throw vr.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}z.ensureIntNumber=Cc;function qu(e){if(e instanceof RegExp)return(0,ft.RegExpString)(e.toString());throw vr.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)}z.ensureRegExpString=qu;function Ju(e){if(e!==null&&(Ht.default.isBN(e)||kc(e)))return new Ht.default(e.toString(10),10);if(typeof e=="number")return new Ht.default(Cc(e));if(typeof e=="string"){if(_c.test(e))return new Ht.default(e,10);if(wn(e))return new Ht.default(yn(e,!1),16)}throw vr.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}z.ensureBN=Ju;function Gu(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw vr.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}z.ensureParsedJSONObject=Gu;function kc(e){if(e==null||typeof e.constructor!="function")return!1;const{constructor:t}=e;return typeof t.config=="function"&&typeof t.EUCLID=="number"}z.isBigNumber=kc;function Zu(e,t){return Array.from({length:t-e},(r,n)=>e+n)}z.range=Zu;function Ku(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`}z.getFavicon=Ku;function Qu(e,t,r,n,i,s){const a=n?"parent-id":"id",l=new URLSearchParams({[a]:e,secret:t,server:r,v:i,chainId:s.toString()}).toString();return`${r}/#/link?${l}`}z.createQrUrl=Qu;function Ic(){try{return window.frameElement!==null}catch{return!1}}z.isInIFrame=Ic;function Yu(){try{return Ic()&&window.top?window.top.location:window.location}catch{return window.location}}z.getLocation=Yu;function Xu(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((e=window?.navigator)===null||e===void 0?void 0:e.userAgent)}z.isMobileWeb=Xu;var pi={};Object.defineProperty(pi,"__esModule",{value:!0});pi.ScopedLocalStorage=void 0;class eh{constructor(t){this.scope=t}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let n=0;n<localStorage.length;n++){const i=localStorage.key(n);typeof i=="string"&&i.startsWith(t)&&r.push(i)}r.forEach(n=>localStorage.removeItem(n))}scopedKey(t){return`${this.scope}:${t}`}}pi.ScopedLocalStorage=eh;var Wr={};const th=mr(wu);var _n={},En={},Xr={};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.EVENTS=void 0;Xr.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var dt={};Object.defineProperty(dt,"__esModule",{value:!0});dt.RelayAbstract=dt.APP_VERSION_KEY=dt.LOCAL_STORAGE_ADDRESSES_KEY=dt.WALLET_USER_NAME_KEY=void 0;const Bo=vn;dt.WALLET_USER_NAME_KEY="walletUsername";dt.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";dt.APP_VERSION_KEY="AppVersion";class rh{async makeEthereumJSONRPCRequest(t,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw Bo.standardErrors.rpc.parse({});const i=n,{error:s}=i;if(s)throw(0,Bo.serializeError)(s,t.method);return i})}}dt.RelayAbstract=rh;var en={},xc={exports:{}},Vs={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,t){var r=mn,n=r.Buffer;function i(a,l){for(var h in a)l[h]=a[h]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s);function s(a,l,h){return n(a,l,h)}s.prototype=Object.create(n.prototype),i(n,s),s.from=function(a,l,h){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,l,h)},s.alloc=function(a,l,h){if(typeof a!="number")throw new TypeError("Argument must be a number");var f=n(a);return l!==void 0?typeof h=="string"?f.fill(l,h):f.fill(l):f.fill(0),f},s.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},s.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(a)}})(Vs,Vs.exports);var Bt=Vs.exports,us,Fo;function nh(){if(Fo)return us;Fo=1;var e=fu;return us=function(r){return!!e(r)},us}var ih=gu,sh=pu,oh=sh("TypedArray.prototype.buffer",!0),ah=nh(),ch=oh||function(t){if(!ah(t))throw new ih("Not a Typed Array");return t.buffer},bt=Bt.Buffer,lh=mu,uh=ch,hh=ArrayBuffer.isView||function(t){try{return uh(t),!0}catch{return!1}},dh=typeof Uint8Array<"u",Ac=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",fh=Ac&&(bt.prototype instanceof Uint8Array||bt.TYPED_ARRAY_SUPPORT),gh=function(t,r){if(bt.isBuffer(t))return t.constructor&&!("isBuffer"in t)?bt.from(t):t;if(typeof t=="string")return bt.from(t,r);if(Ac&&hh(t)){if(t.byteLength===0)return bt.alloc(0);if(fh){var n=bt.from(t.buffer,t.byteOffset,t.byteLength);if(n.byteLength===t.byteLength)return n}var i=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),s=bt.from(i);if(s.length===t.byteLength)return s}if(dh&&t instanceof Uint8Array)return bt.from(t);var a=lh(t);if(a)for(var l=0;l<t.length;l+=1){var h=t[l];if(typeof h!="number"||h<0||h>255||~~h!==h)throw new RangeError("Array items must be numbers in the range 0-255.")}if(a||bt.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return bt.from(t);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},ph=Bt.Buffer,mh=gh;function mi(e,t){this._block=ph.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}mi.prototype.update=function(e,t){e=mh(e,t||"utf8");for(var r=this._block,n=this._blockSize,i=e.length,s=this._len,a=0;a<i;){for(var l=s%n,h=Math.min(i-a,n-l),f=0;f<h;f++)r[l+f]=e[a+f];s+=h,a+=h,s%n===0&&this._update(r)}return this._len+=i,this};mi.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var s=this._hash();return e?s.toString(e):s};mi.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var tn=mi,vh=wt,Tc=tn,bh=Bt.Buffer,wh=[1518500249,1859775393,-1894007588,-899497514],yh=new Array(80);function Sn(){this.init(),this._w=yh,Tc.call(this,64,56)}vh(Sn,Tc);Sn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function _h(e){return e<<5|e>>>27}function Eh(e){return e<<30|e>>>2}function Sh(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Sn.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,a=this._e|0,l=0;l<16;++l)t[l]=e.readInt32BE(l*4);for(;l<80;++l)t[l]=t[l-3]^t[l-8]^t[l-14]^t[l-16];for(var h=0;h<80;++h){var f=~~(h/20),d=_h(r)+Sh(f,n,i,s)+a+t[h]+wh[f]|0;a=s,s=i,i=Eh(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0};Sn.prototype._hash=function(){var e=bh.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var Rh=Sn,Mh=wt,Nc=tn,Ch=Bt.Buffer,kh=[1518500249,1859775393,-1894007588,-899497514],Ih=new Array(80);function Rn(){this.init(),this._w=Ih,Nc.call(this,64,56)}Mh(Rn,Nc);Rn.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function xh(e){return e<<1|e>>>31}function Ah(e){return e<<5|e>>>27}function Th(e){return e<<30|e>>>2}function Nh(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Rn.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,a=this._e|0,l=0;l<16;++l)t[l]=e.readInt32BE(l*4);for(;l<80;++l)t[l]=xh(t[l-3]^t[l-8]^t[l-14]^t[l-16]);for(var h=0;h<80;++h){var f=~~(h/20),d=Ah(r)+Nh(f,n,i,s)+a+t[h]+kh[f]|0;a=s,s=i,i=Th(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0};Rn.prototype._hash=function(){var e=Ch.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var Lh=Rn,Ph=wt,Lc=tn,Oh=Bt.Buffer,$h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Bh=new Array(64);function Mn(){this.init(),this._w=Bh,Lc.call(this,64,56)}Ph(Mn,Lc);Mn.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function Fh(e,t,r){return r^e&(t^r)}function Dh(e,t,r){return e&t|r&(e|t)}function jh(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function Hh(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function Uh(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function Vh(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}Mn.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,i=this._c|0,s=this._d|0,a=this._e|0,l=this._f|0,h=this._g|0,f=this._h|0,d=0;d<16;++d)t[d]=e.readInt32BE(d*4);for(;d<64;++d)t[d]=Vh(t[d-2])+t[d-7]+Uh(t[d-15])+t[d-16]|0;for(var w=0;w<64;++w){var b=f+Hh(a)+Fh(a,l,h)+$h[w]+t[w]|0,I=jh(r)+Dh(r,n,i)|0;f=h,h=l,l=a,a=s+b|0,s=i,i=n,n=r,r=b+I|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0,this._f=l+this._f|0,this._g=h+this._g|0,this._h=f+this._h|0};Mn.prototype._hash=function(){var e=Oh.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var Pc=Mn,Wh=wt,zh=Pc,qh=tn,Jh=Bt.Buffer,Gh=new Array(64);function vi(){this.init(),this._w=Gh,qh.call(this,64,56)}Wh(vi,zh);vi.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};vi.prototype._hash=function(){var e=Jh.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var Zh=vi,Kh=wt,Oc=tn,Qh=Bt.Buffer,Do=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],Yh=new Array(160);function Cn(){this.init(),this._w=Yh,Oc.call(this,128,112)}Kh(Cn,Oc);Cn.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function jo(e,t,r){return r^e&(t^r)}function Ho(e,t,r){return e&t|r&(e|t)}function Uo(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function Vo(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function Xh(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function ed(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function td(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function rd(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function Ge(e,t){return e>>>0<t>>>0?1:0}Cn.prototype._update=function(e){for(var t=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,s=this._dh|0,a=this._eh|0,l=this._fh|0,h=this._gh|0,f=this._hh|0,d=this._al|0,w=this._bl|0,b=this._cl|0,I=this._dl|0,O=this._el|0,N=this._fl|0,P=this._gl|0,M=this._hl|0,x=0;x<32;x+=2)t[x]=e.readInt32BE(x*4),t[x+1]=e.readInt32BE(x*4+4);for(;x<160;x+=2){var T=t[x-30],$=t[x-15*2+1],L=Xh(T,$),F=ed($,T);T=t[x-2*2],$=t[x-2*2+1];var G=td(T,$),q=rd($,T),W=t[x-7*2],ie=t[x-7*2+1],Q=t[x-16*2],se=t[x-16*2+1],R=F+ie|0,o=L+W+Ge(R,F)|0;R=R+q|0,o=o+G+Ge(R,q)|0,R=R+se|0,o=o+Q+Ge(R,se)|0,t[x]=o,t[x+1]=R}for(var u=0;u<160;u+=2){o=t[u],R=t[u+1];var g=Ho(r,n,i),p=Ho(d,w,b),v=Uo(r,d),S=Uo(d,r),k=Vo(a,O),m=Vo(O,a),c=Do[u],y=Do[u+1],V=jo(a,l,h),H=jo(O,N,P),C=M+m|0,A=f+k+Ge(C,M)|0;C=C+H|0,A=A+V+Ge(C,H)|0,C=C+y|0,A=A+c+Ge(C,y)|0,C=C+R|0,A=A+o+Ge(C,R)|0;var B=S+p|0,U=v+g+Ge(B,S)|0;f=h,M=P,h=l,P=N,l=a,N=O,O=I+C|0,a=s+A+Ge(O,I)|0,s=i,I=b,i=n,b=w,n=r,w=d,d=C+B|0,r=A+U+Ge(d,C)|0}this._al=this._al+d|0,this._bl=this._bl+w|0,this._cl=this._cl+b|0,this._dl=this._dl+I|0,this._el=this._el+O|0,this._fl=this._fl+N|0,this._gl=this._gl+P|0,this._hl=this._hl+M|0,this._ah=this._ah+r+Ge(this._al,d)|0,this._bh=this._bh+n+Ge(this._bl,w)|0,this._ch=this._ch+i+Ge(this._cl,b)|0,this._dh=this._dh+s+Ge(this._dl,I)|0,this._eh=this._eh+a+Ge(this._el,O)|0,this._fh=this._fh+l+Ge(this._fl,N)|0,this._gh=this._gh+h+Ge(this._gl,P)|0,this._hh=this._hh+f+Ge(this._hl,M)|0};Cn.prototype._hash=function(){var e=Qh.allocUnsafe(64);function t(r,n,i){e.writeInt32BE(r,i),e.writeInt32BE(n,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var $c=Cn,nd=wt,id=$c,sd=tn,od=Bt.Buffer,ad=new Array(160);function bi(){this.init(),this._w=ad,sd.call(this,128,112)}nd(bi,id);bi.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};bi.prototype._hash=function(){var e=od.allocUnsafe(48);function t(r,n,i){e.writeInt32BE(r,i),e.writeInt32BE(n,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var cd=bi;(function(e){e.exports=function(r){var n=r.toLowerCase(),i=e.exports[n];if(!i)throw new Error(n+" is not supported (we accept pull requests)");return new i},e.exports.sha=Rh,e.exports.sha1=Lh,e.exports.sha224=Zh,e.exports.sha256=Pc,e.exports.sha384=cd,e.exports.sha512=$c})(xc);var ld=xc.exports;Object.defineProperty(en,"__esModule",{value:!0});en.Session=void 0;const Wo=ld,zo=z,qo="session:id",Jo="session:secret",Go="session:linked";class Qs{constructor(t,r,n,i){this._storage=t,this._id=r||(0,zo.randomBytesHex)(16),this._secret=n||(0,zo.randomBytesHex)(32),this._key=new Wo.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(t){const r=t.getItem(qo),n=t.getItem(Go),i=t.getItem(Jo);return r&&i?new Qs(t,r,i,n==="1"):null}static hash(t){return new Wo.sha256().update(t).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(t){this._linked=t,this.persistLinked()}save(){return this._storage.setItem(qo,this._id),this._storage.setItem(Jo,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Go,this._linked?"1":"0")}}en.Session=Qs;var wi={},yi={};Object.defineProperty(yi,"__esModule",{value:!0});yi.Cipher=void 0;const Un=z;class ud{constructor(t){this.secret=t}async encrypt(t){const r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,Un.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=new TextEncoder,a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,s.encode(t)),l=16,h=a.slice(a.byteLength-l),f=a.slice(0,a.byteLength-l),d=new Uint8Array(h),w=new Uint8Array(f),b=new Uint8Array([...n,...d,...w]);return(0,Un.uint8ArrayToHex)(b)}async decrypt(t){const r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");return new Promise((n,i)=>{(async function(){const s=await crypto.subtle.importKey("raw",(0,Un.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),a=(0,Un.hexStringToUint8Array)(t),l=a.slice(0,12),h=a.slice(12,28),f=a.slice(28),d=new Uint8Array([...f,...h]),w={name:"AES-GCM",iv:new Uint8Array(l)};try{const b=await window.crypto.subtle.decrypt(w,s,d),I=new TextDecoder;n(I.decode(b))}catch(b){i(b)}})()})}}yi.Cipher=ud;var _i={};Object.defineProperty(_i,"__esModule",{value:!0});_i.WalletLinkHTTP=void 0;class hd{constructor(t,r,n){this.linkAPIUrl=t,this.sessionId=r;const i=`${r}:${n}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(t){return Promise.all(t.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var t;const r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){const{events:n,error:i}=await r.json();if(i)throw new Error(`Check unseen events failed: ${i}`);const s=(t=n?.filter(a=>a.event==="Web3Response").map(a=>({type:"Event",sessionId:this.sessionId,eventId:a.id,event:a.event,data:a.data})))!==null&&t!==void 0?t:[];return this.markUnseenEventsAsSeen(s),s}throw new Error(`Check unseen events failed: ${r.status}`)}}_i.WalletLinkHTTP=hd;var zr={};Object.defineProperty(zr,"__esModule",{value:!0});zr.WalletLinkWebSocket=zr.ConnectionState=void 0;var Fr;(function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"})(Fr||(zr.ConnectionState=Fr={}));class dd{setConnectionStateListener(t){this.connectionStateListener=t}setIncomingDataListener(t){this.incomingDataListener=t}constructor(t,r=WebSocket){this.WebSocketClass=r,this.webSocket=null,this.pendingData=[],this.url=t.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((t,r)=>{var n;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(s){r(s);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,Fr.CONNECTING),i.onclose=s=>{var a;this.clearWebSocket(),r(new Error(`websocket error ${s.code}: ${s.reason}`)),(a=this.connectionStateListener)===null||a===void 0||a.call(this,Fr.DISCONNECTED)},i.onopen=s=>{var a;t(),(a=this.connectionStateListener)===null||a===void 0||a.call(this,Fr.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(h=>this.sendData(h)),this.pendingData=[])},i.onmessage=s=>{var a,l;if(s.data==="h")(a=this.incomingDataListener)===null||a===void 0||a.call(this,{type:"Heartbeat"});else try{const h=JSON.parse(s.data);(l=this.incomingDataListener)===null||l===void 0||l.call(this,h)}catch{}}})}disconnect(){var t;const{webSocket:r}=this;if(r){this.clearWebSocket(),(t=this.connectionStateListener)===null||t===void 0||t.call(this,Fr.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{r.close()}catch{}}}sendData(t){const{webSocket:r}=this;if(!r){this.pendingData.push(t),this.connect();return}r.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}zr.WalletLinkWebSocket=dd;Object.defineProperty(wi,"__esModule",{value:!0});wi.WalletLinkConnection=void 0;const Lr=qe,fd=yi,St=Xr,Zo=dt,Pr=en,gd=_i,Vn=zr,Ko=1e4,pd=6e4;class md{constructor({session:t,linkAPIUrl:r,listener:n,diagnostic:i,WebSocketClass:s=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,Lr.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=l=>{if(!l)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",f=>l.JsonRpcUrl&&this.handleChainUpdated(f,l.JsonRpcUrl)]]).forEach((f,d)=>{const w=l[d];w!==void 0&&f(w)})},this.handleDestroyed=l=>{var h,f;l==="1"&&((h=this.listener)===null||h===void 0||h.resetAndReload(),(f=this.diagnostic)===null||f===void 0||f.log(St.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:Pr.Session.hash(this.session.id)}))},this.handleAccountUpdated=async l=>{var h,f;try{const d=await this.cipher.decrypt(l);(h=this.listener)===null||h===void 0||h.accountUpdated(d)}catch{(f=this.diagnostic)===null||f===void 0||f.log(St.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(l,h)=>{var f,d;try{const w=await this.cipher.decrypt(h);(f=this.listener)===null||f===void 0||f.metadataUpdated(l,w)}catch{(d=this.diagnostic)===null||d===void 0||d.log(St.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:l})}},this.handleWalletUsernameUpdated=async l=>{this.handleMetadataUpdated(Zo.WALLET_USER_NAME_KEY,l)},this.handleAppVersionUpdated=async l=>{this.handleMetadataUpdated(Zo.APP_VERSION_KEY,l)},this.handleChainUpdated=async(l,h)=>{var f,d;try{const w=await this.cipher.decrypt(l),b=await this.cipher.decrypt(h);(f=this.listener)===null||f===void 0||f.chainUpdated(w,b)}catch{(d=this.diagnostic)===null||d===void 0||d.log(St.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=t,this.cipher=new fd.Cipher(t.secret),this.diagnostic=i,this.listener=n;const a=new Vn.WalletLinkWebSocket(`${r}/rpc`,s);a.setConnectionStateListener(async l=>{var h;(h=this.diagnostic)===null||h===void 0||h.log(St.EVENTS.CONNECTED_STATE_CHANGE,{state:l,sessionIdHash:Pr.Session.hash(t.id)});let f=!1;switch(l){case Vn.ConnectionState.DISCONNECTED:if(!this.destroyed){const d=async()=>{await new Promise(w=>setTimeout(w,5e3)),this.destroyed||a.connect().catch(()=>{d()})};d()}break;case Vn.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),f=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},Ko),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case Vn.ConnectionState.CONNECTING:break}this.connected!==f&&(this.connected=f)}),a.setIncomingDataListener(l=>{var h,f,d;switch(l.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const w=l.type==="IsLinkedOK"?l.linked:void 0;(h=this.diagnostic)===null||h===void 0||h.log(St.EVENTS.LINKED,{sessionIdHash:Pr.Session.hash(t.id),linked:w,type:l.type,onlineGuests:l.onlineGuests}),this.linked=w||l.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(f=this.diagnostic)===null||f===void 0||f.log(St.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:Pr.Session.hash(t.id),metadata_keys:l&&l.metadata?Object.keys(l.metadata):void 0}),this.handleSessionMetadataUpdated(l.metadata);break}case"Event":{this.handleIncomingEvent(l);break}}l.id!==void 0&&((d=this.requestResolutions.get(l.id))===null||d===void 0||d(l))}),this.ws=a,this.http=new gd.WalletLinkHTTP(r,t.id,t.key)}connect(){var t;if(this.destroyed)throw new Error("instance is destroyed");(t=this.diagnostic)===null||t===void 0||t.log(St.EVENTS.STARTED_CONNECTING,{sessionIdHash:Pr.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var t;this.destroyed=!0,this.ws.disconnect(),(t=this.diagnostic)===null||t===void 0||t.log(St.EVENTS.DISCONNECTED,{sessionIdHash:Pr.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(t){var r,n;this._connected=t,t&&((r=this.onceConnected)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.connectedUpdated(t)}setOnceConnected(t){return new Promise(r=>{this.connected?t().then(r):this.onceConnected=()=>{t().then(r),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(t){var r,n;this._linked=t,t&&((r=this.onceLinked)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(t)}setOnceLinked(t){return new Promise(r=>{this.linked?t().then(r):this.onceLinked=()=>{t().then(r),this.onceLinked=void 0}})}async handleIncomingEvent(t){var r,n;if(!(t.type!=="Event"||t.event!=="Web3Response"))try{const i=await this.cipher.decrypt(t.data),s=JSON.parse(i);if(s.type!=="WEB3_RESPONSE")return;(r=this.listener)===null||r===void 0||r.handleWeb3ResponseMessage(s)}catch{(n=this.diagnostic)===null||n===void 0||n.log(St.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(t=>setTimeout(t,250));try{await this.fetchUnseenEventsAPI()}catch(t){console.error("Unable to check for unseen events",t)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(r=>this.handleIncomingEvent(r))}async setSessionMetadata(t,r){const n={type:"SetSessionConfig",id:(0,Lr.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[t]:r}};return this.setOnceConnected(async()=>{const i=await this.makeRequest(n);if(i.type==="Fail")throw new Error(i.error||"failed to set session metadata")})}async publishEvent(t,r,n=!1){const i=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),s={type:"PublishEvent",id:(0,Lr.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:t,data:i,callWebhook:n};return this.setOnceLinked(async()=>{const a=await this.makeRequest(s);if(a.type==="Fail")throw new Error(a.error||"failed to publish event");return a.eventId})}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>Ko*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(t,r=pd){const n=t.id;this.sendData(t);let i;return Promise.race([new Promise((s,a)=>{i=window.setTimeout(()=>{a(new Error(`request ${n} timed out`))},r)}),new Promise(s=>{this.requestResolutions.set(n,a=>{clearTimeout(i),s(a),this.requestResolutions.delete(n)})})])}async authenticate(){const t={type:"HostSession",id:(0,Lr.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},r=await this.makeRequest(t);if(r.type==="Fail")throw new Error(r.error||"failed to authentcate")}sendIsLinked(){const t={type:"IsLinked",id:(0,Lr.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(t)}sendGetSessionConfig(){const t={type:"GetSessionConfig",id:(0,Lr.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(t)}}wi.WalletLinkConnection=md;var kn={},In={},Ys={};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}';var vd=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(In,"__esModule",{value:!0});In.injectCssReset=void 0;const bd=vd(Ys);function wd(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(bd.default)),document.documentElement.appendChild(e)}In.injectCssReset=wd;var Ei={};const nt=mr(vu);var Si={};function Bc(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=Bc(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Qo(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Bc(e))&&(n&&(n+=" "),n+=t);return n}const yd=Object.freeze(Object.defineProperty({__proto__:null,clsx:Qo,default:Qo},Symbol.toStringTag,{value:"Module"})),xn=mr(yd),Ri=mr(bu);var qr={},Mi={};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.CloseIcon=void 0;const Yo=nt;function _d(e){return(0,Yo.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,Yo.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}Mi.CloseIcon=_d;var Ci={};Object.defineProperty(Ci,"__esModule",{value:!0});Ci.CoinbaseWalletRound=void 0;const Wn=nt;function Ed(e){return(0,Wn.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,Wn.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,Wn.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,Wn.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}Ci.CoinbaseWalletRound=Ed;var ki={};Object.defineProperty(ki,"__esModule",{value:!0});ki.QRCodeIcon=void 0;const an=nt;function Sd(e){return(0,an.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),(0,an.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,an.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,an.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,an.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}ki.QRCodeIcon=Sd;var Ii={};function Fc(e){this.mode=at.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,r=this.data.length;t<r;t++){var n=[],i=this.data.charCodeAt(t);i>65536?(n[0]=240|(i&1835008)>>>18,n[1]=128|(i&258048)>>>12,n[2]=128|(i&4032)>>>6,n[3]=128|i&63):i>2048?(n[0]=224|(i&61440)>>>12,n[1]=128|(i&4032)>>>6,n[2]=128|i&63):i>128?(n[0]=192|(i&1984)>>>6,n[1]=128|i&63):n[0]=i,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}Fc.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,r=this.parsedData.length;t<r;t++)e.put(this.parsedData[t],8)}};function xt(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}xt.prototype={addData:function(e){var t=new Fc(e);this.dataList.push(t),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=xt.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[e+r][t+n]=!0:this.modules[e+r][t+n]=!1)},getBestMaskPattern:function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=Ue.getLostPoint(this);(r==0||e>n)&&(e=n,t=r)}return t},createMovieClip:function(e,t,r){var n=e.createEmptyMovieClip(t,r),i=1;this.make();for(var s=0;s<this.modules.length;s++)for(var a=s*i,l=0;l<this.modules[s].length;l++){var h=l*i,f=this.modules[s][l];f&&(n.beginFill(0,100),n.moveTo(h,a),n.lineTo(h+i,a),n.lineTo(h+i,a+i),n.lineTo(h,a+i),n.endFill())}return n},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)this.modules[e][6]==null&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=Ue.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var r=0;r<e.length;r++){var n=e[t],i=e[r];if(this.modules[n][i]==null)for(var s=-2;s<=2;s++)for(var a=-2;a<=2;a++)s==-2||s==2||a==-2||a==2||s==0&&a==0?this.modules[n+s][i+a]=!0:this.modules[n+s][i+a]=!1}},setupTypeNumber:function(e){for(var t=Ue.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=Ue.getBCHTypeInfo(r),i=0;i<15;i++){var s=!e&&(n>>i&1)==1;i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(var i=0;i<15;i++){var s=!e&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var r=-1,n=this.moduleCount-1,i=7,s=0,a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(var l=0;l<2;l++)if(this.modules[n][a-l]==null){var h=!1;s<e.length&&(h=(e[s]>>>i&1)==1);var f=Ue.getMask(t,n,a-l);f&&(h=!h),this.modules[n][a-l]=h,i--,i==-1&&(s++,i=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}};xt.PAD0=236;xt.PAD1=17;xt.createData=function(e,t,r){for(var n=It.getRSBlocks(e,t),i=new Dc,s=0;s<r.length;s++){var a=r[s];i.put(a.mode,4),i.put(a.getLength(),Ue.getLengthInBits(a.mode,e)),a.write(i)}for(var l=0,s=0;s<n.length;s++)l+=n[s].dataCount;if(i.getLengthInBits()>l*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+l*8+")");for(i.getLengthInBits()+4<=l*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=l*8||(i.put(xt.PAD0,8),i.getLengthInBits()>=l*8));)i.put(xt.PAD1,8);return xt.createBytes(i,n)};xt.createBytes=function(e,t){for(var r=0,n=0,i=0,s=new Array(t.length),a=new Array(t.length),l=0;l<t.length;l++){var h=t[l].dataCount,f=t[l].totalCount-h;n=Math.max(n,h),i=Math.max(i,f),s[l]=new Array(h);for(var d=0;d<s[l].length;d++)s[l][d]=255&e.buffer[d+r];r+=h;var w=Ue.getErrorCorrectPolynomial(f),b=new jr(s[l],w.getLength()-1),I=b.mod(w);a[l]=new Array(w.getLength()-1);for(var d=0;d<a[l].length;d++){var O=d+I.getLength()-a[l].length;a[l][d]=O>=0?I.get(O):0}}for(var N=0,d=0;d<t.length;d++)N+=t[d].totalCount;for(var P=new Array(N),M=0,d=0;d<n;d++)for(var l=0;l<t.length;l++)d<s[l].length&&(P[M++]=s[l][d]);for(var d=0;d<i;d++)for(var l=0;l<t.length;l++)d<a[l].length&&(P[M++]=a[l][d]);return P};var at={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Ut={L:1,M:0,Q:3,H:2},Dt={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Ue={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;Ue.getBCHDigit(t)-Ue.getBCHDigit(Ue.G15)>=0;)t^=Ue.G15<<Ue.getBCHDigit(t)-Ue.getBCHDigit(Ue.G15);return(e<<10|t)^Ue.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;Ue.getBCHDigit(t)-Ue.getBCHDigit(Ue.G18)>=0;)t^=Ue.G18<<Ue.getBCHDigit(t)-Ue.getBCHDigit(Ue.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;e!=0;)t++,e>>>=1;return t},getPatternPosition:function(e){return Ue.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case Dt.PATTERN000:return(t+r)%2==0;case Dt.PATTERN001:return t%2==0;case Dt.PATTERN010:return r%3==0;case Dt.PATTERN011:return(t+r)%3==0;case Dt.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case Dt.PATTERN101:return t*r%2+t*r%3==0;case Dt.PATTERN110:return(t*r%2+t*r%3)%2==0;case Dt.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new jr([1],0),r=0;r<e;r++)t=t.multiply(new jr([1,Ze.gexp(r)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case at.MODE_NUMBER:return 10;case at.MODE_ALPHA_NUM:return 9;case at.MODE_8BIT_BYTE:return 8;case at.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case at.MODE_NUMBER:return 12;case at.MODE_ALPHA_NUM:return 11;case at.MODE_8BIT_BYTE:return 16;case at.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else if(t<41)switch(e){case at.MODE_NUMBER:return 14;case at.MODE_ALPHA_NUM:return 13;case at.MODE_8BIT_BYTE:return 16;case at.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}else throw new Error("type:"+t)},getLostPoint:function(e){for(var t=e.getModuleCount(),r=0,n=0;n<t;n++)for(var i=0;i<t;i++){for(var s=0,a=e.isDark(n,i),l=-1;l<=1;l++)if(!(n+l<0||t<=n+l))for(var h=-1;h<=1;h++)i+h<0||t<=i+h||l==0&&h==0||a==e.isDark(n+l,i+h)&&s++;s>5&&(r+=3+s-5)}for(var n=0;n<t-1;n++)for(var i=0;i<t-1;i++){var f=0;e.isDark(n,i)&&f++,e.isDark(n+1,i)&&f++,e.isDark(n,i+1)&&f++,e.isDark(n+1,i+1)&&f++,(f==0||f==4)&&(r+=3)}for(var n=0;n<t;n++)for(var i=0;i<t-6;i++)e.isDark(n,i)&&!e.isDark(n,i+1)&&e.isDark(n,i+2)&&e.isDark(n,i+3)&&e.isDark(n,i+4)&&!e.isDark(n,i+5)&&e.isDark(n,i+6)&&(r+=40);for(var i=0;i<t;i++)for(var n=0;n<t-6;n++)e.isDark(n,i)&&!e.isDark(n+1,i)&&e.isDark(n+2,i)&&e.isDark(n+3,i)&&e.isDark(n+4,i)&&!e.isDark(n+5,i)&&e.isDark(n+6,i)&&(r+=40);for(var d=0,i=0;i<t;i++)for(var n=0;n<t;n++)e.isDark(n,i)&&d++;var w=Math.abs(100*d/t/t-50)/5;return r+=w*10,r}},Ze={glog:function(e){if(e<1)throw new Error("glog("+e+")");return Ze.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return Ze.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var Qe=0;Qe<8;Qe++)Ze.EXP_TABLE[Qe]=1<<Qe;for(var Qe=8;Qe<256;Qe++)Ze.EXP_TABLE[Qe]=Ze.EXP_TABLE[Qe-4]^Ze.EXP_TABLE[Qe-5]^Ze.EXP_TABLE[Qe-6]^Ze.EXP_TABLE[Qe-8];for(var Qe=0;Qe<255;Qe++)Ze.LOG_TABLE[Ze.EXP_TABLE[Qe]]=Qe;function jr(e,t){if(e.length==null)throw new Error(e.length+"/"+t);for(var r=0;r<e.length&&e[r]==0;)r++;this.num=new Array(e.length-r+t);for(var n=0;n<e.length-r;n++)this.num[n]=e[n+r]}jr.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<e.getLength();n++)t[r+n]^=Ze.gexp(Ze.glog(this.get(r))+Ze.glog(e.get(n)));return new jr(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=Ze.glog(this.get(0))-Ze.glog(e.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(var n=0;n<e.getLength();n++)r[n]^=Ze.gexp(Ze.glog(e.get(n))+t);return new jr(r,0).mod(e)}};function It(e,t){this.totalCount=e,this.dataCount=t}It.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];It.getRSBlocks=function(e,t){var r=It.getRsBlockTable(e,t);if(r==null)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var n=r.length/3,i=[],s=0;s<n;s++)for(var a=r[s*3+0],l=r[s*3+1],h=r[s*3+2],f=0;f<a;f++)i.push(new It(l,h));return i};It.getRsBlockTable=function(e,t){switch(t){case Ut.L:return It.RS_BLOCK_TABLE[(e-1)*4+0];case Ut.M:return It.RS_BLOCK_TABLE[(e-1)*4+1];case Ut.Q:return It.RS_BLOCK_TABLE[(e-1)*4+2];case Ut.H:return It.RS_BLOCK_TABLE[(e-1)*4+3];default:return}};function Dc(){this.buffer=[],this.length=0}Dc.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var r=0;r<t;r++)this.putBit((e>>>t-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var 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 hs=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function jc(e){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof e=="string"&&(e={content:e}),e)for(var t in e)this.options[t]=e[t];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function r(h){switch(h){case"L":return Ut.L;case"M":return Ut.M;case"Q":return Ut.Q;case"H":return Ut.H;default:throw new Error("Unknwon error correction level: "+h)}}function n(h,f){for(var d=i(h),w=1,b=0,I=0,O=hs.length;I<=O;I++){var N=hs[I];if(!N)throw new Error("Content too long: expected "+b+" but got "+d);switch(f){case"L":b=N[0];break;case"M":b=N[1];break;case"Q":b=N[2];break;case"H":b=N[3];break;default:throw new Error("Unknwon error correction level: "+f)}if(d<=b)break;w++}if(w>hs.length)throw new Error("Content too long");return w}function i(h){var f=encodeURI(h).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return f.length+(f.length!=h?3:0)}var s=this.options.content,a=n(s,this.options.ecl),l=r(this.options.ecl);this.qrcode=new xt(a,l),this.qrcode.addData(s),this.qrcode.make()}jc.prototype.svg=function(e){var t=this.options||{},r=this.qrcode.modules;typeof e>"u"&&(e={container:t.container||"svg"});for(var n=typeof t.pretty<"u"?!!t.pretty:!0,i=n?" ":"",s=n?`\r
2
+ `:"",a=t.width,l=t.height,h=r.length,f=a/(h+2*t.padding),d=l/(h+2*t.padding),w=typeof t.join<"u"?!!t.join:!1,b=typeof t.swap<"u"?!!t.swap:!1,I=typeof t.xmlDeclaration<"u"?!!t.xmlDeclaration:!0,O=typeof t.predefined<"u"?!!t.predefined:!1,N=O?i+'<defs><path id="qrmodule" d="M0 0 h'+d+" v"+f+' H0 z" style="fill:'+t.color+';shape-rendering:crispEdges;" /></defs>'+s:"",P=i+'<rect x="0" y="0" width="'+a+'" height="'+l+'" style="fill:'+t.background+';shape-rendering:crispEdges;"/>'+s,M="",x="",T=0;T<h;T++)for(var $=0;$<h;$++){var L=r[$][T];if(L){var F=$*f+t.padding*f,G=T*d+t.padding*d;if(b){var q=F;F=G,G=q}if(w){var W=f+F,ie=d+G;F=Number.isInteger(F)?Number(F):F.toFixed(2),G=Number.isInteger(G)?Number(G):G.toFixed(2),W=Number.isInteger(W)?Number(W):W.toFixed(2),ie=Number.isInteger(ie)?Number(ie):ie.toFixed(2),x+="M"+F+","+G+" V"+ie+" H"+W+" V"+G+" H"+F+" Z "}else O?M+=i+'<use x="'+F.toString()+'" y="'+G.toString()+'" href="#qrmodule" />'+s:M+=i+'<rect x="'+F.toString()+'" y="'+G.toString()+'" width="'+f+'" height="'+d+'" style="fill:'+t.color+';shape-rendering:crispEdges;"/>'+s}}w&&(M=i+'<path x="0" y="0" style="fill:'+t.color+';shape-rendering:crispEdges;" d="'+x+'" />');let Q="";if(this.options.image!==void 0&&this.options.image.svg){const R=a*this.options.image.width/100,o=l*this.options.image.height/100,u=a/2-R/2,g=l/2-o/2;Q+=`<svg x="${u}" y="${g}" width="${R}" height="${o}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,Q+=this.options.image.svg+s,Q+="</svg>"}var se="";switch(e.container){case"svg":I&&(se+='<?xml version="1.0" standalone="yes"?>'+s),se+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+a+'" height="'+l+'">'+s,se+=N+P+M,se+=Q,se+="</svg>";break;case"svg-viewbox":I&&(se+='<?xml version="1.0" standalone="yes"?>'+s),se+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+a+" "+l+'">'+s,se+=N+P+M,se+=Q,se+="</svg>";break;case"g":se+='<g width="'+a+'" height="'+l+'">'+s,se+=N+P+M,se+=Q,se+="</g>";break;default:se+=(N+P+M+Q).replace(/^\s+/,"");break}return se};var Rd=jc,Md=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.QRCode=void 0;const Cd=nt,Xo=Ri,kd=Md(Rd),Id=e=>{const[t,r]=(0,Xo.useState)("");return(0,Xo.useEffect)(()=>{var n,i;const s=new kd.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:(n=e.width)!==null&&n!==void 0?n:256,height:(i=e.height)!==null&&i!==void 0?i:256,padding:0,image:e.image}),a=re.from(s.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${a}`)},[e.bgColor,e.content,e.fgColor,e.height,e.image,e.width]),t?(0,Cd.h)("img",{src:t,alt:"QR Code"}):null};Ii.QRCode=Id;var xi={},Xs={};Object.defineProperty(Xs,"__esModule",{value:!0});Xs.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}";var xd=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xi,"__esModule",{value:!0});xi.Spinner=void 0;const zn=nt,Ad=xd(Xs),Td=e=>{var t;const r=(t=e.size)!==null&&t!==void 0?t:64,n=e.color||"#000";return(0,zn.h)("div",{class:"-cbwsdk-spinner"},(0,zn.h)("style",null,Ad.default),(0,zn.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:r,height:r}},(0,zn.h)("circle",{style:{cx:50,cy:50,r:45,stroke:n}})))};xi.Spinner=Td;var eo={};Object.defineProperty(eo,"__esModule",{value:!0});eo.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}";var Hc=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qr,"__esModule",{value:!0});qr.CoinbaseWalletSteps=qr.ConnectContent=void 0;const fr=Hc(xn),ae=nt,Nd=z,Ld=Yr,Pd=Mi,Od=Ci,$d=ki,Bd=Ii,Fd=xi,Dd=Hc(eo),ds={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:Uc},jd=e=>e==="light"?"#FFFFFF":"#0A0B0D";function Hd(e){const{theme:t}=e,r=(0,Nd.createQrUrl)(e.sessionId,e.sessionSecret,e.linkAPIUrl,e.isParentConnection,e.version,e.chainId),n=ds.steps;return(0,ae.h)("div",{"data-testid":"connect-content",className:(0,fr.default)("-cbwsdk-connect-content",t)},(0,ae.h)("style",null,Dd.default),(0,ae.h)("div",{className:"-cbwsdk-connect-content-header"},(0,ae.h)("h2",{className:(0,fr.default)("-cbwsdk-connect-content-heading",t)},"Scan to connect with our mobile app"),e.onCancel&&(0,ae.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:e.onCancel},(0,ae.h)(Pd.CloseIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,ae.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,ae.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,ae.h)(Ud,{title:ds.title,description:ds.description,theme:t})),(0,ae.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,ae.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,ae.h)(Bd.QRCode,{content:r,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,ae.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:Ld.LIB_VERSION}),(0,ae.h)("input",{type:"hidden",value:r})),(0,ae.h)(n,{theme:t}),!e.isConnected&&(0,ae.h)("div",{"data-testid":"connecting-spinner",className:(0,fr.default)("-cbwsdk-connect-content-qr-connecting",t)},(0,ae.h)(Fd.Spinner,{size:36,color:t==="dark"?"#FFF":"#000"}),(0,ae.h)("p",null,"Connecting...")))))}qr.ConnectContent=Hd;function Ud({title:e,description:t,theme:r}){return(0,ae.h)("div",{className:(0,fr.default)("-cbwsdk-connect-item",r)},(0,ae.h)("div",null,(0,ae.h)(Od.CoinbaseWalletRound,null)),(0,ae.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,ae.h)("h3",{className:"-cbwsdk-connect-item-title"},e),(0,ae.h)("p",{className:"-cbwsdk-connect-item-description"},t)))}function Uc({theme:e}){return(0,ae.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,ae.h)("li",{className:(0,fr.default)("-cbwsdk-wallet-steps-item",e)},(0,ae.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,ae.h)("li",{className:(0,fr.default)("-cbwsdk-wallet-steps-item",e)},(0,ae.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,ae.h)("span",null,"Tap ",(0,ae.h)("strong",null,"Scan")," "),(0,ae.h)("span",{className:(0,fr.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",e)},(0,ae.h)($d.QRCodeIcon,{fill:jd(e)})))))}qr.CoinbaseWalletSteps=Uc;var Ai={},Ti={};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.ArrowLeftIcon=void 0;const ea=nt;function Vd(e){return(0,ea.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),(0,ea.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}Ti.ArrowLeftIcon=Vd;var Ni={};Object.defineProperty(Ni,"__esModule",{value:!0});Ni.LaptopIcon=void 0;const fs=nt;function Wd(e){return(0,fs.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},e),(0,fs.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,fs.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}Ni.LaptopIcon=Wd;var Li={};Object.defineProperty(Li,"__esModule",{value:!0});Li.SafeIcon=void 0;const ta=nt;function zd(e){return(0,ta.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},e),(0,ta.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}Li.SafeIcon=zd;var to={};Object.defineProperty(to,"__esModule",{value:!0});to.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}";var Vc=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.TryExtensionContent=void 0;const sr=Vc(xn),ze=nt,gs=Ri,qd=Ti,Jd=Ni,Gd=Li,Zd=Vc(to);function Kd({theme:e}){const[t,r]=(0,gs.useState)(!1),n=(0,gs.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),i=(0,gs.useCallback)(()=>{t?window.location.reload():(n(),r(!0))},[n,t]);return(0,ze.h)("div",{class:(0,sr.default)("-cbwsdk-try-extension",e)},(0,ze.h)("style",null,Zd.default),(0,ze.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,ze.h)("h3",{class:(0,sr.default)("-cbwsdk-try-extension-heading",e)},"Or try the Coinbase Wallet browser extension"),(0,ze.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,ze.h)("button",{class:(0,sr.default)("-cbwsdk-try-extension-cta",e),onClick:i},t?"Refresh":"Install"),(0,ze.h)("div",null,!t&&(0,ze.h)(qd.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:e==="light"?"#0052FF":"#588AF5"})))),(0,ze.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,ze.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,ze.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,ze.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,ze.h)("span",{class:(0,sr.default)("-cbwsdk-try-extension-list-item-icon",e)},(0,ze.h)(Jd.LaptopIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,ze.h)("div",{class:(0,sr.default)("-cbwsdk-try-extension-list-item-copy",e)},"Connect with dapps with just one click on your desktop browser")),(0,ze.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,ze.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,ze.h)("span",{class:(0,sr.default)("-cbwsdk-try-extension-list-item-icon",e)},(0,ze.h)(Gd.SafeIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,ze.h)("div",{class:(0,sr.default)("-cbwsdk-try-extension-list-item-copy",e)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}Ai.TryExtensionContent=Kd;var ro={};Object.defineProperty(ro,"__esModule",{value:!0});ro.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}";var Wc=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Si,"__esModule",{value:!0});Si.ConnectDialog=void 0;const ps=Wc(xn),or=nt,ms=Ri,Qd=qr,Yd=Ai,Xd=Wc(ro),ef=e=>{const{isOpen:t,darkMode:r}=e,[n,i]=(0,ms.useState)(!t),[s,a]=(0,ms.useState)(!t);(0,ms.useEffect)(()=>{const h=[window.setTimeout(()=>{a(!t)},10)];return t?i(!1):h.push(window.setTimeout(()=>{i(!0)},360)),()=>{h.forEach(window.clearTimeout)}},[t]);const l=r?"dark":"light";return(0,or.h)("div",{class:(0,ps.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,or.h)("style",null,Xd.default),(0,or.h)("div",{class:(0,ps.default)("-cbwsdk-connect-dialog-backdrop",l,s&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,or.h)("div",{class:"-cbwsdk-connect-dialog"},(0,or.h)("div",{class:(0,ps.default)("-cbwsdk-connect-dialog-box",s&&"-cbwsdk-connect-dialog-box-hidden")},e.connectDisabled?null:(0,or.h)(Qd.ConnectContent,{theme:l,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,linkAPIUrl:e.linkAPIUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection,chainId:e.chainId,onCancel:e.onCancel}),(0,or.h)(Yd.TryExtensionContent,{theme:l}))))};Si.ConnectDialog=ef;Object.defineProperty(Ei,"__esModule",{value:!0});Ei.LinkFlow=void 0;const vs=nt,tf=Si;class rf{constructor(t){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=t.darkMode,this.version=t.version,this.sessionId=t.sessionId,this.sessionSecret=t.sessionSecret,this.linkAPIUrl=t.linkAPIUrl,this.isParentConnection=t.isParentConnection}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",t.appendChild(this.root),this.render()}setConnected(t){this.connected!==t&&(this.connected=t,this.render())}setChainId(t){this.chainId!==t&&(this.chainId=t,this.render())}detach(){var t;this.root&&((0,vs.render)(null,this.root),(t=this.root.parentElement)===null||t===void 0||t.removeChild(this.root))}setConnectDisabled(t){this.connectDisabled=t}open(t){this.isOpen=!0,this.onCancel=t.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,vs.render)((0,vs.h)(tf.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}}Ei.LinkFlow=rf;var no={},io={};Object.defineProperty(io,"__esModule",{value:!0});io.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}";(function(e){var t=J&&J.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const r=t(xn),n=nt,i=Ri,s=t(io),a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",l="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class h{constructor(b){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=b.darkMode}attach(b){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",b.appendChild(this.root),this.render()}presentItem(b){const I=this.nextItemKey++;return this.items.set(I,b),this.render(),()=>{this.items.delete(I),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([b,I])=>(0,n.h)(e.SnackbarInstance,Object.assign({},I,{key:b}))))),this.root)}}e.Snackbar=h;const f=w=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,s.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},w.children));e.SnackbarContainer=f;const d=({autoExpand:w,message:b,menuItems:I})=>{const[O,N]=(0,i.useState)(!0),[P,M]=(0,i.useState)(w??!1);(0,i.useEffect)(()=>{const T=[window.setTimeout(()=>{N(!1)},1),window.setTimeout(()=>{M(!0)},1e4)];return()=>{T.forEach(window.clearTimeout)}});const x=()=>{M(!P)};return(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance",O&&"-cbwsdk-snackbar-instance-hidden",P&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:x},(0,n.h)("img",{src:a,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},b),(0,n.h)("div",{class:"-gear-container"},!P&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:l,class:"-gear-icon",title:"Expand"}))),I&&I.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},I.map((T,$)=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item",T.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:T.onClick,key:$},(0,n.h)("svg",{width:T.svgWidth,height:T.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":T.defaultFillRule,"clip-rule":T.defaultClipRule,d:T.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item-info",T.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},T.info)))))};e.SnackbarInstance=d})(no);Object.defineProperty(kn,"__esModule",{value:!0});kn.WalletLinkRelayUI=void 0;const nf=In,sf=Ei,of=no;class af{constructor(t){this.standalone=null,this.attached=!1,this.snackbar=new of.Snackbar({darkMode:t.darkMode}),this.linkFlow=new sf.LinkFlow({darkMode:t.darkMode,version:t.version,sessionId:t.session.id,sessionSecret:t.session.secret,linkAPIUrl:t.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const t=document.documentElement,r=document.createElement("div");r.className="-cbwsdk-css-reset",t.appendChild(r),this.linkFlow.attach(r),this.snackbar.attach(r),this.attached=!0,(0,nf.injectCssReset)()}setConnected(t){this.linkFlow.setConnected(t)}setChainId(t){this.linkFlow.setChainId(t)}setConnectDisabled(t){this.linkFlow.setConnectDisabled(t)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(t){this.linkFlow.open({onCancel:t.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(t){let r;return t.isUnlinkedErrorState?r={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]}:r={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:t.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]},this.snackbar.presentItem(r)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(t){this.standalone=t}isStandalone(){var t;return(t=this.standalone)!==null&&t!==void 0?t:!1}}kn.WalletLinkRelayUI=af;Object.defineProperty(En,"__esModule",{value:!0});En.WalletLinkRelay=void 0;const Or=vn,cf=qe,He=z,ar=Xr,ra=dt,jt=en,lf=wi,cr=Qr,uf=kn;class Pt extends ra.RelayAbstract{constructor(t){var r;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=a=>{var l;this.isLinked=a;const h=this.storage.getItem(ra.LOCAL_STORAGE_ADDRESSES_KEY);if(a&&(this.session.linked=a),this.isUnlinkedErrorState=!1,h){const f=h.split(" "),d=this.storage.getItem("IsStandaloneSigning")==="true";if(f[0]!==""&&!a&&this.session.linked&&!d){this.isUnlinkedErrorState=!0;const w=this.getSessionIdHash();(l=this.diagnostic)===null||l===void 0||l.log(ar.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:w})}}},this.metadataUpdated=(a,l)=>{this.storage.setItem(a,l)},this.chainUpdated=(a,l)=>{this.chainCallbackParams.chainId===a&&this.chainCallbackParams.jsonRpcUrl===l||(this.chainCallbackParams={chainId:a,jsonRpcUrl:l},this.chainCallback&&this.chainCallback(a,l))},this.accountUpdated=a=>{this.accountsCallback&&this.accountsCallback([a]),Pt.accountRequestCallbackIds.size>0&&(Array.from(Pt.accountRequestCallbackIds.values()).forEach(l=>{const h={type:"WEB3_RESPONSE",id:l,response:{method:"requestEthereumAccounts",result:[a]}};this.invokeCallback(Object.assign(Object.assign({},h),{id:l}))}),Pt.accountRequestCallbackIds.clear())},this.connectedUpdated=a=>{this.ui.setConnected(a)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=t.linkAPIUrl,this.storage=t.storage,this.options=t;const{session:n,ui:i,connection:s}=this.subscribe();this._session=n,this.connection=s,this.relayEventManager=t.relayEventManager,this.diagnostic=t.diagnosticLogger,this._reloadOnDisconnect=(r=t.reloadOnDisconnect)!==null&&r!==void 0?r:!0,this.ui=i}subscribe(){const t=jt.Session.load(this.storage)||new jt.Session(this.storage).save(),{linkAPIUrl:r,diagnostic:n}=this,i=new lf.WalletLinkConnection({session:t,linkAPIUrl:r,diagnostic:n,listener:this}),{version:s,darkMode:a}=this.options,l=this.options.uiConstructor({linkAPIUrl:r,version:s,darkMode:a,session:t});return i.connect(),{session:t,ui:l,connection:i}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(t=>setTimeout(()=>t(null),1e3))]).then(()=>{var t,r;const n=this.ui.isStandalone();(t=this.diagnostic)===null||t===void 0||t.log(ar.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const i=jt.Session.load(this.storage);if(i?.id===this._session.id?this.storage.clear():i&&((r=this.diagnostic)===null||r===void 0||r.log(ar.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:jt.Session.hash(i.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);const{session:s,ui:a,connection:l}=this.subscribe();this._session=s,this.connection=l,this.ui=a,n&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.options.headlessMode||this.attachUI()}).catch(t=>{var r;(r=this.diagnostic)===null||r===void 0||r.log(ar.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${t}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(t,r){this.appName=t,this.appLogoUrl=r}getStorageItem(t){return this.storage.getItem(t)}get session(){return this._session}setStorageItem(t,r){this.storage.setItem(t,r)}signEthereumMessage(t,r,n,i){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,He.hexStringFromBuffer)(t,!0),address:r,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(t,r,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,He.hexStringFromBuffer)(t,!0),signature:(0,He.hexStringFromBuffer)(r,!0),addPrefix:n}})}signEthereumTransaction(t){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,He.bigIntStringFromBN)(t.weiValue),data:(0,He.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,He.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,He.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,He.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,He.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,He.bigIntStringFromBN)(t.weiValue),data:(0,He.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,He.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,He.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,He.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,He.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,r){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,He.hexStringFromBuffer)(t,!0),chainId:r}})}scanQRCode(t){return this.sendRequest({method:"scanQRCode",params:{regExp:t}})}getQRCodeUrl(){return(0,He.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(t,r){return this.sendRequest({method:"generic",params:{action:r,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let r=null;const n=(0,He.randomBytesHex)(8),i=a=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,a),r?.()};return{promise:new Promise((a,l)=>{this.ui.isStandalone()||(r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,h=>{if(r?.(),(0,cr.isErrorResponse)(h))return l(new Error(h.errorMessage));a(h)}),this.ui.isStandalone()?this.sendRequestStandalone(n,t):this.publishWeb3RequestEvent(n,t)}),cancel:i}}setConnectDisabled(t){this.ui.setConnectDisabled(t)}setAccountsCallback(t){this.accountsCallback=t}setChainCallback(t){this.chainCallback=t}setDappDefaultChainCallback(t){this.dappDefaultChain=t,this.ui instanceof uf.WalletLinkRelayUI&&this.ui.setChainId(t)}publishWeb3RequestEvent(t,r){var n;const i={type:"WEB3_REQUEST",id:t,request:r},s=jt.Session.load(this.storage);(n=this.diagnostic)===null||n===void 0||n.log(ar.EVENTS.WEB3_REQUEST,{eventId:i.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?jt.Session.hash(s.id):"",isSessionMismatched:(s?.id!==this._session.id).toString()}),this.publishEvent("Web3Request",i,!0).then(a=>{var l;(l=this.diagnostic)===null||l===void 0||l.log(ar.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s?jt.Session.hash(s.id):"",isSessionMismatched:(s?.id!==this._session.id).toString()})}).catch(a=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i.id,response:{method:r.method,errorMessage:a.message}})})}publishWeb3RequestCanceledEvent(t){const r={type:"WEB3_REQUEST_CANCELED",id:t};this.publishEvent("Web3RequestCanceled",r,!1).then()}publishEvent(t,r,n){return this.connection.publishEvent(t,r,n)}handleWeb3ResponseMessage(t){var r;const{response:n}=t;if((r=this.diagnostic)===null||r===void 0||r.log(ar.EVENTS.WEB3_RESPONSE,{eventId:t.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),n.method==="requestEthereumAccounts"){Pt.accountRequestCallbackIds.forEach(i=>this.invokeCallback(Object.assign(Object.assign({},t),{id:i}))),Pt.accountRequestCallbackIds.clear();return}this.invokeCallback(t)}handleErrorResponse(t,r,n,i){var s;const a=(s=n?.message)!==null&&s!==void 0?s:(0,Or.getMessageFromCode)(i);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:t,response:{method:r,errorMessage:a,errorCode:i}})}invokeCallback(t){const r=this.relayEventManager.callbacks.get(t.id);r&&(r(t.response),this.relayEventManager.callbacks.delete(t.id))}requestEthereumAccounts(){const t={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=(0,He.randomBytesHex)(8),n=s=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,t.method,s)};return{promise:new Promise((s,a)=>{if(this.relayEventManager.callbacks.set(r,l=>{if(this.ui.hideRequestEthereumAccounts(),(0,cr.isErrorResponse)(l))return a(new Error(l.errorMessage));s(l)}),this.ui.inlineAccountsResponse()){const l=h=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:r,response:{method:"requestEthereumAccounts",result:h}})};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:l})}else{const l=Or.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(l)})}Pt.accountRequestCallbackIds.add(r),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(r,t)}),cancel:n}}selectProvider(t){const r={method:"selectProvider",params:{providerOptions:t}},n=(0,He.randomBytesHex)(8),i=a=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,a)},s=new Promise((a,l)=>{this.relayEventManager.callbacks.set(n,d=>{if((0,cr.isErrorResponse)(d))return l(new Error(d.errorMessage));a(d)});const h=d=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:cf.ProviderType.Unselected}})},f=d=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:d}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:f,onCancel:h,providerOptions:t})});return{cancel:i,promise:s}}watchAsset(t,r,n,i,s,a){const l={method:"watchAsset",params:{type:t,options:{address:r,symbol:n,decimals:i,image:s},chainId:a}};let h=null;const f=(0,He.randomBytesHex)(8),d=b=>{this.publishWeb3RequestCanceledEvent(f),this.handleErrorResponse(f,l.method,b),h?.()};this.ui.inlineWatchAsset()||(h=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload}));const w=new Promise((b,I)=>{this.relayEventManager.callbacks.set(f,P=>{if(h?.(),(0,cr.isErrorResponse)(P))return I(new Error(P.errorMessage));b(P)});const O=P=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:f,response:{method:"watchAsset",result:!1}})},N=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:f,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:N,onCancel:O,type:t,address:r,symbol:n,decimals:i,image:s,chainId:a}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(f,l)});return{cancel:d,promise:w}}addEthereumChain(t,r,n,i,s,a){const l={method:"addEthereumChain",params:{chainId:t,rpcUrls:r,blockExplorerUrls:i,chainName:s,iconUrls:n,nativeCurrency:a}};let h=null;const f=(0,He.randomBytesHex)(8),d=b=>{this.publishWeb3RequestCanceledEvent(f),this.handleErrorResponse(f,l.method,b),h?.()};return this.ui.inlineAddEthereumChain(t)||(h=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload})),{promise:new Promise((b,I)=>{this.relayEventManager.callbacks.set(f,P=>{if(h?.(),(0,cr.isErrorResponse)(P))return I(new Error(P.errorMessage));b(P)});const O=P=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:f,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},N=P=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:f,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:P}}})};this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:O,onApprove:N,chainId:l.params.chainId,rpcUrls:l.params.rpcUrls,blockExplorerUrls:l.params.blockExplorerUrls,chainName:l.params.chainName,iconUrls:l.params.iconUrls,nativeCurrency:l.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(t)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(f,l)}),cancel:d}}switchEthereumChain(t,r){const n={method:"switchEthereumChain",params:Object.assign({chainId:t},{address:r})},i=(0,He.randomBytesHex)(8),s=l=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,n.method,l)};return{promise:new Promise((l,h)=>{this.relayEventManager.callbacks.set(i,w=>{if((0,cr.isErrorResponse)(w)&&w.errorCode)return h(Or.standardErrors.provider.custom({code:w.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,cr.isErrorResponse)(w))return h(new Error(w.errorMessage));l(w)});const f=w=>{var b;if(w){const I=(b=(0,Or.getErrorCode)(w))!==null&&b!==void 0?b:Or.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(i,"switchEthereumChain",w instanceof Error?w:Or.standardErrors.provider.unsupportedChain(t),I)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},d=w=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:w}}})};this.ui.switchEthereumChain({onCancel:f,onApprove:d,chainId:n.params.chainId,address:n.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(i,n)}),cancel:s}}inlineAddEthereumChain(t){return this.ui.inlineAddEthereumChain(t)}getSessionIdHash(){return jt.Session.hash(this._session.id)}sendRequestStandalone(t,r){const n=s=>{this.handleErrorResponse(t,r.method,s)},i=s=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:t,response:s})};switch(r.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:r,onSuccess:i,onCancel:n});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:r,onSuccess:i});break;default:n();break}}}En.WalletLinkRelay=Pt;Pt.accountRequestCallbackIds=new Set;var An={},Pi={},zc={};(function(e){var t=J&&J.__createBinding||(Object.create?function(n,i,s,a){a===void 0&&(a=s);var l=Object.getOwnPropertyDescriptor(i,s);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,a,l)}:function(n,i,s,a){a===void 0&&(a=s),n[a]=i[s]}),r=J&&J.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(no,e)})(zc);var so={};Object.defineProperty(so,"__esModule",{value:!0});so.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}";var qc=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pi,"__esModule",{value:!0});Pi.RedirectDialog=void 0;const hf=qc(xn),kt=nt,df=In,ff=zc,gf=qc(so);class pf{constructor(){this.root=null}attach(){const t=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",t.appendChild(this.root),(0,df.injectCssReset)()}present(t){this.render(t)}clear(){this.render(null)}render(t){this.root&&((0,kt.render)(null,this.root),t&&(0,kt.render)((0,kt.h)(mf,Object.assign({},t,{onDismiss:()=>{this.clear()}})),this.root))}}Pi.RedirectDialog=pf;const mf=({title:e,buttonText:t,darkMode:r,onButtonClick:n,onDismiss:i})=>{const s=r?"dark":"light";return(0,kt.h)(ff.SnackbarContainer,{darkMode:r},(0,kt.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,kt.h)("style",null,gf.default),(0,kt.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:i}),(0,kt.h)("div",{class:(0,hf.default)("-cbwsdk-redirect-dialog-box",s)},(0,kt.h)("p",null,e),(0,kt.h)("button",{onClick:n},t))))};Object.defineProperty(An,"__esModule",{value:!0});An.MobileRelayUI=void 0;const vf=Pi;class bf{constructor(t){this.attached=!1,this.darkMode=!1,this.redirectDialog=new vf.RedirectDialog,this.darkMode=t.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(t){}redirectToCoinbaseWallet(t){const r=new URL("https://go.cb-w.com/walletlink");r.searchParams.append("redirect_url",window.location.href),t&&r.searchParams.append("wl_url",t);const n=document.createElement("a");n.target="cbw-opener",n.href=r.href,n.rel="noreferrer noopener",n.click()}openCoinbaseWalletDeeplink(t){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(t)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(t)},99)}showConnecting(t){return()=>{this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}An.MobileRelayUI=bf;Object.defineProperty(_n,"__esModule",{value:!0});_n.MobileRelay=void 0;const wf=z,yf=En,_f=An;class Ef extends yf.WalletLinkRelay{constructor(t){var r;super(t),this._enableMobileWalletLink=(r=t.enableMobileWalletLink)!==null&&r!==void 0?r:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{const t=(0,wf.getLocation)();t.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(t.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(t,r){if(super.publishWeb3RequestEvent(t,r),!(this._enableMobileWalletLink&&this.ui instanceof _f.MobileRelayUI))return;let n=!1;switch(r.method){case"requestEthereumAccounts":case"connectAndSignIn":n=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:n=!0,this.ui.openCoinbaseWalletDeeplink();break}n&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(t){super.handleWeb3ResponseMessage(t)}connectAndSignIn(t){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:t.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:t.statement,resources:t.resources}})}}_n.MobileRelay=Ef;var Ws={exports:{}},Jc=Vr.EventEmitter,bs,na;function Sf(){if(na)return bs;na=1;function e(O,N){var P=Object.keys(O);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(O);N&&(M=M.filter(function(x){return Object.getOwnPropertyDescriptor(O,x).enumerable})),P.push.apply(P,M)}return P}function t(O){for(var N=1;N<arguments.length;N++){var P=arguments[N]!=null?arguments[N]:{};N%2?e(Object(P),!0).forEach(function(M){r(O,M,P[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(P)):e(Object(P)).forEach(function(M){Object.defineProperty(O,M,Object.getOwnPropertyDescriptor(P,M))})}return O}function r(O,N,P){return N=a(N),N in O?Object.defineProperty(O,N,{value:P,enumerable:!0,configurable:!0,writable:!0}):O[N]=P,O}function n(O,N){if(!(O instanceof N))throw new TypeError("Cannot call a class as a function")}function i(O,N){for(var P=0;P<N.length;P++){var M=N[P];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(O,a(M.key),M)}}function s(O,N,P){return N&&i(O.prototype,N),Object.defineProperty(O,"prototype",{writable:!1}),O}function a(O){var N=l(O,"string");return typeof N=="symbol"?N:String(N)}function l(O,N){if(typeof O!="object"||O===null)return O;var P=O[Symbol.toPrimitive];if(P!==void 0){var M=P.call(O,N||"default");if(typeof M!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return(N==="string"?String:Number)(O)}var h=mn,f=h.Buffer,d=Vr,w=d.inspect,b=w&&w.custom||"inspect";function I(O,N,P){f.prototype.copy.call(O,N,P)}return bs=function(){function O(){n(this,O),this.head=null,this.tail=null,this.length=0}return s(O,[{key:"push",value:function(P){var M={data:P,next:null};this.length>0?this.tail.next=M:this.head=M,this.tail=M,++this.length}},{key:"unshift",value:function(P){var M={data:P,next:this.head};this.length===0&&(this.tail=M),this.head=M,++this.length}},{key:"shift",value:function(){if(this.length!==0){var P=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,P}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(P){if(this.length===0)return"";for(var M=this.head,x=""+M.data;M=M.next;)x+=P+M.data;return x}},{key:"concat",value:function(P){if(this.length===0)return f.alloc(0);for(var M=f.allocUnsafe(P>>>0),x=this.head,T=0;x;)I(x.data,M,T),T+=x.data.length,x=x.next;return M}},{key:"consume",value:function(P,M){var x;return P<this.head.data.length?(x=this.head.data.slice(0,P),this.head.data=this.head.data.slice(P)):P===this.head.data.length?x=this.shift():x=M?this._getString(P):this._getBuffer(P),x}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(P){var M=this.head,x=1,T=M.data;for(P-=T.length;M=M.next;){var $=M.data,L=P>$.length?$.length:P;if(L===$.length?T+=$:T+=$.slice(0,P),P-=L,P===0){L===$.length?(++x,M.next?this.head=M.next:this.head=this.tail=null):(this.head=M,M.data=$.slice(L));break}++x}return this.length-=x,T}},{key:"_getBuffer",value:function(P){var M=f.allocUnsafe(P),x=this.head,T=1;for(x.data.copy(M),P-=x.data.length;x=x.next;){var $=x.data,L=P>$.length?$.length:P;if($.copy(M,M.length-P,0,L),P-=L,P===0){L===$.length?(++T,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=$.slice(L));break}++T}return this.length-=T,M}},{key:b,value:function(P,M){return w(this,t(t({},M),{},{depth:0,customInspect:!1}))}}]),O}(),bs}function Rf(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,he.nextTick(zs,this,e)):he.nextTick(zs,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(s){!t&&s?r._writableState?r._writableState.errorEmitted?he.nextTick(ni,r):(r._writableState.errorEmitted=!0,he.nextTick(ia,r,s)):he.nextTick(ia,r,s):t?(he.nextTick(ni,r),t(s)):he.nextTick(ni,r)}),this)}function ia(e,t){zs(e,t),ni(e)}function ni(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Mf(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function zs(e,t){e.emit("error",t)}function Cf(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var Gc={destroy:Rf,undestroy:Mf,errorOrDestroy:Cf},br={};function kf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Zc={};function pt(e,t,r){r||(r=Error);function n(s,a,l){return typeof t=="string"?t:t(s,a,l)}var i=function(s){kf(a,s);function a(l,h,f){return s.call(this,n(l,h,f))||this}return a}(r);i.prototype.name=r.name,i.prototype.code=e,Zc[e]=i}function sa(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function If(e,t,r){return e.substr(0,t.length)===t}function xf(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Af(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}pt("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);pt("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&If(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(xf(e," argument"))i="The ".concat(e," ").concat(n," ").concat(sa(t,"type"));else{var s=Af(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(s," ").concat(n," ").concat(sa(t,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);pt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");pt("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});pt("ERR_STREAM_PREMATURE_CLOSE","Premature close");pt("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});pt("ERR_MULTIPLE_CALLBACK","Callback called multiple times");pt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");pt("ERR_STREAM_WRITE_AFTER_END","write after end");pt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);pt("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);pt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");br.codes=Zc;var Tf=br.codes.ERR_INVALID_OPT_VALUE;function Nf(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Lf(e,t,r,n){var i=Nf(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var s=n?r:"highWaterMark";throw new Tf(s,i)}return Math.floor(i)}return e.objectMode?16:16*1024}var Kc={getHighWaterMark:Lf},Pf=Of;function Of(e,t){if(ws("noDeprecation"))return e;var r=!1;function n(){if(!r){if(ws("throwDeprecation"))throw new Error(t);ws("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function ws(e){try{if(!J.localStorage)return!1}catch{return!1}var t=J.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var ys,oa;function Qc(){if(oa)return ys;oa=1,ys=q;function e(C){var A=this;this.next=null,this.entry=null,this.finish=function(){H(A,C)}}var t;q.WritableState=F;var r={deprecate:Pf},n=Jc,i=mn.Buffer,s=(typeof J<"u"?J:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(C){return i.from(C)}function l(C){return i.isBuffer(C)||C instanceof s}var h=Gc,f=Kc,d=f.getHighWaterMark,w=br.codes,b=w.ERR_INVALID_ARG_TYPE,I=w.ERR_METHOD_NOT_IMPLEMENTED,O=w.ERR_MULTIPLE_CALLBACK,N=w.ERR_STREAM_CANNOT_PIPE,P=w.ERR_STREAM_DESTROYED,M=w.ERR_STREAM_NULL_VALUES,x=w.ERR_STREAM_WRITE_AFTER_END,T=w.ERR_UNKNOWN_ENCODING,$=h.errorOrDestroy;wt(q,n);function L(){}function F(C,A,B){t=t||Jr(),C=C||{},typeof B!="boolean"&&(B=A instanceof t),this.objectMode=!!C.objectMode,B&&(this.objectMode=this.objectMode||!!C.writableObjectMode),this.highWaterMark=d(this,C,"writableHighWaterMark",B),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U=C.decodeStrings===!1;this.decodeStrings=!U,this.defaultEncoding=C.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ee){g(A,ee)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=C.emitClose!==!1,this.autoDestroy=!!C.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}F.prototype.getBuffer=function(){for(var A=this.bufferedRequest,B=[];A;)B.push(A),A=A.next;return B},function(){try{Object.defineProperty(F.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var G;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(G=Function.prototype[Symbol.hasInstance],Object.defineProperty(q,Symbol.hasInstance,{value:function(A){return G.call(this,A)?!0:this!==q?!1:A&&A._writableState instanceof F}})):G=function(A){return A instanceof this};function q(C){t=t||Jr();var A=this instanceof t;if(!A&&!G.call(q,this))return new q(C);this._writableState=new F(C,this,A),this.writable=!0,C&&(typeof C.write=="function"&&(this._write=C.write),typeof C.writev=="function"&&(this._writev=C.writev),typeof C.destroy=="function"&&(this._destroy=C.destroy),typeof C.final=="function"&&(this._final=C.final)),n.call(this)}q.prototype.pipe=function(){$(this,new N)};function W(C,A){var B=new x;$(C,B),he.nextTick(A,B)}function ie(C,A,B,U){var ee;return B===null?ee=new M:typeof B!="string"&&!A.objectMode&&(ee=new b("chunk",["string","Buffer"],B)),ee?($(C,ee),he.nextTick(U,ee),!1):!0}q.prototype.write=function(C,A,B){var U=this._writableState,ee=!1,_=!U.objectMode&&l(C);return _&&!i.isBuffer(C)&&(C=a(C)),typeof A=="function"&&(B=A,A=null),_?A="buffer":A||(A=U.defaultEncoding),typeof B!="function"&&(B=L),U.ending?W(this,B):(_||ie(this,U,C,B))&&(U.pendingcb++,ee=se(this,U,_,C,A,B)),ee},q.prototype.cork=function(){this._writableState.corked++},q.prototype.uncork=function(){var C=this._writableState;C.corked&&(C.corked--,!C.writing&&!C.corked&&!C.bufferProcessing&&C.bufferedRequest&&S(this,C))},q.prototype.setDefaultEncoding=function(A){if(typeof A=="string"&&(A=A.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((A+"").toLowerCase())>-1))throw new T(A);return this._writableState.defaultEncoding=A,this},Object.defineProperty(q.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Q(C,A,B){return!C.objectMode&&C.decodeStrings!==!1&&typeof A=="string"&&(A=i.from(A,B)),A}Object.defineProperty(q.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function se(C,A,B,U,ee,_){if(!B){var E=Q(A,U,ee);U!==E&&(B=!0,ee="buffer",U=E)}var D=A.objectMode?1:U.length;A.length+=D;var j=A.length<A.highWaterMark;if(j||(A.needDrain=!0),A.writing||A.corked){var K=A.lastBufferedRequest;A.lastBufferedRequest={chunk:U,encoding:ee,isBuf:B,callback:_,next:null},K?K.next=A.lastBufferedRequest:A.bufferedRequest=A.lastBufferedRequest,A.bufferedRequestCount+=1}else R(C,A,!1,D,U,ee,_);return j}function R(C,A,B,U,ee,_,E){A.writelen=U,A.writecb=E,A.writing=!0,A.sync=!0,A.destroyed?A.onwrite(new P("write")):B?C._writev(ee,A.onwrite):C._write(ee,_,A.onwrite),A.sync=!1}function o(C,A,B,U,ee){--A.pendingcb,B?(he.nextTick(ee,U),he.nextTick(y,C,A),C._writableState.errorEmitted=!0,$(C,U)):(ee(U),C._writableState.errorEmitted=!0,$(C,U),y(C,A))}function u(C){C.writing=!1,C.writecb=null,C.length-=C.writelen,C.writelen=0}function g(C,A){var B=C._writableState,U=B.sync,ee=B.writecb;if(typeof ee!="function")throw new O;if(u(B),A)o(C,B,U,A,ee);else{var _=k(B)||C.destroyed;!_&&!B.corked&&!B.bufferProcessing&&B.bufferedRequest&&S(C,B),U?he.nextTick(p,C,B,_,ee):p(C,B,_,ee)}}function p(C,A,B,U){B||v(C,A),A.pendingcb--,U(),y(C,A)}function v(C,A){A.length===0&&A.needDrain&&(A.needDrain=!1,C.emit("drain"))}function S(C,A){A.bufferProcessing=!0;var B=A.bufferedRequest;if(C._writev&&B&&B.next){var U=A.bufferedRequestCount,ee=new Array(U),_=A.corkedRequestsFree;_.entry=B;for(var E=0,D=!0;B;)ee[E]=B,B.isBuf||(D=!1),B=B.next,E+=1;ee.allBuffers=D,R(C,A,!0,A.length,ee,"",_.finish),A.pendingcb++,A.lastBufferedRequest=null,_.next?(A.corkedRequestsFree=_.next,_.next=null):A.corkedRequestsFree=new e(A),A.bufferedRequestCount=0}else{for(;B;){var j=B.chunk,K=B.encoding,X=B.callback,Z=A.objectMode?1:j.length;if(R(C,A,!1,Z,j,K,X),B=B.next,A.bufferedRequestCount--,A.writing)break}B===null&&(A.lastBufferedRequest=null)}A.bufferedRequest=B,A.bufferProcessing=!1}q.prototype._write=function(C,A,B){B(new I("_write()"))},q.prototype._writev=null,q.prototype.end=function(C,A,B){var U=this._writableState;return typeof C=="function"?(B=C,C=null,A=null):typeof A=="function"&&(B=A,A=null),C!=null&&this.write(C,A),U.corked&&(U.corked=1,this.uncork()),U.ending||V(this,U,B),this},Object.defineProperty(q.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function k(C){return C.ending&&C.length===0&&C.bufferedRequest===null&&!C.finished&&!C.writing}function m(C,A){C._final(function(B){A.pendingcb--,B&&$(C,B),A.prefinished=!0,C.emit("prefinish"),y(C,A)})}function c(C,A){!A.prefinished&&!A.finalCalled&&(typeof C._final=="function"&&!A.destroyed?(A.pendingcb++,A.finalCalled=!0,he.nextTick(m,C,A)):(A.prefinished=!0,C.emit("prefinish")))}function y(C,A){var B=k(A);if(B&&(c(C,A),A.pendingcb===0&&(A.finished=!0,C.emit("finish"),A.autoDestroy))){var U=C._readableState;(!U||U.autoDestroy&&U.endEmitted)&&C.destroy()}return B}function V(C,A,B){A.ending=!0,y(C,A),B&&(A.finished?he.nextTick(B):C.once("finish",B)),A.ended=!0,C.writable=!1}function H(C,A,B){var U=C.entry;for(C.entry=null;U;){var ee=U.callback;A.pendingcb--,ee(B),U=U.next}A.corkedRequestsFree.next=C}return Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(A){this._writableState&&(this._writableState.destroyed=A)}}),q.prototype.destroy=h.destroy,q.prototype._undestroy=h.undestroy,q.prototype._destroy=function(C,A){A(C)},ys}var _s,aa;function Jr(){if(aa)return _s;aa=1;var e=Object.keys||function(f){var d=[];for(var w in f)d.push(w);return d};_s=a;var t=Xc(),r=Qc();wt(a,t);for(var n=e(r.prototype),i=0;i<n.length;i++){var s=n[i];a.prototype[s]||(a.prototype[s]=r.prototype[s])}function a(f){if(!(this instanceof a))return new a(f);t.call(this,f),r.call(this,f),this.allowHalfOpen=!0,f&&(f.readable===!1&&(this.readable=!1),f.writable===!1&&(this.writable=!1),f.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",l)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function l(){this._writableState.ended||he.nextTick(h,this)}function h(f){f.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(d){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=d,this._writableState.destroyed=d)}}),_s}var Es={},ca;function la(){if(ca)return Es;ca=1;var e=Bt.Buffer,t=e.isEncoding||function(M){switch(M=""+M,M&&M.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(M){if(!M)return"utf8";for(var x;;)switch(M){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return M;default:if(x)return;M=(""+M).toLowerCase(),x=!0}}function n(M){var x=r(M);if(typeof x!="string"&&(e.isEncoding===t||!t(M)))throw new Error("Unknown encoding: "+M);return x||M}Es.StringDecoder=i;function i(M){this.encoding=n(M);var x;switch(this.encoding){case"utf16le":this.text=w,this.end=b,x=4;break;case"utf8":this.fillLast=h,x=4;break;case"base64":this.text=I,this.end=O,x=3;break;default:this.write=N,this.end=P;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(x)}i.prototype.write=function(M){if(M.length===0)return"";var x,T;if(this.lastNeed){if(x=this.fillLast(M),x===void 0)return"";T=this.lastNeed,this.lastNeed=0}else T=0;return T<M.length?x?x+this.text(M,T):this.text(M,T):x||""},i.prototype.end=d,i.prototype.text=f,i.prototype.fillLast=function(M){if(this.lastNeed<=M.length)return M.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);M.copy(this.lastChar,this.lastTotal-this.lastNeed,0,M.length),this.lastNeed-=M.length};function s(M){return M<=127?0:M>>5===6?2:M>>4===14?3:M>>3===30?4:M>>6===2?-1:-2}function a(M,x,T){var $=x.length-1;if($<T)return 0;var L=s(x[$]);return L>=0?(L>0&&(M.lastNeed=L-1),L):--$<T||L===-2?0:(L=s(x[$]),L>=0?(L>0&&(M.lastNeed=L-2),L):--$<T||L===-2?0:(L=s(x[$]),L>=0?(L>0&&(L===2?L=0:M.lastNeed=L-3),L):0))}function l(M,x,T){if((x[0]&192)!==128)return M.lastNeed=0,"�";if(M.lastNeed>1&&x.length>1){if((x[1]&192)!==128)return M.lastNeed=1,"�";if(M.lastNeed>2&&x.length>2&&(x[2]&192)!==128)return M.lastNeed=2,"�"}}function h(M){var x=this.lastTotal-this.lastNeed,T=l(this,M);if(T!==void 0)return T;if(this.lastNeed<=M.length)return M.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);M.copy(this.lastChar,x,0,M.length),this.lastNeed-=M.length}function f(M,x){var T=a(this,M,x);if(!this.lastNeed)return M.toString("utf8",x);this.lastTotal=T;var $=M.length-(T-this.lastNeed);return M.copy(this.lastChar,0,$),M.toString("utf8",x,$)}function d(M){var x=M&&M.length?this.write(M):"";return this.lastNeed?x+"�":x}function w(M,x){if((M.length-x)%2===0){var T=M.toString("utf16le",x);if(T){var $=T.charCodeAt(T.length-1);if($>=55296&&$<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=M[M.length-2],this.lastChar[1]=M[M.length-1],T.slice(0,-1)}return T}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=M[M.length-1],M.toString("utf16le",x,M.length-1)}function b(M){var x=M&&M.length?this.write(M):"";if(this.lastNeed){var T=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,T)}return x}function I(M,x){var T=(M.length-x)%3;return T===0?M.toString("base64",x):(this.lastNeed=3-T,this.lastTotal=3,T===1?this.lastChar[0]=M[M.length-1]:(this.lastChar[0]=M[M.length-2],this.lastChar[1]=M[M.length-1]),M.toString("base64",x,M.length-T))}function O(M){var x=M&&M.length?this.write(M):"";return this.lastNeed?x+this.lastChar.toString("base64",0,3-this.lastNeed):x}function N(M){return M.toString(this.encoding)}function P(M){return M&&M.length?this.write(M):""}return Es}var ua=br.codes.ERR_STREAM_PREMATURE_CLOSE;function $f(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function Bf(){}function Ff(e){return e.setHeader&&typeof e.abort=="function"}function Yc(e,t,r){if(typeof t=="function")return Yc(e,null,t);t||(t={}),r=$f(r||Bf);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,s=function(){e.writable||l()},a=e._writableState&&e._writableState.finished,l=function(){i=!1,a=!0,n||r.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){n=!1,h=!0,i||r.call(e)},d=function(O){r.call(e,O)},w=function(){var O;if(n&&!h)return(!e._readableState||!e._readableState.ended)&&(O=new ua),r.call(e,O);if(i&&!a)return(!e._writableState||!e._writableState.ended)&&(O=new ua),r.call(e,O)},b=function(){e.req.on("finish",l)};return Ff(e)?(e.on("complete",l),e.on("abort",w),e.req?b():e.on("request",b)):i&&!e._writableState&&(e.on("end",s),e.on("close",s)),e.on("end",f),e.on("finish",l),t.error!==!1&&e.on("error",d),e.on("close",w),function(){e.removeListener("complete",l),e.removeListener("abort",w),e.removeListener("request",b),e.req&&e.req.removeListener("finish",l),e.removeListener("end",s),e.removeListener("close",s),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",w)}}var oo=Yc,Ss,ha;function Df(){if(ha)return Ss;ha=1;var e;function t(T,$,L){return $=r($),$ in T?Object.defineProperty(T,$,{value:L,enumerable:!0,configurable:!0,writable:!0}):T[$]=L,T}function r(T){var $=n(T,"string");return typeof $=="symbol"?$:String($)}function n(T,$){if(typeof T!="object"||T===null)return T;var L=T[Symbol.toPrimitive];if(L!==void 0){var F=L.call(T,$||"default");if(typeof F!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(T)}var i=oo,s=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),h=Symbol("ended"),f=Symbol("lastPromise"),d=Symbol("handlePromise"),w=Symbol("stream");function b(T,$){return{value:T,done:$}}function I(T){var $=T[s];if($!==null){var L=T[w].read();L!==null&&(T[f]=null,T[s]=null,T[a]=null,$(b(L,!1)))}}function O(T){he.nextTick(I,T)}function N(T,$){return function(L,F){T.then(function(){if($[h]){L(b(void 0,!0));return}$[d](L,F)},F)}}var P=Object.getPrototypeOf(function(){}),M=Object.setPrototypeOf((e={get stream(){return this[w]},next:function(){var $=this,L=this[l];if(L!==null)return Promise.reject(L);if(this[h])return Promise.resolve(b(void 0,!0));if(this[w].destroyed)return new Promise(function(W,ie){he.nextTick(function(){$[l]?ie($[l]):W(b(void 0,!0))})});var F=this[f],G;if(F)G=new Promise(N(F,this));else{var q=this[w].read();if(q!==null)return Promise.resolve(b(q,!1));G=new Promise(this[d])}return this[f]=G,G}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var $=this;return new Promise(function(L,F){$[w].destroy(null,function(G){if(G){F(G);return}L(b(void 0,!0))})})}),e),P),x=function($){var L,F=Object.create(M,(L={},t(L,w,{value:$,writable:!0}),t(L,s,{value:null,writable:!0}),t(L,a,{value:null,writable:!0}),t(L,l,{value:null,writable:!0}),t(L,h,{value:$._readableState.endEmitted,writable:!0}),t(L,d,{value:function(q,W){var ie=F[w].read();ie?(F[f]=null,F[s]=null,F[a]=null,q(b(ie,!1))):(F[s]=q,F[a]=W)},writable:!0}),L));return F[f]=null,i($,function(G){if(G&&G.code!=="ERR_STREAM_PREMATURE_CLOSE"){var q=F[a];q!==null&&(F[f]=null,F[s]=null,F[a]=null,q(G)),F[l]=G;return}var W=F[s];W!==null&&(F[f]=null,F[s]=null,F[a]=null,W(b(void 0,!0))),F[h]=!0}),$.on("readable",O.bind(null,F)),F};return Ss=x,Ss}var Rs,da;function jf(){return da||(da=1,Rs=function(){throw new Error("Readable.from is not available in the browser")}),Rs}var Ms,fa;function Xc(){if(fa)return Ms;fa=1,Ms=W;var e;W.ReadableState=q,Vr.EventEmitter;var t=function(E,D){return E.listeners(D).length},r=Jc,n=mn.Buffer,i=(typeof J<"u"?J:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(_){return n.from(_)}function a(_){return n.isBuffer(_)||_ instanceof i}var l=Vr,h;l&&l.debuglog?h=l.debuglog("stream"):h=function(){};var f=Sf(),d=Gc,w=Kc,b=w.getHighWaterMark,I=br.codes,O=I.ERR_INVALID_ARG_TYPE,N=I.ERR_STREAM_PUSH_AFTER_EOF,P=I.ERR_METHOD_NOT_IMPLEMENTED,M=I.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,x,T,$;wt(W,r);var L=d.errorOrDestroy,F=["error","close","destroy","pause","resume"];function G(_,E,D){if(typeof _.prependListener=="function")return _.prependListener(E,D);!_._events||!_._events[E]?_.on(E,D):Array.isArray(_._events[E])?_._events[E].unshift(D):_._events[E]=[D,_._events[E]]}function q(_,E,D){e=e||Jr(),_=_||{},typeof D!="boolean"&&(D=E instanceof e),this.objectMode=!!_.objectMode,D&&(this.objectMode=this.objectMode||!!_.readableObjectMode),this.highWaterMark=b(this,_,"readableHighWaterMark",D),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=_.emitClose!==!1,this.autoDestroy=!!_.autoDestroy,this.destroyed=!1,this.defaultEncoding=_.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,_.encoding&&(x||(x=la().StringDecoder),this.decoder=new x(_.encoding),this.encoding=_.encoding)}function W(_){if(e=e||Jr(),!(this instanceof W))return new W(_);var E=this instanceof e;this._readableState=new q(_,this,E),this.readable=!0,_&&(typeof _.read=="function"&&(this._read=_.read),typeof _.destroy=="function"&&(this._destroy=_.destroy)),r.call(this)}Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(E){this._readableState&&(this._readableState.destroyed=E)}}),W.prototype.destroy=d.destroy,W.prototype._undestroy=d.undestroy,W.prototype._destroy=function(_,E){E(_)},W.prototype.push=function(_,E){var D=this._readableState,j;return D.objectMode?j=!0:typeof _=="string"&&(E=E||D.defaultEncoding,E!==D.encoding&&(_=n.from(_,E),E=""),j=!0),ie(this,_,E,!1,j)},W.prototype.unshift=function(_){return ie(this,_,null,!0,!1)};function ie(_,E,D,j,K){h("readableAddChunk",E);var X=_._readableState;if(E===null)X.reading=!1,g(_,X);else{var Z;if(K||(Z=se(X,E)),Z)L(_,Z);else if(X.objectMode||E&&E.length>0)if(typeof E!="string"&&!X.objectMode&&Object.getPrototypeOf(E)!==n.prototype&&(E=s(E)),j)X.endEmitted?L(_,new M):Q(_,X,E,!0);else if(X.ended)L(_,new N);else{if(X.destroyed)return!1;X.reading=!1,X.decoder&&!D?(E=X.decoder.write(E),X.objectMode||E.length!==0?Q(_,X,E,!1):S(_,X)):Q(_,X,E,!1)}else j||(X.reading=!1,S(_,X))}return!X.ended&&(X.length<X.highWaterMark||X.length===0)}function Q(_,E,D,j){E.flowing&&E.length===0&&!E.sync?(E.awaitDrain=0,_.emit("data",D)):(E.length+=E.objectMode?1:D.length,j?E.buffer.unshift(D):E.buffer.push(D),E.needReadable&&p(_)),S(_,E)}function se(_,E){var D;return!a(E)&&typeof E!="string"&&E!==void 0&&!_.objectMode&&(D=new O("chunk",["string","Buffer","Uint8Array"],E)),D}W.prototype.isPaused=function(){return this._readableState.flowing===!1},W.prototype.setEncoding=function(_){x||(x=la().StringDecoder);var E=new x(_);this._readableState.decoder=E,this._readableState.encoding=this._readableState.decoder.encoding;for(var D=this._readableState.buffer.head,j="";D!==null;)j+=E.write(D.data),D=D.next;return this._readableState.buffer.clear(),j!==""&&this._readableState.buffer.push(j),this._readableState.length=j.length,this};var R=1073741824;function o(_){return _>=R?_=R:(_--,_|=_>>>1,_|=_>>>2,_|=_>>>4,_|=_>>>8,_|=_>>>16,_++),_}function u(_,E){return _<=0||E.length===0&&E.ended?0:E.objectMode?1:_!==_?E.flowing&&E.length?E.buffer.head.data.length:E.length:(_>E.highWaterMark&&(E.highWaterMark=o(_)),_<=E.length?_:E.ended?E.length:(E.needReadable=!0,0))}W.prototype.read=function(_){h("read",_),_=parseInt(_,10);var E=this._readableState,D=_;if(_!==0&&(E.emittedReadable=!1),_===0&&E.needReadable&&((E.highWaterMark!==0?E.length>=E.highWaterMark:E.length>0)||E.ended))return h("read: emitReadable",E.length,E.ended),E.length===0&&E.ended?B(this):p(this),null;if(_=u(_,E),_===0&&E.ended)return E.length===0&&B(this),null;var j=E.needReadable;h("need readable",j),(E.length===0||E.length-_<E.highWaterMark)&&(j=!0,h("length less than watermark",j)),E.ended||E.reading?(j=!1,h("reading or ended",j)):j&&(h("do read"),E.reading=!0,E.sync=!0,E.length===0&&(E.needReadable=!0),this._read(E.highWaterMark),E.sync=!1,E.reading||(_=u(D,E)));var K;return _>0?K=A(_,E):K=null,K===null?(E.needReadable=E.length<=E.highWaterMark,_=0):(E.length-=_,E.awaitDrain=0),E.length===0&&(E.ended||(E.needReadable=!0),D!==_&&E.ended&&B(this)),K!==null&&this.emit("data",K),K};function g(_,E){if(h("onEofChunk"),!E.ended){if(E.decoder){var D=E.decoder.end();D&&D.length&&(E.buffer.push(D),E.length+=E.objectMode?1:D.length)}E.ended=!0,E.sync?p(_):(E.needReadable=!1,E.emittedReadable||(E.emittedReadable=!0,v(_)))}}function p(_){var E=_._readableState;h("emitReadable",E.needReadable,E.emittedReadable),E.needReadable=!1,E.emittedReadable||(h("emitReadable",E.flowing),E.emittedReadable=!0,he.nextTick(v,_))}function v(_){var E=_._readableState;h("emitReadable_",E.destroyed,E.length,E.ended),!E.destroyed&&(E.length||E.ended)&&(_.emit("readable"),E.emittedReadable=!1),E.needReadable=!E.flowing&&!E.ended&&E.length<=E.highWaterMark,C(_)}function S(_,E){E.readingMore||(E.readingMore=!0,he.nextTick(k,_,E))}function k(_,E){for(;!E.reading&&!E.ended&&(E.length<E.highWaterMark||E.flowing&&E.length===0);){var D=E.length;if(h("maybeReadMore read 0"),_.read(0),D===E.length)break}E.readingMore=!1}W.prototype._read=function(_){L(this,new P("_read()"))},W.prototype.pipe=function(_,E){var D=this,j=this._readableState;switch(j.pipesCount){case 0:j.pipes=_;break;case 1:j.pipes=[j.pipes,_];break;default:j.pipes.push(_);break}j.pipesCount+=1,h("pipe count=%d opts=%j",j.pipesCount,E);var K=(!E||E.end!==!1)&&_!==he.stdout&&_!==he.stderr,X=K?le:de;j.endEmitted?he.nextTick(X):D.once("end",X),_.on("unpipe",Z);function Z(ue,st){h("onunpipe"),ue===D&&st&&st.hasUnpiped===!1&&(st.hasUnpiped=!0,me())}function le(){h("onend"),_.end()}var Et=m(D);_.on("drain",Et);var pe=!1;function me(){h("cleanup"),_.removeListener("close",ge),_.removeListener("finish",Nt),_.removeListener("drain",Et),_.removeListener("error",fe),_.removeListener("unpipe",Z),D.removeListener("end",le),D.removeListener("end",de),D.removeListener("data",Ft),pe=!0,j.awaitDrain&&(!_._writableState||_._writableState.needDrain)&&Et()}D.on("data",Ft);function Ft(ue){h("ondata");var st=_.write(ue);h("dest.write",st),st===!1&&((j.pipesCount===1&&j.pipes===_||j.pipesCount>1&&ee(j.pipes,_)!==-1)&&!pe&&(h("false write response, pause",j.awaitDrain),j.awaitDrain++),D.pause())}function fe(ue){h("onerror",ue),de(),_.removeListener("error",fe),t(_,"error")===0&&L(_,ue)}G(_,"error",fe);function ge(){_.removeListener("finish",Nt),de()}_.once("close",ge);function Nt(){h("onfinish"),_.removeListener("close",ge),de()}_.once("finish",Nt);function de(){h("unpipe"),D.unpipe(_)}return _.emit("pipe",D),j.flowing||(h("pipe resume"),D.resume()),_};function m(_){return function(){var D=_._readableState;h("pipeOnDrain",D.awaitDrain),D.awaitDrain&&D.awaitDrain--,D.awaitDrain===0&&t(_,"data")&&(D.flowing=!0,C(_))}}W.prototype.unpipe=function(_){var E=this._readableState,D={hasUnpiped:!1};if(E.pipesCount===0)return this;if(E.pipesCount===1)return _&&_!==E.pipes?this:(_||(_=E.pipes),E.pipes=null,E.pipesCount=0,E.flowing=!1,_&&_.emit("unpipe",this,D),this);if(!_){var j=E.pipes,K=E.pipesCount;E.pipes=null,E.pipesCount=0,E.flowing=!1;for(var X=0;X<K;X++)j[X].emit("unpipe",this,{hasUnpiped:!1});return this}var Z=ee(E.pipes,_);return Z===-1?this:(E.pipes.splice(Z,1),E.pipesCount-=1,E.pipesCount===1&&(E.pipes=E.pipes[0]),_.emit("unpipe",this,D),this)},W.prototype.on=function(_,E){var D=r.prototype.on.call(this,_,E),j=this._readableState;return _==="data"?(j.readableListening=this.listenerCount("readable")>0,j.flowing!==!1&&this.resume()):_==="readable"&&!j.endEmitted&&!j.readableListening&&(j.readableListening=j.needReadable=!0,j.flowing=!1,j.emittedReadable=!1,h("on readable",j.length,j.reading),j.length?p(this):j.reading||he.nextTick(y,this)),D},W.prototype.addListener=W.prototype.on,W.prototype.removeListener=function(_,E){var D=r.prototype.removeListener.call(this,_,E);return _==="readable"&&he.nextTick(c,this),D},W.prototype.removeAllListeners=function(_){var E=r.prototype.removeAllListeners.apply(this,arguments);return(_==="readable"||_===void 0)&&he.nextTick(c,this),E};function c(_){var E=_._readableState;E.readableListening=_.listenerCount("readable")>0,E.resumeScheduled&&!E.paused?E.flowing=!0:_.listenerCount("data")>0&&_.resume()}function y(_){h("readable nexttick read 0"),_.read(0)}W.prototype.resume=function(){var _=this._readableState;return _.flowing||(h("resume"),_.flowing=!_.readableListening,V(this,_)),_.paused=!1,this};function V(_,E){E.resumeScheduled||(E.resumeScheduled=!0,he.nextTick(H,_,E))}function H(_,E){h("resume",E.reading),E.reading||_.read(0),E.resumeScheduled=!1,_.emit("resume"),C(_),E.flowing&&!E.reading&&_.read(0)}W.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function C(_){var E=_._readableState;for(h("flow",E.flowing);E.flowing&&_.read()!==null;);}W.prototype.wrap=function(_){var E=this,D=this._readableState,j=!1;_.on("end",function(){if(h("wrapped end"),D.decoder&&!D.ended){var Z=D.decoder.end();Z&&Z.length&&E.push(Z)}E.push(null)}),_.on("data",function(Z){if(h("wrapped data"),D.decoder&&(Z=D.decoder.write(Z)),!(D.objectMode&&Z==null)&&!(!D.objectMode&&(!Z||!Z.length))){var le=E.push(Z);le||(j=!0,_.pause())}});for(var K in _)this[K]===void 0&&typeof _[K]=="function"&&(this[K]=function(le){return function(){return _[le].apply(_,arguments)}}(K));for(var X=0;X<F.length;X++)_.on(F[X],this.emit.bind(this,F[X]));return this._read=function(Z){h("wrapped _read",Z),j&&(j=!1,_.resume())},this},typeof Symbol=="function"&&(W.prototype[Symbol.asyncIterator]=function(){return T===void 0&&(T=Df()),T(this)}),Object.defineProperty(W.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(W.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(W.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(E){this._readableState&&(this._readableState.flowing=E)}}),W._fromList=A,Object.defineProperty(W.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function A(_,E){if(E.length===0)return null;var D;return E.objectMode?D=E.buffer.shift():!_||_>=E.length?(E.decoder?D=E.buffer.join(""):E.buffer.length===1?D=E.buffer.first():D=E.buffer.concat(E.length),E.buffer.clear()):D=E.buffer.consume(_,E.decoder),D}function B(_){var E=_._readableState;h("endReadable",E.endEmitted),E.endEmitted||(E.ended=!0,he.nextTick(U,E,_))}function U(_,E){if(h("endReadableNT",_.endEmitted,_.length),!_.endEmitted&&_.length===0&&(_.endEmitted=!0,E.readable=!1,E.emit("end"),_.autoDestroy)){var D=E._writableState;(!D||D.autoDestroy&&D.finished)&&E.destroy()}}typeof Symbol=="function"&&(W.from=function(_,E){return $===void 0&&($=jf()),$(W,_,E)});function ee(_,E){for(var D=0,j=_.length;D<j;D++)if(_[D]===E)return D;return-1}return Ms}var el=$t,Oi=br.codes,Hf=Oi.ERR_METHOD_NOT_IMPLEMENTED,Uf=Oi.ERR_MULTIPLE_CALLBACK,Vf=Oi.ERR_TRANSFORM_ALREADY_TRANSFORMING,Wf=Oi.ERR_TRANSFORM_WITH_LENGTH_0,$i=Jr();wt($t,$i);function zf(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new Uf);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function $t(e){if(!(this instanceof $t))return new $t(e);$i.call(this,e),this._transformState={afterTransform:zf.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",qf)}function qf(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){ga(e,t,r)}):ga(this,null,null)}$t.prototype.push=function(e,t){return this._transformState.needTransform=!1,$i.prototype.push.call(this,e,t)};$t.prototype._transform=function(e,t,r){r(new Hf("_transform()"))};$t.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};$t.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};$t.prototype._destroy=function(e,t){$i.prototype._destroy.call(this,e,function(r){t(r)})};function ga(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Wf;if(e._transformState.transforming)throw new Vf;return e.push(null)}var Jf=gn,tl=el;wt(gn,tl);function gn(e){if(!(this instanceof gn))return new gn(e);tl.call(this,e)}gn.prototype._transform=function(e,t,r){r(null,e)};var Cs;function Gf(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var rl=br.codes,Zf=rl.ERR_MISSING_ARGS,Kf=rl.ERR_STREAM_DESTROYED;function pa(e){if(e)throw e}function Qf(e){return e.setHeader&&typeof e.abort=="function"}function Yf(e,t,r,n){n=Gf(n);var i=!1;e.on("close",function(){i=!0}),Cs===void 0&&(Cs=oo),Cs(e,{readable:t,writable:r},function(a){if(a)return n(a);i=!0,n()});var s=!1;return function(a){if(!i&&!s){if(s=!0,Qf(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(a||new Kf("pipe"))}}}function ma(e){e()}function Xf(e,t){return e.pipe(t)}function e0(e){return!e.length||typeof e[e.length-1]!="function"?pa:e.pop()}function t0(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=e0(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Zf("streams");var i,s=t.map(function(a,l){var h=l<t.length-1,f=l>0;return Yf(a,h,f,function(d){i||(i=d),d&&s.forEach(ma),!h&&(s.forEach(ma),n(i))})});return t.reduce(Xf)}var r0=t0;(function(e,t){t=e.exports=Xc(),t.Stream=t,t.Readable=t,t.Writable=Qc(),t.Duplex=Jr(),t.Transform=el,t.PassThrough=Jf,t.finished=oo,t.pipeline=r0})(Ws,Ws.exports);var nl=Ws.exports;const{Transform:n0}=nl;var i0=e=>class il extends n0{constructor(r,n,i,s,a){super(a),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=s,this._options=a,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(a){s=a}i(s)}_flush(r){let n=null;try{this.push(this.digest())}catch(i){n=i}r(n)}update(r,n){if(!re.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return re.isBuffer(r)||(r=re.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new il(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:s0}=nl;var o0=e=>class sl extends s0{constructor(r,n,i,s){super(s),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._options=s,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let s=null;try{this.update(r,n)}catch(a){s=a}i(s)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!re.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return re.isBuffer(r)||(r=re.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(r);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new sl(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const a0=i0,c0=o0;var l0=function(e){const t=a0(e),r=c0(e);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new t(1152,448,null,224,i);case"keccak256":return new t(1088,512,null,256,i);case"keccak384":return new t(832,768,null,384,i);case"keccak512":return new t(576,1024,null,512,i);case"sha3-224":return new t(1152,448,6,224,i);case"sha3-256":return new t(1088,512,6,256,i);case"sha3-384":return new t(832,768,6,384,i);case"sha3-512":return new t(576,1024,6,512,i);case"shake128":return new r(1344,256,31,i);case"shake256":return new r(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}},ol={};const va=[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];ol.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],n=e[1]^e[11]^e[21]^e[31]^e[41],i=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],a=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],h=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],w=e[9]^e[19]^e[29]^e[39]^e[49];let b=d^(i<<1|s>>>31),I=w^(s<<1|i>>>31);const O=e[0]^b,N=e[1]^I,P=e[10]^b,M=e[11]^I,x=e[20]^b,T=e[21]^I,$=e[30]^b,L=e[31]^I,F=e[40]^b,G=e[41]^I;b=r^(a<<1|l>>>31),I=n^(l<<1|a>>>31);const q=e[2]^b,W=e[3]^I,ie=e[12]^b,Q=e[13]^I,se=e[22]^b,R=e[23]^I,o=e[32]^b,u=e[33]^I,g=e[42]^b,p=e[43]^I;b=i^(h<<1|f>>>31),I=s^(f<<1|h>>>31);const v=e[4]^b,S=e[5]^I,k=e[14]^b,m=e[15]^I,c=e[24]^b,y=e[25]^I,V=e[34]^b,H=e[35]^I,C=e[44]^b,A=e[45]^I;b=a^(d<<1|w>>>31),I=l^(w<<1|d>>>31);const B=e[6]^b,U=e[7]^I,ee=e[16]^b,_=e[17]^I,E=e[26]^b,D=e[27]^I,j=e[36]^b,K=e[37]^I,X=e[46]^b,Z=e[47]^I;b=h^(r<<1|n>>>31),I=f^(n<<1|r>>>31);const le=e[8]^b,Et=e[9]^I,pe=e[18]^b,me=e[19]^I,Ft=e[28]^b,fe=e[29]^I,ge=e[38]^b,Nt=e[39]^I,de=e[48]^b,ue=e[49]^I,st=O,ve=N,be=M<<4|P>>>28,_r=P<<4|M>>>28,we=x<<3|T>>>29,ye=T<<3|x>>>29,Er=L<<9|$>>>23,_e=$<<9|L>>>23,Ee=F<<18|G>>>14,Sr=G<<18|F>>>14,Se=q<<1|W>>>31,Re=W<<1|q>>>31,Rr=Q<<12|ie>>>20,Me=ie<<12|Q>>>20,Ce=se<<10|R>>>22,Mr=R<<10|se>>>22,ke=u<<13|o>>>19,Ie=o<<13|u>>>19,Cr=g<<2|p>>>30,xe=p<<2|g>>>30,Ae=S<<30|v>>>2,kr=v<<30|S>>>2,Te=k<<6|m>>>26,Ne=m<<6|k>>>26,Ir=y<<11|c>>>21,Le=c<<11|y>>>21,Pe=V<<15|H>>>17,xr=H<<15|V>>>17,Oe=A<<29|C>>>3,$e=C<<29|A>>>3,Ar=B<<28|U>>>4,Be=U<<28|B>>>4,Fe=_<<23|ee>>>9,Tr=ee<<23|_>>>9,De=E<<25|D>>>7,je=D<<25|E>>>7,zt=j<<21|K>>>11,qt=K<<21|j>>>11,Jt=Z<<24|X>>>8,Gt=X<<24|Z>>>8,Zt=le<<27|Et>>>5,Kt=Et<<27|le>>>5,Qt=pe<<20|me>>>12,Yt=me<<20|pe>>>12,Xt=fe<<7|Ft>>>25,er=Ft<<7|fe>>>25,tr=ge<<8|Nt>>>24,rr=Nt<<8|ge>>>24,nr=de<<14|ue>>>18,ir=ue<<14|de>>>18;e[0]=st^~Rr&Ir,e[1]=ve^~Me&Le,e[10]=Ar^~Qt&we,e[11]=Be^~Yt&ye,e[20]=Se^~Te&De,e[21]=Re^~Ne&je,e[30]=Zt^~be&Ce,e[31]=Kt^~_r&Mr,e[40]=Ae^~Fe&Xt,e[41]=kr^~Tr&er,e[2]=Rr^~Ir&zt,e[3]=Me^~Le&qt,e[12]=Qt^~we&ke,e[13]=Yt^~ye&Ie,e[22]=Te^~De&tr,e[23]=Ne^~je&rr,e[32]=be^~Ce&Pe,e[33]=_r^~Mr&xr,e[42]=Fe^~Xt&Er,e[43]=Tr^~er&_e,e[4]=Ir^~zt&nr,e[5]=Le^~qt&ir,e[14]=we^~ke&Oe,e[15]=ye^~Ie&$e,e[24]=De^~tr&Ee,e[25]=je^~rr&Sr,e[34]=Ce^~Pe&Jt,e[35]=Mr^~xr&Gt,e[44]=Xt^~Er&Cr,e[45]=er^~_e&xe,e[6]=zt^~nr&st,e[7]=qt^~ir&ve,e[16]=ke^~Oe&Ar,e[17]=Ie^~$e&Be,e[26]=tr^~Ee&Se,e[27]=rr^~Sr&Re,e[36]=Pe^~Jt&Zt,e[37]=xr^~Gt&Kt,e[46]=Er^~Cr&Ae,e[47]=_e^~xe&kr,e[8]=nr^~st&Rr,e[9]=ir^~ve&Me,e[18]=Oe^~Ar&Qt,e[19]=$e^~Be&Yt,e[28]=Ee^~Se&Te,e[29]=Sr^~Re&Ne,e[38]=Jt^~Zt&be,e[39]=Gt^~Kt&_r,e[48]=Cr^~Ae&Fe,e[49]=xe^~kr&Tr,e[0]^=va[t*2],e[1]^=va[t*2+1]}};const oi=ol;function rn(){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}rn.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};rn.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(oi.p1600(this.state),this.count=0)};rn.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&oi.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),oi.p1600(this.state),this.count=0,this.squeezing=!0};rn.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=re.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(oi.p1600(this.state),this.count=0);return t};rn.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var u0=rn,h0=l0(u0);const d0=h0,f0=ui;function al(e){return re.allocUnsafe(e).fill(0)}function cl(e,t,r){const n=al(t);return e=Bi(e),r?e.length<t?(e.copy(n),n):e.slice(0,t):e.length<t?(e.copy(n,t-e.length),n):e.slice(-t)}function g0(e,t){return cl(e,t,!0)}function Bi(e){if(!re.isBuffer(e))if(Array.isArray(e))e=re.from(e);else if(typeof e=="string")ll(e)?e=re.from(v0(ul(e)),"hex"):e=re.from(e);else if(typeof e=="number")e=intToBuffer(e);else if(e==null)e=re.allocUnsafe(0);else if(f0.isBN(e))e=e.toArrayLike(re);else if(e.toArray)e=re.from(e.toArray());else throw new Error("invalid type");return e}function p0(e){return e=Bi(e),"0x"+e.toString("hex")}function m0(e,t){return e=Bi(e),t||(t=256),d0("keccak"+t).update(e).digest()}function v0(e){return e.length%2?"0"+e:e}function ll(e){return typeof e=="string"&&e.match(/^0x[0-9A-Fa-f]*$/)}function ul(e){return typeof e=="string"&&e.startsWith("0x")?e.slice(2):e}var hl={zeros:al,setLength:cl,setLengthRight:g0,isHexString:ll,stripHexPrefix:ul,toBuffer:Bi,bufferToHex:p0,keccak:m0};const pr=hl,dr=ui;function dl(e){return e.startsWith("int[")?"int256"+e.slice(3):e==="int"?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):e==="uint"?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):e==="fixed"?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):e==="ufixed"?"ufixed128x128":e}function Hr(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10)}function ba(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)]}function fl(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?t[2]===""?"dynamic":parseInt(t[2],10):null}function lr(e){var t=typeof e;if(t==="string")return pr.isHexString(e)?new dr(pr.stripHexPrefix(e),16):new dr(e,10);if(t==="number")return new dr(e);if(e.toArray)return e;throw new Error("Argument is not a number")}function Ct(e,t){var r,n,i,s;if(e==="address")return Ct("uint160",lr(t));if(e==="bool")return Ct("uint8",t?1:0);if(e==="string")return Ct("bytes",new re(t,"utf8"));if(w0(e)){if(typeof t.length>"u")throw new Error("Not an array?");if(r=fl(e),r!=="dynamic"&&r!==0&&t.length>r)throw new Error("Elements exceed array size: "+r);i=[],e=e.slice(0,e.lastIndexOf("[")),typeof t=="string"&&(t=JSON.parse(t));for(s in t)i.push(Ct(e,t[s]));if(r==="dynamic"){var a=Ct("uint256",t.length);i.unshift(a)}return re.concat(i)}else{if(e==="bytes")return t=new re(t),i=re.concat([Ct("uint256",t.length),t]),t.length%32!==0&&(i=re.concat([i,pr.zeros(32-t.length%32)])),i;if(e.startsWith("bytes")){if(r=Hr(e),r<1||r>32)throw new Error("Invalid bytes<N> width: "+r);return pr.setLengthRight(t,32)}else if(e.startsWith("uint")){if(r=Hr(e),r%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if(n=lr(t),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());if(n<0)throw new Error("Supplied uint is negative");return n.toArrayLike(re,"be",32)}else if(e.startsWith("int")){if(r=Hr(e),r%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if(n=lr(t),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(re,"be",32)}else if(e.startsWith("ufixed")){if(r=ba(e),n=lr(t),n<0)throw new Error("Supplied ufixed is negative");return Ct("uint256",n.mul(new dr(2).pow(new dr(r[1]))))}else if(e.startsWith("fixed"))return r=ba(e),Ct("int256",lr(t).mul(new dr(2).pow(new dr(r[1]))))}throw new Error("Unsupported or invalid type: "+e)}function b0(e){return e==="string"||e==="bytes"||fl(e)==="dynamic"}function w0(e){return e.lastIndexOf("]")===e.length-1}function y0(e,t){var r=[],n=[],i=32*e.length;for(var s in e){var a=dl(e[s]),l=t[s],h=Ct(a,l);b0(a)?(r.push(Ct("uint256",i)),n.push(h),i+=h.length):r.push(h)}return re.concat(r.concat(n))}function gl(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var r,n,i=[],s=0;s<e.length;s++){var a=dl(e[s]),l=t[s];if(a==="bytes")i.push(l);else if(a==="string")i.push(new re(l,"utf8"));else if(a==="bool")i.push(new re(l?"01":"00","hex"));else if(a==="address")i.push(pr.setLength(l,20));else if(a.startsWith("bytes")){if(r=Hr(a),r<1||r>32)throw new Error("Invalid bytes<N> width: "+r);i.push(pr.setLengthRight(l,r))}else if(a.startsWith("uint")){if(r=Hr(a),r%8||r<8||r>256)throw new Error("Invalid uint<N> width: "+r);if(n=lr(l),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());i.push(n.toArrayLike(re,"be",r/8))}else if(a.startsWith("int")){if(r=Hr(a),r%8||r<8||r>256)throw new Error("Invalid int<N> width: "+r);if(n=lr(l),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());i.push(n.toTwos(r).toArrayLike(re,"be",r/8))}else throw new Error("Unsupported or invalid type: "+a)}return re.concat(i)}function _0(e,t){return pr.keccak(gl(e,t))}var E0={rawEncode:y0,solidityPack:gl,soliditySHA3:_0};const vt=hl,hn=E0,pl={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},ks={encodeData(e,t,r,n=!0){const i=["bytes32"],s=[this.hashType(e,r)];if(n){const a=(l,h,f)=>{if(r[h]!==void 0)return["bytes32",f==null?"0x0000000000000000000000000000000000000000000000000000000000000000":vt.keccak(this.encodeData(h,f,r,n))];if(f===void 0)throw new Error(`missing value for field ${l} of type ${h}`);if(h==="bytes")return["bytes32",vt.keccak(f)];if(h==="string")return typeof f=="string"&&(f=re.from(f,"utf8")),["bytes32",vt.keccak(f)];if(h.lastIndexOf("]")===h.length-1){const d=h.slice(0,h.lastIndexOf("[")),w=f.map(b=>a(l,d,b));return["bytes32",vt.keccak(hn.rawEncode(w.map(([b])=>b),w.map(([,b])=>b)))]}return[h,f]};for(const l of r[e]){const[h,f]=a(l.name,l.type,t[l.name]);i.push(h),s.push(f)}}else for(const a of r[e]){let l=t[a.name];if(l!==void 0)if(a.type==="bytes")i.push("bytes32"),l=vt.keccak(l),s.push(l);else if(a.type==="string")i.push("bytes32"),typeof l=="string"&&(l=re.from(l,"utf8")),l=vt.keccak(l),s.push(l);else if(r[a.type]!==void 0)i.push("bytes32"),l=vt.keccak(this.encodeData(a.type,l,r,n)),s.push(l);else{if(a.type.lastIndexOf("]")===a.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(a.type),s.push(l)}}return hn.rawEncode(i,s)},encodeType(e,t){let r="",n=this.findTypeDependencies(e,t).filter(i=>i!==e);n=[e].concat(n.sort());for(const i of n){if(!t[i])throw new Error("No type definition specified: "+i);r+=i+"("+t[i].map(({name:a,type:l})=>l+" "+a).join(",")+")"}return r},findTypeDependencies(e,t,r=[]){if(e=e.match(/^\w*/)[0],r.includes(e)||t[e]===void 0)return r;r.push(e);for(const n of t[e])for(const i of this.findTypeDependencies(n.type,t,r))!r.includes(i)&&r.push(i);return r},hashStruct(e,t,r,n=!0){return vt.keccak(this.encodeData(e,t,r,n))},hashType(e,t){return vt.keccak(this.encodeType(e,t))},sanitizeData(e){const t={};for(const r in pl.properties)e[r]&&(t[r]=e[r]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e,t=!0){const r=this.sanitizeData(e),n=[re.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",r.domain,r.types,t)),r.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,t)),vt.keccak(re.concat(n))}};var S0={TYPED_MESSAGE_SCHEMA:pl,TypedDataUtils:ks,hashForSignTypedDataLegacy:function(e){return R0(e.data)},hashForSignTypedData_v3:function(e){return ks.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return ks.hash(e.data)}};function R0(e){const t=new Error("Expect argument to be non-empty array");if(typeof e!="object"||!e.length)throw t;const r=e.map(function(s){return s.type==="bytes"?vt.toBuffer(s.value):s.value}),n=e.map(function(s){return s.type}),i=e.map(function(s){if(!s.name)throw t;return s.type+" "+s.name});return hn.soliditySHA3(["bytes32","bytes32"],[hn.soliditySHA3(new Array(e.length).fill("string"),i),hn.soliditySHA3(n,r)])}var Gr={};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.filterFromParam=Gr.FilterPolyfill=void 0;const Br=qe,et=z,M0=5*60*1e3,ur={jsonrpc:"2.0",id:0};class C0{constructor(t){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,Br.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=t}async newFilter(t){const r=ml(t),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,r.fromBlock);return console.info(`Installing new log filter(${n}):`,r,"initial cursor position:",i),this.logFilters.set(n,r),this.setFilterTimeout(n),(0,et.hexStringFromIntNumber)(n)}async newBlockFilter(){const t=this.makeFilterId(),r=await this.setInitialCursorPosition(t,"latest");return console.info(`Installing new block filter (${t}) with initial cursor position:`,r),this.blockFilters.add(t),this.setFilterTimeout(t),(0,et.hexStringFromIntNumber)(t)}async newPendingTransactionFilter(){const t=this.makeFilterId(),r=await this.setInitialCursorPosition(t,"latest");return console.info(`Installing new block filter (${t}) with initial cursor position:`,r),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),(0,et.hexStringFromIntNumber)(t)}uninstallFilter(t){const r=(0,et.intNumberFromHexString)(t);return console.info(`Uninstalling filter (${r})`),this.deleteFilter(r),!0}getFilterChanges(t){const r=(0,et.intNumberFromHexString)(t);return this.timeouts.has(r)&&this.setFilterTimeout(r),this.logFilters.has(r)?this.getLogFilterChanges(r):this.blockFilters.has(r)?this.getBlockFilterChanges(r):this.pendingTransactionFilters.has(r)?this.getPendingTransactionFilterChanges(r):Promise.resolve(qn())}async getFilterLogs(t){const r=(0,et.intNumberFromHexString)(t),n=this.logFilters.get(r);return n?this.sendAsyncPromise(Object.assign(Object.assign({},ur),{method:"eth_getLogs",params:[wa(n)]})):qn()}makeFilterId(){return(0,Br.IntNumber)(++this.nextFilterId)}sendAsyncPromise(t){return new Promise((r,n)=>{this.provider.sendAsync(t,(i,s)=>{if(i)return n(i);if(Array.isArray(s)||s==null)return n(new Error(`unexpected response received: ${JSON.stringify(s)}`));r(s)})})}deleteFilter(t){console.info(`Deleting filter (${t})`),this.logFilters.delete(t),this.blockFilters.delete(t),this.pendingTransactionFilters.delete(t),this.cursors.delete(t),this.timeouts.delete(t)}async getLogFilterChanges(t){const r=this.logFilters.get(t),n=this.cursors.get(t);if(!n||!r)return qn();const i=await this.getCurrentBlockHeight(),s=r.toBlock==="latest"?i:r.toBlock;if(n>i||n>Number(r.toBlock))return Jn();console.info(`Fetching logs from ${n} to ${s} for filter ${t}`);const a=await this.sendAsyncPromise(Object.assign(Object.assign({},ur),{method:"eth_getLogs",params:[wa(Object.assign(Object.assign({},r),{fromBlock:n,toBlock:s}))]}));if(Array.isArray(a.result)){const l=a.result.map(f=>(0,et.intNumberFromHexString)(f.blockNumber||"0x0")),h=Math.max(...l);if(h&&h>n){const f=(0,Br.IntNumber)(h+1);console.info(`Moving cursor position for filter (${t}) from ${n} to ${f}`),this.cursors.set(t,f)}}return a}async getBlockFilterChanges(t){const r=this.cursors.get(t);if(!r)return qn();const n=await this.getCurrentBlockHeight();if(r>n)return Jn();console.info(`Fetching blocks from ${r} to ${n} for filter (${t})`);const i=(await Promise.all((0,et.range)(r,n+1).map(a=>this.getBlockHashByNumber((0,Br.IntNumber)(a))))).filter(a=>!!a),s=(0,Br.IntNumber)(r+i.length);return console.info(`Moving cursor position for filter (${t}) from ${r} to ${s}`),this.cursors.set(t,s),Object.assign(Object.assign({},ur),{result:i})}async getPendingTransactionFilterChanges(t){return Promise.resolve(Jn())}async setInitialCursorPosition(t,r){const n=await this.getCurrentBlockHeight(),i=typeof r=="number"&&r>n?r:n;return this.cursors.set(t,i),i}setFilterTimeout(t){const r=this.timeouts.get(t);r&&window.clearTimeout(r);const n=window.setTimeout(()=>{console.info(`Filter (${t}) timed out`),this.deleteFilter(t)},M0);this.timeouts.set(t,n)}async getCurrentBlockHeight(){const t=new Date;if(t.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=t;const r=await this._getCurrentBlockHeight();this.currentBlockHeight=r,this.resolvers.forEach(n=>n(r)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(r=>this.resolvers.push(r))}async _getCurrentBlockHeight(){const{result:t}=await this.sendAsyncPromise(Object.assign(Object.assign({},ur),{method:"eth_blockNumber",params:[]}));return(0,et.intNumberFromHexString)((0,et.ensureHexString)(t))}async getBlockHashByNumber(t){const r=await this.sendAsyncPromise(Object.assign(Object.assign({},ur),{method:"eth_getBlockByNumber",params:[(0,et.hexStringFromIntNumber)(t),!1]}));return r.result&&typeof r.result.hash=="string"?(0,et.ensureHexString)(r.result.hash):null}}Gr.FilterPolyfill=C0;function ml(e){return{fromBlock:ya(e.fromBlock),toBlock:ya(e.toBlock),addresses:e.address===void 0?null:Array.isArray(e.address)?e.address:[e.address],topics:e.topics||[]}}Gr.filterFromParam=ml;function wa(e){const t={fromBlock:_a(e.fromBlock),toBlock:_a(e.toBlock),topics:e.topics};return e.addresses!==null&&(t.address=e.addresses),t}function ya(e){if(e===void 0||e==="latest"||e==="pending")return"latest";if(e==="earliest")return(0,Br.IntNumber)(0);if((0,et.isHexString)(e))return(0,et.intNumberFromHexString)(e);throw new Error(`Invalid block option: ${String(e)}`)}function _a(e){return e==="latest"?e:(0,et.hexStringFromIntNumber)(e)}function qn(){return Object.assign(Object.assign({},ur),{error:{code:-32e3,message:"filter not found"}})}function Jn(){return Object.assign(Object.assign({},ur),{result:[]})}var Fi={},vl={},Di={},ao=k0;function k0(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}const Ea=(e,t)=>function(){const r=t.promiseModule,n=new Array(arguments.length);for(let i=0;i<arguments.length;i++)n[i]=arguments[i];return new r((i,s)=>{t.errorFirst?n.push(function(a,l){if(t.multiArgs){const h=new Array(arguments.length-1);for(let f=1;f<arguments.length;f++)h[f-1]=arguments[f];a?(h.unshift(a),s(h)):i(h)}else a?s(a):i(l)}):n.push(function(a){if(t.multiArgs){const l=new Array(arguments.length-1);for(let h=0;h<arguments.length;h++)l[h]=arguments[h];i(l)}else i(a)}),e.apply(this,n)})};var I0=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);const r=i=>{const s=a=>typeof a=="string"?i===a:a.test(i);return t.include?t.include.some(s):!t.exclude.some(s)};let n;typeof e=="function"?n=function(){return t.excludeMain?e.apply(this,arguments):Ea(e,t).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(e));for(const i in e){const s=e[i];n[i]=typeof s=="function"&&r(i)?Ea(s,t):s}return n},Tn={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0});const x0=Vr;function Sa(e,t,r){try{Reflect.apply(e,t,r)}catch(n){setTimeout(()=>{throw n})}}function A0(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}let T0=class extends x0.EventEmitter{emit(t,...r){let n=t==="error";const i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){let a;if(r.length>0&&([a]=r),a instanceof Error)throw a;const l=new Error(`Unhandled error.${a?` (${a.message})`:""}`);throw l.context=a,l}const s=i[t];if(s===void 0)return!1;if(typeof s=="function")Sa(s,this,r);else{const a=s.length,l=A0(s);for(let h=0;h<a;h+=1)Sa(l[h],this,r)}return!0}};Nn.default=T0;var N0=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tn,"__esModule",{value:!0});Tn.BaseBlockTracker=void 0;const L0=N0(Nn),P0=1e3,O0=(e,t)=>e+t,Ra=["sync","latest"];class $0 extends L0.default{constructor(t){super(),this._blockResetDuration=t.blockResetDuration||20*P0,this._usePastBlocks=t.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(r=>this.once("latest",r))}removeAllListeners(t){return t?super.removeAllListeners(t):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(t){Ra.includes(t)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return Ra.map(t=>this.listenerCount(t)).reduce(O0)}_shouldUseNewBlock(t){const r=this._currentBlock;if(!r)return!0;const n=Ma(t),i=Ma(r);return this._usePastBlocks&&n<i||n>i}_newPotentialLatest(t){this._shouldUseNewBlock(t)&&this._setCurrentBlock(t)}_setCurrentBlock(t){const r=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:r,newBlock:t})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}Tn.BaseBlockTracker=$0;function Ma(e){return Number.parseInt(e,16)}var bl={},wl={},Ye={};class yl extends TypeError{constructor(t,r){let n;const{message:i,explanation:s,...a}=t,{path:l}=t,h=l.length===0?i:`At path: ${l.join(".")} -- ${i}`;super(s??h),s!=null&&(this.cause=h),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function B0(e){return gt(e)&&typeof e[Symbol.iterator]=="function"}function gt(e){return typeof e=="object"&&e!=null}function Ca(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Je(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function F0(e){const{done:t,value:r}=e.next();return t?void 0:r}function D0(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:i,branch:s}=t,{type:a}=r,{refinement:l,message:h=`Expected a value of type \`${a}\`${l?` with refinement \`${l}\``:""}, but received: \`${Je(n)}\``}=e;return{value:n,type:a,refinement:l,key:i[i.length-1],path:i,branch:s,...e,message:h}}function*qs(e,t,r,n){B0(e)||(e=[e]);for(const i of e){const s=D0(i,t,r,n);s&&(yield s)}}function*co(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:a=!1}=r,l={path:n,branch:i};if(s&&(e=t.coercer(e,l),a&&t.type!=="type"&&gt(t.schema)&&gt(e)&&!Array.isArray(e)))for(const f in e)t.schema[f]===void 0&&delete e[f];let h="valid";for(const f of t.validator(e,l))f.explanation=r.message,h="not_valid",yield[f,void 0];for(let[f,d,w]of t.entries(e,l)){const b=co(d,w,{path:f===void 0?n:[...n,f],branch:f===void 0?i:[...i,d],coerce:s,mask:a,message:r.message});for(const I of b)I[0]?(h=I[0].refinement!=null?"not_refined":"not_valid",yield[I[0],void 0]):s&&(d=I[1],f===void 0?e=d:e instanceof Map?e.set(f,d):e instanceof Set?e.add(d):gt(e)&&(d!==void 0||f in e)&&(e[f]=d))}if(h!=="not_valid")for(const f of t.refiner(e,l))f.explanation=r.message,h="not_refined",yield[f,void 0];h==="valid"&&(yield[void 0,e])}class We{constructor(t){const{type:r,schema:n,validator:i,refiner:s,coercer:a=h=>h,entries:l=function*(){}}=t;this.type=r,this.schema=n,this.entries=l,this.coercer=a,i?this.validator=(h,f)=>{const d=i(h,f);return qs(d,f,this,h)}:this.validator=()=>[],s?this.refiner=(h,f)=>{const d=s(h,f);return qs(d,f,this,h)}:this.refiner=()=>[]}assert(t,r){return _l(t,this,r)}create(t,r){return El(t,this,r)}is(t){return lo(t,this)}mask(t,r){return Sl(t,this,r)}validate(t,r={}){return nn(t,this,r)}}function _l(e,t,r){const n=nn(e,t,{message:r});if(n[0])throw n[0]}function El(e,t,r){const n=nn(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function Sl(e,t,r){const n=nn(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function lo(e,t){return!nn(e,t)[0]}function nn(e,t,r={}){const n=co(e,t,r),i=F0(n);return i[0]?[new yl(i[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,i[1]]}function j0(...e){const t=e[0].type==="type",r=e.map(i=>i.schema),n=Object.assign({},...r);return t?Pn(n):Ln(n)}function it(e,t){return new We({type:e,schema:null,validator:t})}function H0(e,t){return new We({...e,refiner:(r,n)=>r===void 0||e.refiner(r,n),validator(r,n){return r===void 0?!0:(t(r,n),e.validator(r,n))}})}function U0(e){return new We({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator(t,r){return e(t,r).validator(t,r)},coercer(t,r){return e(t,r).coercer(t,r)},refiner(t,r){return e(t,r).refiner(t,r)}})}function V0(e){let t;return new We({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator(r,n){return t??(t=e()),t.validator(r,n)},coercer(r,n){return t??(t=e()),t.coercer(r,n)},refiner(r,n){return t??(t=e()),t.refiner(r,n)}})}function W0(e,t){const{schema:r}=e,n={...r};for(const i of t)delete n[i];switch(e.type){case"type":return Pn(n);default:return Ln(n)}}function z0(e){const t=e instanceof We,r=t?{...e.schema}:{...e};for(const n in r)r[n]=Rl(r[n]);return t&&e.type==="type"?Pn(r):Ln(r)}function q0(e,t){const{schema:r}=e,n={};for(const i of t)n[i]=r[i];switch(e.type){case"type":return Pn(n);default:return Ln(n)}}function J0(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),it(e,t)}function G0(){return it("any",()=>!0)}function Z0(e){return new We({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${Je(t)}`}})}function K0(){return it("bigint",e=>typeof e=="bigint")}function Q0(){return it("boolean",e=>typeof e=="boolean")}function Y0(){return it("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${Je(e)}`)}function X0(e){const t={},r=e.map(n=>Je(n)).join();for(const n of e)t[n]=n;return new We({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${Je(n)}`}})}function e1(){return it("func",e=>typeof e=="function"||`Expected a function, but received: ${Je(e)}`)}function t1(e){return it("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${Je(t)}`)}function r1(){return it("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${Je(e)}`)}function n1(e){return new We({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})}function i1(e){const t=Je(e),r=typeof e;return new We({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${Je(n)}`}})}function s1(e,t){return new We({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,e],yield[n,i,t]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${Je(r)}`}})}function uo(){return it("never",()=>!1)}function o1(e){return new We({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function a1(){return it("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${Je(e)}`)}function Ln(e){const t=e?Object.keys(e):[],r=uo();return new We({type:"object",schema:e||null,*entries(n){if(e&&gt(n)){const i=new Set(Object.keys(n));for(const s of t)i.delete(s),yield[s,n[s],e[s]];for(const s of i)yield[s,n[s],r]}},validator(n){return gt(n)||`Expected an object, but received: ${Je(n)}`},coercer(n){return gt(n)?{...n}:n}})}function Rl(e){return new We({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function c1(e,t){return new We({type:"record",schema:null,*entries(r){if(gt(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator(r){return gt(r)||`Expected an object, but received: ${Je(r)}`}})}function l1(){return it("regexp",e=>e instanceof RegExp)}function u1(e){return new We({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer(t){return t instanceof Set?new Set(t):t},validator(t){return t instanceof Set||`Expected a \`Set\` object, but received: ${Je(t)}`}})}function Ml(){return it("string",e=>typeof e=="string"||`Expected a string, but received: ${Je(e)}`)}function h1(e){const t=uo();return new We({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${Je(r)}`}})}function Pn(e){const t=Object.keys(e);return new We({type:"type",schema:e,*entries(r){if(gt(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return gt(r)||`Expected an object, but received: ${Je(r)}`},coercer(r){return gt(r)?{...r}:r}})}function d1(e){const t=e.map(r=>r.type).join(" | ");return new We({type:"union",schema:null,coercer(r){for(const n of e){const[i,s]=n.validate(r,{coerce:!0});if(!i)return s}return r},validator(r,n){const i=[];for(const s of e){const[...a]=co(r,s,n),[l]=a;if(l[0])for(const[h]of a)h&&i.push(h);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${Je(r)}`,...i]}})}function Cl(){return it("unknown",()=>!0)}function ho(e,t,r){return new We({...e,coercer:(n,i)=>lo(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}function f1(e,t,r={}){return ho(e,Cl(),n=>{const i=typeof t=="function"?t():t;if(n===void 0)return i;if(!r.strict&&Ca(n)&&Ca(i)){const s={...n};let a=!1;for(const l in i)s[l]===void 0&&(s[l]=i[l],a=!0);if(a)return s}return n})}function g1(e){return ho(e,Ml(),t=>t.trim())}function p1(e){return wr(e,"empty",t=>{const r=kl(t);return r===0||`Expected an empty ${e.type} but received one with a size of \`${r}\``})}function kl(e){return e instanceof Map||e instanceof Set?e.size:e.length}function m1(e,t,r={}){const{exclusive:n}=r;return wr(e,"max",i=>n?i<t:i<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${i}\``)}function v1(e,t,r={}){const{exclusive:n}=r;return wr(e,"min",i=>n?i>t:i>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${i}\``)}function b1(e){return wr(e,"nonempty",t=>kl(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function w1(e,t){return wr(e,"pattern",r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`)}function y1(e,t,r=t){const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return wr(e,"size",s=>{if(typeof s=="number"||s instanceof Date)return t<=s&&s<=r||`${n} ${i} but received \`${s}\``;if(s instanceof Map||s instanceof Set){const{size:a}=s;return t<=a&&a<=r||`${n} with a size ${i} but received one with a size of \`${a}\``}else{const{length:a}=s;return t<=a&&a<=r||`${n} with a length ${i} but received one with a length of \`${a}\``}})}function wr(e,t,r){return new We({...e,*refiner(n,i){yield*e.refiner(n,i);const s=r(n,i),a=qs(s,i,e,n);for(const l of a)yield{...l,refinement:t}}})}const _1=Object.freeze(Object.defineProperty({__proto__:null,Struct:We,StructError:yl,any:G0,array:Z0,assert:_l,assign:j0,bigint:K0,boolean:Q0,coerce:ho,create:El,date:Y0,defaulted:f1,define:it,deprecated:H0,dynamic:U0,empty:p1,enums:X0,func:e1,instance:t1,integer:r1,intersection:n1,is:lo,lazy:V0,literal:i1,map:s1,mask:Sl,max:m1,min:v1,never:uo,nonempty:b1,nullable:o1,number:a1,object:Ln,omit:W0,optional:Rl,partial:z0,pattern:w1,pick:q0,record:c1,refine:wr,regexp:l1,set:u1,size:y1,string:Ml,struct:J0,trimmed:g1,tuple:h1,type:Pn,union:d1,unknown:Cl,validate:nn},Symbol.toStringTag,{value:"Module"})),yr=mr(_1);Object.defineProperty(Ye,"__esModule",{value:!0});Ye.assertExhaustive=Ye.assertStruct=Ye.assert=Ye.AssertionError=void 0;const E1=yr;function S1(e){return typeof e=="object"&&e!==null&&"message"in e}function R1(e){var t,r;return typeof((r=(t=e?.prototype)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.name)=="string"}function M1(e){const t=S1(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}function Il(e,t){return R1(e)?new e({message:t}):e({message:t})}class fo extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}}Ye.AssertionError=fo;function C1(e,t="Assertion failed.",r=fo){if(!e)throw t instanceof Error?t:Il(r,t)}Ye.assert=C1;function k1(e,t,r="Assertion failed",n=fo){try{(0,E1.assert)(e,t)}catch(i){throw Il(n,`${r}: ${M1(i)}.`)}}Ye.assertStruct=k1;function I1(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}Ye.assertExhaustive=I1;var On={};Object.defineProperty(On,"__esModule",{value:!0});On.base64=void 0;const x1=yr,A1=Ye,T1=(e,t={})=>{var r,n;const i=(r=t.paddingRequired)!==null&&r!==void 0?r:!1,s=(n=t.characterSet)!==null&&n!==void 0?n:"base64";let a;s==="base64"?a=String.raw`[A-Za-z0-9+\/]`:((0,A1.assert)(s==="base64url"),a=String.raw`[-_A-Za-z0-9]`);let l;return i?l=new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):l=new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),(0,x1.pattern)(e,l)};On.base64=T1;var ce={},$n={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;const t=yr,r=Ye;e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu);function n(f){return(0,t.is)(f,e.HexStruct)}e.isHexString=n;function i(f){return(0,t.is)(f,e.StrictHexStruct)}e.isStrictHexString=i;function s(f){(0,r.assert)(n(f),"Value must be a hexadecimal string.")}e.assertIsHexString=s;function a(f){(0,r.assert)(i(f),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=a;function l(f){return f.startsWith("0x")?f:f.startsWith("0X")?`0x${f.substring(2)}`:`0x${f}`}e.add0x=l;function h(f){return f.startsWith("0x")||f.startsWith("0X")?f.substring(2):f}e.remove0x=h})($n);Object.defineProperty(ce,"__esModule",{value:!0});ce.createDataView=ce.concatBytes=ce.valueToBytes=ce.stringToBytes=ce.numberToBytes=ce.signedBigIntToBytes=ce.bigIntToBytes=ce.hexToBytes=ce.bytesToString=ce.bytesToNumber=ce.bytesToSignedBigInt=ce.bytesToBigInt=ce.bytesToHex=ce.assertIsBytes=ce.isBytes=void 0;const ct=Ye,Js=$n,ka=48,Ia=58,xa=87;function N1(){const e=[];return()=>{if(e.length===0)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}const L1=N1();function go(e){return e instanceof Uint8Array}ce.isBytes=go;function sn(e){(0,ct.assert)(go(e),"Value must be a Uint8Array.")}ce.assertIsBytes=sn;function xl(e){if(sn(e),e.length===0)return"0x";const t=L1(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,Js.add0x)(r.join(""))}ce.bytesToHex=xl;function Al(e){sn(e);const t=xl(e);return BigInt(t)}ce.bytesToBigInt=Al;function P1(e){sn(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(e.length*8,t)}ce.bytesToSignedBigInt=P1;function O1(e){sn(e);const t=Al(e);return(0,ct.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)}ce.bytesToNumber=O1;function $1(e){return sn(e),new TextDecoder().decode(e)}ce.bytesToString=$1;function ji(e){var t;if(((t=e?.toLowerCase)===null||t===void 0?void 0:t.call(e))==="0x")return new Uint8Array;(0,Js.assertIsHexString)(e);const r=(0,Js.remove0x)(e).toLowerCase(),n=r.length%2===0?r:`0${r}`,i=new Uint8Array(n.length/2);for(let s=0;s<i.length;s++){const a=n.charCodeAt(s*2),l=n.charCodeAt(s*2+1),h=a-(a<Ia?ka:xa),f=l-(l<Ia?ka:xa);i[s]=h*16+f}return i}ce.hexToBytes=ji;function Tl(e){(0,ct.assert)(typeof e=="bigint","Value must be a bigint."),(0,ct.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");const t=e.toString(16);return ji(t)}ce.bigIntToBytes=Tl;function B1(e,t){(0,ct.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(t*8+-1))}function F1(e,t){(0,ct.assert)(typeof e=="bigint","Value must be a bigint."),(0,ct.assert)(typeof t=="number","Byte length must be a number."),(0,ct.assert)(t>0,"Byte length must be greater than 0."),(0,ct.assert)(B1(e,t),"Byte length is too small to represent the given value.");let r=e;const n=new Uint8Array(t);for(let i=0;i<n.length;i++)n[i]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()}ce.signedBigIntToBytes=F1;function Nl(e){(0,ct.assert)(typeof e=="number","Value must be a number."),(0,ct.assert)(e>=0,"Value must be a non-negative number."),(0,ct.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");const t=e.toString(16);return ji(t)}ce.numberToBytes=Nl;function Ll(e){return(0,ct.assert)(typeof e=="string","Value must be a string."),new TextEncoder().encode(e)}ce.stringToBytes=Ll;function Pl(e){if(typeof e=="bigint")return Tl(e);if(typeof e=="number")return Nl(e);if(typeof e=="string")return e.startsWith("0x")?ji(e):Ll(e);if(go(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}ce.valueToBytes=Pl;function D1(e){const t=new Array(e.length);let r=0;for(let i=0;i<e.length;i++){const s=Pl(e[i]);t[i]=s,r+=s.length}const n=new Uint8Array(r);for(let i=0,s=0;i<t.length;i++)n.set(t[i],s),s+=t[i].length;return n}ce.concatBytes=D1;function j1(e){if(typeof re<"u"&&e instanceof re){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}ce.createDataView=j1;var Hi={};Object.defineProperty(Hi,"__esModule",{value:!0});Hi.ChecksumStruct=void 0;const Aa=yr,H1=On;Hi.ChecksumStruct=(0,Aa.size)((0,H1.base64)((0,Aa.string)(),{paddingRequired:!0}),44,44);var At={};Object.defineProperty(At,"__esModule",{value:!0});At.createHex=At.createBytes=At.createBigInt=At.createNumber=void 0;const Ve=yr,U1=Ye,Ol=ce,Ui=$n,$l=(0,Ve.union)([(0,Ve.number)(),(0,Ve.bigint)(),(0,Ve.string)(),Ui.StrictHexStruct]),V1=(0,Ve.coerce)((0,Ve.number)(),$l,Number),W1=(0,Ve.coerce)((0,Ve.bigint)(),$l,BigInt);(0,Ve.union)([Ui.StrictHexStruct,(0,Ve.instance)(Uint8Array)]);const z1=(0,Ve.coerce)((0,Ve.instance)(Uint8Array),(0,Ve.union)([Ui.StrictHexStruct]),Ol.hexToBytes),q1=(0,Ve.coerce)(Ui.StrictHexStruct,(0,Ve.instance)(Uint8Array),Ol.bytesToHex);function J1(e){try{const t=(0,Ve.create)(e,V1);return(0,U1.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){throw t instanceof Ve.StructError?new Error(`Expected a number-like value, got "${e}".`):t}}At.createNumber=J1;function G1(e){try{return(0,Ve.create)(e,W1)}catch(t){throw t instanceof Ve.StructError?new Error(`Expected a number-like value, got "${String(t.value)}".`):t}}At.createBigInt=G1;function Z1(e){if(typeof e=="string"&&e.toLowerCase()==="0x")return new Uint8Array;try{return(0,Ve.create)(e,z1)}catch(t){throw t instanceof Ve.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}At.createBytes=Z1;function K1(e){if(e instanceof Uint8Array&&e.length===0||typeof e=="string"&&e.toLowerCase()==="0x")return"0x";try{return(0,Ve.create)(e,q1)}catch(t){throw t instanceof Ve.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}At.createHex=K1;var Zr={},Bl=J&&J.__classPrivateFieldSet||function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},tt=J&&J.__classPrivateFieldGet||function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},mt,Rt;Object.defineProperty(Zr,"__esModule",{value:!0});Zr.FrozenSet=Zr.FrozenMap=void 0;class po{constructor(t){mt.set(this,void 0),Bl(this,mt,new Map(t),"f"),Object.freeze(this)}get size(){return tt(this,mt,"f").size}[(mt=new WeakMap,Symbol.iterator)](){return tt(this,mt,"f")[Symbol.iterator]()}entries(){return tt(this,mt,"f").entries()}forEach(t,r){return tt(this,mt,"f").forEach((n,i,s)=>t.call(r,n,i,this))}get(t){return tt(this,mt,"f").get(t)}has(t){return tt(this,mt,"f").has(t)}keys(){return tt(this,mt,"f").keys()}values(){return tt(this,mt,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([t,r])=>`${String(t)} => ${String(r)}`).join(", ")} `:""}}`}}Zr.FrozenMap=po;class mo{constructor(t){Rt.set(this,void 0),Bl(this,Rt,new Set(t),"f"),Object.freeze(this)}get size(){return tt(this,Rt,"f").size}[(Rt=new WeakMap,Symbol.iterator)](){return tt(this,Rt,"f")[Symbol.iterator]()}entries(){return tt(this,Rt,"f").entries()}forEach(t,r){return tt(this,Rt,"f").forEach((n,i,s)=>t.call(r,n,i,this))}has(t){return tt(this,Rt,"f").has(t)}keys(){return tt(this,Rt,"f").keys()}values(){return tt(this,Rt,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(t=>String(t)).join(", ")} `:""}}`}}Zr.FrozenSet=mo;Object.freeze(po);Object.freeze(po.prototype);Object.freeze(mo);Object.freeze(mo.prototype);var Fl={};Object.defineProperty(Fl,"__esModule",{value:!0});var Dl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;const t=yr,r=Ye,n=()=>(0,t.define)("finite number",L=>(0,t.is)(L,(0,t.number)())&&Number.isFinite(L));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),n(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.define)("Json",(L,F)=>{function G(q,W){const Q=[...W.validator(q,F)];return Q.length>0?Q:!0}try{const q=G(L,e.UnsafeJsonStruct);return q!==!0?q:G(JSON.parse(JSON.stringify(L)),e.UnsafeJsonStruct)}catch(q){return q instanceof RangeError?"Circular reference detected":!1}});function i(L){return(0,t.is)(L,e.JsonStruct)}e.isValidJson=i;function s(L){(0,r.assertStruct)(L,e.JsonStruct,"Invalid JSON value");const F=JSON.stringify(L);return new TextEncoder().encode(F).byteLength}e.getJsonSize=s,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,t.object)({code:(0,t.integer)(),message:(0,t.string)(),data:(0,t.optional)(e.JsonStruct),stack:(0,t.optional)((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.optional)((0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,t.omit)(e.JsonRpcRequestStruct,["id"]);function a(L){return(0,t.is)(L,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=a;function l(L,F){(0,r.assertStruct)(L,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",F)}e.assertIsJsonRpcNotification=l;function h(L){return(0,t.is)(L,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=h;function f(L,F){(0,r.assertStruct)(L,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",F)}e.assertIsJsonRpcRequest=f,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function d(L){return(0,t.is)(L,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=d;function w(L,F){(0,r.assertStruct)(L,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",F)}e.assertIsPendingJsonRpcResponse=w;function b(L){return(0,t.is)(L,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=b;function I(L,F){(0,r.assertStruct)(L,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",F)}e.assertIsJsonRpcResponse=I;function O(L){return(0,t.is)(L,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=O;function N(L,F){(0,r.assertStruct)(L,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",F)}e.assertIsJsonRpcSuccess=N;function P(L){return(0,t.is)(L,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=P;function M(L,F){(0,r.assertStruct)(L,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",F)}e.assertIsJsonRpcFailure=M;function x(L){return(0,t.is)(L,e.JsonRpcErrorStruct)}e.isJsonRpcError=x;function T(L,F){(0,r.assertStruct)(L,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",F)}e.assertIsJsonRpcError=T;function $(L){const{permitEmptyString:F,permitFractions:G,permitNull:q}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},L);return ie=>!!(typeof ie=="number"&&(G||Number.isInteger(ie))||typeof ie=="string"&&(F||ie.length>0)||q&&ie===null)}e.getJsonRpcIdValidator=$})(Dl);var jl={};Object.defineProperty(jl,"__esModule",{value:!0});var Kr={},Q1=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.createModuleLogger=Kr.createProjectLogger=void 0;const Y1=Q1(Su),X1=(0,Y1.default)("metamask");function eg(e){return X1.extend(e)}Kr.createProjectLogger=eg;function tg(e,t){return e.extend(t)}Kr.createModuleLogger=tg;var Hl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(f){return Array.isArray(f)&&f.length>0}e.isNonEmptyArray=t;function r(f){return f==null}e.isNullOrUndefined=r;function n(f){return!!f&&typeof f=="object"&&!Array.isArray(f)}e.isObject=n;const i=(f,d)=>Object.hasOwnProperty.call(f,d);e.hasProperty=i,function(f){f[f.Null=4]="Null",f[f.Comma=1]="Comma",f[f.Wrapper=1]="Wrapper",f[f.True=4]="True",f[f.False=5]="False",f[f.Quote=1]="Quote",f[f.Colon=1]="Colon",f[f.Date=24]="Date"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function s(f){if(typeof f!="object"||f===null)return!1;try{let d=f;for(;Object.getPrototypeOf(d)!==null;)d=Object.getPrototypeOf(d);return Object.getPrototypeOf(f)===d}catch{return!1}}e.isPlainObject=s;function a(f){return f.charCodeAt(0)<=127}e.isASCII=a;function l(f){var d;return f.split("").reduce((b,I)=>a(I)?b+1:b+2,0)+((d=f.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&d!==void 0?d:[]).length}e.calculateStringSize=l;function h(f){return f.toString().length}e.calculateNumberSize=h})(Hl);var Tt={};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.hexToBigInt=Tt.hexToNumber=Tt.bigIntToHex=Tt.numberToHex=void 0;const Ur=Ye,pn=$n,rg=e=>((0,Ur.assert)(typeof e=="number","Value must be a number."),(0,Ur.assert)(e>=0,"Value must be a non-negative number."),(0,Ur.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,pn.add0x)(e.toString(16)));Tt.numberToHex=rg;const ng=e=>((0,Ur.assert)(typeof e=="bigint","Value must be a bigint."),(0,Ur.assert)(e>=0,"Value must be a non-negative bigint."),(0,pn.add0x)(e.toString(16)));Tt.bigIntToHex=ng;const ig=e=>{(0,pn.assertIsHexString)(e);const t=parseInt(e,16);return(0,Ur.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};Tt.hexToNumber=ig;const sg=e=>((0,pn.assertIsHexString)(e),BigInt((0,pn.add0x)(e)));Tt.hexToBigInt=sg;var Ul={};Object.defineProperty(Ul,"__esModule",{value:!0});var Vl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(s){s[s.Millisecond=1]="Millisecond",s[s.Second=1e3]="Second",s[s.Minute=6e4]="Minute",s[s.Hour=36e5]="Hour",s[s.Day=864e5]="Day",s[s.Week=6048e5]="Week",s[s.Year=31536e6]="Year"}(e.Duration||(e.Duration={}));const t=s=>Number.isInteger(s)&&s>=0,r=(s,a)=>{if(!t(s))throw new Error(`"${a}" must be a non-negative integer. Received: "${s}".`)};function n(s,a){return r(s,"count"),s*a}e.inMilliseconds=n;function i(s){return r(s,"timestamp"),Date.now()-s}e.timeSince=i})(Vl);var Wl={};Object.defineProperty(Wl,"__esModule",{value:!0});var zl={},Gs={exports:{}};const og="2.0.0",ql=256,ag=Number.MAX_SAFE_INTEGER||9007199254740991,cg=16,lg=ql-6,ug=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Vi={MAX_LENGTH:ql,MAX_SAFE_COMPONENT_LENGTH:cg,MAX_SAFE_BUILD_LENGTH:lg,MAX_SAFE_INTEGER:ag,RELEASE_TYPES:ug,SEMVER_SPEC_VERSION:og,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Is={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/landing-site/0.0.1-23620719480.commit-7d049a4"};const hg=typeof he=="object"&&Is&&Is.NODE_DEBUG&&/\bsemver\b/i.test(Is.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Wi=hg;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=Vi,s=Wi;t=e.exports={};const a=t.re=[],l=t.safeRe=[],h=t.src=[],f=t.safeSrc=[],d=t.t={};let w=0;const b="[a-zA-Z0-9-]",I=[["\\s",1],["\\d",i],[b,n]],O=P=>{for(const[M,x]of I)P=P.split(`${M}*`).join(`${M}{0,${x}}`).split(`${M}+`).join(`${M}{1,${x}}`);return P},N=(P,M,x)=>{const T=O(M),$=w++;s(P,$,M),d[P]=$,h[$]=M,f[$]=T,a[$]=new RegExp(M,x?"g":void 0),l[$]=new RegExp(T,x?"g":void 0)};N("NUMERICIDENTIFIER","0|[1-9]\\d*"),N("NUMERICIDENTIFIERLOOSE","\\d+"),N("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${b}*`),N("MAINVERSION",`(${h[d.NUMERICIDENTIFIER]})\\.(${h[d.NUMERICIDENTIFIER]})\\.(${h[d.NUMERICIDENTIFIER]})`),N("MAINVERSIONLOOSE",`(${h[d.NUMERICIDENTIFIERLOOSE]})\\.(${h[d.NUMERICIDENTIFIERLOOSE]})\\.(${h[d.NUMERICIDENTIFIERLOOSE]})`),N("PRERELEASEIDENTIFIER",`(?:${h[d.NONNUMERICIDENTIFIER]}|${h[d.NUMERICIDENTIFIER]})`),N("PRERELEASEIDENTIFIERLOOSE",`(?:${h[d.NONNUMERICIDENTIFIER]}|${h[d.NUMERICIDENTIFIERLOOSE]})`),N("PRERELEASE",`(?:-(${h[d.PRERELEASEIDENTIFIER]}(?:\\.${h[d.PRERELEASEIDENTIFIER]})*))`),N("PRERELEASELOOSE",`(?:-?(${h[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${h[d.PRERELEASEIDENTIFIERLOOSE]})*))`),N("BUILDIDENTIFIER",`${b}+`),N("BUILD",`(?:\\+(${h[d.BUILDIDENTIFIER]}(?:\\.${h[d.BUILDIDENTIFIER]})*))`),N("FULLPLAIN",`v?${h[d.MAINVERSION]}${h[d.PRERELEASE]}?${h[d.BUILD]}?`),N("FULL",`^${h[d.FULLPLAIN]}$`),N("LOOSEPLAIN",`[v=\\s]*${h[d.MAINVERSIONLOOSE]}${h[d.PRERELEASELOOSE]}?${h[d.BUILD]}?`),N("LOOSE",`^${h[d.LOOSEPLAIN]}$`),N("GTLT","((?:<|>)?=?)"),N("XRANGEIDENTIFIERLOOSE",`${h[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),N("XRANGEIDENTIFIER",`${h[d.NUMERICIDENTIFIER]}|x|X|\\*`),N("XRANGEPLAIN",`[v=\\s]*(${h[d.XRANGEIDENTIFIER]})(?:\\.(${h[d.XRANGEIDENTIFIER]})(?:\\.(${h[d.XRANGEIDENTIFIER]})(?:${h[d.PRERELEASE]})?${h[d.BUILD]}?)?)?`),N("XRANGEPLAINLOOSE",`[v=\\s]*(${h[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${h[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${h[d.XRANGEIDENTIFIERLOOSE]})(?:${h[d.PRERELEASELOOSE]})?${h[d.BUILD]}?)?)?`),N("XRANGE",`^${h[d.GTLT]}\\s*${h[d.XRANGEPLAIN]}$`),N("XRANGELOOSE",`^${h[d.GTLT]}\\s*${h[d.XRANGEPLAINLOOSE]}$`),N("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),N("COERCE",`${h[d.COERCEPLAIN]}(?:$|[^\\d])`),N("COERCEFULL",h[d.COERCEPLAIN]+`(?:${h[d.PRERELEASE]})?(?:${h[d.BUILD]})?(?:$|[^\\d])`),N("COERCERTL",h[d.COERCE],!0),N("COERCERTLFULL",h[d.COERCEFULL],!0),N("LONETILDE","(?:~>?)"),N("TILDETRIM",`(\\s*)${h[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",N("TILDE",`^${h[d.LONETILDE]}${h[d.XRANGEPLAIN]}$`),N("TILDELOOSE",`^${h[d.LONETILDE]}${h[d.XRANGEPLAINLOOSE]}$`),N("LONECARET","(?:\\^)"),N("CARETTRIM",`(\\s*)${h[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",N("CARET",`^${h[d.LONECARET]}${h[d.XRANGEPLAIN]}$`),N("CARETLOOSE",`^${h[d.LONECARET]}${h[d.XRANGEPLAINLOOSE]}$`),N("COMPARATORLOOSE",`^${h[d.GTLT]}\\s*(${h[d.LOOSEPLAIN]})$|^$`),N("COMPARATOR",`^${h[d.GTLT]}\\s*(${h[d.FULLPLAIN]})$|^$`),N("COMPARATORTRIM",`(\\s*)${h[d.GTLT]}\\s*(${h[d.LOOSEPLAIN]}|${h[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",N("HYPHENRANGE",`^\\s*(${h[d.XRANGEPLAIN]})\\s+-\\s+(${h[d.XRANGEPLAIN]})\\s*$`),N("HYPHENRANGELOOSE",`^\\s*(${h[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${h[d.XRANGEPLAINLOOSE]})\\s*$`),N("STAR","(<|>)?=?\\s*\\*"),N("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),N("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Gs,Gs.exports);var Bn=Gs.exports;const dg=Object.freeze({loose:!0}),fg=Object.freeze({}),gg=e=>e?typeof e!="object"?dg:e:fg;var vo=gg;const Ta=/^[0-9]+$/,Jl=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;const r=Ta.test(e),n=Ta.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},pg=(e,t)=>Jl(t,e);var Gl={compareIdentifiers:Jl,rcompareIdentifiers:pg};const Gn=Wi,{MAX_LENGTH:Na,MAX_SAFE_INTEGER:Zn}=Vi,{safeRe:Kn,t:Qn}=Bn,mg=vo,{compareIdentifiers:xs}=Gl;let vg=class Mt{constructor(t,r){if(r=mg(r),t instanceof Mt){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Na)throw new TypeError(`version is longer than ${Na} characters`);Gn("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?Kn[Qn.LOOSE]:Kn[Qn.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Zn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Zn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Zn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s<Zn)return s}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Gn("SemVer.compare",this.version,this.options,t),!(t instanceof Mt)){if(typeof t=="string"&&t===this.version)return 0;t=new Mt(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof Mt||(t=new Mt(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof Mt||(t=new Mt(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],i=t.prerelease[r];if(Gn("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return xs(n,i)}while(++r)}compareBuild(t){t instanceof Mt||(t=new Mt(t,this.options));let r=0;do{const n=this.build[r],i=t.build[r];if(Gn("build compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return xs(n,i)}while(++r)}inc(t,r,n){if(t.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){const i=`-${r}`.match(this.options.loose?Kn[Qn.PRERELEASELOOSE]:Kn[Qn.PRERELEASE]);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const i=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let s=[r,i];n===!1&&(s=[r]),xs(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var rt=vg;const La=rt,bg=(e,t,r=!1)=>{if(e instanceof La)return e;try{return new La(e,t)}catch(n){if(!r)return null;throw n}};var on=bg;const wg=on,yg=(e,t)=>{const r=wg(e,t);return r?r.version:null};var _g=yg;const Eg=on,Sg=(e,t)=>{const r=Eg(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var Rg=Sg;const Pa=rt,Mg=(e,t,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new Pa(e instanceof Pa?e.version:e,r).inc(t,n,i).version}catch{return null}};var Cg=Mg;const Oa=on,kg=(e,t)=>{const r=Oa(e,null,!0),n=Oa(t,null,!0),i=r.compare(n);if(i===0)return null;const s=i>0,a=s?r:n,l=s?n:r,h=!!a.prerelease.length;if(!!l.prerelease.length&&!h){if(!l.patch&&!l.minor)return"major";if(l.compareMain(a)===0)return l.minor&&!l.patch?"minor":"patch"}const d=h?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"};var Ig=kg;const xg=rt,Ag=(e,t)=>new xg(e,t).major;var Tg=Ag;const Ng=rt,Lg=(e,t)=>new Ng(e,t).minor;var Pg=Lg;const Og=rt,$g=(e,t)=>new Og(e,t).patch;var Bg=$g;const Fg=on,Dg=(e,t)=>{const r=Fg(e,t);return r&&r.prerelease.length?r.prerelease:null};var jg=Dg;const $a=rt,Hg=(e,t,r)=>new $a(e,r).compare(new $a(t,r));var yt=Hg;const Ug=yt,Vg=(e,t,r)=>Ug(t,e,r);var Wg=Vg;const zg=yt,qg=(e,t)=>zg(e,t,!0);var Jg=qg;const Ba=rt,Gg=(e,t,r)=>{const n=new Ba(e,r),i=new Ba(t,r);return n.compare(i)||n.compareBuild(i)};var bo=Gg;const Zg=bo,Kg=(e,t)=>e.sort((r,n)=>Zg(r,n,t));var Qg=Kg;const Yg=bo,Xg=(e,t)=>e.sort((r,n)=>Yg(n,r,t));var ep=Xg;const tp=yt,rp=(e,t,r)=>tp(e,t,r)>0;var zi=rp;const np=yt,ip=(e,t,r)=>np(e,t,r)<0;var wo=ip;const sp=yt,op=(e,t,r)=>sp(e,t,r)===0;var Zl=op;const ap=yt,cp=(e,t,r)=>ap(e,t,r)!==0;var Kl=cp;const lp=yt,up=(e,t,r)=>lp(e,t,r)>=0;var yo=up;const hp=yt,dp=(e,t,r)=>hp(e,t,r)<=0;var _o=dp;const fp=Zl,gp=Kl,pp=zi,mp=yo,vp=wo,bp=_o,wp=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return fp(e,r,n);case"!=":return gp(e,r,n);case">":return pp(e,r,n);case">=":return mp(e,r,n);case"<":return vp(e,r,n);case"<=":return bp(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};var Ql=wp;const yp=rt,_p=on,{safeRe:Yn,t:Xn}=Bn,Ep=(e,t)=>{if(e instanceof yp)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Yn[Xn.COERCEFULL]:Yn[Xn.COERCE]);else{const h=t.includePrerelease?Yn[Xn.COERCERTLFULL]:Yn[Xn.COERCERTL];let f;for(;(f=h.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||f.index+f[0].length!==r.index+r[0].length)&&(r=f),h.lastIndex=f.index+f[1].length+f[2].length;h.lastIndex=-1}if(r===null)return null;const n=r[2],i=r[3]||"0",s=r[4]||"0",a=t.includePrerelease&&r[5]?`-${r[5]}`:"",l=t.includePrerelease&&r[6]?`+${r[6]}`:"";return _p(`${n}.${i}.${s}${a}${l}`,t)};var Sp=Ep;class Rp{constructor(){this.max=1e3,this.map=new Map}get(t){const r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(t,r)}return this}}var Mp=Rp,As,Fa;function _t(){if(Fa)return As;Fa=1;const e=/\s+/g;class t{constructor(u,g){if(g=i(g),u instanceof t)return u.loose===!!g.loose&&u.includePrerelease===!!g.includePrerelease?u:new t(u.raw,g);if(u instanceof s)return this.raw=u.value,this.set=[[u]],this.formatted=void 0,this;if(this.options=g,this.loose=!!g.loose,this.includePrerelease=!!g.includePrerelease,this.raw=u.trim().replace(e," "),this.set=this.raw.split("||").map(p=>this.parseRange(p.trim())).filter(p=>p.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const p=this.set[0];if(this.set=this.set.filter(v=>!N(v[0])),this.set.length===0)this.set=[p];else if(this.set.length>1){for(const v of this.set)if(v.length===1&&P(v[0])){this.set=[v];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let u=0;u<this.set.length;u++){u>0&&(this.formatted+="||");const g=this.set[u];for(let p=0;p<g.length;p++)p>0&&(this.formatted+=" "),this.formatted+=g[p].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(u){const p=((this.options.includePrerelease&&I)|(this.options.loose&&O))+":"+u,v=n.get(p);if(v)return v;const S=this.options.loose,k=S?h[f.HYPHENRANGELOOSE]:h[f.HYPHENRANGE];u=u.replace(k,se(this.options.includePrerelease)),a("hyphen replace",u),u=u.replace(h[f.COMPARATORTRIM],d),a("comparator trim",u),u=u.replace(h[f.TILDETRIM],w),a("tilde trim",u),u=u.replace(h[f.CARETTRIM],b),a("caret trim",u);let m=u.split(" ").map(H=>x(H,this.options)).join(" ").split(/\s+/).map(H=>Q(H,this.options));S&&(m=m.filter(H=>(a("loose invalid filter",H,this.options),!!H.match(h[f.COMPARATORLOOSE])))),a("range list",m);const c=new Map,y=m.map(H=>new s(H,this.options));for(const H of y){if(N(H))return[H];c.set(H.value,H)}c.size>1&&c.has("")&&c.delete("");const V=[...c.values()];return n.set(p,V),V}intersects(u,g){if(!(u instanceof t))throw new TypeError("a Range is required");return this.set.some(p=>M(p,g)&&u.set.some(v=>M(v,g)&&p.every(S=>v.every(k=>S.intersects(k,g)))))}test(u){if(!u)return!1;if(typeof u=="string")try{u=new l(u,this.options)}catch{return!1}for(let g=0;g<this.set.length;g++)if(R(this.set[g],u,this.options))return!0;return!1}}As=t;const r=Mp,n=new r,i=vo,s=qi(),a=Wi,l=rt,{safeRe:h,t:f,comparatorTrimReplace:d,tildeTrimReplace:w,caretTrimReplace:b}=Bn,{FLAG_INCLUDE_PRERELEASE:I,FLAG_LOOSE:O}=Vi,N=o=>o.value==="<0.0.0-0",P=o=>o.value==="",M=(o,u)=>{let g=!0;const p=o.slice();let v=p.pop();for(;g&&p.length;)g=p.every(S=>v.intersects(S,u)),v=p.pop();return g},x=(o,u)=>(o=o.replace(h[f.BUILD],""),a("comp",o,u),o=F(o,u),a("caret",o),o=$(o,u),a("tildes",o),o=q(o,u),a("xrange",o),o=ie(o,u),a("stars",o),o),T=o=>!o||o.toLowerCase()==="x"||o==="*",$=(o,u)=>o.trim().split(/\s+/).map(g=>L(g,u)).join(" "),L=(o,u)=>{const g=u.loose?h[f.TILDELOOSE]:h[f.TILDE];return o.replace(g,(p,v,S,k,m)=>{a("tilde",o,p,v,S,k,m);let c;return T(v)?c="":T(S)?c=`>=${v}.0.0 <${+v+1}.0.0-0`:T(k)?c=`>=${v}.${S}.0 <${v}.${+S+1}.0-0`:m?(a("replaceTilde pr",m),c=`>=${v}.${S}.${k}-${m} <${v}.${+S+1}.0-0`):c=`>=${v}.${S}.${k} <${v}.${+S+1}.0-0`,a("tilde return",c),c})},F=(o,u)=>o.trim().split(/\s+/).map(g=>G(g,u)).join(" "),G=(o,u)=>{a("caret",o,u);const g=u.loose?h[f.CARETLOOSE]:h[f.CARET],p=u.includePrerelease?"-0":"";return o.replace(g,(v,S,k,m,c)=>{a("caret",o,v,S,k,m,c);let y;return T(S)?y="":T(k)?y=`>=${S}.0.0${p} <${+S+1}.0.0-0`:T(m)?S==="0"?y=`>=${S}.${k}.0${p} <${S}.${+k+1}.0-0`:y=`>=${S}.${k}.0${p} <${+S+1}.0.0-0`:c?(a("replaceCaret pr",c),S==="0"?k==="0"?y=`>=${S}.${k}.${m}-${c} <${S}.${k}.${+m+1}-0`:y=`>=${S}.${k}.${m}-${c} <${S}.${+k+1}.0-0`:y=`>=${S}.${k}.${m}-${c} <${+S+1}.0.0-0`):(a("no pr"),S==="0"?k==="0"?y=`>=${S}.${k}.${m}${p} <${S}.${k}.${+m+1}-0`:y=`>=${S}.${k}.${m}${p} <${S}.${+k+1}.0-0`:y=`>=${S}.${k}.${m} <${+S+1}.0.0-0`),a("caret return",y),y})},q=(o,u)=>(a("replaceXRanges",o,u),o.split(/\s+/).map(g=>W(g,u)).join(" ")),W=(o,u)=>{o=o.trim();const g=u.loose?h[f.XRANGELOOSE]:h[f.XRANGE];return o.replace(g,(p,v,S,k,m,c)=>{a("xRange",o,p,v,S,k,m,c);const y=T(S),V=y||T(k),H=V||T(m),C=H;return v==="="&&C&&(v=""),c=u.includePrerelease?"-0":"",y?v===">"||v==="<"?p="<0.0.0-0":p="*":v&&C?(V&&(k=0),m=0,v===">"?(v=">=",V?(S=+S+1,k=0,m=0):(k=+k+1,m=0)):v==="<="&&(v="<",V?S=+S+1:k=+k+1),v==="<"&&(c="-0"),p=`${v+S}.${k}.${m}${c}`):V?p=`>=${S}.0.0${c} <${+S+1}.0.0-0`:H&&(p=`>=${S}.${k}.0${c} <${S}.${+k+1}.0-0`),a("xRange return",p),p})},ie=(o,u)=>(a("replaceStars",o,u),o.trim().replace(h[f.STAR],"")),Q=(o,u)=>(a("replaceGTE0",o,u),o.trim().replace(h[u.includePrerelease?f.GTE0PRE:f.GTE0],"")),se=o=>(u,g,p,v,S,k,m,c,y,V,H,C)=>(T(p)?g="":T(v)?g=`>=${p}.0.0${o?"-0":""}`:T(S)?g=`>=${p}.${v}.0${o?"-0":""}`:k?g=`>=${g}`:g=`>=${g}${o?"-0":""}`,T(y)?c="":T(V)?c=`<${+y+1}.0.0-0`:T(H)?c=`<${y}.${+V+1}.0-0`:C?c=`<=${y}.${V}.${H}-${C}`:o?c=`<${y}.${V}.${+H+1}-0`:c=`<=${c}`,`${g} ${c}`.trim()),R=(o,u,g)=>{for(let p=0;p<o.length;p++)if(!o[p].test(u))return!1;if(u.prerelease.length&&!g.includePrerelease){for(let p=0;p<o.length;p++)if(a(o[p].semver),o[p].semver!==s.ANY&&o[p].semver.prerelease.length>0){const v=o[p].semver;if(v.major===u.major&&v.minor===u.minor&&v.patch===u.patch)return!0}return!1}return!0};return As}var Ts,Da;function qi(){if(Da)return Ts;Da=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(d,w){if(w=r(w),d instanceof t){if(d.loose===!!w.loose)return d;d=d.value}d=d.trim().split(/\s+/).join(" "),a("comparator",d,w),this.options=w,this.loose=!!w.loose,this.parse(d),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(d){const w=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],b=d.match(w);if(!b)throw new TypeError(`Invalid comparator: ${d}`);this.operator=b[1]!==void 0?b[1]:"",this.operator==="="&&(this.operator=""),b[2]?this.semver=new l(b[2],this.options.loose):this.semver=e}toString(){return this.value}test(d){if(a("Comparator.test",d,this.options.loose),this.semver===e||d===e)return!0;if(typeof d=="string")try{d=new l(d,this.options)}catch{return!1}return s(d,this.operator,this.semver,this.options)}intersects(d,w){if(!(d instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new h(d.value,w).test(this.value):d.operator===""?d.value===""?!0:new h(this.value,w).test(d.semver):(w=r(w),w.includePrerelease&&(this.value==="<0.0.0-0"||d.value==="<0.0.0-0")||!w.includePrerelease&&(this.value.startsWith("<0.0.0")||d.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&d.operator.startsWith(">")||this.operator.startsWith("<")&&d.operator.startsWith("<")||this.semver.version===d.semver.version&&this.operator.includes("=")&&d.operator.includes("=")||s(this.semver,"<",d.semver,w)&&this.operator.startsWith(">")&&d.operator.startsWith("<")||s(this.semver,">",d.semver,w)&&this.operator.startsWith("<")&&d.operator.startsWith(">")))}}Ts=t;const r=vo,{safeRe:n,t:i}=Bn,s=Ql,a=Wi,l=rt,h=_t();return Ts}const Cp=_t(),kp=(e,t,r)=>{try{t=new Cp(t,r)}catch{return!1}return t.test(e)};var Ji=kp;const Ip=_t(),xp=(e,t)=>new Ip(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Ap=xp;const Tp=rt,Np=_t(),Lp=(e,t,r)=>{let n=null,i=null,s=null;try{s=new Np(t,r)}catch{return null}return e.forEach(a=>{s.test(a)&&(!n||i.compare(a)===-1)&&(n=a,i=new Tp(n,r))}),n};var Pp=Lp;const Op=rt,$p=_t(),Bp=(e,t,r)=>{let n=null,i=null,s=null;try{s=new $p(t,r)}catch{return null}return e.forEach(a=>{s.test(a)&&(!n||i.compare(a)===1)&&(n=a,i=new Op(n,r))}),n};var Fp=Bp;const Ns=rt,Dp=_t(),ja=zi,jp=(e,t)=>{e=new Dp(e,t);let r=new Ns("0.0.0");if(e.test(r)||(r=new Ns("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n<e.set.length;++n){const i=e.set[n];let s=null;i.forEach(a=>{const l=new Ns(a.semver.version);switch(a.operator){case">":l.prerelease.length===0?l.patch++:l.prerelease.push(0),l.raw=l.format();case"":case">=":(!s||ja(l,s))&&(s=l);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),s&&(!r||ja(r,s))&&(r=s)}return r&&e.test(r)?r:null};var Hp=jp;const Up=_t(),Vp=(e,t)=>{try{return new Up(e,t).range||"*"}catch{return null}};var Wp=Vp;const zp=rt,Yl=qi(),{ANY:qp}=Yl,Jp=_t(),Gp=Ji,Ha=zi,Ua=wo,Zp=_o,Kp=yo,Qp=(e,t,r,n)=>{e=new zp(e,n),t=new Jp(t,n);let i,s,a,l,h;switch(r){case">":i=Ha,s=Zp,a=Ua,l=">",h=">=";break;case"<":i=Ua,s=Kp,a=Ha,l="<",h="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Gp(e,t,n))return!1;for(let f=0;f<t.set.length;++f){const d=t.set[f];let w=null,b=null;if(d.forEach(I=>{I.semver===qp&&(I=new Yl(">=0.0.0")),w=w||I,b=b||I,i(I.semver,w.semver,n)?w=I:a(I.semver,b.semver,n)&&(b=I)}),w.operator===l||w.operator===h||(!b.operator||b.operator===l)&&s(e,b.semver))return!1;if(b.operator===h&&a(e,b.semver))return!1}return!0};var Eo=Qp;const Yp=Eo,Xp=(e,t,r)=>Yp(e,t,">",r);var em=Xp;const tm=Eo,rm=(e,t,r)=>tm(e,t,"<",r);var nm=rm;const Va=_t(),im=(e,t,r)=>(e=new Va(e,r),t=new Va(t,r),e.intersects(t,r));var sm=im;const om=Ji,am=yt;var cm=(e,t,r)=>{const n=[];let i=null,s=null;const a=e.sort((d,w)=>am(d,w,r));for(const d of a)om(d,t,r)?(s=d,i||(i=d)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);const l=[];for(const[d,w]of n)d===w?l.push(d):!w&&d===a[0]?l.push("*"):w?d===a[0]?l.push(`<=${w}`):l.push(`${d} - ${w}`):l.push(`>=${d}`);const h=l.join(" || "),f=typeof t.raw=="string"?t.raw:String(t);return h.length<f.length?h:t};const Wa=_t(),So=qi(),{ANY:Ls}=So,cn=Ji,Ro=yt,lm=(e,t,r={})=>{if(e===t)return!0;e=new Wa(e,r),t=new Wa(t,r);let n=!1;e:for(const i of e.set){for(const s of t.set){const a=hm(i,s,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},um=[new So(">=0.0.0-0")],za=[new So(">=0.0.0")],hm=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Ls){if(t.length===1&&t[0].semver===Ls)return!0;r.includePrerelease?e=um:e=za}if(t.length===1&&t[0].semver===Ls){if(r.includePrerelease)return!0;t=za}const n=new Set;let i,s;for(const I of e)I.operator===">"||I.operator===">="?i=qa(i,I,r):I.operator==="<"||I.operator==="<="?s=Ja(s,I,r):n.add(I.semver);if(n.size>1)return null;let a;if(i&&s){if(a=Ro(i.semver,s.semver,r),a>0)return null;if(a===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const I of n){if(i&&!cn(I,String(i),r)||s&&!cn(I,String(s),r))return null;for(const O of t)if(!cn(I,String(O),r))return!1;return!0}let l,h,f,d,w=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,b=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;w&&w.prerelease.length===1&&s.operator==="<"&&w.prerelease[0]===0&&(w=!1);for(const I of t){if(d=d||I.operator===">"||I.operator===">=",f=f||I.operator==="<"||I.operator==="<=",i){if(b&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===b.major&&I.semver.minor===b.minor&&I.semver.patch===b.patch&&(b=!1),I.operator===">"||I.operator===">="){if(l=qa(i,I,r),l===I&&l!==i)return!1}else if(i.operator===">="&&!cn(i.semver,String(I),r))return!1}if(s){if(w&&I.semver.prerelease&&I.semver.prerelease.length&&I.semver.major===w.major&&I.semver.minor===w.minor&&I.semver.patch===w.patch&&(w=!1),I.operator==="<"||I.operator==="<="){if(h=Ja(s,I,r),h===I&&h!==s)return!1}else if(s.operator==="<="&&!cn(s.semver,String(I),r))return!1}if(!I.operator&&(s||i)&&a!==0)return!1}return!(i&&f&&!s&&a!==0||s&&d&&!i&&a!==0||b||w)},qa=(e,t,r)=>{if(!e)return t;const n=Ro(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},Ja=(e,t,r)=>{if(!e)return t;const n=Ro(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};var dm=lm;const Ps=Bn,Ga=Vi,fm=rt,Za=Gl,gm=on,pm=_g,mm=Rg,vm=Cg,bm=Ig,wm=Tg,ym=Pg,_m=Bg,Em=jg,Sm=yt,Rm=Wg,Mm=Jg,Cm=bo,km=Qg,Im=ep,xm=zi,Am=wo,Tm=Zl,Nm=Kl,Lm=yo,Pm=_o,Om=Ql,$m=Sp,Bm=qi(),Fm=_t(),Dm=Ji,jm=Ap,Hm=Pp,Um=Fp,Vm=Hp,Wm=Wp,zm=Eo,qm=em,Jm=nm,Gm=sm,Zm=cm,Km=dm;var Qm={parse:gm,valid:pm,clean:mm,inc:vm,diff:bm,major:wm,minor:ym,patch:_m,prerelease:Em,compare:Sm,rcompare:Rm,compareLoose:Mm,compareBuild:Cm,sort:km,rsort:Im,gt:xm,lt:Am,eq:Tm,neq:Nm,gte:Lm,lte:Pm,cmp:Om,coerce:$m,Comparator:Bm,Range:Fm,satisfies:Dm,toComparators:jm,maxSatisfying:Hm,minSatisfying:Um,minVersion:Vm,validRange:Wm,outside:zm,gtr:qm,ltr:Jm,intersects:Gm,simplifyRange:Zm,subset:Km,SemVer:fm,re:Ps.re,src:Ps.src,tokens:Ps.t,SEMVER_SPEC_VERSION:Ga.SEMVER_SPEC_VERSION,RELEASE_TYPES:Ga.RELEASE_TYPES,compareIdentifiers:Za.compareIdentifiers,rcompareIdentifiers:Za.rcompareIdentifiers};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=Qm,r=yr,n=Ye;e.VersionStruct=(0,r.refine)((0,r.string)(),"Version",w=>(0,t.valid)(w)===null?`Expected SemVer version, got "${w}"`:!0),e.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",w=>(0,t.validRange)(w)===null?`Expected SemVer range, got "${w}"`:!0);function i(w){return(0,r.is)(w,e.VersionStruct)}e.isValidSemVerVersion=i;function s(w){return(0,r.is)(w,e.VersionRangeStruct)}e.isValidSemVerRange=s;function a(w){(0,n.assertStruct)(w,e.VersionStruct)}e.assertIsSemVerVersion=a;function l(w){(0,n.assertStruct)(w,e.VersionRangeStruct)}e.assertIsSemVerRange=l;function h(w,b){return(0,t.gt)(w,b)}e.gtVersion=h;function f(w,b){return(0,t.gtr)(w,b)}e.gtRange=f;function d(w,b){return(0,t.satisfies)(w,b,{includePrerelease:!0})}e.satisfiesVersionRange=d})(zl);(function(e){var t=J&&J.__createBinding||(Object.create?function(n,i,s,a){a===void 0&&(a=s);var l=Object.getOwnPropertyDescriptor(i,s);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,a,l)}:function(n,i,s,a){a===void 0&&(a=s),n[a]=i[s]}),r=J&&J.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(Ye,e),r(On,e),r(ce,e),r(Hi,e),r(At,e),r(Zr,e),r(Fl,e),r($n,e),r(Dl,e),r(jl,e),r(Kr,e),r(Hl,e),r(Tt,e),r(Ul,e),r(Vl,e),r(Wl,e),r(zl,e)})(wl);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.projectLogger=void 0;const t=wl;Object.defineProperty(e,"createModuleLogger",{enumerable:!0,get:function(){return t.createModuleLogger}}),e.projectLogger=(0,t.createProjectLogger)("eth-block-tracker")})(bl);var Xl=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Di,"__esModule",{value:!0});Di.PollingBlockTracker=void 0;const Ym=Xl(ao),Xm=Xl(I0),ev=Tn,Ka=bl,Qa=(0,Ka.createModuleLogger)(Ka.projectLogger,"polling-block-tracker"),tv=(0,Ym.default)(),rv=1e3;class nv extends ev.BaseBlockTracker{constructor(t={}){var r;if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},t),{blockResetDuration:(r=t.blockResetDuration)!==null&&r!==void 0?r:t.pollingInterval})),this._provider=t.provider,this._pollingInterval=t.pollingInterval||20*rv,this._retryTimeout=t.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=t.keepEventLoopActive===void 0?!0:t.keepEventLoopActive,this._setSkipCacheFlag=t.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var t;this._isRunning;)try{await this._updateLatestBlock();const r=Ya(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await r}catch(r){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:
3
+ ${(t=r.stack)!==null&&t!==void 0?t:r}`);try{this.emit("error",n)}catch{console.error(n)}const i=Ya(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await i}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:tv(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0),Qa("Making request",t);const r=await(0,Xm.default)(n=>this._provider.sendAsync(t,n))();if(Qa("Got response",r),r.error)throw new Error(`PollingBlockTracker - encountered error fetching block:
4
+ ${r.error.message}`);return r.result}}Di.PollingBlockTracker=nv;function Ya(e,t){return new Promise(r=>{const n=setTimeout(r,e);n.unref&&t&&n.unref()})}var Gi={},iv=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0});Gi.SubscribeBlockTracker=void 0;const sv=iv(ao),ov=Tn,av=(0,sv.default)();class cv extends ov.BaseBlockTracker{constructor(t={}){if(!t.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(t),this._provider=t.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const t=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(t)}catch(t){this.emit("error",t)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(t){this.emit("error",t)}}_call(t,...r){return new Promise((n,i)=>{this._provider.sendAsync({id:av(),method:t,params:r,jsonrpc:"2.0"},(s,a)=>{s?i(s):n(a.result)})})}_handleSubData(t,r){var n;r.method==="eth_subscription"&&((n=r.params)===null||n===void 0?void 0:n.subscription)===this._subscriptionId&&this._newPotentialLatest(r.params.result.number)}}Gi.SubscribeBlockTracker=cv;(function(e){var t=J&&J.__createBinding||(Object.create?function(n,i,s,a){a===void 0&&(a=s),Object.defineProperty(n,a,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,a){a===void 0&&(a=s),n[a]=i[s]}),r=J&&J.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(Di,e),r(Gi,e)})(vl);var Mo={},Zi={},Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.getUniqueId=void 0;const eu=4294967295;let Os=Math.floor(Math.random()*eu);function lv(){return Os=(Os+1)%eu,Os}Fn.getUniqueId=lv;Object.defineProperty(Zi,"__esModule",{value:!0});Zi.createIdRemapMiddleware=void 0;const uv=Fn;function hv(){return(e,t,r,n)=>{const i=e.id,s=uv.getUniqueId();e.id=s,t.id=s,r(a=>{e.id=i,t.id=i,a()})}}Zi.createIdRemapMiddleware=hv;var Ki={};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.createAsyncMiddleware=void 0;function dv(e){return async(t,r,n,i)=>{let s;const a=new Promise(d=>{s=d});let l=null,h=!1;const f=async()=>{h=!0,n(d=>{l=d,s()}),await a};try{await e(t,r,f),h?(await a,l(null)):i(null)}catch(d){l?l(d):i(d)}}}Ki.createAsyncMiddleware=dv;var Qi={};Object.defineProperty(Qi,"__esModule",{value:!0});Qi.createScaffoldMiddleware=void 0;function fv(e){return(t,r,n,i)=>{const s=e[t.method];return s===void 0?n():typeof s=="function"?s(t,r,n,i):(r.result=s,i())}}Qi.createScaffoldMiddleware=fv;var Dn={},Co={};Object.defineProperty(Co,"__esModule",{value:!0});const gv=Vr;function Xa(e,t,r){try{Reflect.apply(e,t,r)}catch(n){setTimeout(()=>{throw n})}}function pv(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}let mv=class extends gv.EventEmitter{emit(t,...r){let n=t==="error";const i=this._events;if(i!==void 0)n=n&&i.error===void 0;else if(!n)return!1;if(n){let a;if(r.length>0&&([a]=r),a instanceof Error)throw a;const l=new Error(`Unhandled error.${a?` (${a.message})`:""}`);throw l.context=a,l}const s=i[t];if(s===void 0)return!1;if(typeof s=="function")Xa(s,this,r);else{const a=s.length,l=pv(s);for(let h=0;h<a;h+=1)Xa(l[h],this,r)}return!0}};Co.default=mv;var tu={},Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.EthereumProviderError=Vt.EthereumRpcError=void 0;const vv=Ru;class ru extends Error{constructor(t,r,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,n!==void 0&&(this.data=n)}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return vv.default(this.serialize(),yv,2)}}Vt.EthereumRpcError=ru;class bv extends ru{constructor(t,r,n){if(!wv(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}}Vt.EthereumProviderError=bv;function wv(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function yv(e,t){if(t!=="[Circular]")return t}var ko={},Wt={};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.errorValues=Wt.errorCodes=void 0;Wt.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};Wt.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=Wt,r=Vt,n=t.errorCodes.rpc.internal,i="Unspecified error message. This is a bug, please report it.",s={code:n,message:a(n)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function a(b,I=i){if(Number.isInteger(b)){const O=b.toString();if(w(t.errorValues,O))return t.errorValues[O].message;if(f(b))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return I}e.getMessageFromCode=a;function l(b){if(!Number.isInteger(b))return!1;const I=b.toString();return!!(t.errorValues[I]||f(b))}e.isValidCode=l;function h(b,{fallbackError:I=s,shouldIncludeStack:O=!1}={}){var N,P;if(!I||!Number.isInteger(I.code)||typeof I.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(b instanceof r.EthereumRpcError)return b.serialize();const M={};if(b&&typeof b=="object"&&!Array.isArray(b)&&w(b,"code")&&l(b.code)){const T=b;M.code=T.code,T.message&&typeof T.message=="string"?(M.message=T.message,w(T,"data")&&(M.data=T.data)):(M.message=a(M.code),M.data={originalError:d(b)})}else{M.code=I.code;const T=(N=b)===null||N===void 0?void 0:N.message;M.message=T&&typeof T=="string"?T:I.message,M.data={originalError:d(b)}}const x=(P=b)===null||P===void 0?void 0:P.stack;return O&&b&&x&&typeof x=="string"&&(M.stack=x),M}e.serializeError=h;function f(b){return b>=-32099&&b<=-32e3}function d(b){return b&&typeof b=="object"&&!Array.isArray(b)?Object.assign({},b):b}function w(b,I){return Object.prototype.hasOwnProperty.call(b,I)}})(ko);var Yi={};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.ethErrors=void 0;const Io=Vt,nu=ko,Xe=Wt;Yi.ethErrors={rpc:{parse:e=>ut(Xe.errorCodes.rpc.parse,e),invalidRequest:e=>ut(Xe.errorCodes.rpc.invalidRequest,e),invalidParams:e=>ut(Xe.errorCodes.rpc.invalidParams,e),methodNotFound:e=>ut(Xe.errorCodes.rpc.methodNotFound,e),internal:e=>ut(Xe.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return ut(t,e)},invalidInput:e=>ut(Xe.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>ut(Xe.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>ut(Xe.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>ut(Xe.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>ut(Xe.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>ut(Xe.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>ln(Xe.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>ln(Xe.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>ln(Xe.errorCodes.provider.unsupportedMethod,e),disconnected:e=>ln(Xe.errorCodes.provider.disconnected,e),chainDisconnected:e=>ln(Xe.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new Io.EthereumProviderError(t,r,n)}}};function ut(e,t){const[r,n]=iu(t);return new Io.EthereumRpcError(e,r||nu.getMessageFromCode(e),n)}function ln(e,t){const[r,n]=iu(t);return new Io.EthereumProviderError(e,r||nu.getMessageFromCode(e),n)}function iu(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=Vt;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=ko;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=Yi;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const i=Wt;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})})(tu);var _v=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.JsonRpcEngine=void 0;const Ev=_v(Co),ht=tu;class Lt extends Ev.default{constructor(){super(),this._middleware=[]}push(t){this._middleware.push(t)}handle(t,r){if(r&&typeof r!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?r?this._handleBatch(t,r):this._handleBatch(t):r?this._handle(t,r):this._promiseHandle(t)}asMiddleware(){return async(t,r,n,i)=>{try{const[s,a,l]=await Lt._runAllMiddleware(t,r,this._middleware);return a?(await Lt._runReturnHandlers(l),i(s)):n(async h=>{try{await Lt._runReturnHandlers(l)}catch(f){return h(f)}return h()})}catch(s){return i(s)}}}async _handleBatch(t,r){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return r?r(null,n):n}catch(n){if(r)return r(n);throw n}}_promiseHandle(t){return new Promise(r=>{this._handle(t,(n,i)=>{r(i)})})}async _handle(t,r){if(!t||Array.isArray(t)||typeof t!="object"){const a=new ht.EthereumRpcError(ht.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof t}`,{request:t});return r(a,{id:void 0,jsonrpc:"2.0",error:a})}if(typeof t.method!="string"){const a=new ht.EthereumRpcError(ht.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof t.method}`,{request:t});return r(a,{id:t.id,jsonrpc:"2.0",error:a})}const n=Object.assign({},t),i={id:n.id,jsonrpc:n.jsonrpc};let s=null;try{await this._processRequest(n,i)}catch(a){s=a}return s&&(delete i.result,i.error||(i.error=ht.serializeError(s))),r(s,i)}async _processRequest(t,r){const[n,i,s]=await Lt._runAllMiddleware(t,r,this._middleware);if(Lt._checkForCompletion(t,r,i),await Lt._runReturnHandlers(s),n)throw n}static async _runAllMiddleware(t,r,n){const i=[];let s=null,a=!1;for(const l of n)if([s,a]=await Lt._runMiddleware(t,r,l,i),a)break;return[s,a,i.reverse()]}static _runMiddleware(t,r,n,i){return new Promise(s=>{const a=h=>{const f=h||r.error;f&&(r.error=ht.serializeError(f)),s([f,!0])},l=h=>{r.error?a(r.error):(h&&(typeof h!="function"&&a(new ht.EthereumRpcError(ht.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof h}" for request:
5
+ ${$s(t)}`,{request:t})),i.push(h)),s([null,!1]))};try{n(t,r,l,a)}catch(h){a(h)}})}static async _runReturnHandlers(t){for(const r of t)await new Promise((n,i)=>{r(s=>s?i(s):n())})}static _checkForCompletion(t,r,n){if(!("result"in r)&&!("error"in r))throw new ht.EthereumRpcError(ht.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:
6
+ ${$s(t)}`,{request:t});if(!n)throw new ht.EthereumRpcError(ht.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:
7
+ ${$s(t)}`,{request:t})}}Dn.JsonRpcEngine=Lt;function $s(e){return JSON.stringify(e,null,2)}var Xi={};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.mergeMiddleware=void 0;const Sv=Dn;function Rv(e){const t=new Sv.JsonRpcEngine;return e.forEach(r=>t.push(r)),t.asMiddleware()}Xi.mergeMiddleware=Rv;(function(e){var t=J&&J.__createBinding||(Object.create?function(n,i,s,a){a===void 0&&(a=s),Object.defineProperty(n,a,{enumerable:!0,get:function(){return i[s]}})}:function(n,i,s,a){a===void 0&&(a=s),n[a]=i[s]}),r=J&&J.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(Zi,e),r(Ki,e),r(Qi,e),r(Fn,e),r(Dn,e),r(Xi,e)})(Mo);var su={},xo={};const Ao=mr(hu);var es={};Object.defineProperty(es,"__esModule",{value:!0});var ec=Ao,Mv=function(){function e(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return e.prototype.acquire=function(){var t=this,r=this.isLocked(),n=new Promise(function(i){return t._queue.push(i)});return r||this._dispatch(),n},e.prototype.runExclusive=function(t){return ec.__awaiter(this,void 0,void 0,function(){var r,n,i;return ec.__generator(this,function(s){switch(s.label){case 0:return[4,this.acquire()];case 1:r=s.sent(),n=r[0],i=r[1],s.label=2;case 2:return s.trys.push([2,,4,5]),[4,t(n)];case 3:return[2,s.sent()];case 4:return i(),[7];case 5:return[2]}})})},e.prototype.isLocked=function(){return this._value<=0},e.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},e.prototype._dispatch=function(){var t=this,r=this._queue.shift();if(r){var n=!1;this._currentReleaser=function(){n||(n=!0,t._value++,t._dispatch())},r([this._value--,this._currentReleaser])}},e}();es.default=Mv;Object.defineProperty(xo,"__esModule",{value:!0});var tc=Ao,Cv=es,kv=function(){function e(){this._semaphore=new Cv.default(1)}return e.prototype.acquire=function(){return tc.__awaiter(this,void 0,void 0,function(){var t,r;return tc.__generator(this,function(n){switch(n.label){case 0:return[4,this._semaphore.acquire()];case 1:return t=n.sent(),r=t[1],[2,r]}})})},e.prototype.runExclusive=function(t){return this._semaphore.runExclusive(function(){return t()})},e.prototype.isLocked=function(){return this._semaphore.isLocked()},e.prototype.release=function(){this._semaphore.release()},e}();xo.default=kv;var ts={};Object.defineProperty(ts,"__esModule",{value:!0});ts.withTimeout=void 0;var ei=Ao;function Iv(e,t,r){var n=this;return r===void 0&&(r=new Error("timeout")),{acquire:function(){return new Promise(function(i,s){return ei.__awaiter(n,void 0,void 0,function(){var a,l,h;return ei.__generator(this,function(f){switch(f.label){case 0:return a=!1,setTimeout(function(){a=!0,s(r)},t),[4,e.acquire()];case 1:return l=f.sent(),a?(h=Array.isArray(l)?l[1]:l,h()):i(l),[2]}})})})},runExclusive:function(i){return ei.__awaiter(this,void 0,void 0,function(){var s,a;return ei.__generator(this,function(l){switch(l.label){case 0:s=function(){},l.label=1;case 1:return l.trys.push([1,,7,8]),[4,this.acquire()];case 2:return a=l.sent(),Array.isArray(a)?(s=a[1],[4,i(a[0])]):[3,4];case 3:return[2,l.sent()];case 4:return s=a,[4,i()];case 5:return[2,l.sent()];case 6:return[3,8];case 7:return s(),[7];case 8:return[2]}})})},release:function(){e.release()},isLocked:function(){return e.isLocked()}}}ts.withTimeout=Iv;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.withTimeout=e.Semaphore=e.Mutex=void 0;var t=xo;Object.defineProperty(e,"Mutex",{enumerable:!0,get:function(){return t.default}});var r=es;Object.defineProperty(e,"Semaphore",{enumerable:!0,get:function(){return r.default}});var n=ts;Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return n.withTimeout}})})(su);var xv=Tv,Av=Object.prototype.hasOwnProperty;function Tv(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)Av.call(r,n)&&(e[n]=r[n])}return e}const Nv=xv,Lv=ao();var Pv=Y;function Y(e){const t=this;t.currentProvider=e}Y.prototype.getBalance=jn(2,"eth_getBalance");Y.prototype.getCode=jn(2,"eth_getCode");Y.prototype.getTransactionCount=jn(2,"eth_getTransactionCount");Y.prototype.getStorageAt=jn(3,"eth_getStorageAt");Y.prototype.call=jn(2,"eth_call");Y.prototype.protocolVersion=ne("eth_protocolVersion");Y.prototype.syncing=ne("eth_syncing");Y.prototype.coinbase=ne("eth_coinbase");Y.prototype.mining=ne("eth_mining");Y.prototype.hashrate=ne("eth_hashrate");Y.prototype.gasPrice=ne("eth_gasPrice");Y.prototype.accounts=ne("eth_accounts");Y.prototype.blockNumber=ne("eth_blockNumber");Y.prototype.getBlockTransactionCountByHash=ne("eth_getBlockTransactionCountByHash");Y.prototype.getBlockTransactionCountByNumber=ne("eth_getBlockTransactionCountByNumber");Y.prototype.getUncleCountByBlockHash=ne("eth_getUncleCountByBlockHash");Y.prototype.getUncleCountByBlockNumber=ne("eth_getUncleCountByBlockNumber");Y.prototype.sign=ne("eth_sign");Y.prototype.sendTransaction=ne("eth_sendTransaction");Y.prototype.sendRawTransaction=ne("eth_sendRawTransaction");Y.prototype.estimateGas=ne("eth_estimateGas");Y.prototype.getBlockByHash=ne("eth_getBlockByHash");Y.prototype.getBlockByNumber=ne("eth_getBlockByNumber");Y.prototype.getTransactionByHash=ne("eth_getTransactionByHash");Y.prototype.getTransactionByBlockHashAndIndex=ne("eth_getTransactionByBlockHashAndIndex");Y.prototype.getTransactionByBlockNumberAndIndex=ne("eth_getTransactionByBlockNumberAndIndex");Y.prototype.getTransactionReceipt=ne("eth_getTransactionReceipt");Y.prototype.getUncleByBlockHashAndIndex=ne("eth_getUncleByBlockHashAndIndex");Y.prototype.getUncleByBlockNumberAndIndex=ne("eth_getUncleByBlockNumberAndIndex");Y.prototype.getCompilers=ne("eth_getCompilers");Y.prototype.compileLLL=ne("eth_compileLLL");Y.prototype.compileSolidity=ne("eth_compileSolidity");Y.prototype.compileSerpent=ne("eth_compileSerpent");Y.prototype.newFilter=ne("eth_newFilter");Y.prototype.newBlockFilter=ne("eth_newBlockFilter");Y.prototype.newPendingTransactionFilter=ne("eth_newPendingTransactionFilter");Y.prototype.uninstallFilter=ne("eth_uninstallFilter");Y.prototype.getFilterChanges=ne("eth_getFilterChanges");Y.prototype.getFilterLogs=ne("eth_getFilterLogs");Y.prototype.getLogs=ne("eth_getLogs");Y.prototype.getWork=ne("eth_getWork");Y.prototype.submitWork=ne("eth_submitWork");Y.prototype.submitHashrate=ne("eth_submitHashrate");Y.prototype.sendAsync=function(e,t){this.currentProvider.sendAsync(Ov(e),function(n,i){if(!n&&i.error&&(n=new Error("EthQuery - RPC Error - "+i.error.message)),n)return t(n);t(null,i.result)})};function ne(e){return function(){const t=this;var r=[].slice.call(arguments),n=r.pop();t.sendAsync({method:e,params:r},n)}}function jn(e,t){return function(){const r=this;var n=[].slice.call(arguments),i=n.pop();n.length<e&&n.push("latest"),r.sendAsync({method:t,params:n},i)}}function Ov(e){return Nv({id:Lv(),jsonrpc:"2.0",params:[]},e)}const rc=(e,t,r,n)=>function(...i){const s=t.promiseModule;return new s((a,l)=>{t.multiArgs?i.push((...f)=>{t.errorFirst?f[0]?l(f):(f.shift(),a(f)):a(f)}):t.errorFirst?i.push((f,d)=>{f?l(f):a(d)}):i.push(a),Reflect.apply(e,this===r?n:this,i)})},nc=new WeakMap;var $v=(e,t)=>{t={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...t};const r=typeof e;if(!(e!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${e===null?"null":r}\``);const n=(a,l)=>{let h=nc.get(a);if(h||(h={},nc.set(a,h)),l in h)return h[l];const f=O=>typeof O=="string"||typeof l=="symbol"?l===O:O.test(l),d=Reflect.getOwnPropertyDescriptor(a,l),w=d===void 0||d.writable||d.configurable,I=(t.include?t.include.some(f):!t.exclude.some(f))&&w;return h[l]=I,I},i=new WeakMap,s=new Proxy(e,{apply(a,l,h){const f=i.get(a);if(f)return Reflect.apply(f,l,h);const d=t.excludeMain?a:rc(a,t,s,a);return i.set(a,d),Reflect.apply(d,l,h)},get(a,l){const h=a[l];if(!n(a,l)||h===Function.prototype[l])return h;const f=i.get(h);if(f)return f;if(typeof h=="function"){const d=rc(h,t,s,a);return i.set(h,d),d}return h}});return s};const Bv=Nn.default;let Fv=class extends Bv{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(t){this.updates=this.updates.concat(t),t.forEach(r=>this.emit("update",r))}addInitialResults(t){}getChangesAndClear(){const t=this.updates;return this.updates=[],t}};var To=Fv;const Dv=To;let jv=class extends Dv{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(t){this.allResults=this.allResults.concat(t),super.addResults(t)}addInitialResults(t){this.allResults=this.allResults.concat(t),super.addInitialResults(t)}getAllResults(){return this.allResults}};var Hv=jv,Hn={minBlockRef:Uv,maxBlockRef:Vv,sortBlockRefs:No,bnToHex:Wv,blockRefIsNumber:zv,hexToInt:ai,incrementHexInt:qv,intToHex:ou,unsafeRandomBytes:Jv};function Uv(...e){return No(e)[0]}function Vv(...e){const t=No(e);return t[t.length-1]}function No(e){return e.sort((t,r)=>t==="latest"||r==="earliest"?1:r==="latest"||t==="earliest"?-1:ai(t)-ai(r))}function Wv(e){return"0x"+e.toString(16)}function zv(e){return e&&!["earliest","latest","pending"].includes(e)}function ai(e){return e==null?e:Number.parseInt(e,16)}function qv(e){if(e==null)return e;const t=ai(e);return ou(t+1)}function ou(e){if(e==null)return e;let t=e.toString(16);return t.length%2&&(t="0"+t),"0x"+t}function Jv(e){let t="0x";for(let r=0;r<e;r++)t+=ic(),t+=ic();return t}function ic(){return Math.floor(Math.random()*16).toString(16)}const Gv=Pv,Zv=$v,Kv=Hv,{bnToHex:hw,hexToInt:ti,incrementHexInt:Qv,minBlockRef:Yv,blockRefIsNumber:Xv}=Hn;let eb=class extends Kv{constructor({provider:t,params:r}){super(),this.type="log",this.ethQuery=new Gv(t),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},r),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map(n=>n.toLowerCase()))}async initialize({currentBlock:t}){let r=this.params.fromBlock;["latest","pending"].includes(r)&&(r=t),r==="earliest"&&(r="0x0"),this.params.fromBlock=r;const n=Yv(this.params.toBlock,t),i=Object.assign({},this.params,{toBlock:n}),s=await this._fetchLogs(i);this.addInitialResults(s)}async update({oldBlock:t,newBlock:r}){const n=r;let i;t?i=Qv(t):i=r;const s=Object.assign({},this.params,{fromBlock:i,toBlock:n}),l=(await this._fetchLogs(s)).filter(h=>this.matchLog(h));this.addResults(l)}async _fetchLogs(t){return await Zv(n=>this.ethQuery.getLogs(t,n))()}matchLog(t){if(ti(this.params.fromBlock)>=ti(t.blockNumber)||Xv(this.params.toBlock)&&ti(this.params.toBlock)<=ti(t.blockNumber))return!1;const r=t.address&&t.address.toLowerCase();return this.params.address&&r&&!this.params.address.includes(r)?!1:this.params.topics.every((i,s)=>{let a=t.topics[s];if(!a)return!1;a=a.toLowerCase();let l=Array.isArray(i)?i:[i];return l.includes(null)?!0:(l=l.map(d=>d.toLowerCase()),l.includes(a))})}};var tb=eb,Lo=rb;async function rb({provider:e,fromBlock:t,toBlock:r}){t||(t=r);const n=sc(t),s=sc(r)-n+1,a=Array(s).fill().map((h,f)=>n+f).map(nb);let l=await Promise.all(a.map(h=>sb(e,"eth_getBlockByNumber",[h,!1])));return l=l.filter(h=>h!==null),l}function sc(e){return e==null?e:Number.parseInt(e,16)}function nb(e){return e==null?e:"0x"+e.toString(16)}function ib(e,t){return new Promise((r,n)=>{e.sendAsync(t,(i,s)=>{i?n(i):s.error?n(s.error):s.result?r(s.result):n(new Error("Result was empty"))})})}async function sb(e,t,r){for(let n=0;n<3;n++)try{return await ib(e,{id:1,jsonrpc:"2.0",method:t,params:r})}catch(i){console.error(`provider.sendAsync failed: ${i.stack||i.message||i}`)}return null}const ob=To,ab=Lo,{incrementHexInt:cb}=Hn;let lb=class extends ob{constructor({provider:t,params:r}){super(),this.type="block",this.provider=t}async update({oldBlock:t,newBlock:r}){const n=r,i=cb(t),a=(await ab({provider:this.provider,fromBlock:i,toBlock:n})).map(l=>l.hash);this.addResults(a)}};var ub=lb;const hb=To,db=Lo,{incrementHexInt:fb}=Hn;let gb=class extends hb{constructor({provider:t}){super(),this.type="tx",this.provider=t}async update({oldBlock:t}){const r=t,n=fb(t),i=await db({provider:this.provider,fromBlock:n,toBlock:r}),s=[];for(const a of i)s.push(...a.transactions);this.addResults(s)}};var pb=gb;const mb=su.Mutex,{createAsyncMiddleware:vb,createScaffoldMiddleware:bb}=Mo,wb=tb,yb=ub,_b=pb,{intToHex:au,hexToInt:Bs}=Hn;var Eb=Sb;function Sb({blockTracker:e,provider:t}){let r=0,n={};const i=new mb,s=Rb({mutex:i}),a=bb({eth_newFilter:s(Fs(h)),eth_newBlockFilter:s(Fs(f)),eth_newPendingTransactionFilter:s(Fs(d)),eth_uninstallFilter:s(ii(I)),eth_getFilterChanges:s(ii(w)),eth_getFilterLogs:s(ii(b))}),l=async({oldBlock:x,newBlock:T})=>{if(n.length===0)return;const $=await i.acquire();try{await Promise.all($r(n).map(async L=>{try{await L.update({oldBlock:x,newBlock:T})}catch(F){console.error(F)}}))}catch(L){console.error(L)}$()};return a.newLogFilter=h,a.newBlockFilter=f,a.newPendingTransactionFilter=d,a.uninstallFilter=I,a.getFilterChanges=w,a.getFilterLogs=b,a.destroy=()=>{P()},a;async function h(x){const T=new wb({provider:t,params:x});return await O(T),T}async function f(){const x=new yb({provider:t});return await O(x),x}async function d(){const x=new _b({provider:t});return await O(x),x}async function w(x){const T=Bs(x),$=n[T];if(!$)throw new Error(`No filter for index "${T}"`);return $.getChangesAndClear()}async function b(x){const T=Bs(x),$=n[T];if(!$)throw new Error(`No filter for index "${T}"`);let L=[];return $.type==="log"&&(L=$.getAllResults()),L}async function I(x){const T=Bs(x),L=!!n[T];return L&&await N(T),L}async function O(x){const T=$r(n).length,$=await e.getLatestBlock();await x.initialize({currentBlock:$}),r++,n[r]=x,x.id=r,x.idHex=au(r);const L=$r(n).length;return M({prevFilterCount:T,newFilterCount:L}),r}async function N(x){const T=$r(n).length;delete n[x];const $=$r(n).length;M({prevFilterCount:T,newFilterCount:$})}async function P(){const x=$r(n).length;n={},M({prevFilterCount:x,newFilterCount:0})}function M({prevFilterCount:x,newFilterCount:T}){if(x===0&&T>0){e.on("sync",l);return}if(x>0&&T===0){e.removeListener("sync",l);return}}}function Fs(e){return ii(async(...t)=>{const r=await e(...t);return au(r.id)})}function ii(e){return vb(async(t,r)=>{const n=await e.apply(null,t.params);r.result=n})}function Rb({mutex:e}){return t=>async(r,n,i,s)=>{(await e.acquire())(),t(r,n,i,s)}}function $r(e,t){const r=[];for(let n in e)r.push(e[n]);return r}const Mb=Nn.default,{createAsyncMiddleware:oc,createScaffoldMiddleware:Cb}=Mo,kb=Eb,{unsafeRandomBytes:Ib,incrementHexInt:xb}=Hn,Ab=Lo;var Tb=Nb;function Nb({blockTracker:e,provider:t}){const r={},n=kb({blockTracker:e,provider:t});let i=!1;const s=new Mb,a=Cb({eth_subscribe:oc(l),eth_unsubscribe:oc(h)});return a.destroy=d,{events:s,middleware:a};async function l(w,b){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");const I=w.params[0],O=Ib(16);let N;switch(I){case"newHeads":N=P({subId:O});break;case"logs":const x=w.params[1],T=await n.newLogFilter(x);N=M({subId:O,filter:T});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${I}"`)}r[O]=N,b.result=O;return;function P({subId:x}){const T={type:I,destroy:async()=>{e.removeListener("sync",T.update)},update:async({oldBlock:$,newBlock:L})=>{const F=L,G=xb($);(await Ab({provider:t,fromBlock:G,toBlock:F})).map(Lb).filter(ie=>ie!==null).forEach(ie=>{f(x,ie)})}};return e.on("sync",T.update),T}function M({subId:x,filter:T}){return T.on("update",L=>f(x,L)),{type:I,destroy:async()=>await n.uninstallFilter(T.idHex)}}}async function h(w,b){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");const I=w.params[0],O=r[I];if(!O){b.result=!1;return}delete r[I],await O.destroy(),b.result=!0}function f(w,b){s.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:w,result:b}})}function d(){s.removeAllListeners();for(const w in r)r[w].destroy(),delete r[w];i=!0}}function Lb(e){return e==null?null:{hash:e.hash,parentHash:e.parentHash,sha3Uncles:e.sha3Uncles,miner:e.miner,stateRoot:e.stateRoot,transactionsRoot:e.transactionsRoot,receiptsRoot:e.receiptsRoot,logsBloom:e.logsBloom,difficulty:e.difficulty,number:e.number,gasLimit:e.gasLimit,gasUsed:e.gasUsed,nonce:e.nonce,mixHash:e.mixHash,timestamp:e.timestamp,extraData:e.extraData}}Object.defineProperty(Fi,"__esModule",{value:!0});Fi.SubscriptionManager=void 0;const Pb=vl,Ob=Tb,ac=()=>{};class $b{constructor(t){const r=new Pb.PollingBlockTracker({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:i}=Ob({blockTracker:r,provider:t});this.events=n,this.subscriptionMiddleware=i}async handleRequest(t){const r={};return await this.subscriptionMiddleware(t,r,ac,ac),r}destroy(){this.subscriptionMiddleware.destroy()}}Fi.SubscriptionManager=$b;var cu=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wr,"__esModule",{value:!0});Wr.CoinbaseWalletProvider=void 0;const Bb=cu(ui),Fb=th,oe=vn,te=z,Db=_n,cc=dt,ri=en,ot=Qr,Ds=cu(S0),un=Xr,jb=Gr,Hb=Fi,lc="DefaultChainId",uc="DefaultJsonRpcUrl";class Ub extends Fb.EventEmitter{constructor(t){var r,n;super(),this._filterPolyfill=new jb.FilterPolyfill(this),this._subscriptionManager=new Hb.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=t.chainId,this._jsonRpcUrlFromOpts=t.jsonRpcUrl,this._overrideIsMetaMask=t.overrideIsMetaMask,this._relayProvider=t.relayProvider,this._storage=t.storage,this._relayEventManager=t.relayEventManager,this.diagnostic=t.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=(r=t.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this.isCoinbaseBrowser=(n=t.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this.qrUrl=t.qrUrl;const i=this.getChainId(),s=(0,te.prepend0x)(i.toString(16));this.emit("connect",{chainIdStr:s});const a=this._storage.getItem(cc.LOCAL_STORAGE_ADDRESSES_KEY);if(a){const l=a.split(" ");l[0]!==""&&(this._addresses=l.map(h=>(0,te.ensureAddressString)(h)),this.emit("accountsChanged",l))}this._subscriptionManager.events.on("notification",l=>{this.emit("message",{type:l.method,data:l.params})}),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",l=>{var h;if(!(l.origin!==location.origin||l.source!==window)&&l.data.type==="walletLinkMessage"&&l.data.data.action==="dappChainSwitched"){const f=l.data.data.chainId,d=(h=l.data.data.jsonRpcUrl)!==null&&h!==void 0?h:this.jsonRpcUrl;this.updateProviderInfo(d,Number(f))}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,te.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var t;return(t=this._storage.getItem(uc))!==null&&t!==void 0?t:this._jsonRpcUrlFromOpts}set jsonRpcUrl(t){this._storage.setItem(uc,t)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(t,r){this.isCoinbaseBrowser||(this._chainIdFromOpts=r,this._jsonRpcUrlFromOpts=t),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(t,r){this.jsonRpcUrl=t;const n=this.getChainId();this._storage.setItem(lc,r.toString(10)),((0,te.ensureIntNumber)(r)!==n||!this.hasMadeFirstChainChangedEmission)&&(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(t,r,n,i,s,a){const h=await(await this.initializeRelay()).watchAsset(t,r,n,i,s,a?.toString()).promise;return(0,ot.isErrorResponse)(h)?!1:!!h.result}async addEthereumChain(t,r,n,i,s,a){var l,h;if((0,te.ensureIntNumber)(t)===this.getChainId())return!1;const f=await this.initializeRelay(),d=f.inlineAddEthereumChain(t.toString());!this._isAuthorized()&&!d&&await f.requestEthereumAccounts().promise;const w=await f.addEthereumChain(t.toString(),r,s,n,i,a).promise;return(0,ot.isErrorResponse)(w)?!1:(((l=w.result)===null||l===void 0?void 0:l.isApproved)===!0&&this.updateProviderInfo(r[0],t),((h=w.result)===null||h===void 0?void 0:h.isApproved)===!0)}async switchEthereumChain(t){const n=await(await this.initializeRelay()).switchEthereumChain(t.toString(10),this.selectedAddress||void 0).promise;if((0,ot.isErrorResponse)(n)){if(!n.errorCode)return;throw n.errorCode===oe.standardErrorCodes.provider.unsupportedChain?oe.standardErrors.provider.unsupportedChain():oe.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode})}const i=n.result;i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,t)}setAppInfo(t,r){this.initializeRelay().then(n=>n.setAppInfo(t,r))}async enable(){var t;return(t=this.diagnostic)===null||t===void 0||t.log(un.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?ri.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send("eth_requestAccounts")}async close(){(await this.initializeRelay()).resetAndReload()}send(t,r){try{const n=this._send(t,r);if(n instanceof Promise)return n.catch(i=>{throw(0,oe.serializeError)(i,t)})}catch(n){throw(0,oe.serializeError)(n,t)}}_send(t,r){if(typeof t=="string"){const i=t,s=Array.isArray(r)?r:r!==void 0?[r]:[],a={jsonrpc:"2.0",id:0,method:i,params:s};return this._sendRequestAsync(a).then(l=>l.result)}if(typeof r=="function"){const i=t,s=r;return this._sendAsync(i,s)}if(Array.isArray(t))return t.map(s=>this._sendRequest(s));const n=t;return this._sendRequest(n)}async sendAsync(t,r){try{return this._sendAsync(t,r).catch(n=>{throw(0,oe.serializeError)(n,t)})}catch(n){return Promise.reject((0,oe.serializeError)(n,t))}}async _sendAsync(t,r){if(typeof r!="function")throw new Error("callback is required");if(Array.isArray(t)){const i=r;this._sendMultipleRequestsAsync(t).then(s=>i(null,s)).catch(s=>i(s,null));return}const n=r;return this._sendRequestAsync(t).then(i=>n(null,i)).catch(i=>n(i,null))}async request(t){try{return this._request(t).catch(r=>{throw(0,oe.serializeError)(r,t.method)})}catch(r){return Promise.reject((0,oe.serializeError)(r,t.method))}}async _request(t){if(!t||typeof t!="object"||Array.isArray(t))throw oe.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:t});const{method:r,params:n}=t;if(typeof r!="string"||r.length===0)throw oe.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:t});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw oe.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:t});const i=n===void 0?[]:n,s=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:r,params:i,jsonrpc:"2.0",id:s})).result}async scanQRCode(t){const n=await(await this.initializeRelay()).scanQRCode((0,te.ensureRegExpString)(t)).promise;if((0,ot.isErrorResponse)(n))throw(0,oe.serializeError)(n.errorMessage,"scanQRCode");if(typeof n.result!="string")throw(0,oe.serializeError)("result was not a string","scanQRCode");return n.result}async genericRequest(t,r){const i=await(await this.initializeRelay()).genericRequest(t,r).promise;if((0,ot.isErrorResponse)(i))throw(0,oe.serializeError)(i.errorMessage,"generic");if(typeof i.result!="string")throw(0,oe.serializeError)("result was not a string","generic");return i.result}async connectAndSignIn(t){var r;(r=this.diagnostic)===null||r===void 0||r.log(un.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::connectAndSignIn",sessionIdHash:this._relay?ri.Session.hash(this._relay.session.id):void 0});let n;try{const s=await this.initializeRelay();if(!(s instanceof Db.MobileRelay))throw new Error("connectAndSignIn is only supported on mobile");if(n=await s.connectAndSignIn(t).promise,(0,ot.isErrorResponse)(n))throw new Error(n.errorMessage)}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?oe.standardErrors.provider.userRejectedRequest("User denied account authorization"):s}if(!n.result)throw new Error("accounts received is empty");const{accounts:i}=n.result;return this._setAddresses(i),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),n.result}async selectProvider(t){const n=await(await this.initializeRelay()).selectProvider(t).promise;if((0,ot.isErrorResponse)(n))throw(0,oe.serializeError)(n.errorMessage,"selectProvider");if(typeof n.result!="string")throw(0,oe.serializeError)("result was not a string","selectProvider");return n.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(t){const r={jsonrpc:"2.0",id:t.id},{method:n}=t;if(r.result=this._handleSynchronousMethods(t),r.result===void 0)throw new Error(`Coinbase Wallet does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return r}_setAddresses(t,r){if(!Array.isArray(t))throw new Error("addresses is not an array");const n=t.map(i=>(0,te.ensureAddressString)(i));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(cc.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" ")))}_sendRequestAsync(t){return new Promise((r,n)=>{try{const i=this._handleSynchronousMethods(t);if(i!==void 0)return r({jsonrpc:"2.0",id:t.id,result:i});const s=this._handleAsynchronousFilterMethods(t);if(s!==void 0){s.then(l=>r(Object.assign(Object.assign({},l),{id:t.id}))).catch(l=>n(l));return}const a=this._handleSubscriptionMethods(t);if(a!==void 0){a.then(l=>r({jsonrpc:"2.0",id:t.id,result:l.result})).catch(l=>n(l));return}}catch(i){return n(i)}this._handleAsynchronousMethods(t).then(i=>i&&r(Object.assign(Object.assign({},i),{id:t.id}))).catch(i=>n(i))})}_sendMultipleRequestsAsync(t){return Promise.all(t.map(r=>this._sendRequestAsync(r)))}_handleSynchronousMethods(t){const{method:r}=t,n=t.params||[];switch(r){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"eth_uninstallFilter":return this._eth_uninstallFilter(n);case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(t){const{method:r}=t,n=t.params||[];switch(r){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(n);case"eth_ecRecover":return this._eth_ecRecover(n);case"personal_sign":return this._personal_sign(n);case"personal_ecRecover":return this._personal_ecRecover(n);case"eth_signTransaction":return this._eth_signTransaction(n);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(n);case"eth_sendTransaction":return this._eth_sendTransaction(n);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(n);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(n);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(n);case"cbWallet_arbitrary":return this._cbwallet_arbitrary(n);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(n);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(n);case"wallet_watchAsset":return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(t,this.jsonRpcUrl).catch(s=>{var a;throw(s.code===oe.standardErrorCodes.rpc.methodNotFound||s.code===oe.standardErrorCodes.rpc.methodNotSupported)&&((a=this.diagnostic)===null||a===void 0||a.log(un.EVENTS.METHOD_NOT_IMPLEMENTED,{method:t.method,sessionIdHash:this._relay?ri.Session.hash(this._relay.session.id):void 0})),s})}_handleAsynchronousFilterMethods(t){const{method:r}=t,n=t.params||[];switch(r){case"eth_newFilter":return this._eth_newFilter(n);case"eth_newBlockFilter":return this._eth_newBlockFilter();case"eth_newPendingTransactionFilter":return this._eth_newPendingTransactionFilter();case"eth_getFilterChanges":return this._eth_getFilterChanges(n);case"eth_getFilterLogs":return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(t){switch(t.method){case"eth_subscribe":case"eth_unsubscribe":return this._subscriptionManager.handleRequest(t)}}_isKnownAddress(t){try{const r=(0,te.ensureAddressString)(t);return this._addresses.map(i=>(0,te.ensureAddressString)(i)).includes(r)}catch{}return!1}_ensureKnownAddress(t){var r;if(!this._isKnownAddress(t))throw(r=this.diagnostic)===null||r===void 0||r.log(un.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(t){const r=t.from?(0,te.ensureAddressString)(t.from):this.selectedAddress;if(!r)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(r);const n=t.to?(0,te.ensureAddressString)(t.to):null,i=t.value!=null?(0,te.ensureBN)(t.value):new Bb.default(0),s=t.data?(0,te.ensureBuffer)(t.data):re.alloc(0),a=t.nonce!=null?(0,te.ensureIntNumber)(t.nonce):null,l=t.gasPrice!=null?(0,te.ensureBN)(t.gasPrice):null,h=t.maxFeePerGas!=null?(0,te.ensureBN)(t.maxFeePerGas):null,f=t.maxPriorityFeePerGas!=null?(0,te.ensureBN)(t.maxPriorityFeePerGas):null,d=t.gas!=null?(0,te.ensureBN)(t.gas):null,w=t.chainId?(0,te.ensureIntNumber)(t.chainId):this.getChainId();return{fromAddress:r,toAddress:n,weiValue:i,data:s,nonce:a,gasPriceInWei:l,maxFeePerGas:h,maxPriorityFeePerGas:f,gasLimit:d,chainId:w}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw oe.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw oe.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(t,r,n,i){this._ensureKnownAddress(r);try{const a=await(await this.initializeRelay()).signEthereumMessage(t,r,n,i).promise;if((0,ot.isErrorResponse)(a))throw new Error(a.errorMessage);return{jsonrpc:"2.0",id:0,result:a.result}}catch(s){throw typeof s.message=="string"&&s.message.match(/(denied|rejected)/i)?oe.standardErrors.provider.userRejectedRequest("User denied message signature"):s}}async _ethereumAddressFromSignedMessage(t,r,n){const s=await(await this.initializeRelay()).ethereumAddressFromSignedMessage(t,r,n).promise;if((0,ot.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,te.hexStringFromIntNumber)(this.getChainId())}getChainId(){const t=this._storage.getItem(lc);if(!t)return(0,te.ensureIntNumber)(this._chainIdFromOpts);const r=parseInt(t,10);return(0,te.ensureIntNumber)(r)}async _eth_requestAccounts(){var t;if((t=this.diagnostic)===null||t===void 0||t.log(un.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?ri.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let r;try{if(r=await(await this.initializeRelay()).requestEthereumAccounts().promise,(0,ot.isErrorResponse)(r))throw new Error(r.errorMessage)}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?oe.standardErrors.provider.userRejectedRequest("User denied account authorization"):n}if(!r.result)throw new Error("accounts received is empty");return this._setAddresses(r.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(t){this._requireAuthorization();const r=(0,te.ensureAddressString)(t[0]),n=(0,te.ensureBuffer)(t[1]);return this._signEthereumMessage(n,r,!1)}_eth_ecRecover(t){const r=(0,te.ensureBuffer)(t[0]),n=(0,te.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(r,n,!1)}_personal_sign(t){this._requireAuthorization();const r=(0,te.ensureBuffer)(t[0]),n=(0,te.ensureAddressString)(t[1]);return this._signEthereumMessage(r,n,!0)}_personal_ecRecover(t){const r=(0,te.ensureBuffer)(t[0]),n=(0,te.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(r,n,!0)}async _eth_signTransaction(t){this._requireAuthorization();const r=this._prepareTransactionParams(t[0]||{});try{const i=await(await this.initializeRelay()).signEthereumTransaction(r).promise;if((0,ot.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?oe.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_sendRawTransaction(t){const r=(0,te.ensureBuffer)(t[0]),i=await(await this.initializeRelay()).submitEthereumTransaction(r,this.getChainId()).promise;if((0,ot.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}async _eth_sendTransaction(t){this._requireAuthorization();const r=this._prepareTransactionParams(t[0]||{});try{const i=await(await this.initializeRelay()).signAndSubmitEthereumTransaction(r).promise;if((0,ot.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?oe.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_signTypedData_v1(t){this._requireAuthorization();const r=(0,te.ensureParsedJSONObject)(t[0]),n=(0,te.ensureAddressString)(t[1]);this._ensureKnownAddress(n);const i=Ds.default.hashForSignTypedDataLegacy({data:r}),s=JSON.stringify(r,null,2);return this._signEthereumMessage(i,n,!1,s)}async _eth_signTypedData_v3(t){this._requireAuthorization();const r=(0,te.ensureAddressString)(t[0]),n=(0,te.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(r);const i=Ds.default.hashForSignTypedData_v3({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,s)}async _eth_signTypedData_v4(t){this._requireAuthorization();const r=(0,te.ensureAddressString)(t[0]),n=(0,te.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(r);const i=Ds.default.hashForSignTypedData_v4({data:n}),s=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,s)}async _cbwallet_arbitrary(t){const r=t[0],n=t[1];if(typeof n!="string")throw new Error("parameter must be a string");if(typeof r!="object"||r===null)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(r,n)}}async _wallet_addEthereumChain(t){var r,n,i,s;const a=t[0];if(((r=a.rpcUrls)===null||r===void 0?void 0:r.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!a.chainName||a.chainName.trim()==="")throw oe.standardErrors.rpc.invalidParams("chainName is a required field");if(!a.nativeCurrency)throw oe.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const l=parseInt(a.chainId,16);return await this.addEthereumChain(l,(n=a.rpcUrls)!==null&&n!==void 0?n:[],(i=a.blockExplorerUrls)!==null&&i!==void 0?i:[],a.chainName,(s=a.iconUrls)!==null&&s!==void 0?s:[],a.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(t){const r=t[0];return await this.switchEthereumChain(parseInt(r.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(t){const r=Array.isArray(t)?t[0]:t;if(!r.type)throw oe.standardErrors.rpc.invalidParams("Type is required");if(r?.type!=="ERC20")throw oe.standardErrors.rpc.invalidParams(`Asset of type '${r.type}' is not supported`);if(!r?.options)throw oe.standardErrors.rpc.invalidParams("Options are required");if(!r?.options.address)throw oe.standardErrors.rpc.invalidParams("Address is required");const n=this.getChainId(),{address:i,symbol:s,image:a,decimals:l}=r.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(r.type,i,s,l,a,n)}}_eth_uninstallFilter(t){const r=(0,te.ensureHexString)(t[0]);return this._filterPolyfill.uninstallFilter(r)}async _eth_newFilter(t){const r=t[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(r)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(t){const r=(0,te.ensureHexString)(t[0]);return this._filterPolyfill.getFilterChanges(r)}_eth_getFilterLogs(t){const r=(0,te.ensureHexString)(t[0]);return this._filterPolyfill.getFilterLogs(r)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(t=>(t.setAccountsCallback((r,n)=>this._setAddresses(r,n)),t.setChainCallback((r,n)=>{this.updateProviderInfo(n,parseInt(r,10))}),t.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=t,t))}}Wr.CoinbaseWalletProvider=Ub;var rs={};Object.defineProperty(rs,"__esModule",{value:!0});rs.RelayEventManager=void 0;const Vb=z;class Wb{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const t=this._nextRequestId,r=(0,Vb.prepend0x)(t.toString(16));return this.callbacks.get(r)&&this.callbacks.delete(r),t}}rs.RelayEventManager=Wb;Object.defineProperty(fn,"__esModule",{value:!0});fn.CoinbaseWalletSDK=void 0;const zb=ci,qb=li,hc=z,Jb=pi,Gb=Wr,Zb=_n,Kb=An,Qb=rs,Yb=kn,Xb=En,lu=Yr;class ns{constructor(t){var r,n,i;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const s=t.linkAPIUrl||qb.LINK_API_URL;typeof t.overrideIsMetaMask>"u"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=t.overrideIsMetaMask,this._overrideIsCoinbaseWallet=(r=t.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this._overrideIsCoinbaseBrowser=(n=t.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this._diagnosticLogger=t.diagnosticLogger,this._reloadOnDisconnect=(i=t.reloadOnDisconnect)!==null&&i!==void 0?i:!0;const a=new URL(s),l=`${a.protocol}//${a.host}`;if(this._storage=new Jb.ScopedLocalStorage(`-walletlink:${l}`),this._storage.setItem("version",ns.VERSION),this.walletExtension||this.coinbaseBrowser)return;this._relayEventManager=new Qb.RelayEventManager;const h=(0,hc.isMobileWeb)(),f=t.uiConstructor||(w=>h?new Kb.MobileRelayUI(w):new Yb.WalletLinkRelayUI(w)),d={linkAPIUrl:s,version:lu.LIB_VERSION,darkMode:!!t.darkMode,headlessMode:!!t.headlessMode,uiConstructor:f,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect,enableMobileWalletLink:t.enableMobileWalletLink};this._relay=h?new Zb.MobileRelay(d):new Xb.WalletLinkRelay(d),this.setAppInfo(t.appName,t.appLogoUrl),!t.headlessMode&&this._relay.attachUI()}makeWeb3Provider(t="",r=1){const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(t,r),this._reloadOnDisconnect===!1&&typeof n.disableReloadOnDisconnect=="function"&&n.disableReloadOnDisconnect(),n;const i=this.coinbaseBrowser;if(i)return i;const s=this._relay;if(!s||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return t||s.setConnectDisabled(!0),new Gb.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(s),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:t,chainId:r,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(t,r){var n;this._appName=t||"DApp",this._appLogoUrl=r||(0,hc.getFavicon)();const i=this.walletExtension;i?this.isCipherProvider(i)||i.setAppInfo(this._appName,this._appLogoUrl):(n=this._relay)===null||n===void 0||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var t;const r=this===null||this===void 0?void 0:this.walletExtension;r?r.close():(t=this._relay)===null||t===void 0||t.resetAndReload()}getQrUrl(){var t,r;return(r=(t=this._relay)===null||t===void 0?void 0:t.getQRCodeUrl())!==null&&r!==void 0?r:null}getCoinbaseWalletLogo(t,r=240){return(0,zb.walletLogo)(t,r)}get walletExtension(){var t;return(t=window.coinbaseWalletExtension)!==null&&t!==void 0?t:window.walletLinkExtension}get coinbaseBrowser(){var t,r;try{const n=(t=window.ethereum)!==null&&t!==void 0?t:(r=window.top)===null||r===void 0?void 0:r.ethereum;return n&&"isCoinbaseBrowser"in n&&n.isCoinbaseBrowser?n:void 0}catch{return}}isCipherProvider(t){return typeof t.isCipher=="boolean"&&t.isCipher}}fn.CoinbaseWalletSDK=ns;ns.VERSION=lu.LIB_VERSION;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;const t=fn,r=Wr;var n=fn;Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return n.CoinbaseWalletSDK}});var i=Wr;Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return i.CoinbaseWalletProvider}}),e.default=t.CoinbaseWalletSDK,typeof window<"u"&&(window.CoinbaseWalletSDK=t.CoinbaseWalletSDK,window.CoinbaseWalletProvider=r.CoinbaseWalletProvider,window.WalletLink=t.CoinbaseWalletSDK,window.WalletLinkProvider=r.CoinbaseWalletProvider)})(mc);const ew=du(mc),pw=Object.freeze(Object.defineProperty({__proto__:null,default:ew},Symbol.toStringTag,{value:"Module"}));export{pw as i};