@wormhole-foundation/wormhole-connect 2.4.0-beta.3-development → 2.4.0-beta.4-development

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 (111) hide show
  1. package/dist/assets/{aptos-BaxuZv2A.js → aptos-C2a0dQjT.js} +2 -2
  2. package/dist/assets/{ccip-Br2IvhSW.js → ccip-OC0Vc4gm.js} +1 -1
  3. package/dist/assets/events-7fnqQH7x.js +1 -0
  4. package/dist/assets/{evm-CEkHuuN5.js → evm-BqmuByVY.js} +3 -3
  5. package/dist/assets/{evm-DajrgWJp.js → evm-DVLSeRFU.js} +2 -2
  6. package/dist/assets/{index-D1RqQWR4.js → index-BIdhtTCf.js} +1 -1
  7. package/dist/assets/{index-DVzhMXXA.js → index-BVlgnsQb.js} +1 -1
  8. package/dist/assets/{index-ndTMsj-g.js → index-BZDxvV4g.js} +1 -1
  9. package/dist/assets/{index-B8SSPOGN.js → index-BeEE7MyN.js} +1 -1
  10. package/dist/assets/{index-z2SBICrL.js → index-C-kVvSEJ.js} +1 -1
  11. package/dist/assets/{index-Zgbd9ue1.js → index-C1Dta-NJ.js} +1 -1
  12. package/dist/assets/{index-BWKZaYh0.js → index-CB3XpWtg.js} +1 -1
  13. package/dist/assets/{index-ylKZk0sO.js → index-CBMmMx3W.js} +1 -1
  14. package/dist/assets/{index-BGgxsbk4.js → index-CODUkWzQ.js} +1 -1
  15. package/dist/assets/{index-DnDUIJZk.js → index-COKaKwn8.js} +1 -1
  16. package/dist/assets/{index-BxMnYxyf.js → index-CvqWMPrS.js} +1 -1
  17. package/dist/assets/{index-DwbsyLxo.js → index-Dcsj5S2N.js} +1 -1
  18. package/dist/assets/{index-ICy6eYwP.js → index-M4NDMEge.js} +1 -1
  19. package/dist/assets/{index-CIIbEJG8.js → index-PnI0Le4b.js} +1 -1
  20. package/dist/assets/{index-BIKKjy76.js → index-iO-U9jSW.js} +2 -2
  21. package/dist/assets/index-n50xdA-U.js +1 -0
  22. package/dist/assets/{index.es-AACkekVm.js → index.es-j8vEfzbO.js} +6 -6
  23. package/dist/assets/solana-D-pftkkJ.js +2 -0
  24. package/dist/assets/{solana-Cli5bij_.js → solana-pOvS3swt.js} +2 -2
  25. package/dist/assets/solanaEmbed.esm-DPIgn-PE.js +37 -0
  26. package/dist/assets/{sui-76yNbUUP.js → sui-DZhbOaP_.js} +2 -2
  27. package/dist/main.js +106 -106
  28. package/dist/src/views/v2/Redeem/index.d.ts.map +1 -1
  29. package/lib/{aptos-cEXzuL5b.mjs → aptos-CkWuq_27.mjs} +2 -2
  30. package/lib/{aptos-CSvcKEJm.js → aptos-DU1D2bsY.js} +1 -1
  31. package/lib/{aptos-WpCc6eOD.js → aptos-TTV2w234.js} +2 -2
  32. package/lib/{aptos-D3RPZgif.mjs → aptos-qwmh1AJp.mjs} +5 -5
  33. package/lib/{base64-C73YLbqA.js → base64-CkebPGW0.js} +1 -1
  34. package/lib/{base64-D3sIs-fw.mjs → base64-r6lIUfD-.mjs} +1 -1
  35. package/lib/{ccip-BJTawxQ_.mjs → ccip-D869mIiq.mjs} +1 -1
  36. package/lib/{ccip-CaksatNz.js → ccip-DdUs_h_I.js} +1 -1
  37. package/lib/{chunk-IMTC3J2M-Dsnj4Vih.mjs → chunk-IMTC3J2M-CSrenBj8.mjs} +3 -3
  38. package/lib/{chunk-IMTC3J2M-DKXvnM6O.js → chunk-IMTC3J2M-rihZh7hM.js} +1 -1
  39. package/lib/{evm-D_aPV3AL.mjs → evm-BCvj1OtP.mjs} +6 -6
  40. package/lib/{evm-Wv2nh7z1.js → evm-Bj5TkyBv.js} +3 -3
  41. package/lib/{evm-Bs0OjXvE.mjs → evm-BtEIk2Ro.mjs} +5 -5
  42. package/lib/{evm-DNBYBo_p.js → evm-Df4WZQgF.js} +1 -1
  43. package/lib/{index-DCRe22Ms.js → index-20yIH7p6.js} +1 -1
  44. package/lib/{index-D0NbpzAg.mjs → index-B3Lgw0sO.mjs} +1 -1
  45. package/lib/{index-Bx5QNYj7.mjs → index-BL_uPuTy.mjs} +1 -1
  46. package/lib/{index-BCrWCNUq.js → index-BOtebTDA.js} +1 -1
  47. package/lib/{index-Ci0LEPmE.mjs → index-BXHY_Wc_.mjs} +2 -2
  48. package/lib/{index-q570DLLo.mjs → index-BfQHVxEi.mjs} +2 -2
  49. package/lib/{index-DLeUCqIq.js → index-BnQbapb-.js} +1 -1
  50. package/lib/{index-BZpnoMd1.js → index-BnvAiffX.js} +1 -1
  51. package/lib/{index-CUSJAO56.js → index-C-9QGhXS.js} +1 -1
  52. package/lib/{index-CjgM-0OC.js → index-C0UDZaND.js} +1 -1
  53. package/lib/{index-DGGMUOzp.mjs → index-C2w2yYzm.mjs} +3 -3
  54. package/lib/{index-BpKxYGa-.mjs → index-C54QUs8N.mjs} +2 -2
  55. package/lib/{index-BvdMRpl6.js → index-C6Oecme5.js} +1 -1
  56. package/lib/{index-BtA_-iXv.mjs → index-CBM9cmhA.mjs} +2 -2
  57. package/lib/{index-DYrT7_2n.mjs → index-CCJUXjWs.mjs} +1 -1
  58. package/lib/{index-DS_rORqD.mjs → index-CIWjtrm4.mjs} +1 -1
  59. package/lib/{index-D7f2-3wk.js → index-CZi3G6c5.js} +1 -1
  60. package/lib/{index-9pPnVz73.mjs → index-Cf6wneHs.mjs} +2 -2
  61. package/lib/{index-C6Hp_1yF.js → index-ChLwWlxD.js} +1 -1
  62. package/lib/{index-ZK1P1tUH.js → index-Cn5RoB2l.js} +1 -1
  63. package/lib/{index-v-_ti7Rn.js → index-CskmLcFl.js} +1 -1
  64. package/lib/{index-BeGnKztN.js → index-Cv_SfKSZ.js} +1 -1
  65. package/lib/{index-BH-EfOl1.js → index-CxOOdI6c.js} +1 -1
  66. package/lib/{index-DfPjBy3w.mjs → index-CxnykIim.mjs} +1 -1
  67. package/lib/{index-DRYbBPuh.mjs → index-D5jQOGNt.mjs} +2 -2
  68. package/lib/{index-CMw2Uill.js → index-D8mnxtTR.js} +1 -1
  69. package/lib/{index-BrFIzqtL.js → index-DG9DA23c.js} +1 -1
  70. package/lib/{index-e3oHdOB4.mjs → index-DIdfi9U5.mjs} +1 -1
  71. package/lib/{index--95bwciz.js → index-DNGByy1S.js} +1 -1
  72. package/lib/{index-B2VBT3u7.mjs → index-DOLtniOC.mjs} +2 -2
  73. package/lib/{index-DqRhhSXa.mjs → index-DS1lD1iG.mjs} +2 -2
  74. package/lib/{index-Cvtp4dgE.js → index-DU1he9Nx.js} +5 -5
  75. package/lib/{index-D19OP8Mu.mjs → index-Dfo3bBnl.mjs} +2 -2
  76. package/lib/{index-ctEY-xjJ.mjs → index-Dgohn547.mjs} +3 -3
  77. package/lib/{index-DwhWt2Jt.mjs → index-DjHz-TGq.mjs} +1 -1
  78. package/lib/{index-Cb51fnZM.js → index-DnIR5ghZ.js} +1 -1
  79. package/lib/{index-COqO8I1C.mjs → index-DqfeHeDN.mjs} +1 -1
  80. package/lib/{index-Bzn58Yhp.js → index-JY_vmjxX.js} +1 -1
  81. package/lib/{index-CcEA2K6Q.mjs → index-LaHWWgzV.mjs} +1 -1
  82. package/lib/{index-CUMRJ8yy.mjs → index-ObRYlj1l.mjs} +48 -16
  83. package/lib/{index-DRMwoM8a.mjs → index-ZuBMF5ZM.mjs} +4 -4
  84. package/lib/{index-DIqG9W_r.js → index-l0_fPapQ.js} +1 -1
  85. package/lib/{index-KpBoUsX2.mjs → index-tsZGjIYB.mjs} +1 -1
  86. package/lib/{index-DNBuc7tl.js → index-v9fEg88t.js} +1 -1
  87. package/lib/{index-tzTI5R9c.js → index-vPc_VIRu.js} +1 -1
  88. package/lib/{index-C5rfYL4K.js → index-yU0Hsqz_.js} +1 -1
  89. package/lib/{index.es-Czhf3Th8.js → index.es-Bqw6r4nv.js} +2 -2
  90. package/lib/{index.es-By1LsNow.mjs → index.es-DFa1opYl.mjs} +5 -5
  91. package/lib/index.js +1 -1
  92. package/lib/index.mjs +1 -1
  93. package/lib/{signer-jV9Ixq8U.js → signer-DEoUkKh3.js} +1 -1
  94. package/lib/{signer-CcpDR9mm.mjs → signer-_KpSCeJr.mjs} +1 -1
  95. package/lib/{solana-Bo2aMvX4.mjs → solana-CeI-x62u.mjs} +4 -4
  96. package/lib/solana-CzIZTTUh.js +1 -0
  97. package/lib/{solana-4YAkIi-J.js → solana-Dbf-kAb8.js} +1 -1
  98. package/lib/solana-UZrOCesE.mjs +17 -0
  99. package/lib/{solanaEmbed.esm-B-rprhcd.js → solanaEmbed.esm-CM69eDrj.js} +1 -1
  100. package/lib/{solanaEmbed.esm-4CS_00aM.mjs → solanaEmbed.esm-rMe_voKF.mjs} +1 -1
  101. package/lib/src/views/v2/Redeem/index.d.ts.map +1 -1
  102. package/lib/{sui-MorjdPyy.js → sui-1KKOjsyu.js} +1 -1
  103. package/lib/{sui-BgD7gx67.js → sui-BRucFXyI.js} +1 -1
  104. package/lib/{sui-BGaWik82.mjs → sui-CtQtzdVy.mjs} +1 -1
  105. package/lib/{sui-DLOfqNsy.mjs → sui-DMYKKmcs.mjs} +5 -5
  106. package/package.json +21 -21
  107. package/dist/assets/index-GDpnrg5w.js +0 -1
  108. package/dist/assets/solana-DlYSFsGk.js +0 -2
  109. package/dist/assets/solanaEmbed.esm-P5uPPwsm.js +0 -37
  110. package/lib/solana-DA02fWu7.mjs +0 -17
  111. package/lib/solana-DVFk6Z5q.js +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./index-Cvtp4dgE.js"),pl=require("./dijkstra-CtFxn7S9.js"),P=require("./index-v-_ti7Rn.js"),_=require("./index-C6Hp_1yF.js"),W=require("./index-D7f2-3wk.js");let gl=class extends _.r{constructor(e){super(e),this.events=new E.eventsExports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(_.formatJsonRpcRequest(e.method,e.params||[],e.id||_.getBigIntRpcId().toString()),t)}async requestStrict(e,t){return new Promise(async(i,n)=>{if(!this.connection.connected)try{await this.open()}catch(s){n(s)}this.events.on(`${e.id}`,s=>{_.isJsonRpcError(s)?n(s.error):i(s.result)});try{await this.connection.send(e,t)}catch(s){n(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),_.isJsonRpcResponse(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}};var yl=function(){var r=document.getSelection();if(!r.rangeCount)return function(){};for(var e=document.activeElement,t=[],i=0;i<r.rangeCount;i++)t.push(r.getRangeAt(i));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return r.removeAllRanges(),function(){r.type==="Caret"&&r.removeAllRanges(),r.rangeCount||t.forEach(function(n){r.addRange(n)}),e&&e.focus()}},ml=yl,Ln={"text/plain":"Text","text/html":"Url",default:"Text"},vl="Copy to clipboard: #{key}, Enter";function wl(r){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return r.replace(/#{\s*key\s*}/g,e)}function _l(r,e){var t,i,n,s,o,a,c=!1;e||(e={}),t=e.debug||!1;try{n=ml(),s=document.createRange(),o=document.getSelection(),a=document.createElement("span"),a.textContent=r,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(u){if(u.stopPropagation(),e.format)if(u.preventDefault(),typeof u.clipboardData>"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=Ln[e.format]||Ln.default;window.clipboardData.setData(h,r)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,r);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),o.addRange(s);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");c=!0}catch(u){t&&console.error("unable to copy using execCommand: ",u),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",r),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(h){t&&console.error("unable to copy using clipboardData: ",h),t&&console.error("falling back to prompt"),i=wl("message"in e?e.message:vl),window.prompt(i,r)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),a&&document.body.removeChild(a),n()}return c}var bl=_l,El={}.toString,tn=Array.isArray||function(r){return El.call(r)=="[object Array]"},Sl=E.requireElliptic(),rn={},Q={};Object.defineProperty(Q,"__esModule",{value:!0});var $o=Q.getLocalStorage=Ko=Q.getLocalStorageOrThrow=zo=Q.getCrypto=jo=Q.getCryptoOrThrow=Uo=Q.getLocation=Bo=Q.getLocationOrThrow=qo=Q.getNavigator=Fo=Q.getNavigatorOrThrow=Do=Q.getDocument=Lo=Q.getDocumentOrThrow=Mo=Q.getFromWindowOrThrow=ko=Q.getFromWindow=void 0;function vt(r){let e;return typeof window<"u"&&typeof window[r]<"u"&&(e=window[r]),e}var ko=Q.getFromWindow=vt;function Ft(r){const e=vt(r);if(!e)throw new Error(`${r} is not defined in Window`);return e}var Mo=Q.getFromWindowOrThrow=Ft;function Il(){return Ft("document")}var Lo=Q.getDocumentOrThrow=Il;function xl(){return vt("document")}var Do=Q.getDocument=xl;function Pl(){return Ft("navigator")}var Fo=Q.getNavigatorOrThrow=Pl;function Al(){return vt("navigator")}var qo=Q.getNavigator=Al;function Rl(){return Ft("location")}var Bo=Q.getLocationOrThrow=Rl;function Nl(){return vt("location")}var Uo=Q.getLocation=Nl;function Tl(){return Ft("crypto")}var jo=Q.getCryptoOrThrow=Tl;function Cl(){return vt("crypto")}var zo=Q.getCrypto=Cl;function Ol(){return Ft("localStorage")}var Ko=Q.getLocalStorageOrThrow=Ol;function $l(){return vt("localStorage")}$o=Q.getLocalStorage=$l;Object.defineProperty(rn,"__esModule",{value:!0});var Vo=rn.getWindowMetadata=void 0;const Dn=Q;function kl(){let r,e;try{r=Dn.getDocumentOrThrow(),e=Dn.getLocationOrThrow()}catch{return null}function t(){const h=r.getElementsByTagName("link"),p=[];for(let d=0;d<h.length;d++){const f=h[d],g=f.getAttribute("rel");if(g&&g.toLowerCase().indexOf("icon")>-1){const y=f.getAttribute("href");if(y)if(y.toLowerCase().indexOf("https:")===-1&&y.toLowerCase().indexOf("http:")===-1&&y.indexOf("//")!==0){let m=e.protocol+"//"+e.host;if(y.indexOf("/")===0)m+=y;else{const v=e.pathname.split("/");v.pop();const b=v.join("/");m+=b+"/"+y}p.push(m)}else if(y.indexOf("//")===0){const m=e.protocol+y;p.push(m)}else p.push(y)}}return p}function i(...h){const p=r.getElementsByTagName("meta");for(let d=0;d<p.length;d++){const f=p[d],g=["itemprop","property","name"].map(y=>f.getAttribute(y)).filter(y=>y?h.includes(y):!1);if(g.length&&g){const y=f.getAttribute("content");if(y)return y}}return""}function n(){let h=i("name","og:site_name","og:title","twitter:title");return h||(h=r.title),h}function s(){return i("description","og:description","twitter:description","keywords")}const o=n(),a=s(),c=e.origin,l=t();return{description:a,url:c,icons:l,name:o}}Vo=rn.getWindowMetadata=kl;var Ml=function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var i=Array(r),n=0,e=0;e<t;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,n++)i[n]=s[o];return i},Ll=function(){function r(e,t,i){this.name=e,this.version=t,this.os=i,this.type="browser"}return r}(),Dl=function(){function r(e){this.version=e,this.type="node",this.name="node",this.os=E.dist.process.platform}return r}(),Fl=function(){function r(e,t,i,n){this.name=e,this.version=t,this.os=i,this.bot=n,this.type="bot-device"}return r}(),ql=function(){function r(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return r}(),Bl=function(){function r(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return r}(),Ul=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,jl=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Fn=3,zl=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",Ul]],qn=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function Kl(r){return r?Bn(r):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Bl:typeof navigator<"u"?Bn(navigator.userAgent):Hl()}function Vl(r){return r!==""&&zl.reduce(function(e,t){var i=t[0],n=t[1];if(e)return e;var s=n.exec(r);return!!s&&[i,s]},!1)}function Bn(r){var e=Vl(r);if(!e)return null;var t=e[0],i=e[1];if(t==="searchbot")return new ql;var n=i[1]&&i[1].split(/[._]/).slice(0,3);n?n.length<Fn&&(n=Ml(n,Jl(Fn-n.length))):n=[];var s=n.join("."),o=Wl(r),a=jl.exec(r);return a&&a[1]?new Fl(t,s,o,a[1]):new Ll(t,s,o)}function Wl(r){for(var e=0,t=qn.length;e<t;e++){var i=qn[e],n=i[0],s=i[1],o=s.exec(r);if(o)return n}return null}function Hl(){var r=typeof E.dist.process<"u"&&E.dist.process.version;return r?new Dl(E.dist.process.version.slice(1)):null}function Jl(r){for(var e=[],t=0;t<r;t++)e.push("0");return e}function nn(r){return Kl(r)}function Kr(){const r=nn();return r&&r.os?r.os:void 0}function Wo(){const r=Kr();return r?r.toLowerCase().includes("android"):!1}function Ho(){const r=Kr();return r?r.toLowerCase().includes("ios")||r.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function Gl(){return Kr()?Wo()||Ho():!1}function Jo(){const r=nn();return r&&r.name?r.name.toLowerCase()==="node":!1}function Yl(){return!Jo()&&!!Go()}const Ql=ko,Xl=Mo,Zl=Lo,eu=Do,tu=Fo,Go=qo,ru=Bo,iu=Uo,nu=jo,su=zo,ou=Ko,Vr=$o;function au(){return Vo()}function cu(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return JSON.parse(r)}catch{return r}}function lu(r){return typeof r=="string"?r:JSON.stringify(r)}const Yo=cu,Qo=lu;function Xo(r,e){const t=Qo(e),i=Vr();i&&i.setItem(r,t)}function uu(r){let e=null,t=null;const i=Vr();return i&&(t=i.getItem(r)),e=t&&Yo(t),e}function hu(r){const e=Vr();e&&e.removeItem(r)}const Zo="WALLETCONNECT_DEEPLINK_CHOICE";function du(r,e){const t=encodeURIComponent(r);return e.universalLink?`${e.universalLink}/wc?uri=${t}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${t}`:""}function fu(r){const e=r.href.split("?")[0];Xo(Zo,Object.assign(Object.assign({},r),{href:e}))}function ea(r,e){return r.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))[0]}function pu(r,e){let t=r;return e&&(t=e.map(i=>ea(r,i)).filter(Boolean)),t}const ta="https://registry.walletconnect.com";function gu(){return ta+"/api/v2/wallets"}function yu(){return ta+"/api/v2/dapps"}function ra(r,e="mobile"){var t;return{name:r.name||"",shortName:r.metadata.shortName||"",color:r.metadata.colors.primary||"",logo:(t=r.image_url.sm)!==null&&t!==void 0?t:"",universalLink:r[e].universal||"",deepLink:r[e].native||""}}function mu(r,e="mobile"){return Object.values(r).filter(t=>!!t[e].universal||!!t[e].native).map(t=>ra(t,e))}const vu=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:nn,detectOS:Kr,formatIOSMobile:du,formatMobileRegistry:mu,formatMobileRegistryEntry:ra,getClientMeta:au,getCrypto:su,getCryptoOrThrow:nu,getDappRegistryUrl:yu,getDocument:eu,getDocumentOrThrow:Zl,getFromWindow:Ql,getFromWindowOrThrow:Xl,getLocal:uu,getLocalStorage:Vr,getLocalStorageOrThrow:ou,getLocation:iu,getLocationOrThrow:ru,getMobileLinkRegistry:pu,getMobileRegistryEntry:ea,getNavigator:Go,getNavigatorOrThrow:tu,getWalletRegistryUrl:gu,isAndroid:Wo,isBrowser:Yl,isIOS:Ho,isMobile:Gl,isNode:Jo,mobileLinkChoiceKey:Zo,removeLocal:hu,safeJsonParse:Yo,safeJsonStringify:Qo,saveMobileLinkInfo:fu,setLocal:Xo},Symbol.toStringTag,{value:"Module"})),wu=E.getAugmentedNamespace(vu);var ur={},_u=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},ia={},at={},bu=tn;function Eu(){try{var r=new Uint8Array(1);return r.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},r.foo()===42}catch{return!1}}j.TYPED_ARRAY_SUPPORT=Eu();var Un=j.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function j(r,e,t){return!j.TYPED_ARRAY_SUPPORT&&!(this instanceof j)?new j(r,e,t):typeof r=="number"?na(this,r):Nu(this,r,e,t)}j.TYPED_ARRAY_SUPPORT&&(j.prototype.__proto__=Uint8Array.prototype,j.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&j[Symbol.species]===j&&Object.defineProperty(j,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function sn(r){if(r>=Un)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Un.toString(16)+" bytes");return r|0}function Su(r){return r!==r}function Nt(r,e){var t;return j.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=j.prototype):(t=r,t===null&&(t=new j(e)),t.length=e),t}function na(r,e){var t=Nt(r,e<0?0:sn(e)|0);if(!j.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function Iu(r,e){var t=oa(e)|0,i=Nt(r,t),n=i.write(e);return n!==t&&(i=i.slice(0,n)),i}function Oi(r,e){for(var t=e.length<0?0:sn(e.length)|0,i=Nt(r,t),n=0;n<t;n+=1)i[n]=e[n]&255;return i}function xu(r,e,t,i){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(i||0))throw new RangeError("'length' is out of bounds");var n;return t===void 0&&i===void 0?n=new Uint8Array(e):i===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,i),j.TYPED_ARRAY_SUPPORT?n.__proto__=j.prototype:n=Oi(r,n),n}function Pu(r,e){if(j.isBuffer(e)){var t=sn(e.length)|0,i=Nt(r,t);return i.length===0||e.copy(i,0,0,t),i}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||Su(e.length)?Nt(r,0):Oi(r,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Oi(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function sa(r,e){e=e||1/0;for(var t,i=r.length,n=null,s=[],o=0;o<i;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!n){if(t>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=t;continue}if(t<56320){(e-=3)>-1&&s.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,t<128){if((e-=1)<0)break;s.push(t)}else if(t<2048){if((e-=2)<0)break;s.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return s}function oa(r){if(j.isBuffer(r))return r.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;return e===0?0:sa(r).length}function Au(r,e,t,i){for(var n=0;n<i&&!(n+t>=e.length||n>=r.length);++n)e[n+t]=r[n];return n}function Ru(r,e,t,i){return Au(sa(e,r.length-t),r,t,i)}function Nu(r,e,t,i){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?xu(r,e,t,i):typeof e=="string"?Iu(r,e):Pu(r,e)}j.prototype.write=function(e,t,i){t===void 0?(i=this.length,t=0):i===void 0&&typeof t=="string"?(i=this.length,t=0):isFinite(t)&&(t=t|0,isFinite(i)?i=i|0:i=void 0);var n=this.length-t;if((i===void 0||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return Ru(this,e,t,i)};j.prototype.slice=function(e,t){var i=this.length;e=~~e,t=t===void 0?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e);var n;if(j.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=j.prototype;else{var s=t-e;n=new j(s,void 0);for(var o=0;o<s;++o)n[o]=this[o+e]}return n};j.prototype.copy=function(e,t,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var s=n-i,o;if(this===e&&i<t&&t<n)for(o=s-1;o>=0;--o)e[o+t]=this[o+i];else if(s<1e3||!j.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+t]=this[o+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+s),t);return s};j.prototype.fill=function(e,t,i){if(typeof e=="string"){if(typeof t=="string"?(t=0,i=this.length):typeof i=="string"&&(i=this.length),e.length===1){var n=e.charCodeAt(0);n<256&&(e=n)}}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);var s;if(typeof e=="number")for(s=t;s<i;++s)this[s]=e;else{var o=j.isBuffer(e)?e:new j(e),a=o.length;for(s=0;s<i-t;++s)this[s+t]=o[s%a]}return this};j.concat=function(e,t){if(!bu(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return Nt(null,0);var i;if(t===void 0)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=na(null,t),s=0;for(i=0;i<e.length;++i){var o=e[i];if(!j.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,s),s+=o.length}return n};j.byteLength=oa;j.prototype._isBuffer=!0;j.isBuffer=function(e){return!!(e!=null&&e._isBuffer)};at.alloc=function(r){var e=new j(r);return e.fill(0),e};at.from=function(r){return new j(r)};var _e={},on,Tu=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];_e.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};_e.getSymbolTotalCodewords=function(e){return Tu[e]};_e.getBCHDigit=function(r){for(var e=0;r!==0;)e++,r>>>=1;return e};_e.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');on=e};_e.isKanjiModeEnabled=function(){return typeof on<"u"};_e.toSJIS=function(e){return on(e)};var Wr={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");var i=t.toLowerCase();switch(i){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,n){if(r.isValid(i))return i;try{return e(i)}catch{return n}}})(Wr);function aa(){this.buffer=[],this.length=0}aa.prototype={get:function(r){var e=Math.floor(r/8);return(this.buffer[e]>>>7-r%8&1)===1},put:function(r,e){for(var t=0;t<e;t++)this.putBit((r>>>e-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),r&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Cu=aa,jn=at;function hr(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=jn.alloc(r*r),this.reservedBit=jn.alloc(r*r)}hr.prototype.set=function(r,e,t,i){var n=r*this.size+e;this.data[n]=t,i&&(this.reservedBit[n]=!0)};hr.prototype.get=function(r,e){return this.data[r*this.size+e]};hr.prototype.xor=function(r,e,t){this.data[r*this.size+e]^=t};hr.prototype.isReserved=function(r,e){return this.reservedBit[r*this.size+e]};var Ou=hr,ca={};(function(r){var e=_e.getSymbolSize;r.getRowColCoords=function(i){if(i===1)return[];for(var n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,a=[s-7],c=1;c<n-1;c++)a[c]=a[c-1]-o;return a.push(6),a.reverse()},r.getPositions=function(i){for(var n=[],s=r.getRowColCoords(i),o=s.length,a=0;a<o;a++)for(var c=0;c<o;c++)a===0&&c===0||a===0&&c===o-1||a===o-1&&c===0||n.push([s[a],s[c]]);return n}})(ca);var la={},$u=_e.getSymbolSize,zn=7;la.getPositions=function(e){var t=$u(e);return[[0,0],[t-zn,0],[0,t-zn]]};var ua={};(function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var e={N1:3,N2:3,N3:40,N4:10};r.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},r.from=function(n){return r.isValid(n)?parseInt(n,10):void 0},r.getPenaltyN1=function(n){for(var s=n.size,o=0,a=0,c=0,l=null,u=null,h=0;h<s;h++){a=c=0,l=u=null;for(var p=0;p<s;p++){var d=n.get(h,p);d===l?a++:(a>=5&&(o+=e.N1+(a-5)),l=d,a=1),d=n.get(p,h),d===u?c++:(c>=5&&(o+=e.N1+(c-5)),u=d,c=1)}a>=5&&(o+=e.N1+(a-5)),c>=5&&(o+=e.N1+(c-5))}return o},r.getPenaltyN2=function(n){for(var s=n.size,o=0,a=0;a<s-1;a++)for(var c=0;c<s-1;c++){var l=n.get(a,c)+n.get(a,c+1)+n.get(a+1,c)+n.get(a+1,c+1);(l===4||l===0)&&o++}return o*e.N2},r.getPenaltyN3=function(n){for(var s=n.size,o=0,a=0,c=0,l=0;l<s;l++){a=c=0;for(var u=0;u<s;u++)a=a<<1&2047|n.get(l,u),u>=10&&(a===1488||a===93)&&o++,c=c<<1&2047|n.get(u,l),u>=10&&(c===1488||c===93)&&o++}return o*e.N3},r.getPenaltyN4=function(n){for(var s=0,o=n.data.length,a=0;a<o;a++)s+=n.data[a];var c=Math.abs(Math.ceil(s*100/o/5)-10);return c*e.N4};function t(i,n,s){switch(i){case r.Patterns.PATTERN000:return(n+s)%2===0;case r.Patterns.PATTERN001:return n%2===0;case r.Patterns.PATTERN010:return s%3===0;case r.Patterns.PATTERN011:return(n+s)%3===0;case r.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case r.Patterns.PATTERN101:return n*s%2+n*s%3===0;case r.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case r.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}r.applyMask=function(n,s){for(var o=s.size,a=0;a<o;a++)for(var c=0;c<o;c++)s.isReserved(c,a)||s.xor(c,a,t(n,c,a))},r.getBestMask=function(n,s){for(var o=Object.keys(r.Patterns).length,a=0,c=1/0,l=0;l<o;l++){s(l),r.applyMask(l,n);var u=r.getPenaltyN1(n)+r.getPenaltyN2(n)+r.getPenaltyN3(n)+r.getPenaltyN4(n);r.applyMask(l,n),u<c&&(c=u,a=l)}return a}})(ua);var Hr={},tt=Wr,wr=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],_r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Hr.getBlocksCount=function(e,t){switch(t){case tt.L:return wr[(e-1)*4+0];case tt.M:return wr[(e-1)*4+1];case tt.Q:return wr[(e-1)*4+2];case tt.H:return wr[(e-1)*4+3];default:return}};Hr.getTotalCodewordsCount=function(e,t){switch(t){case tt.L:return _r[(e-1)*4+0];case tt.M:return _r[(e-1)*4+1];case tt.Q:return _r[(e-1)*4+2];case tt.H:return _r[(e-1)*4+3];default:return}};var ha={},Jr={},da=at,Zt=da.alloc(512),Or=da.alloc(256);(function(){for(var e=1,t=0;t<255;t++)Zt[t]=e,Or[e]=t,e<<=1,e&256&&(e^=285);for(t=255;t<512;t++)Zt[t]=Zt[t-255]})();Jr.log=function(e){if(e<1)throw new Error("log("+e+")");return Or[e]};Jr.exp=function(e){return Zt[e]};Jr.mul=function(e,t){return e===0||t===0?0:Zt[Or[e]+Or[t]]};(function(r){var e=at,t=Jr;r.mul=function(n,s){for(var o=e.alloc(n.length+s.length-1),a=0;a<n.length;a++)for(var c=0;c<s.length;c++)o[a+c]^=t.mul(n[a],s[c]);return o},r.mod=function(n,s){for(var o=e.from(n);o.length-s.length>=0;){for(var a=o[0],c=0;c<s.length;c++)o[c]^=t.mul(s[c],a);for(var l=0;l<o.length&&o[l]===0;)l++;o=o.slice(l)}return o},r.generateECPolynomial=function(n){for(var s=e.from([1]),o=0;o<n;o++)s=r.mul(s,[1,t.exp(o)]);return s}})(ha);var Kn=at,fa=ha,ku=E.bufferPolyfill.Buffer;function an(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}an.prototype.initialize=function(e){this.degree=e,this.genPoly=fa.generateECPolynomial(this.degree)};an.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var t=Kn.alloc(this.degree),i=ku.concat([e,t],e.length+this.degree),n=fa.mod(i,this.genPoly),s=this.degree-n.length;if(s>0){var o=Kn.alloc(this.degree);return n.copy(o,s),o}return n};var Mu=an,pa={},ct={},cn={};cn.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var je={},ga="[0-9]+",Lu="[A-Z $%*+\\-./:]+",nr="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";nr=nr.replace(/u/g,"\\u");var Du="(?:(?![A-Z0-9 $%*+\\-./:]|"+nr+`)(?:.|[\r
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./index-DU1he9Nx.js"),pl=require("./dijkstra-CtFxn7S9.js"),P=require("./index-CskmLcFl.js"),_=require("./index-ChLwWlxD.js"),W=require("./index-CZi3G6c5.js");let gl=class extends _.r{constructor(e){super(e),this.events=new E.eventsExports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(_.formatJsonRpcRequest(e.method,e.params||[],e.id||_.getBigIntRpcId().toString()),t)}async requestStrict(e,t){return new Promise(async(i,n)=>{if(!this.connection.connected)try{await this.open()}catch(s){n(s)}this.events.on(`${e.id}`,s=>{_.isJsonRpcError(s)?n(s.error):i(s.result)});try{await this.connection.send(e,t)}catch(s){n(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),_.isJsonRpcResponse(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}};var yl=function(){var r=document.getSelection();if(!r.rangeCount)return function(){};for(var e=document.activeElement,t=[],i=0;i<r.rangeCount;i++)t.push(r.getRangeAt(i));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return r.removeAllRanges(),function(){r.type==="Caret"&&r.removeAllRanges(),r.rangeCount||t.forEach(function(n){r.addRange(n)}),e&&e.focus()}},ml=yl,Ln={"text/plain":"Text","text/html":"Url",default:"Text"},vl="Copy to clipboard: #{key}, Enter";function wl(r){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return r.replace(/#{\s*key\s*}/g,e)}function _l(r,e){var t,i,n,s,o,a,c=!1;e||(e={}),t=e.debug||!1;try{n=ml(),s=document.createRange(),o=document.getSelection(),a=document.createElement("span"),a.textContent=r,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(u){if(u.stopPropagation(),e.format)if(u.preventDefault(),typeof u.clipboardData>"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=Ln[e.format]||Ln.default;window.clipboardData.setData(h,r)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,r);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),o.addRange(s);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");c=!0}catch(u){t&&console.error("unable to copy using execCommand: ",u),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",r),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(h){t&&console.error("unable to copy using clipboardData: ",h),t&&console.error("falling back to prompt"),i=wl("message"in e?e.message:vl),window.prompt(i,r)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),a&&document.body.removeChild(a),n()}return c}var bl=_l,El={}.toString,tn=Array.isArray||function(r){return El.call(r)=="[object Array]"},Sl=E.requireElliptic(),rn={},Q={};Object.defineProperty(Q,"__esModule",{value:!0});var $o=Q.getLocalStorage=Ko=Q.getLocalStorageOrThrow=zo=Q.getCrypto=jo=Q.getCryptoOrThrow=Uo=Q.getLocation=Bo=Q.getLocationOrThrow=qo=Q.getNavigator=Fo=Q.getNavigatorOrThrow=Do=Q.getDocument=Lo=Q.getDocumentOrThrow=Mo=Q.getFromWindowOrThrow=ko=Q.getFromWindow=void 0;function vt(r){let e;return typeof window<"u"&&typeof window[r]<"u"&&(e=window[r]),e}var ko=Q.getFromWindow=vt;function Ft(r){const e=vt(r);if(!e)throw new Error(`${r} is not defined in Window`);return e}var Mo=Q.getFromWindowOrThrow=Ft;function Il(){return Ft("document")}var Lo=Q.getDocumentOrThrow=Il;function xl(){return vt("document")}var Do=Q.getDocument=xl;function Pl(){return Ft("navigator")}var Fo=Q.getNavigatorOrThrow=Pl;function Al(){return vt("navigator")}var qo=Q.getNavigator=Al;function Rl(){return Ft("location")}var Bo=Q.getLocationOrThrow=Rl;function Nl(){return vt("location")}var Uo=Q.getLocation=Nl;function Tl(){return Ft("crypto")}var jo=Q.getCryptoOrThrow=Tl;function Cl(){return vt("crypto")}var zo=Q.getCrypto=Cl;function Ol(){return Ft("localStorage")}var Ko=Q.getLocalStorageOrThrow=Ol;function $l(){return vt("localStorage")}$o=Q.getLocalStorage=$l;Object.defineProperty(rn,"__esModule",{value:!0});var Vo=rn.getWindowMetadata=void 0;const Dn=Q;function kl(){let r,e;try{r=Dn.getDocumentOrThrow(),e=Dn.getLocationOrThrow()}catch{return null}function t(){const h=r.getElementsByTagName("link"),p=[];for(let d=0;d<h.length;d++){const f=h[d],g=f.getAttribute("rel");if(g&&g.toLowerCase().indexOf("icon")>-1){const y=f.getAttribute("href");if(y)if(y.toLowerCase().indexOf("https:")===-1&&y.toLowerCase().indexOf("http:")===-1&&y.indexOf("//")!==0){let m=e.protocol+"//"+e.host;if(y.indexOf("/")===0)m+=y;else{const v=e.pathname.split("/");v.pop();const b=v.join("/");m+=b+"/"+y}p.push(m)}else if(y.indexOf("//")===0){const m=e.protocol+y;p.push(m)}else p.push(y)}}return p}function i(...h){const p=r.getElementsByTagName("meta");for(let d=0;d<p.length;d++){const f=p[d],g=["itemprop","property","name"].map(y=>f.getAttribute(y)).filter(y=>y?h.includes(y):!1);if(g.length&&g){const y=f.getAttribute("content");if(y)return y}}return""}function n(){let h=i("name","og:site_name","og:title","twitter:title");return h||(h=r.title),h}function s(){return i("description","og:description","twitter:description","keywords")}const o=n(),a=s(),c=e.origin,l=t();return{description:a,url:c,icons:l,name:o}}Vo=rn.getWindowMetadata=kl;var Ml=function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var i=Array(r),n=0,e=0;e<t;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,n++)i[n]=s[o];return i},Ll=function(){function r(e,t,i){this.name=e,this.version=t,this.os=i,this.type="browser"}return r}(),Dl=function(){function r(e){this.version=e,this.type="node",this.name="node",this.os=E.dist.process.platform}return r}(),Fl=function(){function r(e,t,i,n){this.name=e,this.version=t,this.os=i,this.bot=n,this.type="bot-device"}return r}(),ql=function(){function r(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return r}(),Bl=function(){function r(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return r}(),Ul=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,jl=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Fn=3,zl=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",Ul]],qn=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function Kl(r){return r?Bn(r):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Bl:typeof navigator<"u"?Bn(navigator.userAgent):Hl()}function Vl(r){return r!==""&&zl.reduce(function(e,t){var i=t[0],n=t[1];if(e)return e;var s=n.exec(r);return!!s&&[i,s]},!1)}function Bn(r){var e=Vl(r);if(!e)return null;var t=e[0],i=e[1];if(t==="searchbot")return new ql;var n=i[1]&&i[1].split(/[._]/).slice(0,3);n?n.length<Fn&&(n=Ml(n,Jl(Fn-n.length))):n=[];var s=n.join("."),o=Wl(r),a=jl.exec(r);return a&&a[1]?new Fl(t,s,o,a[1]):new Ll(t,s,o)}function Wl(r){for(var e=0,t=qn.length;e<t;e++){var i=qn[e],n=i[0],s=i[1],o=s.exec(r);if(o)return n}return null}function Hl(){var r=typeof E.dist.process<"u"&&E.dist.process.version;return r?new Dl(E.dist.process.version.slice(1)):null}function Jl(r){for(var e=[],t=0;t<r;t++)e.push("0");return e}function nn(r){return Kl(r)}function Kr(){const r=nn();return r&&r.os?r.os:void 0}function Wo(){const r=Kr();return r?r.toLowerCase().includes("android"):!1}function Ho(){const r=Kr();return r?r.toLowerCase().includes("ios")||r.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function Gl(){return Kr()?Wo()||Ho():!1}function Jo(){const r=nn();return r&&r.name?r.name.toLowerCase()==="node":!1}function Yl(){return!Jo()&&!!Go()}const Ql=ko,Xl=Mo,Zl=Lo,eu=Do,tu=Fo,Go=qo,ru=Bo,iu=Uo,nu=jo,su=zo,ou=Ko,Vr=$o;function au(){return Vo()}function cu(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return JSON.parse(r)}catch{return r}}function lu(r){return typeof r=="string"?r:JSON.stringify(r)}const Yo=cu,Qo=lu;function Xo(r,e){const t=Qo(e),i=Vr();i&&i.setItem(r,t)}function uu(r){let e=null,t=null;const i=Vr();return i&&(t=i.getItem(r)),e=t&&Yo(t),e}function hu(r){const e=Vr();e&&e.removeItem(r)}const Zo="WALLETCONNECT_DEEPLINK_CHOICE";function du(r,e){const t=encodeURIComponent(r);return e.universalLink?`${e.universalLink}/wc?uri=${t}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${t}`:""}function fu(r){const e=r.href.split("?")[0];Xo(Zo,Object.assign(Object.assign({},r),{href:e}))}function ea(r,e){return r.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))[0]}function pu(r,e){let t=r;return e&&(t=e.map(i=>ea(r,i)).filter(Boolean)),t}const ta="https://registry.walletconnect.com";function gu(){return ta+"/api/v2/wallets"}function yu(){return ta+"/api/v2/dapps"}function ra(r,e="mobile"){var t;return{name:r.name||"",shortName:r.metadata.shortName||"",color:r.metadata.colors.primary||"",logo:(t=r.image_url.sm)!==null&&t!==void 0?t:"",universalLink:r[e].universal||"",deepLink:r[e].native||""}}function mu(r,e="mobile"){return Object.values(r).filter(t=>!!t[e].universal||!!t[e].native).map(t=>ra(t,e))}const vu=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:nn,detectOS:Kr,formatIOSMobile:du,formatMobileRegistry:mu,formatMobileRegistryEntry:ra,getClientMeta:au,getCrypto:su,getCryptoOrThrow:nu,getDappRegistryUrl:yu,getDocument:eu,getDocumentOrThrow:Zl,getFromWindow:Ql,getFromWindowOrThrow:Xl,getLocal:uu,getLocalStorage:Vr,getLocalStorageOrThrow:ou,getLocation:iu,getLocationOrThrow:ru,getMobileLinkRegistry:pu,getMobileRegistryEntry:ea,getNavigator:Go,getNavigatorOrThrow:tu,getWalletRegistryUrl:gu,isAndroid:Wo,isBrowser:Yl,isIOS:Ho,isMobile:Gl,isNode:Jo,mobileLinkChoiceKey:Zo,removeLocal:hu,safeJsonParse:Yo,safeJsonStringify:Qo,saveMobileLinkInfo:fu,setLocal:Xo},Symbol.toStringTag,{value:"Module"})),wu=E.getAugmentedNamespace(vu);var ur={},_u=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},ia={},at={},bu=tn;function Eu(){try{var r=new Uint8Array(1);return r.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},r.foo()===42}catch{return!1}}j.TYPED_ARRAY_SUPPORT=Eu();var Un=j.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function j(r,e,t){return!j.TYPED_ARRAY_SUPPORT&&!(this instanceof j)?new j(r,e,t):typeof r=="number"?na(this,r):Nu(this,r,e,t)}j.TYPED_ARRAY_SUPPORT&&(j.prototype.__proto__=Uint8Array.prototype,j.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&j[Symbol.species]===j&&Object.defineProperty(j,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function sn(r){if(r>=Un)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Un.toString(16)+" bytes");return r|0}function Su(r){return r!==r}function Nt(r,e){var t;return j.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=j.prototype):(t=r,t===null&&(t=new j(e)),t.length=e),t}function na(r,e){var t=Nt(r,e<0?0:sn(e)|0);if(!j.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function Iu(r,e){var t=oa(e)|0,i=Nt(r,t),n=i.write(e);return n!==t&&(i=i.slice(0,n)),i}function Oi(r,e){for(var t=e.length<0?0:sn(e.length)|0,i=Nt(r,t),n=0;n<t;n+=1)i[n]=e[n]&255;return i}function xu(r,e,t,i){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(i||0))throw new RangeError("'length' is out of bounds");var n;return t===void 0&&i===void 0?n=new Uint8Array(e):i===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,i),j.TYPED_ARRAY_SUPPORT?n.__proto__=j.prototype:n=Oi(r,n),n}function Pu(r,e){if(j.isBuffer(e)){var t=sn(e.length)|0,i=Nt(r,t);return i.length===0||e.copy(i,0,0,t),i}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||Su(e.length)?Nt(r,0):Oi(r,e);if(e.type==="Buffer"&&Array.isArray(e.data))return Oi(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function sa(r,e){e=e||1/0;for(var t,i=r.length,n=null,s=[],o=0;o<i;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!n){if(t>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=t;continue}if(t<56320){(e-=3)>-1&&s.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,t<128){if((e-=1)<0)break;s.push(t)}else if(t<2048){if((e-=2)<0)break;s.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return s}function oa(r){if(j.isBuffer(r))return r.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;return e===0?0:sa(r).length}function Au(r,e,t,i){for(var n=0;n<i&&!(n+t>=e.length||n>=r.length);++n)e[n+t]=r[n];return n}function Ru(r,e,t,i){return Au(sa(e,r.length-t),r,t,i)}function Nu(r,e,t,i){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?xu(r,e,t,i):typeof e=="string"?Iu(r,e):Pu(r,e)}j.prototype.write=function(e,t,i){t===void 0?(i=this.length,t=0):i===void 0&&typeof t=="string"?(i=this.length,t=0):isFinite(t)&&(t=t|0,isFinite(i)?i=i|0:i=void 0);var n=this.length-t;if((i===void 0||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return Ru(this,e,t,i)};j.prototype.slice=function(e,t){var i=this.length;e=~~e,t=t===void 0?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e);var n;if(j.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=j.prototype;else{var s=t-e;n=new j(s,void 0);for(var o=0;o<s;++o)n[o]=this[o+e]}return n};j.prototype.copy=function(e,t,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var s=n-i,o;if(this===e&&i<t&&t<n)for(o=s-1;o>=0;--o)e[o+t]=this[o+i];else if(s<1e3||!j.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+t]=this[o+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+s),t);return s};j.prototype.fill=function(e,t,i){if(typeof e=="string"){if(typeof t=="string"?(t=0,i=this.length):typeof i=="string"&&(i=this.length),e.length===1){var n=e.charCodeAt(0);n<256&&(e=n)}}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);var s;if(typeof e=="number")for(s=t;s<i;++s)this[s]=e;else{var o=j.isBuffer(e)?e:new j(e),a=o.length;for(s=0;s<i-t;++s)this[s+t]=o[s%a]}return this};j.concat=function(e,t){if(!bu(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return Nt(null,0);var i;if(t===void 0)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=na(null,t),s=0;for(i=0;i<e.length;++i){var o=e[i];if(!j.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,s),s+=o.length}return n};j.byteLength=oa;j.prototype._isBuffer=!0;j.isBuffer=function(e){return!!(e!=null&&e._isBuffer)};at.alloc=function(r){var e=new j(r);return e.fill(0),e};at.from=function(r){return new j(r)};var _e={},on,Tu=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];_e.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};_e.getSymbolTotalCodewords=function(e){return Tu[e]};_e.getBCHDigit=function(r){for(var e=0;r!==0;)e++,r>>>=1;return e};_e.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');on=e};_e.isKanjiModeEnabled=function(){return typeof on<"u"};_e.toSJIS=function(e){return on(e)};var Wr={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");var i=t.toLowerCase();switch(i){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,n){if(r.isValid(i))return i;try{return e(i)}catch{return n}}})(Wr);function aa(){this.buffer=[],this.length=0}aa.prototype={get:function(r){var e=Math.floor(r/8);return(this.buffer[e]>>>7-r%8&1)===1},put:function(r,e){for(var t=0;t<e;t++)this.putBit((r>>>e-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),r&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Cu=aa,jn=at;function hr(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=jn.alloc(r*r),this.reservedBit=jn.alloc(r*r)}hr.prototype.set=function(r,e,t,i){var n=r*this.size+e;this.data[n]=t,i&&(this.reservedBit[n]=!0)};hr.prototype.get=function(r,e){return this.data[r*this.size+e]};hr.prototype.xor=function(r,e,t){this.data[r*this.size+e]^=t};hr.prototype.isReserved=function(r,e){return this.reservedBit[r*this.size+e]};var Ou=hr,ca={};(function(r){var e=_e.getSymbolSize;r.getRowColCoords=function(i){if(i===1)return[];for(var n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,a=[s-7],c=1;c<n-1;c++)a[c]=a[c-1]-o;return a.push(6),a.reverse()},r.getPositions=function(i){for(var n=[],s=r.getRowColCoords(i),o=s.length,a=0;a<o;a++)for(var c=0;c<o;c++)a===0&&c===0||a===0&&c===o-1||a===o-1&&c===0||n.push([s[a],s[c]]);return n}})(ca);var la={},$u=_e.getSymbolSize,zn=7;la.getPositions=function(e){var t=$u(e);return[[0,0],[t-zn,0],[0,t-zn]]};var ua={};(function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var e={N1:3,N2:3,N3:40,N4:10};r.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},r.from=function(n){return r.isValid(n)?parseInt(n,10):void 0},r.getPenaltyN1=function(n){for(var s=n.size,o=0,a=0,c=0,l=null,u=null,h=0;h<s;h++){a=c=0,l=u=null;for(var p=0;p<s;p++){var d=n.get(h,p);d===l?a++:(a>=5&&(o+=e.N1+(a-5)),l=d,a=1),d=n.get(p,h),d===u?c++:(c>=5&&(o+=e.N1+(c-5)),u=d,c=1)}a>=5&&(o+=e.N1+(a-5)),c>=5&&(o+=e.N1+(c-5))}return o},r.getPenaltyN2=function(n){for(var s=n.size,o=0,a=0;a<s-1;a++)for(var c=0;c<s-1;c++){var l=n.get(a,c)+n.get(a,c+1)+n.get(a+1,c)+n.get(a+1,c+1);(l===4||l===0)&&o++}return o*e.N2},r.getPenaltyN3=function(n){for(var s=n.size,o=0,a=0,c=0,l=0;l<s;l++){a=c=0;for(var u=0;u<s;u++)a=a<<1&2047|n.get(l,u),u>=10&&(a===1488||a===93)&&o++,c=c<<1&2047|n.get(u,l),u>=10&&(c===1488||c===93)&&o++}return o*e.N3},r.getPenaltyN4=function(n){for(var s=0,o=n.data.length,a=0;a<o;a++)s+=n.data[a];var c=Math.abs(Math.ceil(s*100/o/5)-10);return c*e.N4};function t(i,n,s){switch(i){case r.Patterns.PATTERN000:return(n+s)%2===0;case r.Patterns.PATTERN001:return n%2===0;case r.Patterns.PATTERN010:return s%3===0;case r.Patterns.PATTERN011:return(n+s)%3===0;case r.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case r.Patterns.PATTERN101:return n*s%2+n*s%3===0;case r.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case r.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}r.applyMask=function(n,s){for(var o=s.size,a=0;a<o;a++)for(var c=0;c<o;c++)s.isReserved(c,a)||s.xor(c,a,t(n,c,a))},r.getBestMask=function(n,s){for(var o=Object.keys(r.Patterns).length,a=0,c=1/0,l=0;l<o;l++){s(l),r.applyMask(l,n);var u=r.getPenaltyN1(n)+r.getPenaltyN2(n)+r.getPenaltyN3(n)+r.getPenaltyN4(n);r.applyMask(l,n),u<c&&(c=u,a=l)}return a}})(ua);var Hr={},tt=Wr,wr=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],_r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Hr.getBlocksCount=function(e,t){switch(t){case tt.L:return wr[(e-1)*4+0];case tt.M:return wr[(e-1)*4+1];case tt.Q:return wr[(e-1)*4+2];case tt.H:return wr[(e-1)*4+3];default:return}};Hr.getTotalCodewordsCount=function(e,t){switch(t){case tt.L:return _r[(e-1)*4+0];case tt.M:return _r[(e-1)*4+1];case tt.Q:return _r[(e-1)*4+2];case tt.H:return _r[(e-1)*4+3];default:return}};var ha={},Jr={},da=at,Zt=da.alloc(512),Or=da.alloc(256);(function(){for(var e=1,t=0;t<255;t++)Zt[t]=e,Or[e]=t,e<<=1,e&256&&(e^=285);for(t=255;t<512;t++)Zt[t]=Zt[t-255]})();Jr.log=function(e){if(e<1)throw new Error("log("+e+")");return Or[e]};Jr.exp=function(e){return Zt[e]};Jr.mul=function(e,t){return e===0||t===0?0:Zt[Or[e]+Or[t]]};(function(r){var e=at,t=Jr;r.mul=function(n,s){for(var o=e.alloc(n.length+s.length-1),a=0;a<n.length;a++)for(var c=0;c<s.length;c++)o[a+c]^=t.mul(n[a],s[c]);return o},r.mod=function(n,s){for(var o=e.from(n);o.length-s.length>=0;){for(var a=o[0],c=0;c<s.length;c++)o[c]^=t.mul(s[c],a);for(var l=0;l<o.length&&o[l]===0;)l++;o=o.slice(l)}return o},r.generateECPolynomial=function(n){for(var s=e.from([1]),o=0;o<n;o++)s=r.mul(s,[1,t.exp(o)]);return s}})(ha);var Kn=at,fa=ha,ku=E.bufferPolyfill.Buffer;function an(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}an.prototype.initialize=function(e){this.degree=e,this.genPoly=fa.generateECPolynomial(this.degree)};an.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var t=Kn.alloc(this.degree),i=ku.concat([e,t],e.length+this.degree),n=fa.mod(i,this.genPoly),s=this.degree-n.length;if(s>0){var o=Kn.alloc(this.degree);return n.copy(o,s),o}return n};var Mu=an,pa={},ct={},cn={};cn.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var je={},ga="[0-9]+",Lu="[A-Z $%*+\\-./:]+",nr="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";nr=nr.replace(/u/g,"\\u");var Du="(?:(?![A-Z0-9 $%*+\\-./:]|"+nr+`)(?:.|[\r
2
2
  ]))+`;je.KANJI=new RegExp(nr,"g");je.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");je.BYTE=new RegExp(Du,"g");je.NUMERIC=new RegExp(ga,"g");je.ALPHANUMERIC=new RegExp(Lu,"g");var Fu=new RegExp("^"+nr+"$"),qu=new RegExp("^"+ga+"$"),Bu=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");je.testKanji=function(e){return Fu.test(e)};je.testNumeric=function(e){return qu.test(e)};je.testAlphanumeric=function(e){return Bu.test(e)};(function(r){var e=cn,t=je;r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},r.getBestModeForData=function(s){return t.testNumeric(s)?r.NUMERIC:t.testAlphanumeric(s)?r.ALPHANUMERIC:t.testKanji(s)?r.KANJI:r.BYTE},r.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},r.isValid=function(s){return s&&s.bit&&s.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");var s=n.toLowerCase();switch(s){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+n)}}r.from=function(s,o){if(r.isValid(s))return s;try{return i(s)}catch{return o}}})(ct);(function(r){var e=_e,t=Hr,i=Wr,n=ct,s=cn,o=tn,a=7973,c=e.getBCHDigit(a);function l(d,f,g){for(var y=1;y<=40;y++)if(f<=r.getCapacity(y,g,d))return y}function u(d,f){return n.getCharCountIndicator(d,f)+4}function h(d,f){var g=0;return d.forEach(function(y){var m=u(y.mode,f);g+=m+y.getBitsLength()}),g}function p(d,f){for(var g=1;g<=40;g++){var y=h(d,g);if(y<=r.getCapacity(g,f,n.MIXED))return g}}r.from=function(f,g){return s.isValid(f)?parseInt(f,10):g},r.getCapacity=function(f,g,y){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof y>"u"&&(y=n.BYTE);var m=e.getSymbolTotalCodewords(f),v=t.getTotalCodewordsCount(f,g),b=(m-v)*8;if(y===n.MIXED)return b;var w=b-u(y,f);switch(y){case n.NUMERIC:return Math.floor(w/10*3);case n.ALPHANUMERIC:return Math.floor(w/11*2);case n.KANJI:return Math.floor(w/13);case n.BYTE:default:return Math.floor(w/8)}},r.getBestVersionForData=function(f,g){var y,m=i.from(g,i.M);if(o(f)){if(f.length>1)return p(f,m);if(f.length===0)return 1;y=f[0]}else y=f;return l(y.mode,y.getLength(),m)},r.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");for(var g=f<<12;e.getBCHDigit(g)-c>=0;)g^=a<<e.getBCHDigit(g)-c;return f<<12|g}})(pa);var ya={},$i=_e,ma=1335,Uu=21522,Vn=$i.getBCHDigit(ma);ya.getEncodedBits=function(e,t){for(var i=e.bit<<3|t,n=i<<10;$i.getBCHDigit(n)-Vn>=0;)n^=ma<<$i.getBCHDigit(n)-Vn;return(i<<10|n)^Uu};var va={},ju=ct;function Tt(r){this.mode=ju.NUMERIC,this.data=r.toString()}Tt.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};Tt.prototype.getLength=function(){return this.data.length};Tt.prototype.getBitsLength=function(){return Tt.getBitsLength(this.data.length)};Tt.prototype.write=function(e){var t,i,n;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),n=parseInt(i,10),e.put(n,10);var s=this.data.length-t;s>0&&(i=this.data.substr(t),n=parseInt(i,10),e.put(n,s*3+1))};var zu=Tt,Ku=ct,ui=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Ct(r){this.mode=Ku.ALPHANUMERIC,this.data=r}Ct.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Ct.prototype.getLength=function(){return this.data.length};Ct.prototype.getBitsLength=function(){return Ct.getBitsLength(this.data.length)};Ct.prototype.write=function(e){var t;for(t=0;t+2<=this.data.length;t+=2){var i=ui.indexOf(this.data[t])*45;i+=ui.indexOf(this.data[t+1]),e.put(i,11)}this.data.length%2&&e.put(ui.indexOf(this.data[t]),6)};var Vu=Ct,Wu=at,Hu=ct;function Ot(r){this.mode=Hu.BYTE,this.data=Wu.from(r)}Ot.getBitsLength=function(e){return e*8};Ot.prototype.getLength=function(){return this.data.length};Ot.prototype.getBitsLength=function(){return Ot.getBitsLength(this.data.length)};Ot.prototype.write=function(r){for(var e=0,t=this.data.length;e<t;e++)r.put(this.data[e],8)};var Ju=Ot,Gu=ct,Yu=_e;function $t(r){this.mode=Gu.KANJI,this.data=r}$t.getBitsLength=function(e){return e*13};$t.prototype.getLength=function(){return this.data.length};$t.prototype.getBitsLength=function(){return $t.getBitsLength(this.data.length)};$t.prototype.write=function(r){var e;for(e=0;e<this.data.length;e++){var t=Yu.toSJIS(this.data[e]);if(t>=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
3
3
  Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),r.put(t,13)}};var Qu=$t;(function(r){var e=ct,t=zu,i=Vu,n=Ju,s=Qu,o=je,a=_e,c=pl.dijkstraExports;function l(m){return unescape(encodeURIComponent(m)).length}function u(m,v,b){for(var w=[],S;(S=m.exec(b))!==null;)w.push({data:S[0],index:S.index,mode:v,length:S[0].length});return w}function h(m){var v=u(o.NUMERIC,e.NUMERIC,m),b=u(o.ALPHANUMERIC,e.ALPHANUMERIC,m),w,S;a.isKanjiModeEnabled()?(w=u(o.BYTE,e.BYTE,m),S=u(o.KANJI,e.KANJI,m)):(w=u(o.BYTE_KANJI,e.BYTE,m),S=[]);var I=v.concat(b,w,S);return I.sort(function(x,A){return x.index-A.index}).map(function(x){return{data:x.data,mode:x.mode,length:x.length}})}function p(m,v){switch(v){case e.NUMERIC:return t.getBitsLength(m);case e.ALPHANUMERIC:return i.getBitsLength(m);case e.KANJI:return s.getBitsLength(m);case e.BYTE:return n.getBitsLength(m)}}function d(m){return m.reduce(function(v,b){var w=v.length-1>=0?v[v.length-1]:null;return w&&w.mode===b.mode?(v[v.length-1].data+=b.data,v):(v.push(b),v)},[])}function f(m){for(var v=[],b=0;b<m.length;b++){var w=m[b];switch(w.mode){case e.NUMERIC:v.push([w,{data:w.data,mode:e.ALPHANUMERIC,length:w.length},{data:w.data,mode:e.BYTE,length:w.length}]);break;case e.ALPHANUMERIC:v.push([w,{data:w.data,mode:e.BYTE,length:w.length}]);break;case e.KANJI:v.push([w,{data:w.data,mode:e.BYTE,length:l(w.data)}]);break;case e.BYTE:v.push([{data:w.data,mode:e.BYTE,length:l(w.data)}])}}return v}function g(m,v){for(var b={},w={start:{}},S=["start"],I=0;I<m.length;I++){for(var x=m[I],A=[],C=0;C<x.length;C++){var O=x[C],$=""+I+C;A.push($),b[$]={node:O,lastCount:0},w[$]={};for(var D=0;D<S.length;D++){var k=S[D];b[k]&&b[k].node.mode===O.mode?(w[k][$]=p(b[k].lastCount+O.length,O.mode)-p(b[k].lastCount,O.mode),b[k].lastCount+=O.length):(b[k]&&(b[k].lastCount=O.length),w[k][$]=p(O.length,O.mode)+4+e.getCharCountIndicator(O.mode,v))}}S=A}for(D=0;D<S.length;D++)w[S[D]].end=0;return{map:w,table:b}}function y(m,v){var b,w=e.getBestModeForData(m);if(b=e.from(v,w),b!==e.BYTE&&b.bit<w.bit)throw new Error('"'+m+'" cannot be encoded with mode '+e.toString(b)+`.
4
4
  Suggested mode is: `+e.toString(w));switch(b===e.KANJI&&!a.isKanjiModeEnabled()&&(b=e.BYTE),b){case e.NUMERIC:return new t(m);case e.ALPHANUMERIC:return new i(m);case e.KANJI:return new s(m);case e.BYTE:return new n(m)}}r.fromArray=function(v){return v.reduce(function(b,w){return typeof w=="string"?b.push(y(w,null)):w.data&&b.push(y(w.data,w.mode)),b},[])},r.fromString=function(v,b){for(var w=h(v,a.isKanjiModeEnabled()),S=f(w),I=g(S,b),x=c.find_path(I.map,"start","end"),A=[],C=1;C<x.length-1;C++)A.push(I.table[x[C]].node);return r.fromArray(d(A))},r.rawSplit=function(v){return r.fromArray(h(v,a.isKanjiModeEnabled()))}})(va);var Wn=at,Gr=_e,hi=Wr,Xu=Cu,Zu=Ou,eh=ca,th=la,ki=ua,Mi=Hr,rh=Mu,$r=pa,ih=ya,nh=ct,di=va,sh=tn;function oh(r,e){for(var t=r.size,i=th.getPositions(e),n=0;n<i.length;n++)for(var s=i[n][0],o=i[n][1],a=-1;a<=7;a++)if(!(s+a<=-1||t<=s+a))for(var c=-1;c<=7;c++)o+c<=-1||t<=o+c||(a>=0&&a<=6&&(c===0||c===6)||c>=0&&c<=6&&(a===0||a===6)||a>=2&&a<=4&&c>=2&&c<=4?r.set(s+a,o+c,!0,!0):r.set(s+a,o+c,!1,!0))}function ah(r){for(var e=r.size,t=8;t<e-8;t++){var i=t%2===0;r.set(t,6,i,!0),r.set(6,t,i,!0)}}function ch(r,e){for(var t=eh.getPositions(e),i=0;i<t.length;i++)for(var n=t[i][0],s=t[i][1],o=-2;o<=2;o++)for(var a=-2;a<=2;a++)o===-2||o===2||a===-2||a===2||o===0&&a===0?r.set(n+o,s+a,!0,!0):r.set(n+o,s+a,!1,!0)}function lh(r,e){for(var t=r.size,i=$r.getEncodedBits(e),n,s,o,a=0;a<18;a++)n=Math.floor(a/3),s=a%3+t-8-3,o=(i>>a&1)===1,r.set(n,s,o,!0),r.set(s,n,o,!0)}function fi(r,e,t){var i=r.size,n=ih.getEncodedBits(e,t),s,o;for(s=0;s<15;s++)o=(n>>s&1)===1,s<6?r.set(s,8,o,!0):s<8?r.set(s+1,8,o,!0):r.set(i-15+s,8,o,!0),s<8?r.set(8,i-s-1,o,!0):s<9?r.set(8,15-s-1+1,o,!0):r.set(8,15-s-1,o,!0);r.set(i-8,8,1,!0)}function uh(r,e){for(var t=r.size,i=-1,n=t-1,s=7,o=0,a=t-1;a>0;a-=2)for(a===6&&a--;;){for(var c=0;c<2;c++)if(!r.isReserved(n,a-c)){var l=!1;o<e.length&&(l=(e[o]>>>s&1)===1),r.set(n,a-c,l),s--,s===-1&&(o++,s=7)}if(n+=i,n<0||t<=n){n-=i,i=-i;break}}}function hh(r,e,t){var i=new Xu;t.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),nh.getCharCountIndicator(l.mode,r)),l.write(i)});var n=Gr.getSymbolTotalCodewords(r),s=Mi.getTotalCodewordsCount(r,e),o=(n-s)*8;for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);for(var a=(o-i.getLengthInBits())/8,c=0;c<a;c++)i.put(c%2?17:236,8);return dh(i,r,e)}function dh(r,e,t){for(var i=Gr.getSymbolTotalCodewords(e),n=Mi.getTotalCodewordsCount(e,t),s=i-n,o=Mi.getBlocksCount(e,t),a=i%o,c=o-a,l=Math.floor(i/o),u=Math.floor(s/o),h=u+1,p=l-u,d=new rh(p),f=0,g=new Array(o),y=new Array(o),m=0,v=Wn.from(r.buffer),b=0;b<o;b++){var w=b<c?u:h;g[b]=v.slice(f,f+w),y[b]=d.encode(g[b]),f+=w,m=Math.max(m,w)}var S=Wn.alloc(i),I=0,x,A;for(x=0;x<m;x++)for(A=0;A<o;A++)x<g[A].length&&(S[I++]=g[A][x]);for(x=0;x<p;x++)for(A=0;A<o;A++)S[I++]=y[A][x];return S}function fh(r,e,t,i){var n;if(sh(r))n=di.fromArray(r);else if(typeof r=="string"){var s=e;if(!s){var o=di.rawSplit(r);s=$r.getBestVersionForData(o,t)}n=di.fromString(r,s||40)}else throw new Error("Invalid data");var a=$r.getBestVersionForData(n,t);if(!a)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=a;else if(e<a)throw new Error(`
@@ -1 +1 @@
1
- "use strict";const me=Symbol(),se=Object.getPrototypeOf,G=new WeakMap,he=e=>e&&(G.has(e)?G.get(e):se(e)===Object.prototype||se(e)===Array.prototype),ge=e=>he(e)&&e[me]||null,ne=(e,t=!0)=>{G.set(e,t)},H={},F=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,g)=>new Proxy(n,g),s=n=>F(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,g,I=r)=>{const v=l.get(n);if((v==null?void 0:v[0])===g)return v[1];const w=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return ne(w,!0),l.set(n,[g,w]),Reflect.ownKeys(n).forEach(k=>{if(Object.getOwnPropertyDescriptor(w,k))return;const O=Reflect.get(n,k),M={value:O,enumerable:!0,configurable:!0};if(x.has(O))ne(O,!1);else if(O instanceof Promise)delete M.value,M.get=()=>I(O);else if(A.has(O)){const[b,q]=A.get(O);M.value=c(b,q(),I)}Object.defineProperty(w,k,M)}),Object.preventExtensions(w)},m=new WeakMap,p=[1,1],E=n=>{if(!F(n))throw new Error("object required");const g=m.get(n);if(g)return g;let I=p[0];const v=new Set,w=(i,a=++p[0])=>{I!==a&&(I=a,v.forEach(o=>o(i,a)))};let k=p[1];const O=(i=++p[1])=>(k!==i&&!v.size&&(k=i,b.forEach(([a])=>{const o=a[1](i);o>I&&(I=o)})),I),M=i=>(a,o)=>{const h=[...a];h[1]=[i,...h[1]],w(h,o)},b=new Map,q=(i,a)=>{if((H?"production":void 0)!=="production"&&b.has(i))throw new Error("prop listener already exists");if(v.size){const o=a[3](M(i));b.set(i,[a,o])}else b.set(i,[a])},te=i=>{var a;const o=b.get(i);o&&(b.delete(i),(a=o[1])==null||a.call(o))},fe=i=>(v.add(i),v.size===1&&b.forEach(([o,h],_)=>{if((H?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const T=o[3](M(_));b.set(_,[o,T])}),()=>{v.delete(i),v.size===0&&b.forEach(([o,h],_)=>{h&&(h(),b.set(_,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),$=t(J,{deleteProperty(i,a){const o=Reflect.get(i,a);te(a);const h=Reflect.deleteProperty(i,a);return h&&w(["delete",[a],o]),h},set(i,a,o,h){const _=Reflect.has(i,a),T=Reflect.get(i,a,h);if(_&&(e(T,o)||m.has(o)&&e(T,m.get(o))))return!0;te(a),F(o)&&(o=ge(o)||o);let V=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,w(["resolve",[a],C])}).catch(C=>{o.status="rejected",o.reason=C,w(["reject",[a],C])});else{!A.has(o)&&s(o)&&(V=E(o));const C=!x.has(V)&&A.get(V);C&&q(a,C)}return Reflect.set(i,a,V,h),w(["set",[a],o,T]),!0}});m.set(n,$);const pe=[J,O,c,fe];return A.set($,pe),Reflect.ownKeys(n).forEach(i=>{const a=Object.getOwnPropertyDescriptor(n,i);"value"in a&&($[i]=n[i],delete a.value,delete a.writable),Object.defineProperty(J,i,a)}),$})=>[E,A,x,e,t,s,r,l,c,m,p],[ye]=be();function j(e={}){return ye(e)}function D(e,t,s){const r=A.get(e);(H?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let p=!1;const n=m(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,p&&t(c.splice(0))}))});return p=!0,()=>{p=!1,n()}}function ve(e,t){const s=A.get(e);(H?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ee={state:d,subscribe(e){return D(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},u={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return u.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return u.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(u.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!u.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(u.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(u.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(u.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(u.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=ee.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),f=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),ue={state:f,subscribe(e){return D(f.events,()=>e(ve(f.events[f.events.length-1])))},initialize(){f.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(f.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){f.connectedWalletId=e},click(e){if(f.enabled){const t={type:"CLICK",name:e.name,userSessionId:f.userSessionId,timestamp:Date.now(),data:e};f.events.push(t)}},track(e){if(f.enabled){const t={type:"TRACK",name:e.name,userSessionId:f.userSessionId,timestamp:Date.now(),data:e};f.events.push(t)}},view(e){if(f.enabled){const t={type:"VIEW",name:e.name,userSessionId:f.userSessionId,timestamp:Date.now(),data:e};f.events.push(t)}}},L=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),y={state:L,subscribe(e){return D(L,()=>e(L))},setChains(e){L.chains=e},setWalletConnectUri(e){L.walletConnectUri=e},setIsCustomDesktop(e){L.isCustomDesktop=e},setIsCustomMobile(e){L.isCustomMobile=e},setIsDataLoaded(e){L.isDataLoaded=e},setIsUiLoaded(e){L.isUiLoaded=e},setIsAuth(e){L.isAuth=e}},B=j({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),S={state:B,subscribe(e){return D(B,()=>e(B))},setConfig(e){var t,s;ue.initialize(),y.setChains(e.chains),y.setIsAuth(!!e.enableAuthMode),y.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),y.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),u.setModalVersionInStorage(),Object.assign(B,e)}};var Ie=Object.defineProperty,oe=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Oe=(e,t)=>{for(var s in t||(t={}))Le.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))We.call(t,s)&&re(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=Oe({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",S.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const U={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Q}/w3m/v1/getWalletImage/${e}?projectId=${S.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${S.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ee=Object.defineProperty,ae=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,ie=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,je=(e,t)=>{for(var s in t||(t={}))Ce.call(t,s)&&ie(e,s,t[s]);if(ae)for(var s of ae(t))Ae.call(t,s)&&ie(e,s,t[s]);return e};const le=u.isMobile(),W=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Me={state:W,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=S.state;if(e==="NONE"||t==="ALL"&&!e)return W.recomendedWallets;if(u.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await U.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const p=e.indexOf(c.id),E=e.indexOf(m.id);return p-E}),W.recomendedWallets=l}else{const{chains:s,isAuth:r}=y.state,l=s==null?void 0:s.join(","),c=u.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:u.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:p}=le?await U.getMobileListings(m):await U.getDesktopListings(m);W.recomendedWallets=Object.values(p)}return W.recomendedWallets},async getWallets(e){const t=je({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=S.state,{recomendedWallets:l}=W;if(r==="ALL")return W.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):u.isArray(s)&&(t.excludedIds=s.join(",")),u.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),y.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:p,total:E}=le?await U.getMobileListings(t):await U.getDesktopListings(t),n=Object.values(p),g=m?"search":"wallets";return W[g]={listings:[...W[g].listings,...n],total:E,page:c??1},{listings:n,total:E}},getWalletImageUrl(e){return U.getWalletImageUrl(e)},getAssetImageUrl(e){return U.getAssetImageUrl(e)},resetSearch(){W.search={listings:[],total:0,page:1}}},N=j({open:!1}),z={state:N,subscribe(e){return D(N,()=>e(N))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=y.state;if(u.removeWalletConnectDeepLink(),y.setWalletConnectUri(e==null?void 0:e.uri),y.setChains(e==null?void 0:e.chains),ee.reset("ConnectWallet"),s&&r)N.open=!0,t();else{const l=setInterval(()=>{const c=y.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),N.open=!0,t())},200)}})},close(){N.open=!1}};var Ue=Object.defineProperty,ce=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,de=(e,t,s)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,De=(e,t)=>{for(var s in t||(t={}))Pe.call(t,s)&&de(e,s,t[s]);if(ce)for(var s of ce(t))Se.call(t,s)&&de(e,s,t[s]);return e};function ke(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=j({themeMode:ke()?"dark":"light"}),Z={state:R,subscribe(e){return D(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=De({},s))}},P=j({open:!1,message:"",variant:"success"}),_e={state:P,subscribe(e){return D(P,()=>e(P))},openToast(e,t){P.open=!0,P.message=e,P.variant=t},closeToast(){P.open=!1}};class Ne{constructor(t){this.openModal=z.open,this.closeModal=z.close,this.subscribeModal=z.subscribe,this.setTheme=Z.setThemeConfig,Z.setThemeConfig(t),S.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>require("./index-DCRe22Ms.js"));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),y.setIsUiLoaded(!0)}}}const Te=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Ne},Symbol.toStringTag,{value:"Module"}));exports.R=ue;exports.T=ee;exports.a=u;exports.index=Te;exports.ne=Z;exports.oe=_e;exports.p=y;exports.se=z;exports.te=Me;exports.y=S;
1
+ "use strict";const me=Symbol(),se=Object.getPrototypeOf,G=new WeakMap,he=e=>e&&(G.has(e)?G.get(e):se(e)===Object.prototype||se(e)===Array.prototype),ge=e=>he(e)&&e[me]||null,ne=(e,t=!0)=>{G.set(e,t)},H={},F=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,g)=>new Proxy(n,g),s=n=>F(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,g,I=r)=>{const v=l.get(n);if((v==null?void 0:v[0])===g)return v[1];const w=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return ne(w,!0),l.set(n,[g,w]),Reflect.ownKeys(n).forEach(k=>{if(Object.getOwnPropertyDescriptor(w,k))return;const O=Reflect.get(n,k),M={value:O,enumerable:!0,configurable:!0};if(x.has(O))ne(O,!1);else if(O instanceof Promise)delete M.value,M.get=()=>I(O);else if(A.has(O)){const[b,q]=A.get(O);M.value=c(b,q(),I)}Object.defineProperty(w,k,M)}),Object.preventExtensions(w)},m=new WeakMap,p=[1,1],E=n=>{if(!F(n))throw new Error("object required");const g=m.get(n);if(g)return g;let I=p[0];const v=new Set,w=(i,a=++p[0])=>{I!==a&&(I=a,v.forEach(o=>o(i,a)))};let k=p[1];const O=(i=++p[1])=>(k!==i&&!v.size&&(k=i,b.forEach(([a])=>{const o=a[1](i);o>I&&(I=o)})),I),M=i=>(a,o)=>{const h=[...a];h[1]=[i,...h[1]],w(h,o)},b=new Map,q=(i,a)=>{if((H?"production":void 0)!=="production"&&b.has(i))throw new Error("prop listener already exists");if(v.size){const o=a[3](M(i));b.set(i,[a,o])}else b.set(i,[a])},te=i=>{var a;const o=b.get(i);o&&(b.delete(i),(a=o[1])==null||a.call(o))},fe=i=>(v.add(i),v.size===1&&b.forEach(([o,h],_)=>{if((H?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const T=o[3](M(_));b.set(_,[o,T])}),()=>{v.delete(i),v.size===0&&b.forEach(([o,h],_)=>{h&&(h(),b.set(_,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),$=t(J,{deleteProperty(i,a){const o=Reflect.get(i,a);te(a);const h=Reflect.deleteProperty(i,a);return h&&w(["delete",[a],o]),h},set(i,a,o,h){const _=Reflect.has(i,a),T=Reflect.get(i,a,h);if(_&&(e(T,o)||m.has(o)&&e(T,m.get(o))))return!0;te(a),F(o)&&(o=ge(o)||o);let V=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,w(["resolve",[a],C])}).catch(C=>{o.status="rejected",o.reason=C,w(["reject",[a],C])});else{!A.has(o)&&s(o)&&(V=E(o));const C=!x.has(V)&&A.get(V);C&&q(a,C)}return Reflect.set(i,a,V,h),w(["set",[a],o,T]),!0}});m.set(n,$);const pe=[J,O,c,fe];return A.set($,pe),Reflect.ownKeys(n).forEach(i=>{const a=Object.getOwnPropertyDescriptor(n,i);"value"in a&&($[i]=n[i],delete a.value,delete a.writable),Object.defineProperty(J,i,a)}),$})=>[E,A,x,e,t,s,r,l,c,m,p],[ye]=be();function j(e={}){return ye(e)}function D(e,t,s){const r=A.get(e);(H?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let p=!1;const n=m(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,p&&t(c.splice(0))}))});return p=!0,()=>{p=!1,n()}}function ve(e,t){const s=A.get(e);(H?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ee={state:d,subscribe(e){return D(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},u={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return u.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return u.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(u.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!u.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(u.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(u.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(u.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(u.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=ee.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),f=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),ue={state:f,subscribe(e){return D(f.events,()=>e(ve(f.events[f.events.length-1])))},initialize(){f.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(f.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){f.connectedWalletId=e},click(e){if(f.enabled){const t={type:"CLICK",name:e.name,userSessionId:f.userSessionId,timestamp:Date.now(),data:e};f.events.push(t)}},track(e){if(f.enabled){const t={type:"TRACK",name:e.name,userSessionId:f.userSessionId,timestamp:Date.now(),data:e};f.events.push(t)}},view(e){if(f.enabled){const t={type:"VIEW",name:e.name,userSessionId:f.userSessionId,timestamp:Date.now(),data:e};f.events.push(t)}}},L=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),y={state:L,subscribe(e){return D(L,()=>e(L))},setChains(e){L.chains=e},setWalletConnectUri(e){L.walletConnectUri=e},setIsCustomDesktop(e){L.isCustomDesktop=e},setIsCustomMobile(e){L.isCustomMobile=e},setIsDataLoaded(e){L.isDataLoaded=e},setIsUiLoaded(e){L.isUiLoaded=e},setIsAuth(e){L.isAuth=e}},B=j({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),S={state:B,subscribe(e){return D(B,()=>e(B))},setConfig(e){var t,s;ue.initialize(),y.setChains(e.chains),y.setIsAuth(!!e.enableAuthMode),y.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),y.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),u.setModalVersionInStorage(),Object.assign(B,e)}};var Ie=Object.defineProperty,oe=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Oe=(e,t)=>{for(var s in t||(t={}))Le.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))We.call(t,s)&&re(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=Oe({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",S.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const U={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Q}/w3m/v1/getWalletImage/${e}?projectId=${S.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${S.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ee=Object.defineProperty,ae=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,ie=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,je=(e,t)=>{for(var s in t||(t={}))Ce.call(t,s)&&ie(e,s,t[s]);if(ae)for(var s of ae(t))Ae.call(t,s)&&ie(e,s,t[s]);return e};const le=u.isMobile(),W=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Me={state:W,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=S.state;if(e==="NONE"||t==="ALL"&&!e)return W.recomendedWallets;if(u.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await U.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const p=e.indexOf(c.id),E=e.indexOf(m.id);return p-E}),W.recomendedWallets=l}else{const{chains:s,isAuth:r}=y.state,l=s==null?void 0:s.join(","),c=u.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:u.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:p}=le?await U.getMobileListings(m):await U.getDesktopListings(m);W.recomendedWallets=Object.values(p)}return W.recomendedWallets},async getWallets(e){const t=je({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=S.state,{recomendedWallets:l}=W;if(r==="ALL")return W.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):u.isArray(s)&&(t.excludedIds=s.join(",")),u.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),y.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:p,total:E}=le?await U.getMobileListings(t):await U.getDesktopListings(t),n=Object.values(p),g=m?"search":"wallets";return W[g]={listings:[...W[g].listings,...n],total:E,page:c??1},{listings:n,total:E}},getWalletImageUrl(e){return U.getWalletImageUrl(e)},getAssetImageUrl(e){return U.getAssetImageUrl(e)},resetSearch(){W.search={listings:[],total:0,page:1}}},N=j({open:!1}),z={state:N,subscribe(e){return D(N,()=>e(N))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=y.state;if(u.removeWalletConnectDeepLink(),y.setWalletConnectUri(e==null?void 0:e.uri),y.setChains(e==null?void 0:e.chains),ee.reset("ConnectWallet"),s&&r)N.open=!0,t();else{const l=setInterval(()=>{const c=y.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),N.open=!0,t())},200)}})},close(){N.open=!1}};var Ue=Object.defineProperty,ce=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,de=(e,t,s)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,De=(e,t)=>{for(var s in t||(t={}))Pe.call(t,s)&&de(e,s,t[s]);if(ce)for(var s of ce(t))Se.call(t,s)&&de(e,s,t[s]);return e};function ke(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=j({themeMode:ke()?"dark":"light"}),Z={state:R,subscribe(e){return D(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=De({},s))}},P=j({open:!1,message:"",variant:"success"}),_e={state:P,subscribe(e){return D(P,()=>e(P))},openToast(e,t){P.open=!0,P.message=e,P.variant=t},closeToast(){P.open=!1}};class Ne{constructor(t){this.openModal=z.open,this.closeModal=z.close,this.subscribeModal=z.subscribe,this.setTheme=Z.setThemeConfig,Z.setThemeConfig(t),S.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>require("./index-20yIH7p6.js"));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),y.setIsUiLoaded(!0)}}}const Te=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Ne},Symbol.toStringTag,{value:"Module"}));exports.R=ue;exports.T=ee;exports.a=u;exports.index=Te;exports.ne=Z;exports.oe=_e;exports.p=y;exports.se=z;exports.te=Me;exports.y=S;
@@ -1,8 +1,8 @@
1
- import { aP as Do, cO as uy, O as De, cP as Zy, Q as Pv, cQ as eg, cR as tg, av as ng } from "./index-CUMRJ8yy.mjs";
2
- import { e as iy, d as ag } from "./base64-D3sIs-fw.mjs";
1
+ import { aP as Do, cO as uy, O as De, cP as Zy, Q as Pv, cQ as eg, cR as tg, av as ng } from "./index-ObRYlj1l.mjs";
2
+ import { e as iy, d as ag } from "./base64-r6lIUfD-.mjs";
3
3
  import * as Wf from "react";
4
4
  import d1, { createContext as lg, useState as is, useEffect as Ky, useCallback as ug, useContext as ig } from "react";
5
- import { L as ot, B as mn, d as i2, a as o0, h as U2, b as og, c as w9, g as od, e as Jy, k as cd, f as wr, i as cg, j as Tr, D as vs } from "./index-DS_rORqD.mjs";
5
+ import { L as ot, B as mn, d as i2, a as o0, h as U2, b as og, c as w9, g as od, e as Jy, k as cd, f as wr, i as cg, j as Tr, D as vs } from "./index-CIWjtrm4.mjs";
6
6
  function rd(c, i) {
7
7
  (i == null || i > c.length) && (i = c.length);
8
8
  for (var d = 0, f = new Array(i); d < i; d++) f[d] = c[d];
@@ -1,6 +1,6 @@
1
- import { s as ce, T as N, o as ot, n as _t, R as Do, t as H, y as gt, a as C, p as K } from "./index-DfPjBy3w.mjs";
1
+ import { s as ce, T as N, o as ot, n as _t, R as Do, t as H, y as gt, a as C, p as K } from "./index-CxnykIim.mjs";
2
2
  import { d as Uo } from "./dijkstra-BZM-8g-B.mjs";
3
- import { O as Wo } from "./index-CUMRJ8yy.mjs";
3
+ import { O as Wo } from "./index-ObRYlj1l.mjs";
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2019 Google LLC
@@ -1 +1 @@
1
- "use strict";var h=Object.defineProperty;var w=(o,t,e)=>t in o?h(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var s=(o,t,e)=>w(o,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-Cvtp4dgE.js");class c{constructor(t,e,a,r){s(this,"network");s(this,"chain");s(this,"provider");s(this,"contracts");s(this,"chainId");s(this,"core");s(this,"gatewayAddress");s(this,"gateway");s(this,"tbtcTokenAddr");if(this.network=t,this.chain=e,this.provider=a,this.contracts=r,this.network!=="Mainnet")throw new Error("TBTC is only supported on Mainnet");if(!this.contracts.tbtc)throw new Error("TBTC contract address is required");const i=n.TBTCBridge.getNativeTbtcToken(this.chain);if(!i)throw new Error("Native tbtc token not found");this.chainId=n.networkChainToNativeChainId.get(t,e),this.core=new n.EvmWormholeCore(t,e,a,r),this.gatewayAddress=this.contracts.tbtc,this.gateway=new n.Contract(this.gatewayAddress,["function sendTbtc(uint256 amount, uint16 recipientChain, bytes32 recipient, uint256 arbiterFee, uint32 nonce) payable returns (uint64)","function receiveTbtc(bytes calldata encodedVm)"],a),this.tbtcTokenAddr=n.canonicalAddress(i)}static async fromRpc(t,e){const[a,r]=await n.EvmPlatform.chainFromRpc(t),i=e[r];if(i.network!==a)throw new Error(`Network mismatch: ${i.network} != ${a}`);return new c(a,r,t,i.contracts)}async*transfer(t,e,a){const r=new n.EvmAddress(t).toString(),i=await this.gateway.sendTbtc.populateTransaction(a,n.toChainId(e.chain),e.address.toUniversalAddress().toUint8Array(),0n,0n);i.value=await this.core.getMessageFee(),yield*this.approve(r,a,this.gatewayAddress),yield this.createUnsignedTransaction(n.addFrom(i,r),"TBTCBridge.Send")}async*redeem(t,e){if(e.payloadName!=="GatewayTransfer")throw new Error("Invalid VAA payload");const a=new n.EvmAddress(t).toString(),r=await this.gateway.receiveTbtc.populateTransaction(n.serialize(e));yield this.createUnsignedTransaction(n.addFrom(r,a),"TBTCBridge.Redeem")}async*approve(t,e,a){const r=n.EvmPlatform.getTokenImplementation(this.provider,this.tbtcTokenAddr);if(await r.allowance(t,a)<e){const d=await r.approve.populateTransaction(a,e);yield this.createUnsignedTransaction(n.addFrom(d,t),"TBTC.Approve")}}createUnsignedTransaction(t,e){return new n.EvmUnsignedTransaction(n.addChainId(t,this.chainId),this.network,this.chain,e,!1)}}n.registerProtocol(n._platform,"TBTCBridge",c);exports.EvmTBTCBridge=c;
1
+ "use strict";var h=Object.defineProperty;var w=(o,t,e)=>t in o?h(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var s=(o,t,e)=>w(o,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-DU1he9Nx.js");class c{constructor(t,e,a,r){s(this,"network");s(this,"chain");s(this,"provider");s(this,"contracts");s(this,"chainId");s(this,"core");s(this,"gatewayAddress");s(this,"gateway");s(this,"tbtcTokenAddr");if(this.network=t,this.chain=e,this.provider=a,this.contracts=r,this.network!=="Mainnet")throw new Error("TBTC is only supported on Mainnet");if(!this.contracts.tbtc)throw new Error("TBTC contract address is required");const i=n.TBTCBridge.getNativeTbtcToken(this.chain);if(!i)throw new Error("Native tbtc token not found");this.chainId=n.networkChainToNativeChainId.get(t,e),this.core=new n.EvmWormholeCore(t,e,a,r),this.gatewayAddress=this.contracts.tbtc,this.gateway=new n.Contract(this.gatewayAddress,["function sendTbtc(uint256 amount, uint16 recipientChain, bytes32 recipient, uint256 arbiterFee, uint32 nonce) payable returns (uint64)","function receiveTbtc(bytes calldata encodedVm)"],a),this.tbtcTokenAddr=n.canonicalAddress(i)}static async fromRpc(t,e){const[a,r]=await n.EvmPlatform.chainFromRpc(t),i=e[r];if(i.network!==a)throw new Error(`Network mismatch: ${i.network} != ${a}`);return new c(a,r,t,i.contracts)}async*transfer(t,e,a){const r=new n.EvmAddress(t).toString(),i=await this.gateway.sendTbtc.populateTransaction(a,n.toChainId(e.chain),e.address.toUniversalAddress().toUint8Array(),0n,0n);i.value=await this.core.getMessageFee(),yield*this.approve(r,a,this.gatewayAddress),yield this.createUnsignedTransaction(n.addFrom(i,r),"TBTCBridge.Send")}async*redeem(t,e){if(e.payloadName!=="GatewayTransfer")throw new Error("Invalid VAA payload");const a=new n.EvmAddress(t).toString(),r=await this.gateway.receiveTbtc.populateTransaction(n.serialize(e));yield this.createUnsignedTransaction(n.addFrom(r,a),"TBTCBridge.Redeem")}async*approve(t,e,a){const r=n.EvmPlatform.getTokenImplementation(this.provider,this.tbtcTokenAddr);if(await r.allowance(t,a)<e){const d=await r.approve.populateTransaction(a,e);yield this.createUnsignedTransaction(n.addFrom(d,t),"TBTC.Approve")}}createUnsignedTransaction(t,e){return new n.EvmUnsignedTransaction(n.addChainId(t,this.chainId),this.network,this.chain,e,!1)}}n.registerProtocol(n._platform,"TBTCBridge",c);exports.EvmTBTCBridge=c;
@@ -1,8 +1,8 @@
1
1
  var V = Object.defineProperty;
2
2
  var j = (p, e, t) => e in p ? V(p, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[e] = t;
3
3
  var u = (p, e, t) => j(p, typeof e != "symbol" ? e + "" : e, t);
4
- import { b1 as D, m as C, r as T, b2 as S, av as I, j as s, b3 as z, b4 as G, E as B, b as F, b5 as f, b6 as h, b7 as H, b8 as g, b9 as M, $ as v, ba as Y, bb as J, bc as K, bd as X, be as Z, bf as tt, _ as et } from "./index-CUMRJ8yy.mjs";
5
- import { EvmTokenBridge as nt } from "./index-DYrT7_2n.mjs";
4
+ import { b1 as D, m as C, r as T, b2 as S, av as I, j as s, b3 as z, b4 as G, E as B, b as F, b5 as f, b6 as h, b7 as H, b8 as g, b9 as M, $ as v, ba as Y, bb as J, bc as K, bd as X, be as Z, bf as tt, _ as et } from "./index-ObRYlj1l.mjs";
5
+ import { EvmTokenBridge as nt } from "./index-CCJUXjWs.mjs";
6
6
  const y = new D([
7
7
  "function start((bytes32,address,address,address,address,address,uint256,uint256,uint256,uint256)) returns (address,uint16,uint64)",
8
8
  "function receiveMessageAndSwap(bytes)"
@@ -1,7 +1,7 @@
1
1
  var $ = Object.defineProperty;
2
2
  var V = (i, e, b) => e in i ? $(i, e, { enumerable: !0, configurable: !0, writable: !0, value: b }) : i[e] = b;
3
3
  var d = (i, e, b) => V(i, typeof e != "symbol" ? e + "" : e, b);
4
- import { b4 as E, E as o, bw as x, b2 as l, b9 as z, bx as L, b as c, m as k, by as j, bz as Z, ba as g, bA as W, bB as T, b8 as s, bC as _, bd as P, be as N, bv as F, b1 as q, $ as D, bf as H, _ as O } from "./index-CUMRJ8yy.mjs";
4
+ import { b4 as E, E as o, bw as x, b2 as l, b9 as z, bx as L, b as c, m as k, by as j, bz as Z, ba as g, bA as W, bB as T, b8 as s, bC as _, bd as P, be as N, bv as F, b1 as q, $ as D, bf as H, _ as O } from "./index-ObRYlj1l.mjs";
5
5
  class B {
6
6
  constructor(e, b, a, t) {
7
7
  d(this, "network");
@@ -1,4 +1,4 @@
1
- import { bJ as K, cX as Z } from "./index-CUMRJ8yy.mjs";
1
+ import { bJ as K, cX as Z } from "./index-ObRYlj1l.mjs";
2
2
  const j = "logger/5.8.0";
3
3
  let F = !1, k = !1;
4
4
  const U = { debug: 1, default: 2, info: 2, warning: 3, error: 4, off: 5 };
@@ -1 +1 @@
1
- "use strict";const W=require("./index-Cvtp4dgE.js"),j="logger/5.8.0";let F=!1,k=!1;const U={debug:1,default:2,info:2,warning:3,error:4,off:5};let G=U.default,O=null;function Q(){try{const r=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test".normalize(t)!=="test")throw new Error("bad normalize")}catch{r.push(t)}}),r.length)throw new Error("missing "+r.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(r){return r.message}return null}const L=Q();var D;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(D||(D={}));var E;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(E||(E={}));const B="0123456789abcdef";class o{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const n=t.toLowerCase();U[n]==null&&this.throwArgumentError("invalid log level name","logLevel",t),!(G>U[n])&&console.log.apply(console,e)}debug(...t){this._log(o.levels.DEBUG,t)}info(...t){this._log(o.levels.INFO,t)}warn(...t){this._log(o.levels.WARNING,t)}makeError(t,e,n){if(k)return this.makeError("censored error",e,{});e||(e=o.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(g=>{const p=n[g];try{if(p instanceof Uint8Array){let S="";for(let I=0;I<p.length;I++)S+=B[p[I]>>4],S+=B[p[I]&15];i.push(g+"=Uint8Array(0x"+S+")")}else i.push(g+"="+JSON.stringify(p))}catch{i.push(g+"="+JSON.stringify(n[g].toString()))}}),i.push(`code=${e}`),i.push(`version=${this.version}`);const N=t;let m="";switch(e){case E.NUMERIC_FAULT:{m="NUMERIC_FAULT";const g=t;switch(g){case"overflow":case"underflow":case"division-by-zero":m+="-"+g;break;case"negative-power":case"negative-width":m+="-unsupported";break;case"unbound-bitwise-result":m+="-unbound-result";break}break}case E.CALL_EXCEPTION:case E.INSUFFICIENT_FUNDS:case E.MISSING_NEW:case E.NONCE_EXPIRED:case E.REPLACEMENT_UNDERPRICED:case E.TRANSACTION_REPLACED:case E.UNPREDICTABLE_GAS_LIMIT:m=e;break}m&&(t+=" [ See: https://links.ethers.org/v5-errors-"+m+" ]"),i.length&&(t+=" ("+i.join(", ")+")");const b=new Error(t);return b.reason=N,b.code=e,Object.keys(n).forEach(function(g){b[g]=n[g]}),b}throwError(t,e,n){throw this.makeError(t,e,n)}throwArgumentError(t,e,n){return this.throwError(t,o.errors.INVALID_ARGUMENT,{argument:e,value:n})}assert(t,e,n,i){t||this.throwError(e,n,i)}assertArgument(t,e,n,i){t||this.throwArgumentError(e,n,i)}checkNormalize(t){L&&this.throwError("platform missing String.prototype.normalize",o.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:L})}checkSafeUint53(t,e){typeof t=="number"&&(e==null&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,o.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,o.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,n){n?n=": "+n:n="",t<e&&this.throwError("missing argument"+n,o.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+n,o.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){(t===Object||t==null)&&this.throwError("missing new",o.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",o.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):(t===Object||t==null)&&this.throwError("missing new",o.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return O||(O=new o(j)),O}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",o.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),F){if(!t)return;this.globalLogger().throwError("error censorship permanent",o.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}k=!!t,F=!!e}static setLogLevel(t){const e=U[t.toLowerCase()];if(e==null){o.globalLogger().warn("invalid log level - "+t);return}G=e}static from(t){return new o(t)}}o.errors=E;o.levels=D;const Y="bytes/5.8.0",f=new o(Y);function V(r){return!!r.toHexString}function y(r){return r.slice||(r.slice=function(){const t=Array.prototype.slice.call(arguments);return y(new Uint8Array(Array.prototype.slice.apply(r,t)))}),r}function rr(r){return l(r)&&!(r.length%2)||P(r)}function z(r){return typeof r=="number"&&r==r&&r%1===0}function P(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!z(r.length)||r.length<0)return!1;for(let t=0;t<r.length;t++){const e=r[t];if(!z(e)||e<0||e>=256)return!1}return!0}function A(r,t){if(t||(t={}),typeof r=="number"){f.checkSafeUint53(r,"invalid arrayify value");const e=[];for(;r;)e.unshift(r&255),r=parseInt(String(r/256));return e.length===0&&e.push(0),y(new Uint8Array(e))}if(t.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),V(r)&&(r=r.toHexString()),l(r)){let e=r.substring(2);e.length%2&&(t.hexPad==="left"?e="0"+e:t.hexPad==="right"?e+="0":f.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;i<e.length;i+=2)n.push(parseInt(e.substring(i,i+2),16));return y(new Uint8Array(n))}return P(r)?y(new Uint8Array(r)):f.throwArgumentError("invalid arrayify value","value",r)}function tr(r){const t=r.map(i=>A(i)),e=t.reduce((i,N)=>i+N.length,0),n=new Uint8Array(e);return t.reduce((i,N)=>(n.set(N,i),i+N.length),0),y(n)}function er(r,t){r=A(r),r.length>t&&f.throwArgumentError("value out of range","value",arguments[0]);const e=new Uint8Array(t);return e.set(r,t-r.length),y(e)}function l(r,t){return!(typeof r!="string"||!r.match(/^0x[0-9A-Fa-f]*$/)||t&&r.length!==2+2*t)}const d="0123456789abcdef";function c(r,t){if(t||(t={}),typeof r=="number"){f.checkSafeUint53(r,"invalid hexlify value");let e="";for(;r;)e=d[r&15]+e,r=Math.floor(r/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if(typeof r=="bigint")return r=r.toString(16),r.length%2?"0x0"+r:"0x"+r;if(t.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),V(r))return r.toHexString();if(l(r))return r.length%2&&(t.hexPad==="left"?r="0x0"+r.substring(2):t.hexPad==="right"?r+="0":f.throwArgumentError("hex data is odd-length","value",r)),r.toLowerCase();if(P(r)){let e="0x";for(let n=0;n<r.length;n++){let i=r[n];e+=d[(i&240)>>4]+d[i&15]}return e}return f.throwArgumentError("invalid hexlify value","value",r)}function nr(r){if(typeof r!="string")r=c(r);else if(!l(r)||r.length%2)return null;return(r.length-2)/2}function ir(r,t,e){return typeof r!="string"?r=c(r):(!l(r)||r.length%2)&&f.throwArgumentError("invalid hexData","value",r),t=2+2*t,e!=null?"0x"+r.substring(t,2+2*e):"0x"+r.substring(t)}function sr(r){let t="0x";return r.forEach(e=>{t+=c(e).substring(2)}),t}function _(r,t){for(typeof r!="string"?r=c(r):l(r)||f.throwArgumentError("invalid hex string","value",r),r.length>2*t+2&&f.throwArgumentError("value out of range","value",arguments[1]);r.length<2*t+2;)r="0x0"+r.substring(2);return r}function or(r){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(rr(r)){let e=A(r);e.length===64?(t.v=27+(e[32]>>7),e[32]&=127,t.r=c(e.slice(0,32)),t.s=c(e.slice(32,64))):e.length===65?(t.r=c(e.slice(0,32)),t.s=c(e.slice(32,64)),t.v=e[64]):f.throwArgumentError("invalid signature string","signature",r),t.v<27&&(t.v===0||t.v===1?t.v+=27:f.throwArgumentError("signature invalid v byte","signature",r)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(e[32]|=128),t._vs=c(e.slice(32,64))}else{if(t.r=r.r,t.s=r.s,t.v=r.v,t.recoveryParam=r.recoveryParam,t._vs=r._vs,t._vs!=null){const i=er(A(t._vs),32);t._vs=c(i);const N=i[0]>=128?1:0;t.recoveryParam==null?t.recoveryParam=N:t.recoveryParam!==N&&f.throwArgumentError("signature recoveryParam mismatch _vs","signature",r),i[0]&=127;const m=c(i);t.s==null?t.s=m:t.s!==m&&f.throwArgumentError("signature v mismatch _vs","signature",r)}if(t.recoveryParam==null)t.v==null?f.throwArgumentError("signature missing v and recoveryParam","signature",r):t.v===0||t.v===1?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(t.v==null)t.v=27+t.recoveryParam;else{const i=t.v===0||t.v===1?t.v:1-t.v%2;t.recoveryParam!==i&&f.throwArgumentError("signature recoveryParam mismatch v","signature",r)}t.r==null||!l(t.r)?f.throwArgumentError("signature missing or invalid r","signature",r):t.r=_(t.r,32),t.s==null||!l(t.s)?f.throwArgumentError("signature missing or invalid s","signature",r):t.s=_(t.s,32);const e=A(t.s);e[0]>=128&&f.throwArgumentError("signature s out of range","signature",r),t.recoveryParam&&(e[0]|=128);const n=c(e);t._vs&&(l(t._vs)||f.throwArgumentError("signature invalid _vs","signature",r),t._vs=_(t._vs,32)),t._vs==null?t._vs=n:t._vs!==n&&f.throwArgumentError("signature _vs mismatch v and s","signature",r)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}const fr="bignumber/5.7.0";var T=W.BN.BN;const w=new o(fr),C={},ur=9007199254740991;let $=!1;class h{constructor(t,e){t!==C&&w.throwError("cannot call constructor directly; use BigNumber.from",o.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return u(s(this).fromTwos(t))}toTwos(t){return u(s(this).toTwos(t))}abs(){return this._hex[0]==="-"?h.from(this._hex.substring(1)):this}add(t){return u(s(this).add(s(t)))}sub(t){return u(s(this).sub(s(t)))}div(t){return h.from(t).isZero()&&a("division-by-zero","div"),u(s(this).div(s(t)))}mul(t){return u(s(this).mul(s(t)))}mod(t){const e=s(t);return e.isNeg()&&a("division-by-zero","mod"),u(s(this).umod(e))}pow(t){const e=s(t);return e.isNeg()&&a("negative-power","pow"),u(s(this).pow(e))}and(t){const e=s(t);return(this.isNegative()||e.isNeg())&&a("unbound-bitwise-result","and"),u(s(this).and(e))}or(t){const e=s(t);return(this.isNegative()||e.isNeg())&&a("unbound-bitwise-result","or"),u(s(this).or(e))}xor(t){const e=s(t);return(this.isNegative()||e.isNeg())&&a("unbound-bitwise-result","xor"),u(s(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&a("negative-width","mask"),u(s(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&a("negative-width","shl"),u(s(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&a("negative-width","shr"),u(s(this).shrn(t))}eq(t){return s(this).eq(s(t))}lt(t){return s(this).lt(s(t))}lte(t){return s(this).lte(s(t))}gt(t){return s(this).gt(s(t))}gte(t){return s(this).gte(s(t))}isNegative(){return this._hex[0]==="-"}isZero(){return s(this).isZero()}toNumber(){try{return s(this).toNumber()}catch{a("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return w.throwError("this platform does not support BigInt",o.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?$||($=!0,w.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?w.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",o.errors.UNEXPECTED_ARGUMENT,{}):w.throwError("BigNumber.toString does not accept parameters",o.errors.UNEXPECTED_ARGUMENT,{})),s(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof h)return t;if(typeof t=="string")return t.match(/^-?0x[0-9a-f]+$/i)?new h(C,R(t)):t.match(/^-?[0-9]+$/)?new h(C,R(new T(t))):w.throwArgumentError("invalid BigNumber string","value",t);if(typeof t=="number")return t%1&&a("underflow","BigNumber.from",t),(t>=ur||t<=-9007199254740991)&&a("overflow","BigNumber.from",t),h.from(String(t));const e=t;if(typeof e=="bigint")return h.from(e.toString());if(P(e))return h.from(c(e));if(e)if(e.toHexString){const n=e.toHexString();if(typeof n=="string")return h.from(n)}else{let n=e._hex;if(n==null&&e.type==="BigNumber"&&(n=e.hex),typeof n=="string"&&(l(n)||n[0]==="-"&&l(n.substring(1))))return h.from(n)}return w.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!!(t&&t._isBigNumber)}}function R(r){if(typeof r!="string")return R(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&w.throwArgumentError("invalid hex","value",r),r=R(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function u(r){return h.from(R(r))}function s(r){const t=h.from(r).toHexString();return t[0]==="-"?new T("-"+t.substring(3),16):new T(t.substring(2),16)}function a(r,t,e){const n={fault:r,operation:t};return e!=null&&(n.value=e),w.throwError(r,o.errors.NUMERIC_FAULT,n)}function hr(r){return new T(r,36).toString(16)}const cr="properties/5.7.0",K=new o(cr);function J(r,t,e){Object.defineProperty(r,t,{enumerable:!0,value:e,writable:!1})}function lr(r,t){for(let e=0;e<32;e++){if(r[t])return r[t];if(!r.prototype||typeof r.prototype!="object")break;r=Object.getPrototypeOf(r.prototype).constructor}return null}const ar={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Z(r){if(r==null||ar[typeof r])return!0;if(Array.isArray(r)||typeof r=="object"){if(!Object.isFrozen(r))return!1;const t=Object.keys(r);for(let e=0;e<t.length;e++){let n=null;try{n=r[t[e]]}catch{continue}if(!Z(n))return!1}return!0}return K.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function gr(r){if(Z(r))return r;if(Array.isArray(r))return Object.freeze(r.map(t=>M(t)));if(typeof r=="object"){const t={};for(const e in r){const n=r[e];n!==void 0&&J(t,e,M(n))}return t}return K.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function M(r){return gr(r)}class Er{constructor(t){for(const e in t)this[e]=M(t[e])}}function q(r){return"0x"+W.sha3.keccak_256(A(r))}const mr="address/5.7.0",x=new o(mr);function H(r){l(r,20)||x.throwArgumentError("invalid address","address",r),r=r.toLowerCase();const t=r.substring(2).split(""),e=new Uint8Array(40);for(let i=0;i<40;i++)e[i]=t[i].charCodeAt(0);const n=A(q(e));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(n[i>>1]&15)>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const Nr=9007199254740991;function wr(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}const v={};for(let r=0;r<10;r++)v[String(r)]=String(r);for(let r=0;r<26;r++)v[String.fromCharCode(65+r)]=String(10+r);const X=Math.floor(wr(Nr));function Ar(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let t=r.split("").map(n=>v[n]).join("");for(;t.length>=X;){let n=t.substring(0,X);t=parseInt(n,10)%97+t.substring(n.length)}let e=String(98-parseInt(t,10)%97);for(;e.length<2;)e="0"+e;return e}function yr(r){let t=null;if(typeof r!="string"&&x.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),t=H(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==r&&x.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==Ar(r)&&x.throwArgumentError("bad icap checksum","address",r),t=hr(r.substring(4));t.length<40;)t="0"+t;t=H("0x"+t)}else x.throwArgumentError("invalid address","address",r);return t}exports.BigNumber=h;exports.Description=Er;exports.Logger=o;exports.arrayify=A;exports.concat=tr;exports.defineReadOnly=J;exports.getAddress=yr;exports.getStatic=lr;exports.hexConcat=sr;exports.hexDataLength=nr;exports.hexDataSlice=ir;exports.hexZeroPad=_;exports.hexlify=c;exports.isHexString=l;exports.keccak256=q;exports.splitSignature=or;
1
+ "use strict";const W=require("./index-DU1he9Nx.js"),j="logger/5.8.0";let F=!1,k=!1;const U={debug:1,default:2,info:2,warning:3,error:4,off:5};let G=U.default,O=null;function Q(){try{const r=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test".normalize(t)!=="test")throw new Error("bad normalize")}catch{r.push(t)}}),r.length)throw new Error("missing "+r.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(r){return r.message}return null}const L=Q();var D;(function(r){r.DEBUG="DEBUG",r.INFO="INFO",r.WARNING="WARNING",r.ERROR="ERROR",r.OFF="OFF"})(D||(D={}));var E;(function(r){r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",r.NETWORK_ERROR="NETWORK_ERROR",r.SERVER_ERROR="SERVER_ERROR",r.TIMEOUT="TIMEOUT",r.BUFFER_OVERRUN="BUFFER_OVERRUN",r.NUMERIC_FAULT="NUMERIC_FAULT",r.MISSING_NEW="MISSING_NEW",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",r.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",r.TRANSACTION_REPLACED="TRANSACTION_REPLACED",r.ACTION_REJECTED="ACTION_REJECTED"})(E||(E={}));const B="0123456789abcdef";class o{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,e){const n=t.toLowerCase();U[n]==null&&this.throwArgumentError("invalid log level name","logLevel",t),!(G>U[n])&&console.log.apply(console,e)}debug(...t){this._log(o.levels.DEBUG,t)}info(...t){this._log(o.levels.INFO,t)}warn(...t){this._log(o.levels.WARNING,t)}makeError(t,e,n){if(k)return this.makeError("censored error",e,{});e||(e=o.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(g=>{const p=n[g];try{if(p instanceof Uint8Array){let S="";for(let I=0;I<p.length;I++)S+=B[p[I]>>4],S+=B[p[I]&15];i.push(g+"=Uint8Array(0x"+S+")")}else i.push(g+"="+JSON.stringify(p))}catch{i.push(g+"="+JSON.stringify(n[g].toString()))}}),i.push(`code=${e}`),i.push(`version=${this.version}`);const N=t;let m="";switch(e){case E.NUMERIC_FAULT:{m="NUMERIC_FAULT";const g=t;switch(g){case"overflow":case"underflow":case"division-by-zero":m+="-"+g;break;case"negative-power":case"negative-width":m+="-unsupported";break;case"unbound-bitwise-result":m+="-unbound-result";break}break}case E.CALL_EXCEPTION:case E.INSUFFICIENT_FUNDS:case E.MISSING_NEW:case E.NONCE_EXPIRED:case E.REPLACEMENT_UNDERPRICED:case E.TRANSACTION_REPLACED:case E.UNPREDICTABLE_GAS_LIMIT:m=e;break}m&&(t+=" [ See: https://links.ethers.org/v5-errors-"+m+" ]"),i.length&&(t+=" ("+i.join(", ")+")");const b=new Error(t);return b.reason=N,b.code=e,Object.keys(n).forEach(function(g){b[g]=n[g]}),b}throwError(t,e,n){throw this.makeError(t,e,n)}throwArgumentError(t,e,n){return this.throwError(t,o.errors.INVALID_ARGUMENT,{argument:e,value:n})}assert(t,e,n,i){t||this.throwError(e,n,i)}assertArgument(t,e,n,i){t||this.throwArgumentError(e,n,i)}checkNormalize(t){L&&this.throwError("platform missing String.prototype.normalize",o.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:L})}checkSafeUint53(t,e){typeof t=="number"&&(e==null&&(e="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(e,o.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(e,o.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,e,n){n?n=": "+n:n="",t<e&&this.throwError("missing argument"+n,o.errors.MISSING_ARGUMENT,{count:t,expectedCount:e}),t>e&&this.throwError("too many arguments"+n,o.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})}checkNew(t,e){(t===Object||t==null)&&this.throwError("missing new",o.errors.MISSING_NEW,{name:e.name})}checkAbstract(t,e){t===e?this.throwError("cannot instantiate abstract class "+JSON.stringify(e.name)+" directly; use a sub-class",o.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):(t===Object||t==null)&&this.throwError("missing new",o.errors.MISSING_NEW,{name:e.name})}static globalLogger(){return O||(O=new o(j)),O}static setCensorship(t,e){if(!t&&e&&this.globalLogger().throwError("cannot permanently disable censorship",o.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),F){if(!t)return;this.globalLogger().throwError("error censorship permanent",o.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}k=!!t,F=!!e}static setLogLevel(t){const e=U[t.toLowerCase()];if(e==null){o.globalLogger().warn("invalid log level - "+t);return}G=e}static from(t){return new o(t)}}o.errors=E;o.levels=D;const Y="bytes/5.8.0",f=new o(Y);function V(r){return!!r.toHexString}function y(r){return r.slice||(r.slice=function(){const t=Array.prototype.slice.call(arguments);return y(new Uint8Array(Array.prototype.slice.apply(r,t)))}),r}function rr(r){return l(r)&&!(r.length%2)||P(r)}function z(r){return typeof r=="number"&&r==r&&r%1===0}function P(r){if(r==null)return!1;if(r.constructor===Uint8Array)return!0;if(typeof r=="string"||!z(r.length)||r.length<0)return!1;for(let t=0;t<r.length;t++){const e=r[t];if(!z(e)||e<0||e>=256)return!1}return!0}function A(r,t){if(t||(t={}),typeof r=="number"){f.checkSafeUint53(r,"invalid arrayify value");const e=[];for(;r;)e.unshift(r&255),r=parseInt(String(r/256));return e.length===0&&e.push(0),y(new Uint8Array(e))}if(t.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),V(r)&&(r=r.toHexString()),l(r)){let e=r.substring(2);e.length%2&&(t.hexPad==="left"?e="0"+e:t.hexPad==="right"?e+="0":f.throwArgumentError("hex data is odd-length","value",r));const n=[];for(let i=0;i<e.length;i+=2)n.push(parseInt(e.substring(i,i+2),16));return y(new Uint8Array(n))}return P(r)?y(new Uint8Array(r)):f.throwArgumentError("invalid arrayify value","value",r)}function tr(r){const t=r.map(i=>A(i)),e=t.reduce((i,N)=>i+N.length,0),n=new Uint8Array(e);return t.reduce((i,N)=>(n.set(N,i),i+N.length),0),y(n)}function er(r,t){r=A(r),r.length>t&&f.throwArgumentError("value out of range","value",arguments[0]);const e=new Uint8Array(t);return e.set(r,t-r.length),y(e)}function l(r,t){return!(typeof r!="string"||!r.match(/^0x[0-9A-Fa-f]*$/)||t&&r.length!==2+2*t)}const d="0123456789abcdef";function c(r,t){if(t||(t={}),typeof r=="number"){f.checkSafeUint53(r,"invalid hexlify value");let e="";for(;r;)e=d[r&15]+e,r=Math.floor(r/16);return e.length?(e.length%2&&(e="0"+e),"0x"+e):"0x00"}if(typeof r=="bigint")return r=r.toString(16),r.length%2?"0x0"+r:"0x"+r;if(t.allowMissingPrefix&&typeof r=="string"&&r.substring(0,2)!=="0x"&&(r="0x"+r),V(r))return r.toHexString();if(l(r))return r.length%2&&(t.hexPad==="left"?r="0x0"+r.substring(2):t.hexPad==="right"?r+="0":f.throwArgumentError("hex data is odd-length","value",r)),r.toLowerCase();if(P(r)){let e="0x";for(let n=0;n<r.length;n++){let i=r[n];e+=d[(i&240)>>4]+d[i&15]}return e}return f.throwArgumentError("invalid hexlify value","value",r)}function nr(r){if(typeof r!="string")r=c(r);else if(!l(r)||r.length%2)return null;return(r.length-2)/2}function ir(r,t,e){return typeof r!="string"?r=c(r):(!l(r)||r.length%2)&&f.throwArgumentError("invalid hexData","value",r),t=2+2*t,e!=null?"0x"+r.substring(t,2+2*e):"0x"+r.substring(t)}function sr(r){let t="0x";return r.forEach(e=>{t+=c(e).substring(2)}),t}function _(r,t){for(typeof r!="string"?r=c(r):l(r)||f.throwArgumentError("invalid hex string","value",r),r.length>2*t+2&&f.throwArgumentError("value out of range","value",arguments[1]);r.length<2*t+2;)r="0x0"+r.substring(2);return r}function or(r){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(rr(r)){let e=A(r);e.length===64?(t.v=27+(e[32]>>7),e[32]&=127,t.r=c(e.slice(0,32)),t.s=c(e.slice(32,64))):e.length===65?(t.r=c(e.slice(0,32)),t.s=c(e.slice(32,64)),t.v=e[64]):f.throwArgumentError("invalid signature string","signature",r),t.v<27&&(t.v===0||t.v===1?t.v+=27:f.throwArgumentError("signature invalid v byte","signature",r)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(e[32]|=128),t._vs=c(e.slice(32,64))}else{if(t.r=r.r,t.s=r.s,t.v=r.v,t.recoveryParam=r.recoveryParam,t._vs=r._vs,t._vs!=null){const i=er(A(t._vs),32);t._vs=c(i);const N=i[0]>=128?1:0;t.recoveryParam==null?t.recoveryParam=N:t.recoveryParam!==N&&f.throwArgumentError("signature recoveryParam mismatch _vs","signature",r),i[0]&=127;const m=c(i);t.s==null?t.s=m:t.s!==m&&f.throwArgumentError("signature v mismatch _vs","signature",r)}if(t.recoveryParam==null)t.v==null?f.throwArgumentError("signature missing v and recoveryParam","signature",r):t.v===0||t.v===1?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(t.v==null)t.v=27+t.recoveryParam;else{const i=t.v===0||t.v===1?t.v:1-t.v%2;t.recoveryParam!==i&&f.throwArgumentError("signature recoveryParam mismatch v","signature",r)}t.r==null||!l(t.r)?f.throwArgumentError("signature missing or invalid r","signature",r):t.r=_(t.r,32),t.s==null||!l(t.s)?f.throwArgumentError("signature missing or invalid s","signature",r):t.s=_(t.s,32);const e=A(t.s);e[0]>=128&&f.throwArgumentError("signature s out of range","signature",r),t.recoveryParam&&(e[0]|=128);const n=c(e);t._vs&&(l(t._vs)||f.throwArgumentError("signature invalid _vs","signature",r),t._vs=_(t._vs,32)),t._vs==null?t._vs=n:t._vs!==n&&f.throwArgumentError("signature _vs mismatch v and s","signature",r)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}const fr="bignumber/5.7.0";var T=W.BN.BN;const w=new o(fr),C={},ur=9007199254740991;let $=!1;class h{constructor(t,e){t!==C&&w.throwError("cannot call constructor directly; use BigNumber.from",o.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=e,this._isBigNumber=!0,Object.freeze(this)}fromTwos(t){return u(s(this).fromTwos(t))}toTwos(t){return u(s(this).toTwos(t))}abs(){return this._hex[0]==="-"?h.from(this._hex.substring(1)):this}add(t){return u(s(this).add(s(t)))}sub(t){return u(s(this).sub(s(t)))}div(t){return h.from(t).isZero()&&a("division-by-zero","div"),u(s(this).div(s(t)))}mul(t){return u(s(this).mul(s(t)))}mod(t){const e=s(t);return e.isNeg()&&a("division-by-zero","mod"),u(s(this).umod(e))}pow(t){const e=s(t);return e.isNeg()&&a("negative-power","pow"),u(s(this).pow(e))}and(t){const e=s(t);return(this.isNegative()||e.isNeg())&&a("unbound-bitwise-result","and"),u(s(this).and(e))}or(t){const e=s(t);return(this.isNegative()||e.isNeg())&&a("unbound-bitwise-result","or"),u(s(this).or(e))}xor(t){const e=s(t);return(this.isNegative()||e.isNeg())&&a("unbound-bitwise-result","xor"),u(s(this).xor(e))}mask(t){return(this.isNegative()||t<0)&&a("negative-width","mask"),u(s(this).maskn(t))}shl(t){return(this.isNegative()||t<0)&&a("negative-width","shl"),u(s(this).shln(t))}shr(t){return(this.isNegative()||t<0)&&a("negative-width","shr"),u(s(this).shrn(t))}eq(t){return s(this).eq(s(t))}lt(t){return s(this).lt(s(t))}lte(t){return s(this).lte(s(t))}gt(t){return s(this).gt(s(t))}gte(t){return s(this).gte(s(t))}isNegative(){return this._hex[0]==="-"}isZero(){return s(this).isZero()}toNumber(){try{return s(this).toNumber()}catch{a("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return w.throwError("this platform does not support BigInt",o.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?$||($=!0,w.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?w.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",o.errors.UNEXPECTED_ARGUMENT,{}):w.throwError("BigNumber.toString does not accept parameters",o.errors.UNEXPECTED_ARGUMENT,{})),s(this).toString(10)}toHexString(){return this._hex}toJSON(t){return{type:"BigNumber",hex:this.toHexString()}}static from(t){if(t instanceof h)return t;if(typeof t=="string")return t.match(/^-?0x[0-9a-f]+$/i)?new h(C,R(t)):t.match(/^-?[0-9]+$/)?new h(C,R(new T(t))):w.throwArgumentError("invalid BigNumber string","value",t);if(typeof t=="number")return t%1&&a("underflow","BigNumber.from",t),(t>=ur||t<=-9007199254740991)&&a("overflow","BigNumber.from",t),h.from(String(t));const e=t;if(typeof e=="bigint")return h.from(e.toString());if(P(e))return h.from(c(e));if(e)if(e.toHexString){const n=e.toHexString();if(typeof n=="string")return h.from(n)}else{let n=e._hex;if(n==null&&e.type==="BigNumber"&&(n=e.hex),typeof n=="string"&&(l(n)||n[0]==="-"&&l(n.substring(1))))return h.from(n)}return w.throwArgumentError("invalid BigNumber value","value",t)}static isBigNumber(t){return!!(t&&t._isBigNumber)}}function R(r){if(typeof r!="string")return R(r.toString(16));if(r[0]==="-")return r=r.substring(1),r[0]==="-"&&w.throwArgumentError("invalid hex","value",r),r=R(r),r==="0x00"?r:"-"+r;if(r.substring(0,2)!=="0x"&&(r="0x"+r),r==="0x")return"0x00";for(r.length%2&&(r="0x0"+r.substring(2));r.length>4&&r.substring(0,4)==="0x00";)r="0x"+r.substring(4);return r}function u(r){return h.from(R(r))}function s(r){const t=h.from(r).toHexString();return t[0]==="-"?new T("-"+t.substring(3),16):new T(t.substring(2),16)}function a(r,t,e){const n={fault:r,operation:t};return e!=null&&(n.value=e),w.throwError(r,o.errors.NUMERIC_FAULT,n)}function hr(r){return new T(r,36).toString(16)}const cr="properties/5.7.0",K=new o(cr);function J(r,t,e){Object.defineProperty(r,t,{enumerable:!0,value:e,writable:!1})}function lr(r,t){for(let e=0;e<32;e++){if(r[t])return r[t];if(!r.prototype||typeof r.prototype!="object")break;r=Object.getPrototypeOf(r.prototype).constructor}return null}const ar={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Z(r){if(r==null||ar[typeof r])return!0;if(Array.isArray(r)||typeof r=="object"){if(!Object.isFrozen(r))return!1;const t=Object.keys(r);for(let e=0;e<t.length;e++){let n=null;try{n=r[t[e]]}catch{continue}if(!Z(n))return!1}return!0}return K.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function gr(r){if(Z(r))return r;if(Array.isArray(r))return Object.freeze(r.map(t=>M(t)));if(typeof r=="object"){const t={};for(const e in r){const n=r[e];n!==void 0&&J(t,e,M(n))}return t}return K.throwArgumentError(`Cannot deepCopy ${typeof r}`,"object",r)}function M(r){return gr(r)}class Er{constructor(t){for(const e in t)this[e]=M(t[e])}}function q(r){return"0x"+W.sha3.keccak_256(A(r))}const mr="address/5.7.0",x=new o(mr);function H(r){l(r,20)||x.throwArgumentError("invalid address","address",r),r=r.toLowerCase();const t=r.substring(2).split(""),e=new Uint8Array(40);for(let i=0;i<40;i++)e[i]=t[i].charCodeAt(0);const n=A(q(e));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(n[i>>1]&15)>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const Nr=9007199254740991;function wr(r){return Math.log10?Math.log10(r):Math.log(r)/Math.LN10}const v={};for(let r=0;r<10;r++)v[String(r)]=String(r);for(let r=0;r<26;r++)v[String.fromCharCode(65+r)]=String(10+r);const X=Math.floor(wr(Nr));function Ar(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let t=r.split("").map(n=>v[n]).join("");for(;t.length>=X;){let n=t.substring(0,X);t=parseInt(n,10)%97+t.substring(n.length)}let e=String(98-parseInt(t,10)%97);for(;e.length<2;)e="0"+e;return e}function yr(r){let t=null;if(typeof r!="string"&&x.throwArgumentError("invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/))r.substring(0,2)!=="0x"&&(r="0x"+r),t=H(r),r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==r&&x.throwArgumentError("bad address checksum","address",r);else if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(r.substring(2,4)!==Ar(r)&&x.throwArgumentError("bad icap checksum","address",r),t=hr(r.substring(4));t.length<40;)t="0"+t;t=H("0x"+t)}else x.throwArgumentError("invalid address","address",r);return t}exports.BigNumber=h;exports.Description=Er;exports.Logger=o;exports.arrayify=A;exports.concat=tr;exports.defineReadOnly=J;exports.getAddress=yr;exports.getStatic=lr;exports.hexConcat=sr;exports.hexDataLength=nr;exports.hexDataSlice=ir;exports.hexZeroPad=_;exports.hexlify=c;exports.isHexString=l;exports.keccak256=q;exports.splitSignature=or;
@@ -1,9 +1,9 @@
1
1
  var S = Object.defineProperty;
2
2
  var b = (a, e, t) => e in a ? S(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
3
  var i = (a, e, t) => b(a, typeof e != "symbol" ? e + "" : e, t);
4
- import { ch as v, ci as f, cj as x, cf as I, ck as A, b2 as w, bw as U, b9 as $, bx as m, r as o, ay as k, p as c, m as h, cl as C, bC as T, O as E, bz as F, k as _, ba as u, cm as O, bf as W } from "./index-CUMRJ8yy.mjs";
4
+ import { ch as v, ci as f, cj as x, cf as I, ck as A, b2 as w, bw as U, b9 as $, bx as m, r as o, ay as k, p as c, m as h, cl as C, bC as T, O as E, bz as F, k as _, ba as u, cm as O, bf as W } from "./index-ObRYlj1l.mjs";
5
5
  import { A as N } from "./unsignedTransaction-BDOQhqcZ.mjs";
6
- import { A as Q } from "./aptos-D3RPZgif.mjs";
6
+ import { A as Q } from "./aptos-qwmh1AJp.mjs";
7
7
  const R = [
8
8
  { name: "tokenBridgeAddress", ...f },
9
9
  { name: "chain", ...x() },