@dcl/explore-site 0.0.1-24353156203.commit-157a41c → 0.0.1-24478945478.commit-fbe29bc

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 (131) hide show
  1. package/assets/HomePage-4HQ75L-m.js +5 -0
  2. package/assets/{QueryClientProvider-DIya0AJE.js → QueryClientProvider--leuT0BF.js} +1 -1
  3. package/assets/SensorsRounded-H2-cTBMr.js +15 -0
  4. package/assets/{__federation_expose_App-C1e3Md3H.js → __federation_expose_App-BV1W9Nsg.js} +1 -1
  5. package/assets/{__federation_fn_import-Ht3m1qpn.js → __federation_fn_import-DiM-2p0X.js} +1 -1
  6. package/assets/__federation_shared_@dcl/hooks-BPbDbik5.js +520 -0
  7. package/assets/__federation_shared_@dcl/schemas-NoE3FR6c.js +1 -0
  8. package/assets/__federation_shared_@emotion/react-BxgzYDzF.js +1 -0
  9. package/assets/__federation_shared_@emotion/{styled-BS5dedBi.js → styled-J4z9BTTi.js} +1 -1
  10. package/assets/__federation_shared_decentraland-ui2-CKEsU5_w.js +357 -0
  11. package/assets/{__federation_shared_react-redux-W6mfh1Yq.js → __federation_shared_react-redux-Da7H9TvO.js} +1 -1
  12. package/assets/{__federation_shared_react-router-dom-BJBxUtHV.js → __federation_shared_react-router-dom-C19SKiqW.js} +1 -1
  13. package/assets/{__federation_shared_viem-D92oJAhA.js → __federation_shared_viem-CjVgxkdA.js} +1 -1
  14. package/assets/{__federation_shared_wagmi-Mn9i9XHL.js → __federation_shared_wagmi-Do7OgkKc.js} +1 -1
  15. package/assets/{add-Pf2mtDVd.js → add-Daid8Noh.js} +1 -1
  16. package/assets/{all-wallets-yTWm-7l0.js → all-wallets-DiZQK82j.js} +1 -1
  17. package/assets/{app-store-CHNvFr8x.js → app-store-CV27MXOj.js} +1 -1
  18. package/assets/{apple-Cl30qHkG.js → apple-WY66pyZC.js} +1 -1
  19. package/assets/{arrow-bottom-DTZt60fy.js → arrow-bottom-CGAu2sUq.js} +1 -1
  20. package/assets/{arrow-bottom-circle-zZ7DVvhp.js → arrow-bottom-circle-Bg41XMJ4.js} +1 -1
  21. package/assets/{arrow-left-D5G-F2Mr.js → arrow-left-BC8WX0E0.js} +1 -1
  22. package/assets/{arrow-right-CQp0OKbr.js → arrow-right-BKbdbJmP.js} +1 -1
  23. package/assets/{arrow-top-Dov1vQPn.js → arrow-top-DBBJA8uy.js} +1 -1
  24. package/assets/{auto-track-CJ-hNq0s.js → auto-track-DqNnSbTw.js} +1 -1
  25. package/assets/{bank-CzpOQOqg.js → bank-BqhRWSQZ.js} +1 -1
  26. package/assets/{basic-BaHwLXYW.js → basic-DkiFeXIZ.js} +1 -1
  27. package/assets/{browser-DmlzKjDH.js → browser-_VNJ0ZVD.js} +1 -1
  28. package/assets/{card-DjnQpz1T.js → card-Do28FZIN.js} +1 -1
  29. package/assets/{ccip-fLeNA6wc.js → ccip-DM-gN1AQ.js} +1 -1
  30. package/assets/{checkmark-Cv7bJNZW.js → checkmark-DkZh9Zlf.js} +1 -1
  31. package/assets/{checkmark-bold-Crr_qeUj.js → checkmark-bold-BpmrZTfW.js} +1 -1
  32. package/assets/{chevron-bottom-DjPxwSAz.js → chevron-bottom-BR7imf61.js} +1 -1
  33. package/assets/{chevron-left-DRFM7Kjo.js → chevron-left-BgSUIV8s.js} +1 -1
  34. package/assets/{chevron-right-C3dXKRLK.js → chevron-right-DWD5TLbn.js} +1 -1
  35. package/assets/{chevron-top-DkPXzMT9.js → chevron-top-D7S-CScU.js} +1 -1
  36. package/assets/{chrome-store-C1j87a0E.js → chrome-store-B8uTCWo4.js} +1 -1
  37. package/assets/{clock-Ii2gOHOm.js → clock-BD6s_KdG.js} +1 -1
  38. package/assets/{close-mveIoSo7.js → close-CnBVyDqH.js} +1 -1
  39. package/assets/{coinPlaceholder-BgCUmbQq.js → coinPlaceholder-81U7X6av.js} +1 -1
  40. package/assets/{compass-CFoHHJhs.js → compass-Ts-lPb2L.js} +1 -1
  41. package/assets/{copy-CECL7vci.js → copy-DCH8C6zc.js} +1 -1
  42. package/assets/{core-rob3DE1K.js → core-Dhd6Iy8d.js} +3 -3
  43. package/assets/{createClient-DIPdlHW_.js → createClient-BcYkZyGj.js} +1 -1
  44. package/assets/{cursor-CVJFIzVK.js → cursor-BLKnhkE9.js} +1 -1
  45. package/assets/{cursor-transparent-OkqQkD5X.js → cursor-transparent-C0zsz7H9.js} +1 -1
  46. package/assets/{desktop-SqravDGB.js → desktop-Bh7_tRbW.js} +1 -1
  47. package/assets/{disconnect-C438cKH2.js → disconnect-4_am9qYp.js} +1 -1
  48. package/assets/{discord-C342vjF7.js → discord-Dt-NMkqj.js} +1 -1
  49. package/assets/{emotion-react.browser.esm-BZuSnvT8.js → emotion-react.browser.esm-BDrOZpgV.js} +1 -1
  50. package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-CLJKjSo3.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-l2IiBxl6.js} +1 -1
  51. package/assets/{etherscan-Bnt1d9db.js → etherscan-B4BDfsL8.js} +1 -1
  52. package/assets/{exclamation-triangle-tMBULVvu.js → exclamation-triangle-D3NIlu-T.js} +1 -1
  53. package/assets/{extension-BSzqi0r5.js → extension-tsRob_2k.js} +1 -1
  54. package/assets/{external-link-j8SaBF13.js → external-link-ugbgKjeM.js} +1 -1
  55. package/assets/{facebook-CDHF3Kvl.js → facebook-D_V0Apmn.js} +1 -1
  56. package/assets/{farcaster-BOEIT-PC.js → farcaster-CbYsxa-c.js} +1 -1
  57. package/assets/{filters-DV0FUhQ0.js → filters-CXoaKLPf.js} +1 -1
  58. package/assets/{github-C4Va2GNy.js → github-BQ6AFC-x.js} +1 -1
  59. package/assets/{google-Cje22T1c.js → google-CgCrWyXU.js} +1 -1
  60. package/assets/{help-circle-Bff4zjju.js → help-circle-CeKyhCzL.js} +1 -1
  61. package/assets/{id-Dd0qqSfM.js → id-Be2iQFlL.js} +1 -1
  62. package/assets/{image-Cn6H6ai6.js → image-BKga-nIx.js} +1 -1
  63. package/assets/index-BoL1wX4e.js +1 -0
  64. package/assets/{index-l-nOLSLJ.js → index-Cp1PC8Pr.js} +2 -2
  65. package/assets/{index-CmM7TlDV.js → index-D6uTuLeA.js} +1 -1
  66. package/assets/index-DRqFUSF2.js +1 -0
  67. package/assets/index-DVftV2UM.js +16 -0
  68. package/assets/{index-CVDO0kXc.js → index-DX4cgVhx.js} +1 -1
  69. package/assets/{index-BOVA3Ef2.js → index-DYHBL5dz.js} +1 -1
  70. package/assets/{index-IsljfPdd.js → index-DoYKMzm-.js} +1 -1
  71. package/assets/index-Dy0yjznp.js +1 -1
  72. package/assets/{index-DK6XZ4Dz.js → index-T-kj4HwN.js} +1 -1
  73. package/assets/index-VfkM29PH.js +1 -1
  74. package/assets/{index-MKDM4ZR3.js → index-jJtvvIhT.js} +3 -3
  75. package/assets/{index.es-BHi5bjgi.js → index.es-PqkS6yPf.js} +3 -3
  76. package/assets/{info-CNp7Y95X.js → info-HGWeWzHM.js} +1 -1
  77. package/assets/{info-circle-7DQwkSlJ.js → info-circle-41LCT2sF.js} +1 -1
  78. package/assets/jsx-runtime-B1l0k91v.js +1 -1
  79. package/assets/{lightbulb-B0gzSEGz.js → lightbulb-NDbKHlTB.js} +1 -1
  80. package/assets/{localBatchGatewayRequest-xkDsPGG7.js → localBatchGatewayRequest-BYwDa5vQ.js} +1 -1
  81. package/assets/{mail-dRKM5FXT.js → mail-Bu8ml1Ak.js} +1 -1
  82. package/assets/{mobile-LB_FN_RV.js → mobile-DbRhum7U.js} +1 -1
  83. package/assets/{more-CYum3xAb.js → more-CEIXJ-1N.js} +1 -1
  84. package/assets/{network-placeholder-BtyRBLps.js → network-placeholder-Bw3MHqfg.js} +1 -1
  85. package/assets/{nftPlaceholder-BEMgcchY.js → nftPlaceholder-DFUxL8_Z.js} +1 -1
  86. package/assets/{off-C5JcUbXr.js → off-CpTo0-ZF.js} +1 -1
  87. package/assets/{play-store-CN5oe3Vf.js → play-store-4qrK4s4s.js} +1 -1
  88. package/assets/{plus-CKUKfnQj.js → plus-Co84Q6A5.js} +1 -1
  89. package/assets/{preload-helper-ByFjl-a5.js → preload-helper-DiN7JEdv.js} +1 -1
  90. package/assets/{qr-code-BzLqVM5j.js → qr-code-l130WBRh.js} +1 -1
  91. package/assets/{recycle-horizontal-dPdqs2_u.js → recycle-horizontal-BwIgvOD_.js} +1 -1
  92. package/assets/{refresh-DSde0C6e.js → refresh-hIpJOVfw.js} +1 -1
  93. package/assets/remoteEntry.js +1 -1
  94. package/assets/{reown-logo-BR03HbJl.js → reown-logo-BJLVCKGg.js} +1 -1
  95. package/assets/{search-CedcKcSQ.js → search-D_oIgFxh.js} +1 -1
  96. package/assets/{secp256k1-B4W1DvAE.js → secp256k1-DbMaKmYo.js} +1 -1
  97. package/assets/{send-GPwvH8UU.js → send-BQV4iaQs.js} +1 -1
  98. package/assets/{swapHorizontal-BR-8g9B3.js → swapHorizontal-Daw-5sVy.js} +1 -1
  99. package/assets/{swapHorizontalBold-B7LIXZ0L.js → swapHorizontalBold-B1g2xssk.js} +1 -1
  100. package/assets/{swapHorizontalMedium-fAXgriAI.js → swapHorizontalMedium-CPL2Mejm.js} +1 -1
  101. package/assets/{swapHorizontalRoundedBold-DcpI4Y0u.js → swapHorizontalRoundedBold-C1XtN2m3.js} +1 -1
  102. package/assets/{swapVertical-yx4f2BAH.js → swapVertical-BpuAciPK.js} +1 -1
  103. package/assets/{telegram-DBD185Ye.js → telegram-Csbx1gWz.js} +1 -1
  104. package/assets/{three-dots-DeQeOnEw.js → three-dots-DiK_h83n.js} +1 -1
  105. package/assets/{twitch-0WtoG5d0.js → twitch-CIjcFlBZ.js} +1 -1
  106. package/assets/{twitterIcon-atCsdkp8.js → twitterIcon-CUp0tT8q.js} +1 -1
  107. package/assets/{uid-EJg3CBmY.js → uid-CYtpXYTM.js} +3 -3
  108. package/assets/{verify-KQXFAoty.js → verify-Cu6b7W7W.js} +1 -1
  109. package/assets/{verify-filled-CM5tIwPd.js → verify-filled-wGbCMaxP.js} +1 -1
  110. package/assets/{w3m-modal-NP2Fg3Od.js → w3m-modal-eGJ9MIKg.js} +1 -1
  111. package/assets/{wallet-D_D97dGa.js → wallet-D9jO_EWu.js} +1 -1
  112. package/assets/{wallet-placeholder-CqVcvVD2.js → wallet-placeholder-Crncam5C.js} +1 -1
  113. package/assets/{walletconnect-CumO8EDV.js → walletconnect-DqK21liB.js} +1 -1
  114. package/assets/{warning-circle-PdDzpbOz.js → warning-circle-CKSKNtxx.js} +1 -1
  115. package/assets/{webSocket-CrIirM3J.js → webSocket-Cg90KmKh.js} +1 -1
  116. package/assets/{x-CA1Ri3bW.js → x-B_nPooQD.js} +1 -1
  117. package/index.html +17 -14
  118. package/package.json +3 -3
  119. package/assets/HomePage-gvYCE7Us.js +0 -5
  120. package/assets/SensorsRounded-CofDOJXy.js +0 -15
  121. package/assets/__federation_shared_@dcl/hooks-CxuIIRDv.js +0 -535
  122. package/assets/__federation_shared_@dcl/schemas-FcJQcJ28.js +0 -1
  123. package/assets/__federation_shared_@emotion/react-u6J4D45G.js +0 -1
  124. package/assets/__federation_shared_decentraland-ui2-DpbLoOhx.js +0 -357
  125. package/assets/create-submenu-Bu20F8-Z.webp +0 -0
  126. package/assets/explore-submenu-BFVuYMi9.webp +0 -0
  127. package/assets/governance-submenu-VTIKvCIL.webp +0 -0
  128. package/assets/index-Biwg5bHN.js +0 -1
  129. package/assets/index-TGKJ-nWH.js +0 -1
  130. package/assets/learn-submenu-sfxVP5Db.webp +0 -0
  131. package/assets/marketplace-submenu-CixWTv8_.webp +0 -0
@@ -0,0 +1,16 @@
1
+ import{c as L}from"./_commonjsHelpers-C4iS2aBk.js";import{a as zs,d as Gs,b as Ws}from"./index-pEp_vRda.js";import{r as Ks}from"./___vite-browser-external_commonjs-proxy-BqV5D26a.js";var Ys={},Di={};Object.defineProperty(Di,"__esModule",{value:!0});var Xa={},qn={},zn={},Ja={},ji={exports:{}};/*! eth-connect {
2
+ "date": "2024-01-01T15:10:57.542Z",
3
+ "commit": "b2fa64415d297ccce86d2a5d59d8705388f77db9",
4
+ "ref": "refs/tags/6.2.4"
5
+ } */(function(e,a){(function(t,o){o(a)})(L,function(t){function o(r){if(r.jsonrpc="2.0",!r.id||typeof r.id!="number"||Math.floor(r.id)!==r.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(r)}`);if(!r.method||typeof r.method!="string"||r.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(r)}`);if(!r.params||typeof r.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(r)}`);return r}var s={};function u(){let r,i;const c=new Promise((y,b)=>{r=T=>{y(T),c.isPending=!1},i=T=>{b(T),c.isPending=!1}}).catch(y=>Promise.reject(y));return c.resolve=r,c.reject=i,"finally"in c||(c.finally=y=>{c.then(y),c.catch(y)}),c.isPending=!0,c}Object.defineProperty(s,"__esModule",{value:!0});var p=s.future=u;s.default=u;var v={exports:{}};/**
6
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
7
+ *
8
+ * @version 0.8.0
9
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
10
+ * @copyright Chen, Yi-Cyuan 2015-2018
11
+ * @license MIT
12
+ */(function(r){(function(){var i="input is invalid type",c=typeof window=="object",y=c?window:{};y.JS_SHA3_NO_WINDOW&&(c=!1);var b=!c&&typeof self=="object";!y.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?y=L:b&&(y=self);var T=!y.JS_SHA3_NO_COMMON_JS&&r.exports,M=!y.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",z="0123456789abcdef".split(""),oe=[4,1024,262144,67108864],ue=[0,8,16,24],yt=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],Ke=[224,256,384,512],W=[128,256],at=["hex","buffer","arrayBuffer","array","digest"],Ue={128:168,256:136};!y.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(n){return Object.prototype.toString.call(n)==="[object Array]"}),!M||!y.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(n){return typeof n=="object"&&n.buffer&&n.buffer.constructor===ArrayBuffer});for(var He=function(n,d,g){return function(h){return new Me(n,d,n).update(h)[g]()}},ut=function(n,d,g){return function(h,_){return new Me(n,d,_).update(h)[g]()}},Kt=function(n,d,g){return function(h,_,w,A){return ot["cshake"+n].update(h,_,w,A)[g]()}},Dt=function(n,d,g){return function(h,_,w,A){return ot["kmac"+n].update(h,_,w,A)[g]()}},lt=function(n,d,g,h){for(var _=0;_<at.length;++_){var w=at[_];n[w]=d(g,h,w)}return n},kt=function(n,d){var g=He(n,d,"hex");return g.create=function(){return new Me(n,d,n)},g.update=function(h){return g.create().update(h)},lt(g,He,n,d)},tr=[{name:"keccak",padding:[1,256,65536,16777216],bits:Ke,createMethod:kt},{name:"sha3",padding:[6,1536,393216,100663296],bits:Ke,createMethod:kt},{name:"shake",padding:[31,7936,2031616,520093696],bits:W,createMethod:function(n,d){var g=ut(n,d,"hex");return g.create=function(h){return new Me(n,d,h)},g.update=function(h,_){return g.create(_).update(h)},lt(g,ut,n,d)}},{name:"cshake",padding:oe,bits:W,createMethod:function(n,d){var g=Ue[n],h=Kt(n,0,"hex");return h.create=function(_,w,A){return w||A?new Me(n,d,_).bytepad([w,A],g):ot["shake"+n].create(_)},h.update=function(_,w,A,S){return h.create(w,A,S).update(_)},lt(h,Kt,n,d)}},{name:"kmac",padding:oe,bits:W,createMethod:function(n,d){var g=Ue[n],h=Dt(n,0,"hex");return h.create=function(_,w,A){return new _t(n,d,w).bytepad(["KMAC",A],g).bytepad([_],g)},h.update=function(_,w,A,S){return h.create(_,A,S).update(w)},lt(h,Dt,n,d)}}],ot={},Yt=[],dt=0;dt<tr.length;++dt)for(var Ut=tr[dt],F=Ut.bits,Zt=0;Zt<F.length;++Zt){var wr=Ut.name+"_"+F[Zt];if(Yt.push(wr),ot[wr]=Ut.createMethod(F[Zt],Ut.padding),Ut.name!=="sha3"){var Ar=Ut.name+F[Zt];Yt.push(Ar),ot[Ar]=ot[wr]}}function Me(n,d,g){this.blocks=[],this.s=[],this.padding=d,this.outputBits=g,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(n<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=g>>5,this.extraBytes=(31&g)>>3;for(var h=0;h<50;++h)this.s[h]=0}function _t(n,d,g){Me.call(this,n,d,g)}Me.prototype.update=function(n){if(this.finalized)throw new Error("finalize already called");var d,g=typeof n;if(g!=="string"){if(g!=="object")throw new Error(i);if(n===null)throw new Error(i);if(M&&n.constructor===ArrayBuffer)n=new Uint8Array(n);else if(!(Array.isArray(n)||M&&ArrayBuffer.isView(n)))throw new Error(i);d=!0}for(var h,_,w=this.blocks,A=this.byteCount,S=n.length,P=this.blockCount,I=0,V=this.s;I<S;){if(this.reset)for(this.reset=!1,w[0]=this.block,h=1;h<P+1;++h)w[h]=0;if(d)for(h=this.start;I<S&&h<A;++I)w[h>>2]|=n[I]<<ue[3&h++];else for(h=this.start;I<S&&h<A;++I)(_=n.charCodeAt(I))<128?w[h>>2]|=_<<ue[3&h++]:_<2048?(w[h>>2]|=(192|_>>6)<<ue[3&h++],w[h>>2]|=(128|63&_)<<ue[3&h++]):_<55296||_>=57344?(w[h>>2]|=(224|_>>12)<<ue[3&h++],w[h>>2]|=(128|_>>6&63)<<ue[3&h++],w[h>>2]|=(128|63&_)<<ue[3&h++]):(_=65536+((1023&_)<<10|1023&n.charCodeAt(++I)),w[h>>2]|=(240|_>>18)<<ue[3&h++],w[h>>2]|=(128|_>>12&63)<<ue[3&h++],w[h>>2]|=(128|_>>6&63)<<ue[3&h++],w[h>>2]|=(128|63&_)<<ue[3&h++]);if(this.lastByteIndex=h,h>=A){for(this.start=h-A,this.block=w[P],h=0;h<P;++h)V[h]^=w[h];f(V),this.reset=!0}else this.start=h}return this},Me.prototype.encode=function(n,d){var g=255&n,h=1,_=[g];for(g=255&(n>>=8);g>0;)_.unshift(g),g=255&(n>>=8),++h;return d?_.push(h):_.unshift(h),this.update(_),_.length},Me.prototype.encodeString=function(n){var d,g=typeof n;if(g!=="string"){if(g!=="object")throw new Error(i);if(n===null)throw new Error(i);if(M&&n.constructor===ArrayBuffer)n=new Uint8Array(n);else if(!(Array.isArray(n)||M&&ArrayBuffer.isView(n)))throw new Error(i);d=!0}var h=0,_=n.length;if(d)h=_;else for(var w=0;w<n.length;++w){var A=n.charCodeAt(w);A<128?h+=1:A<2048?h+=2:A<55296||A>=57344?h+=3:(A=65536+((1023&A)<<10|1023&n.charCodeAt(++w)),h+=4)}return h+=this.encode(8*h),this.update(n),h},Me.prototype.bytepad=function(n,d){for(var g=this.encode(d),h=0;h<n.length;++h)g+=this.encodeString(n[h]);var _=d-g%d,w=[];return w.length=_,this.update(w),this},Me.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var n=this.blocks,d=this.lastByteIndex,g=this.blockCount,h=this.s;if(n[d>>2]|=this.padding[3&d],this.lastByteIndex===this.byteCount)for(n[0]=n[g],d=1;d<g+1;++d)n[d]=0;for(n[g-1]|=2147483648,d=0;d<g;++d)h[d]^=n[d];f(h)}},Me.prototype.toString=Me.prototype.hex=function(){this.finalize();for(var n,d=this.blockCount,g=this.s,h=this.outputBlocks,_=this.extraBytes,w=0,A=0,S="";A<h;){for(w=0;w<d&&A<h;++w,++A)n=g[w],S+=z[n>>4&15]+z[15&n]+z[n>>12&15]+z[n>>8&15]+z[n>>20&15]+z[n>>16&15]+z[n>>28&15]+z[n>>24&15];A%d==0&&(f(g),w=0)}return _&&(n=g[w],S+=z[n>>4&15]+z[15&n],_>1&&(S+=z[n>>12&15]+z[n>>8&15]),_>2&&(S+=z[n>>20&15]+z[n>>16&15])),S},Me.prototype.arrayBuffer=function(){this.finalize();var n,d=this.blockCount,g=this.s,h=this.outputBlocks,_=this.extraBytes,w=0,A=0,S=this.outputBits>>3;n=_?new ArrayBuffer(h+1<<2):new ArrayBuffer(S);for(var P=new Uint32Array(n);A<h;){for(w=0;w<d&&A<h;++w,++A)P[A]=g[w];A%d==0&&f(g)}return _&&(P[w]=g[w],n=n.slice(0,S)),n},Me.prototype.buffer=Me.prototype.arrayBuffer,Me.prototype.digest=Me.prototype.array=function(){this.finalize();for(var n,d,g=this.blockCount,h=this.s,_=this.outputBlocks,w=this.extraBytes,A=0,S=0,P=[];S<_;){for(A=0;A<g&&S<_;++A,++S)n=S<<2,d=h[A],P[n]=255&d,P[n+1]=d>>8&255,P[n+2]=d>>16&255,P[n+3]=d>>24&255;S%g==0&&f(h)}return w&&(n=S<<2,d=h[A],P[n]=255&d,w>1&&(P[n+1]=d>>8&255),w>2&&(P[n+2]=d>>16&255)),P},_t.prototype=new Me,_t.prototype.finalize=function(){return this.encode(this.outputBits,!0),Me.prototype.finalize.call(this)};var f=function(n){var d,g,h,_,w,A,S,P,I,V,se,pe,Pe,$e,ze,Oe,Be,Je,Xt,rr,nr,pt,Ht,st,xe,ke,xr,en,tn,rn,nn,an,on,sn,cn,un,ln,dn,fn,hn,yn,pn,gn,mn,bn,vn,_n,En,wn,An,Tn,On,Sn,In,Pn,Nn,Mn,Bn,jn,Rn,Cn,Ln,Fn;for(h=0;h<48;h+=2)_=n[0]^n[10]^n[20]^n[30]^n[40],w=n[1]^n[11]^n[21]^n[31]^n[41],A=n[2]^n[12]^n[22]^n[32]^n[42],S=n[3]^n[13]^n[23]^n[33]^n[43],P=n[4]^n[14]^n[24]^n[34]^n[44],I=n[5]^n[15]^n[25]^n[35]^n[45],V=n[6]^n[16]^n[26]^n[36]^n[46],se=n[7]^n[17]^n[27]^n[37]^n[47],d=(pe=n[8]^n[18]^n[28]^n[38]^n[48])^(A<<1|S>>>31),g=(Pe=n[9]^n[19]^n[29]^n[39]^n[49])^(S<<1|A>>>31),n[0]^=d,n[1]^=g,n[10]^=d,n[11]^=g,n[20]^=d,n[21]^=g,n[30]^=d,n[31]^=g,n[40]^=d,n[41]^=g,d=_^(P<<1|I>>>31),g=w^(I<<1|P>>>31),n[2]^=d,n[3]^=g,n[12]^=d,n[13]^=g,n[22]^=d,n[23]^=g,n[32]^=d,n[33]^=g,n[42]^=d,n[43]^=g,d=A^(V<<1|se>>>31),g=S^(se<<1|V>>>31),n[4]^=d,n[5]^=g,n[14]^=d,n[15]^=g,n[24]^=d,n[25]^=g,n[34]^=d,n[35]^=g,n[44]^=d,n[45]^=g,d=P^(pe<<1|Pe>>>31),g=I^(Pe<<1|pe>>>31),n[6]^=d,n[7]^=g,n[16]^=d,n[17]^=g,n[26]^=d,n[27]^=g,n[36]^=d,n[37]^=g,n[46]^=d,n[47]^=g,d=V^(_<<1|w>>>31),g=se^(w<<1|_>>>31),n[8]^=d,n[9]^=g,n[18]^=d,n[19]^=g,n[28]^=d,n[29]^=g,n[38]^=d,n[39]^=g,n[48]^=d,n[49]^=g,$e=n[0],ze=n[1],vn=n[11]<<4|n[10]>>>28,_n=n[10]<<4|n[11]>>>28,en=n[20]<<3|n[21]>>>29,tn=n[21]<<3|n[20]>>>29,Rn=n[31]<<9|n[30]>>>23,Cn=n[30]<<9|n[31]>>>23,pn=n[40]<<18|n[41]>>>14,gn=n[41]<<18|n[40]>>>14,sn=n[2]<<1|n[3]>>>31,cn=n[3]<<1|n[2]>>>31,Oe=n[13]<<12|n[12]>>>20,Be=n[12]<<12|n[13]>>>20,En=n[22]<<10|n[23]>>>22,wn=n[23]<<10|n[22]>>>22,rn=n[33]<<13|n[32]>>>19,nn=n[32]<<13|n[33]>>>19,Ln=n[42]<<2|n[43]>>>30,Fn=n[43]<<2|n[42]>>>30,In=n[5]<<30|n[4]>>>2,Pn=n[4]<<30|n[5]>>>2,un=n[14]<<6|n[15]>>>26,ln=n[15]<<6|n[14]>>>26,Je=n[25]<<11|n[24]>>>21,Xt=n[24]<<11|n[25]>>>21,An=n[34]<<15|n[35]>>>17,Tn=n[35]<<15|n[34]>>>17,an=n[45]<<29|n[44]>>>3,on=n[44]<<29|n[45]>>>3,st=n[6]<<28|n[7]>>>4,xe=n[7]<<28|n[6]>>>4,Nn=n[17]<<23|n[16]>>>9,Mn=n[16]<<23|n[17]>>>9,dn=n[26]<<25|n[27]>>>7,fn=n[27]<<25|n[26]>>>7,rr=n[36]<<21|n[37]>>>11,nr=n[37]<<21|n[36]>>>11,On=n[47]<<24|n[46]>>>8,Sn=n[46]<<24|n[47]>>>8,mn=n[8]<<27|n[9]>>>5,bn=n[9]<<27|n[8]>>>5,ke=n[18]<<20|n[19]>>>12,xr=n[19]<<20|n[18]>>>12,Bn=n[29]<<7|n[28]>>>25,jn=n[28]<<7|n[29]>>>25,hn=n[38]<<8|n[39]>>>24,yn=n[39]<<8|n[38]>>>24,pt=n[48]<<14|n[49]>>>18,Ht=n[49]<<14|n[48]>>>18,n[0]=$e^~Oe&Je,n[1]=ze^~Be&Xt,n[10]=st^~ke&en,n[11]=xe^~xr&tn,n[20]=sn^~un&dn,n[21]=cn^~ln&fn,n[30]=mn^~vn&En,n[31]=bn^~_n&wn,n[40]=In^~Nn&Bn,n[41]=Pn^~Mn&jn,n[2]=Oe^~Je&rr,n[3]=Be^~Xt&nr,n[12]=ke^~en&rn,n[13]=xr^~tn&nn,n[22]=un^~dn&hn,n[23]=ln^~fn&yn,n[32]=vn^~En&An,n[33]=_n^~wn&Tn,n[42]=Nn^~Bn&Rn,n[43]=Mn^~jn&Cn,n[4]=Je^~rr&pt,n[5]=Xt^~nr&Ht,n[14]=en^~rn&an,n[15]=tn^~nn&on,n[24]=dn^~hn&pn,n[25]=fn^~yn&gn,n[34]=En^~An&On,n[35]=wn^~Tn&Sn,n[44]=Bn^~Rn&Ln,n[45]=jn^~Cn&Fn,n[6]=rr^~pt&$e,n[7]=nr^~Ht&ze,n[16]=rn^~an&st,n[17]=nn^~on&xe,n[26]=hn^~pn&sn,n[27]=yn^~gn&cn,n[36]=An^~On&mn,n[37]=Tn^~Sn&bn,n[46]=Rn^~Ln&In,n[47]=Cn^~Fn&Pn,n[8]=pt^~$e&Oe,n[9]=Ht^~ze&Be,n[18]=an^~st&ke,n[19]=on^~xe&xr,n[28]=pn^~sn&un,n[29]=gn^~cn&ln,n[38]=On^~mn&vn,n[39]=Sn^~bn&_n,n[48]=Ln^~In&Nn,n[49]=Fn^~Pn&Mn,n[0]^=yt[h],n[1]^=yt[h+1]};if(T)r.exports=ot;else for(dt=0;dt<Yt.length;++dt)y[Yt[dt]]=ot[Yt[dt]]})()})(v);var B=v.exports,j=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,H=Math.ceil,C=Math.floor,k="[BigNumber Error] ",ce=k+"Number primitive has more than 15 significant digits: ",we=1e14,Y=14,De=9007199254740991,Ve=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Qe=1e7,ie=1e9;function U(r){var i=0|r;return r>0||r===i?i:i-1}function le(r){for(var i,c,y=1,b=r.length,T=r[0]+"";y<b;){for(i=r[y++]+"",c=Y-i.length;c--;i="0"+i);T+=i}for(b=T.length;T.charCodeAt(--b)===48;);return T.slice(0,b+1||1)}function Z(r,i){var c,y,b=r.c,T=i.c,M=r.s,z=i.s,oe=r.e,ue=i.e;if(!M||!z)return null;if(c=b&&!b[0],y=T&&!T[0],c||y)return c?y?0:-z:M;if(M!=z)return M;if(c=M<0,y=oe==ue,!b||!T)return y?0:!b^c?1:-1;if(!y)return oe>ue^c?1:-1;for(z=(oe=b.length)<(ue=T.length)?oe:ue,M=0;M<z;M++)if(b[M]!=T[M])return b[M]>T[M]^c?1:-1;return oe==ue?0:oe>ue^c?1:-1}function ye(r,i,c,y){if(r<i||r>c||r!==C(r))throw Error(k+(y||"Argument")+(typeof r=="number"?r<i||r>c?" out of range: ":" not an integer: ":" not a primitive number: ")+String(r))}function qe(r){var i=r.c.length-1;return U(r.e/Y)==i&&r.c[i]%2!=0}function D(r,i){return(r.length>1?r.charAt(0)+"."+r.slice(1):r)+(i<0?"e":"e+")+i}function X(r,i,c){var y,b;if(i<0){for(b=c+".";++i;b+=c);r=b+r}else if(++i>(y=r.length)){for(b=c,i-=y;--i;b+=c);r+=b}else i<y&&(r=r.slice(0,i)+"."+r.slice(i));return r}var x=function r(i){var c,y,b,T,M,z,oe,ue,yt,Ke,W=F.prototype={constructor:F,toString:null,valueOf:null},at=new F(1),Ue=20,He=4,ut=-7,Kt=21,Dt=-1e7,lt=1e7,kt=!1,tr=1,ot=0,Yt={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},dt="0123456789abcdefghijklmnopqrstuvwxyz",Ut=!0;function F(f,n){var d,g,h,_,w,A,S,P,I=this;if(!(I instanceof F))return new F(f,n);if(n==null){if(f&&f._isBigNumber===!0)return I.s=f.s,void(!f.c||f.e>lt?I.c=I.e=null:f.e<Dt?I.c=[I.e=0]:(I.e=f.e,I.c=f.c.slice()));if((A=typeof f=="number")&&0*f==0){if(I.s=1/f<0?(f=-f,-1):1,f===~~f){for(_=0,w=f;w>=10;w/=10,_++);return void(_>lt?I.c=I.e=null:(I.e=_,I.c=[f]))}P=String(f)}else{if(!j.test(P=String(f)))return b(I,P,A);I.s=P.charCodeAt(0)==45?(P=P.slice(1),-1):1}(_=P.indexOf("."))>-1&&(P=P.replace(".","")),(w=P.search(/e/i))>0?(_<0&&(_=w),_+=+P.slice(w+1),P=P.substring(0,w)):_<0&&(_=P.length)}else{if(ye(n,2,dt.length,"Base"),n==10&&Ut)return Me(I=new F(f),Ue+I.e+1,He);if(P=String(f),A=typeof f=="number"){if(0*f!=0)return b(I,P,A,n);if(I.s=1/f<0?(P=P.slice(1),-1):1,F.DEBUG&&P.replace(/^0\.0*|\./,"").length>15)throw Error(ce+f)}else I.s=P.charCodeAt(0)===45?(P=P.slice(1),-1):1;for(d=dt.slice(0,n),_=w=0,S=P.length;w<S;w++)if(d.indexOf(g=P.charAt(w))<0){if(g=="."){if(w>_){_=S;continue}}else if(!h&&(P==P.toUpperCase()&&(P=P.toLowerCase())||P==P.toLowerCase()&&(P=P.toUpperCase()))){h=!0,w=-1,_=0;continue}return b(I,String(f),A,n)}A=!1,(_=(P=y(P,n,10,I.s)).indexOf("."))>-1?P=P.replace(".",""):_=P.length}for(w=0;P.charCodeAt(w)===48;w++);for(S=P.length;P.charCodeAt(--S)===48;);if(P=P.slice(w,++S)){if(S-=w,A&&F.DEBUG&&S>15&&(f>De||f!==C(f)))throw Error(ce+I.s*f);if((_=_-w-1)>lt)I.c=I.e=null;else if(_<Dt)I.c=[I.e=0];else{if(I.e=_,I.c=[],w=(_+1)%Y,_<0&&(w+=Y),w<S){for(w&&I.c.push(+P.slice(0,w)),S-=Y;w<S;)I.c.push(+P.slice(w,w+=Y));w=Y-(P=P.slice(w)).length}else w-=S;for(;w--;P+="0");I.c.push(+P)}}else I.c=[I.e=0]}function Zt(f,n,d,g){var h,_,w,A,S;if(d==null?d=He:ye(d,0,8),!f.c)return f.toString();if(h=f.c[0],w=f.e,n==null)S=le(f.c),S=g==1||g==2&&(w<=ut||w>=Kt)?D(S,w):X(S,w,"0");else if(_=(f=Me(new F(f),n,d)).e,A=(S=le(f.c)).length,g==1||g==2&&(n<=_||_<=ut)){for(;A<n;S+="0",A++);S=D(S,_)}else if(n-=w,S=X(S,_,"0"),_+1>A){if(--n>0)for(S+=".";n--;S+="0");}else if((n+=_-A)>0)for(_+1==A&&(S+=".");n--;S+="0");return f.s<0&&h?"-"+S:S}function wr(f,n){for(var d,g=1,h=new F(f[0]);g<f.length;g++){if(!(d=new F(f[g])).s){h=d;break}n.call(h,d)&&(h=d)}return h}function Ar(f,n,d){for(var g=1,h=n.length;!n[--h];n.pop());for(h=n[0];h>=10;h/=10,g++);return(d=g+d*Y-1)>lt?f.c=f.e=null:d<Dt?f.c=[f.e=0]:(f.e=d,f.c=n),f}function Me(f,n,d,g){var h,_,w,A,S,P,I,V=f.c,se=Ve;if(V){e:{for(h=1,A=V[0];A>=10;A/=10,h++);if((_=n-h)<0)_+=Y,w=n,I=(S=V[P=0])/se[h-w-1]%10|0;else if((P=H((_+1)/Y))>=V.length){if(!g)break e;for(;V.length<=P;V.push(0));S=I=0,h=1,w=(_%=Y)-Y+1}else{for(S=A=V[P],h=1;A>=10;A/=10,h++);I=(w=(_%=Y)-Y+h)<0?0:S/se[h-w-1]%10|0}if(g=g||n<0||V[P+1]!=null||(w<0?S:S%se[h-w-1]),g=d<4?(I||g)&&(d==0||d==(f.s<0?3:2)):I>5||I==5&&(d==4||g||d==6&&(_>0?w>0?S/se[h-w]:0:V[P-1])%10&1||d==(f.s<0?8:7)),n<1||!V[0])return V.length=0,g?(n-=f.e+1,V[0]=se[(Y-n%Y)%Y],f.e=-n||0):V[0]=f.e=0,f;if(_==0?(V.length=P,A=1,P--):(V.length=P+1,A=se[Y-_],V[P]=w>0?C(S/se[h-w]%se[w])*A:0),g)for(;;){if(P==0){for(_=1,w=V[0];w>=10;w/=10,_++);for(w=V[0]+=A,A=1;w>=10;w/=10,A++);_!=A&&(f.e++,V[0]==we&&(V[0]=1));break}if(V[P]+=A,V[P]!=we)break;V[P--]=0,A=1}for(_=V.length;V[--_]===0;V.pop());}f.e>lt?f.c=f.e=null:f.e<Dt&&(f.c=[f.e=0])}return f}function _t(f){var n,d=f.e;return d===null?f.toString():(n=le(f.c),n=d<=ut||d>=Kt?D(n,d):X(n,d,"0"),f.s<0?"-"+n:n)}return F.clone=r,F.ROUND_UP=0,F.ROUND_DOWN=1,F.ROUND_CEIL=2,F.ROUND_FLOOR=3,F.ROUND_HALF_UP=4,F.ROUND_HALF_DOWN=5,F.ROUND_HALF_EVEN=6,F.ROUND_HALF_CEIL=7,F.ROUND_HALF_FLOOR=8,F.EUCLID=9,F.config=F.set=function(f){var n,d;if(f!=null){if(typeof f!="object")throw Error(k+"Object expected: "+f);if(f.hasOwnProperty(n="DECIMAL_PLACES")&&(ye(d=f[n],0,ie,n),Ue=d),f.hasOwnProperty(n="ROUNDING_MODE")&&(ye(d=f[n],0,8,n),He=d),f.hasOwnProperty(n="EXPONENTIAL_AT")&&((d=f[n])&&d.pop?(ye(d[0],-ie,0,n),ye(d[1],0,ie,n),ut=d[0],Kt=d[1]):(ye(d,-ie,ie,n),ut=-(Kt=d<0?-d:d))),f.hasOwnProperty(n="RANGE"))if((d=f[n])&&d.pop)ye(d[0],-ie,-1,n),ye(d[1],1,ie,n),Dt=d[0],lt=d[1];else{if(ye(d,-ie,ie,n),!d)throw Error(k+n+" cannot be zero: "+d);Dt=-(lt=d<0?-d:d)}if(f.hasOwnProperty(n="CRYPTO")){if((d=f[n])!==!!d)throw Error(k+n+" not true or false: "+d);if(d){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw kt=!d,Error(k+"crypto unavailable");kt=d}else kt=d}if(f.hasOwnProperty(n="MODULO_MODE")&&(ye(d=f[n],0,9,n),tr=d),f.hasOwnProperty(n="POW_PRECISION")&&(ye(d=f[n],0,ie,n),ot=d),f.hasOwnProperty(n="FORMAT")){if(typeof(d=f[n])!="object")throw Error(k+n+" not an object: "+d);Yt=d}if(f.hasOwnProperty(n="ALPHABET")){if(typeof(d=f[n])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(d))throw Error(k+n+" invalid: "+d);Ut=d.slice(0,10)=="0123456789",dt=d}}return{DECIMAL_PLACES:Ue,ROUNDING_MODE:He,EXPONENTIAL_AT:[ut,Kt],RANGE:[Dt,lt],CRYPTO:kt,MODULO_MODE:tr,POW_PRECISION:ot,FORMAT:Yt,ALPHABET:dt}},F.isBigNumber=function(f){if(!f||f._isBigNumber!==!0)return!1;if(!F.DEBUG)return!0;var n,d,g=f.c,h=f.e,_=f.s;e:if({}.toString.call(g)=="[object Array]"){if((_===1||_===-1)&&h>=-ie&&h<=ie&&h===C(h)){if(g[0]===0){if(h===0&&g.length===1)return!0;break e}if((n=(h+1)%Y)<1&&(n+=Y),String(g[0]).length==n){for(n=0;n<g.length;n++)if((d=g[n])<0||d>=we||d!==C(d))break e;if(d!==0)return!0}}}else if(g===null&&h===null&&(_===null||_===1||_===-1))return!0;throw Error(k+"Invalid BigNumber: "+f)},F.maximum=F.max=function(){return wr(arguments,W.lt)},F.minimum=F.min=function(){return wr(arguments,W.gt)},F.random=(T=9007199254740992,M=Math.random()*T&2097151?function(){return C(Math.random()*T)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(f){var n,d,g,h,_,w=0,A=[],S=new F(at);if(f==null?f=Ue:ye(f,0,ie),h=H(f/Y),kt)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(h*=2));w<h;)(_=131072*n[w]+(n[w+1]>>>11))>=9e15?(d=crypto.getRandomValues(new Uint32Array(2)),n[w]=d[0],n[w+1]=d[1]):(A.push(_%1e14),w+=2);w=h/2}else{if(!crypto.randomBytes)throw kt=!1,Error(k+"crypto unavailable");for(n=crypto.randomBytes(h*=7);w<h;)(_=281474976710656*(31&n[w])+1099511627776*n[w+1]+4294967296*n[w+2]+16777216*n[w+3]+(n[w+4]<<16)+(n[w+5]<<8)+n[w+6])>=9e15?crypto.randomBytes(7).copy(n,w):(A.push(_%1e14),w+=7);w=h/7}if(!kt)for(;w<h;)(_=M())<9e15&&(A[w++]=_%1e14);for(h=A[--w],f%=Y,h&&f&&(_=Ve[Y-f],A[w]=C(h/_)*_);A[w]===0;A.pop(),w--);if(w<0)A=[g=0];else{for(g=-1;A[0]===0;A.splice(0,1),g-=Y);for(w=1,_=A[0];_>=10;_/=10,w++);w<Y&&(g-=Y-w)}return S.e=g,S.c=A,S}),F.sum=function(){for(var f=1,n=arguments,d=new F(n[0]);f<n.length;)d=d.plus(n[f++]);return d},y=function(){var f="0123456789";function n(d,g,h,_){for(var w,A,S=[0],P=0,I=d.length;P<I;){for(A=S.length;A--;S[A]*=g);for(S[0]+=_.indexOf(d.charAt(P++)),w=0;w<S.length;w++)S[w]>h-1&&(S[w+1]==null&&(S[w+1]=0),S[w+1]+=S[w]/h|0,S[w]%=h)}return S.reverse()}return function(d,g,h,_,w){var A,S,P,I,V,se,pe,Pe,$e=d.indexOf("."),ze=Ue,Oe=He;for($e>=0&&(I=ot,ot=0,d=d.replace(".",""),se=(Pe=new F(g)).pow(d.length-$e),ot=I,Pe.c=n(X(le(se.c),se.e,"0"),10,h,f),Pe.e=Pe.c.length),P=I=(pe=n(d,g,h,w?(A=dt,f):(A=f,dt))).length;pe[--I]==0;pe.pop());if(!pe[0])return A.charAt(0);if($e<0?--P:(se.c=pe,se.e=P,se.s=_,pe=(se=c(se,Pe,ze,Oe,h)).c,V=se.r,P=se.e),$e=pe[S=P+ze+1],I=h/2,V=V||S<0||pe[S+1]!=null,V=Oe<4?($e!=null||V)&&(Oe==0||Oe==(se.s<0?3:2)):$e>I||$e==I&&(Oe==4||V||Oe==6&&1&pe[S-1]||Oe==(se.s<0?8:7)),S<1||!pe[0])d=V?X(A.charAt(1),-ze,A.charAt(0)):A.charAt(0);else{if(pe.length=S,V)for(--h;++pe[--S]>h;)pe[S]=0,S||(++P,pe=[1].concat(pe));for(I=pe.length;!pe[--I];);for($e=0,d="";$e<=I;d+=A.charAt(pe[$e++]));d=X(d,P,A.charAt(0))}return d}}(),c=function(){function f(g,h,_){var w,A,S,P,I=0,V=g.length,se=h%Qe,pe=h/Qe|0;for(g=g.slice();V--;)I=((A=se*(S=g[V]%Qe)+(w=pe*S+(P=g[V]/Qe|0)*se)%Qe*Qe+I)/_|0)+(w/Qe|0)+pe*P,g[V]=A%_;return I&&(g=[I].concat(g)),g}function n(g,h,_,w){var A,S;if(_!=w)S=_>w?1:-1;else for(A=S=0;A<_;A++)if(g[A]!=h[A]){S=g[A]>h[A]?1:-1;break}return S}function d(g,h,_,w){for(var A=0;_--;)g[_]-=A,A=g[_]<h[_]?1:0,g[_]=A*w+g[_]-h[_];for(;!g[0]&&g.length>1;g.splice(0,1));}return function(g,h,_,w,A){var S,P,I,V,se,pe,Pe,$e,ze,Oe,Be,Je,Xt,rr,nr,pt,Ht,st=g.s==h.s?1:-1,xe=g.c,ke=h.c;if(!(xe&&xe[0]&&ke&&ke[0]))return new F(g.s&&h.s&&(xe?!ke||xe[0]!=ke[0]:ke)?xe&&xe[0]==0||!ke?0*st:st/0:NaN);for(ze=($e=new F(st)).c=[],st=_+(P=g.e-h.e)+1,A||(A=we,P=U(g.e/Y)-U(h.e/Y),st=st/Y|0),I=0;ke[I]==(xe[I]||0);I++);if(ke[I]>(xe[I]||0)&&P--,st<0)ze.push(1),V=!0;else{for(rr=xe.length,pt=ke.length,I=0,st+=2,(se=C(A/(ke[0]+1)))>1&&(ke=f(ke,se,A),xe=f(xe,se,A),pt=ke.length,rr=xe.length),Xt=pt,Be=(Oe=xe.slice(0,pt)).length;Be<pt;Oe[Be++]=0);Ht=ke.slice(),Ht=[0].concat(Ht),nr=ke[0],ke[1]>=A/2&&nr++;do{if(se=0,(S=n(ke,Oe,pt,Be))<0){if(Je=Oe[0],pt!=Be&&(Je=Je*A+(Oe[1]||0)),(se=C(Je/nr))>1)for(se>=A&&(se=A-1),Pe=(pe=f(ke,se,A)).length,Be=Oe.length;n(pe,Oe,Pe,Be)==1;)se--,d(pe,pt<Pe?Ht:ke,Pe,A),Pe=pe.length,S=1;else se==0&&(S=se=1),Pe=(pe=ke.slice()).length;if(Pe<Be&&(pe=[0].concat(pe)),d(Oe,pe,Be,A),Be=Oe.length,S==-1)for(;n(ke,Oe,pt,Be)<1;)se++,d(Oe,pt<Be?Ht:ke,Be,A),Be=Oe.length}else S===0&&(se++,Oe=[0]);ze[I++]=se,Oe[0]?Oe[Be++]=xe[Xt]||0:(Oe=[xe[Xt]],Be=1)}while((Xt++<rr||Oe[0]!=null)&&st--);V=Oe[0]!=null,ze[0]||ze.splice(0,1)}if(A==we){for(I=1,st=ze[0];st>=10;st/=10,I++);Me($e,_+($e.e=I+P*Y-1)+1,w,V)}else $e.e=P,$e.r=+V;return $e}}(),z=/^(-?)0([xbo])(?=\w[\w.]*$)/i,oe=/^([^.]+)\.$/,ue=/^\.([^.]+)$/,yt=/^-?(Infinity|NaN)$/,Ke=/^\s*\+(?=[\w.])|^\s+|\s+$/g,b=function(f,n,d,g){var h,_=d?n:n.replace(Ke,"");if(yt.test(_))f.s=isNaN(_)?null:_<0?-1:1;else{if(!d&&(_=_.replace(z,function(w,A,S){return h=(S=S.toLowerCase())=="x"?16:S=="b"?2:8,g&&g!=h?w:A}),g&&(h=g,_=_.replace(oe,"$1").replace(ue,"0.$1")),n!=_))return new F(_,h);if(F.DEBUG)throw Error(k+"Not a"+(g?" base "+g:"")+" number: "+n);f.s=null}f.c=f.e=null},W.absoluteValue=W.abs=function(){var f=new F(this);return f.s<0&&(f.s=1),f},W.comparedTo=function(f,n){return Z(this,new F(f,n))},W.decimalPlaces=W.dp=function(f,n){var d,g,h,_=this;if(f!=null)return ye(f,0,ie),n==null?n=He:ye(n,0,8),Me(new F(_),f+_.e+1,n);if(!(d=_.c))return null;if(g=((h=d.length-1)-U(this.e/Y))*Y,h=d[h])for(;h%10==0;h/=10,g--);return g<0&&(g=0),g},W.dividedBy=W.div=function(f,n){return c(this,new F(f,n),Ue,He)},W.dividedToIntegerBy=W.idiv=function(f,n){return c(this,new F(f,n),0,1)},W.exponentiatedBy=W.pow=function(f,n){var d,g,h,_,w,A,S,P,I=this;if((f=new F(f)).c&&!f.isInteger())throw Error(k+"Exponent not an integer: "+_t(f));if(n!=null&&(n=new F(n)),w=f.e>14,!I.c||!I.c[0]||I.c[0]==1&&!I.e&&I.c.length==1||!f.c||!f.c[0])return P=new F(Math.pow(+_t(I),w?f.s*(2-qe(f)):+_t(f))),n?P.mod(n):P;if(A=f.s<0,n){if(n.c?!n.c[0]:!n.s)return new F(NaN);(g=!A&&I.isInteger()&&n.isInteger())&&(I=I.mod(n))}else{if(f.e>9&&(I.e>0||I.e<-1||(I.e==0?I.c[0]>1||w&&I.c[1]>=24e7:I.c[0]<8e13||w&&I.c[0]<=9999975e7)))return _=I.s<0&&qe(f)?-0:0,I.e>-1&&(_=1/_),new F(A?1/_:_);ot&&(_=H(ot/Y+2))}for(w?(d=new F(.5),A&&(f.s=1),S=qe(f)):S=(h=Math.abs(+_t(f)))%2,P=new F(at);;){if(S){if(!(P=P.times(I)).c)break;_?P.c.length>_&&(P.c.length=_):g&&(P=P.mod(n))}if(h){if((h=C(h/2))===0)break;S=h%2}else if(Me(f=f.times(d),f.e+1,1),f.e>14)S=qe(f);else{if((h=+_t(f))==0)break;S=h%2}I=I.times(I),_?I.c&&I.c.length>_&&(I.c.length=_):g&&(I=I.mod(n))}return g?P:(A&&(P=at.div(P)),n?P.mod(n):_?Me(P,ot,He,void 0):P)},W.integerValue=function(f){var n=new F(this);return f==null?f=He:ye(f,0,8),Me(n,n.e+1,f)},W.isEqualTo=W.eq=function(f,n){return Z(this,new F(f,n))===0},W.isFinite=function(){return!!this.c},W.isGreaterThan=W.gt=function(f,n){return Z(this,new F(f,n))>0},W.isGreaterThanOrEqualTo=W.gte=function(f,n){return(n=Z(this,new F(f,n)))===1||n===0},W.isInteger=function(){return!!this.c&&U(this.e/Y)>this.c.length-2},W.isLessThan=W.lt=function(f,n){return Z(this,new F(f,n))<0},W.isLessThanOrEqualTo=W.lte=function(f,n){return(n=Z(this,new F(f,n)))===-1||n===0},W.isNaN=function(){return!this.s},W.isNegative=function(){return this.s<0},W.isPositive=function(){return this.s>0},W.isZero=function(){return!!this.c&&this.c[0]==0},W.minus=function(f,n){var d,g,h,_,w=this,A=w.s;if(n=(f=new F(f,n)).s,!A||!n)return new F(NaN);if(A!=n)return f.s=-n,w.plus(f);var S=w.e/Y,P=f.e/Y,I=w.c,V=f.c;if(!S||!P){if(!I||!V)return I?(f.s=-n,f):new F(V?w:NaN);if(!I[0]||!V[0])return V[0]?(f.s=-n,f):new F(I[0]?w:He==3?-0:0)}if(S=U(S),P=U(P),I=I.slice(),A=S-P){for((_=A<0)?(A=-A,h=I):(P=S,h=V),h.reverse(),n=A;n--;h.push(0));h.reverse()}else for(g=(_=(A=I.length)<(n=V.length))?A:n,A=n=0;n<g;n++)if(I[n]!=V[n]){_=I[n]<V[n];break}if(_&&(h=I,I=V,V=h,f.s=-f.s),(n=(g=V.length)-(d=I.length))>0)for(;n--;I[d++]=0);for(n=we-1;g>A;){if(I[--g]<V[g]){for(d=g;d&&!I[--d];I[d]=n);--I[d],I[g]+=we}I[g]-=V[g]}for(;I[0]==0;I.splice(0,1),--P);return I[0]?Ar(f,I,P):(f.s=He==3?-1:1,f.c=[f.e=0],f)},W.modulo=W.mod=function(f,n){var d,g,h=this;return f=new F(f,n),!h.c||!f.s||f.c&&!f.c[0]?new F(NaN):!f.c||h.c&&!h.c[0]?new F(h):(tr==9?(g=f.s,f.s=1,d=c(h,f,0,3),f.s=g,d.s*=g):d=c(h,f,0,tr),(f=h.minus(d.times(f))).c[0]||tr!=1||(f.s=h.s),f)},W.multipliedBy=W.times=function(f,n){var d,g,h,_,w,A,S,P,I,V,se,pe,Pe,$e,ze,Oe=this,Be=Oe.c,Je=(f=new F(f,n)).c;if(!(Be&&Je&&Be[0]&&Je[0]))return!Oe.s||!f.s||Be&&!Be[0]&&!Je||Je&&!Je[0]&&!Be?f.c=f.e=f.s=null:(f.s*=Oe.s,Be&&Je?(f.c=[0],f.e=0):f.c=f.e=null),f;for(g=U(Oe.e/Y)+U(f.e/Y),f.s*=Oe.s,(S=Be.length)<(V=Je.length)&&(Pe=Be,Be=Je,Je=Pe,h=S,S=V,V=h),h=S+V,Pe=[];h--;Pe.push(0));for($e=we,ze=Qe,h=V;--h>=0;){for(d=0,se=Je[h]%ze,pe=Je[h]/ze|0,_=h+(w=S);_>h;)d=((P=se*(P=Be[--w]%ze)+(A=pe*P+(I=Be[w]/ze|0)*se)%ze*ze+Pe[_]+d)/$e|0)+(A/ze|0)+pe*I,Pe[_--]=P%$e;Pe[_]=d}return d?++g:Pe.splice(0,1),Ar(f,Pe,g)},W.negated=function(){var f=new F(this);return f.s=-f.s||null,f},W.plus=function(f,n){var d,g=this,h=g.s;if(n=(f=new F(f,n)).s,!h||!n)return new F(NaN);if(h!=n)return f.s=-n,g.minus(f);var _=g.e/Y,w=f.e/Y,A=g.c,S=f.c;if(!_||!w){if(!A||!S)return new F(h/0);if(!A[0]||!S[0])return S[0]?f:new F(A[0]?g:0*h)}if(_=U(_),w=U(w),A=A.slice(),h=_-w){for(h>0?(w=_,d=S):(h=-h,d=A),d.reverse();h--;d.push(0));d.reverse()}for((h=A.length)-(n=S.length)<0&&(d=S,S=A,A=d,n=h),h=0;n;)h=(A[--n]=A[n]+S[n]+h)/we|0,A[n]=we===A[n]?0:A[n]%we;return h&&(A=[h].concat(A),++w),Ar(f,A,w)},W.precision=W.sd=function(f,n){var d,g,h,_=this;if(f!=null&&f!==!!f)return ye(f,1,ie),n==null?n=He:ye(n,0,8),Me(new F(_),f,n);if(!(d=_.c))return null;if(g=(h=d.length-1)*Y+1,h=d[h]){for(;h%10==0;h/=10,g--);for(h=d[0];h>=10;h/=10,g++);}return f&&_.e+1>g&&(g=_.e+1),g},W.shiftedBy=function(f){return ye(f,-9007199254740991,De),this.times("1e"+f)},W.squareRoot=W.sqrt=function(){var f,n,d,g,h,_=this,w=_.c,A=_.s,S=_.e,P=Ue+4,I=new F("0.5");if(A!==1||!w||!w[0])return new F(!A||A<0&&(!w||w[0])?NaN:w?_:1/0);if((A=Math.sqrt(+_t(_)))==0||A==1/0?(((n=le(w)).length+S)%2==0&&(n+="0"),A=Math.sqrt(+n),S=U((S+1)/2)-(S<0||S%2),d=new F(n=A==1/0?"5e"+S:(n=A.toExponential()).slice(0,n.indexOf("e")+1)+S)):d=new F(A+""),d.c[0]){for((A=(S=d.e)+P)<3&&(A=0);;)if(h=d,d=I.times(h.plus(c(_,h,P,1))),le(h.c).slice(0,A)===(n=le(d.c)).slice(0,A)){if(d.e<S&&--A,(n=n.slice(A-3,A+1))!="9999"&&(g||n!="4999")){+n&&(+n.slice(1)||n.charAt(0)!="5")||(Me(d,d.e+Ue+2,1),f=!d.times(d).eq(_));break}if(!g&&(Me(h,h.e+Ue+2,0),h.times(h).eq(_))){d=h;break}P+=4,A+=4,g=1}}return Me(d,d.e+Ue+1,He,f)},W.toExponential=function(f,n){return f!=null&&(ye(f,0,ie),f++),Zt(this,f,n,1)},W.toFixed=function(f,n){return f!=null&&(ye(f,0,ie),f=f+this.e+1),Zt(this,f,n)},W.toFormat=function(f,n,d){var g,h=this;if(d==null)f!=null&&n&&typeof n=="object"?(d=n,n=null):f&&typeof f=="object"?(d=f,f=n=null):d=Yt;else if(typeof d!="object")throw Error(k+"Argument not an object: "+d);if(g=h.toFixed(f,n),h.c){var _,w=g.split("."),A=+d.groupSize,S=+d.secondaryGroupSize,P=d.groupSeparator||"",I=w[0],V=w[1],se=h.s<0,pe=se?I.slice(1):I,Pe=pe.length;if(S&&(_=A,A=S,S=_,Pe-=_),A>0&&Pe>0){for(_=Pe%A||A,I=pe.substr(0,_);_<Pe;_+=A)I+=P+pe.substr(_,A);S>0&&(I+=P+pe.slice(_)),se&&(I="-"+I)}g=V?I+(d.decimalSeparator||"")+((S=+d.fractionGroupSize)?V.replace(new RegExp("\\d{"+S+"}\\B","g"),"$&"+(d.fractionGroupSeparator||"")):V):I}return(d.prefix||"")+g+(d.suffix||"")},W.toFraction=function(f){var n,d,g,h,_,w,A,S,P,I,V,se,pe=this,Pe=pe.c;if(f!=null&&(!(A=new F(f)).isInteger()&&(A.c||A.s!==1)||A.lt(at)))throw Error(k+"Argument "+(A.isInteger()?"out of range: ":"not an integer: ")+_t(A));if(!Pe)return new F(pe);for(n=new F(at),P=d=new F(at),g=S=new F(at),se=le(Pe),_=n.e=se.length-pe.e-1,n.c[0]=Ve[(w=_%Y)<0?Y+w:w],f=!f||A.comparedTo(n)>0?_>0?n:P:A,w=lt,lt=1/0,A=new F(se),S.c[0]=0;I=c(A,n,0,1),(h=d.plus(I.times(g))).comparedTo(f)!=1;)d=g,g=h,P=S.plus(I.times(h=P)),S=h,n=A.minus(I.times(h=n)),A=h;return h=c(f.minus(d),g,0,1),S=S.plus(h.times(P)),d=d.plus(h.times(g)),S.s=P.s=pe.s,V=c(P,g,_*=2,He).minus(pe).abs().comparedTo(c(S,d,_,He).minus(pe).abs())<1?[P,g]:[S,d],lt=w,V},W.toNumber=function(){return+_t(this)},W.toPrecision=function(f,n){return f!=null&&ye(f,1,ie),Zt(this,f,n,2)},W.toString=function(f){var n,d=this,g=d.s,h=d.e;return h===null?g?(n="Infinity",g<0&&(n="-"+n)):n="NaN":(f==null?n=h<=ut||h>=Kt?D(le(d.c),h):X(le(d.c),h,"0"):f===10&&Ut?n=X(le((d=Me(new F(d),Ue+h+1,He)).c),d.e,"0"):(ye(f,2,dt.length,"Base"),n=y(X(le(d.c),h,"0"),10,f,g,!0)),g<0&&d.c[0]&&(n="-"+n)),n},W.valueOf=W.toJSON=function(){return _t(this)},W._isBigNumber=!0,W[Symbol.toStringTag]="BigNumber",W[Symbol.for("nodejs.util.inspect.custom")]=W.valueOf,i!=null&&F.set(i),F}();const Re={ROUNDING_MODE:x.ROUND_DOWN};function Te(r){return new TextEncoder().encode(r)}function Ae(r){return typeof r=="string"?Ae(Fe(r)):new TextDecoder().decode(r)}x.config(Re);const ve="UNKNOWN_ERROR",ne="INVALID_ARGUMENT";function de(r,i=ve,c={}){const y=[];Object.keys(c).forEach(M=>{try{y.push(M+"="+JSON.stringify(c[M]))}catch{y.push(M+"="+JSON.stringify(c[M].toString()))}});const b=r;y.length&&(r+=" ("+y.join(", ")+")");const T=new Error(r);return T.reason=b,T.code=i,Object.keys(c).forEach(function(M){T[M]=c[M]}),T}function Fe(r){if(typeof r!="string")throw new Error("hexToBytes only accept strings, got: "+typeof r);if(r.substr(0,2)==="0x")return Fe(r.substr(2));const i=new Uint8Array(Math.ceil(r.length/2));let c=0;for(let y=0;y<r.length;y+=2){const b=parseInt(r.substr(y,2),16);if(isNaN(b))throw new Error("Cannot read hex string:"+JSON.stringify(r));i[c]=b,c++}return i}function Xe(r){return Array.from(r).map(i=>i.toString(16).padStart(2,"0")).join("")}function me(r,i){if(typeof r=="string"){if(i&&i.encoding==="hex"&&typeof r=="string"){let c=r;c.length>2&&c.substr(0,2)==="0x"&&(c=c.substr(2));const y=Fe(c);return B.keccak256(y)}return B.keccak256(Te(r))}return B.keccak256(r)}const Ne={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function Ye(r,i,c){return new Array(i-r.length+1).join(c||"0")+r}function $(r){let i="",c=0;const y=r.length;for(r.substring(0,2)==="0x"&&(c=2);c<y;c+=2){const b=parseInt(r.substr(c,2),16);i+=String.fromCharCode(b)}return i}function Le(r){return wt(r)&&r.name&&r.name.indexOf("(")!==-1?r.name:r.name+"("+tt(!1,r.inputs||[]).join(",")+")"}function gt(...r){const i=r.reduce((b,T)=>b+T.length,0),c=new Uint8Array(i);let y=0;for(const b of r)c.set(b,y),y+=b.length;return c}function tt(r,i){const c=[];return i.forEach(function(y){if(typeof y.components=="object"){if(y.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let b="";const T=y.type.indexOf("[");T>=0&&(b=y.type.substring(T));const M=tt(r,y.components);At(M)&&r?c.push("tuple("+M.join(",")+")"+b):c.push("("+M.join(",")+")"+b)}else c.push(y.type)}),c}function Pt(r){const i=r.indexOf("("),c=r.indexOf(")");return i!==-1&&c!==-1?r.substr(0,i):r}function Nt(r){const i=r.indexOf("("),c=r.indexOf(")");return i!==-1&&c!==-1?r.substr(i+1,c-i-1).replace(" ",""):""}function gr(r){return r==null?r:nt(r).toNumber()}function ge(r){return nt(r).toNumber()}function $t(r){return qt(r)?r.toString(10):""+r}function ht(r){return typeof r=="string"&&!r.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(r)?"0x"+r:Ce(r)}function Lt(r){if(typeof r=="string")return r.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(r)?Ce(r):"0x"+Xe(Te(r));if(r instanceof Uint8Array)return"0x"+Xe(r);throw new Error(`toStringData: Error trying to convert ${r} (${typeof r}) to a hex string.`)}function rt(r){return typeof r=="boolean"?r:nt(r).toNumber()!==0}function et(r){const i=nt(r),c=i.toString(16);return i.isLessThan(0)?"-0x"+c.substr(1):"0x"+c}function Ce(r){if(zt(r))return et(+r);if(qt(r))return et(r);if(br(r)){const i=r;if(i.indexOf("-0x")===0)return et(i);if(i.indexOf("0x")===0)return i;if(!isFinite(i))return Xe(Te(i))}if(r instanceof Uint8Array)return"0x"+Xe(r);if(At(r)||wt(r))throw new Error("toHex can only be called with scalar values, not objects or arrays");return et(r)}function cr(r){const i=r?r.toLowerCase():"ether",c=Ne[i];if(c===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(Ne,null,2));return new x(c,10)}function nt(r){let i=r||0;return qt(i)?i:(typeof i=="string"&&(i=i.trim()),typeof i!="string"||i.indexOf("0x")!==0&&i.indexOf("-0x")!==0?i instanceof Uint8Array?new x(Xe(i),16):new x(i,10):new x(i.replace("0x","").toLowerCase(),16))}function Yr(r){return new x(new Array(r).fill("1").join(""),2)}function Vt(r,i=256){const c=nt(r).integerValue();return c.isLessThan(0)?Yr(i).plus(c).plus(1):c}function Mr(r,i){return Ye(r.toString(2),i,"0")[0]==="1"}function Zr(r){if(typeof r!="string")throw de("invalid address",ne,{arg:"address",value:r});if(r.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return r.trim().substring(0,2)!=="0x"&&(r="0x"+r),Rr(r);throw de("invalid address",ne,{arg:"address",value:r})}function mr(r,i=256){if(Mr(r,i)){const c=Yr(i);return r.minus(c).minus(1)}return r}function Br(r){return/^0x[0-9a-f]{40}$/i.test(r)}function ur(r){return!!/^(0x)?[0-9a-f]{40}$/i.test(r)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(r)&&!/^(0x)?[0-9A-F]{40}$/.test(r))||jr(r))}function jr(r){const i=r.replace("0x",""),c=me(i.toLowerCase());for(let y=0;y<40;y++)if(parseInt(c[y],16)>7&&i[y].toUpperCase()!==i[y]||parseInt(c[y],16)<=7&&i[y].toLowerCase()!==i[y])return!1;return!0}function Rr(r){if(r===void 0)return"";const i=r.toLowerCase().replace("0x",""),c=me(i);let y="0x";for(let b=0;b<i.length;b++)parseInt(c[b],16)>7?y+=i[b].toUpperCase():y+=i[b];return y}function mt(r){if(!Array.isArray(r))throw new Error(`Value was not an array: ${JSON.stringify(r)}`);return r}function lr(r){return Br(r)?r:/^[0-9a-f]{40}$/.test(r)?"0x"+r:"0x"+Ye(Ce(r).substr(2),40)}function qt(r){return r instanceof x}function br(r){return typeof r=="string"||r&&r.constructor&&r.constructor.name==="String"}function wt(r){return r!==null&&!Array.isArray(r)&&typeof r=="object"}function zt(r){return typeof r=="boolean"}function At(r){return Array.isArray(r)}var vr,Qt;function Cr(r,i){if(!r)throw new Error("jsonrpc method should be specified!");if(typeof r!="string")throw new Error(`jsonrpc must be a string, got ${typeof r}!`);return t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:r,params:i||[]}}function Lr(r){return Array.isArray(r)?r.every(i):i(r);function i(c){return!!c&&(c.error===void 0||c.error===null)&&c.jsonrpc==="2.0"&&c.id!==null&&"result"in c&&c.result!==void 0}}t.TransactionStatus=void 0,(vr=t.TransactionStatus||(t.TransactionStatus={})).pending="pending",vr.confirmed="confirmed",vr.failed="failed",t.TransactionType=void 0,(Qt=t.TransactionType||(t.TransactionType={})).queued="queued",Qt.dropped="dropped",Qt.replaced="replaced",Qt.pending="pending",Qt.reverted="reverted",Qt.confirmed="confirmed",t.messageId=0;function _r(r){return nt(r)}function Fr(r){return r==="latest"||r==="pending"||r==="earliest"}function Ft(r){return r===void 0?"latest":je(r)}function je(r){return r==null?null:Fr(r)?r:Ce(r)}function Tt(r){return r.from&&(r.from=R(r.from)),r.to&&(r.to=R(r.to)),r.gasPrice!==void 0&&(r.gasPrice=et(r.gasPrice)),r.gas!==void 0&&(r.gas=et(r.gas)),r.value!==void 0&&(r.value=et(r.value)),r.nonce!==void 0&&(r.nonce=et(r.nonce)),r.data&&!r.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(r.data)&&(r.data="0x"+r.data),r}function Mt(r){if(typeof r!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(r));if(r.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(r));if(r.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(r));return r}function E(r){if(typeof r!="object")throw new Error("Did not provide transaction options");if(!r.from)throw new Error('Missing "from" in transaction options');return r.from=R(r.from),r.to&&(r.to=R(r.to)),r.gasPrice!==void 0&&(r.gasPrice=et(r.gasPrice)),r.gas!==void 0&&(r.gas=et(r.gas)),r.value!==void 0&&(r.value=et(r.value)),r.nonce!==void 0&&(r.nonce=et(r.nonce)),r.data&&!r.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(r.data)&&(r.data="0x"+r.data),r}function l(r){return r?(r.blockNumber!==null&&(r.blockNumber=ge(r.blockNumber)),r.transactionIndex!==null&&(r.transactionIndex=ge(r.transactionIndex)),r.nonce=ge(r.nonce),r.gas=ge(r.gas),r.gasPrice=nt(r.gasPrice),r.value=nt(r.value),r):null}function m(r){return r?(r.blockNumber!==null&&(r.blockNumber=ge(r.blockNumber)),r.transactionIndex!==null&&(r.transactionIndex=ge(r.transactionIndex)),r.cumulativeGasUsed=ge(r.cumulativeGasUsed),r.gasUsed=ge(r.gasUsed),r.logs&&At(r.logs)&&(r.logs=r.logs.map(function(i){return N(i)})),r.status=ge(r.status||""),r):null}function O(r){return r?(r.gasLimit=ge(r.gasLimit),r.gasUsed=ge(r.gasUsed),r.size=ge(r.size),r.timestamp=ge(r.timestamp),r.number!==null&&(r.number=ge(r.number)),r.difficulty=nt(r.difficulty),r.totalDifficulty=nt(r.totalDifficulty),At(r.transactions)&&r.transactions.forEach(function(i,c){br(i)||(r.transactions[c]=l(i)||r.transactions[c])}),r):null}function N(r){return r&&(r.blockNumber&&(r.blockNumber=ge(r.blockNumber)),r.transactionIndex&&(r.transactionIndex=ge(r.transactionIndex)),r.logIndex&&(r.logIndex=ge(r.logIndex)),r)}function R(r){if(Br(r))return r;if(ur(r))return"0x"+r;throw new Error(`Invalid address: ${JSON.stringify(r)}`)}function q(r){return r}function G(r){return r&&(r.startingBlock=ge(r.startingBlock),r.currentBlock=ge(r.currentBlock),r.highestBlock=ge(r.highestBlock),r.knownStates&&(r.knownStates=ge(r.knownStates),r.pulledStates=ge(r.pulledStates)),r)}function fe(r){if(r===null)throw de("cannot convert null value to array",ne,{arg:"value",value:r});if(r instanceof Uint8Array)return new Uint8Array(r);if(typeof r=="string"){const i=r.match(/^(0x)?[0-9a-fA-F]*$/);if(!i)throw de("invalid hexidecimal string",ne,{arg:"value",value:r});if(i[1]!=="0x")throw de("hex string must have 0x prefix",ne,{arg:"value",value:r});(r=r.substring(2)).length%2&&(r="0"+r);const c=[];for(let y=0;y<r.length;y+=2)c.push(parseInt(r.substr(y,2),16));return new Uint8Array(c)}if(function(i){if(!i||parseInt(String(i.length))!==i.length||typeof i=="string")return!1;for(let c=0;c<i.length;c++){const y=i[c];if(y<0||y>=256||parseInt(String(y))!==y)return!1}return!0}(r))return new Uint8Array(r);throw de("invalid arrayify value",void 0,{arg:"value",value:r,type:typeof r})}function ae(r,i,c){Object.defineProperty(r,i,{enumerable:!0,value:c,writable:!1})}const _e=new x(-1),Se=new x(0),Ie=new x(1),Ze=new x("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function We(r){return function(i,c){function y(M){return new Error('unexpected character "'+i[M]+'" at position '+M+' in "'+i+'"')}const b={type:"",name:"",state:{allowType:!0}};let T=b;for(let M=0;M<i.length;M++){const z=i[M];switch(z){case"(":if(!T.state.allowParams)throw y(M);T.state.allowType=!1,T.type=it(T.type),T.components=[{type:"",name:"",parent:T,state:{allowType:!0}}],T=T.components[0];break;case")":delete T.state,T.name==="indexed"&&(T.indexed=!0,T.name=""),T.type=it(T.type);const oe=T;if(T=T.parent,!T)throw y(M);delete oe.parent,T.state.allowParams=!1,T.state.allowName=!0,T.state.allowArray=!0;break;case",":delete T.state,T.name==="indexed"&&(T.indexed=!0,T.name=""),T.type=it(T.type);const ue={type:"",name:"",parent:T.parent,state:{allowType:!0}};T.parent.components.push(ue),delete T.parent,T=ue;break;case" ":T.state.allowType&&T.type!==""&&(T.type=it(T.type),delete T.state.allowType,T.state.allowName=!0,T.state.allowParams=!0),T.state.allowName&&T.name!==""&&(T.name==="indexed"?(T.indexed=!0,T.name=""):T.state.allowName=!1);break;case"[":if(!T.state.allowArray)throw y(M);T.type+=z,T.state.allowArray=!1,T.state.allowName=!1,T.state.readArray=!0;break;case"]":if(!T.state.readArray)throw y(M);T.type+=z,T.state.readArray=!1,T.state.allowArray=!0,T.state.allowName=!0;break;default:if(T.state.allowType)T.type+=z,T.state.allowParams=!0,T.state.allowArray=!0;else if(T.state.allowName)T.name+=z,delete T.state.allowArray;else{if(!T.state.readArray)throw y(M);T.type+=z}}}if(T.parent)throw new Error("unexpected eof");return delete b.state,T.name==="indexed"&&(T.indexed=!0,T.name=""),b.type=it(b.type),b}(r)}function it(r){return r.match(/^uint($|[^1-9])/)?r="uint256"+r.substring(4):r.match(/^int($|[^1-9])/)&&(r="int256"+r.substring(3)),r}const xt=new RegExp(/^bytes([0-9]*)$/),Gt=new RegExp(/^(u?int)([0-9]*)$/),er=new RegExp(/^(.*)\[([0-9]*)\]$/),Er=function(r,i){const c=r.match(Gt);return c&&parseInt(c[2])<=48?i.toNumber():i};class bt{constructor(i,c,y,b="",T){this.coerceFunc=i,this.name=c,this.type=y,this.localName=b,this.dynamic=T}}class dr extends bt{constructor(i){super(i.coerceFunc,i.name,i.type,void 0,i.dynamic),ae(this,"coder",i)}encode(i){return this.coder.encode(i)}decode(i,c){return this.coder.decode(i,c)}}class ua extends bt{constructor(i,c){super(i,"null","",c,!1)}encode(i){return fe([])}decode(i,c){if(c>i.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function Xr(r,i){return new x(r.toString(2).substr(-i),2)}class la extends bt{constructor(i,c,y,b){const T=(y?"int":"uint")+8*c;super(i,T,T,b,!1),this.size=c,this.signed=y}encode(i){try{let c=nt(i);if(this.signed){let b=Xr(Ze,8*this.size-1);if(c.gt(b))throw new Error("out-of-bounds");if(b=b.plus(Ie).multipliedBy(_e),c.lt(b))throw new Error("out-of-bounds")}else if(c.lt(Se)||c.gt(Xr(Ze,8*this.size)))throw new Error("out-of-bounds");c=Xr(Vt(c,8*this.size),8*this.size),this.signed&&(c=Vt(mr(c,8*this.size),256));const y=Ye(Vt(c).toString(16),64);if(y.indexOf("NaN")!==-1)throw de("invalid number value, NaN",ne,{arg:this.localName,coderType:this.name,value:i,v:c,twosComplement:Vt(c),twosComplement16:Vt(c).toString(16),pad:Ye(Vt(c).toString(16),64),size:this.size});return Fe(y)}catch(c){throw de("invalid number value",ne,{arg:this.localName,coderType:this.name,value:i,message:c.toString()})}}decode(i,c){if(i.length<c+32)throw de("insufficient data for "+this.name+" type",ne,{arg:this.localName,coderType:this.name,value:Ce(i.slice(c,c+32))});const y=32-this.size;let b=new x(Xe(i.slice(c+y,c+32)),16);return b=this.signed?mr(b,8*this.size):Xr(b,8*this.size),{consumed:32,value:this.coerceFunc(this.name,b)}}}const Wt=new la(function(r,i){return i},32,!1,"none");class da extends bt{constructor(i,c,y){const b="bytes"+c;super(i,b,b,y,!1),this.length=c}encode(i){const c=new Uint8Array(32);try{if(typeof i=="string"&&i.length%2!=0)throw new Error("hex string cannot be odd-length");const y=fe(i);if(y.length>this.length)throw new Error("incorrect data length");c.set(y)}catch(y){throw de("invalid "+this.name+" value. Use hex strings or Uint8Array",ne,{arg:this.localName,coderType:this.name,value:y.value||i,details:y.message})}return c}decode(i,c){if(i.length<c+32)throw de("insufficient data for "+this.name+" type",ne,{arg:this.localName,coderType:this.name,value:Ce(i.slice(c,c+32))});return{consumed:32,value:this.coerceFunc(this.name,i.slice(c,c+this.length))}}}function fa(r){const i=32*Math.ceil(r.length/32),c=new Uint8Array(i-r.length);return gt(Wt.encode(r.length),r,c)}function ha(r,i,c){if(r.length<i+32)throw de("insufficient data for dynamicBytes length",ne,{arg:c,coderType:"dynamicBytes",value:Ce(r.slice(i,i+32))});let y=Wt.decode(r,i).value;try{y=y.toNumber()}catch(b){throw b("dynamic bytes count too large",ne,{arg:c,coderType:"dynamicBytes",value:y.toString()})}if(r.length<i+32+y)throw de("insufficient data for dynamicBytes type",ne,{arg:c,coderType:"dynamicBytes",value:Ce(r.slice(i,i+32+y))});return{consumed:32+32*Math.ceil(y/32),value:r.slice(i+32,i+32+y)}}function Jr(r){return 32*Math.ceil(r/32)}function ya(r,i){if(!Array.isArray(i)){if(!i||typeof i!="object")throw de("invalid tuple value",ne,{coderType:"tuple",value:i});{const oe=[];r.forEach(function(ue){oe.push(i[ue.localName])}),i=oe}}if(r.length!==i.length)throw de("types/value length mismatch",ne,{coderType:"tuple",value:i});const c=[];r.forEach(function(oe,ue){c.push({dynamic:oe.dynamic,value:oe.encode(i[ue])})});let y=0,b=0;c.forEach(function(oe){oe.dynamic?(y+=32,b+=Jr(oe.value.length)):y+=Jr(oe.value.length)});let T=0,M=y;const z=new Uint8Array(y+b);return c.forEach(function(oe){oe.dynamic?(z.set(Wt.encode(M),T),T+=32,z.set(oe.value,M),M+=Jr(oe.value.length)):(z.set(oe.value,T),T+=Jr(oe.value.length))}),z}class Hs extends Array{}class $s extends bt{constructor(i,c,y,b){super(i,"array",c.type+"["+(y>=0?y:"")+"]",b,y===-1||c.dynamic),this.coder=c,this.length=y}encode(i){if(!Array.isArray(i))throw de("expected array value",ne,{arg:this.localName,coderType:"array",value:i});let c=this.length,y=new Uint8Array(0);c===-1&&(c=i.length,y=Wt.encode(c)),function(T,M,z){if(z||(z=""),T<M)throw de("missing argument"+z,"MISSING_ARGUMENT",{count:T,expectedCount:M});if(T>M)throw de("too many arguments"+z,"UNEXPECTED_ARGUMENT",{count:T,expectedCount:M})}(c,i.length,"in coder array"+(this.localName?" "+this.localName:""));const b=[];for(let T=0;T<i.length;T++)b.push(this.coder);return gt(y,ya(b,i))}decode(i,c){let y=0,b=this.length;if(b===-1){let z;try{z=Wt.decode(i,c)}catch(oe){throw de("insufficient data for dynamic array length",ne,{arg:this.localName,coderType:"array",value:oe.value})}try{b=z.value.toNumber()}catch{throw de("array count too large",ne,{arg:this.localName,coderType:"array",value:z.value.toString()})}y+=z.consumed,c+=z.consumed}const T=[];for(let z=0;z<b;z++)T.push(new dr(this.coder));const M=function(z,oe,ue){const yt=ue;let Ke=0;const W=[];return z.forEach(function(at){let Ue;if(at.dynamic){const He=Wt.decode(oe,ue);Ue=at.decode(oe,yt+He.value.toNumber()),Ue.consumed=He.consumed}else Ue=at.decode(oe,ue);Ue.value!==void 0&&W.push(Ue.value),ue+=Ue.consumed,Ke+=Ue.consumed}),{value:W,consumed:Ke}}(T,i,c);return M.consumed+=y,M.value=this.coerceFunc(this.type,M.value),M}}class si extends bt{constructor(i,c,y){let b=!1;const T=[];c.forEach(function(M){M.dynamic&&(b=!0),T.push(M.type)}),super(i,"tuple","tuple("+T.join(",")+")",y,b),this.coders=c}encode(i){return ya(this.coders,i)}decode(i,c){const y=function(b,T,M){const z=M;let oe=0;const ue=new Hs;return b.forEach(function(yt){let Ke;if(yt.dynamic){const W=Wt.decode(T,M);Ke=yt.decode(T,z+W.value.toNumber()),Ke.consumed=W.consumed}else Ke=yt.decode(T,M);Ke.value!==void 0&&ue.push(Ke.value),M+=Ke.consumed,oe+=Ke.consumed}),b.forEach(function(yt,Ke){let W=yt.localName;W&&(W==="length"&&(W="_length"),ue[W]!==null&&ue[W]!==void 0||(ue[W]=ue[Ke]))}),{value:ue,consumed:oe}}(this.coders,i,c);return y.value=this.coerceFunc(this.type,y.value),y}}const Vs={address:class extends bt{constructor(r,i){super(r,"address","address",i,!1)}encode(r){const i=new Uint8Array(32),c=r.trim();if(!ur(c))throw de("invalid address format",ne,{arg:this.localName,coderType:"address",value:r});try{i.set(Fe(R(c)),12)}catch(y){throw de(`invalid address (${y.message})`,ne,{arg:this.localName,coderType:"address",value:r})}return i}decode(r,i){if(r.length<i+32)throw de("insufficuent data for address type",ne,{arg:this.localName,coderType:"address",value:Ce(r.slice(i,i+32)),missingBytes:i+32-r.length});return{consumed:32,value:this.coerceFunc("address",Zr(Ce(r.slice(i+12,i+32))))}}},bool:class extends bt{constructor(r,i){super(r,"bool","bool",i,!1)}encode(r){return Wt.encode(r?1:0)}decode(r,i){try{const c=Wt.decode(r,i);return{consumed:c.consumed,value:this.coerceFunc("bool",!c.value.isZero())}}catch(c){throw c.reason==="insufficient data for uint256 type"?de("insufficient data for boolean type",ne,{arg:this.localName,coderType:"boolean",value:c.value}):c}}},string:class extends bt{constructor(r,i){super(r,"string","string",i,!0)}encode(r){if(typeof r!="string")throw de("invalid string value",ne,{arg:this.localName,coderType:"string",value:r});return fa(Te(r))}decode(r,i){const c=ha(r,i,this.localName);return c.value=this.coerceFunc("string",Ae(c.value)),c}},bytes:class extends bt{constructor(r,i){super(r,"bytes","bytes",i,!0)}encode(r){try{return fa(fe(r))}catch(i){throw i("invalid bytes value",ne,{arg:this.localName,coderType:"bytes",value:i.value})}}decode(r,i){const c=ha(r,i,this.localName);return c.value=this.coerceFunc("bytes",c.value),c}},function:class extends da{constructor(r,i){super(r,24,i)}}};function Qr(r,i){const c=Vs[i.type];if(c)return new c(r,i.name);let y=i.type.match(Gt);if(y){const b=parseInt(y[2]||"256");if(b===0||b>256||b%8!=0)throw de("invalid "+y[1]+" bit length",ne,{arg:"param",value:i});return new la(r,b/8,y[1]==="int",i.name)}if(y=i.type.match(xt),y){const b=parseInt(y[1]);if(b===0||b>32)throw de("invalid bytes length",ne,{arg:"param",value:i});return new da(r,b,i.name)}if(y=i.type.match(er),y){const b=Object.assign({},i),T=parseInt(y[2]||"-1");return b.type=y[1],new $s(r,Qr(r,b),T,i.name)}if(i.type.substring(0,5)==="tuple")return function(b,T,M){T||(T=[]);const z=T.map(oe=>Qr(b,oe));return new si(b,z,M)}(r,i.components,i.name);if(i.type==="")return new ua(r,i.name);throw de("invalid type",ne,{arg:"type",value:i.type,fullType:i})}class ci{constructor(i){(function(c,y){if(!(c instanceof y))throw de("missing new","MISSING_NEW",{name:y.name})})(this,ci),i||(i=Er),ae(this,"coerceFunc",i)}encode(i,c){if(i.length!==c.length)throw de("types/values length mismatch",ne,{count:{types:i.length,values:c.length},value:{types:i,values:c}});const y=i.map(b=>typeof b=="string"?We(b):b).map(b=>Qr(this.coerceFunc,b));return new si(this.coerceFunc,y,"_").encode(c)}decode(i,c){const y=i.map(b=>typeof b=="string"?We(b):b).map(b=>Qr(this.coerceFunc,b));return new si(this.coerceFunc,y,"_").decode(c,0).value}}const pa=new ci;var ga,Q;function ee(r,i,c,y){var b,T=arguments.length,M=T<3?i:y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(r,i,c,y);else for(var z=r.length-1;z>=0;z--)(b=r[z])&&(M=(T<3?b(M):T>3?b(i,c,M):b(i,c))||M);return T>3&&M&&Object.defineProperty(i,c,M),M}function te(r,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,i)}t.coder=void 0,(ga=t.coder||(t.coder={})).encodeParams=function(r,i){return Xe(pa.encode(r,i))},ga.decodeParams=function(r,i){if(r.length>0&&(!i||i==="0x"||i==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return pa.decode(r,Fe("0x"+i.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class he{constructor(i){this.callName=i.callName,this.params=i.params||0,this.inputFormatter=i.inputFormatter||null,this.outputFormatter=i.outputFormatter}validateArgs(i){if(i.length!==this.params)throw c=this.callName,y=i.length,b=this.params,new Error(`Invalid number of input parameters to RPC method "${c}" given: ${y}, expected: ${b}`);var c,y,b}formatInput(i){return this.inputFormatter?this.inputFormatter.map(function(c,y){return c?c(i[y]):i[y]}):i}formatOutput(i){return i!==null?this.outputFormatter(i):null}toPayload(i){const c=this.formatInput(i);return this.validateArgs(c),{method:this.callName,params:c}}async execute(i,...c){const y=this.toPayload(c);if(!i)throw new Error("Missing RequestManager in method#exec");const b=await i.sendAsync(y);return this.formatOutput(b)}}class vt{constructor(i){this.getter=i.getter,this.outputFormatter=i.outputFormatter}formatOutput(i){return this.outputFormatter(i)}async execute(i,...c){const y=await i.sendAsync({method:this.getter,params:[]});return this.formatOutput(y)}}function ma(r){return new Promise(i=>setTimeout(i,r))}t.eth=void 0,(Q=t.eth||(t.eth={})).eth_getBalance=new he({callName:"eth_getBalance",params:2,inputFormatter:[R,Ft],outputFormatter:_r}),Q.eth_getStorageAt=new he({callName:"eth_getStorageAt",params:3,inputFormatter:[R,Ce,Ft],outputFormatter:ht}),Q.eth_getCode=new he({callName:"eth_getCode",params:2,inputFormatter:[R,Ft],outputFormatter:ht}),Q.eth_getBlockByHash=new he({callName:"eth_getBlockByHash",params:2,inputFormatter:[je,function(r){return!!r}],outputFormatter:O}),Q.eth_getBlockByNumber=new he({callName:"eth_getBlockByNumber",params:2,inputFormatter:[je,function(r){return!!r}],outputFormatter:O}),Q.eth_getUncleByBlockHashAndIndex=new he({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[je,Ce],outputFormatter:O}),Q.eth_getUncleByBlockNumberAndIndex=new he({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[je,Ce],outputFormatter:O}),Q.eth_getBlockTransactionCountByHash=new he({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[je],outputFormatter:ge}),Q.eth_getBlockTransactionCountByNumber=new he({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[je],outputFormatter:ge}),Q.eth_getUncleCountByBlockHash=new he({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[je],outputFormatter:ge}),Q.eth_getUncleCountByBlockNumber=new he({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[je],outputFormatter:ge}),Q.eth_getTransactionByHash=new he({callName:"eth_getTransactionByHash",params:1,inputFormatter:[Mt],outputFormatter:l}),Q.eth_getTransactionByBlockHashAndIndex=new he({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[je,Ce],outputFormatter:l}),Q.eth_getTransactionByBlockNumberAndIndex=new he({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[je,Ce],outputFormatter:l}),Q.eth_getTransactionReceipt=new he({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[Mt],outputFormatter:m}),Q.eth_getTransactionCount=new he({callName:"eth_getTransactionCount",params:2,inputFormatter:[R,Ft],outputFormatter:ge}),Q.eth_sendRawTransaction=new he({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:ht}),Q.web3_sha3=new he({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:ht}),Q.eth_sendTransaction=new he({callName:"eth_sendTransaction",params:1,inputFormatter:[E],outputFormatter:ht}),Q.eth_sign=new he({callName:"eth_sign",params:2,inputFormatter:[R,null],outputFormatter:ht}),Q.eth_call=new he({callName:"eth_call",params:2,inputFormatter:[Tt,Ft],outputFormatter:ht}),Q.eth_estimateGas=new he({callName:"eth_estimateGas",params:1,inputFormatter:[Tt],outputFormatter:ge}),Q.eth_submitWork=new he({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:rt}),Q.eth_getWork=new he({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:mt}),Q.eth_coinbase=new vt({getter:"eth_coinbase",outputFormatter:lr}),Q.eth_mining=new vt({getter:"eth_mining",outputFormatter:rt}),Q.eth_hashrate=new vt({getter:"eth_hashrate",outputFormatter:ge}),Q.eth_syncing=new vt({getter:"eth_syncing",outputFormatter:G}),Q.eth_gasPrice=new vt({getter:"eth_gasPrice",outputFormatter:_r}),Q.eth_accounts=new vt({getter:"eth_accounts",outputFormatter:mt}),Q.eth_blockNumber=new vt({getter:"eth_blockNumber",outputFormatter:ge}),Q.eth_protocolVersion=new vt({getter:"eth_protocolVersion",outputFormatter:ge}),Q.web3_clientVersion=new vt({getter:"web3_clientVersion",outputFormatter:$t}),Q.net_version=new vt({getter:"net_version",outputFormatter:$t}),Q.shh_version=new he({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:ge}),Q.shh_post=new he({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:rt}),Q.personal_newAccount=new he({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:lr}),Q.personal_importRawKey=new he({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:lr}),Q.personal_sign=new he({callName:"personal_sign",params:3,inputFormatter:[Lt,R,null],outputFormatter:ht}),Q.personal_ecRecover=new he({callName:"personal_ecRecover",params:2,inputFormatter:[Lt,null],outputFormatter:lr}),Q.personal_unlockAccount=new he({callName:"personal_unlockAccount",params:3,inputFormatter:[R,null,gr],outputFormatter:rt}),Q.personal_sendTransaction=new he({callName:"personal_sendTransaction",params:2,inputFormatter:[E,null],outputFormatter:ht}),Q.personal_lockAccount=new he({callName:"personal_lockAccount",params:1,inputFormatter:[R],outputFormatter:rt}),Q.personal_listAccounts=new vt({getter:"personal_listAccounts",outputFormatter:mt}),Q.net_listening=new vt({getter:"net_listening",outputFormatter:rt}),Q.net_peerCount=new vt({getter:"net_peerCount",outputFormatter:ge}),Q.eth_newFilter=new he({callName:"eth_newFilter",params:1,inputFormatter:[q],outputFormatter:Ce}),Q.eth_getLogs=new he({callName:"eth_getLogs",params:1,inputFormatter:[mt],outputFormatter:mt}),Q.eth_newBlockFilter=new he({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Ce}),Q.eth_newPendingTransactionFilter=new he({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Ce}),Q.eth_uninstallFilter=new he({callName:"eth_uninstallFilter",params:1,inputFormatter:[Ce],outputFormatter:rt}),Q.eth_getFilterLogs=new he({callName:"eth_getFilterLogs",params:1,inputFormatter:[Ce],outputFormatter:mt}),Q.eth_getFilterChanges=new he({callName:"eth_getFilterChanges",params:1,inputFormatter:[Ce],outputFormatter:mt}),Q.eth_submitHashrate=new he({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:rt}),Q.shh_newIdentity=new he({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:ht}),Q.shh_hasIdentity=new he({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:rt}),Q.shh_newGroup=new he({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:ht}),Q.shh_addToGroup=new he({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:rt}),Q.shh_newFilter=new he({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Ce}),Q.shh_uninstallFilter=new he({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:rt}),Q.shh_getLogs=new he({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:mt}),Q.shh_getFilterMessages=new he({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:mt}),Q.shh_getFilterChanges=new he({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:mt}),Q.shh_getMessages=new he({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:mt});function re(r,i){const c=t.eth[i];if(!c)throw new Error(`Could not find the method/property named ${i.toString()}`);Object.defineProperty(r,i,{value:function(...y){return c.execute(this,...y)}})}class J{constructor(i){this.provider=i,this.requests=new Map}async sendAsync(i){const c=await this.provider;if(!c)throw new Error("Provider not set or invalid");const y=Cr(i.method,i.params),b=p();return this.requests.set(y.id,b),c.sendAsync(y,(T,M)=>{this.requests.delete(y.id),T?b.reject(T):Lr(M)?b.resolve(M.result):b.reject(function(z){const oe=z&&z.error&&z.error.message?z.error.message:"Invalid JSON RPC response: "+JSON.stringify(z);return new Error(oe)}(M))}),b}setProvider(i){this.provider=i}async getConfirmedTransaction(i){const c=await this.waitForCompletion(i);if(this.isFailure(c))throw new Error(`Transaction "${i}" failed`);return c}async waitForCompletion(i,c){const y=Mt(i);if(await this.isTxDropped(y,c)){const b=await this.getTransactionAndReceipt(y);return Object.assign(Object.assign({},b),{status:t.TransactionStatus.failed})}for(;;){const b=await this.getTransactionAndReceipt(y);if(!this.isPending(b)&&b.receipt)return Object.assign(Object.assign({},b),{status:this.isFailure(b)?t.TransactionStatus.failed:t.TransactionStatus.confirmed});await ma(2e3)}}async getTransaction(i){let c,y=null;const b=Mt(i);try{const M=(await this.eth_accounts())[0];M&&(y=await this.eth_getTransactionCount(M,"latest"))}catch{y=null}try{if(c=await this.eth_getTransactionByHash(b),c===null)return null}catch{return null}if(c.blockNumber===null){if(y!==null){if(c.nonce<y)return{hash:b,type:t.TransactionType.replaced,nonce:c.nonce};if(c.nonce>y)return{hash:b,type:t.TransactionType.queued,nonce:c.nonce}}return Object.assign({type:t.TransactionType.pending},c)}let T;try{if(T=await this.eth_getTransactionReceipt(b),T===null||T.status===0)return Object.assign({type:t.TransactionType.reverted},c)}catch{return null}return Object.assign(Object.assign({type:t.TransactionType.confirmed},c),{receipt:T})}async isTxDropped(i,c=15){let y=c;for(;y>0;){if(await this.getTransactionAndReceipt(i)!==null)return!1;y-=1,await ma(2e3)}return!0}async getTransactionAndReceipt(i){i=Mt(i);const[c,y]=await Promise.all([this.eth_getTransactionByHash(i),this.eth_getTransactionReceipt(i)]);return Object.assign(Object.assign({},c),{receipt:y})}isPending(i){return i&&i.blockNumber===null}isFailure(i){return i&&(!i.receipt||i.receipt.status===0)}}ee([re,te("design:type",Function)],J.prototype,"web3_clientVersion",void 0),ee([re,te("design:type",Function)],J.prototype,"web3_sha3",void 0),ee([re,te("design:type",Function)],J.prototype,"net_version",void 0),ee([re,te("design:type",Function)],J.prototype,"net_peerCount",void 0),ee([re,te("design:type",Function)],J.prototype,"net_listening",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_protocolVersion",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_syncing",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_coinbase",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_mining",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_hashrate",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_gasPrice",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_accounts",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_blockNumber",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getBalance",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getStorageAt",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getTransactionCount",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getBlockTransactionCountByHash",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getBlockTransactionCountByNumber",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getUncleCountByBlockHash",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getUncleCountByBlockNumber",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getCode",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_sign",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_sendTransaction",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_sendRawTransaction",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_call",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_estimateGas",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getBlockByHash",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getBlockByNumber",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getTransactionByHash",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getTransactionReceipt",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getUncleByBlockHashAndIndex",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_newFilter",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_newBlockFilter",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_newPendingTransactionFilter",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_uninstallFilter",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getFilterChanges",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getFilterLogs",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getLogs",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_getWork",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_submitWork",void 0),ee([re,te("design:type",Function)],J.prototype,"eth_submitHashrate",void 0),ee([re,te("design:type",Function)],J.prototype,"shh_post",void 0),ee([re,te("design:type",Function)],J.prototype,"shh_version",void 0),ee([re,te("design:type",Function)],J.prototype,"shh_newIdentity",void 0),ee([re,te("design:type",Function)],J.prototype,"shh_hasIdentity",void 0),ee([re,te("design:type",Function)],J.prototype,"shh_newGroup",void 0),ee([re,te("design:type",Function)],J.prototype,"shh_addToGroup",void 0),ee([re,te("design:type",Function)],J.prototype,"shh_newFilter",void 0),ee([re,te("design:type",Function)],J.prototype,"shh_uninstallFilter",void 0),ee([re,te("design:type",Function)],J.prototype,"shh_getFilterChanges",void 0),ee([re,te("design:type",Function)],J.prototype,"shh_getMessages",void 0),ee([re,te("design:type",Function)],J.prototype,"personal_unlockAccount",void 0),ee([re,te("design:type",Function)],J.prototype,"personal_newAccount",void 0),ee([re,te("design:type",Function)],J.prototype,"personal_listAccounts",void 0),ee([re,te("design:type",Function)],J.prototype,"personal_lockAccount",void 0),ee([re,te("design:type",Function)],J.prototype,"personal_importRawKey",void 0),ee([re,te("design:type",Function)],J.prototype,"personal_sendTransaction",void 0),ee([re,te("design:type",Function)],J.prototype,"personal_sign",void 0),ee([re,te("design:type",Function)],J.prototype,"personal_ecRecover",void 0);class ba{constructor(i){this.json=i,this._inputTypes=i.inputs||[],this._outputTypes=i.outputs||[],this._constant=!!i.constant,this._payable=!!i.payable||i.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in i&&!i.constant||i.stateMutability==="nonpayable",this._name=Le(i)}extractDefaultBlock(i){return i.length>this._inputTypes.length&&!wt(i[i.length-1])&&Ft(i.pop())||"latest"}validateArgs(i){if(i.some(T=>T===void 0))throw new Error("Invalid call, some arguments are undefined");const c=i.filter(function(T){return!(wt(T)===!0&&At(T)===!1&&qt(T)===!1&&!(T instanceof Uint8Array))});if(c.length!==this._inputTypes.length)throw y=c.length,b=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${y}, expected: ${b}`);var y,b}toPayload(i){let c={to:void 0,data:void 0,value:void 0,from:void 0};i.length>this._inputTypes.length&&wt(i[i.length-1])&&(c=i.pop()),this.validateArgs(i);const y=this.signature();let b=t.coder.encodeParams(this._inputTypes,i);return b.indexOf("0x")===0&&(b=b.substr(2)),c.data="0x"+y+b,c}signature(){return me(this._name).slice(0,8)}unpackOutput(i){if(!i)return;const c=i.length>=2?i.slice(2):i,y=t.coder.decodeParams(this._outputTypes,c);return y.length===1?y[0]:y}async execute(i,c,...y){if(!i)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const b=this.toPayload(y);if(b.to=c,b.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!b.from)throw new Error('Missing "from" in transaction options');return await i.eth_sendTransaction(b)}{const b=this.extractDefaultBlock(y),T=this.toPayload(y);T.to=c;const M=await i.eth_call(T,b);return this.unpackOutput(M)}}estimateGas(i,c,...y){if(!(i instanceof J))throw new Error("estimateGas needs to receive a RequestManager as first argument");const b=this.toPayload(y);return b.to=c,i.eth_estimateGas(b)}displayName(){return Pt(this._name)}typeName(){return Nt(this._name)||"void"}attachToContract(i){const c=this.displayName(),y=Object.assign((...b)=>this.execute(i.requestManager,i.address,...b),{estimateGas:this.estimateGas.bind(this,i.requestManager,i.address),toPayload:(...b)=>this.toPayload(b),toRPCMessage:(...b)=>{const T=this.extractDefaultBlock(b),M=this.toPayload(b);return M.to=i.address,{method:"eth_call",params:[M,T]}},unpackOutput:b=>this.unpackOutput(b)});i[c]||(i[c]=y),i[c][this.typeName()]=y}}function va(r){if(r==null)return null;const i=String(r).toString();return i.indexOf("0x")===0?i:Xe(Te(i))}class ui{constructor(i){this.requestManager=i,this.isStarted=!1,this.isDisposed=!1,this.formatter=c=>c,this.filterId=p(),this.callbacks=[],this.stopSemaphore=p()}async watch(i){if(this.isDisposed)throw new Error("The filter was disposed");i&&(this.callbacks.push(i),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const i=await this.getNewFilter();if(!i)throw new Error("Could not create a filter, response: "+JSON.stringify(i));this.filterId.resolve(i)}catch(i){throw i}this.stopSemaphore=p(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const i=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${i}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const c=await this.getChanges();c&&this.callbacks.forEach(y=>{this.formatter?c.forEach(b=>{y(this.formatter(b))}):c.forEach(b=>y(b))})}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=p(),setTimeout((i=()=>this.poll(),function(){i().catch(c=>console.error(c))}),500))}else this.stopSemaphore.resolve(1);var i}}class Dr extends ui{constructor(i,c,y=b=>b){super(i),this.requestManager=i,this.options=c,this.formatter=y,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(b){return va(b)}),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?je(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?je(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const i=await this.filterId;return this.requestManager.eth_getFilterLogs(i)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const i=await this.filterId;return this.requestManager.eth_getFilterChanges(i)}async uninstall(){const i=await this.filterId;return this.requestManager.eth_uninstallFilter(i)}}class li{constructor(i,c,y){this.requestManager=i,this.address=y,this._anonymous=!1,this._params=c.inputs||[],this._name=Le(c),this._anonymous=c.anonymous||!1}types(i){return this._params.filter(function(c){return c.indexed===i})}displayName(){return Pt(this._name)}typeName(){return Nt(this._name)||"void"}signature(){return me(this._name)}encode(i={},c={}){const y={topics:[],address:this.address};c.fromBlock!==void 0&&(y.fromBlock=je(c.fromBlock)||void 0),c.toBlock!==void 0&&(y.toBlock=je(c.toBlock)||void 0),y.topics=y.topics||[],this._anonymous||y.topics.push("0x"+this.signature());const b=this._params.filter(function(T){return T.indexed===!0}).map(function(T){const M=i[T.name];return M==null?null:At(M)?M.map(function(z){return"0x"+t.coder.encodeParams([T],[z])}):"0x"+t.coder.encodeParams([T],[M])});return y.topics=y.topics.concat(b),y}decode(i){i.data=i.data||"",i.topics=i.topics||[];const c=(this._anonymous?i.topics:i.topics.slice(1)).map(function(z){return z.slice(2)}).join(""),y=t.coder.decodeParams(this.types(!0),c),b=i.data.slice(2),T=t.coder.decodeParams(this.types(!1),b),M=this._params.reduce(function(z,oe){return z[oe.name]=oe.indexed?y.shift():T.shift(),z},{});return Object.assign(Object.assign({},N(i)),{event:this.displayName(),address:i.address,args:M})}async execute(i,c){const y=this.encode(i,c),b=this.decode.bind(this);return new Dr(this.requestManager,y,b)}attachToContract(i){const c=this.execute.bind(this),y=this.displayName();i.events[y]||(i.events[y]=c),i.events[y][this.typeName()]=this.execute.bind(this,i)}}class qs{constructor(i,c,y){this._requestManager=i,this._json=c,this._address=y}encode(i={}){const c={address:this._address};return i.fromBlock!==void 0&&(c.fromBlock=je(i.fromBlock)||void 0),i.toBlock!==void 0&&(c.toBlock=je(i.toBlock)||void 0),c}decode(i){i.data=i.data||"";const c=At(i.topics)&&br(i.topics[0])?i.topics[0].slice(2):"",y=this._json.filter(function(b){return c===me(Le(b))})[0];return y?new li(this._requestManager,y,this._address).decode(i):N(i)}async execute(i){const c=this.encode(i),y=this.decode.bind(this);return new Dr(this._requestManager,c,y)}getAllEventsFunction(){return this.execute.bind(this)}}class _a{constructor(i,c,y){var b;this.requestManager=i,this.abi=c,this.address=y,this.events={},this.transactionHash=null,this.address=y,this.abi=c,(b=this).abi.filter(function(T){return T.type==="function"}).map(function(T){return new ba(T)}).forEach(function(T){T.attachToContract(b)}),this.allEvents=function(T){const M=T.abi.filter(function(oe){return oe.type==="event"}),z=new qs(T.requestManager,M,T.address);return M.map(function(oe){return new li(T.requestManager,oe,T.address)}).forEach(function(oe){oe.attachToContract(T)}),z.getAllEventsFunction()}(this)}}t.AbstractFilter=ui,t.BigNumber=x,t.Contract=_a,t.ContractFactory=class{constructor(r,i){this.requestManager=r,this.abi=i}async deploy(...r){let i;const c=r[r.length-1];if(wt(c)&&!At(c)&&(i=r.pop()),!i)throw new Error("Missing options object");if(!i.data||typeof i.data!="string")throw new Error("Invalid options.data");if(ge(i.value)>0&&!(this.abi.filter(function(ue){return ue.type==="constructor"&&ue.inputs.length===r.length})[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const y=(b=this.abi,T=r,b.filter(function(ue){return ue.type==="constructor"&&ue.inputs&&ue.inputs.length===T.length}).map(function(ue){return ue.inputs||[]}).map(function(ue){return t.coder.encodeParams(ue,T)})[0]||"");var b,T;i.data+=y,i.gas||(i.gas=await this.requestManager.eth_estimateGas(i));const M=await this.requestManager.eth_sendTransaction(i);if(!M)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const z=await async function(ue,yt){const Ke=p();let W=0;const at=()=>{W++,W>50?Ke.reject(new Error("Contract transaction couldn't be found after 50 blocks")):ue.eth_getTransactionReceipt(yt).then(ut=>{ut&&ut.blockHash?Ke.resolve(ut):setTimeout(at,1e3)},ut=>Ke.reject(ut))};at();const Ue=await Ke,He=await ue.eth_getCode(Ue.contractAddress,"latest");if(He&&He.length>3)return Ue.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:He,receipt:Ue})}(this.requestManager,M),oe=await this.at(z);return oe.transactionHash=M,oe}async at(r){if(!ur(r))throw new TypeError(`Invalid address ${JSON.stringify(r)}`);return new _a(this.requestManager,this.abi,r)}},t.EthBlockFilter=class extends Dr{constructor(r){super(r,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},t.EthFilter=Dr,t.EthPendingTransactionFilter=class extends Dr{constructor(r){super(r,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},t.HTTPProvider=class{constructor(r,i={}){this.host=r,this.options=i,this.debug=!1,this.host=r||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(r,i){try{let c=null;c=r instanceof Array?r.map(T=>o(T)):o(r);const y=this.options.fetch||globalThis.fetch;if(y===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const b={body:JSON.stringify(c),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+b.body),y(this.host,b).then(async T=>{if(T.ok){const M=await T.json();this.debug&&console.log("RECV << "+JSON.stringify(M)),M.error?i(Object.assign(new Error(M.error.json||M.error),M.error)):i(null,M)}else this.debug&&console.log("ERR << "+JSON.stringify(T)),i(new Error("External error. response code: "+T.status))},T=>{this.debug&&console.log("ERR << "+JSON.stringify(T)),i(T)})}catch(c){this.debug&&console.log("ERR << "+JSON.stringify(c)),i(c)}}},t.Method=he,t.Property=vt,t.RequestManager=J,t.SHHFilter=class extends ui{constructor(r,i){super(r),this.requestManager=r,this.options=i,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(c){return va(c)}),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const r=await this.filterId;return this.requestManager.shh_getMessages(r)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const r=await this.filterId;return this.requestManager.shh_getFilterChanges(r)}async uninstall(){const r=await this.filterId;return this.requestManager.shh_uninstallFilter(r)}},t.SolidityEvent=li,t.SolidityFunction=ba,t.WebSocketProvider=class{constructor(r,i={}){this.url=r,this.options=i,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const r=this.connection;this.timeout(new Error("Provider disposed.")),r.then(i=>i.close()).catch(i=>{this.debug&&console.error(i)})}send(){throw new Error("Sync requests are deprecated")}sendAsync(r,i){const c=[];let y;if(r instanceof Array)y=Promise.all(r.map(b=>{const T=p();try{const M=o(b);c.push(M),this.responseCallbacks.set(M.id,T)}catch(M){T.reject(M)}return T}));else{const b=p();try{const T=o(r);c.push(T),this.responseCallbacks.set(T.id,b)}catch(T){b.reject(T)}y=b}y.then(b=>i(null,b),b=>i(b)),this.connection.then(b=>{c.forEach(T=>{const M=JSON.stringify(T);this.debug&&console.log("SEND >> "+M),b.send(M)})},b=>{i(b)})}parseResponse(r){const i=[];return r.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(c=>{let y=c;this.lastChunk&&(y=this.lastChunk+y);let b=null;try{b=JSON.parse(y)}catch{return this.lastChunk=y,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout(()=>{this.timeout()},15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",b&&i.push(b)}),i}processMessage(r){if("id"in r){const i=r.id,c=this.responseCallbacks.get(i);if(!c)return void console.error("Error: Received a response for an unknown request",r);this.responseCallbacks.delete(i),r.error!==void 0&&r.error!==null?c.reject(Object.assign(new Error(r.error.message||r.error),r.error)):"result"in r&&c.resolve(r)}else this.notificationCallbacks.forEach(i=>i(null,r))}timeout(r){this.connection&&this.connection.isPending||(this.connection=p());const i=r||new Error("Connection timeout");this.responseCallbacks.forEach(c=>c.reject(i)),this.responseCallbacks.clear(),this.isDisposed||setTimeout(()=>this.connect(),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then(c=>c.close()).catch(c=>{this.debug&&console.error(c)}),this.connection&&this.connection.isPending||(this.connection=p()),this.lastChunk="";const r=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!r)throw new Error("Please provide a WebSocketConstructor");const i=new r(this.url,this.options.protocol);i.onopen=()=>{this.connection.resolve(i)},i.onerror=c=>{const y=new Error("Error in web socket");y.data=c,this.timeout(y)},i.onclose=c=>{this.timeout(new Error(`Connection closed (${c&&c.reason||"Unknown reason"})`))},i.onmessage=c=>{const y=typeof c.data=="string"?c.data:"";this.debug&&console.log("RECV << "+c.data),this.parseResponse(y).forEach(b=>{b instanceof Array?b.forEach(T=>this.processMessage(T)):this.processMessage(b)})}}},t.bytesToHex=Xe,t.bytesToUtf8String=Ae,t.concatBytes=gt,t.default=J,t.extractDisplayName=Pt,t.extractTypeName=Nt,t.fromAscii=function(r,i=0){let c="";for(let y=0;y<r.length;y++){const b=r.charCodeAt(y).toString(16);c+=b.length<2?"0"+b:b}return"0x"+c.padEnd(i,"0")},t.fromDecimal=et,t.fromTwosComplement=mr,t.fromWei=function(r,i){const c=nt(r).dividedBy(cr(i));return qt(r)?c:c.toString(10)},t.getAddress=Zr,t.getValueOfUnit=cr,t.hexToBytes=Fe,t.inputAddressFormatter=R,t.inputBlockNumberFormatter=je,t.inputCallFormatter=Tt,t.inputDefaultBlockNumberFormatter=Ft,t.inputFilterOptions=q,t.inputPostFormatter=function(r){return r?(r.ttl=et(r.ttl),r.workToProve=et(r.workToProve),r.priority=et(r.priority),At(r.topics)||(r.topics=r.topics?[r.topics]:[]),r.topics=r.topics.map(function(i){return i.indexOf("0x")===0?i:"0x"+Xe(Te(i))}),r):null},t.inputTransactionFormatter=E,t.inputTransactionId=Mt,t.isAddress=ur,t.isArray=At,t.isBigNumber=qt,t.isBloom=function(r){return!!/^(0x)?[0-9a-f]{512}$/i.test(r)&&!!/^(0x)?[0-9a-f]{512}$/i.test(r)},t.isBoolean=zt,t.isChecksumAddress=jr,t.isFunction=function(r){return typeof r=="function"},t.isHex=function(r){return typeof r=="string"&&/^0x[0-9a-fA-F]+$/.test(r)},t.isJson=function(r){try{return!!JSON.parse(r)}catch{return!1}},t.isObject=wt,t.isPredefinedBlockNumber=Fr,t.isStrictAddress=Br,t.isString=br,t.isTopic=function(r){return!!/^(0x)?[0-9a-f]{64}$/i.test(r)&&!!/^(0x)?[0-9a-f]{64}$/i.test(r)},t.isValidResponse=Lr,t.outputBigNumberFormatter=_r,t.outputBlockFormatter=O,t.outputLogFormatter=N,t.outputPostFormatter=function(r){return r?(r.expiry=ge(r.expiry),r.sent=ge(r.sent),r.ttl=ge(r.ttl),r.workProved=ge(r.workProved),r.topics||(r.topics=[]),r.topics=r.topics.map(function(i){return $(i)}),r):null},t.outputSyncingFormatter=G,t.outputTransactionFormatter=l,t.outputTransactionReceiptFormatter=m,t.padLeft=Ye,t.padRight=function(r,i,c){return r+new Array(i-r.length+1).join(c||"0")},t.sha3=me,t.signedIsNegative=Mr,t.stringToUtf8Bytes=Te,t.toAddress=lr,t.toArray=mt,t.toAscii=$,t.toBatchPayload=function(r){return r.map(function(i){return Cr(i.method,i.params)})},t.toBigNumber=nt,t.toBoolean=rt,t.toChecksumAddress=Rr,t.toData=ht,t.toDecimal=ge,t.toHex=Ce,t.toJsonRpcRequest=Cr,t.toNullDecimal=gr,t.toString=$t,t.toStringData=Lt,t.toTwosComplement=Vt,t.toWei=function(r,i){const c=nt(r).times(cr(i));return qt(r)?c:c.toString(10)},t.transformToFullName=Le,Object.defineProperty(t,"__esModule",{value:!0})})})(ji,ji.exports);var Gn=ji.exports,Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.SignatureValidator=void 0;const Zs=Gn;async function Xs(e,a){const t=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new Zs.ContractFactory(e,t).at(a)}Wn.SignatureValidator=Xs;var Qa={},xa={},eo={},to={},ro={},K={},ki=L&&L.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(K,"__esModule",{value:!0});K.validateType=K.generateLazyValidator=K.Ajv=void 0;const no=ki(zs);K.Ajv=no.default;const Js=ki(Gs),Qs=ki(Ws);function xs(e,a){let t=null;const o=(s,u)=>{if(!t){const p=new no.default({$data:!0,allErrors:!0});(0,Js.default)(p),(0,Qs.default)(p,{singleError:!0}),a?.forEach(v=>p.addKeyword(v)),t=p.compile(e),Object.defineProperty(o,"errors",{get(){return t?.errors}})}return t(s,u)};return o}K.generateLazyValidator=xs;function ec(e,a){return e.validate(a)}K.validateType=ec;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const a=K;e.SCENE_UPDATE="SCENE_UPDATE",function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.SceneUpdate||(e.SceneUpdate={}))})(ro);var io={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const a=K;e.UPDATE="update",function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.Update||(e.Update={}))})(io);(function(e){var a=L&&L.__createBinding||(Object.create?function(o,s,u,p){p===void 0&&(p=u);var v=Object.getOwnPropertyDescriptor(s,u);(!v||("get"in v?!s.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,p,v)}:function(o,s,u,p){p===void 0&&(p=u),o[p]=s[u]}),t=L&&L.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&a(s,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),t(ro,e),t(io,e)})(to);var ao={},oo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const a=K;(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.ProjectType||(e.ProjectType={}))})(oo);var so={},qr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const a=K;(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema);const o={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},s={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},u={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function p(j){return o[j]}t.getMaxSupply=p;function v(j){return u[j]}t.getColor=v;function B(j){return[s[j],u[j]]}t.getGradient=B}(e.Rarity||(e.Rarity={}))})(qr);var sr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const a=K;(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.WearableCategory||(e.WearableCategory={}))})(sr);var Kn={},Yn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const a=K;(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.BodyShape||(e.BodyShape={}))})(Yn);var Zn={},Ui={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const a=K;(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.BodyPartCategory||(e.BodyPartCategory={}))})(Ui);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const a=sr,t=K,o=Ui;(function(s){s.schema={oneOf:[Object.assign({},a.WearableCategory.schema),Object.assign({},o.BodyPartCategory.schema)]},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(Zn);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const a=K,t=Yn,o=Zn;(function(s){s.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:o.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:o.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Kn);var Xn={},co={},Hi={},hr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const a=K;(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const o=(0,a.generateLazyValidator)(t.schema);t.validate=s=>o(s)})(e.Color3||(e.Color3={})),function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const o=new RegExp(t.schema.pattern);t.validate=s=>o.test(s)}(e.EthAddress||(e.EthAddress={})),function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const o=new RegExp(t.schema.pattern);t.validate=s=>o.test(s)}(e.IPFSv2||(e.IPFSv2={})),function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const o=new RegExp(t.schema.pattern);t.validate=s=>o.test(s)}(e.IPFSv1||(e.IPFSv1={}))})(hr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const a=sr,t=hr,o=K;var s;(function(B){B.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},B.validate=(0,o.generateLazyValidator)(B.schema)})(s=e.Snapshots||(e.Snapshots={}));var u;(function(B){B.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:a.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:s.schema},additionalProperties:!0},B.validate=(0,o.generateLazyValidator)(B.schema)})(u=e.AvatarInfo||(e.AvatarInfo={}));var p;(function(B){B.schema={type:"string",pattern:"^[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$"};const j=new RegExp(B.schema.pattern,"i");B.validate=H=>j.test(H)})(p=e.LinkUrl||(e.LinkUrl={}));var v;(function(B){B.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:p.schema}}})(v=e.Link||(e.Link={})),function(B){B.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:v.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:u.schema},additionalProperties:!0},B.validate=(0,o.generateLazyValidator)(B.schema)}(e.Avatar||(e.Avatar={}))})(Hi);var uo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const a=K,t=Hi;(function(o){o.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},o.validate=(0,a.generateLazyValidator)(o.schema)})(e.Profile||(e.Profile={}))})(uo);(function(e){var a=L&&L.__createBinding||(Object.create?function(o,s,u,p){p===void 0&&(p=u);var v=Object.getOwnPropertyDescriptor(s,u);(!v||("get"in v?!s.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,p,v)}:function(o,s,u,p){p===void 0&&(p=u),o[p]=s[u]}),t=L&&L.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&a(s,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),t(Hi,e),t(uo,e)})(co);var lo={},$i={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const a=K;e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.FeatureToggles||(e.FeatureToggles={}))})($i);var Vi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const a=K;(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(Vi);var qi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const a=K;(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,a.generateLazyValidator)(t.schema),t.validate=o=>t.schemaValidator(o)&&o.parcels.includes(o.base)})(e.SceneParcels||(e.SceneParcels={}))})(qi);var fo={},Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});Pr.displayableProperties=void 0;Pr.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var zi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const a=K;(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(zi);var Gi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const a=K;(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(Gi);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const a=K,t=Pr,o=$i,s=qi,u=zi,p=Gi,v=Vi;var B;(function(j){j.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",j.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",j.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",j.USE_WEB3_API="USE_WEB3_API",j.USE_FETCH="USE_FETCH",j.USE_WEBSOCKET="USE_WEBSOCKET",j.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(B=e.RequiredPermission||(e.RequiredPermission={})),function(j){j.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:s.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},u.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:p.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(B)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},o.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},v.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:B.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},j.validate=(0,a.generateLazyValidator)(j.schema)}(e.Scene||(e.Scene={}))})(fo);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var a=$i;Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return a.FeatureToggles}});var t=Vi;Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var o=qi;Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return o.SceneParcels}});var s=fo;Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return s.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return s.RequiredPermission}});var u=zi;Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return u.Source}});var p=Gi;Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return p.SpawnPoint}})})(lo);var di={},Wi={},Ki={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const a=K;(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.Locale||(e.Locale={}))})(Ki);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const a=K,t=Ki;(function(o){o.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},o.validate=(0,a.generateLazyValidator)(o.schema)})(e.I18N||(e.I18N={}))})(Wi);var Yi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const a=K;(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(Yi);var Jn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const a=qr,t=K;e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:a.Rarity.schema};const o={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},s=(0,t.generateLazyValidator)(o);function u(p){return s(p)}e.isStandard=u})(Jn);var Qn={},Zi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const a=K;(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(Zi);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.thirdPartyProps=void 0;const a=K,t=Zi;e.thirdPartyProps={merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]}};const o={type:"object",properties:Object.assign({},e.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},s={keyword:"_containsHashingKeys",validate:(v,B)=>{var j;const H=B;return!((j=H?.merkleProof)===null||j===void 0)&&j.hashingKeys?H.merkleProof.hashingKeys.every(C=>H.hasOwnProperty(C)):!1},errors:!1},u=(0,a.generateLazyValidator)(o,[s]);function p(v){return u(v)}e.isThirdParty=p})(Qn);var ho={},yo={},Jt={};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.isBaseAvatar=Jt.requiredBaseItemProps=Jt.baseItemProperties=void 0;const tc=Wi,rc=Yi,nc=Pr;Jt.baseItemProperties=Object.assign(Object.assign({},nc.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:tc.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},rc.Metrics.schema),{nullable:!0})});Jt.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function ic(e){if(!e||!e.id)return!1;const a=e.id.split(":"),t=a[1]==="decentraland",o=a[3]==="base-avatars";return a.length===5&&t&&o}Jt.isBaseAvatar=ic;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const a=K,t=sr,o=Kn,s=Jt,u=Jn,p=Qn,v=Zn;(function(B){B.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},s.baseItemProperties),u.standardProperties),p.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:v.HideableWearableCategory.schema},hides:{type:"array",items:v.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:o.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:v.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...s.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...s.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const j={keyword:"_isThirdParty",validate:(C,k)=>!C||(0,p.isThirdParty)(k),errors:!1},H={keyword:"_isBaseAvatar",validate:(C,k)=>!C||(0,s.isBaseAvatar)(k),errors:!1};B.validate=(0,a.generateLazyValidator)(B.schema,[j,H])})(e.Wearable||(e.Wearable={}))})(yo);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var a=Kn;Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return a.WearableRepresentation}});var t=yo;Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var o=sr;Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return o.WearableCategory}});var s=Ui;Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return s.BodyPartCategory}});var u=Zn;Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return u.HideableWearableCategory}})})(ho);var fi={},hi={},Xi={},Ji={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const a=K;(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.EmoteCategory||(e.EmoteCategory={}))})(Ji);var Qi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const a=K,t=Yn;(function(o){o.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},o.validate=(0,a.generateLazyValidator)(o.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(Qi);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const a=Ji,t=K,o=Qi;(function(s){s.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:o.EmoteRepresentationADR74.schema,minItems:1},category:a.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Xi);var Ea;function ac(){return Ea||(Ea=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const a=go(),t=K,o=Jt,s=Jn,u=Qn,p=Xi;(function(v){v.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},o.baseItemProperties),s.standardProperties),u.thirdPartyProps),{emoteDataADR74:p.EmoteDataADR74.schema}),additionalProperties:!0,required:[...o.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const B={keyword:"_isThirdParty",validate:(j,H)=>!j||(0,a.isThirdParty)(H),errors:!1};v.validate=(0,t.generateLazyValidator)(v.schema,[B])})(e.Emote||(e.Emote={}))}(hi)),hi}var po={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const a=K;(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.EmotePlayMode||(e.EmotePlayMode={}))})(po);var wa;function oc(){return wa||(wa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var a=ac();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return a.Emote}});var t=Qi;Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var o=Xi;Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return o.EmoteDataADR74}});var s=Ji;Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return s.EmoteCategory}});var u=po;Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return u.EmotePlayMode}})}(fi)),fi}var Aa;function go(){return Aa||(Aa=1,function(e){var a=L&&L.__createBinding||(Object.create?function(j,H,C,k){k===void 0&&(k=C);var ce=Object.getOwnPropertyDescriptor(H,C);(!ce||("get"in ce?!H.__esModule:ce.writable||ce.configurable))&&(ce={enumerable:!0,get:function(){return H[C]}}),Object.defineProperty(j,k,ce)}:function(j,H,C,k){k===void 0&&(k=C),j[k]=H[C]}),t=L&&L.__exportStar||function(j,H){for(var C in j)C!=="default"&&!Object.prototype.hasOwnProperty.call(H,C)&&a(H,j,C)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var o=Wi;Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return o.I18N}});var s=Ki;Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return s.Locale}});var u=Yi;Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return u.Metrics}});var p=Yn;Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return p.BodyShape}});var v=Jn;Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return v.isStandard}});var B=Qn;Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return B.isThirdParty}}),t(ho,e),t(oc(),e)}(di)),di}var mo={};(function(e){var a=L&&L.__createBinding||(Object.create?function(o,s,u,p){p===void 0&&(p=u);var v=Object.getOwnPropertyDescriptor(s,u);(!v||("get"in v?!s.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,p,v)}:function(o,s,u,p){p===void 0&&(p=u),o[p]=s[u]}),t=L&&L.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&a(s,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),t(Zi,e)})(mo);var bo={},xn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const a=K;var t;(function(s){s.SIGNER="SIGNER",s.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",s.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",s.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",s.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var o;(function(s){s.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},s.validate=(0,a.generateLazyValidator)(s.schema)})(o=e.AuthLink||(e.AuthLink={})),function(s){s.schema={type:"array",items:o.schema,minItems:1},s.validate=(0,a.generateLazyValidator)(s.schema)}(e.AuthChain||(e.AuthChain={}))})(xn);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const a=hr,t=xn,o=K;(function(s){s.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},s.validate=(0,o.generateLazyValidator)(s.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),function(s){s.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},s.validate=(0,o.generateLazyValidator)(s.schema)}(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(bo);var vo={},xi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const a=hr,t=K;(function(o){o.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]}},required:["file","hash"]},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.ContentMapping||(e.ContentMapping={}))})(xi);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const a=hr,t=xi,o=K;(function(s){s.SCENE="scene",s.PROFILE="profile",s.WEARABLE="wearable",s.STORE="store",s.EMOTE="emote",s.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),function(s){s.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},s.validate=(0,o.generateLazyValidator)(s.schema)}(e.Entity||(e.Entity={}))})(vo);var _o={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const a=xn,t=K;(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:a.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(_o);var Eo={},wo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const a=sr,t=hr,o=K;var s;(function(u){u.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:a.WearableCategory.schema}},additionalProperties:!0},u.validate=(0,o.generateLazyValidator)(u.schema)})(s=e.Outfit||(e.Outfit={})),function(u){u.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:s.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},u.validate=(0,o.generateLazyValidator)(u.schema)}(e.Outfits||(e.Outfits={}))})(wo);(function(e){var a=L&&L.__createBinding||(Object.create?function(o,s,u,p){p===void 0&&(p=u);var v=Object.getOwnPropertyDescriptor(s,u);(!v||("get"in v?!s.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,p,v)}:function(o,s,u,p){p===void 0&&(p=u),o[p]=s[u]}),t=L&&L.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&a(s,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),t(wo,e)})(Eo);(function(e){var a=L&&L.__createBinding||(Object.create?function(o,s,u,p){p===void 0&&(p=u);var v=Object.getOwnPropertyDescriptor(s,u);(!v||("get"in v?!s.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,p,v)}:function(o,s,u,p){p===void 0&&(p=u),o[p]=s[u]}),t=L&&L.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&a(s,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),t(co,e),t(lo,e),t(go(),e),t(Pr,e),t(mo,e),t(bo,e),t(vo,e),t(_o,e),t(Eo,e)})(Xn);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const a=qr,t=sr,o=Kn,s=K,u=Xn;(function(p){p.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},a.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:o.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:u.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},p.validate=(0,s.generateLazyValidator)(p.schema)})(e.WearableJson||(e.WearableJson={}))})(so);(function(e){var a=L&&L.__createBinding||(Object.create?function(o,s,u,p){p===void 0&&(p=u);var v=Object.getOwnPropertyDescriptor(s,u);(!v||("get"in v?!s.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,p,v)}:function(o,s,u,p){p===void 0&&(p=u),o[p]=s[u]}),t=L&&L.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&a(s,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),t(oo,e),t(so,e)})(ao);(function(e){var a=L&&L.__createBinding||(Object.create?function(o,s,u,p){p===void 0&&(p=u);var v=Object.getOwnPropertyDescriptor(s,u);(!v||("get"in v?!s.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,p,v)}:function(o,s,u,p){p===void 0&&(p=u),o[p]=s[u]}),t=L&&L.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&a(s,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),t(to,e),t(ao,e)})(eo);var Ao={},yi={},pi={},Ta;function To(){return Ta||(Ta=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const a=K,t=Rt();var o;(function(u){u.ETHEREUM_MAINNET="Ethereum Mainnet",u.ETHEREUM_ROPSTEN="Ropsten",u.ETHEREUM_RINKEBY="Rinkeby",u.ETHEREUM_GOERLI="Goerli",u.ETHEREUM_KOVAN="Kovan",u.ETHEREUM_SEPOLIA="Sepolia",u.MATIC_MAINNET="Polygon",u.MATIC_MUMBAI="Mumbai",u.AVALANCHE_MAINNET="Avalanche Mainnet",u.BINANCE_MAINNET="Binance Smart Chain Mainnet",u.ARBITRUM_MAINNET="Arbitrum One",u.OPTIMISM_MAINNET="Optimism Mainnet",u.FANTOM_MAINNET="Fantom Mainnet"})(o=e.ChainName||(e.ChainName={}));function s(u){switch(u){case o.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case o.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case o.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case o.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case o.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case o.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case o.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case o.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;default:return null}}e.getChainId=s,function(u){u.schema={type:"string",enum:Object.values(u)},u.validate=(0,a.generateLazyValidator)(u.schema)}(o=e.ChainName||(e.ChainName={}))}(pi)),pi}var It={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const a=K;(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC"})(e.Network||(e.Network={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.Network||(e.Network={}))})(It);var Oa;function Rt(){return Oa||(Oa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const a=K,t=To(),o=It;var s;(function(j){j[j.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",j[j.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",j[j.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",j[j.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",j[j.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",j[j.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",j[j.MATIC_MAINNET=137]="MATIC_MAINNET",j[j.MATIC_MUMBAI=80001]="MATIC_MUMBAI"})(s=e.ChainId||(e.ChainId={}));function u(j){switch(j){case s.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case s.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case s.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case s.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case s.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case s.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case s.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case s.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;default:return null}}e.getChainName=u;function p(j){switch(j){case s.ETHEREUM_MAINNET:return"ethereum";case s.ETHEREUM_ROPSTEN:return"ropsten";case s.ETHEREUM_RINKEBY:return"rinkeby";case s.ETHEREUM_GOERLI:return"goerli";case s.ETHEREUM_KOVAN:return"kovan";case s.ETHEREUM_SEPOLIA:return"sepolia";case s.MATIC_MAINNET:return"matic";case s.MATIC_MUMBAI:return"mumbai";default:return""}}e.getURNProtocol=p;function v(j){switch(j){case s.ETHEREUM_MAINNET:return{[o.Network.ETHEREUM]:s.ETHEREUM_MAINNET,[o.Network.MATIC]:s.MATIC_MAINNET};case s.ETHEREUM_ROPSTEN:return{[o.Network.ETHEREUM]:s.ETHEREUM_ROPSTEN,[o.Network.MATIC]:s.MATIC_MUMBAI};case s.ETHEREUM_RINKEBY:return{[o.Network.ETHEREUM]:s.ETHEREUM_RINKEBY,[o.Network.MATIC]:s.MATIC_MUMBAI};case s.ETHEREUM_GOERLI:return{[o.Network.ETHEREUM]:s.ETHEREUM_GOERLI,[o.Network.MATIC]:s.MATIC_MUMBAI};case s.ETHEREUM_KOVAN:return{[o.Network.ETHEREUM]:s.ETHEREUM_KOVAN,[o.Network.MATIC]:s.MATIC_MUMBAI};case s.ETHEREUM_SEPOLIA:return{[o.Network.ETHEREUM]:s.ETHEREUM_SEPOLIA,[o.Network.MATIC]:s.MATIC_MUMBAI};case s.MATIC_MAINNET:return{[o.Network.ETHEREUM]:s.MATIC_MAINNET,[o.Network.MATIC]:s.MATIC_MAINNET};case s.MATIC_MUMBAI:return{[o.Network.ETHEREUM]:s.MATIC_MUMBAI,[o.Network.MATIC]:s.MATIC_MUMBAI};default:return{[o.Network.ETHEREUM]:s.ETHEREUM_MAINNET,[o.Network.MATIC]:s.MATIC_MAINNET}}}e.getNetworkMapping=v;function B(j){switch(j){case s.ETHEREUM_MAINNET:case s.ETHEREUM_ROPSTEN:case s.ETHEREUM_GOERLI:case s.ETHEREUM_KOVAN:case s.ETHEREUM_RINKEBY:case s.ETHEREUM_SEPOLIA:return o.Network.ETHEREUM;case s.MATIC_MAINNET:case s.MATIC_MUMBAI:return o.Network.MATIC}}e.getNetwork=B,function(j){j.schema={type:"number",enum:Object.values(j)},j.validate=(0,a.generateLazyValidator)(j.schema)}(s=e.ChainId||(e.ChainId={}))}(yi)),yi}var ei={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const a=K;(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.ListingStatus||(e.ListingStatus={}))})(ei);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const a=K,t=Rt(),o=ei,s=It;(function(u){u.RECENTLY_OFFERED="recently_offered",u.RECENTLY_UPDATED="recently_updated",u.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),function(u){u.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:o.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:s.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},u.validate=(0,a.generateLazyValidator)(u.schema)}(e.Bid||(e.Bid={}))})(Ao);var Oo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const a=K;(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.Account||(e.Account={}))})(Oo);var So={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const a=K,t=Rt(),o=It;(function(s){s.NEWEST="newest",s.NAME="name",s.RECENTLY_REVIEWED="recently_reviewed",s.RECENTLY_LISTED="recently_listed",s.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),function(s){s.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:o.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)}(e.Collection||(e.Collection={}))})(So);var Io={},zr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const a=K;(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.NFTCategory||(e.NFTCategory={}))})(zr);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const a=K,t=Rt(),o=It,s=zr;(function(u){u.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),function(u){u.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:s.NFTCategory.schema,network:o.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},u.validate=(0,a.generateLazyValidator)(u.schema)}(e.Contract||(e.Contract={}))})(Io);var Po={},ea={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const a=K,t=Rt(),o=Xn,s=It,u=zr,p=qr,v=sr;(function(B){B.NAME="name",B.NEWEST="newest",B.RECENTLY_LISTED="recently_listed",B.RECENTLY_SOLD="recently_sold",B.CHEAPEST="cheapest",B.RENTAL_LISTING_DATE="rental_listing_date",B.RENTAL_DATE="rented_date",B.MAX_RENTAL_PRICE="max_rental_price",B.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),function(B){B.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:o.BodyShape.schema},category:v.WearableCategory.schema,description:{type:"string"},rarity:p.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:o.BodyShape.schema},category:o.EmoteCategory.schema,description:{type:"string"},rarity:p.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:u.NFTCategory.schema,network:s.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},B.validate=(0,a.generateLazyValidator)(B.schema)}(e.NFT||(e.NFT={}))})(ea);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const a=K,t=Rt(),o=It,s=ea,u=zr;(function(p){p.NAME="name",p.NEWEST="newest",p.RECENTLY_REVIEWED="recently_reviewed",p.RECENTLY_SOLD="recently_sold",p.RECENTLY_LISTED="recently_listed",p.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),function(p){p.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:u.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:s.NFT.schema.properties.data,network:o.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},p.validate=(0,a.generateLazyValidator)(p.schema)}(e.Item||(e.Item={}))})(Po);var No={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const a=K;(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(No);var Mo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const a=K,t=Rt(),o=It;(function(s){s.RECENTLY_MINTED="recently_minted",s.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),function(s){s.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:o.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)}(e.Mint||(e.Mint={}))})(Mo);var Bo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,function(a){a.NEWEST="newest",a.RECENTLY_SOLD="recently_sold",a.CHEAPEST="cheapest",a.MOST_EXPENSIVE="most_expensive",a.RECENTLY_LISTED="recently_listed"}(e.CatalogSortBy||(e.CatalogSortBy={})),function(a){a.ASC="asc",a.DESC="desc"}(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Bo);var jo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const a=K,t=Rt(),o=ei,s=It;(function(u){u.RECENTLY_LISTED="recently_listed",u.RECENTLY_UPDATED="recently_updated",u.CHEAPEST="cheapest",u.ISSUED_ID_ASC="issued_id_asc",u.ISSUED_ID_DESC="issued_id_desc",u.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),function(u){u.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:o.ListingStatus.schema,network:s.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},u.validate=(0,a.generateLazyValidator)(u.schema)}(e.Order||(e.Order={}))})(jo);var Ro={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const a=K;(function(t){t.INJECTED="injected",t.MAGIC="magic",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.ProviderType||(e.ProviderType={}))})(Ro);var ta={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const a=K;(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.SaleType||(e.SaleType={}))})(ta);var Co={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const a=K,t=Rt(),o=ta,s=It;(function(u){u.RECENTLY_SOLD="recently_sold",u.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),function(u){u.schema={type:"object",properties:{id:{type:"string"},type:o.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:s.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},u.validate=(0,a.generateLazyValidator)(u.schema)}(e.Sale||(e.Sale={}))})(Co);var Lo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const a=K,t=Rt(),o=It;(function(u){u.OPEN="open",u.CANCELLED="cancelled",u.EXECUTED="executed",u.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),function(u){u.ASC="asc",u.DESC="desc"}(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),function(u){u.PARCEL="parcel",u.ESTATE="estate"}(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),function(u){u.LAND_CREATION_DATE="land_creation_date",u.RENTAL_LISTING_DATE="rental_listing_date",u.RENTAL_DATE="rented_date",u.NAME="name",u.MAX_RENTAL_PRICE="max_rental_price",u.MIN_RENTAL_PRICE="min_rental_price"}(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var s;(function(u){u.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},u.validate=(0,a.generateLazyValidator)(u.schema)})(s=e.PeriodCreation||(e.PeriodCreation={})),function(u){u.schema={type:"object",properties:{network:o.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:s.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},u.validate=(0,a.generateLazyValidator)(u.schema)}(e.RentalListingCreation||(e.RentalListingCreation={}))})(Lo);var Fo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,function(a){a.DATE="date",a.MOST_SALES="most_sales"}(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Fo);var Do={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const a=K;(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(Do);var ko={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const a=K;(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"}(e.GenderFilterOption||(e.GenderFilterOption={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.WearableGender||(e.WearableGender={}))})(ko);var Uo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const a=K;function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function o(s,u){const p=t().validWorldRanges;for(const v of p)if(s>=v.xMin&&s<=v.xMax&&u>=v.yMin&&u<=v.yMax)return!0;return!1}e.isInsideWorldLimits=o,function(s){s.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},s.validate=(0,a.generateLazyValidator)(s.schema)}(e.World||(e.World={}))})(Uo);var Ho={},$o={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const a=K;(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.PreviewCamera||(e.PreviewCamera={}))})($o);var Vo={};Object.defineProperty(Vo,"__esModule",{value:!0});var qo={};Object.defineProperty(qo,"__esModule",{value:!0});var zo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const a=K;(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(zo);var Go={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const a=K;(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.PreviewEmote||(e.PreviewEmote={}))})(Go);var Wo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const a=K;(function(o){o.READY="ready",o.LOAD="load",o.ERROR="error",o.UPDATE="update",o.CONTROLLER_REQUEST="controller_request",o.CONTROLLER_RESPONSE="controller_response",o.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),function(o){o.schema={type:"string",enum:Object.values(o)},o.validate=(0,a.generateLazyValidator)(o.schema)}(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(o,s,u,p="*")=>{const v={type:s,payload:u};o.postMessage(v,p)};e.sendMessage=t})(Wo);var Ko={};Object.defineProperty(Ko,"__esModule",{value:!0});var Yo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const a=K;(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.PreviewProjection||(e.PreviewProjection={}))})(Yo);var Zo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const a=K;(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)}(e.PreviewType||(e.PreviewType={}))})(Zo);var Xo={};Object.defineProperty(Xo,"__esModule",{value:!0});var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0});var Qo={};Object.defineProperty(Qo,"__esModule",{value:!0});var xo={};Object.defineProperty(xo,"__esModule",{value:!0});var es={};Object.defineProperty(es,"__esModule",{value:!0});var ts={};Object.defineProperty(ts,"__esModule",{value:!0});var rs={};Object.defineProperty(rs,"__esModule",{value:!0});var ns={};Object.defineProperty(ns,"__esModule",{value:!0});(function(e){var a=L&&L.__createBinding||(Object.create?function(o,s,u,p){p===void 0&&(p=u);var v=Object.getOwnPropertyDescriptor(s,u);(!v||("get"in v?!s.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,p,v)}:function(o,s,u,p){p===void 0&&(p=u),o[p]=s[u]}),t=L&&L.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&a(s,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),t($o,e),t(Vo,e),t(qo,e),t(zo,e),t(Go,e),t(Wo,e),t(Ko,e),t(Yo,e),t(Zo,e),t(Xo,e),t(Jo,e),t(Qo,e),t(xo,e),t(es,e),t(ts,e),t(rs,e),t(ns,e)})(Ho);var is={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const a=K;(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(is);(function(e){var a=L&&L.__createBinding||(Object.create?function(Ae,ve,ne,de){de===void 0&&(de=ne);var Fe=Object.getOwnPropertyDescriptor(ve,ne);(!Fe||("get"in Fe?!ve.__esModule:Fe.writable||Fe.configurable))&&(Fe={enumerable:!0,get:function(){return ve[ne]}}),Object.defineProperty(Ae,de,Fe)}:function(Ae,ve,ne,de){de===void 0&&(de=ne),Ae[de]=ve[ne]}),t=L&&L.__setModuleDefault||(Object.create?function(Ae,ve){Object.defineProperty(Ae,"default",{enumerable:!0,value:ve})}:function(Ae,ve){Ae.default=ve}),o=L&&L.__importStar||function(Ae){if(Ae&&Ae.__esModule)return Ae;var ve={};if(Ae!=null)for(var ne in Ae)ne!=="default"&&Object.prototype.hasOwnProperty.call(Ae,ne)&&a(ve,Ae,ne);return t(ve,Ae),ve},s=L&&L.__exportStar||function(Ae,ve){for(var ne in Ae)ne!=="default"&&!Object.prototype.hasOwnProperty.call(ve,ne)&&a(ve,Ae,ne)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=e.BidSortBy=e.Bid=void 0;const u=o(eo);e.sdk=u,s(K,e);var p=Ao;Object.defineProperty(e,"Bid",{enumerable:!0,get:function(){return p.Bid}}),Object.defineProperty(e,"BidSortBy",{enumerable:!0,get:function(){return p.BidSortBy}});var v=Oo;Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return v.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return v.AccountSortBy}});var B=Rt();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return B.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return B.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return B.getURNProtocol}});var j=To();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return j.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return j.getChainId}});var H=So;Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return H.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return H.CollectionSortBy}});var C=Io;Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return C.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return C.ContractSortBy}});var k=Po;Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return k.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return k.ItemSortBy}});var ce=ei;Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return ce.ListingStatus}});var we=No;Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return we.MetaTransaction}});var Y=Mo;Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return Y.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return Y.MintSortBy}});var De=It;Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return De.Network}});var Ve=zr;Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return Ve.NFTCategory}});var Qe=ea;Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return Qe.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return Qe.NFTSortBy}});var ie=Bo;Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return ie.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return ie.CatalogSortDirection}});var U=jo;Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return U.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return U.OrderSortBy}});var le=Ro;Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return le.ProviderType}});var Z=qr;Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return Z.Rarity}});var ye=ta;Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return ye.SaleType}});var qe=Co;Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return qe.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return qe.SaleSortBy}});var D=Lo;Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return D.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return D.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return D.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return D.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return D.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return D.PeriodCreation}});var X=Fo;Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return X.AnalyticsDayDataSortBy}});var x=Do;Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return x.Store}});var Re=ko;Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return Re.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return Re.GenderFilterOption}});var Te=Uo;Object.defineProperty(e,"World",{enumerable:!0,get:function(){return Te.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return Te.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return Te.isInsideWorldLimits}}),s(Ho,e),s(Xn,e),s(hr,e),s(is,e),s(xn,e),s(xi,e)})(xa);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const a=xa;Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return a.AuthChain}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return a.AuthLinkType}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return a.AuthLink}})})(Qa);var ti={};Object.defineProperty(ti,"__esModule",{value:!0});ti.moveMinutes=void 0;function sc(e){const a=new Date;return a.setMinutes(a.getMinutes()+e),a}ti.moveMinutes=sc;var ra={};Object.defineProperty(ra,"__esModule",{value:!0});const kr=Gn;class cc{constructor(a,t=!0){this.requestManager=a,this.checkedBlocks={},this.saveBlocks=t,t&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const a=await this.getBlockWrapper("latest"),t=await this.getBlockWrapper(1);this.blockTime=(a.timestamp-t.timestamp)/Number(a.number)-1,this.firstTimestamp=t.timestamp}async getDate(a,t=!0){const o=a/1e3,s=Date.now()/1e3;if((typeof this.firstTimestamp>"u"||typeof this.blockTime>"u")&&await this.fillBlockTime(),o<this.firstTimestamp)return{block:1,timestamp:o};if(o>=s||o>this.savedBlocks.latest.timestamp)return{block:(0,kr.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:o};this.checkedBlocks[o]=[];const u=await this.getBlockWrapper(Math.ceil((o-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(o,u,t),timestamp:o}}async findBetter(a,t,o,s=this.blockTime){if(await this.isBetterBlock(a,t,o))return t.number;const u=a-t.timestamp;let p=Math.ceil(u/s);p===0&&(p=u<0?-1:1);const v=await this.getBlockWrapper(this.getNextBlock(a,t.number,p));return s=Math.abs((t.timestamp-v.timestamp)/(t.number-v.number)),this.findBetter(a,v,o,s)}async isBetterBlock(a,t,o){const s=t.timestamp;if(o){if(s<a)return!1;const u=await this.getBlockWrapper(t.number-1);if(s>=a&&u.timestamp<a)return!0}else{if(s>=a)return!1;const u=await this.getBlockWrapper(t.number+1);if(s<a&&u.timestamp>=a)return!0}return!1}getNextBlock(a,t,o){const s=t+o;return this.checkedBlocks[a].includes(s)?this.getNextBlock(a,t,o<0?++o:--o):(this.checkedBlocks[a].push(s),s)}async getBlockWrapper(a){if(!this.saveBlocks){const o=await this.requestManager.eth_getBlockByNumber(a,!1);return{number:(0,kr.toBigNumber)(o.number).toNumber(),timestamp:(0,kr.toBigNumber)(o.timestamp).toNumber()}}if(this.savedBlocks[a.toString()])return this.savedBlocks[a];if(typeof a=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=a)return this.savedBlocks.latest;const{timestamp:t}=await this.requestManager.eth_getBlockByNumber(a,!1);return this.savedBlocks[a.toString()]={number:(0,kr.toBigNumber)(a==="latest"?await this.requestManager.eth_blockNumber():a).toNumber(),timestamp:(0,kr.toBigNumber)(t).toNumber()},this.requests++,this.savedBlocks[a.toString()]}}ra.default=cc;var ft={},na={},as={},ct={};Object.defineProperty(ct,"__esModule",{value:!0});ct.output=ct.exists=ct.hash=ct.bytes=ct.bool=ct.number=void 0;function Un(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}ct.number=Un;function os(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}ct.bool=os;function ia(e,...a){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(a.length>0&&!a.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${a}, not of length=${e.length}`)}ct.bytes=ia;function ss(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Un(e.outputLen),Un(e.blockLen)}ct.hash=ss;function cs(e,a=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(a&&e.finished)throw new Error("Hash#digest() has already been called")}ct.exists=cs;function us(e,a){ia(e);const t=a.outputLen;if(e.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}ct.output=us;const uc={number:Un,bool:os,bytes:ia,hash:ss,exists:cs,output:us};ct.default=uc;var Ir={},ri={};Object.defineProperty(ri,"__esModule",{value:!0});ri.crypto=void 0;ri.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0};(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;const a=ri,t=U=>new Uint8Array(U.buffer,U.byteOffset,U.byteLength);e.u8=t;const o=U=>new Uint32Array(U.buffer,U.byteOffset,Math.floor(U.byteLength/4));e.u32=o;const s=U=>new DataView(U.buffer,U.byteOffset,U.byteLength);e.createView=s;const u=(U,le)=>U<<32-le|U>>>le;if(e.rotr=u,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!e.isLE)throw new Error("Non little-endian hardware is not supported");const p=Array.from({length:256},(U,le)=>le.toString(16).padStart(2,"0"));function v(U){if(!(U instanceof Uint8Array))throw new Error("Uint8Array expected");let le="";for(let Z=0;Z<U.length;Z++)le+=p[U[Z]];return le}e.bytesToHex=v;function B(U){if(typeof U!="string")throw new TypeError("hexToBytes: expected string, got "+typeof U);if(U.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const le=new Uint8Array(U.length/2);for(let Z=0;Z<le.length;Z++){const ye=Z*2,qe=U.slice(ye,ye+2),D=Number.parseInt(qe,16);if(Number.isNaN(D)||D<0)throw new Error("Invalid byte sequence");le[Z]=D}return le}e.hexToBytes=B;const j=async()=>{};e.nextTick=j;async function H(U,le,Z){let ye=Date.now();for(let qe=0;qe<U;qe++){Z(qe);const D=Date.now()-ye;D>=0&&D<le||(await(0,e.nextTick)(),ye+=D)}}e.asyncLoop=H;function C(U){if(typeof U!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof U}`);return new TextEncoder().encode(U)}e.utf8ToBytes=C;function k(U){if(typeof U=="string"&&(U=C(U)),!(U instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof U})`);return U}e.toBytes=k;function ce(...U){if(!U.every(ye=>ye instanceof Uint8Array))throw new Error("Uint8Array list expected");if(U.length===1)return U[0];const le=U.reduce((ye,qe)=>ye+qe.length,0),Z=new Uint8Array(le);for(let ye=0,qe=0;ye<U.length;ye++){const D=U[ye];Z.set(D,qe),qe+=D.length}return Z}e.concatBytes=ce;class we{clone(){return this._cloneInto()}}e.Hash=we;const Y=U=>Object.prototype.toString.call(U)==="[object Object]"&&U.constructor===Object;function De(U,le){if(le!==void 0&&(typeof le!="object"||!Y(le)))throw new TypeError("Options should be object or undefined");return Object.assign(U,le)}e.checkOpts=De;function Ve(U){const le=ye=>U().update(k(ye)).digest(),Z=U();return le.outputLen=Z.outputLen,le.blockLen=Z.blockLen,le.create=()=>U(),le}e.wrapConstructor=Ve;function Qe(U){const le=(ye,qe)=>U(qe).update(k(ye)).digest(),Z=U({});return le.outputLen=Z.outputLen,le.blockLen=Z.blockLen,le.create=ye=>U(ye),le}e.wrapConstructorWithOpts=Qe;function ie(U=32){if(a.crypto.web)return a.crypto.web.getRandomValues(new Uint8Array(U));if(a.crypto.node)return new Uint8Array(a.crypto.node.randomBytes(U).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=ie})(Ir);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const a=ct,t=Ir;class o extends t.Hash{constructor(p,v){super(),this.finished=!1,this.destroyed=!1,a.default.hash(p);const B=(0,t.toBytes)(v);if(this.iHash=p.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const j=this.blockLen,H=new Uint8Array(j);H.set(B.length>j?p.create().update(B).digest():B);for(let C=0;C<H.length;C++)H[C]^=54;this.iHash.update(H),this.oHash=p.create();for(let C=0;C<H.length;C++)H[C]^=106;this.oHash.update(H),H.fill(0)}update(p){return a.default.exists(this),this.iHash.update(p),this}digestInto(p){a.default.exists(this),a.default.bytes(p,this.outputLen),this.finished=!0,this.iHash.digestInto(p),this.oHash.update(p),this.oHash.digestInto(p),this.destroy()}digest(){const p=new Uint8Array(this.oHash.outputLen);return this.digestInto(p),p}_cloneInto(p){p||(p=Object.create(Object.getPrototypeOf(this),{}));const{oHash:v,iHash:B,finished:j,destroyed:H,blockLen:C,outputLen:k}=this;return p=p,p.finished=j,p.destroyed=H,p.blockLen=C,p.outputLen=k,p.oHash=v._cloneInto(p.oHash),p.iHash=B._cloneInto(p.iHash),p}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const s=(u,p,v)=>new o(u,p).update(v).digest();e.hmac=s,e.hmac.create=(u,p)=>new o(u,p)})(as);var fr={},ni={};Object.defineProperty(ni,"__esModule",{value:!0});ni.SHA2=void 0;const gi=ct,Ur=Ir;function lc(e,a,t,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(a,t,o);const s=BigInt(32),u=BigInt(4294967295),p=Number(t>>s&u),v=Number(t&u),B=o?4:0,j=o?0:4;e.setUint32(a+B,p,o),e.setUint32(a+j,v,o)}class dc extends Ur.Hash{constructor(a,t,o,s){super(),this.blockLen=a,this.outputLen=t,this.padOffset=o,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(a),this.view=(0,Ur.createView)(this.buffer)}update(a){gi.default.exists(this);const{view:t,buffer:o,blockLen:s}=this;a=(0,Ur.toBytes)(a);const u=a.length;for(let p=0;p<u;){const v=Math.min(s-this.pos,u-p);if(v===s){const B=(0,Ur.createView)(a);for(;s<=u-p;p+=s)this.process(B,p);continue}o.set(a.subarray(p,p+v),this.pos),this.pos+=v,p+=v,this.pos===s&&(this.process(t,0),this.pos=0)}return this.length+=a.length,this.roundClean(),this}digestInto(a){gi.default.exists(this),gi.default.output(a,this),this.finished=!0;const{buffer:t,view:o,blockLen:s,isLE:u}=this;let{pos:p}=this;t[p++]=128,this.buffer.subarray(p).fill(0),this.padOffset>s-p&&(this.process(o,0),p=0);for(let C=p;C<s;C++)t[C]=0;lc(o,s-8,BigInt(this.length*8),u),this.process(o,0);const v=(0,Ur.createView)(a),B=this.outputLen;if(B%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const j=B/4,H=this.get();if(j>H.length)throw new Error("_sha2: outputLen bigger than state");for(let C=0;C<j;C++)v.setUint32(4*C,H[C],u)}digest(){const{buffer:a,outputLen:t}=this;this.digestInto(a);const o=a.slice(0,t);return this.destroy(),o}_cloneInto(a){a||(a=new this.constructor),a.set(...this.get());const{blockLen:t,buffer:o,length:s,finished:u,destroyed:p,pos:v}=this;return a.length=s,a.pos=v,a.finished=u,a.destroyed=p,s%t&&a.buffer.set(o),a}}ni.SHA2=dc;Object.defineProperty(fr,"__esModule",{value:!0});fr.sha224=fr.sha256=void 0;const fc=ni,Ot=Ir,hc=(e,a,t)=>e&a^~e&t,yc=(e,a,t)=>e&a^e&t^a&t,pc=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ir=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ar=new Uint32Array(64);class ls extends fc.SHA2{constructor(){super(64,32,8,!1),this.A=ir[0]|0,this.B=ir[1]|0,this.C=ir[2]|0,this.D=ir[3]|0,this.E=ir[4]|0,this.F=ir[5]|0,this.G=ir[6]|0,this.H=ir[7]|0}get(){const{A:a,B:t,C:o,D:s,E:u,F:p,G:v,H:B}=this;return[a,t,o,s,u,p,v,B]}set(a,t,o,s,u,p,v,B){this.A=a|0,this.B=t|0,this.C=o|0,this.D=s|0,this.E=u|0,this.F=p|0,this.G=v|0,this.H=B|0}process(a,t){for(let C=0;C<16;C++,t+=4)ar[C]=a.getUint32(t,!1);for(let C=16;C<64;C++){const k=ar[C-15],ce=ar[C-2],we=(0,Ot.rotr)(k,7)^(0,Ot.rotr)(k,18)^k>>>3,Y=(0,Ot.rotr)(ce,17)^(0,Ot.rotr)(ce,19)^ce>>>10;ar[C]=Y+ar[C-7]+we+ar[C-16]|0}let{A:o,B:s,C:u,D:p,E:v,F:B,G:j,H}=this;for(let C=0;C<64;C++){const k=(0,Ot.rotr)(v,6)^(0,Ot.rotr)(v,11)^(0,Ot.rotr)(v,25),ce=H+k+hc(v,B,j)+pc[C]+ar[C]|0,Y=((0,Ot.rotr)(o,2)^(0,Ot.rotr)(o,13)^(0,Ot.rotr)(o,22))+yc(o,s,u)|0;H=j,j=B,B=v,v=p+ce|0,p=u,u=s,s=o,o=ce+Y|0}o=o+this.A|0,s=s+this.B|0,u=u+this.C|0,p=p+this.D|0,v=v+this.E|0,B=B+this.F|0,j=j+this.G|0,H=H+this.H|0,this.set(o,s,u,p,v,B,j,H)}roundClean(){ar.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class gc extends ls{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}fr.sha256=(0,Ot.wrapConstructor)(()=>new ls);fr.sha224=(0,Ot.wrapConstructor)(()=>new gc);var Ri={};(function(e){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const a=Ks,t=BigInt(0),o=BigInt(1),s=BigInt(2),u=BigInt(3),p=BigInt(8),v=Object.freeze({a:t,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:o,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=v;const B=(E,l)=>(E+l/s)/l,j={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(E){const{n:l}=v,m=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),O=-o*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),N=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),R=m,q=BigInt("0x100000000000000000000000000000000"),G=B(R*E,l),fe=B(-O*E,l);let ae=$(E-G*m-fe*N,l),_e=$(-G*O-fe*R,l);const Se=ae>q,Ie=_e>q;if(Se&&(ae=l-ae),Ie&&(_e=l-_e),ae>q||_e>q)throw new Error("splitScalarEndo: Endomorphism failed, k="+E);return{k1neg:Se,k1:ae,k2neg:Ie,k2:_e}}},H=32,C=32,k=32,ce=H+1,we=2*H+1;function Y(E){const{a:l,b:m}=v,O=$(E*E),N=$(O*E);return $(N+l*E+m)}const De=v.a===t;class Ve extends Error{constructor(l){super(l)}}function Qe(E){if(!(E instanceof ie))throw new TypeError("JacobianPoint expected")}class ie{constructor(l,m,O){this.x=l,this.y=m,this.z=O}static fromAffine(l){if(!(l instanceof Z))throw new TypeError("JacobianPoint#fromAffine: expected Point");return l.equals(Z.ZERO)?ie.ZERO:new ie(l.x,l.y,o)}static toAffineBatch(l){const m=Pt(l.map(O=>O.z));return l.map((O,N)=>O.toAffine(m[N]))}static normalizeZ(l){return ie.toAffineBatch(l).map(ie.fromAffine)}equals(l){Qe(l);const{x:m,y:O,z:N}=this,{x:R,y:q,z:G}=l,fe=$(N*N),ae=$(G*G),_e=$(m*ae),Se=$(R*fe),Ie=$($(O*G)*ae),Ze=$($(q*N)*fe);return _e===Se&&Ie===Ze}negate(){return new ie(this.x,$(-this.y),this.z)}double(){const{x:l,y:m,z:O}=this,N=$(l*l),R=$(m*m),q=$(R*R),G=l+R,fe=$(s*($(G*G)-N-q)),ae=$(u*N),_e=$(ae*ae),Se=$(_e-s*fe),Ie=$(ae*(fe-Se)-p*q),Ze=$(s*m*O);return new ie(Se,Ie,Ze)}add(l){Qe(l);const{x:m,y:O,z:N}=this,{x:R,y:q,z:G}=l;if(R===t||q===t)return this;if(m===t||O===t)return l;const fe=$(N*N),ae=$(G*G),_e=$(m*ae),Se=$(R*fe),Ie=$($(O*G)*ae),Ze=$($(q*N)*fe),We=$(Se-_e),it=$(Ze-Ie);if(We===t)return it===t?this.double():ie.ZERO;const xt=$(We*We),Gt=$(We*xt),er=$(_e*xt),Er=$(it*it-Gt-s*er),bt=$(it*(er-Er)-Ie*Gt),dr=$(N*G*We);return new ie(Er,bt,dr)}subtract(l){return this.add(l.negate())}multiplyUnsafe(l){const m=ie.ZERO;if(typeof l=="bigint"&&l===t)return m;let O=Ye(l);if(O===o)return this;if(!De){let Se=m,Ie=this;for(;O>t;)O&o&&(Se=Se.add(Ie)),Ie=Ie.double(),O>>=o;return Se}let{k1neg:N,k1:R,k2neg:q,k2:G}=j.splitScalar(O),fe=m,ae=m,_e=this;for(;R>t||G>t;)R&o&&(fe=fe.add(_e)),G&o&&(ae=ae.add(_e)),_e=_e.double(),R>>=o,G>>=o;return N&&(fe=fe.negate()),q&&(ae=ae.negate()),ae=new ie($(ae.x*j.beta),ae.y,ae.z),fe.add(ae)}precomputeWindow(l){const m=De?128/l+1:256/l+1,O=[];let N=this,R=N;for(let q=0;q<m;q++){R=N,O.push(R);for(let G=1;G<2**(l-1);G++)R=R.add(N),O.push(R);N=R.double()}return O}wNAF(l,m){!m&&this.equals(ie.BASE)&&(m=Z.BASE);const O=m&&m._WINDOW_SIZE||1;if(256%O)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let N=m&&le.get(m);N||(N=this.precomputeWindow(O),m&&O!==1&&(N=ie.normalizeZ(N),le.set(m,N)));let R=ie.ZERO,q=ie.BASE;const G=1+(De?128/O:256/O),fe=2**(O-1),ae=BigInt(2**O-1),_e=2**O,Se=BigInt(O);for(let Ie=0;Ie<G;Ie++){const Ze=Ie*fe;let We=Number(l&ae);l>>=Se,We>fe&&(We-=_e,l+=o);const it=Ze,xt=Ze+Math.abs(We)-1,Gt=Ie%2!==0,er=We<0;We===0?q=q.add(U(Gt,N[it])):R=R.add(U(er,N[xt]))}return{p:R,f:q}}multiply(l,m){let O=Ye(l),N,R;if(De){const{k1neg:q,k1:G,k2neg:fe,k2:ae}=j.splitScalar(O);let{p:_e,f:Se}=this.wNAF(G,m),{p:Ie,f:Ze}=this.wNAF(ae,m);_e=U(q,_e),Ie=U(fe,Ie),Ie=new ie($(Ie.x*j.beta),Ie.y,Ie.z),N=_e.add(Ie),R=Se.add(Ze)}else{const{p:q,f:G}=this.wNAF(O,m);N=q,R=G}return ie.normalizeZ([N,R])[0]}toAffine(l){const{x:m,y:O,z:N}=this,R=this.equals(ie.ZERO);l==null&&(l=R?p:tt(N));const q=l,G=$(q*q),fe=$(G*q),ae=$(m*G),_e=$(O*fe),Se=$(N*q);if(R)return Z.ZERO;if(Se!==o)throw new Error("invZ was invalid");return new Z(ae,_e)}}ie.BASE=new ie(v.Gx,v.Gy,o),ie.ZERO=new ie(t,o,t);function U(E,l){const m=l.negate();return E?m:l}const le=new WeakMap;class Z{constructor(l,m){this.x=l,this.y=m}_setWindowSize(l){this._WINDOW_SIZE=l,le.delete(this)}hasEvenY(){return this.y%s===t}static fromCompressedHex(l){const m=l.length===32,O=me(m?l:l.subarray(1));if(!rt(O))throw new Error("Point is not on curve");const N=Y(O);let R=gt(N);const q=(R&o)===o;m?q&&(R=$(-R)):(l[0]&1)===1!==q&&(R=$(-R));const G=new Z(O,R);return G.assertValidity(),G}static fromUncompressedHex(l){const m=me(l.subarray(1,H+1)),O=me(l.subarray(H+1,H*2+1)),N=new Z(m,O);return N.assertValidity(),N}static fromHex(l){const m=Ne(l),O=m.length,N=m[0];if(O===H)return this.fromCompressedHex(m);if(O===ce&&(N===2||N===3))return this.fromCompressedHex(m);if(O===we&&N===4)return this.fromUncompressedHex(m);throw new Error(`Point.fromHex: received invalid point. Expected 32-${ce} compressed bytes or ${we} uncompressed bytes, not ${O}`)}static fromPrivateKey(l){return Z.BASE.multiply(Ce(l))}static fromSignature(l,m,O){const{r:N,s:R}=nt(m);if(![0,1,2,3].includes(O))throw new Error("Cannot recover: invalid recovery bit");const q=gr(Ne(l)),{n:G}=v,fe=O===2||O===3?N+G:N,ae=tt(fe,G),_e=$(-q*ae,G),Se=$(R*ae,G),Ie=O&1?"03":"02",Ze=Z.fromHex(Ie+ve(fe)),We=Z.BASE.multiplyAndAddUnsafe(Ze,_e,Se);if(!We)throw new Error("Cannot recover signature: point at infinify");return We.assertValidity(),We}toRawBytes(l=!1){return Xe(this.toHex(l))}toHex(l=!1){const m=ve(this.x);return l?`${this.hasEvenY()?"02":"03"}${m}`:`04${m}${ve(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const l="Point is not on elliptic curve",{x:m,y:O}=this;if(!rt(m)||!rt(O))throw new Error(l);const N=$(O*O),R=Y(m);if($(N-R)!==t)throw new Error(l)}equals(l){return this.x===l.x&&this.y===l.y}negate(){return new Z(this.x,$(-this.y))}double(){return ie.fromAffine(this).double().toAffine()}add(l){return ie.fromAffine(this).add(ie.fromAffine(l)).toAffine()}subtract(l){return this.add(l.negate())}multiply(l){return ie.fromAffine(this).multiply(l,this).toAffine()}multiplyAndAddUnsafe(l,m,O){const N=ie.fromAffine(this),R=m===t||m===o||this!==Z.BASE?N.multiplyUnsafe(m):N.multiply(m),q=ie.fromAffine(l).multiplyUnsafe(O),G=R.add(q);return G.equals(ie.ZERO)?void 0:G.toAffine()}}e.Point=Z,Z.BASE=new Z(v.Gx,v.Gy),Z.ZERO=new Z(t,t);function ye(E){return Number.parseInt(E[0],16)>=8?"00"+E:E}function qe(E){if(E.length<2||E[0]!==2)throw new Error(`Invalid signature integer tag: ${Te(E)}`);const l=E[1],m=E.subarray(2,l+2);if(!l||m.length!==l)throw new Error("Invalid signature integer: wrong length");if(m[0]===0&&m[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:me(m),left:E.subarray(l+2)}}function D(E){if(E.length<2||E[0]!=48)throw new Error(`Invalid signature tag: ${Te(E)}`);if(E[1]!==E.length-2)throw new Error("Invalid signature: incorrect length");const{data:l,left:m}=qe(E.subarray(2)),{data:O,left:N}=qe(m);if(N.length)throw new Error(`Invalid signature: left bytes after parsing: ${Te(N)}`);return{r:l,s:O}}class X{constructor(l,m){this.r=l,this.s=m,this.assertValidity()}static fromCompact(l){const m=l instanceof Uint8Array,O="Signature.fromCompact";if(typeof l!="string"&&!m)throw new TypeError(`${O}: Expected string or Uint8Array`);const N=m?Te(l):l;if(N.length!==128)throw new Error(`${O}: Expected 64-byte hex`);return new X(Fe(N.slice(0,64)),Fe(N.slice(64,128)))}static fromDER(l){const m=l instanceof Uint8Array;if(typeof l!="string"&&!m)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:O,s:N}=D(m?l:Xe(l));return new X(O,N)}static fromHex(l){return this.fromDER(l)}assertValidity(){const{r:l,s:m}=this;if(!Lt(l))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Lt(m))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const l=v.n>>o;return this.s>l}normalizeS(){return this.hasHighS()?new X(this.r,$(-this.s,v.n)):this}toDERRawBytes(){return Xe(this.toDERHex())}toDERHex(){const l=ye(de(this.s)),m=ye(de(this.r)),O=l.length/2,N=m.length/2,R=de(O),q=de(N);return`30${de(N+O+4)}02${q}${m}02${R}${l}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return Xe(this.toCompactHex())}toCompactHex(){return ve(this.r)+ve(this.s)}}e.Signature=X;function x(...E){if(!E.every(O=>O instanceof Uint8Array))throw new Error("Uint8Array list expected");if(E.length===1)return E[0];const l=E.reduce((O,N)=>O+N.length,0),m=new Uint8Array(l);for(let O=0,N=0;O<E.length;O++){const R=E[O];m.set(R,N),N+=R.length}return m}const Re=Array.from({length:256},(E,l)=>l.toString(16).padStart(2,"0"));function Te(E){if(!(E instanceof Uint8Array))throw new Error("Expected Uint8Array");let l="";for(let m=0;m<E.length;m++)l+=Re[E[m]];return l}const Ae=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function ve(E){if(typeof E!="bigint")throw new Error("Expected bigint");if(!(t<=E&&E<Ae))throw new Error("Expected number 0 <= n < 2^256");return E.toString(16).padStart(64,"0")}function ne(E){const l=Xe(ve(E));if(l.length!==32)throw new Error("Error: expected 32 bytes");return l}function de(E){const l=E.toString(16);return l.length&1?`0${l}`:l}function Fe(E){if(typeof E!="string")throw new TypeError("hexToNumber: expected string, got "+typeof E);return BigInt(`0x${E}`)}function Xe(E){if(typeof E!="string")throw new TypeError("hexToBytes: expected string, got "+typeof E);if(E.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+E.length);const l=new Uint8Array(E.length/2);for(let m=0;m<l.length;m++){const O=m*2,N=E.slice(O,O+2),R=Number.parseInt(N,16);if(Number.isNaN(R)||R<0)throw new Error("Invalid byte sequence");l[m]=R}return l}function me(E){return Fe(Te(E))}function Ne(E){return E instanceof Uint8Array?Uint8Array.from(E):Xe(E)}function Ye(E){if(typeof E=="number"&&Number.isSafeInteger(E)&&E>0)return BigInt(E);if(typeof E=="bigint"&&Lt(E))return E;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function $(E,l=v.P){const m=E%l;return m>=t?m:l+m}function Le(E,l){const{P:m}=v;let O=E;for(;l-- >t;)O*=O,O%=m;return O}function gt(E){const{P:l}=v,m=BigInt(6),O=BigInt(11),N=BigInt(22),R=BigInt(23),q=BigInt(44),G=BigInt(88),fe=E*E*E%l,ae=fe*fe*E%l,_e=Le(ae,u)*ae%l,Se=Le(_e,u)*ae%l,Ie=Le(Se,s)*fe%l,Ze=Le(Ie,O)*Ie%l,We=Le(Ze,N)*Ze%l,it=Le(We,q)*We%l,xt=Le(it,G)*it%l,Gt=Le(xt,q)*We%l,er=Le(Gt,u)*ae%l,Er=Le(er,R)*Ze%l,bt=Le(Er,m)*fe%l,dr=Le(bt,s);if(dr*dr%l!==E)throw new Error("Cannot find square root");return dr}function tt(E,l=v.P){if(E===t||l<=t)throw new Error(`invert: expected positive integers, got n=${E} mod=${l}`);let m=$(E,l),O=l,N=t,R=o;for(;m!==t;){const G=O/m,fe=O%m,ae=N-R*G;O=m,m=fe,N=R,R=ae}if(O!==o)throw new Error("invert: does not exist");return $(N,l)}function Pt(E,l=v.P){const m=new Array(E.length),O=E.reduce((R,q,G)=>q===t?R:(m[G]=R,$(R*q,l)),o),N=tt(O,l);return E.reduceRight((R,q,G)=>q===t?R:(m[G]=$(R*m[G],l),$(R*q,l)),N),m}function Nt(E){const l=E.length*8-C*8,m=me(E);return l>0?m>>BigInt(l):m}function gr(E,l=!1){const m=Nt(E);if(l)return m;const{n:O}=v;return m>=O?m-O:m}let ge,$t;class ht{constructor(l,m){if(this.hashLen=l,this.qByteLen=m,typeof l!="number"||l<2)throw new Error("hashLen must be a number");if(typeof m!="number"||m<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(l).fill(1),this.k=new Uint8Array(l).fill(0),this.counter=0}hmac(...l){return e.utils.hmacSha256(this.k,...l)}hmacSync(...l){return $t(this.k,...l)}checkSync(){if(typeof $t!="function")throw new Ve("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(l=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),l),this.v=await this.hmac(this.v),l.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),l),this.v=await this.hmac(this.v))}reseedSync(l=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),l),this.v=this.hmacSync(this.v),l.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),l),this.v=this.hmacSync(this.v))}async generate(){this.incr();let l=0;const m=[];for(;l<this.qByteLen;){this.v=await this.hmac(this.v);const O=this.v.slice();m.push(O),l+=this.v.length}return x(...m)}generateSync(){this.checkSync(),this.incr();let l=0;const m=[];for(;l<this.qByteLen;){this.v=this.hmacSync(this.v);const O=this.v.slice();m.push(O),l+=this.v.length}return x(...m)}}function Lt(E){return t<E&&E<v.n}function rt(E){return t<E&&E<v.P}function et(E,l,m,O=!0){const{n:N}=v,R=gr(E,!0);if(!Lt(R))return;const q=tt(R,N),G=Z.BASE.multiply(R),fe=$(G.x,N);if(fe===t)return;const ae=$(q*$(l+m*fe,N),N);if(ae===t)return;let _e=new X(fe,ae),Se=(G.x===_e.r?0:2)|Number(G.y&o);return O&&_e.hasHighS()&&(_e=_e.normalizeS(),Se^=1),{sig:_e,recovery:Se}}function Ce(E){let l;if(typeof E=="bigint")l=E;else if(typeof E=="number"&&Number.isSafeInteger(E)&&E>0)l=BigInt(E);else if(typeof E=="string"){if(E.length!==2*C)throw new Error("Expected 32 bytes of private key");l=Fe(E)}else if(E instanceof Uint8Array){if(E.length!==C)throw new Error("Expected 32 bytes of private key");l=me(E)}else throw new TypeError("Expected valid private key");if(!Lt(l))throw new Error("Expected private key: 0 < key < n");return l}function cr(E){return E instanceof Z?(E.assertValidity(),E):Z.fromHex(E)}function nt(E){if(E instanceof X)return E.assertValidity(),E;try{return X.fromDER(E)}catch{return X.fromCompact(E)}}function Yr(E,l=!1){return Z.fromPrivateKey(E).toRawBytes(l)}e.getPublicKey=Yr;function Vt(E,l,m,O=!1){return Z.fromSignature(E,l,m).toRawBytes(O)}e.recoverPublicKey=Vt;function Mr(E){const l=E instanceof Uint8Array,m=typeof E=="string",O=(l||m)&&E.length;return l?O===ce||O===we:m?O===ce*2||O===we*2:E instanceof Z}function Zr(E,l,m=!1){if(Mr(E))throw new TypeError("getSharedSecret: first arg must be private key");if(!Mr(l))throw new TypeError("getSharedSecret: second arg must be public key");const O=cr(l);return O.assertValidity(),O.multiply(Ce(E)).toRawBytes(m)}e.getSharedSecret=Zr;function mr(E){const l=E.length>H?E.slice(0,H):E;return me(l)}function Br(E){const l=mr(E),m=$(l,v.n);return ur(m<t?l:m)}function ur(E){return ne(E)}function jr(E,l,m){if(E==null)throw new Error(`sign: expected valid message hash, not "${E}"`);const O=Ne(E),N=Ce(l),R=[ur(N),Br(O)];if(m!=null){m===!0&&(m=e.utils.randomBytes(H));const fe=Ne(m);if(fe.length!==H)throw new Error(`sign: Expected ${H} bytes of extra data`);R.push(fe)}const q=x(...R),G=mr(O);return{seed:q,m:G,d:N}}function Rr(E,l){const{sig:m,recovery:O}=E,{der:N,recovered:R}=Object.assign({canonical:!0,der:!0},l),q=N?m.toDERRawBytes():m.toCompactRawBytes();return R?[q,O]:q}async function mt(E,l,m={}){const{seed:O,m:N,d:R}=jr(E,l,m.extraEntropy),q=new ht(k,C);await q.reseed(O);let G;for(;!(G=et(await q.generate(),N,R,m.canonical));)await q.reseed();return Rr(G,m)}e.sign=mt;function lr(E,l,m={}){const{seed:O,m:N,d:R}=jr(E,l,m.extraEntropy),q=new ht(k,C);q.reseedSync(O);let G;for(;!(G=et(q.generateSync(),N,R,m.canonical));)q.reseedSync();return Rr(G,m)}e.signSync=lr;const qt={strict:!0};function br(E,l,m,O=qt){let N;try{N=nt(E),l=Ne(l)}catch{return!1}const{r:R,s:q}=N;if(O.strict&&N.hasHighS())return!1;const G=gr(l);let fe;try{fe=cr(m)}catch{return!1}const{n:ae}=v,_e=tt(q,ae),Se=$(G*_e,ae),Ie=$(R*_e,ae),Ze=Z.BASE.multiplyAndAddUnsafe(fe,Se,Ie);return Ze?$(Ze.x,ae)===R:!1}e.verify=br;function wt(E){return $(me(E),v.n)}class zt{constructor(l,m){this.r=l,this.s=m,this.assertValidity()}static fromHex(l){const m=Ne(l);if(m.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${m.length}`);const O=me(m.subarray(0,32)),N=me(m.subarray(32,64));return new zt(O,N)}assertValidity(){const{r:l,s:m}=this;if(!rt(l)||!Lt(m))throw new Error("Invalid signature")}toHex(){return ve(this.r)+ve(this.s)}toRawBytes(){return Xe(this.toHex())}}function At(E){return Z.fromPrivateKey(E).toRawX()}class vr{constructor(l,m,O=e.utils.randomBytes()){if(l==null)throw new TypeError(`sign: Expected valid message, not "${l}"`);this.m=Ne(l);const{x:N,scalar:R}=this.getScalar(Ce(m));if(this.px=N,this.d=R,this.rand=Ne(O),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(l){const m=Z.fromPrivateKey(l),O=m.hasEvenY()?l:v.n-l;return{point:m,scalar:O,x:m.toRawX()}}initNonce(l,m){return ne(l^me(m))}finalizeNonce(l){const m=$(me(l),v.n);if(m===t)throw new Error("sign: Creation of signature failed. k is zero");const{point:O,x:N,scalar:R}=this.getScalar(m);return{R:O,rx:N,k:R}}finalizeSig(l,m,O,N){return new zt(l.x,$(m+O*N,v.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:l,d:m,px:O,rand:N}=this,R=e.utils.taggedHash,q=this.initNonce(m,await R(Tt.aux,N)),{R:G,rx:fe,k:ae}=this.finalizeNonce(await R(Tt.nonce,q,O,l)),_e=wt(await R(Tt.challenge,fe,O,l)),Se=this.finalizeSig(G,ae,_e,m);return await Fr(Se,l,O)||this.error(),Se}calcSync(){const{m:l,d:m,px:O,rand:N}=this,R=e.utils.taggedHashSync,q=this.initNonce(m,R(Tt.aux,N)),{R:G,rx:fe,k:ae}=this.finalizeNonce(R(Tt.nonce,q,O,l)),_e=wt(R(Tt.challenge,fe,O,l)),Se=this.finalizeSig(G,ae,_e,m);return Ft(Se,l,O)||this.error(),Se}}async function Qt(E,l,m){return new vr(E,l,m).calc()}function Cr(E,l,m){return new vr(E,l,m).calcSync()}function Lr(E,l,m){const O=E instanceof zt,N=O?E:zt.fromHex(E);return O&&N.assertValidity(),{...N,m:Ne(l),P:cr(m)}}function _r(E,l,m,O){const N=Z.BASE.multiplyAndAddUnsafe(l,Ce(m),$(-O,v.n));return!(!N||!N.hasEvenY()||N.x!==E)}async function Fr(E,l,m){try{const{r:O,s:N,m:R,P:q}=Lr(E,l,m),G=wt(await e.utils.taggedHash(Tt.challenge,ne(O),q.toRawX(),R));return _r(O,q,N,G)}catch{return!1}}function Ft(E,l,m){try{const{r:O,s:N,m:R,P:q}=Lr(E,l,m),G=wt(e.utils.taggedHashSync(Tt.challenge,ne(O),q.toRawX(),R));return _r(O,q,N,G)}catch(O){if(O instanceof Ve)throw O;return!1}}e.schnorr={Signature:zt,getPublicKey:At,sign:Qt,verify:Fr,signSync:Cr,verifySync:Ft},Z.BASE._setWindowSize(8);const je={node:a,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Tt={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},Mt={};e.utils={bytesToHex:Te,hexToBytes:Xe,concatBytes:x,mod:$,invert:tt,isValidPrivateKey(E){try{return Ce(E),!0}catch{return!1}},_bigintTo32Bytes:ne,_normalizePrivateKey:Ce,hashToPrivateKey:E=>{E=Ne(E);const l=C+8;if(E.length<l||E.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const m=$(me(E),v.n-o)+o;return ne(m)},randomBytes:(E=32)=>{if(je.web)return je.web.getRandomValues(new Uint8Array(E));if(je.node){const{randomBytes:l}=je.node;return Uint8Array.from(l(E))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(C+8)),precompute(E=8,l=Z.BASE){const m=l===Z.BASE?l:new Z(l.x,l.y);return m._setWindowSize(E),m.multiply(u),m},sha256:async(...E)=>{if(je.web){const l=await je.web.subtle.digest("SHA-256",x(...E));return new Uint8Array(l)}else if(je.node){const{createHash:l}=je.node,m=l("sha256");return E.forEach(O=>m.update(O)),Uint8Array.from(m.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(E,...l)=>{if(je.web){const m=await je.web.subtle.importKey("raw",E,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),O=x(...l),N=await je.web.subtle.sign("HMAC",m,O);return new Uint8Array(N)}else if(je.node){const{createHmac:m}=je.node,O=m("sha256",E);return l.forEach(N=>O.update(N)),Uint8Array.from(O.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(E,...l)=>{let m=Mt[E];if(m===void 0){const O=await e.utils.sha256(Uint8Array.from(E,N=>N.charCodeAt(0)));m=x(O,O),Mt[E]=m}return e.utils.sha256(m,...l)},taggedHashSync:(E,...l)=>{if(typeof ge!="function")throw new Ve("sha256Sync is undefined, you need to set it");let m=Mt[E];if(m===void 0){const O=ge(Uint8Array.from(E,N=>N.charCodeAt(0)));m=x(O,O),Mt[E]=m}return ge(m,...l)},_JacobianPoint:ie},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return ge},set(E){ge||(ge=E)}},hmacSha256Sync:{configurable:!1,get(){return $t},set(E){$t||($t=E)}}})})(Ri);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schnorr=e.Signature=e.Point=e.CURVE=e.utils=e.getSharedSecret=e.recoverPublicKey=e.verify=e.signSync=e.sign=e.getPublicKey=void 0;const a=as,t=fr,o=Ri;var s=Ri;Object.defineProperty(e,"getPublicKey",{enumerable:!0,get:function(){return s.getPublicKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return s.sign}}),Object.defineProperty(e,"signSync",{enumerable:!0,get:function(){return s.signSync}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return s.verify}}),Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return s.recoverPublicKey}}),Object.defineProperty(e,"getSharedSecret",{enumerable:!0,get:function(){return s.getSharedSecret}}),Object.defineProperty(e,"utils",{enumerable:!0,get:function(){return s.utils}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return s.CURVE}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return s.Point}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return s.Signature}}),Object.defineProperty(e,"schnorr",{enumerable:!0,get:function(){return s.schnorr}}),o.utils.hmacSha256Sync=(u,...p)=>{const v=a.hmac.create(t.sha256,u);return p.forEach(B=>v.update(B)),v.digest()}})(na);var Ee={};function Sa(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Hn={exports:{}};Hn.exports;(function(e,a){var t=L&&L.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(a,"__esModule",{value:!0}),a.crypto=a.wrapHash=a.equalsBytes=a.hexToBytes=a.bytesToUtf8=a.utf8ToBytes=a.createView=a.concatBytes=a.toHex=a.bytesToHex=a.assertBytes=a.assertBool=void 0;const o=t(ct),s=Ir,u=o.default.bool;a.assertBool=u;const p=o.default.bytes;a.assertBytes=p;var v=Ir;Object.defineProperty(a,"bytesToHex",{enumerable:!0,get:function(){return v.bytesToHex}}),Object.defineProperty(a,"toHex",{enumerable:!0,get:function(){return v.bytesToHex}}),Object.defineProperty(a,"concatBytes",{enumerable:!0,get:function(){return v.concatBytes}}),Object.defineProperty(a,"createView",{enumerable:!0,get:function(){return v.createView}}),Object.defineProperty(a,"utf8ToBytes",{enumerable:!0,get:function(){return v.utf8ToBytes}});function B(k){if(!(k instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof k}`);return new TextDecoder().decode(k)}a.bytesToUtf8=B;function j(k){const ce=k.startsWith("0x")?k.substring(2):k;return(0,s.hexToBytes)(ce)}a.hexToBytes=j;function H(k,ce){if(k.length!==ce.length)return!1;for(let we=0;we<k.length;we++)if(k[we]!==ce[we])return!1;return!0}a.equalsBytes=H;function C(k){return ce=>(o.default.bytes(ce),k(ce))}a.wrapHash=C,a.crypto=(()=>{const k=typeof self=="object"&&"crypto"in self?self.crypto:void 0,ce=typeof Sa=="function"&&Sa.bind(e);return{node:ce&&!k?ce("crypto"):void 0,web:k}})()})(Hn,Hn.exports);var mc=Hn.exports,bc=L&&L.__createBinding||(Object.create?function(e,a,t,o){o===void 0&&(o=t);var s=Object.getOwnPropertyDescriptor(a,t);(!s||("get"in s?!a.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return a[t]}}),Object.defineProperty(e,o,s)}:function(e,a,t,o){o===void 0&&(o=t),e[o]=a[t]}),vc=L&&L.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),_c=L&&L.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&bc(a,e,t);return vc(a,e),a};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.contextRandomize=Ee.ecdh=Ee.signatureNormalize=Ee.signatureImport=Ee.signatureExport=Ee.privateKeyTweakMul=Ee.publicKeyTweakMul=Ee.publicKeyTweakAdd=Ee.publicKeyCombine=Ee.publicKeyNegate=Ee.privateKeyNegate=Ee.privateKeyTweakAdd=Ee.ecdsaVerify=Ee.ecdsaRecover=Ee.ecdsaSign=Ee.publicKeyConvert=Ee.publicKeyVerify=Ee.publicKeyCreate=Ee.privateKeyVerify=Ee.createPrivateKey=Ee.createPrivateKeySync=void 0;const Ec=fr,Ge=_c(na),be=mc;function wc(e){if(typeof e!="string")throw new TypeError("hexToNumber: expected string, got "+typeof e);return BigInt(`0x${e}`)}const or=e=>wc((0,be.toHex)(e)),ii=e=>e.toString(16).padStart(64,"0"),Ci=e=>(0,be.hexToBytes)(ii(e)),{mod:ds}=Ge.utils,jt=Ge.CURVE.n;function St(e=o=>new Uint8Array(o),a,t){return typeof e=="function"&&(e=e(a)),(0,be.assertBytes)(e,a),t&&e.set(t),e}function Vr(e){return(0,be.assertBytes)(e,64),Ge.Signature.fromCompact(e)}function fs(){return Ge.utils.randomPrivateKey()}Ee.createPrivateKeySync=fs;async function Ac(){return fs()}Ee.createPrivateKey=Ac;function Tc(e){return(0,be.assertBytes)(e,32),Ge.utils.isValidPrivateKey(e)}Ee.privateKeyVerify=Tc;function Oc(e,a=!0,t){(0,be.assertBytes)(e,32),(0,be.assertBool)(a);const o=Ge.getPublicKey(e,a);return St(t,a?33:65,o)}Ee.publicKeyCreate=Oc;function Sc(e){(0,be.assertBytes)(e,33,65);try{return Ge.Point.fromHex(e),!0}catch{return!1}}Ee.publicKeyVerify=Sc;function Ic(e,a=!0,t){(0,be.assertBytes)(e,33,65),(0,be.assertBool)(a);const o=Ge.Point.fromHex(e).toRawBytes(a);return St(t,a?33:65,o)}Ee.publicKeyConvert=Ic;function Pc(e,a,t={noncefn:void 0,data:void 0},o){if((0,be.assertBytes)(e,32),(0,be.assertBytes)(a,32),typeof t!="object"||t===null)throw new TypeError("secp256k1.ecdsaSign: options should be object");if(t&&(t.noncefn!==void 0||t.data!==void 0))throw new Error("Secp256k1: noncefn && data is unsupported");const[s,u]=Ge.signSync(e,a,{recovered:!0,der:!1});return{signature:St(o,64,s),recid:u}}Ee.ecdsaSign=Pc;function Nc(e,a,t,o=!0,s){(0,be.assertBytes)(t,32),(0,be.assertBool)(o);const u=Vr(e).toHex(),p=Ge.Point.fromSignature(t,u,a);return St(s,o?33:65,p.toRawBytes(o))}Ee.ecdsaRecover=Nc;function Mc(e,a,t){(0,be.assertBytes)(e,64),(0,be.assertBytes)(a,32),(0,be.assertBytes)(t,33,65),(0,be.assertBytes)(e,64);const o=or(e.slice(0,32)),s=or(e.slice(32,64));if(o>=jt||s>=jt)throw new Error("Cannot parse signature");const u=Ge.Point.fromHex(t);let p;try{p=Vr(e)}catch{return!1}return Ge.verify(p,a,u)}Ee.ecdsaVerify=Mc;function Bc(e,a){(0,be.assertBytes)(e,32),(0,be.assertBytes)(a,32);let t=or(a);if(t===0n)throw new Error("Tweak must not be zero");if(t>=jt)throw new Error("Tweak bigger than curve order");if(t+=or(e),t>=jt&&(t-=jt),t===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return e.set((0,be.hexToBytes)(ii(t))),e}Ee.privateKeyTweakAdd=Bc;function jc(e){(0,be.assertBytes)(e,32);const a=ds(-or(e),jt);return e.set((0,be.hexToBytes)(ii(a))),e}Ee.privateKeyNegate=jc;function Rc(e,a=!0,t){(0,be.assertBytes)(e,33,65),(0,be.assertBool)(a);const o=Ge.Point.fromHex(e).negate();return St(t,a?33:65,o.toRawBytes(a))}Ee.publicKeyNegate=Rc;function Cc(e,a=!0,t){if(!Array.isArray(e)||!e.length)throw new TypeError(`Expected array with one or more items, not ${e}`);for(const s of e)(0,be.assertBytes)(s,33,65);(0,be.assertBool)(a);const o=e.map(s=>Ge.Point.fromHex(s)).reduce((s,u)=>s.add(u),Ge.Point.ZERO);if(o.equals(Ge.Point.ZERO))throw new Error("Combined result must not be zero");return St(t,a?33:65,o.toRawBytes(a))}Ee.publicKeyCombine=Cc;function Lc(e,a,t=!0,o){(0,be.assertBytes)(e,33,65),(0,be.assertBytes)(a,32),(0,be.assertBool)(t);const s=Ge.Point.fromHex(e),u=Ge.Point.fromPrivateKey(a),p=s.add(u);if(u.equals(Ge.Point.ZERO)||p.equals(Ge.Point.ZERO))throw new Error("Tweak must not be zero");return St(o,t?33:65,p.toRawBytes(t))}Ee.publicKeyTweakAdd=Lc;function Fc(e,a,t=!0,o){(0,be.assertBytes)(e,33,65),(0,be.assertBytes)(a,32),(0,be.assertBool)(t);const s=or(a);if(s===0n)throw new Error("Tweak must not be zero");if(s<=1||s>=jt)throw new Error("Tweak is zero or bigger than curve order");const u=Ge.Point.fromHex(e).multiply(s);return St(o,t?33:65,u.toRawBytes(t))}Ee.publicKeyTweakMul=Fc;function Dc(e,a){(0,be.assertBytes)(e,32),(0,be.assertBytes)(a,32);const t=or(a);if(t<=1||t>=jt)throw new Error("Tweak is zero or bigger than curve order");const o=ds(t*or(e),jt);if(o===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return e.set((0,be.hexToBytes)(ii(o))),e}Ee.privateKeyTweakMul=Dc;function kc(e,a){const t=Vr(e).toRawBytes();return St(a,72,Vr(e).toRawBytes()).slice(0,t.length)}Ee.signatureExport=kc;function Uc(e,a){(0,be.assertBytes)(e);const t=Ge.Signature.fromDER(e);return St(a,64,(0,be.hexToBytes)(t.toCompactHex()))}Ee.signatureImport=Uc;function Hc(e){const a=Vr(e);return a.s>jt/2n&&e.set(Ci(jt-a.s),32),e}Ee.signatureNormalize=Hc;function $c(e,a,t={},o){if((0,be.assertBytes)(e,33,65),(0,be.assertBytes)(a,32),typeof t!="object"||t===null)throw new TypeError("secp256k1.ecdh: options should be object");t.data!==void 0&&(0,be.assertBytes)(t.data);const s=Ge.Point.fromHex(Ge.getSharedSecret(a,e));if(t.hashfn===void 0)return St(o,32,(0,Ec.sha256)(s.toRawBytes(!0)));if(typeof t.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");t.xbuf!==void 0&&(0,be.assertBytes)(t.xbuf,32),t.ybuf!==void 0&&(0,be.assertBytes)(t.ybuf,32),(0,be.assertBytes)(o,32);const u=t.xbuf||new Uint8Array(32);u.set(Ci(s.x));const p=t.ybuf||new Uint8Array(32);p.set(Ci(s.y));const v=t.hashfn(u,p,t.data);if(!(v instanceof Uint8Array)||v.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return St(o,32,v)}Ee.ecdh=$c;function Vc(e){e!==null&&(0,be.assertBytes)(e,32)}Ee.contextRandomize=Vc;Object.defineProperty(ft,"__esModule",{value:!0});ft.createUnsafeIdentity=ft.computeAddress=ft.ethSign=ft.createEthereumMessageHash=ft.sign=ft.recoverAddressFromEthSignature=ft.recoverPublicKey=void 0;const Et=Gn,Ia=na,hs=Ee;function ys(e,a){if(e.length!==65)throw new Error("Invalid signature length"+e.length);const t=e.slice(0,e.length-1),o=e[64]===28?1:0;return(0,hs.ecdsaRecover)(t,o,a,!1).slice(1)}ft.recoverPublicKey=ys;function qc(e){if(e.length!==65)throw new Error("Invalid ethereum signature");const a=e[64];if(a===0||a===1){const t=new Uint8Array(e);return t[64]=a+27,t}return e}function ps(e,a){if(typeof e=="string"){if((0,Et.isHex)(e))return ps((0,Et.hexToBytes)(e),a);throw new Error("String signatures must be encoded in hex")}return oa(ys(qc(e),aa(a)))}ft.recoverAddressFromEthSignature=ps;function gs(e,a){const t=(0,hs.ecdsaSign)(a,e),o=t.recid===1?"1c":"1b";return(0,Et.toHex)(t.signature)+o}ft.sign=gs;function aa(e){const a=typeof e=="string"?(0,Et.stringToUtf8Bytes)(e):e,t=(0,Et.concatBytes)((0,Et.stringToUtf8Bytes)(`Ethereum Signed Message:
13
+ `),(0,Et.stringToUtf8Bytes)(String(a.length)),a);return(0,Et.hexToBytes)((0,Et.sha3)(t))}ft.createEthereumMessageHash=aa;function zc(e,a){return gs(e,aa(a))}ft.ethSign=zc;function oa(e){const a=e.length===65&&e[0]===4?e.slice(1):e;return(0,Et.getAddress)((0,Et.sha3)(a).substring(24))}ft.computeAddress=oa;function Gc(){const e=Ia.utils.randomPrivateKey(),a=(0,Ia.getPublicKey)(e).slice(1),t=oa(a);return{privateKey:(0,Et.bytesToHex)(e),publicKey:(0,Et.bytesToHex)(a),address:t}}ft.createUnsafeIdentity=Gc;(function(e){var a=L&&L.__createBinding||(Object.create?function(D,X,x,Re){Re===void 0&&(Re=x);var Te=Object.getOwnPropertyDescriptor(X,x);(!Te||("get"in Te?!X.__esModule:Te.writable||Te.configurable))&&(Te={enumerable:!0,get:function(){return X[x]}}),Object.defineProperty(D,Re,Te)}:function(D,X,x,Re){Re===void 0&&(Re=x),D[Re]=X[x]}),t=L&&L.__setModuleDefault||(Object.create?function(D,X){Object.defineProperty(D,"default",{enumerable:!0,value:X})}:function(D,X){D.default=X}),o=L&&L.__importStar||function(D){if(D&&D.__esModule)return D;var X={};if(D!=null)for(var x in D)x!=="default"&&Object.prototype.hasOwnProperty.call(D,x)&&a(X,D,x);return t(X,D),X},s=L&&L.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(e,"__esModule",{value:!0}),e.isValidEIP1271Signature=e.parseEmphemeralPayload=e.getSignedIdentitySignatureType=e.getEphemeralSignatureType=e.EIP_1654_SIGNED_ENTITY_VALIDATOR=e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=e.ECDSA_SIGNED_ENTITY_VALIDATOR=e.SIGNER_VALIDATOR=e.Authenticator=e.ERC1654_MAGIC_VALUE=e.VALID_SIGNATURE=void 0;const u=o(Gn),p=Wn,v=Qa,B=ti,j=s(ra),H=ft;e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const C=132;var k;(function(D){async function X(me,Ne,Ye,$=Date.now()){let Le="";if(!D.isValidAuthChain(Ne))return{ok:!1,message:"ERROR: Malformed authChain"};for(const tt of Ne){const Pt=qe(tt.type);try{const{nextAuthority:Nt}=await Pt(Le,tt,{provider:Ye,dateToValidateExpirationInMillis:$});Le=Nt||""}catch(Nt){return{ok:!1,message:`ERROR. Link type: ${tt.type}. ${Nt.message}.`}}}const gt=Le===me;return{ok:gt,message:gt?void 0:`ERROR: Invalid final authority. Expected: ${me}. Current ${Le}.`}}D.validateSignature=X;function x(me){for(const[Ne,Ye]of me.entries())if(Ne===0&&Ye.type!==v.AuthLinkType.SIGNER||Ye.type===v.AuthLinkType.SIGNER&&Ne!==0)return!1;return!0}D.isValidAuthChain=x;function Re(me){return(0,u.hexToBytes)((0,u.sha3)((0,u.stringToUtf8Bytes)(me)))}D.createEIP1271MessageHash=Re;function Te(me,Ne,Ye){return[{type:v.AuthLinkType.SIGNER,payload:Ne,signature:""},{type:U(Ye),payload:me,signature:Ye}]}D.createSimpleAuthChain=Te;function Ae(me,Ne,Ye,$){const Le=(0,B.moveMinutes)(Ye),gt=D.getEphemeralMessage(Ne.address,Le),tt=D.createSignature(me,gt),Pt=D.createSignature(Ne,$);return[{type:v.AuthLinkType.SIGNER,payload:me.address,signature:""},{type:v.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:gt,signature:tt},{type:v.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:$,signature:Pt}]}D.createAuthChain=Ae;async function ve(me,Ne,Ye,$){const Le=new Date;Le.setMinutes(Le.getMinutes()+Ye);const gt=D.getEphemeralMessage(Ne.address,Le),tt=await $(gt),Pt=[{type:v.AuthLinkType.SIGNER,payload:me,signature:""},{type:ie(tt),payload:gt,signature:tt}];return{ephemeralIdentity:Ne,expiration:Le,authChain:Pt}}D.initializeAuthChain=ve;function ne(me,Ne){const Ye=D.createSignature(me.ephemeralIdentity,Ne);return[...me.authChain,{type:v.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:Ne,signature:Ye}]}D.signPayload=ne,D.createEthereumMessageHash=H.createEthereumMessageHash;function de(me,Ne){return(0,H.ethSign)((0,u.hexToBytes)(me.privateKey),Ne)}D.createSignature=de;function Fe(me){return me.length>0&&me[0].type===v.AuthLinkType.SIGNER?me[0].payload:"Invalid-Owner-Address"}D.ownerAddress=Fe;function Xe(me,Ne){return`Decentraland Login
14
+ Ephemeral address: ${me}
15
+ Expiration: ${Ne.toISOString()}`}D.getEphemeralMessage=Xe})(k=e.Authenticator||(e.Authenticator={}));const ce=async(D,X)=>({nextAuthority:X.payload});e.SIGNER_VALIDATOR=ce;const we=async(D,X)=>{if(!X.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const x=(0,H.recoverAddressFromEthSignature)(X.signature,X.payload),Re=D.toLocaleLowerCase(),Te=x.toLocaleLowerCase();if(Re===Te)return{nextAuthority:X.payload};throw new Error(`Invalid signer address. Expected: ${Re}. Actual: ${Te}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=we;const Y=async(D,X,x)=>{if(!X.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:Re,ephemeralAddress:Te,expiration:Ae}=le(X.payload),ve=x.dateToValidateExpirationInMillis?x.dateToValidateExpirationInMillis:Date.now();if(Ae>ve){const ne=(0,H.recoverAddressFromEthSignature)(X.signature,Re),de=D.toLocaleLowerCase(),Fe=ne.toLocaleLowerCase();if(de===Fe)return{nextAuthority:Te};throw new Error(`Invalid signer address. Expected: ${de}. Actual: ${Fe}`)}throw new Error(`Ephemeral key expired. Expiration: ${Ae}. Test: ${ve}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=Y;const De=async(D,X,x)=>{if(!X.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:Re,ephemeralAddress:Te,expiration:Ae}=le(X.payload),ve=x?.dateToValidateExpirationInMillis?x?.dateToValidateExpirationInMillis:Date.now();if(Ae>ve&&await ye(x.provider,D,Re,X.signature,ve))return{nextAuthority:Te};throw new Error(`Ephemeral key expired. Expiration: ${Ae}. Test: ${ve}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=De;const Ve=async(D,X,x)=>{if(!X.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await ye(x.provider,D,X.payload,X.signature,x.dateToValidateExpirationInMillis))return{nextAuthority:X.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=Ve;const Qe=async(D,X)=>({error:"Error Validator."});function ie(D){return D.length===C?v.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:v.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}e.getEphemeralSignatureType=ie;function U(D){return D.length===C?v.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:v.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}e.getSignedIdentitySignatureType=U;function le(D){const X=D.replace(/\r/g,""),x=X.split(`
16
+ `),Re=x[1].substring(19),Te=x[2].substring(12),Ae=Date.parse(Te);return{message:X,ephemeralAddress:Re,expiration:Ae}}e.parseEmphemeralPayload=le;async function Z(D,X,x,Re){const Te=k.createEIP1271MessageHash(X),Ae=(0,u.hexToBytes)(x);let ve;try{ve=(0,u.bytesToHex)(await D.isValidSignature(Te,Ae,Re))}catch{}if(ve===e.ERC1654_MAGIC_VALUE)return!0;const ne=(0,H.createEthereumMessageHash)(X);try{ve=(0,u.bytesToHex)(await D.isValidSignature(ne,Ae,Re))}catch{}return ve===e.ERC1654_MAGIC_VALUE}e.isValidEIP1271Signature=Z;async function ye(D,X,x,Re,Te){if(!D)throw new Error("Missing provider");const Ae=new u.default(D),ve=await(0,p.SignatureValidator)(Ae,X);let ne=await Z(ve,x,Re);if(ne)return!0;const de=new j.default(Ae);try{const{block:Fe}=await de.getDate(Te,!1);if(ne=await Z(ve,x,Re,Fe),ne)return!0}catch(Fe){throw new Error(`Invalid validation. Error: ${Fe.message}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${ne}`)}function qe(D){switch(D){case v.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case v.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case v.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case v.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case v.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return Qe}}})(Ja);var Gr={},Hr=function(e){return e&&e.Math===Math&&e},Ct=Hr(typeof globalThis=="object"&&globalThis)||Hr(typeof window=="object"&&window)||Hr(typeof self=="object"&&self)||Hr(typeof L=="object"&&L)||Hr(typeof L=="object"&&L)||function(){return this}()||Function("return this")(),yr=function(e){try{return!!e()}catch{return!0}},Wc=yr,ai=!Wc(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Kc=ai,ms=Function.prototype,Pa=ms.apply,Na=ms.call,Yc=typeof Reflect=="object"&&Reflect.apply||(Kc?Na.bind(Pa):function(){return Na.apply(Pa,arguments)}),bs=ai,vs=Function.prototype,Li=vs.call,Zc=bs&&vs.bind.bind(Li,Li),Nr=bs?Zc:function(e){return function(){return Li.apply(e,arguments)}},_s=Nr,Xc=_s({}.toString),Jc=_s("".slice),Es=function(e){return Jc(Xc(e),8,-1)},Qc=Es,xc=Nr,ws=function(e){if(Qc(e)==="Function")return xc(e)},mi=typeof document=="object"&&document.all,pr=typeof mi>"u"&&mi!==void 0?function(e){return typeof e=="function"||e===mi}:function(e){return typeof e=="function"},As={},eu=yr,Wr=!eu(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),tu=ai,Dn=Function.prototype.call,sa=tu?Dn.bind(Dn):function(){return Dn.apply(Dn,arguments)},Ts={},Os={}.propertyIsEnumerable,Ss=Object.getOwnPropertyDescriptor,ru=Ss&&!Os.call({1:2},1);Ts.f=ru?function(a){var t=Ss(this,a);return!!t&&t.enumerable}:Os;var Is=function(e,a){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:a}},nu=Nr,iu=yr,au=Es,bi=Object,ou=nu("".split),su=iu(function(){return!bi("z").propertyIsEnumerable(0)})?function(e){return au(e)==="String"?ou(e,""):bi(e)}:bi,Ps=function(e){return e==null},cu=Ps,uu=TypeError,Ns=function(e){if(cu(e))throw new uu("Can't call method on "+e);return e},lu=su,du=Ns,fu=function(e){return lu(du(e))},hu=pr,oi=function(e){return typeof e=="object"?e!==null:hu(e)},Ms={},vi=Ms,_i=Ct,yu=pr,Ma=function(e){return yu(e)?e:void 0},pu=function(e,a){return arguments.length<2?Ma(vi[e])||Ma(_i[e]):vi[e]&&vi[e][a]||_i[e]&&_i[e][a]},gu=Nr,mu=gu({}.isPrototypeOf),bu=Ct,Ba=bu.navigator,ja=Ba&&Ba.userAgent,vu=ja?String(ja):"",Bs=Ct,Ei=vu,Ra=Bs.process,Ca=Bs.Deno,La=Ra&&Ra.versions||Ca&&Ca.version,Fa=La&&La.v8,Bt,$n;Fa&&(Bt=Fa.split("."),$n=Bt[0]>0&&Bt[0]<4?1:+(Bt[0]+Bt[1]));!$n&&Ei&&(Bt=Ei.match(/Edge\/(\d+)/),(!Bt||Bt[1]>=74)&&(Bt=Ei.match(/Chrome\/(\d+)/),Bt&&($n=+Bt[1])));var _u=$n,Da=_u,Eu=yr,wu=Ct,Au=wu.String,js=!!Object.getOwnPropertySymbols&&!Eu(function(){var e=Symbol("symbol detection");return!Au(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Da&&Da<41}),Tu=js,Rs=Tu&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ou=pu,Su=pr,Iu=mu,Pu=Rs,Nu=Object,Cs=Pu?function(e){return typeof e=="symbol"}:function(e){var a=Ou("Symbol");return Su(a)&&Iu(a.prototype,Nu(e))},Mu=String,Bu=function(e){try{return Mu(e)}catch{return"Object"}},ju=pr,Ru=Bu,Cu=TypeError,Ls=function(e){if(ju(e))return e;throw new Cu(Ru(e)+" is not a function")},Lu=Ls,Fu=Ps,Du=function(e,a){var t=e[a];return Fu(t)?void 0:Lu(t)},wi=sa,Ai=pr,Ti=oi,ku=TypeError,Uu=function(e,a){var t,o;if(a==="string"&&Ai(t=e.toString)&&!Ti(o=wi(t,e))||Ai(t=e.valueOf)&&!Ti(o=wi(t,e))||a!=="string"&&Ai(t=e.toString)&&!Ti(o=wi(t,e)))return o;throw new ku("Can't convert object to primitive value")},Fs={exports:{}},ka=Ct,Hu=Object.defineProperty,$u=function(e,a){try{Hu(ka,e,{value:a,configurable:!0,writable:!0})}catch{ka[e]=a}return a},Vu=Ct,qu=$u,Ua="__core-js_shared__",Ha=Fs.exports=Vu[Ua]||qu(Ua,{});(Ha.versions||(Ha.versions=[])).push({version:"3.49.0",mode:"pure",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"});var zu=Fs.exports,$a=zu,Gu=function(e,a){return $a[e]||($a[e]=a||{})},Wu=Ns,Ku=Object,Yu=function(e){return Ku(Wu(e))},Zu=Nr,Xu=Yu,Ju=Zu({}.hasOwnProperty),ca=Object.hasOwn||function(a,t){return Ju(Xu(a),t)},Qu=Nr,xu=0,el=Math.random(),tl=Qu(1.1.toString),rl=function(e){return"Symbol("+(e===void 0?"":e)+")_"+tl(++xu+el,36)},nl=Ct,il=Gu,Va=ca,al=rl,ol=js,sl=Rs,Sr=nl.Symbol,Oi=il("wks"),cl=sl?Sr.for||Sr:Sr&&Sr.withoutSetter||al,ul=function(e){return Va(Oi,e)||(Oi[e]=ol&&Va(Sr,e)?Sr[e]:cl("Symbol."+e)),Oi[e]},ll=sa,qa=oi,za=Cs,dl=Du,fl=Uu,hl=ul,yl=TypeError,pl=hl("toPrimitive"),gl=function(e,a){if(!qa(e)||za(e))return e;var t=dl(e,pl),o;if(t){if(a===void 0&&(a="default"),o=ll(t,e,a),!qa(o)||za(o))return o;throw new yl("Can't convert object to primitive value")}return a===void 0&&(a="number"),fl(e,a)},ml=gl,bl=Cs,Ds=function(e){var a=ml(e,"string");return bl(a)?a:a+""},vl=Ct,Ga=oi,Fi=vl.document,_l=Ga(Fi)&&Ga(Fi.createElement),El=function(e){return _l?Fi.createElement(e):{}},wl=Wr,Al=yr,Tl=El,ks=!wl&&!Al(function(){return Object.defineProperty(Tl("div"),"a",{get:function(){return 7}}).a!==7}),Ol=Wr,Sl=sa,Il=Ts,Pl=Is,Nl=fu,Ml=Ds,Bl=ca,jl=ks,Wa=Object.getOwnPropertyDescriptor;As.f=Ol?Wa:function(a,t){if(a=Nl(a),t=Ml(t),jl)try{return Wa(a,t)}catch{}if(Bl(a,t))return Pl(!Sl(Il.f,a,t),a[t])};var Rl=yr,Cl=pr,Ll=/#|\.prototype\./,Kr=function(e,a){var t=Dl[Fl(e)];return t===Ul?!0:t===kl?!1:Cl(a)?Rl(a):!!a},Fl=Kr.normalize=function(e){return String(e).replace(Ll,".").toLowerCase()},Dl=Kr.data={},kl=Kr.NATIVE="N",Ul=Kr.POLYFILL="P",Hl=Kr,Ka=ws,$l=Ls,Vl=ai,ql=Ka(Ka.bind),zl=function(e,a){return $l(e),a===void 0?e:Vl?ql(e,a):function(){return e.apply(a,arguments)}},Us={},Gl=Wr,Wl=yr,Kl=Gl&&Wl(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Yl=oi,Zl=String,Xl=TypeError,Jl=function(e){if(Yl(e))return e;throw new Xl(Zl(e)+" is not an object")},Ql=Wr,xl=ks,ed=Kl,kn=Jl,Ya=Ds,td=TypeError,Si=Object.defineProperty,rd=Object.getOwnPropertyDescriptor,Ii="enumerable",Pi="configurable",Ni="writable";Us.f=Ql?ed?function(a,t,o){if(kn(a),t=Ya(t),kn(o),typeof a=="function"&&t==="prototype"&&"value"in o&&Ni in o&&!o[Ni]){var s=rd(a,t);s&&s[Ni]&&(a[t]=o.value,o={configurable:Pi in o?o[Pi]:s[Pi],enumerable:Ii in o?o[Ii]:s[Ii],writable:!1})}return Si(a,t,o)}:Si:function(a,t,o){if(kn(a),t=Ya(t),kn(o),xl)try{return Si(a,t,o)}catch{}if("get"in o||"set"in o)throw new td("Accessors not supported");return"value"in o&&(a[t]=o.value),a};var nd=Wr,id=Us,ad=Is,od=nd?function(e,a,t){return id.f(e,a,ad(1,t))}:function(e,a,t){return e[a]=t,e},$r=Ct,sd=Yc,cd=ws,ud=pr,ld=As.f,dd=Hl,Tr=Ms,fd=zl,Or=od,Za=ca,hd=function(e){var a=function(t,o,s){if(this instanceof a){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,o)}return new e(t,o,s)}return sd(e,this,arguments)};return a.prototype=e.prototype,a},yd=function(e,a){var t=e.target,o=e.global,s=e.stat,u=e.proto,p=o?$r:s?$r[t]:$r[t]&&$r[t].prototype,v=o?Tr:Tr[t]||Or(Tr,t,{})[t],B=v.prototype,j,H,C,k,ce,we,Y,De,Ve;for(k in a)j=dd(o?k:t+(s?".":"#")+k,e.forced),H=!j&&p&&Za(p,k),we=v[k],H&&(e.dontCallGetSet?(Ve=ld(p,k),Y=Ve&&Ve.value):Y=p[k]),ce=H&&Y?Y:a[k],!(!j&&!u&&typeof we==typeof ce)&&(e.bind&&H?De=fd(ce,$r):e.wrap&&H?De=hd(ce):u&&ud(ce)?De=cd(ce):De=ce,(e.sham||ce&&ce.sham||we&&we.sham)&&Or(De,"sham",!0),Or(v,k,De),u&&(C=t+"Prototype",Za(Tr,C)||Or(Tr,C,{}),Or(Tr[C],k,ce),e.real&&B&&(j||!B[k])&&Or(B,k,ce)))},pd=yd,Mi=Ct;pd({global:!0,forced:Mi.globalThis!==Mi},{globalThis:Mi});var gd=Ct,md=gd,bd=md,vd=L&&L.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.getImplementation=void 0;var _d=vd(bd);function Ed(e,a){var t,o=(t=e[a])!==null&&t!==void 0?t:_d.default[a];if(!o)throw new ReferenceError('"'+a+'" is not defined');return o}Gr.getImplementation=Ed;var wd=L&&L.__values||function(e){var a=typeof Symbol=="function"&&Symbol.iterator,t=a&&e[a],o=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(zn,"__esModule",{value:!0});var Ad=Ja,Td=Gr,Od="x-identity-auth-chain-",Sd="x-identity-timestamp",Id="x-identity-metadata";function Pd(e){e===void 0&&(e={});var a=(0,Td.getImplementation)(e,"Headers");return function(o,s,u,p,v){var B,j,H=new a(v),C=String(Date.now()),k=JSON.stringify(p),ce=[s,u,C,k].join(":").toLowerCase(),we=0,Y=Ad.Authenticator.signPayload(o,ce);try{for(var De=wd(Y),Ve=De.next();!Ve.done;Ve=De.next()){var Qe=Ve.value;H.set(Od+we,JSON.stringify(Qe)),we++}}catch(ie){B={error:ie}}finally{try{Ve&&!Ve.done&&(j=De.return)&&j.call(De)}finally{if(B)throw B.error}}return H.set(Sd,C),H.set(Id,k),H}}zn.default=Pd;var Vn=L&&L.__assign||function(){return Vn=Object.assign||function(e){for(var a,t=1,o=arguments.length;t<o;t++){a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},Vn.apply(this,arguments)},Nd=L&&L.__rest||function(e,a){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&a.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,o=Object.getOwnPropertySymbols(e);s<o.length;s++)a.indexOf(o[s])<0&&Object.prototype.propertyIsEnumerable.call(e,o[s])&&(t[o[s]]=e[o[s]]);return t},Md=L&&L.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qn,"__esModule",{value:!0});var Bd=Md(zn),Bi=Gr;function jd(e){e===void 0&&(e={});var a=(0,Bd.default)(e),t=(0,Bi.getImplementation)(e,"URL"),o=(0,Bi.getImplementation)(e,"Request"),s=(0,Bi.getImplementation)(e,"fetch");return function(p,v){if(v&&v.identity){var B=v.identity,j=v.metadata,H=Nd(v,["identity","metadata"]);if(typeof p=="string"||p instanceof t||globalThis.URL&&p instanceof globalThis.URL){var C=typeof p=="string"?new t(p):p,k=new o(C.toString(),Vn(Vn({},H),{headers:a(B,v.method||"GET",C.pathname,j||{},H?.headers)}));return s(k)}var ce=new t(p.url),we=new o(p),Y=a(B,p.method||"GET",ce.pathname,j||{});return Y.forEach(function(De,Ve){we.headers.set(Ve,De)}),s(we)}return s(p,v)}}qn.default=jd;(function(e){var a=L&&L.__createBinding||(Object.create?function(p,v,B,j){j===void 0&&(j=B),Object.defineProperty(p,j,{enumerable:!0,get:function(){return v[B]}})}:function(p,v,B,j){j===void 0&&(j=B),p[j]=v[B]}),t=L&&L.__exportStar||function(p,v){for(var B in p)B!=="default"&&!Object.prototype.hasOwnProperty.call(v,B)&&a(v,p,B)},o=L&&L.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,t(Di,e);var s=qn;Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return o(s).default}});var u=zn;Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return o(u).default}})})(Xa);(function(e){var a=L&&L.__createBinding||(Object.create?function(u,p,v,B){B===void 0&&(B=v),Object.defineProperty(u,B,{enumerable:!0,get:function(){return p[v]}})}:function(u,p,v,B){B===void 0&&(B=v),u[B]=p[v]}),t=L&&L.__exportStar||function(u,p){for(var v in u)v!=="default"&&!Object.prototype.hasOwnProperty.call(p,v)&&a(p,u,v)},o=L&&L.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),t(Di,e),t(Xa,e);var s=o(qn);e.default=(0,s.default)()})(Ys);export{Ys as l};