@multiversx/sdk-dapp 2.6.1 → 2.6.3

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 (199) hide show
  1. package/UI/DappModal/hooks/index.js +1 -1
  2. package/UI/DappModal/hooks/useDappModal.js +1 -1
  3. package/UI/DappModal/index.js +1 -1
  4. package/UI/ModalContainer/ModalContainer.js +1 -1
  5. package/UI/ModalContainer/index.js +1 -1
  6. package/UI/NotificationModal/index.js +1 -1
  7. package/UI/SignTransactionsModals/SignTransactionsModals.js +1 -1
  8. package/UI/SignTransactionsModals/SignWithDeviceModal/SignStep.js +1 -1
  9. package/UI/SignTransactionsModals/SignWithDeviceModal/index.js +1 -1
  10. package/UI/SignTransactionsModals/SignWithExtensionModal/index.js +1 -1
  11. package/UI/SignTransactionsModals/SignWithLedgerModal/index.js +1 -1
  12. package/UI/SignTransactionsModals/SignWithOperaModal/index.js +1 -1
  13. package/UI/SignTransactionsModals/SignWithWalletConnectModal/index.js +1 -1
  14. package/UI/SignTransactionsModals/components/ConfirmationScreen.js +1 -1
  15. package/UI/SignTransactionsModals/components/DeviceConfirmationScreen.js +1 -1
  16. package/UI/SignTransactionsModals/components/index.js +1 -1
  17. package/UI/SignTransactionsModals/index.js +1 -1
  18. package/UI/TokenDetails/index.js +1 -1
  19. package/UI/TransactionInfo/TransactionInfo.js +1 -1
  20. package/UI/TransactionInfo/components/NonceMessage/NonceMessage.js +1 -1
  21. package/UI/TransactionInfo/components/NonceMessage/index.js +1 -1
  22. package/UI/TransactionInfo/components/index.js +1 -1
  23. package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/TransactionInfoNonce.js +1 -1
  24. package/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/index.js +1 -1
  25. package/UI/TransactionInfo/components/transactionInfoFields/index.js +1 -1
  26. package/UI/TransactionInfo/index.js +1 -1
  27. package/UI/TransactionsTable/TransactionsTable.js +1 -1
  28. package/UI/TransactionsTable/index.js +1 -1
  29. package/UI/TransactionsToastList/TransactionsToastList.js +1 -1
  30. package/UI/TransactionsToastList/components/TransactionToast/TransactionToast.js +1 -1
  31. package/UI/TransactionsToastList/components/TransactionToast/hooks/useTransactionToast.js +1 -1
  32. package/UI/TransactionsToastList/components/TransactionToast/index.js +1 -1
  33. package/UI/TransactionsToastList/components/TransactionToastGuard.js +1 -1
  34. package/UI/TransactionsToastList/components/index.js +1 -1
  35. package/UI/TransactionsToastList/index.js +1 -1
  36. package/UI/extension/ExtensionLoginButton/index.js +1 -1
  37. package/UI/index.js +1 -1
  38. package/UI/ledger/LedgerLoginButton/index.js +1 -1
  39. package/UI/ledger/LedgerLoginContainer/ConfirmAddress.js +1 -1
  40. package/UI/ledger/LedgerLoginContainer/index.js +1 -1
  41. package/UI/ledger/index.js +1 -1
  42. package/UI/operaWallet/OperaWalletLoginButton/index.js +1 -1
  43. package/UI/pages/UnlockPage/index.js +1 -1
  44. package/UI/pages/index.js +1 -1
  45. package/UI/walletConnect/WalletConnectLoginButton/index.js +1 -1
  46. package/UI/walletConnect/WalletConnectLoginContainer/index.js +1 -1
  47. package/UI/walletConnect/index.js +1 -1
  48. package/UI/webWallet/WebWalletLoginButton/index.js +1 -1
  49. package/__chunks__/{chunk-6KRG4LM3.js → chunk-32E6BHE7.js} +2 -2
  50. package/__chunks__/{chunk-ONXXXCCF.js → chunk-3SKYCSWV.js} +2 -2
  51. package/__chunks__/chunk-3SRVL7NW.js +2 -0
  52. package/__chunks__/chunk-5JEI5B7T.js +2 -0
  53. package/__chunks__/chunk-5RGNESSR.js +2 -0
  54. package/__chunks__/chunk-5WVY343F.js +2 -0
  55. package/__chunks__/{chunk-UHLFOFON.js → chunk-626QJNRP.js} +2 -2
  56. package/__chunks__/{chunk-WP4VSJLM.js → chunk-7XM2INU5.js} +2 -2
  57. package/__chunks__/{chunk-FWDSY2GW.js → chunk-BH62KDKX.js} +2 -2
  58. package/__chunks__/{chunk-DKCOAZU7.js → chunk-BIJQ4KPR.js} +2 -2
  59. package/__chunks__/{chunk-M6XJNYK2.js → chunk-BVLG73TU.js} +2 -2
  60. package/__chunks__/{chunk-453MDZQF.js → chunk-CUOTDMV5.js} +2 -2
  61. package/__chunks__/{chunk-Z7WX5JMQ.js → chunk-DCGZA3FL.js} +2 -2
  62. package/__chunks__/{chunk-FTKQZDLX.js → chunk-FZX45LTX.js} +2 -2
  63. package/__chunks__/{chunk-EOQ4GBQT.js → chunk-HARAYXLU.js} +2 -2
  64. package/__chunks__/{chunk-KI2QJGAZ.js → chunk-HN6A4EU5.js} +2 -2
  65. package/__chunks__/{chunk-QHPKVIYS.js → chunk-HQ3NIAYD.js} +2 -2
  66. package/__chunks__/{chunk-LR2EWIF5.js → chunk-KIRNHCVW.js} +2 -2
  67. package/__chunks__/{chunk-M5A6L4R7.js → chunk-KZDQY4JZ.js} +2 -2
  68. package/__chunks__/{chunk-UZBMRAWK.js → chunk-LEIZK3SB.js} +2 -2
  69. package/__chunks__/{chunk-YYIAF5XK.js → chunk-PR2H2LZF.js} +2 -2
  70. package/__chunks__/chunk-QE4AERN4.js +2 -0
  71. package/__chunks__/{chunk-NVREM3LI.js → chunk-TGBCGOC7.js} +2 -2
  72. package/__chunks__/{chunk-ZXXRMWLI.js → chunk-UYR62LTI.js} +2 -2
  73. package/__chunks__/{chunk-5TOXE3UO.js → chunk-XYOGQJMR.js} +2 -2
  74. package/__chunks__/{chunk-R7TIYVAO.js → chunk-YI2C5YZP.js} +2 -2
  75. package/__commonjs/UI/DappModal/hooks/index.js +1 -1
  76. package/__commonjs/UI/DappModal/hooks/useDappModal.js +1 -1
  77. package/__commonjs/UI/DappModal/index.js +3 -3
  78. package/__commonjs/UI/ModalContainer/ModalContainer.js +1 -1
  79. package/__commonjs/UI/ModalContainer/index.js +1 -1
  80. package/__commonjs/UI/NotificationModal/index.js +1 -1
  81. package/__commonjs/UI/SignTransactionsModals/SignTransactionsModals.js +23 -23
  82. package/__commonjs/UI/SignTransactionsModals/SignWithDeviceModal/SignStep.js +6 -6
  83. package/__commonjs/UI/SignTransactionsModals/SignWithDeviceModal/index.js +8 -8
  84. package/__commonjs/UI/SignTransactionsModals/SignWithExtensionModal/index.js +1 -1
  85. package/__commonjs/UI/SignTransactionsModals/SignWithLedgerModal/index.js +8 -8
  86. package/__commonjs/UI/SignTransactionsModals/SignWithOperaModal/index.js +1 -1
  87. package/__commonjs/UI/SignTransactionsModals/SignWithWalletConnectModal/index.js +1 -1
  88. package/__commonjs/UI/SignTransactionsModals/components/ConfirmationScreen.js +1 -1
  89. package/__commonjs/UI/SignTransactionsModals/components/DeviceConfirmationScreen.js +1 -1
  90. package/__commonjs/UI/SignTransactionsModals/components/index.js +1 -1
  91. package/__commonjs/UI/SignTransactionsModals/index.js +23 -23
  92. package/__commonjs/UI/TokenDetails/index.js +4 -4
  93. package/__commonjs/UI/TransactionInfo/TransactionInfo.js +1 -1
  94. package/__commonjs/UI/TransactionInfo/components/NonceMessage/NonceMessage.js +1 -1
  95. package/__commonjs/UI/TransactionInfo/components/NonceMessage/index.js +1 -1
  96. package/__commonjs/UI/TransactionInfo/components/index.js +1 -1
  97. package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/TransactionInfoNonce.js +2 -2
  98. package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/TransactionInfoNonce/index.js +2 -2
  99. package/__commonjs/UI/TransactionInfo/components/transactionInfoFields/index.js +1 -1
  100. package/__commonjs/UI/TransactionInfo/index.js +1 -1
  101. package/__commonjs/UI/TransactionsTable/TransactionsTable.js +1 -1
  102. package/__commonjs/UI/TransactionsTable/index.js +1 -1
  103. package/__commonjs/UI/TransactionsToastList/TransactionsToastList.js +1 -1
  104. package/__commonjs/UI/TransactionsToastList/components/TransactionToast/TransactionToast.js +1 -1
  105. package/__commonjs/UI/TransactionsToastList/components/TransactionToast/hooks/useTransactionToast.js +1 -1
  106. package/__commonjs/UI/TransactionsToastList/components/TransactionToast/index.js +1 -1
  107. package/__commonjs/UI/TransactionsToastList/components/TransactionToastGuard.js +8 -8
  108. package/__commonjs/UI/TransactionsToastList/components/index.js +1 -1
  109. package/__commonjs/UI/TransactionsToastList/index.js +1 -1
  110. package/__commonjs/UI/extension/ExtensionLoginButton/index.js +4 -4
  111. package/__commonjs/UI/index.js +69 -69
  112. package/__commonjs/UI/ledger/LedgerLoginButton/index.js +14 -14
  113. package/__commonjs/UI/ledger/LedgerLoginContainer/ConfirmAddress.js +1 -1
  114. package/__commonjs/UI/ledger/LedgerLoginContainer/index.js +13 -13
  115. package/__commonjs/UI/ledger/index.js +14 -14
  116. package/__commonjs/UI/operaWallet/OperaWalletLoginButton/index.js +3 -3
  117. package/__commonjs/UI/pages/UnlockPage/index.js +17 -17
  118. package/__commonjs/UI/pages/index.js +17 -17
  119. package/__commonjs/UI/walletConnect/WalletConnectLoginButton/index.js +6 -6
  120. package/__commonjs/UI/walletConnect/WalletConnectLoginContainer/index.js +5 -5
  121. package/__commonjs/UI/walletConnect/index.js +6 -6
  122. package/__commonjs/UI/webWallet/WebWalletLoginButton/index.js +3 -3
  123. package/__commonjs/__mocks__/index.js +1 -1
  124. package/__commonjs/__mocks__/utils/index.js +1 -1
  125. package/__commonjs/__mocks__/utils/renderWithProvider.js +1 -1
  126. package/__commonjs/components/LogoutListener/LogoutListener.js +1 -1
  127. package/__commonjs/components/LogoutListener/helpers/index.js +1 -1
  128. package/__commonjs/components/LogoutListener/helpers/useLogoutFromMultipleTabs.js +1 -1
  129. package/__commonjs/components/LogoutListener/helpers/useNativeAuthLogout.js +1 -1
  130. package/__commonjs/components/LogoutListener/helpers/useNativeAuthLogoutWarning/index.js +1 -1
  131. package/__commonjs/components/LogoutListener/helpers/useNativeAuthLogoutWarning/useNativeAuthLogoutWarning.js +1 -1
  132. package/__commonjs/components/LogoutListener/index.js +1 -1
  133. package/__commonjs/components/ProviderInitializer.js +1 -1
  134. package/__commonjs/components/TransactionsTracker/TransactionTracker.js +1 -1
  135. package/__commonjs/components/TransactionsTracker/index.js +1 -1
  136. package/__commonjs/components/TransactionsTracker/useTransactionsTracker.js +1 -1
  137. package/__commonjs/hooks/index.js +1 -1
  138. package/__commonjs/hooks/login/index.js +1 -1
  139. package/__commonjs/hooks/login/useExtensionLogin.js +1 -1
  140. package/__commonjs/hooks/login/useLedgerLogin.js +1 -1
  141. package/__commonjs/hooks/login/useLoginService.js +1 -1
  142. package/__commonjs/hooks/login/useOperaLogin.js +1 -1
  143. package/__commonjs/hooks/login/useWalletConnectLogin.js +1 -1
  144. package/__commonjs/hooks/login/useWalletConnectV2Login.js +1 -1
  145. package/__commonjs/hooks/login/useWebWalletLogin.js +1 -1
  146. package/__commonjs/hooks/transactions/index.js +1 -1
  147. package/__commonjs/hooks/transactions/useTrackTransactionStatus.js +1 -1
  148. package/__commonjs/services/index.js +1 -1
  149. package/__commonjs/services/nativeAuth/helpers/getLatestBlockHash.js +1 -1
  150. package/__commonjs/services/nativeAuth/helpers/index.js +1 -1
  151. package/__commonjs/services/nativeAuth/index.js +1 -1
  152. package/__commonjs/services/nativeAuth/methods/getToken.js +1 -1
  153. package/__commonjs/services/nativeAuth/methods/index.js +1 -1
  154. package/__commonjs/services/nativeAuth/nativeAuth.js +1 -1
  155. package/__commonjs/wrappers/DappProvider/CustomComponents.js +1 -1
  156. package/__commonjs/wrappers/DappProvider/index.js +1 -1
  157. package/__commonjs/wrappers/index.js +1 -1
  158. package/__mocks__/index.js +1 -1
  159. package/__mocks__/utils/index.js +1 -1
  160. package/__mocks__/utils/renderWithProvider.js +1 -1
  161. package/components/LogoutListener/LogoutListener.js +1 -1
  162. package/components/LogoutListener/helpers/index.js +1 -1
  163. package/components/LogoutListener/helpers/useLogoutFromMultipleTabs.js +1 -1
  164. package/components/LogoutListener/helpers/useNativeAuthLogout.js +1 -1
  165. package/components/LogoutListener/helpers/useNativeAuthLogoutWarning/index.js +1 -1
  166. package/components/LogoutListener/helpers/useNativeAuthLogoutWarning/useNativeAuthLogoutWarning.js +1 -1
  167. package/components/LogoutListener/index.js +1 -1
  168. package/components/ProviderInitializer.js +1 -1
  169. package/components/TransactionsTracker/TransactionTracker.js +1 -1
  170. package/components/TransactionsTracker/index.js +1 -1
  171. package/components/TransactionsTracker/useTransactionsTracker.js +1 -1
  172. package/hooks/index.js +1 -1
  173. package/hooks/login/index.js +1 -1
  174. package/hooks/login/useExtensionLogin.js +1 -1
  175. package/hooks/login/useLedgerLogin.js +1 -1
  176. package/hooks/login/useLoginService.js +1 -1
  177. package/hooks/login/useOperaLogin.js +1 -1
  178. package/hooks/login/useWalletConnectLogin.js +1 -1
  179. package/hooks/login/useWalletConnectV2Login.js +1 -1
  180. package/hooks/login/useWebWalletLogin.js +1 -1
  181. package/hooks/transactions/index.js +1 -1
  182. package/hooks/transactions/useTrackTransactionStatus.js +1 -1
  183. package/package.json +1 -1
  184. package/services/index.js +1 -1
  185. package/services/nativeAuth/helpers/getLatestBlockHash.d.ts +4 -2
  186. package/services/nativeAuth/helpers/getLatestBlockHash.js +1 -1
  187. package/services/nativeAuth/helpers/index.js +1 -1
  188. package/services/nativeAuth/index.js +1 -1
  189. package/services/nativeAuth/methods/getToken.js +1 -1
  190. package/services/nativeAuth/methods/index.js +1 -1
  191. package/services/nativeAuth/nativeAuth.js +1 -1
  192. package/wrappers/DappProvider/CustomComponents.js +1 -1
  193. package/wrappers/DappProvider/index.js +1 -1
  194. package/wrappers/index.js +1 -1
  195. package/__chunks__/chunk-AOKD6R54.js +0 -2
  196. package/__chunks__/chunk-QFSWBLGO.js +0 -2
  197. package/__chunks__/chunk-RBBOONZU.js +0 -2
  198. package/__chunks__/chunk-TLT7GLC4.js +0 -2
  199. package/__chunks__/chunk-XZ2PVEHF.js +0 -2
@@ -1,4 +1,4 @@
1
- "use strict";var _r=Object.create;var P=Object.defineProperty;var Dr=Object.getOwnPropertyDescriptor;var kr=Object.getOwnPropertyNames;var Lr=Object.getPrototypeOf,Rr=Object.prototype.hasOwnProperty;var Or=(e,r)=>()=>(e&&(r=e(e=0)),r);var W=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),br=(e,r)=>{for(var t in r)P(e,t,{get:r[t],enumerable:!0})},ir=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of kr(r))!Rr.call(e,i)&&i!==t&&P(e,i,{get:()=>r[i],enumerable:!(n=Dr(r,i))||n.enumerable});return e};var q=(e,r,t)=>(t=e!=null?_r(Lr(e)):{},ir(r||!e||!e.__esModule?P(t,"default",{value:e,enumerable:!0}):t,e)),Mr=e=>ir(P({},"__esModule",{value:!0}),e);var ar=W(G=>{"use strict";s();G.byteLength=Wr;G.toByteArray=Hr;G.fromByteArray=qr;var F=[],A=[],Pr=typeof Uint8Array!="undefined"?Uint8Array:Array,V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(C=0,or=V.length;C<or;++C)F[C]=V[C],A[V.charCodeAt(C)]=C;var C,or;A["-".charCodeAt(0)]=62;A["_".charCodeAt(0)]=63;function ur(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function Wr(e){var r=ur(e),t=r[0],n=r[1];return(t+n)*3/4-n}function Gr(e,r,t){return(r+t)*3/4-t}function Hr(e){var r,t=ur(e),n=t[0],i=t[1],o=new Pr(Gr(e,n,i)),u=0,p=i>0?n-4:n,h;for(h=0;h<p;h+=4)r=A[e.charCodeAt(h)]<<18|A[e.charCodeAt(h+1)]<<12|A[e.charCodeAt(h+2)]<<6|A[e.charCodeAt(h+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return i===2&&(r=A[e.charCodeAt(h)]<<2|A[e.charCodeAt(h+1)]>>4,o[u++]=r&255),i===1&&(r=A[e.charCodeAt(h)]<<10|A[e.charCodeAt(h+1)]<<4|A[e.charCodeAt(h+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function Kr(e){return F[e>>18&63]+F[e>>12&63]+F[e>>6&63]+F[e&63]}function Yr(e,r,t){for(var n,i=[],o=r;o<t;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(Kr(n));return i.join("")}function qr(e){for(var r,t=e.length,n=t%3,i=[],o=16383,u=0,p=t-n;u<p;u+=o)i.push(Yr(e,u,u+o>p?p:u+o));return n===1?(r=e[t-1],i.push(F[r>>2]+F[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(F[r>>10]+F[r>>4&63]+F[r<<2&63]+"=")),i.join("")}});var pr=W($=>{s();$.read=function(e,r,t,n,i){var o,u,p=i*8-n-1,h=(1<<p)-1,c=h>>1,l=-7,f=t?i-1:0,d=t?-1:1,g=e[r+f];for(f+=d,o=g&(1<<-l)-1,g>>=-l,l+=p;l>0;o=o*256+e[r+f],f+=d,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=n;l>0;u=u*256+e[r+f],f+=d,l-=8);if(o===0)o=1-c;else{if(o===h)return u?NaN:(g?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-c}return(g?-1:1)*u*Math.pow(2,o-n)};$.write=function(e,r,t,n,i,o){var u,p,h,c=o*8-i-1,l=(1<<c)-1,f=l>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:o-1,k=n?1:-1,Cr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(p=isNaN(r)?1:0,u=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(h=Math.pow(2,-u))<1&&(u--,h*=2),u+f>=1?r+=d/h:r+=d*Math.pow(2,1-f),r*h>=2&&(u++,h/=2),u+f>=l?(p=0,u=l):u+f>=1?(p=(r*h-1)*Math.pow(2,i),u=u+f):(p=r*Math.pow(2,f-1)*Math.pow(2,i),u=0));i>=8;e[t+g]=p&255,g+=k,p/=256,i-=8);for(u=u<<i|p,c+=i;c>0;e[t+g]=u&255,g+=k,u/=256,c-=8);e[t+g-k]|=Cr*128}});var gr=W(R=>{"use strict";s();var X=ar(),L=pr(),hr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;R.Buffer=a;R.SlowBuffer=Qr;R.INSPECT_MAX_BYTES=50;var H=2147483647;R.kMaxLength=H;a.TYPED_ARRAY_SUPPORT=Vr();!a.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Vr(){try{var e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch(t){return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.byteOffset}});function N(e){if(e>H)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return Object.setPrototypeOf(r,a.prototype),r}function a(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Z(e)}return cr(e,r,t)}a.poolSize=8192;function cr(e,r,t){if(typeof e=="string")return Xr(e,r);if(ArrayBuffer.isView(e))return zr(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(I(e,ArrayBuffer)||e&&I(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(I(e,SharedArrayBuffer)||e&&I(e.buffer,SharedArrayBuffer)))return J(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return a.from(n,r,t);var i=Jr(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return a.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}a.from=function(e,r,t){return cr(e,r,t)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function lr(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function $r(e,r,t){return lr(e),e<=0?N(e):r!==void 0?typeof t=="string"?N(e).fill(r,t):N(e).fill(r):N(e)}a.alloc=function(e,r,t){return $r(e,r,t)};function Z(e){return lr(e),N(e<0?0:j(e)|0)}a.allocUnsafe=function(e){return Z(e)};a.allocUnsafeSlow=function(e){return Z(e)};function Xr(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=xr(e,r)|0,n=N(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function z(e){for(var r=e.length<0?0:j(e.length)|0,t=N(r),n=0;n<r;n+=1)t[n]=e[n]&255;return t}function zr(e){if(I(e,Uint8Array)){var r=new Uint8Array(e);return J(r.buffer,r.byteOffset,r.byteLength)}return z(e)}function J(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');var n;return r===void 0&&t===void 0?n=new Uint8Array(e):t===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,t),Object.setPrototypeOf(n,a.prototype),n}function Jr(e){if(a.isBuffer(e)){var r=j(e.length)|0,t=N(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||rr(e.length)?N(0):z(e);if(e.type==="Buffer"&&Array.isArray(e.data))return z(e.data)}function j(e){if(e>=H)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+H.toString(16)+" bytes");return e|0}function Qr(e){return+e!=e&&(e=0),a.alloc(+e)}a.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==a.prototype};a.compare=function(r,t){if(I(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),I(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(r)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;for(var n=r.length,i=t.length,o=0,u=Math.min(n,i);o<u;++o)if(r[o]!==t[o]){n=r[o],i=t[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return a.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;var i=a.allocUnsafe(t),o=0;for(n=0;n<r.length;++n){var u=r[n];if(I(u,Uint8Array))o+u.length>i.length?a.from(u).copy(i,o):Uint8Array.prototype.set.call(i,u,o);else if(a.isBuffer(u))u.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=u.length}return i};function xr(e,r){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||I(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Tr(e).length;default:if(i)return n?-1:Q(e).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=xr;function Zr(e,r,t){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return pt(this,r,t);case"utf8":case"utf-8":return wr(this,r,t);case"ascii":return ut(this,r,t);case"latin1":case"binary":return at(this,r,t);case"base64":return it(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ht(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}a.prototype._isBuffer=!0;function _(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}a.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<r;t+=2)_(this,t,t+1);return this};a.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<r;t+=4)_(this,t,t+3),_(this,t+1,t+2);return this};a.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<r;t+=8)_(this,t,t+7),_(this,t+1,t+6),_(this,t+2,t+5),_(this,t+3,t+4);return this};a.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?wr(this,0,r):Zr.apply(this,arguments)};a.prototype.toLocaleString=a.prototype.toString;a.prototype.equals=function(r){if(!a.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:a.compare(this,r)===0};a.prototype.inspect=function(){var r="",t=R.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};hr&&(a.prototype[hr]=a.prototype.inspect);a.prototype.compare=function(r,t,n,i,o){if(I(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),!a.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),t<0||n>r.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===r)return 0;for(var u=o-i,p=n-t,h=Math.min(u,p),c=this.slice(i,o),l=r.slice(t,n),f=0;f<h;++f)if(c[f]!==l[f]){u=c[f],p=l[f];break}return u<p?-1:p<u?1:0};function yr(e,r,t,n,i){if(e.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,rr(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof r=="string"&&(r=a.from(r,n)),a.isBuffer(r))return r.length===0?-1:fr(e,r,t,n,i);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):fr(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function fr(e,r,t,n,i){var o=1,u=e.length,p=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,u/=2,p/=2,t/=2}function h(g,k){return o===1?g[k]:g.readUInt16BE(k*o)}var c;if(i){var l=-1;for(c=t;c<u;c++)if(h(e,c)===h(r,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===p)return l*o}else l!==-1&&(c-=c-l),l=-1}else for(t+p>u&&(t=u-p),c=t;c>=0;c--){for(var f=!0,d=0;d<p;d++)if(h(e,c+d)!==h(r,d)){f=!1;break}if(f)return c}return-1}a.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};a.prototype.indexOf=function(r,t,n){return yr(this,r,t,n,!0)};a.prototype.lastIndexOf=function(r,t,n){return yr(this,r,t,n,!1)};function jr(e,r,t,n){t=Number(t)||0;var i=e.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;n>o/2&&(n=o/2);for(var u=0;u<n;++u){var p=parseInt(r.substr(u*2,2),16);if(rr(p))return u;e[t+u]=p}return u}function rt(e,r,t,n){return K(Q(r,e.length-t),e,t,n)}function tt(e,r,t,n){return K(ct(r),e,t,n)}function et(e,r,t,n){return K(Tr(r),e,t,n)}function nt(e,r,t,n){return K(lt(r,e.length-t),e,t,n)}a.prototype.write=function(r,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-t;if((n===void 0||n>o)&&(n=o),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var u=!1;;)switch(i){case"hex":return jr(this,r,t,n);case"utf8":case"utf-8":return rt(this,r,t,n);case"ascii":case"latin1":case"binary":return tt(this,r,t,n);case"base64":return et(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nt(this,r,t,n);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function it(e,r,t){return r===0&&t===e.length?X.fromByteArray(e):X.fromByteArray(e.slice(r,t))}function wr(e,r,t){t=Math.min(e.length,t);for(var n=[],i=r;i<t;){var o=e[i],u=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=t){var h,c,l,f;switch(p){case 1:o<128&&(u=o);break;case 2:h=e[i+1],(h&192)===128&&(f=(o&31)<<6|h&63,f>127&&(u=f));break;case 3:h=e[i+1],c=e[i+2],(h&192)===128&&(c&192)===128&&(f=(o&15)<<12|(h&63)<<6|c&63,f>2047&&(f<55296||f>57343)&&(u=f));break;case 4:h=e[i+1],c=e[i+2],l=e[i+3],(h&192)===128&&(c&192)===128&&(l&192)===128&&(f=(o&15)<<18|(h&63)<<12|(c&63)<<6|l&63,f>65535&&f<1114112&&(u=f))}}u===null?(u=65533,p=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=p}return ot(n)}var sr=4096;function ot(e){var r=e.length;if(r<=sr)return String.fromCharCode.apply(String,e);for(var t="",n=0;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=sr));return t}function ut(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]&127);return n}function at(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]);return n}function pt(e,r,t){var n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);for(var i="",o=r;o<t;++o)i+=xt[e[o]];return i}function ht(e,r,t){for(var n=e.slice(r,t),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}a.prototype.slice=function(r,t){var n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);var i=this.subarray(r,t);return Object.setPrototypeOf(i,a.prototype),i};function m(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=this[r],o=1,u=0;++u<t&&(o*=256);)i+=this[r+u]*o;return i};a.prototype.readUintBE=a.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=this[r+--t],o=1;t>0&&(o*=256);)i+=this[r+--t]*o;return i};a.prototype.readUint8=a.prototype.readUInt8=function(r,t){return r=r>>>0,t||m(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||m(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||m(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||m(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};a.prototype.readUint32BE=a.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||m(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};a.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=this[r],o=1,u=0;++u<t&&(o*=256);)i+=this[r+u]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};a.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=t,o=1,u=this[r+--i];i>0&&(o*=256);)u+=this[r+--i]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*t)),u};a.prototype.readInt8=function(r,t){return r=r>>>0,t||m(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||m(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(r,t){r=r>>>0,t||m(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(r,t){return r=r>>>0,t||m(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};a.prototype.readInt32BE=function(r,t){return r=r>>>0,t||m(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};a.prototype.readFloatLE=function(r,t){return r=r>>>0,t||m(r,4,this.length),L.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||m(r,4,this.length),L.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||m(r,8,this.length),L.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||m(r,8,this.length),L.read(this,r,!1,52,8)};function T(e,r,t,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){var o=Math.pow(2,8*n)-1;T(this,r,t,n,o,0)}var u=1,p=0;for(this[t]=r&255;++p<n&&(u*=256);)this[t+p]=r/u&255;return t+n};a.prototype.writeUintBE=a.prototype.writeUIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){var o=Math.pow(2,8*n)-1;T(this,r,t,n,o,0)}var u=n-1,p=1;for(this[t+u]=r&255;--u>=0&&(p*=256);)this[t+u]=r/p&255;return t+n};a.prototype.writeUint8=a.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||T(this,r,t,1,255,0),this[t]=r&255,t+1};a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||T(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||T(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||T(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||T(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};a.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){var o=Math.pow(2,8*n-1);T(this,r,t,n,o-1,-o)}var u=0,p=1,h=0;for(this[t]=r&255;++u<n&&(p*=256);)r<0&&h===0&&this[t+u-1]!==0&&(h=1),this[t+u]=(r/p>>0)-h&255;return t+n};a.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){var o=Math.pow(2,8*n-1);T(this,r,t,n,o-1,-o)}var u=n-1,p=1,h=0;for(this[t+u]=r&255;--u>=0&&(p*=256);)r<0&&h===0&&this[t+u+1]!==0&&(h=1),this[t+u]=(r/p>>0)-h&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||T(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};a.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||T(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||T(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||T(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};a.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||T(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function mr(e,r,t,n,i,o){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Er(e,r,t,n,i){return r=+r,t=t>>>0,i||mr(e,r,t,4,34028234663852886e22,-34028234663852886e22),L.write(e,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return Er(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return Er(this,r,t,!1,n)};function dr(e,r,t,n,i){return r=+r,t=t>>>0,i||mr(e,r,t,8,17976931348623157e292,-17976931348623157e292),L.write(e,r,t,n,52,8),t+8}a.prototype.writeDoubleLE=function(r,t,n){return dr(this,r,t,!0,n)};a.prototype.writeDoubleBE=function(r,t,n){return dr(this,r,t,!1,n)};a.prototype.copy=function(r,t,n,i){if(!a.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t<i-n&&(i=r.length-t+n);var o=i-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(r,this.subarray(n,i),t),o};a.prototype.fill=function(r,t,n,i){if(typeof r=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(r.length===1){var o=r.charCodeAt(0);(i==="utf8"&&o<128||i==="latin1")&&(r=o)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var u;if(typeof r=="number")for(u=t;u<n;++u)this[u]=r;else{var p=a.isBuffer(r)?r:a.from(r,i),h=p.length;if(h===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=p[u%h]}return this};var ft=/[^+/0-9A-Za-z-_]/g;function st(e){if(e=e.split("=")[0],e=e.trim().replace(ft,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Q(e,r){r=r||1/0;for(var t,n=e.length,i=null,o=[],u=0;u<n;++u){if(t=e.charCodeAt(u),t>55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function ct(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function lt(e,r){for(var t,n,i,o=[],u=0;u<e.length&&!((r-=2)<0);++u)t=e.charCodeAt(u),n=t>>8,i=t%256,o.push(i),o.push(n);return o}function Tr(e){return X.toByteArray(st(e))}function K(e,r,t,n){for(var i=0;i<n&&!(i+t>=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function I(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function rr(e){return e!==e}var xt=function(){for(var e="0123456789abcdef",r=new Array(256),t=0;t<16;++t)for(var n=t*16,i=0;i<16;++i)r[n+i]=e[t]+e[i];return r}()});var vr=W((Ut,Br)=>{s();var x=Br.exports={},B,v;function tr(){throw new Error("setTimeout has not been defined")}function er(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?B=setTimeout:B=tr}catch(e){B=tr}try{typeof clearTimeout=="function"?v=clearTimeout:v=er}catch(e){v=er}})();function Ar(e){if(B===setTimeout)return setTimeout(e,0);if((B===tr||!B)&&setTimeout)return B=setTimeout,setTimeout(e,0);try{return B(e,0)}catch(r){try{return B.call(null,e,0)}catch(t){return B.call(this,e,0)}}}function yt(e){if(v===clearTimeout)return clearTimeout(e);if((v===er||!v)&&clearTimeout)return v=clearTimeout,clearTimeout(e);try{return v(e)}catch(r){try{return v.call(null,e)}catch(t){return v.call(this,e)}}}var U=[],O=!1,D,Y=-1;function wt(){!O||!D||(O=!1,D.length?U=D.concat(U):Y=-1,U.length&&Fr())}function Fr(){if(!O){var e=Ar(wt);O=!0;for(var r=U.length;r;){for(D=U,U=[];++Y<r;)D&&D[Y].run();Y=-1,r=U.length}D=null,O=!1,yt(e)}}x.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];U.push(new Ir(e,r)),U.length===1&&!O&&Ar(Fr)};function Ir(e,r){this.fun=e,this.array=r}Ir.prototype.run=function(){this.fun.apply(null,this.array)};x.title="browser";x.browser=!0;x.env={};x.argv=[];x.version="";x.versions={};function S(){}x.on=S;x.addListener=S;x.once=S;x.off=S;x.removeListener=S;x.removeAllListeners=S;x.emit=S;x.prependListener=S;x.prependOnceListener=S;x.listeners=function(e){return[]};x.binding=function(e){throw new Error("process.binding is not supported")};x.cwd=function(){return"/"};x.chdir=function(e){throw new Error("process.chdir is not supported")};x.umask=function(){return 0}});var y,w,St,s=Or(()=>{y=q(gr()),w=q(vr()),St=function(e){function r(){var n=this||self;return delete e.prototype.__magic__,n}if(typeof globalThis=="object")return globalThis;if(this)return r();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:r});var t=__magic__;return t}(Object)});var Ft={};br(Ft,{getNativeAuthConfig:()=>dt,getToken:()=>At,getTokenExpiration:()=>Et});module.exports=Mr(Ft);s();s();s();var Nr=()=>Date.now()/1e3;s();s();s();s();s();function b(e){return atob(e)}function mt(e){return Object.prototype.toString.call(e)==="[object String]"}var Ur=e=>{if(!e||!mt(e))return null;try{let[r,t,n]=e.split("."),i=b(r),o=b(t),[u,p,h,c]=o.split("."),l=JSON.parse(b(c)),f=b(u),d={ttl:Number(h),address:i,extraInfo:l,host:f,signature:n,blockHash:p,body:o};return c==="e30"&&delete d.extraInfo,d}catch(r){return null}};var Et=e=>{let r=Ur(e);if(!r)return{isExpired:!1};let t=Nr(),{ttl:n,extraInfo:i}=r,o=i.timestamp;if(!o)return{isExpired:!1};let u=o+n,p=t>u,h=u-t;return{isExpired:p,expiresAt:u,secondsUntilExpires:h}};s();var Sr,M={hostname:typeof window!="undefined"?(Sr=window==null?void 0:window.location)==null?void 0:Sr.hostname:"",apiAddress:"https://api.multiversx.com",expirySeconds:60*60*24,tokenExpirationToastWarningSeconds:5*60},dt=e=>{var t,n,i,o;return e===!0?M:{hostname:(t=e==null?void 0:e.hostname)!=null?t:M.hostname,expirySeconds:(n=e==null?void 0:e.expirySeconds)!=null?n:M.expirySeconds,apiAddress:(i=e==null?void 0:e.apiAddress)!=null?i:M.apiAddress,tokenExpirationToastWarningSeconds:(o=e==null?void 0:e.tokenExpirationToastWarningSeconds)!=null?o:M.tokenExpirationToastWarningSeconds}};s();s();s();var Tt=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),nr=e=>Tt(y.Buffer.from(e,"utf8").toString("base64"));s();var gt=q(require("axios"));s();var At=({address:e,token:r,signature:t})=>{let n=nr(e),i=nr(r);return`${n}.${i}.${t}`};0&&(module.exports={getNativeAuthConfig,getToken,getTokenExpiration});
1
+ "use strict";var _r=Object.create;var P=Object.defineProperty;var kr=Object.getOwnPropertyDescriptor;var Dr=Object.getOwnPropertyNames;var Rr=Object.getPrototypeOf,Lr=Object.prototype.hasOwnProperty;var Or=(e,r)=>()=>(e&&(r=e(e=0)),r);var G=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),br=(e,r)=>{for(var t in r)P(e,t,{get:r[t],enumerable:!0})},ir=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Dr(r))!Lr.call(e,i)&&i!==t&&P(e,i,{get:()=>r[i],enumerable:!(n=kr(r,i))||n.enumerable});return e};var Y=(e,r,t)=>(t=e!=null?_r(Rr(e)):{},ir(r||!e||!e.__esModule?P(t,"default",{value:e,enumerable:!0}):t,e)),Mr=e=>ir(P({},"__esModule",{value:!0}),e);var ar=G(H=>{"use strict";h();H.byteLength=Gr;H.toByteArray=Wr;H.fromByteArray=Yr;var F=[],A=[],Pr=typeof Uint8Array!="undefined"?Uint8Array:Array,q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(C=0,or=q.length;C<or;++C)F[C]=q[C],A[q.charCodeAt(C)]=C;var C,or;A["-".charCodeAt(0)]=62;A["_".charCodeAt(0)]=63;function ur(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function Gr(e){var r=ur(e),t=r[0],n=r[1];return(t+n)*3/4-n}function Hr(e,r,t){return(r+t)*3/4-t}function Wr(e){var r,t=ur(e),n=t[0],i=t[1],o=new Pr(Hr(e,n,i)),u=0,s=i>0?n-4:n,p;for(p=0;p<s;p+=4)r=A[e.charCodeAt(p)]<<18|A[e.charCodeAt(p+1)]<<12|A[e.charCodeAt(p+2)]<<6|A[e.charCodeAt(p+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return i===2&&(r=A[e.charCodeAt(p)]<<2|A[e.charCodeAt(p+1)]>>4,o[u++]=r&255),i===1&&(r=A[e.charCodeAt(p)]<<10|A[e.charCodeAt(p+1)]<<4|A[e.charCodeAt(p+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function Vr(e){return F[e>>18&63]+F[e>>12&63]+F[e>>6&63]+F[e&63]}function Kr(e,r,t){for(var n,i=[],o=r;o<t;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(Vr(n));return i.join("")}function Yr(e){for(var r,t=e.length,n=t%3,i=[],o=16383,u=0,s=t-n;u<s;u+=o)i.push(Kr(e,u,u+o>s?s:u+o));return n===1?(r=e[t-1],i.push(F[r>>2]+F[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(F[r>>10]+F[r>>4&63]+F[r<<2&63]+"=")),i.join("")}});var sr=G($=>{h();$.read=function(e,r,t,n,i){var o,u,s=i*8-n-1,p=(1<<s)-1,f=p>>1,l=-7,c=t?i-1:0,d=t?-1:1,T=e[r+c];for(c+=d,o=T&(1<<-l)-1,T>>=-l,l+=s;l>0;o=o*256+e[r+c],c+=d,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=n;l>0;u=u*256+e[r+c],c+=d,l-=8);if(o===0)o=1-f;else{if(o===p)return u?NaN:(T?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-f}return(T?-1:1)*u*Math.pow(2,o-n)};$.write=function(e,r,t,n,i,o){var u,s,p,f=o*8-i-1,l=(1<<f)-1,c=l>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:o-1,D=n?1:-1,Cr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,u=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(p=Math.pow(2,-u))<1&&(u--,p*=2),u+c>=1?r+=d/p:r+=d*Math.pow(2,1-c),r*p>=2&&(u++,p/=2),u+c>=l?(s=0,u=l):u+c>=1?(s=(r*p-1)*Math.pow(2,i),u=u+c):(s=r*Math.pow(2,c-1)*Math.pow(2,i),u=0));i>=8;e[t+T]=s&255,T+=D,s/=256,i-=8);for(u=u<<i|s,f+=i;f>0;e[t+T]=u&255,T+=D,u/=256,f-=8);e[t+T-D]|=Cr*128}});var Tr=G(L=>{"use strict";h();var J=ar(),R=sr(),pr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;L.Buffer=a;L.SlowBuffer=Qr;L.INSPECT_MAX_BYTES=50;var W=2147483647;L.kMaxLength=W;a.TYPED_ARRAY_SUPPORT=qr();!a.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function qr(){try{var e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch(t){return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.byteOffset}});function N(e){if(e>W)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return Object.setPrototypeOf(r,a.prototype),r}function a(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Z(e)}return fr(e,r,t)}a.poolSize=8192;function fr(e,r,t){if(typeof e=="string")return Jr(e,r);if(ArrayBuffer.isView(e))return Xr(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(B(e,ArrayBuffer)||e&&B(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(B(e,SharedArrayBuffer)||e&&B(e.buffer,SharedArrayBuffer)))return z(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return a.from(n,r,t);var i=zr(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return a.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}a.from=function(e,r,t){return fr(e,r,t)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function lr(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function $r(e,r,t){return lr(e),e<=0?N(e):r!==void 0?typeof t=="string"?N(e).fill(r,t):N(e).fill(r):N(e)}a.alloc=function(e,r,t){return $r(e,r,t)};function Z(e){return lr(e),N(e<0?0:j(e)|0)}a.allocUnsafe=function(e){return Z(e)};a.allocUnsafeSlow=function(e){return Z(e)};function Jr(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=xr(e,r)|0,n=N(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function X(e){for(var r=e.length<0?0:j(e.length)|0,t=N(r),n=0;n<r;n+=1)t[n]=e[n]&255;return t}function Xr(e){if(B(e,Uint8Array)){var r=new Uint8Array(e);return z(r.buffer,r.byteOffset,r.byteLength)}return X(e)}function z(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');var n;return r===void 0&&t===void 0?n=new Uint8Array(e):t===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,t),Object.setPrototypeOf(n,a.prototype),n}function zr(e){if(a.isBuffer(e)){var r=j(e.length)|0,t=N(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||rr(e.length)?N(0):X(e);if(e.type==="Buffer"&&Array.isArray(e.data))return X(e.data)}function j(e){if(e>=W)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+W.toString(16)+" bytes");return e|0}function Qr(e){return+e!=e&&(e=0),a.alloc(+e)}a.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==a.prototype};a.compare=function(r,t){if(B(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(r)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;for(var n=r.length,i=t.length,o=0,u=Math.min(n,i);o<u;++o)if(r[o]!==t[o]){n=r[o],i=t[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return a.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;var i=a.allocUnsafe(t),o=0;for(n=0;n<r.length;++n){var u=r[n];if(B(u,Uint8Array))o+u.length>i.length?a.from(u).copy(i,o):Uint8Array.prototype.set.call(i,u,o);else if(a.isBuffer(u))u.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=u.length}return i};function xr(e,r){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||B(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return gr(e).length;default:if(i)return n?-1:Q(e).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=xr;function Zr(e,r,t){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return st(this,r,t);case"utf8":case"utf-8":return wr(this,r,t);case"ascii":return ut(this,r,t);case"latin1":case"binary":return at(this,r,t);case"base64":return it(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pt(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}a.prototype._isBuffer=!0;function _(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}a.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<r;t+=2)_(this,t,t+1);return this};a.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<r;t+=4)_(this,t,t+3),_(this,t+1,t+2);return this};a.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<r;t+=8)_(this,t,t+7),_(this,t+1,t+6),_(this,t+2,t+5),_(this,t+3,t+4);return this};a.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?wr(this,0,r):Zr.apply(this,arguments)};a.prototype.toLocaleString=a.prototype.toString;a.prototype.equals=function(r){if(!a.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:a.compare(this,r)===0};a.prototype.inspect=function(){var r="",t=L.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};pr&&(a.prototype[pr]=a.prototype.inspect);a.prototype.compare=function(r,t,n,i,o){if(B(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),!a.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),t<0||n>r.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===r)return 0;for(var u=o-i,s=n-t,p=Math.min(u,s),f=this.slice(i,o),l=r.slice(t,n),c=0;c<p;++c)if(f[c]!==l[c]){u=f[c],s=l[c];break}return u<s?-1:s<u?1:0};function yr(e,r,t,n,i){if(e.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,rr(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof r=="string"&&(r=a.from(r,n)),a.isBuffer(r))return r.length===0?-1:cr(e,r,t,n,i);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):cr(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function cr(e,r,t,n,i){var o=1,u=e.length,s=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,u/=2,s/=2,t/=2}function p(T,D){return o===1?T[D]:T.readUInt16BE(D*o)}var f;if(i){var l=-1;for(f=t;f<u;f++)if(p(e,f)===p(r,l===-1?0:f-l)){if(l===-1&&(l=f),f-l+1===s)return l*o}else l!==-1&&(f-=f-l),l=-1}else for(t+s>u&&(t=u-s),f=t;f>=0;f--){for(var c=!0,d=0;d<s;d++)if(p(e,f+d)!==p(r,d)){c=!1;break}if(c)return f}return-1}a.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};a.prototype.indexOf=function(r,t,n){return yr(this,r,t,n,!0)};a.prototype.lastIndexOf=function(r,t,n){return yr(this,r,t,n,!1)};function jr(e,r,t,n){t=Number(t)||0;var i=e.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;n>o/2&&(n=o/2);for(var u=0;u<n;++u){var s=parseInt(r.substr(u*2,2),16);if(rr(s))return u;e[t+u]=s}return u}function rt(e,r,t,n){return V(Q(r,e.length-t),e,t,n)}function tt(e,r,t,n){return V(ft(r),e,t,n)}function et(e,r,t,n){return V(gr(r),e,t,n)}function nt(e,r,t,n){return V(lt(r,e.length-t),e,t,n)}a.prototype.write=function(r,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-t;if((n===void 0||n>o)&&(n=o),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var u=!1;;)switch(i){case"hex":return jr(this,r,t,n);case"utf8":case"utf-8":return rt(this,r,t,n);case"ascii":case"latin1":case"binary":return tt(this,r,t,n);case"base64":return et(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nt(this,r,t,n);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function it(e,r,t){return r===0&&t===e.length?J.fromByteArray(e):J.fromByteArray(e.slice(r,t))}function wr(e,r,t){t=Math.min(e.length,t);for(var n=[],i=r;i<t;){var o=e[i],u=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=t){var p,f,l,c;switch(s){case 1:o<128&&(u=o);break;case 2:p=e[i+1],(p&192)===128&&(c=(o&31)<<6|p&63,c>127&&(u=c));break;case 3:p=e[i+1],f=e[i+2],(p&192)===128&&(f&192)===128&&(c=(o&15)<<12|(p&63)<<6|f&63,c>2047&&(c<55296||c>57343)&&(u=c));break;case 4:p=e[i+1],f=e[i+2],l=e[i+3],(p&192)===128&&(f&192)===128&&(l&192)===128&&(c=(o&15)<<18|(p&63)<<12|(f&63)<<6|l&63,c>65535&&c<1114112&&(u=c))}}u===null?(u=65533,s=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=s}return ot(n)}var hr=4096;function ot(e){var r=e.length;if(r<=hr)return String.fromCharCode.apply(String,e);for(var t="",n=0;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=hr));return t}function ut(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]&127);return n}function at(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]);return n}function st(e,r,t){var n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);for(var i="",o=r;o<t;++o)i+=xt[e[o]];return i}function pt(e,r,t){for(var n=e.slice(r,t),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}a.prototype.slice=function(r,t){var n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);var i=this.subarray(r,t);return Object.setPrototypeOf(i,a.prototype),i};function m(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=this[r],o=1,u=0;++u<t&&(o*=256);)i+=this[r+u]*o;return i};a.prototype.readUintBE=a.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=this[r+--t],o=1;t>0&&(o*=256);)i+=this[r+--t]*o;return i};a.prototype.readUint8=a.prototype.readUInt8=function(r,t){return r=r>>>0,t||m(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||m(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||m(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||m(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};a.prototype.readUint32BE=a.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||m(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};a.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=this[r],o=1,u=0;++u<t&&(o*=256);)i+=this[r+u]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};a.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=t,o=1,u=this[r+--i];i>0&&(o*=256);)u+=this[r+--i]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*t)),u};a.prototype.readInt8=function(r,t){return r=r>>>0,t||m(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||m(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(r,t){r=r>>>0,t||m(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(r,t){return r=r>>>0,t||m(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};a.prototype.readInt32BE=function(r,t){return r=r>>>0,t||m(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};a.prototype.readFloatLE=function(r,t){return r=r>>>0,t||m(r,4,this.length),R.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||m(r,4,this.length),R.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||m(r,8,this.length),R.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||m(r,8,this.length),R.read(this,r,!1,52,8)};function g(e,r,t,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){var o=Math.pow(2,8*n)-1;g(this,r,t,n,o,0)}var u=1,s=0;for(this[t]=r&255;++s<n&&(u*=256);)this[t+s]=r/u&255;return t+n};a.prototype.writeUintBE=a.prototype.writeUIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){var o=Math.pow(2,8*n)-1;g(this,r,t,n,o,0)}var u=n-1,s=1;for(this[t+u]=r&255;--u>=0&&(s*=256);)this[t+u]=r/s&255;return t+n};a.prototype.writeUint8=a.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,1,255,0),this[t]=r&255,t+1};a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};a.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){var o=Math.pow(2,8*n-1);g(this,r,t,n,o-1,-o)}var u=0,s=1,p=0;for(this[t]=r&255;++u<n&&(s*=256);)r<0&&p===0&&this[t+u-1]!==0&&(p=1),this[t+u]=(r/s>>0)-p&255;return t+n};a.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){var o=Math.pow(2,8*n-1);g(this,r,t,n,o-1,-o)}var u=n-1,s=1,p=0;for(this[t+u]=r&255;--u>=0&&(s*=256);)r<0&&p===0&&this[t+u+1]!==0&&(p=1),this[t+u]=(r/s>>0)-p&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};a.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};a.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function mr(e,r,t,n,i,o){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Er(e,r,t,n,i){return r=+r,t=t>>>0,i||mr(e,r,t,4,34028234663852886e22,-34028234663852886e22),R.write(e,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return Er(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return Er(this,r,t,!1,n)};function dr(e,r,t,n,i){return r=+r,t=t>>>0,i||mr(e,r,t,8,17976931348623157e292,-17976931348623157e292),R.write(e,r,t,n,52,8),t+8}a.prototype.writeDoubleLE=function(r,t,n){return dr(this,r,t,!0,n)};a.prototype.writeDoubleBE=function(r,t,n){return dr(this,r,t,!1,n)};a.prototype.copy=function(r,t,n,i){if(!a.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t<i-n&&(i=r.length-t+n);var o=i-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(r,this.subarray(n,i),t),o};a.prototype.fill=function(r,t,n,i){if(typeof r=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(r.length===1){var o=r.charCodeAt(0);(i==="utf8"&&o<128||i==="latin1")&&(r=o)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var u;if(typeof r=="number")for(u=t;u<n;++u)this[u]=r;else{var s=a.isBuffer(r)?r:a.from(r,i),p=s.length;if(p===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=s[u%p]}return this};var ct=/[^+/0-9A-Za-z-_]/g;function ht(e){if(e=e.split("=")[0],e=e.trim().replace(ct,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Q(e,r){r=r||1/0;for(var t,n=e.length,i=null,o=[],u=0;u<n;++u){if(t=e.charCodeAt(u),t>55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function ft(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function lt(e,r){for(var t,n,i,o=[],u=0;u<e.length&&!((r-=2)<0);++u)t=e.charCodeAt(u),n=t>>8,i=t%256,o.push(i),o.push(n);return o}function gr(e){return J.toByteArray(ht(e))}function V(e,r,t,n){for(var i=0;i<n&&!(i+t>=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function B(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function rr(e){return e!==e}var xt=function(){for(var e="0123456789abcdef",r=new Array(256),t=0;t<16;++t)for(var n=t*16,i=0;i<16;++i)r[n+i]=e[t]+e[i];return r}()});var vr=G((Ut,Ir)=>{h();var x=Ir.exports={},I,v;function tr(){throw new Error("setTimeout has not been defined")}function er(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?I=setTimeout:I=tr}catch(e){I=tr}try{typeof clearTimeout=="function"?v=clearTimeout:v=er}catch(e){v=er}})();function Ar(e){if(I===setTimeout)return setTimeout(e,0);if((I===tr||!I)&&setTimeout)return I=setTimeout,setTimeout(e,0);try{return I(e,0)}catch(r){try{return I.call(null,e,0)}catch(t){return I.call(this,e,0)}}}function yt(e){if(v===clearTimeout)return clearTimeout(e);if((v===er||!v)&&clearTimeout)return v=clearTimeout,clearTimeout(e);try{return v(e)}catch(r){try{return v.call(null,e)}catch(t){return v.call(this,e)}}}var U=[],O=!1,k,K=-1;function wt(){!O||!k||(O=!1,k.length?U=k.concat(U):K=-1,U.length&&Fr())}function Fr(){if(!O){var e=Ar(wt);O=!0;for(var r=U.length;r;){for(k=U,U=[];++K<r;)k&&k[K].run();K=-1,r=U.length}k=null,O=!1,yt(e)}}x.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];U.push(new Br(e,r)),U.length===1&&!O&&Ar(Fr)};function Br(e,r){this.fun=e,this.array=r}Br.prototype.run=function(){this.fun.apply(null,this.array)};x.title="browser";x.browser=!0;x.env={};x.argv=[];x.version="";x.versions={};function S(){}x.on=S;x.addListener=S;x.once=S;x.off=S;x.removeListener=S;x.removeAllListeners=S;x.emit=S;x.prependListener=S;x.prependOnceListener=S;x.listeners=function(e){return[]};x.binding=function(e){throw new Error("process.binding is not supported")};x.cwd=function(){return"/"};x.chdir=function(e){throw new Error("process.chdir is not supported")};x.umask=function(){return 0}});var y,w,St,h=Or(()=>{y=Y(Tr()),w=Y(vr()),St=function(e){function r(){var n=this||self;return delete e.prototype.__magic__,n}if(typeof globalThis=="object")return globalThis;if(this)return r();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:r});var t=__magic__;return t}(Object)});var Ft={};br(Ft,{getNativeAuthConfig:()=>dt,getToken:()=>At,getTokenExpiration:()=>Et});module.exports=Mr(Ft);h();h();h();var Nr=()=>Date.now()/1e3;h();h();h();h();h();function b(e){return atob(e)}function mt(e){return Object.prototype.toString.call(e)==="[object String]"}var Ur=e=>{if(!e||!mt(e))return null;try{let[r,t,n]=e.split("."),i=b(r),o=b(t),[u,s,p,f]=o.split("."),l=JSON.parse(b(f)),c=b(u),d={ttl:Number(p),address:i,extraInfo:l,host:c,signature:n,blockHash:s,body:o};return f==="e30"&&delete d.extraInfo,d}catch(r){return null}};var Et=e=>{let r=Ur(e);if(!r)return{isExpired:!1};let t=Nr(),{ttl:n,extraInfo:i}=r,o=i.timestamp;if(!o)return{isExpired:!1};let u=o+n,s=t>u,p=u-t;return{isExpired:s,expiresAt:u,secondsUntilExpires:p}};h();var Sr,M={hostname:typeof window!="undefined"?(Sr=window==null?void 0:window.location)==null?void 0:Sr.hostname:"",apiAddress:"https://api.multiversx.com",expirySeconds:60*60*24,tokenExpirationToastWarningSeconds:5*60},dt=e=>{var t,n,i,o;return e===!0?M:{hostname:(t=e==null?void 0:e.hostname)!=null?t:M.hostname,expirySeconds:(n=e==null?void 0:e.expirySeconds)!=null?n:M.expirySeconds,apiAddress:(i=e==null?void 0:e.apiAddress)!=null?i:M.apiAddress,tokenExpirationToastWarningSeconds:(o=e==null?void 0:e.tokenExpirationToastWarningSeconds)!=null?o:M.tokenExpirationToastWarningSeconds}};h();h();h();var gt=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),nr=e=>gt(y.Buffer.from(e,"utf8").toString("base64"));h();var Tt=Y(require("axios"));h();var At=({address:e,token:r,signature:t})=>{let n=nr(e),i=nr(r);return`${n}.${i}.${t}`};0&&(module.exports={getNativeAuthConfig,getToken,getTokenExpiration});
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
@@ -1,4 +1,4 @@
1
- "use strict";var Gr=Object.create;var M=Object.defineProperty;var Hr=Object.getOwnPropertyDescriptor;var Kr=Object.getOwnPropertyNames,ar=Object.getOwnPropertySymbols,Vr=Object.getPrototypeOf,sr=Object.prototype.hasOwnProperty,Yr=Object.prototype.propertyIsEnumerable;var pr=(e,r,t)=>r in e?M(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,q=(e,r)=>{for(var t in r||(r={}))sr.call(r,t)&&pr(e,t,r[t]);if(ar)for(var t of ar(r))Yr.call(r,t)&&pr(e,t,r[t]);return e};var qr=(e,r)=>()=>(e&&(r=e(e=0)),r);var $=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),zr=(e,r)=>{for(var t in r)M(e,t,{get:r[t],enumerable:!0})},hr=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Kr(r))!sr.call(e,i)&&i!==t&&M(e,i,{get:()=>r[i],enumerable:!(n=Hr(r,i))||n.enumerable});return e};var z=(e,r,t)=>(t=e!=null?Gr(Vr(e)):{},hr(r||!e||!e.__esModule?M(t,"default",{value:e,enumerable:!0}):t,e)),Jr=e=>hr(M({},"__esModule",{value:!0}),e);var G=(e,r,t)=>new Promise((n,i)=>{var o=p=>{try{s(t.next(p))}catch(h){i(h)}},u=p=>{try{s(t.throw(p))}catch(h){i(h)}},s=p=>p.done?n(p.value):Promise.resolve(p.value).then(o,u);s((t=t.apply(e,r)).next())});var lr=$(H=>{"use strict";c();H.byteLength=Qr;H.toByteArray=jr;H.fromByteArray=et;var F=[],A=[],Xr=typeof Uint8Array!="undefined"?Uint8Array:Array,J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(C=0,fr=J.length;C<fr;++C)F[C]=J[C],A[J.charCodeAt(C)]=C;var C,fr;A["-".charCodeAt(0)]=62;A["_".charCodeAt(0)]=63;function cr(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function Qr(e){var r=cr(e),t=r[0],n=r[1];return(t+n)*3/4-n}function Zr(e,r,t){return(r+t)*3/4-t}function jr(e){var r,t=cr(e),n=t[0],i=t[1],o=new Xr(Zr(e,n,i)),u=0,s=i>0?n-4:n,p;for(p=0;p<s;p+=4)r=A[e.charCodeAt(p)]<<18|A[e.charCodeAt(p+1)]<<12|A[e.charCodeAt(p+2)]<<6|A[e.charCodeAt(p+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return i===2&&(r=A[e.charCodeAt(p)]<<2|A[e.charCodeAt(p+1)]>>4,o[u++]=r&255),i===1&&(r=A[e.charCodeAt(p)]<<10|A[e.charCodeAt(p+1)]<<4|A[e.charCodeAt(p+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function rt(e){return F[e>>18&63]+F[e>>12&63]+F[e>>6&63]+F[e&63]}function tt(e,r,t){for(var n,i=[],o=r;o<t;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(rt(n));return i.join("")}function et(e){for(var r,t=e.length,n=t%3,i=[],o=16383,u=0,s=t-n;u<s;u+=o)i.push(tt(e,u,u+o>s?s:u+o));return n===1?(r=e[t-1],i.push(F[r>>2]+F[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(F[r>>10]+F[r>>4&63]+F[r<<2&63]+"=")),i.join("")}});var xr=$(X=>{c();X.read=function(e,r,t,n,i){var o,u,s=i*8-n-1,p=(1<<s)-1,h=p>>1,l=-7,f=t?i-1:0,d=t?-1:1,T=e[r+f];for(f+=d,o=T&(1<<-l)-1,T>>=-l,l+=s;l>0;o=o*256+e[r+f],f+=d,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=n;l>0;u=u*256+e[r+f],f+=d,l-=8);if(o===0)o=1-h;else{if(o===p)return u?NaN:(T?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-h}return(T?-1:1)*u*Math.pow(2,o-n)};X.write=function(e,r,t,n,i,o){var u,s,p,h=o*8-i-1,l=(1<<h)-1,f=l>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:o-1,k=n?1:-1,$r=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,u=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(p=Math.pow(2,-u))<1&&(u--,p*=2),u+f>=1?r+=d/p:r+=d*Math.pow(2,1-f),r*p>=2&&(u++,p/=2),u+f>=l?(s=0,u=l):u+f>=1?(s=(r*p-1)*Math.pow(2,i),u=u+f):(s=r*Math.pow(2,f-1)*Math.pow(2,i),u=0));i>=8;e[t+T]=s&255,T+=k,s/=256,i-=8);for(u=u<<i|s,h+=i;h>0;e[t+T]=u&255,T+=k,u/=256,h-=8);e[t+T-k]|=$r*128}});var Nr=$(O=>{"use strict";c();var Q=lr(),L=xr(),yr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;O.Buffer=a;O.SlowBuffer=pt;O.INSPECT_MAX_BYTES=50;var K=2147483647;O.kMaxLength=K;a.TYPED_ARRAY_SUPPORT=nt();!a.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function nt(){try{var e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch(t){return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.byteOffset}});function N(e){if(e>K)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return Object.setPrototypeOf(r,a.prototype),r}function a(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return tr(e)}return Er(e,r,t)}a.poolSize=8192;function Er(e,r,t){if(typeof e=="string")return ot(e,r);if(ArrayBuffer.isView(e))return ut(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(I(e,ArrayBuffer)||e&&I(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(I(e,SharedArrayBuffer)||e&&I(e.buffer,SharedArrayBuffer)))return j(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return a.from(n,r,t);var i=at(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return a.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}a.from=function(e,r,t){return Er(e,r,t)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function dr(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function it(e,r,t){return dr(e),e<=0?N(e):r!==void 0?typeof t=="string"?N(e).fill(r,t):N(e).fill(r):N(e)}a.alloc=function(e,r,t){return it(e,r,t)};function tr(e){return dr(e),N(e<0?0:er(e)|0)}a.allocUnsafe=function(e){return tr(e)};a.allocUnsafeSlow=function(e){return tr(e)};function ot(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=gr(e,r)|0,n=N(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function Z(e){for(var r=e.length<0?0:er(e.length)|0,t=N(r),n=0;n<r;n+=1)t[n]=e[n]&255;return t}function ut(e){if(I(e,Uint8Array)){var r=new Uint8Array(e);return j(r.buffer,r.byteOffset,r.byteLength)}return Z(e)}function j(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');var n;return r===void 0&&t===void 0?n=new Uint8Array(e):t===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,t),Object.setPrototypeOf(n,a.prototype),n}function at(e){if(a.isBuffer(e)){var r=er(e.length)|0,t=N(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||nr(e.length)?N(0):Z(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Z(e.data)}function er(e){if(e>=K)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K.toString(16)+" bytes");return e|0}function pt(e){return+e!=e&&(e=0),a.alloc(+e)}a.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==a.prototype};a.compare=function(r,t){if(I(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),I(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(r)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;for(var n=r.length,i=t.length,o=0,u=Math.min(n,i);o<u;++o)if(r[o]!==t[o]){n=r[o],i=t[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return a.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;var i=a.allocUnsafe(t),o=0;for(n=0;n<r.length;++n){var u=r[n];if(I(u,Uint8Array))o+u.length>i.length?a.from(u).copy(i,o):Uint8Array.prototype.set.call(i,u,o);else if(a.isBuffer(u))u.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=u.length}return i};function gr(e,r){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||I(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return rr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return vr(e).length;default:if(i)return n?-1:rr(e).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=gr;function st(e,r,t){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return dt(this,r,t);case"utf8":case"utf-8":return Ar(this,r,t);case"ascii":return mt(this,r,t);case"latin1":case"binary":return Et(this,r,t);case"base64":return yt(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}a.prototype._isBuffer=!0;function _(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}a.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<r;t+=2)_(this,t,t+1);return this};a.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<r;t+=4)_(this,t,t+3),_(this,t+1,t+2);return this};a.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<r;t+=8)_(this,t,t+7),_(this,t+1,t+6),_(this,t+2,t+5),_(this,t+3,t+4);return this};a.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?Ar(this,0,r):st.apply(this,arguments)};a.prototype.toLocaleString=a.prototype.toString;a.prototype.equals=function(r){if(!a.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:a.compare(this,r)===0};a.prototype.inspect=function(){var r="",t=O.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};yr&&(a.prototype[yr]=a.prototype.inspect);a.prototype.compare=function(r,t,n,i,o){if(I(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),!a.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),t<0||n>r.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===r)return 0;for(var u=o-i,s=n-t,p=Math.min(u,s),h=this.slice(i,o),l=r.slice(t,n),f=0;f<p;++f)if(h[f]!==l[f]){u=h[f],s=l[f];break}return u<s?-1:s<u?1:0};function Tr(e,r,t,n,i){if(e.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,nr(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof r=="string"&&(r=a.from(r,n)),a.isBuffer(r))return r.length===0?-1:wr(e,r,t,n,i);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):wr(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function wr(e,r,t,n,i){var o=1,u=e.length,s=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,u/=2,s/=2,t/=2}function p(T,k){return o===1?T[k]:T.readUInt16BE(k*o)}var h;if(i){var l=-1;for(h=t;h<u;h++)if(p(e,h)===p(r,l===-1?0:h-l)){if(l===-1&&(l=h),h-l+1===s)return l*o}else l!==-1&&(h-=h-l),l=-1}else for(t+s>u&&(t=u-s),h=t;h>=0;h--){for(var f=!0,d=0;d<s;d++)if(p(e,h+d)!==p(r,d)){f=!1;break}if(f)return h}return-1}a.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};a.prototype.indexOf=function(r,t,n){return Tr(this,r,t,n,!0)};a.prototype.lastIndexOf=function(r,t,n){return Tr(this,r,t,n,!1)};function ht(e,r,t,n){t=Number(t)||0;var i=e.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;n>o/2&&(n=o/2);for(var u=0;u<n;++u){var s=parseInt(r.substr(u*2,2),16);if(nr(s))return u;e[t+u]=s}return u}function ft(e,r,t,n){return V(rr(r,e.length-t),e,t,n)}function ct(e,r,t,n){return V(Ft(r),e,t,n)}function lt(e,r,t,n){return V(vr(r),e,t,n)}function xt(e,r,t,n){return V(It(r,e.length-t),e,t,n)}a.prototype.write=function(r,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-t;if((n===void 0||n>o)&&(n=o),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var u=!1;;)switch(i){case"hex":return ht(this,r,t,n);case"utf8":case"utf-8":return ft(this,r,t,n);case"ascii":case"latin1":case"binary":return ct(this,r,t,n);case"base64":return lt(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xt(this,r,t,n);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function yt(e,r,t){return r===0&&t===e.length?Q.fromByteArray(e):Q.fromByteArray(e.slice(r,t))}function Ar(e,r,t){t=Math.min(e.length,t);for(var n=[],i=r;i<t;){var o=e[i],u=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=t){var p,h,l,f;switch(s){case 1:o<128&&(u=o);break;case 2:p=e[i+1],(p&192)===128&&(f=(o&31)<<6|p&63,f>127&&(u=f));break;case 3:p=e[i+1],h=e[i+2],(p&192)===128&&(h&192)===128&&(f=(o&15)<<12|(p&63)<<6|h&63,f>2047&&(f<55296||f>57343)&&(u=f));break;case 4:p=e[i+1],h=e[i+2],l=e[i+3],(p&192)===128&&(h&192)===128&&(l&192)===128&&(f=(o&15)<<18|(p&63)<<12|(h&63)<<6|l&63,f>65535&&f<1114112&&(u=f))}}u===null?(u=65533,s=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=s}return wt(n)}var mr=4096;function wt(e){var r=e.length;if(r<=mr)return String.fromCharCode.apply(String,e);for(var t="",n=0;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=mr));return t}function mt(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]&127);return n}function Et(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]);return n}function dt(e,r,t){var n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);for(var i="",o=r;o<t;++o)i+=Bt[e[o]];return i}function gt(e,r,t){for(var n=e.slice(r,t),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}a.prototype.slice=function(r,t){var n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);var i=this.subarray(r,t);return Object.setPrototypeOf(i,a.prototype),i};function m(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=this[r],o=1,u=0;++u<t&&(o*=256);)i+=this[r+u]*o;return i};a.prototype.readUintBE=a.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=this[r+--t],o=1;t>0&&(o*=256);)i+=this[r+--t]*o;return i};a.prototype.readUint8=a.prototype.readUInt8=function(r,t){return r=r>>>0,t||m(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||m(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||m(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||m(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};a.prototype.readUint32BE=a.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||m(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};a.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=this[r],o=1,u=0;++u<t&&(o*=256);)i+=this[r+u]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};a.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=t,o=1,u=this[r+--i];i>0&&(o*=256);)u+=this[r+--i]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*t)),u};a.prototype.readInt8=function(r,t){return r=r>>>0,t||m(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||m(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(r,t){r=r>>>0,t||m(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(r,t){return r=r>>>0,t||m(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};a.prototype.readInt32BE=function(r,t){return r=r>>>0,t||m(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};a.prototype.readFloatLE=function(r,t){return r=r>>>0,t||m(r,4,this.length),L.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||m(r,4,this.length),L.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||m(r,8,this.length),L.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||m(r,8,this.length),L.read(this,r,!1,52,8)};function g(e,r,t,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){var o=Math.pow(2,8*n)-1;g(this,r,t,n,o,0)}var u=1,s=0;for(this[t]=r&255;++s<n&&(u*=256);)this[t+s]=r/u&255;return t+n};a.prototype.writeUintBE=a.prototype.writeUIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){var o=Math.pow(2,8*n)-1;g(this,r,t,n,o,0)}var u=n-1,s=1;for(this[t+u]=r&255;--u>=0&&(s*=256);)this[t+u]=r/s&255;return t+n};a.prototype.writeUint8=a.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,1,255,0),this[t]=r&255,t+1};a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};a.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){var o=Math.pow(2,8*n-1);g(this,r,t,n,o-1,-o)}var u=0,s=1,p=0;for(this[t]=r&255;++u<n&&(s*=256);)r<0&&p===0&&this[t+u-1]!==0&&(p=1),this[t+u]=(r/s>>0)-p&255;return t+n};a.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){var o=Math.pow(2,8*n-1);g(this,r,t,n,o-1,-o)}var u=n-1,s=1,p=0;for(this[t+u]=r&255;--u>=0&&(s*=256);)r<0&&p===0&&this[t+u+1]!==0&&(p=1),this[t+u]=(r/s>>0)-p&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};a.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};a.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function Fr(e,r,t,n,i,o){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Ir(e,r,t,n,i){return r=+r,t=t>>>0,i||Fr(e,r,t,4,34028234663852886e22,-34028234663852886e22),L.write(e,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return Ir(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return Ir(this,r,t,!1,n)};function Br(e,r,t,n,i){return r=+r,t=t>>>0,i||Fr(e,r,t,8,17976931348623157e292,-17976931348623157e292),L.write(e,r,t,n,52,8),t+8}a.prototype.writeDoubleLE=function(r,t,n){return Br(this,r,t,!0,n)};a.prototype.writeDoubleBE=function(r,t,n){return Br(this,r,t,!1,n)};a.prototype.copy=function(r,t,n,i){if(!a.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t<i-n&&(i=r.length-t+n);var o=i-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(r,this.subarray(n,i),t),o};a.prototype.fill=function(r,t,n,i){if(typeof r=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(r.length===1){var o=r.charCodeAt(0);(i==="utf8"&&o<128||i==="latin1")&&(r=o)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var u;if(typeof r=="number")for(u=t;u<n;++u)this[u]=r;else{var s=a.isBuffer(r)?r:a.from(r,i),p=s.length;if(p===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=s[u%p]}return this};var Tt=/[^+/0-9A-Za-z-_]/g;function At(e){if(e=e.split("=")[0],e=e.trim().replace(Tt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function rr(e,r){r=r||1/0;for(var t,n=e.length,i=null,o=[],u=0;u<n;++u){if(t=e.charCodeAt(u),t>55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function Ft(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function It(e,r){for(var t,n,i,o=[],u=0;u<e.length&&!((r-=2)<0);++u)t=e.charCodeAt(u),n=t>>8,i=t%256,o.push(i),o.push(n);return o}function vr(e){return Q.toByteArray(At(e))}function V(e,r,t,n){for(var i=0;i<n&&!(i+t>=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function I(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function nr(e){return e!==e}var Bt=function(){for(var e="0123456789abcdef",r=new Array(256),t=0;t<16;++t)for(var n=t*16,i=0;i<16;++i)r[n+i]=e[t]+e[i];return r}()});var Dr=$((Rt,_r)=>{c();var x=_r.exports={},B,v;function ir(){throw new Error("setTimeout has not been defined")}function or(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?B=setTimeout:B=ir}catch(e){B=ir}try{typeof clearTimeout=="function"?v=clearTimeout:v=or}catch(e){v=or}})();function Ur(e){if(B===setTimeout)return setTimeout(e,0);if((B===ir||!B)&&setTimeout)return B=setTimeout,setTimeout(e,0);try{return B(e,0)}catch(r){try{return B.call(null,e,0)}catch(t){return B.call(this,e,0)}}}function vt(e){if(v===clearTimeout)return clearTimeout(e);if((v===or||!v)&&clearTimeout)return v=clearTimeout,clearTimeout(e);try{return v(e)}catch(r){try{return v.call(null,e)}catch(t){return v.call(this,e)}}}var U=[],R=!1,D,Y=-1;function Nt(){!R||!D||(R=!1,D.length?U=D.concat(U):Y=-1,U.length&&Sr())}function Sr(){if(!R){var e=Ur(Nt);R=!0;for(var r=U.length;r;){for(D=U,U=[];++Y<r;)D&&D[Y].run();Y=-1,r=U.length}D=null,R=!1,vt(e)}}x.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];U.push(new Cr(e,r)),U.length===1&&!R&&Ur(Sr)};function Cr(e,r){this.fun=e,this.array=r}Cr.prototype.run=function(){this.fun.apply(null,this.array)};x.title="browser";x.browser=!0;x.env={};x.argv=[];x.version="";x.versions={};function S(){}x.on=S;x.addListener=S;x.once=S;x.off=S;x.removeListener=S;x.removeAllListeners=S;x.emit=S;x.prependListener=S;x.prependOnceListener=S;x.listeners=function(e){return[]};x.binding=function(e){throw new Error("process.binding is not supported")};x.cwd=function(){return"/"};x.chdir=function(e){throw new Error("process.chdir is not supported")};x.umask=function(){return 0}});var y,w,bt,c=qr(()=>{y=z(Nr()),w=z(Dr()),bt=function(e){function r(){var n=this||self;return delete e.prototype.__magic__,n}if(typeof globalThis=="object")return globalThis;if(this)return r();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:r});var t=__magic__;return t}(Object)});var _t={};zr(_t,{nativeAuth:()=>Ct});module.exports=Jr(_t);c();c();var kr,P={hostname:typeof window!="undefined"?(kr=window==null?void 0:window.location)==null?void 0:kr.hostname:"",apiAddress:"https://api.multiversx.com",expirySeconds:60*60*24,tokenExpirationToastWarningSeconds:5*60},ur=e=>{var t,n,i,o;return e===!0?P:{hostname:(t=e==null?void 0:e.hostname)!=null?t:P.hostname,expirySeconds:(n=e==null?void 0:e.expirySeconds)!=null?n:P.expirySeconds,apiAddress:(i=e==null?void 0:e.apiAddress)!=null?i:P.apiAddress,tokenExpirationToastWarningSeconds:(o=e==null?void 0:e.tokenExpirationToastWarningSeconds)!=null?o:P.tokenExpirationToastWarningSeconds}};c();var Ut=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),b=e=>Ut(y.Buffer.from(e,"utf8").toString("base64"));c();var Or=z(require("axios"));c();var Lr="blocks";function Rr(e){return G(this,null,function*(){let{data:r}=yield Or.default.get(`${e}/${Lr}?size=1&fields=hash,timestamp`),[t]=r;return t})}c();c();c();c();c();c();c();function W(e){return atob(e)}function St(e){return Object.prototype.toString.call(e)==="[object String]"}var br=e=>{if(!e||!St(e))return null;try{let[r,t,n]=e.split("."),i=W(r),o=W(t),[u,s,p,h]=o.split("."),l=JSON.parse(W(h)),f=W(u),d={ttl:Number(p),address:i,extraInfo:l,host:f,signature:n,blockHash:s,body:o};return h==="e30"&&delete d.extraInfo,d}catch(r){return null}};var Mr=({address:e,token:r,signature:t})=>{let n=b(e),i=b(r);return`${n}.${i}.${t}`};c();c();var Pr=()=>Date.now()/1e3;var Wr=e=>{let r=br(e);if(!r)return{isExpired:!1};let t=Pr(),{ttl:n,extraInfo:i}=r,o=i.timestamp;if(!o)return{isExpired:!1};let u=o+n,s=t>u,p=u-t;return{isExpired:s,expiresAt:u,secondsUntilExpires:p}};var Ct=e=>{let{hostname:r,apiAddress:t,expirySeconds:n}=ur(e);return{getNativeAuthConfig:ur,initialize:(...u)=>G(void 0,[...u],function*(o={}){let{hash:s,timestamp:p}=yield Rr(t),h=b(JSON.stringify(q(q({},o),p?{timestamp:p}:{})));return`${b(r)}.${s}.${n}.${h}`}),getToken:Mr,getTokenExpiration:Wr}};0&&(module.exports={nativeAuth});
1
+ "use strict";var Kr=Object.create;var G=Object.defineProperty;var Yr=Object.getOwnPropertyDescriptor;var qr=Object.getOwnPropertyNames,cr=Object.getOwnPropertySymbols,zr=Object.getPrototypeOf,fr=Object.prototype.hasOwnProperty,Jr=Object.prototype.propertyIsEnumerable;var hr=(e,r,t)=>r in e?G(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,z=(e,r)=>{for(var t in r||(r={}))fr.call(r,t)&&hr(e,t,r[t]);if(cr)for(var t of cr(r))Jr.call(r,t)&&hr(e,t,r[t]);return e};var Xr=(e,r)=>()=>(e&&(r=e(e=0)),r);var V=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Qr=(e,r)=>{for(var t in r)G(e,t,{get:r[t],enumerable:!0})},lr=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of qr(r))!fr.call(e,i)&&i!==t&&G(e,i,{get:()=>r[i],enumerable:!(n=Yr(r,i))||n.enumerable});return e};var J=(e,r,t)=>(t=e!=null?Kr(zr(e)):{},lr(r||!e||!e.__esModule?G(t,"default",{value:e,enumerable:!0}):t,e)),Zr=e=>lr(G({},"__esModule",{value:!0}),e);var R=(e,r,t)=>new Promise((n,i)=>{var o=s=>{try{p(t.next(s))}catch(c){i(c)}},u=s=>{try{p(t.throw(s))}catch(c){i(c)}},p=s=>s.done?n(s.value):Promise.resolve(s.value).then(o,u);p((t=t.apply(e,r)).next())});var wr=V($=>{"use strict";f();$.byteLength=rt;$.toByteArray=et;$.fromByteArray=ot;var F=[],A=[],jr=typeof Uint8Array!="undefined"?Uint8Array:Array,X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(C=0,xr=X.length;C<xr;++C)F[C]=X[C],A[X.charCodeAt(C)]=C;var C,xr;A["-".charCodeAt(0)]=62;A["_".charCodeAt(0)]=63;function yr(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function rt(e){var r=yr(e),t=r[0],n=r[1];return(t+n)*3/4-n}function tt(e,r,t){return(r+t)*3/4-t}function et(e){var r,t=yr(e),n=t[0],i=t[1],o=new jr(tt(e,n,i)),u=0,p=i>0?n-4:n,s;for(s=0;s<p;s+=4)r=A[e.charCodeAt(s)]<<18|A[e.charCodeAt(s+1)]<<12|A[e.charCodeAt(s+2)]<<6|A[e.charCodeAt(s+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return i===2&&(r=A[e.charCodeAt(s)]<<2|A[e.charCodeAt(s+1)]>>4,o[u++]=r&255),i===1&&(r=A[e.charCodeAt(s)]<<10|A[e.charCodeAt(s+1)]<<4|A[e.charCodeAt(s+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function nt(e){return F[e>>18&63]+F[e>>12&63]+F[e>>6&63]+F[e&63]}function it(e,r,t){for(var n,i=[],o=r;o<t;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(nt(n));return i.join("")}function ot(e){for(var r,t=e.length,n=t%3,i=[],o=16383,u=0,p=t-n;u<p;u+=o)i.push(it(e,u,u+o>p?p:u+o));return n===1?(r=e[t-1],i.push(F[r>>2]+F[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],i.push(F[r>>10]+F[r>>4&63]+F[r<<2&63]+"=")),i.join("")}});var mr=V(Q=>{f();Q.read=function(e,r,t,n,i){var o,u,p=i*8-n-1,s=(1<<p)-1,c=s>>1,l=-7,h=t?i-1:0,d=t?-1:1,T=e[r+h];for(h+=d,o=T&(1<<-l)-1,T>>=-l,l+=p;l>0;o=o*256+e[r+h],h+=d,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=n;l>0;u=u*256+e[r+h],h+=d,l-=8);if(o===0)o=1-c;else{if(o===s)return u?NaN:(T?-1:1)*(1/0);u=u+Math.pow(2,n),o=o-c}return(T?-1:1)*u*Math.pow(2,o-n)};Q.write=function(e,r,t,n,i,o){var u,p,s,c=o*8-i-1,l=(1<<c)-1,h=l>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=n?0:o-1,D=n?1:-1,$r=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(p=isNaN(r)?1:0,u=l):(u=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-u))<1&&(u--,s*=2),u+h>=1?r+=d/s:r+=d*Math.pow(2,1-h),r*s>=2&&(u++,s/=2),u+h>=l?(p=0,u=l):u+h>=1?(p=(r*s-1)*Math.pow(2,i),u=u+h):(p=r*Math.pow(2,h-1)*Math.pow(2,i),u=0));i>=8;e[t+T]=p&255,T+=D,p/=256,i-=8);for(u=u<<i|p,c+=i;c>0;e[t+T]=u&255,T+=D,u/=256,c-=8);e[t+T-D]|=$r*128}});var Cr=V(O=>{"use strict";f();var Z=wr(),L=mr(),Er=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;O.Buffer=a;O.SlowBuffer=ht;O.INSPECT_MAX_BYTES=50;var K=2147483647;O.kMaxLength=K;a.TYPED_ARRAY_SUPPORT=ut();!a.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ut(){try{var e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch(t){return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(!!a.isBuffer(this))return this.byteOffset}});function N(e){if(e>K)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return Object.setPrototypeOf(r,a.prototype),r}function a(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return er(e)}return Tr(e,r,t)}a.poolSize=8192;function Tr(e,r,t){if(typeof e=="string")return st(e,r);if(ArrayBuffer.isView(e))return pt(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(B(e,ArrayBuffer)||e&&B(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(B(e,SharedArrayBuffer)||e&&B(e.buffer,SharedArrayBuffer)))return rr(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return a.from(n,r,t);var i=ct(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return a.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}a.from=function(e,r,t){return Tr(e,r,t)};Object.setPrototypeOf(a.prototype,Uint8Array.prototype);Object.setPrototypeOf(a,Uint8Array);function Ar(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function at(e,r,t){return Ar(e),e<=0?N(e):r!==void 0?typeof t=="string"?N(e).fill(r,t):N(e).fill(r):N(e)}a.alloc=function(e,r,t){return at(e,r,t)};function er(e){return Ar(e),N(e<0?0:nr(e)|0)}a.allocUnsafe=function(e){return er(e)};a.allocUnsafeSlow=function(e){return er(e)};function st(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var t=Fr(e,r)|0,n=N(t),i=n.write(e,r);return i!==t&&(n=n.slice(0,i)),n}function j(e){for(var r=e.length<0?0:nr(e.length)|0,t=N(r),n=0;n<r;n+=1)t[n]=e[n]&255;return t}function pt(e){if(B(e,Uint8Array)){var r=new Uint8Array(e);return rr(r.buffer,r.byteOffset,r.byteLength)}return j(e)}function rr(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');var n;return r===void 0&&t===void 0?n=new Uint8Array(e):t===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,t),Object.setPrototypeOf(n,a.prototype),n}function ct(e){if(a.isBuffer(e)){var r=nr(e.length)|0,t=N(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||ir(e.length)?N(0):j(e);if(e.type==="Buffer"&&Array.isArray(e.data))return j(e.data)}function nr(e){if(e>=K)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K.toString(16)+" bytes");return e|0}function ht(e){return+e!=e&&(e=0),a.alloc(+e)}a.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==a.prototype};a.compare=function(r,t){if(B(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(r)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;for(var n=r.length,i=t.length,o=0,u=Math.min(n,i);o<u;++o)if(r[o]!==t[o]){n=r[o],i=t[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return a.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<r.length;++n)t+=r[n].length;var i=a.allocUnsafe(t),o=0;for(n=0;n<r.length;++n){var u=r[n];if(B(u,Uint8Array))o+u.length>i.length?a.from(u).copy(i,o):Uint8Array.prototype.set.call(i,u,o);else if(a.isBuffer(u))u.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=u.length}return i};function Fr(e,r){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||B(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return tr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Sr(e).length;default:if(i)return n?-1:tr(e).length;r=(""+r).toLowerCase(),i=!0}}a.byteLength=Fr;function ft(e,r,t){var n=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return At(this,r,t);case"utf8":case"utf-8":return Ir(this,r,t);case"ascii":return gt(this,r,t);case"latin1":case"binary":return Tt(this,r,t);case"base64":return Et(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ft(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}a.prototype._isBuffer=!0;function k(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}a.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<r;t+=2)k(this,t,t+1);return this};a.prototype.swap32=function(){var r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<r;t+=4)k(this,t,t+3),k(this,t+1,t+2);return this};a.prototype.swap64=function(){var r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<r;t+=8)k(this,t,t+7),k(this,t+1,t+6),k(this,t+2,t+5),k(this,t+3,t+4);return this};a.prototype.toString=function(){var r=this.length;return r===0?"":arguments.length===0?Ir(this,0,r):ft.apply(this,arguments)};a.prototype.toLocaleString=a.prototype.toString;a.prototype.equals=function(r){if(!a.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:a.compare(this,r)===0};a.prototype.inspect=function(){var r="",t=O.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};Er&&(a.prototype[Er]=a.prototype.inspect);a.prototype.compare=function(r,t,n,i,o){if(B(r,Uint8Array)&&(r=a.from(r,r.offset,r.byteLength)),!a.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),n===void 0&&(n=r?r.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),t<0||n>r.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===r)return 0;for(var u=o-i,p=n-t,s=Math.min(u,p),c=this.slice(i,o),l=r.slice(t,n),h=0;h<s;++h)if(c[h]!==l[h]){u=c[h],p=l[h];break}return u<p?-1:p<u?1:0};function Br(e,r,t,n,i){if(e.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,ir(t)&&(t=i?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(i)return-1;t=e.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof r=="string"&&(r=a.from(r,n)),a.isBuffer(r))return r.length===0?-1:dr(e,r,t,n,i);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):dr(e,[r],t,n,i);throw new TypeError("val must be string, number or Buffer")}function dr(e,r,t,n,i){var o=1,u=e.length,p=r.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,u/=2,p/=2,t/=2}function s(T,D){return o===1?T[D]:T.readUInt16BE(D*o)}var c;if(i){var l=-1;for(c=t;c<u;c++)if(s(e,c)===s(r,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===p)return l*o}else l!==-1&&(c-=c-l),l=-1}else for(t+p>u&&(t=u-p),c=t;c>=0;c--){for(var h=!0,d=0;d<p;d++)if(s(e,c+d)!==s(r,d)){h=!1;break}if(h)return c}return-1}a.prototype.includes=function(r,t,n){return this.indexOf(r,t,n)!==-1};a.prototype.indexOf=function(r,t,n){return Br(this,r,t,n,!0)};a.prototype.lastIndexOf=function(r,t,n){return Br(this,r,t,n,!1)};function lt(e,r,t,n){t=Number(t)||0;var i=e.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;n>o/2&&(n=o/2);for(var u=0;u<n;++u){var p=parseInt(r.substr(u*2,2),16);if(ir(p))return u;e[t+u]=p}return u}function xt(e,r,t,n){return Y(tr(r,e.length-t),e,t,n)}function yt(e,r,t,n){return Y(vt(r),e,t,n)}function wt(e,r,t,n){return Y(Sr(r),e,t,n)}function mt(e,r,t,n){return Y(Nt(r,e.length-t),e,t,n)}a.prototype.write=function(r,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-t;if((n===void 0||n>o)&&(n=o),r.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var u=!1;;)switch(i){case"hex":return lt(this,r,t,n);case"utf8":case"utf-8":return xt(this,r,t,n);case"ascii":case"latin1":case"binary":return yt(this,r,t,n);case"base64":return wt(this,r,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mt(this,r,t,n);default:if(u)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),u=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Et(e,r,t){return r===0&&t===e.length?Z.fromByteArray(e):Z.fromByteArray(e.slice(r,t))}function Ir(e,r,t){t=Math.min(e.length,t);for(var n=[],i=r;i<t;){var o=e[i],u=null,p=o>239?4:o>223?3:o>191?2:1;if(i+p<=t){var s,c,l,h;switch(p){case 1:o<128&&(u=o);break;case 2:s=e[i+1],(s&192)===128&&(h=(o&31)<<6|s&63,h>127&&(u=h));break;case 3:s=e[i+1],c=e[i+2],(s&192)===128&&(c&192)===128&&(h=(o&15)<<12|(s&63)<<6|c&63,h>2047&&(h<55296||h>57343)&&(u=h));break;case 4:s=e[i+1],c=e[i+2],l=e[i+3],(s&192)===128&&(c&192)===128&&(l&192)===128&&(h=(o&15)<<18|(s&63)<<12|(c&63)<<6|l&63,h>65535&&h<1114112&&(u=h))}}u===null?(u=65533,p=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u),i+=p}return dt(n)}var gr=4096;function dt(e){var r=e.length;if(r<=gr)return String.fromCharCode.apply(String,e);for(var t="",n=0;n<r;)t+=String.fromCharCode.apply(String,e.slice(n,n+=gr));return t}function gt(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]&127);return n}function Tt(e,r,t){var n="";t=Math.min(e.length,t);for(var i=r;i<t;++i)n+=String.fromCharCode(e[i]);return n}function At(e,r,t){var n=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>n)&&(t=n);for(var i="",o=r;o<t;++o)i+=Ut[e[o]];return i}function Ft(e,r,t){for(var n=e.slice(r,t),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}a.prototype.slice=function(r,t){var n=this.length;r=~~r,t=t===void 0?n:~~t,r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<r&&(t=r);var i=this.subarray(r,t);return Object.setPrototypeOf(i,a.prototype),i};function m(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=this[r],o=1,u=0;++u<t&&(o*=256);)i+=this[r+u]*o;return i};a.prototype.readUintBE=a.prototype.readUIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=this[r+--t],o=1;t>0&&(o*=256);)i+=this[r+--t]*o;return i};a.prototype.readUint8=a.prototype.readUInt8=function(r,t){return r=r>>>0,t||m(r,1,this.length),this[r]};a.prototype.readUint16LE=a.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||m(r,2,this.length),this[r]|this[r+1]<<8};a.prototype.readUint16BE=a.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||m(r,2,this.length),this[r]<<8|this[r+1]};a.prototype.readUint32LE=a.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||m(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};a.prototype.readUint32BE=a.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||m(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};a.prototype.readIntLE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=this[r],o=1,u=0;++u<t&&(o*=256);)i+=this[r+u]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i};a.prototype.readIntBE=function(r,t,n){r=r>>>0,t=t>>>0,n||m(r,t,this.length);for(var i=t,o=1,u=this[r+--i];i>0&&(o*=256);)u+=this[r+--i]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*t)),u};a.prototype.readInt8=function(r,t){return r=r>>>0,t||m(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};a.prototype.readInt16LE=function(r,t){r=r>>>0,t||m(r,2,this.length);var n=this[r]|this[r+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(r,t){r=r>>>0,t||m(r,2,this.length);var n=this[r+1]|this[r]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(r,t){return r=r>>>0,t||m(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};a.prototype.readInt32BE=function(r,t){return r=r>>>0,t||m(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};a.prototype.readFloatLE=function(r,t){return r=r>>>0,t||m(r,4,this.length),L.read(this,r,!0,23,4)};a.prototype.readFloatBE=function(r,t){return r=r>>>0,t||m(r,4,this.length),L.read(this,r,!1,23,4)};a.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||m(r,8,this.length),L.read(this,r,!0,52,8)};a.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||m(r,8,this.length),L.read(this,r,!1,52,8)};function g(e,r,t,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){var o=Math.pow(2,8*n)-1;g(this,r,t,n,o,0)}var u=1,p=0;for(this[t]=r&255;++p<n&&(u*=256);)this[t+p]=r/u&255;return t+n};a.prototype.writeUintBE=a.prototype.writeUIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,n=n>>>0,!i){var o=Math.pow(2,8*n)-1;g(this,r,t,n,o,0)}var u=n-1,p=1;for(this[t+u]=r&255;--u>=0&&(p*=256);)this[t+u]=r/p&255;return t+n};a.prototype.writeUint8=a.prototype.writeUInt8=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,1,255,0),this[t]=r&255,t+1};a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};a.prototype.writeIntLE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){var o=Math.pow(2,8*n-1);g(this,r,t,n,o-1,-o)}var u=0,p=1,s=0;for(this[t]=r&255;++u<n&&(p*=256);)r<0&&s===0&&this[t+u-1]!==0&&(s=1),this[t+u]=(r/p>>0)-s&255;return t+n};a.prototype.writeIntBE=function(r,t,n,i){if(r=+r,t=t>>>0,!i){var o=Math.pow(2,8*n-1);g(this,r,t,n,o-1,-o)}var u=n-1,p=1,s=0;for(this[t+u]=r&255;--u>=0&&(p*=256);)r<0&&s===0&&this[t+u+1]!==0&&(s=1),this[t+u]=(r/p>>0)-s&255;return t+n};a.prototype.writeInt8=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};a.prototype.writeInt16LE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};a.prototype.writeInt16BE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};a.prototype.writeInt32LE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};a.prototype.writeInt32BE=function(r,t,n){return r=+r,t=t>>>0,n||g(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function vr(e,r,t,n,i,o){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Nr(e,r,t,n,i){return r=+r,t=t>>>0,i||vr(e,r,t,4,34028234663852886e22,-34028234663852886e22),L.write(e,r,t,n,23,4),t+4}a.prototype.writeFloatLE=function(r,t,n){return Nr(this,r,t,!0,n)};a.prototype.writeFloatBE=function(r,t,n){return Nr(this,r,t,!1,n)};function Ur(e,r,t,n,i){return r=+r,t=t>>>0,i||vr(e,r,t,8,17976931348623157e292,-17976931348623157e292),L.write(e,r,t,n,52,8),t+8}a.prototype.writeDoubleLE=function(r,t,n){return Ur(this,r,t,!0,n)};a.prototype.writeDoubleBE=function(r,t,n){return Ur(this,r,t,!1,n)};a.prototype.copy=function(r,t,n,i){if(!a.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=r.length&&(t=r.length),t||(t=0),i>0&&i<n&&(i=n),i===n||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-t<i-n&&(i=r.length-t+n);var o=i-n;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(r,this.subarray(n,i),t),o};a.prototype.fill=function(r,t,n,i){if(typeof r=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(r.length===1){var o=r.charCodeAt(0);(i==="utf8"&&o<128||i==="latin1")&&(r=o)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,r||(r=0);var u;if(typeof r=="number")for(u=t;u<n;++u)this[u]=r;else{var p=a.isBuffer(r)?r:a.from(r,i),s=p.length;if(s===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(u=0;u<n-t;++u)this[u+t]=p[u%s]}return this};var Bt=/[^+/0-9A-Za-z-_]/g;function It(e){if(e=e.split("=")[0],e=e.trim().replace(Bt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function tr(e,r){r=r||1/0;for(var t,n=e.length,i=null,o=[],u=0;u<n;++u){if(t=e.charCodeAt(u),t>55295&&t<57344){if(!i){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function vt(e){for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function Nt(e,r){for(var t,n,i,o=[],u=0;u<e.length&&!((r-=2)<0);++u)t=e.charCodeAt(u),n=t>>8,i=t%256,o.push(i),o.push(n);return o}function Sr(e){return Z.toByteArray(It(e))}function Y(e,r,t,n){for(var i=0;i<n&&!(i+t>=r.length||i>=e.length);++i)r[i+t]=e[i];return i}function B(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function ir(e){return e!==e}var Ut=function(){for(var e="0123456789abcdef",r=new Array(256),t=0;t<16;++t)for(var n=t*16,i=0;i<16;++i)r[n+i]=e[t]+e[i];return r}()});var Lr=V((Wt,Rr)=>{f();var x=Rr.exports={},I,v;function or(){throw new Error("setTimeout has not been defined")}function ur(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?I=setTimeout:I=or}catch(e){I=or}try{typeof clearTimeout=="function"?v=clearTimeout:v=ur}catch(e){v=ur}})();function kr(e){if(I===setTimeout)return setTimeout(e,0);if((I===or||!I)&&setTimeout)return I=setTimeout,setTimeout(e,0);try{return I(e,0)}catch(r){try{return I.call(null,e,0)}catch(t){return I.call(this,e,0)}}}function St(e){if(v===clearTimeout)return clearTimeout(e);if((v===ur||!v)&&clearTimeout)return v=clearTimeout,clearTimeout(e);try{return v(e)}catch(r){try{return v.call(null,e)}catch(t){return v.call(this,e)}}}var U=[],b=!1,_,q=-1;function Ct(){!b||!_||(b=!1,_.length?U=_.concat(U):q=-1,U.length&&_r())}function _r(){if(!b){var e=kr(Ct);b=!0;for(var r=U.length;r;){for(_=U,U=[];++q<r;)_&&_[q].run();q=-1,r=U.length}_=null,b=!1,St(e)}}x.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];U.push(new Dr(e,r)),U.length===1&&!b&&kr(_r)};function Dr(e,r){this.fun=e,this.array=r}Dr.prototype.run=function(){this.fun.apply(null,this.array)};x.title="browser";x.browser=!0;x.env={};x.argv=[];x.version="";x.versions={};function S(){}x.on=S;x.addListener=S;x.once=S;x.off=S;x.removeListener=S;x.removeAllListeners=S;x.emit=S;x.prependListener=S;x.prependOnceListener=S;x.listeners=function(e){return[]};x.binding=function(e){throw new Error("process.binding is not supported")};x.cwd=function(){return"/"};x.chdir=function(e){throw new Error("process.chdir is not supported")};x.umask=function(){return 0}});var y,w,Vt,f=Xr(()=>{y=J(Cr()),w=J(Lr()),Vt=function(e){function r(){var n=this||self;return delete e.prototype.__magic__,n}if(typeof globalThis=="object")return globalThis;if(this)return r();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:r});var t=__magic__;return t}(Object)});var bt={};Qr(bt,{nativeAuth:()=>Ot});module.exports=Zr(bt);f();f();var kt=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),M=e=>kt(y.Buffer.from(e,"utf8").toString("base64"));f();var br=J(require("axios"));f();var Or="blocks";var _t=5e4,ar=null,P={current:null},sr=!1;function Mr(e){return R(this,null,function*(){if(e==null)throw new Error("missing api url");if(ar!=null&&Date.now()<ar&&P.current!=null)return P.current;{if(sr)return yield Rt();sr=!0,P.current=null;let t=yield Dt(e);return P.current=t,ar=Date.now()+_t,sr=!1,t}})}function Dt(e){return R(this,null,function*(){let{data:r}=yield br.default.get(`${e}/${Or}?size=1&fields=hash,timestamp`),[t]=r;return t})}function Rt(){return R(this,null,function*(){return new Promise((e,r)=>{let t,n=setInterval(()=>{P.current!=null&&(e(P.current),clearInterval(n),clearTimeout(t))},50);t=setTimeout(()=>{clearInterval(n),r("could not generate new token")},5e3)})})}f();var Pr,H={hostname:typeof window!="undefined"?(Pr=window==null?void 0:window.location)==null?void 0:Pr.hostname:"",apiAddress:"https://api.multiversx.com",expirySeconds:60*60*24,tokenExpirationToastWarningSeconds:5*60},pr=e=>{var t,n,i,o;return e===!0?H:{hostname:(t=e==null?void 0:e.hostname)!=null?t:H.hostname,expirySeconds:(n=e==null?void 0:e.expirySeconds)!=null?n:H.expirySeconds,apiAddress:(i=e==null?void 0:e.apiAddress)!=null?i:H.apiAddress,tokenExpirationToastWarningSeconds:(o=e==null?void 0:e.tokenExpirationToastWarningSeconds)!=null?o:H.tokenExpirationToastWarningSeconds}};f();f();f();f();f();f();f();function W(e){return atob(e)}function Lt(e){return Object.prototype.toString.call(e)==="[object String]"}var Gr=e=>{if(!e||!Lt(e))return null;try{let[r,t,n]=e.split("."),i=W(r),o=W(t),[u,p,s,c]=o.split("."),l=JSON.parse(W(c)),h=W(u),d={ttl:Number(s),address:i,extraInfo:l,host:h,signature:n,blockHash:p,body:o};return c==="e30"&&delete d.extraInfo,d}catch(r){return null}};var Hr=({address:e,token:r,signature:t})=>{let n=M(e),i=M(r);return`${n}.${i}.${t}`};f();f();var Wr=()=>Date.now()/1e3;var Vr=e=>{let r=Gr(e);if(!r)return{isExpired:!1};let t=Wr(),{ttl:n,extraInfo:i}=r,o=i.timestamp;if(!o)return{isExpired:!1};let u=o+n,p=t>u,s=u-t;return{isExpired:p,expiresAt:u,secondsUntilExpires:s}};var Ot=e=>{let{hostname:r,apiAddress:t,expirySeconds:n}=pr(e);return{getNativeAuthConfig:pr,initialize:(...u)=>R(void 0,[...u],function*(o={}){let{hash:p,timestamp:s}=yield Mr(t),c=M(JSON.stringify(z(z({},o),s?{timestamp:s}:{})));return`${M(r)}.${p}.${n}.${c}`}),getToken:Hr,getTokenExpiration:Vr}};0&&(module.exports={nativeAuth});
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *