@btc-vision/transaction 1.8.0-beta.3 → 1.8.0-beta.5

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 (764) hide show
  1. package/browser/_version.d.ts +1 -0
  2. package/browser/_version.d.ts.map +1 -0
  3. package/browser/abi/ABICoder.d.ts +1 -1
  4. package/browser/abi/ABICoder.d.ts.map +1 -0
  5. package/browser/branded/Branded.d.ts +4 -0
  6. package/browser/branded/Branded.d.ts.map +1 -0
  7. package/browser/btc-vision-bitcoin.js +11999 -2647
  8. package/browser/buffer/BinaryReader.d.ts +120 -1
  9. package/browser/buffer/BinaryReader.d.ts.map +1 -0
  10. package/browser/buffer/BinaryWriter.d.ts +51 -1
  11. package/browser/buffer/BinaryWriter.d.ts.map +1 -0
  12. package/browser/bytecode/Compressor.d.ts +12 -0
  13. package/browser/bytecode/Compressor.d.ts.map +1 -0
  14. package/browser/chain/ChainData.d.ts +2 -2
  15. package/browser/chain/ChainData.d.ts.map +1 -0
  16. package/browser/consensus/Consensus.d.ts +11 -3
  17. package/browser/consensus/Consensus.d.ts.map +1 -0
  18. package/browser/consensus/ConsensusConfig.d.ts +1 -0
  19. package/browser/consensus/ConsensusConfig.d.ts.map +1 -0
  20. package/browser/consensus/IConsensusConfig.d.ts +1 -0
  21. package/browser/consensus/IConsensusConfig.d.ts.map +1 -0
  22. package/browser/consensus/metadata/RoswellConsensus.d.ts +1 -0
  23. package/browser/consensus/metadata/RoswellConsensus.d.ts.map +1 -0
  24. package/browser/crypto/crypto.d.ts +1 -0
  25. package/browser/crypto/crypto.d.ts.map +1 -0
  26. package/browser/deterministic/AddressMap.d.ts +6 -1
  27. package/browser/deterministic/AddressMap.d.ts.map +1 -0
  28. package/browser/deterministic/AddressSet.d.ts +3 -1
  29. package/browser/deterministic/AddressSet.d.ts.map +1 -0
  30. package/browser/deterministic/CustomMap.d.ts +3 -1
  31. package/browser/deterministic/CustomMap.d.ts.map +1 -0
  32. package/browser/deterministic/DeterministicMap.d.ts +3 -1
  33. package/browser/deterministic/DeterministicMap.d.ts.map +1 -0
  34. package/browser/deterministic/DeterministicSet.d.ts +3 -1
  35. package/browser/deterministic/DeterministicSet.d.ts.map +1 -0
  36. package/browser/deterministic/ExtendedAddressMap.d.ts +7 -1
  37. package/browser/deterministic/ExtendedAddressMap.d.ts.map +1 -0
  38. package/browser/deterministic/FastMap.d.ts +7 -1
  39. package/browser/deterministic/FastMap.d.ts.map +1 -0
  40. package/browser/ecc/backend.d.ts +13 -0
  41. package/browser/ecc/backend.d.ts.map +1 -0
  42. package/browser/epoch/ChallengeSolution.d.ts +33 -1
  43. package/browser/epoch/ChallengeSolution.d.ts.map +1 -0
  44. package/browser/epoch/interfaces/IChallengeSolution.d.ts +14 -13
  45. package/browser/epoch/interfaces/IChallengeSolution.d.ts.map +1 -0
  46. package/browser/epoch/validator/EpochValidator.d.ts +37 -7
  47. package/browser/epoch/validator/EpochValidator.d.ts.map +1 -0
  48. package/browser/event/NetEvent.d.ts +1 -0
  49. package/browser/event/NetEvent.d.ts.map +1 -0
  50. package/browser/generators/AddressGenerator.d.ts +4 -3
  51. package/browser/generators/AddressGenerator.d.ts.map +1 -0
  52. package/browser/generators/Features.d.ts +1 -0
  53. package/browser/generators/Features.d.ts.map +1 -0
  54. package/browser/generators/Generator.d.ts +46 -10
  55. package/browser/generators/Generator.d.ts.map +1 -0
  56. package/browser/generators/MLDSAData.d.ts +1 -0
  57. package/browser/generators/MLDSAData.d.ts.map +1 -0
  58. package/browser/generators/builders/CalldataGenerator.d.ts +25 -4
  59. package/browser/generators/builders/CalldataGenerator.d.ts.map +1 -0
  60. package/browser/generators/builders/CustomGenerator.d.ts +13 -3
  61. package/browser/generators/builders/CustomGenerator.d.ts.map +1 -0
  62. package/browser/generators/builders/DeploymentGenerator.d.ts +15 -4
  63. package/browser/generators/builders/DeploymentGenerator.d.ts.map +1 -0
  64. package/browser/generators/builders/HashCommitmentGenerator.d.ts +164 -12
  65. package/browser/generators/builders/HashCommitmentGenerator.d.ts.map +1 -0
  66. package/browser/generators/builders/LegacyCalldataGenerator.d.ts +26 -4
  67. package/browser/generators/builders/LegacyCalldataGenerator.d.ts.map +1 -0
  68. package/browser/generators/builders/MultiSignGenerator.d.ts +6 -1
  69. package/browser/generators/builders/MultiSignGenerator.d.ts.map +1 -0
  70. package/browser/generators/builders/P2WDAGenerator.d.ts +42 -4
  71. package/browser/generators/builders/P2WDAGenerator.d.ts.map +1 -0
  72. package/browser/index.d.ts +1 -0
  73. package/browser/index.d.ts.map +1 -0
  74. package/browser/index.js +3558 -3167
  75. package/browser/keypair/Address.d.ts +283 -13
  76. package/browser/keypair/Address.d.ts.map +1 -0
  77. package/browser/keypair/AddressVerificator.d.ts +7 -6
  78. package/browser/keypair/AddressVerificator.d.ts.map +1 -0
  79. package/browser/keypair/EcKeyPair.d.ts +183 -21
  80. package/browser/keypair/EcKeyPair.d.ts.map +1 -0
  81. package/browser/keypair/MessageSigner.d.ts +17 -16
  82. package/browser/keypair/MessageSigner.d.ts.map +1 -0
  83. package/browser/keypair/Secp256k1PointDeriver.d.ts +55 -0
  84. package/browser/keypair/Secp256k1PointDeriver.d.ts.map +1 -0
  85. package/browser/keypair/Wallet.d.ts +27 -13
  86. package/browser/keypair/Wallet.d.ts.map +1 -0
  87. package/browser/keypair/interfaces/IWallet.d.ts +19 -0
  88. package/browser/keypair/interfaces/IWallet.d.ts.map +1 -0
  89. package/browser/metadata/ContractBaseMetadata.d.ts +10 -2
  90. package/browser/metadata/ContractBaseMetadata.d.ts.map +1 -0
  91. package/browser/mnemonic/BIPStandard.d.ts +59 -0
  92. package/browser/mnemonic/BIPStandard.d.ts.map +1 -0
  93. package/browser/mnemonic/Mnemonic.d.ts +15 -3
  94. package/browser/mnemonic/Mnemonic.d.ts.map +1 -0
  95. package/browser/mnemonic/MnemonicStrength.d.ts +6 -0
  96. package/browser/mnemonic/MnemonicStrength.d.ts.map +1 -0
  97. package/browser/network/ChainId.d.ts +1 -0
  98. package/browser/network/ChainId.d.ts.map +1 -0
  99. package/browser/noble-curves.js +844 -2746
  100. package/browser/noble-hashes.js +1338 -2067
  101. package/browser/opnet.d.ts +22 -1
  102. package/browser/opnet.d.ts.map +1 -0
  103. package/browser/p2wda/P2WDADetector.d.ts +36 -9
  104. package/browser/p2wda/P2WDADetector.d.ts.map +1 -0
  105. package/browser/polyfill/disposable.d.ts +16 -0
  106. package/browser/polyfill/disposable.d.ts.map +1 -0
  107. package/browser/signer/AddressRotation.d.ts +36 -0
  108. package/browser/signer/AddressRotation.d.ts.map +1 -0
  109. package/browser/signer/IRotationSigner.d.ts +27 -3
  110. package/browser/signer/IRotationSigner.d.ts.map +1 -0
  111. package/browser/signer/ParallelSignerAdapter.d.ts +14 -0
  112. package/browser/signer/ParallelSignerAdapter.d.ts.map +1 -0
  113. package/browser/signer/SignerUtils.d.ts +11 -4
  114. package/browser/signer/SignerUtils.d.ts.map +1 -0
  115. package/browser/signer/TweakedSigner.d.ts +28 -4
  116. package/browser/signer/TweakedSigner.d.ts.map +1 -0
  117. package/browser/transaction/ContractAddress.d.ts +2 -2
  118. package/browser/transaction/ContractAddress.d.ts.map +1 -0
  119. package/browser/transaction/TransactionFactory.d.ts +140 -2
  120. package/browser/transaction/TransactionFactory.d.ts.map +1 -0
  121. package/browser/transaction/browser/BrowserSignerBase.d.ts +12 -6
  122. package/browser/transaction/browser/BrowserSignerBase.d.ts.map +1 -0
  123. package/browser/transaction/browser/WalletNetworks.d.ts +1 -0
  124. package/browser/transaction/browser/WalletNetworks.d.ts.map +1 -0
  125. package/browser/transaction/browser/Web3Provider.d.ts +27 -0
  126. package/browser/transaction/browser/Web3Provider.d.ts.map +1 -0
  127. package/browser/transaction/browser/extensions/UnisatSigner.d.ts +9 -7
  128. package/browser/transaction/browser/extensions/UnisatSigner.d.ts.map +1 -0
  129. package/browser/transaction/browser/extensions/XverseSigner.d.ts +9 -7
  130. package/browser/transaction/browser/extensions/XverseSigner.d.ts.map +1 -0
  131. package/browser/transaction/browser/types/OPWallet.d.ts +10 -0
  132. package/browser/transaction/browser/types/OPWallet.d.ts.map +1 -0
  133. package/browser/transaction/browser/types/Unisat.d.ts +1 -0
  134. package/browser/transaction/browser/types/Unisat.d.ts.map +1 -0
  135. package/browser/transaction/browser/types/Xverse.d.ts +1 -0
  136. package/browser/transaction/browser/types/Xverse.d.ts.map +1 -0
  137. package/browser/transaction/builders/CancelTransaction.d.ts +29 -4
  138. package/browser/transaction/builders/CancelTransaction.d.ts.map +1 -0
  139. package/browser/transaction/builders/ChallengeSolutionTransaction.d.ts +1 -0
  140. package/browser/transaction/builders/ChallengeSolutionTransaction.d.ts.map +1 -0
  141. package/browser/transaction/builders/ConsolidatedInteractionTransaction.d.ts +137 -10
  142. package/browser/transaction/builders/ConsolidatedInteractionTransaction.d.ts.map +1 -0
  143. package/browser/transaction/builders/CustomScriptTransaction.d.ts +106 -6
  144. package/browser/transaction/builders/CustomScriptTransaction.d.ts.map +1 -0
  145. package/browser/transaction/builders/DeploymentTransaction.d.ts +116 -5
  146. package/browser/transaction/builders/DeploymentTransaction.d.ts.map +1 -0
  147. package/browser/transaction/builders/FundingTransaction.d.ts +4 -3
  148. package/browser/transaction/builders/FundingTransaction.d.ts.map +1 -0
  149. package/browser/transaction/builders/InteractionTransaction.d.ts +12 -3
  150. package/browser/transaction/builders/InteractionTransaction.d.ts.map +1 -0
  151. package/browser/transaction/builders/InteractionTransactionP2WDA.d.ts +56 -5
  152. package/browser/transaction/builders/InteractionTransactionP2WDA.d.ts.map +1 -0
  153. package/browser/transaction/builders/MultiSignTransaction.d.ts +125 -16
  154. package/browser/transaction/builders/MultiSignTransaction.d.ts.map +1 -0
  155. package/browser/transaction/builders/SharedInteractionTransaction.d.ts +103 -15
  156. package/browser/transaction/builders/SharedInteractionTransaction.d.ts.map +1 -0
  157. package/browser/transaction/builders/TransactionBuilder.d.ts +243 -14
  158. package/browser/transaction/builders/TransactionBuilder.d.ts.map +1 -0
  159. package/browser/transaction/enums/TransactionType.d.ts +1 -0
  160. package/browser/transaction/enums/TransactionType.d.ts.map +1 -0
  161. package/browser/transaction/interfaces/ICancelTransactionParameters.d.ts +2 -1
  162. package/browser/transaction/interfaces/ICancelTransactionParameters.d.ts.map +1 -0
  163. package/browser/transaction/interfaces/IConsolidatedTransactionParameters.d.ts +46 -3
  164. package/browser/transaction/interfaces/IConsolidatedTransactionParameters.d.ts.map +1 -0
  165. package/browser/transaction/interfaces/ICustomTransactionParameters.d.ts +6 -4
  166. package/browser/transaction/interfaces/ICustomTransactionParameters.d.ts.map +1 -0
  167. package/browser/transaction/interfaces/ITransactionParameters.d.ts +22 -10
  168. package/browser/transaction/interfaces/ITransactionParameters.d.ts.map +1 -0
  169. package/browser/transaction/interfaces/ITransactionResponses.d.ts +1 -0
  170. package/browser/transaction/interfaces/ITransactionResponses.d.ts.map +1 -0
  171. package/browser/transaction/interfaces/ITweakedTransactionData.d.ts +17 -5
  172. package/browser/transaction/interfaces/ITweakedTransactionData.d.ts.map +1 -0
  173. package/browser/transaction/interfaces/IWeb3ProviderTypes.d.ts +26 -0
  174. package/browser/transaction/interfaces/IWeb3ProviderTypes.d.ts.map +1 -0
  175. package/browser/transaction/interfaces/Tap.d.ts +4 -3
  176. package/browser/transaction/interfaces/Tap.d.ts.map +1 -0
  177. package/browser/transaction/mineable/IP2WSHAddress.d.ts +2 -1
  178. package/browser/transaction/mineable/IP2WSHAddress.d.ts.map +1 -0
  179. package/browser/transaction/mineable/TimelockGenerator.d.ts +12 -3
  180. package/browser/transaction/mineable/TimelockGenerator.d.ts.map +1 -0
  181. package/browser/transaction/offline/OfflineTransactionManager.d.ts +190 -9
  182. package/browser/transaction/offline/OfflineTransactionManager.d.ts.map +1 -0
  183. package/browser/transaction/offline/TransactionReconstructor.d.ts +53 -3
  184. package/browser/transaction/offline/TransactionReconstructor.d.ts.map +1 -0
  185. package/browser/transaction/offline/TransactionSerializer.d.ts +53 -2
  186. package/browser/transaction/offline/TransactionSerializer.d.ts.map +1 -0
  187. package/browser/transaction/offline/TransactionStateCapture.d.ts +64 -5
  188. package/browser/transaction/offline/TransactionStateCapture.d.ts.map +1 -0
  189. package/browser/transaction/offline/interfaces/ISerializableState.d.ts +71 -0
  190. package/browser/transaction/offline/interfaces/ISerializableState.d.ts.map +1 -0
  191. package/browser/transaction/offline/interfaces/ITypeSpecificData.d.ts +76 -0
  192. package/browser/transaction/offline/interfaces/ITypeSpecificData.d.ts.map +1 -0
  193. package/browser/transaction/psbt/PSBTTypes.d.ts +1 -0
  194. package/browser/transaction/psbt/PSBTTypes.d.ts.map +1 -0
  195. package/browser/transaction/shared/P2TR_MS.d.ts +11 -2
  196. package/browser/transaction/shared/P2TR_MS.d.ts.map +1 -0
  197. package/browser/transaction/shared/TweakedTransaction.d.ts +274 -33
  198. package/browser/transaction/shared/TweakedTransaction.d.ts.map +1 -0
  199. package/browser/transaction/utils/WitnessUtils.d.ts +7 -1
  200. package/browser/transaction/utils/WitnessUtils.d.ts.map +1 -0
  201. package/browser/utils/BitcoinUtils.d.ts +19 -0
  202. package/browser/utils/BitcoinUtils.d.ts.map +1 -0
  203. package/browser/utils/BufferHelper.d.ts +1 -0
  204. package/browser/utils/BufferHelper.d.ts.map +1 -0
  205. package/browser/utils/StringToBuffer.d.ts +1 -0
  206. package/browser/utils/StringToBuffer.d.ts.map +1 -0
  207. package/browser/utils/lengths.d.ts +1 -0
  208. package/browser/utils/lengths.d.ts.map +1 -0
  209. package/browser/utils/types.d.ts +1 -0
  210. package/browser/utils/types.d.ts.map +1 -0
  211. package/browser/utxo/OPNetLimitedProvider.d.ts +37 -1
  212. package/browser/utxo/OPNetLimitedProvider.d.ts.map +1 -0
  213. package/browser/utxo/interfaces/BroadcastResponse.d.ts +1 -0
  214. package/browser/utxo/interfaces/BroadcastResponse.d.ts.map +1 -0
  215. package/browser/utxo/interfaces/IUTXO.d.ts +11 -5
  216. package/browser/utxo/interfaces/IUTXO.d.ts.map +1 -0
  217. package/browser/vendors.js +14351 -10031
  218. package/browser/verification/TapscriptVerificator.d.ts +10 -8
  219. package/browser/verification/TapscriptVerificator.d.ts.map +1 -0
  220. package/build/_version.d.ts +1 -0
  221. package/build/_version.d.ts.map +1 -0
  222. package/build/_version.js +1 -0
  223. package/build/_version.js.map +1 -0
  224. package/build/abi/ABICoder.d.ts +1 -1
  225. package/build/abi/ABICoder.d.ts.map +1 -0
  226. package/build/abi/ABICoder.js +9 -10
  227. package/build/abi/ABICoder.js.map +1 -0
  228. package/build/branded/Branded.d.ts +4 -0
  229. package/build/branded/Branded.d.ts.map +1 -0
  230. package/build/branded/Branded.js +2 -0
  231. package/build/branded/Branded.js.map +1 -0
  232. package/build/buffer/BinaryReader.d.ts +121 -2
  233. package/build/buffer/BinaryReader.d.ts.map +1 -0
  234. package/build/buffer/BinaryReader.js +129 -5
  235. package/build/buffer/BinaryReader.js.map +1 -0
  236. package/build/buffer/BinaryWriter.d.ts +52 -2
  237. package/build/buffer/BinaryWriter.d.ts.map +1 -0
  238. package/build/buffer/BinaryWriter.js +62 -2
  239. package/build/buffer/BinaryWriter.js.map +1 -0
  240. package/build/bytecode/Compressor.d.ts +12 -0
  241. package/build/bytecode/Compressor.d.ts.map +1 -0
  242. package/build/bytecode/Compressor.js +17 -5
  243. package/build/bytecode/Compressor.js.map +1 -0
  244. package/build/chain/ChainData.d.ts +2 -2
  245. package/build/chain/ChainData.d.ts.map +1 -0
  246. package/build/chain/ChainData.js +35 -17
  247. package/build/chain/ChainData.js.map +1 -0
  248. package/build/consensus/Consensus.d.ts +11 -3
  249. package/build/consensus/Consensus.d.ts.map +1 -0
  250. package/build/consensus/Consensus.js +8 -0
  251. package/build/consensus/Consensus.js.map +1 -0
  252. package/build/consensus/ConsensusConfig.d.ts +2 -1
  253. package/build/consensus/ConsensusConfig.d.ts.map +1 -0
  254. package/build/consensus/ConsensusConfig.js +1 -0
  255. package/build/consensus/ConsensusConfig.js.map +1 -0
  256. package/build/consensus/IConsensusConfig.d.ts +1 -0
  257. package/build/consensus/IConsensusConfig.d.ts.map +1 -0
  258. package/build/consensus/IConsensusConfig.js +2 -1
  259. package/build/consensus/IConsensusConfig.js.map +1 -0
  260. package/build/consensus/metadata/RoswellConsensus.d.ts +2 -1
  261. package/build/consensus/metadata/RoswellConsensus.d.ts.map +1 -0
  262. package/build/consensus/metadata/RoswellConsensus.js +2 -0
  263. package/build/consensus/metadata/RoswellConsensus.js.map +1 -0
  264. package/build/crypto/crypto.d.ts +1 -0
  265. package/build/crypto/crypto.d.ts.map +1 -0
  266. package/build/crypto/crypto.js +1 -0
  267. package/build/crypto/crypto.js.map +1 -0
  268. package/build/deterministic/AddressMap.d.ts +6 -1
  269. package/build/deterministic/AddressMap.d.ts.map +1 -0
  270. package/build/deterministic/AddressMap.js +8 -0
  271. package/build/deterministic/AddressMap.js.map +1 -0
  272. package/build/deterministic/AddressSet.d.ts +3 -1
  273. package/build/deterministic/AddressSet.d.ts.map +1 -0
  274. package/build/deterministic/AddressSet.js +7 -0
  275. package/build/deterministic/AddressSet.js.map +1 -0
  276. package/build/deterministic/CustomMap.d.ts +3 -1
  277. package/build/deterministic/CustomMap.d.ts.map +1 -0
  278. package/build/deterministic/CustomMap.js +65 -47
  279. package/build/deterministic/CustomMap.js.map +1 -0
  280. package/build/deterministic/DeterministicMap.d.ts +4 -2
  281. package/build/deterministic/DeterministicMap.d.ts.map +1 -0
  282. package/build/deterministic/DeterministicMap.js +24 -27
  283. package/build/deterministic/DeterministicMap.js.map +1 -0
  284. package/build/deterministic/DeterministicSet.d.ts +3 -1
  285. package/build/deterministic/DeterministicSet.d.ts.map +1 -0
  286. package/build/deterministic/DeterministicSet.js +6 -0
  287. package/build/deterministic/DeterministicSet.js.map +1 -0
  288. package/build/deterministic/ExtendedAddressMap.d.ts +7 -1
  289. package/build/deterministic/ExtendedAddressMap.d.ts.map +1 -0
  290. package/build/deterministic/ExtendedAddressMap.js +18 -2
  291. package/build/deterministic/ExtendedAddressMap.js.map +1 -0
  292. package/build/deterministic/FastMap.d.ts +7 -1
  293. package/build/deterministic/FastMap.d.ts.map +1 -0
  294. package/build/deterministic/FastMap.js +7 -2
  295. package/build/deterministic/FastMap.js.map +1 -0
  296. package/build/ecc/backend.d.ts +13 -0
  297. package/build/ecc/backend.d.ts.map +1 -0
  298. package/build/ecc/backend.js +15 -0
  299. package/build/ecc/backend.js.map +1 -0
  300. package/build/epoch/ChallengeSolution.d.ts +34 -2
  301. package/build/epoch/ChallengeSolution.d.ts.map +1 -0
  302. package/build/epoch/ChallengeSolution.js +52 -0
  303. package/build/epoch/ChallengeSolution.js.map +1 -0
  304. package/build/epoch/interfaces/IChallengeSolution.d.ts +14 -13
  305. package/build/epoch/interfaces/IChallengeSolution.d.ts.map +1 -0
  306. package/build/epoch/interfaces/IChallengeSolution.js +2 -1
  307. package/build/epoch/interfaces/IChallengeSolution.js.map +1 -0
  308. package/build/epoch/validator/EpochValidator.d.ts +38 -8
  309. package/build/epoch/validator/EpochValidator.d.ts.map +1 -0
  310. package/build/epoch/validator/EpochValidator.js +45 -19
  311. package/build/epoch/validator/EpochValidator.js.map +1 -0
  312. package/build/event/NetEvent.d.ts +1 -0
  313. package/build/event/NetEvent.d.ts.map +1 -0
  314. package/build/event/NetEvent.js +3 -0
  315. package/build/event/NetEvent.js.map +1 -0
  316. package/build/generators/AddressGenerator.d.ts +4 -3
  317. package/build/generators/AddressGenerator.d.ts.map +1 -0
  318. package/build/generators/AddressGenerator.js +9 -4
  319. package/build/generators/AddressGenerator.js.map +1 -0
  320. package/build/generators/Features.d.ts +4 -3
  321. package/build/generators/Features.d.ts.map +1 -0
  322. package/build/generators/Features.js +1 -0
  323. package/build/generators/Features.js.map +1 -0
  324. package/build/generators/Generator.d.ts +47 -11
  325. package/build/generators/Generator.d.ts.map +1 -0
  326. package/build/generators/Generator.js +48 -12
  327. package/build/generators/Generator.js.map +1 -0
  328. package/build/generators/MLDSAData.d.ts +1 -0
  329. package/build/generators/MLDSAData.d.ts.map +1 -0
  330. package/build/generators/MLDSAData.js +1 -0
  331. package/build/generators/MLDSAData.js.map +1 -0
  332. package/build/generators/builders/CalldataGenerator.d.ts +27 -6
  333. package/build/generators/builders/CalldataGenerator.d.ts.map +1 -0
  334. package/build/generators/builders/CalldataGenerator.js +33 -4
  335. package/build/generators/builders/CalldataGenerator.js.map +1 -0
  336. package/build/generators/builders/CustomGenerator.d.ts +13 -3
  337. package/build/generators/builders/CustomGenerator.d.ts.map +1 -0
  338. package/build/generators/builders/CustomGenerator.js +11 -0
  339. package/build/generators/builders/CustomGenerator.js.map +1 -0
  340. package/build/generators/builders/DeploymentGenerator.d.ts +17 -6
  341. package/build/generators/builders/DeploymentGenerator.d.ts.map +1 -0
  342. package/build/generators/builders/DeploymentGenerator.js +18 -2
  343. package/build/generators/builders/DeploymentGenerator.js.map +1 -0
  344. package/build/generators/builders/HashCommitmentGenerator.d.ts +166 -14
  345. package/build/generators/builders/HashCommitmentGenerator.d.ts.map +1 -0
  346. package/build/generators/builders/HashCommitmentGenerator.js +193 -27
  347. package/build/generators/builders/HashCommitmentGenerator.js.map +1 -0
  348. package/build/generators/builders/LegacyCalldataGenerator.d.ts +27 -5
  349. package/build/generators/builders/LegacyCalldataGenerator.d.ts.map +1 -0
  350. package/build/generators/builders/LegacyCalldataGenerator.js +35 -5
  351. package/build/generators/builders/LegacyCalldataGenerator.js.map +1 -0
  352. package/build/generators/builders/MultiSignGenerator.d.ts +6 -1
  353. package/build/generators/builders/MultiSignGenerator.d.ts.map +1 -0
  354. package/build/generators/builders/MultiSignGenerator.js +20 -10
  355. package/build/generators/builders/MultiSignGenerator.js.map +1 -0
  356. package/build/generators/builders/P2WDAGenerator.d.ts +44 -6
  357. package/build/generators/builders/P2WDAGenerator.d.ts.map +1 -0
  358. package/build/generators/builders/P2WDAGenerator.js +41 -2
  359. package/build/generators/builders/P2WDAGenerator.js.map +1 -0
  360. package/build/index.d.ts +1 -0
  361. package/build/index.d.ts.map +1 -0
  362. package/build/index.js +1 -0
  363. package/build/index.js.map +1 -0
  364. package/build/keypair/Address.d.ts +284 -14
  365. package/build/keypair/Address.d.ts.map +1 -0
  366. package/build/keypair/Address.js +446 -128
  367. package/build/keypair/Address.js.map +1 -0
  368. package/build/keypair/AddressVerificator.d.ts +7 -6
  369. package/build/keypair/AddressVerificator.d.ts.map +1 -0
  370. package/build/keypair/AddressVerificator.js +4 -5
  371. package/build/keypair/AddressVerificator.js.map +1 -0
  372. package/build/keypair/EcKeyPair.d.ts +185 -23
  373. package/build/keypair/EcKeyPair.d.ts.map +1 -0
  374. package/build/keypair/EcKeyPair.js +218 -50
  375. package/build/keypair/EcKeyPair.js.map +1 -0
  376. package/build/keypair/MessageSigner.d.ts +18 -17
  377. package/build/keypair/MessageSigner.d.ts.map +1 -0
  378. package/build/keypair/MessageSigner.js +34 -25
  379. package/build/keypair/MessageSigner.js.map +1 -0
  380. package/build/keypair/Secp256k1PointDeriver.d.ts +55 -0
  381. package/build/keypair/Secp256k1PointDeriver.d.ts.map +1 -0
  382. package/build/keypair/Secp256k1PointDeriver.js +66 -0
  383. package/build/keypair/Secp256k1PointDeriver.js.map +1 -0
  384. package/build/keypair/Wallet.d.ts +29 -15
  385. package/build/keypair/Wallet.d.ts.map +1 -0
  386. package/build/keypair/Wallet.js +46 -14
  387. package/build/keypair/Wallet.js.map +1 -0
  388. package/build/keypair/interfaces/IWallet.d.ts +19 -0
  389. package/build/keypair/interfaces/IWallet.d.ts.map +1 -0
  390. package/build/keypair/interfaces/IWallet.js +1 -0
  391. package/build/keypair/interfaces/IWallet.js.map +1 -0
  392. package/build/metadata/ContractBaseMetadata.d.ts +10 -2
  393. package/build/metadata/ContractBaseMetadata.d.ts.map +1 -0
  394. package/build/metadata/ContractBaseMetadata.js +10 -1
  395. package/build/metadata/ContractBaseMetadata.js.map +1 -0
  396. package/build/mnemonic/BIPStandard.d.ts +59 -0
  397. package/build/mnemonic/BIPStandard.d.ts.map +1 -0
  398. package/build/mnemonic/BIPStandard.js +59 -0
  399. package/build/mnemonic/BIPStandard.js.map +1 -0
  400. package/build/mnemonic/Mnemonic.d.ts +16 -4
  401. package/build/mnemonic/Mnemonic.d.ts.map +1 -0
  402. package/build/mnemonic/Mnemonic.js +35 -8
  403. package/build/mnemonic/Mnemonic.js.map +1 -0
  404. package/build/mnemonic/MnemonicStrength.d.ts +6 -0
  405. package/build/mnemonic/MnemonicStrength.d.ts.map +1 -0
  406. package/build/mnemonic/MnemonicStrength.js +6 -0
  407. package/build/mnemonic/MnemonicStrength.js.map +1 -0
  408. package/build/network/ChainId.d.ts +1 -0
  409. package/build/network/ChainId.d.ts.map +1 -0
  410. package/build/network/ChainId.js +1 -0
  411. package/build/network/ChainId.js.map +1 -0
  412. package/build/opnet.d.ts +26 -3
  413. package/build/opnet.d.ts.map +1 -0
  414. package/build/opnet.js +23 -0
  415. package/build/opnet.js.map +1 -0
  416. package/build/p2wda/P2WDADetector.d.ts +38 -11
  417. package/build/p2wda/P2WDADetector.d.ts.map +1 -0
  418. package/build/p2wda/P2WDADetector.js +43 -10
  419. package/build/p2wda/P2WDADetector.js.map +1 -0
  420. package/build/polyfill/disposable.d.ts +16 -0
  421. package/build/polyfill/disposable.d.ts.map +1 -0
  422. package/build/polyfill/disposable.js +23 -0
  423. package/build/polyfill/disposable.js.map +1 -0
  424. package/build/signer/AddressRotation.d.ts +37 -1
  425. package/build/signer/AddressRotation.d.ts.map +1 -0
  426. package/build/signer/AddressRotation.js +16 -0
  427. package/build/signer/AddressRotation.js.map +1 -0
  428. package/build/signer/IRotationSigner.d.ts +27 -3
  429. package/build/signer/IRotationSigner.d.ts.map +1 -0
  430. package/build/signer/IRotationSigner.js +2 -1
  431. package/build/signer/IRotationSigner.js.map +1 -0
  432. package/build/signer/ParallelSignerAdapter.d.ts +14 -0
  433. package/build/signer/ParallelSignerAdapter.d.ts.map +1 -0
  434. package/build/signer/ParallelSignerAdapter.js +51 -0
  435. package/build/signer/ParallelSignerAdapter.js.map +1 -0
  436. package/build/signer/SignerUtils.d.ts +11 -4
  437. package/build/signer/SignerUtils.d.ts.map +1 -0
  438. package/build/signer/SignerUtils.js +16 -0
  439. package/build/signer/SignerUtils.js.map +1 -0
  440. package/build/signer/TweakedSigner.d.ts +28 -4
  441. package/build/signer/TweakedSigner.d.ts.map +1 -0
  442. package/build/signer/TweakedSigner.js +23 -6
  443. package/build/signer/TweakedSigner.js.map +1 -0
  444. package/build/transaction/ContractAddress.d.ts +2 -2
  445. package/build/transaction/ContractAddress.d.ts.map +1 -0
  446. package/build/transaction/ContractAddress.js +4 -8
  447. package/build/transaction/ContractAddress.js.map +1 -0
  448. package/build/transaction/TransactionFactory.d.ts +147 -9
  449. package/build/transaction/TransactionFactory.d.ts.map +1 -0
  450. package/build/transaction/TransactionFactory.js +145 -26
  451. package/build/transaction/TransactionFactory.js.map +1 -0
  452. package/build/transaction/browser/BrowserSignerBase.d.ts +12 -6
  453. package/build/transaction/browser/BrowserSignerBase.d.ts.map +1 -0
  454. package/build/transaction/browser/BrowserSignerBase.js +7 -0
  455. package/build/transaction/browser/BrowserSignerBase.js.map +1 -0
  456. package/build/transaction/browser/WalletNetworks.d.ts +1 -0
  457. package/build/transaction/browser/WalletNetworks.d.ts.map +1 -0
  458. package/build/transaction/browser/WalletNetworks.js +1 -0
  459. package/build/transaction/browser/WalletNetworks.js.map +1 -0
  460. package/build/transaction/browser/Web3Provider.d.ts +30 -3
  461. package/build/transaction/browser/Web3Provider.d.ts.map +1 -0
  462. package/build/transaction/browser/Web3Provider.js +1 -0
  463. package/build/transaction/browser/Web3Provider.js.map +1 -0
  464. package/build/transaction/browser/extensions/UnisatSigner.d.ts +11 -9
  465. package/build/transaction/browser/extensions/UnisatSigner.d.ts.map +1 -0
  466. package/build/transaction/browser/extensions/UnisatSigner.js +27 -17
  467. package/build/transaction/browser/extensions/UnisatSigner.js.map +1 -0
  468. package/build/transaction/browser/extensions/XverseSigner.d.ts +10 -8
  469. package/build/transaction/browser/extensions/XverseSigner.d.ts.map +1 -0
  470. package/build/transaction/browser/extensions/XverseSigner.js +25 -15
  471. package/build/transaction/browser/extensions/XverseSigner.js.map +1 -0
  472. package/build/transaction/browser/types/OPWallet.d.ts +12 -2
  473. package/build/transaction/browser/types/OPWallet.d.ts.map +1 -0
  474. package/build/transaction/browser/types/OPWallet.js +4 -0
  475. package/build/transaction/browser/types/OPWallet.js.map +1 -0
  476. package/build/transaction/browser/types/Unisat.d.ts +2 -1
  477. package/build/transaction/browser/types/Unisat.d.ts.map +1 -0
  478. package/build/transaction/browser/types/Unisat.js +2 -0
  479. package/build/transaction/browser/types/Unisat.js.map +1 -0
  480. package/build/transaction/browser/types/Xverse.d.ts +1 -0
  481. package/build/transaction/browser/types/Xverse.d.ts.map +1 -0
  482. package/build/transaction/browser/types/Xverse.js +1 -0
  483. package/build/transaction/browser/types/Xverse.js.map +1 -0
  484. package/build/transaction/builders/CancelTransaction.d.ts +31 -6
  485. package/build/transaction/builders/CancelTransaction.d.ts.map +1 -0
  486. package/build/transaction/builders/CancelTransaction.js +116 -33
  487. package/build/transaction/builders/CancelTransaction.js.map +1 -0
  488. package/build/transaction/builders/ChallengeSolutionTransaction.d.ts +1 -0
  489. package/build/transaction/builders/ChallengeSolutionTransaction.d.ts.map +1 -0
  490. package/build/transaction/builders/ChallengeSolutionTransaction.js +88 -0
  491. package/build/transaction/builders/ChallengeSolutionTransaction.js.map +1 -0
  492. package/build/transaction/builders/ConsolidatedInteractionTransaction.d.ts +140 -13
  493. package/build/transaction/builders/ConsolidatedInteractionTransaction.d.ts.map +1 -0
  494. package/build/transaction/builders/ConsolidatedInteractionTransaction.js +197 -20
  495. package/build/transaction/builders/ConsolidatedInteractionTransaction.js.map +1 -0
  496. package/build/transaction/builders/CustomScriptTransaction.d.ts +108 -8
  497. package/build/transaction/builders/CustomScriptTransaction.d.ts.map +1 -0
  498. package/build/transaction/builders/CustomScriptTransaction.js +176 -39
  499. package/build/transaction/builders/CustomScriptTransaction.js.map +1 -0
  500. package/build/transaction/builders/DeploymentTransaction.d.ts +120 -9
  501. package/build/transaction/builders/DeploymentTransaction.d.ts.map +1 -0
  502. package/build/transaction/builders/DeploymentTransaction.js +194 -51
  503. package/build/transaction/builders/DeploymentTransaction.js.map +1 -0
  504. package/build/transaction/builders/FundingTransaction.d.ts +5 -4
  505. package/build/transaction/builders/FundingTransaction.d.ts.map +1 -0
  506. package/build/transaction/builders/FundingTransaction.js +15 -8
  507. package/build/transaction/builders/FundingTransaction.js.map +1 -0
  508. package/build/transaction/builders/InteractionTransaction.d.ts +14 -5
  509. package/build/transaction/builders/InteractionTransaction.d.ts.map +1 -0
  510. package/build/transaction/builders/InteractionTransaction.js +18 -5
  511. package/build/transaction/builders/InteractionTransaction.js.map +1 -0
  512. package/build/transaction/builders/InteractionTransactionP2WDA.d.ts +58 -7
  513. package/build/transaction/builders/InteractionTransactionP2WDA.d.ts.map +1 -0
  514. package/build/transaction/builders/InteractionTransactionP2WDA.js +95 -18
  515. package/build/transaction/builders/InteractionTransactionP2WDA.js.map +1 -0
  516. package/build/transaction/builders/MultiSignTransaction.d.ts +126 -17
  517. package/build/transaction/builders/MultiSignTransaction.d.ts.map +1 -0
  518. package/build/transaction/builders/MultiSignTransaction.js +201 -76
  519. package/build/transaction/builders/MultiSignTransaction.js.map +1 -0
  520. package/build/transaction/builders/SharedInteractionTransaction.d.ts +106 -18
  521. package/build/transaction/builders/SharedInteractionTransaction.d.ts.map +1 -0
  522. package/build/transaction/builders/SharedInteractionTransaction.js +158 -40
  523. package/build/transaction/builders/SharedInteractionTransaction.js.map +1 -0
  524. package/build/transaction/builders/TransactionBuilder.d.ts +249 -19
  525. package/build/transaction/builders/TransactionBuilder.d.ts.map +1 -0
  526. package/build/transaction/builders/TransactionBuilder.js +375 -60
  527. package/build/transaction/builders/TransactionBuilder.js.map +1 -0
  528. package/build/transaction/enums/TransactionType.d.ts +1 -0
  529. package/build/transaction/enums/TransactionType.d.ts.map +1 -0
  530. package/build/transaction/enums/TransactionType.js +1 -0
  531. package/build/transaction/enums/TransactionType.js.map +1 -0
  532. package/build/transaction/interfaces/ICancelTransactionParameters.d.ts +3 -2
  533. package/build/transaction/interfaces/ICancelTransactionParameters.d.ts.map +1 -0
  534. package/build/transaction/interfaces/ICancelTransactionParameters.js +1 -0
  535. package/build/transaction/interfaces/ICancelTransactionParameters.js.map +1 -0
  536. package/build/transaction/interfaces/IConsolidatedTransactionParameters.d.ts +48 -5
  537. package/build/transaction/interfaces/IConsolidatedTransactionParameters.d.ts.map +1 -0
  538. package/build/transaction/interfaces/IConsolidatedTransactionParameters.js +1 -0
  539. package/build/transaction/interfaces/IConsolidatedTransactionParameters.js.map +1 -0
  540. package/build/transaction/interfaces/ICustomTransactionParameters.d.ts +7 -5
  541. package/build/transaction/interfaces/ICustomTransactionParameters.d.ts.map +1 -0
  542. package/build/transaction/interfaces/ICustomTransactionParameters.js +1 -0
  543. package/build/transaction/interfaces/ICustomTransactionParameters.js.map +1 -0
  544. package/build/transaction/interfaces/ITransactionParameters.d.ts +27 -15
  545. package/build/transaction/interfaces/ITransactionParameters.d.ts.map +1 -0
  546. package/build/transaction/interfaces/ITransactionParameters.js +1 -0
  547. package/build/transaction/interfaces/ITransactionParameters.js.map +1 -0
  548. package/build/transaction/interfaces/ITransactionResponses.d.ts +3 -2
  549. package/build/transaction/interfaces/ITransactionResponses.d.ts.map +1 -0
  550. package/build/transaction/interfaces/ITransactionResponses.js +1 -0
  551. package/build/transaction/interfaces/ITransactionResponses.js.map +1 -0
  552. package/build/transaction/interfaces/ITweakedTransactionData.d.ts +21 -8
  553. package/build/transaction/interfaces/ITweakedTransactionData.d.ts.map +1 -0
  554. package/build/transaction/interfaces/ITweakedTransactionData.js +1 -0
  555. package/build/transaction/interfaces/ITweakedTransactionData.js.map +1 -0
  556. package/build/transaction/interfaces/IWeb3ProviderTypes.d.ts +29 -3
  557. package/build/transaction/interfaces/IWeb3ProviderTypes.d.ts.map +1 -0
  558. package/build/transaction/interfaces/IWeb3ProviderTypes.js +2 -1
  559. package/build/transaction/interfaces/IWeb3ProviderTypes.js.map +1 -0
  560. package/build/transaction/interfaces/Tap.d.ts +4 -3
  561. package/build/transaction/interfaces/Tap.d.ts.map +1 -0
  562. package/build/transaction/interfaces/Tap.js +1 -0
  563. package/build/transaction/interfaces/Tap.js.map +1 -0
  564. package/build/transaction/mineable/IP2WSHAddress.d.ts +2 -1
  565. package/build/transaction/mineable/IP2WSHAddress.d.ts.map +1 -0
  566. package/build/transaction/mineable/IP2WSHAddress.js +1 -0
  567. package/build/transaction/mineable/IP2WSHAddress.js.map +1 -0
  568. package/build/transaction/mineable/TimelockGenerator.d.ts +13 -4
  569. package/build/transaction/mineable/TimelockGenerator.d.ts.map +1 -0
  570. package/build/transaction/mineable/TimelockGenerator.js +12 -3
  571. package/build/transaction/mineable/TimelockGenerator.js.map +1 -0
  572. package/build/transaction/offline/OfflineTransactionManager.d.ts +193 -12
  573. package/build/transaction/offline/OfflineTransactionManager.d.ts.map +1 -0
  574. package/build/transaction/offline/OfflineTransactionManager.js +192 -8
  575. package/build/transaction/offline/OfflineTransactionManager.js.map +1 -0
  576. package/build/transaction/offline/TransactionReconstructor.d.ts +56 -6
  577. package/build/transaction/offline/TransactionReconstructor.d.ts.map +1 -0
  578. package/build/transaction/offline/TransactionReconstructor.js +111 -75
  579. package/build/transaction/offline/TransactionReconstructor.js.map +1 -0
  580. package/build/transaction/offline/TransactionSerializer.d.ts +54 -3
  581. package/build/transaction/offline/TransactionSerializer.d.ts.map +1 -0
  582. package/build/transaction/offline/TransactionSerializer.js +206 -95
  583. package/build/transaction/offline/TransactionSerializer.js.map +1 -0
  584. package/build/transaction/offline/TransactionStateCapture.d.ts +66 -7
  585. package/build/transaction/offline/TransactionStateCapture.d.ts.map +1 -0
  586. package/build/transaction/offline/TransactionStateCapture.js +124 -60
  587. package/build/transaction/offline/TransactionStateCapture.js.map +1 -0
  588. package/build/transaction/offline/interfaces/ISerializableState.d.ts +72 -1
  589. package/build/transaction/offline/interfaces/ISerializableState.d.ts.map +1 -0
  590. package/build/transaction/offline/interfaces/ISerializableState.js +10 -1
  591. package/build/transaction/offline/interfaces/ISerializableState.js.map +1 -0
  592. package/build/transaction/offline/interfaces/ITypeSpecificData.d.ts +77 -1
  593. package/build/transaction/offline/interfaces/ITypeSpecificData.d.ts.map +1 -0
  594. package/build/transaction/offline/interfaces/ITypeSpecificData.js +19 -0
  595. package/build/transaction/offline/interfaces/ITypeSpecificData.js.map +1 -0
  596. package/build/transaction/psbt/PSBTTypes.d.ts +1 -0
  597. package/build/transaction/psbt/PSBTTypes.d.ts.map +1 -0
  598. package/build/transaction/psbt/PSBTTypes.js +1 -0
  599. package/build/transaction/psbt/PSBTTypes.js.map +1 -0
  600. package/build/transaction/shared/P2TR_MS.d.ts +11 -2
  601. package/build/transaction/shared/P2TR_MS.d.ts.map +1 -0
  602. package/build/transaction/shared/P2TR_MS.js +10 -0
  603. package/build/transaction/shared/P2TR_MS.js.map +1 -0
  604. package/build/transaction/shared/TweakedTransaction.d.ts +281 -38
  605. package/build/transaction/shared/TweakedTransaction.d.ts.map +1 -0
  606. package/build/transaction/shared/TweakedTransaction.js +576 -114
  607. package/build/transaction/shared/TweakedTransaction.js.map +1 -0
  608. package/build/transaction/utils/WitnessUtils.d.ts +7 -1
  609. package/build/transaction/utils/WitnessUtils.d.ts.map +1 -0
  610. package/build/transaction/utils/WitnessUtils.js +17 -3
  611. package/build/transaction/utils/WitnessUtils.js.map +1 -0
  612. package/build/tsconfig.build.tsbuildinfo +1 -1
  613. package/build/utils/BitcoinUtils.d.ts +19 -0
  614. package/build/utils/BitcoinUtils.d.ts.map +1 -0
  615. package/build/utils/BitcoinUtils.js +19 -0
  616. package/build/utils/BitcoinUtils.js.map +1 -0
  617. package/build/utils/BufferHelper.d.ts +2 -1
  618. package/build/utils/BufferHelper.d.ts.map +1 -0
  619. package/build/utils/BufferHelper.js +38 -32
  620. package/build/utils/BufferHelper.js.map +1 -0
  621. package/build/utils/StringToBuffer.d.ts +1 -0
  622. package/build/utils/StringToBuffer.d.ts.map +1 -0
  623. package/build/utils/StringToBuffer.js +1 -0
  624. package/build/utils/StringToBuffer.js.map +1 -0
  625. package/build/utils/lengths.d.ts +1 -0
  626. package/build/utils/lengths.d.ts.map +1 -0
  627. package/build/utils/lengths.js +1 -0
  628. package/build/utils/lengths.js.map +1 -0
  629. package/build/utils/types.d.ts +1 -0
  630. package/build/utils/types.d.ts.map +1 -0
  631. package/build/utils/types.js +2 -1
  632. package/build/utils/types.js.map +1 -0
  633. package/build/utxo/OPNetLimitedProvider.d.ts +39 -3
  634. package/build/utxo/OPNetLimitedProvider.d.ts.map +1 -0
  635. package/build/utxo/OPNetLimitedProvider.js +43 -5
  636. package/build/utxo/OPNetLimitedProvider.js.map +1 -0
  637. package/build/utxo/interfaces/BroadcastResponse.d.ts +1 -0
  638. package/build/utxo/interfaces/BroadcastResponse.d.ts.map +1 -0
  639. package/build/utxo/interfaces/BroadcastResponse.js +1 -0
  640. package/build/utxo/interfaces/BroadcastResponse.js.map +1 -0
  641. package/build/utxo/interfaces/IUTXO.d.ts +13 -7
  642. package/build/utxo/interfaces/IUTXO.d.ts.map +1 -0
  643. package/build/utxo/interfaces/IUTXO.js +1 -0
  644. package/build/utxo/interfaces/IUTXO.js.map +1 -0
  645. package/build/verification/TapscriptVerificator.d.ts +12 -10
  646. package/build/verification/TapscriptVerificator.d.ts.map +1 -0
  647. package/build/verification/TapscriptVerificator.js +28 -38
  648. package/build/verification/TapscriptVerificator.js.map +1 -0
  649. package/eslint.config.js +0 -1
  650. package/package.json +12 -35
  651. package/src/abi/ABICoder.ts +0 -13
  652. package/src/branded/Branded.ts +5 -0
  653. package/src/buffer/BinaryReader.ts +7 -7
  654. package/src/buffer/BinaryWriter.ts +29 -24
  655. package/src/bytecode/Compressor.ts +1 -1
  656. package/src/chain/ChainData.ts +34 -27
  657. package/src/consensus/ConsensusConfig.ts +1 -1
  658. package/src/consensus/IConsensusConfig.ts +0 -17
  659. package/src/consensus/metadata/RoswellConsensus.ts +1 -17
  660. package/src/deterministic/AddressMap.ts +5 -1
  661. package/src/deterministic/AddressSet.ts +5 -1
  662. package/src/deterministic/CustomMap.ts +6 -2
  663. package/src/deterministic/DeterministicMap.ts +8 -4
  664. package/src/deterministic/DeterministicSet.ts +6 -2
  665. package/src/deterministic/ExtendedAddressMap.ts +9 -4
  666. package/src/deterministic/FastMap.ts +9 -5
  667. package/src/ecc/backend.ts +17 -0
  668. package/src/epoch/ChallengeSolution.ts +3 -3
  669. package/src/epoch/interfaces/IChallengeSolution.ts +13 -13
  670. package/src/epoch/validator/EpochValidator.ts +24 -43
  671. package/src/generators/AddressGenerator.ts +4 -7
  672. package/src/generators/Features.ts +3 -3
  673. package/src/generators/Generator.ts +42 -26
  674. package/src/generators/builders/CalldataGenerator.ts +26 -24
  675. package/src/generators/builders/CustomGenerator.ts +4 -4
  676. package/src/generators/builders/DeploymentGenerator.ts +25 -23
  677. package/src/generators/builders/HashCommitmentGenerator.ts +31 -31
  678. package/src/generators/builders/LegacyCalldataGenerator.ts +26 -24
  679. package/src/generators/builders/MultiSignGenerator.ts +12 -12
  680. package/src/generators/builders/P2WDAGenerator.ts +10 -10
  681. package/src/keypair/Address.ts +114 -71
  682. package/src/keypair/AddressVerificator.ts +14 -148
  683. package/src/keypair/EcKeyPair.ts +104 -116
  684. package/src/keypair/MessageSigner.ts +70 -150
  685. package/src/keypair/Wallet.ts +56 -241
  686. package/src/metadata/ContractBaseMetadata.ts +2 -2
  687. package/src/mnemonic/Mnemonic.ts +31 -222
  688. package/src/opnet.ts +12 -6
  689. package/src/p2wda/P2WDADetector.ts +23 -72
  690. package/src/polyfill/disposable.ts +29 -0
  691. package/src/signer/AddressRotation.ts +1 -1
  692. package/src/signer/IRotationSigner.ts +3 -3
  693. package/src/signer/ParallelSignerAdapter.ts +59 -0
  694. package/src/signer/SignerUtils.ts +4 -4
  695. package/src/signer/TweakedSigner.ts +26 -14
  696. package/src/transaction/ContractAddress.ts +3 -7
  697. package/src/transaction/TransactionFactory.ts +28 -50
  698. package/src/transaction/browser/BrowserSignerBase.ts +12 -6
  699. package/src/transaction/browser/Web3Provider.ts +3 -3
  700. package/src/transaction/browser/extensions/UnisatSigner.ts +52 -48
  701. package/src/transaction/browser/extensions/XverseSigner.ts +55 -38
  702. package/src/transaction/browser/types/OPWallet.ts +2 -2
  703. package/src/transaction/browser/types/Unisat.ts +1 -1
  704. package/src/transaction/builders/CancelTransaction.ts +59 -24
  705. package/src/transaction/builders/ChallengeSolutionTransaction.ts +3 -3
  706. package/src/transaction/builders/ConsolidatedInteractionTransaction.ts +39 -34
  707. package/src/transaction/builders/CustomScriptTransaction.ts +79 -56
  708. package/src/transaction/builders/DeploymentTransaction.ts +82 -63
  709. package/src/transaction/builders/FundingTransaction.ts +11 -11
  710. package/src/transaction/builders/InteractionTransaction.ts +10 -10
  711. package/src/transaction/builders/InteractionTransactionP2WDA.ts +38 -40
  712. package/src/transaction/builders/MultiSignTransaction.ts +68 -61
  713. package/src/transaction/builders/SharedInteractionTransaction.ts +81 -57
  714. package/src/transaction/builders/TransactionBuilder.ts +99 -81
  715. package/src/transaction/interfaces/ICancelTransactionParameters.ts +2 -2
  716. package/src/transaction/interfaces/IConsolidatedTransactionParameters.ts +5 -5
  717. package/src/transaction/interfaces/ICustomTransactionParameters.ts +5 -5
  718. package/src/transaction/interfaces/ITransactionParameters.ts +15 -15
  719. package/src/transaction/interfaces/ITransactionResponses.ts +2 -2
  720. package/src/transaction/interfaces/ITweakedTransactionData.ts +17 -8
  721. package/src/transaction/interfaces/IWeb3ProviderTypes.ts +3 -3
  722. package/src/transaction/interfaces/Tap.ts +3 -3
  723. package/src/transaction/mineable/IP2WSHAddress.ts +1 -1
  724. package/src/transaction/mineable/TimelockGenerator.ts +19 -12
  725. package/src/transaction/offline/OfflineTransactionManager.ts +22 -23
  726. package/src/transaction/offline/TransactionReconstructor.ts +83 -91
  727. package/src/transaction/offline/TransactionSerializer.ts +151 -101
  728. package/src/transaction/offline/TransactionStateCapture.ts +83 -79
  729. package/src/transaction/offline/interfaces/ISerializableState.ts +1 -1
  730. package/src/transaction/offline/interfaces/ITypeSpecificData.ts +1 -1
  731. package/src/transaction/shared/P2TR_MS.ts +4 -4
  732. package/src/transaction/shared/TweakedTransaction.ts +326 -124
  733. package/src/transaction/utils/WitnessUtils.ts +18 -9
  734. package/src/utils/BufferHelper.ts +39 -37
  735. package/src/utxo/OPNetLimitedProvider.ts +9 -9
  736. package/src/utxo/interfaces/IUTXO.ts +7 -7
  737. package/src/verification/TapscriptVerificator.ts +73 -86
  738. package/test/address-rotation.test.ts +24 -24
  739. package/test/address.test.ts +12 -12
  740. package/test/addressmap.test.ts +30 -30
  741. package/test/binary-reader-writer.test.ts +8 -8
  742. package/test/browser/offline-transaction.test.ts +2206 -0
  743. package/test/browser/parallel-signing.test.ts +316 -0
  744. package/test/browser/setup.ts +11 -0
  745. package/test/browser/transaction-signing.test.ts +416 -0
  746. package/test/buffer-helper.test.ts +287 -0
  747. package/test/derivePath.test.ts +4 -3
  748. package/test/disposable.test.ts +279 -0
  749. package/test/fastmap-setall.test.ts +1 -1
  750. package/test/fastmap.test.ts +3 -3
  751. package/test/messagesigner-mldsa.test.ts +3 -3
  752. package/test/messagesigner-schnorr.test.ts +9 -9
  753. package/test/offline-transaction.test.ts +461 -288
  754. package/test/old/FastBigIntMap.ts +3 -3
  755. package/test/oldfastmap.test.ts +6 -6
  756. package/test/transaction-builders.test.ts +321 -0
  757. package/tsconfig.base.json +34 -18
  758. package/tsconfig.browser.json +15 -0
  759. package/tsconfig.json +3 -8
  760. package/vite.config.browser.ts +4 -5
  761. package/vitest.config.browser.ts +68 -0
  762. package/vitest.config.ts +1 -1
  763. package/browser/valibot.js +0 -4948
  764. package/tsconfig.webpack.json +0 -18
@@ -1,113 +1,112 @@
1
- import { g as ne } from "./vendors.js";
2
- function x0(t) {
1
+ function t0(t) {
3
2
  return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
4
3
  }
5
- function re(t, ...e) {
6
- if (!x0(t))
4
+ function Zt(t, ...e) {
5
+ if (!t0(t))
7
6
  throw new Error("Uint8Array expected");
8
7
  if (e.length > 0 && !e.includes(t.length))
9
8
  throw new Error("Uint8Array expected of length " + e + ", got length=" + t.length);
10
9
  }
11
- function he(t, e = !0) {
10
+ function ee(t, e = !0) {
12
11
  if (t.destroyed)
13
12
  throw new Error("Hash instance has been destroyed");
14
13
  if (e && t.finished)
15
14
  throw new Error("Hash#digest() has already been called");
16
15
  }
17
- function H0(t, e) {
18
- re(t);
19
- const n = e.outputLen;
20
- if (t.length < n)
21
- throw new Error("digestInto() expects output buffer of length at least " + n);
16
+ function e0(t, e) {
17
+ Zt(t);
18
+ const s = e.outputLen;
19
+ if (t.length < s)
20
+ throw new Error("digestInto() expects output buffer of length at least " + s);
22
21
  }
23
- function se(...t) {
22
+ function Yt(...t) {
24
23
  for (let e = 0; e < t.length; e++)
25
24
  t[e].fill(0);
26
25
  }
27
- function zt(t) {
26
+ function qt(t) {
28
27
  return new DataView(t.buffer, t.byteOffset, t.byteLength);
29
28
  }
30
- function dt(t, e) {
29
+ function rt(t, e) {
31
30
  return t << 32 - e | t >>> e;
32
31
  }
33
- function A0(t) {
32
+ function s0(t) {
34
33
  if (typeof t != "string")
35
34
  throw new Error("string expected");
36
35
  return new Uint8Array(new TextEncoder().encode(t));
37
36
  }
38
- function je(t) {
39
- return typeof t == "string" && (t = A0(t)), re(t), t;
37
+ function Ie(t) {
38
+ return typeof t == "string" && (t = s0(t)), Zt(t), t;
40
39
  }
41
- class y0 {
40
+ class n0 {
42
41
  }
43
- function p0(t) {
44
- const e = (h) => t().update(je(h)).digest(), n = t();
45
- return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
42
+ function r0(t) {
43
+ const e = (o) => t().update(Ie(o)).digest(), s = t();
44
+ return e.outputLen = s.outputLen, e.blockLen = s.blockLen, e.create = () => t(), e;
46
45
  }
47
- function _0(t, e, n, h) {
46
+ function i0(t, e, s, o) {
48
47
  if (typeof t.setBigUint64 == "function")
49
- return t.setBigUint64(e, n, h);
50
- const c = BigInt(32), i = BigInt(4294967295), r = Number(n >> c & i), a = Number(n & i), b = h ? 4 : 0, x = h ? 0 : 4;
51
- t.setUint32(e + b, r, h), t.setUint32(e + x, a, h);
48
+ return t.setBigUint64(e, s, o);
49
+ const i = BigInt(32), c = BigInt(4294967295), r = Number(s >> i & c), a = Number(s & c), d = o ? 4 : 0, x = o ? 0 : 4;
50
+ t.setUint32(e + d, r, o), t.setUint32(e + x, a, o);
52
51
  }
53
- function g0(t, e, n) {
54
- return t & e ^ ~t & n;
52
+ function c0(t, e, s) {
53
+ return t & e ^ ~t & s;
55
54
  }
56
- function S0(t, e, n) {
57
- return t & e ^ t & n ^ e & n;
55
+ function o0(t, e, s) {
56
+ return t & e ^ t & s ^ e & s;
58
57
  }
59
- let w0 = class extends y0 {
60
- constructor(e, n, h, c) {
61
- super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = e, this.outputLen = n, this.padOffset = h, this.isLE = c, this.buffer = new Uint8Array(e), this.view = zt(this.buffer);
58
+ let a0 = class extends n0 {
59
+ constructor(e, s, o, i) {
60
+ super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = e, this.outputLen = s, this.padOffset = o, this.isLE = i, this.buffer = new Uint8Array(e), this.view = qt(this.buffer);
62
61
  }
63
62
  update(e) {
64
- he(this), e = je(e), re(e);
65
- const { view: n, buffer: h, blockLen: c } = this, i = e.length;
66
- for (let r = 0; r < i; ) {
67
- const a = Math.min(c - this.pos, i - r);
68
- if (a === c) {
69
- const b = zt(e);
70
- for (; c <= i - r; r += c)
71
- this.process(b, r);
63
+ ee(this), e = Ie(e), Zt(e);
64
+ const { view: s, buffer: o, blockLen: i } = this, c = e.length;
65
+ for (let r = 0; r < c; ) {
66
+ const a = Math.min(i - this.pos, c - r);
67
+ if (a === i) {
68
+ const d = qt(e);
69
+ for (; i <= c - r; r += i)
70
+ this.process(d, r);
72
71
  continue;
73
72
  }
74
- h.set(e.subarray(r, r + a), this.pos), this.pos += a, r += a, this.pos === c && (this.process(n, 0), this.pos = 0);
73
+ o.set(e.subarray(r, r + a), this.pos), this.pos += a, r += a, this.pos === i && (this.process(s, 0), this.pos = 0);
75
74
  }
76
75
  return this.length += e.length, this.roundClean(), this;
77
76
  }
78
77
  digestInto(e) {
79
- he(this), H0(e, this), this.finished = !0;
80
- const { buffer: n, view: h, blockLen: c, isLE: i } = this;
78
+ ee(this), e0(e, this), this.finished = !0;
79
+ const { buffer: s, view: o, blockLen: i, isLE: c } = this;
81
80
  let { pos: r } = this;
82
- n[r++] = 128, se(this.buffer.subarray(r)), this.padOffset > c - r && (this.process(h, 0), r = 0);
83
- for (let u = r; u < c; u++)
84
- n[u] = 0;
85
- _0(h, c - 8, BigInt(this.length * 8), i), this.process(h, 0);
86
- const a = zt(e), b = this.outputLen;
87
- if (b % 4)
81
+ s[r++] = 128, Yt(this.buffer.subarray(r)), this.padOffset > i - r && (this.process(o, 0), r = 0);
82
+ for (let f = r; f < i; f++)
83
+ s[f] = 0;
84
+ i0(o, i - 8, BigInt(this.length * 8), c), this.process(o, 0);
85
+ const a = qt(e), d = this.outputLen;
86
+ if (d % 4)
88
87
  throw new Error("_sha2: outputLen should be aligned to 32bit");
89
- const x = b / 4, H = this.get();
88
+ const x = d / 4, H = this.get();
90
89
  if (x > H.length)
91
90
  throw new Error("_sha2: outputLen bigger than state");
92
- for (let u = 0; u < x; u++)
93
- a.setUint32(4 * u, H[u], i);
91
+ for (let f = 0; f < x; f++)
92
+ a.setUint32(4 * f, H[f], c);
94
93
  }
95
94
  digest() {
96
- const { buffer: e, outputLen: n } = this;
95
+ const { buffer: e, outputLen: s } = this;
97
96
  this.digestInto(e);
98
- const h = e.slice(0, n);
99
- return this.destroy(), h;
97
+ const o = e.slice(0, s);
98
+ return this.destroy(), o;
100
99
  }
101
100
  _cloneInto(e) {
102
101
  e || (e = new this.constructor()), e.set(...this.get());
103
- const { blockLen: n, buffer: h, length: c, finished: i, destroyed: r, pos: a } = this;
104
- return e.destroyed = r, e.finished = i, e.length = c, e.pos = a, c % n && e.buffer.set(h), e;
102
+ const { blockLen: s, buffer: o, length: i, finished: c, destroyed: r, pos: a } = this;
103
+ return e.destroyed = r, e.finished = c, e.length = i, e.pos = a, i % s && e.buffer.set(o), e;
105
104
  }
106
105
  clone() {
107
106
  return this._cloneInto();
108
107
  }
109
108
  };
110
- const yt = /* @__PURE__ */ Uint32Array.from([
109
+ const dt = /* @__PURE__ */ Uint32Array.from([
111
110
  1779033703,
112
111
  3144134277,
113
112
  1013904242,
@@ -116,7 +115,7 @@ const yt = /* @__PURE__ */ Uint32Array.from([
116
115
  2600822924,
117
116
  528734635,
118
117
  1541459225
119
- ]), I0 = /* @__PURE__ */ Uint32Array.from([
118
+ ]), h0 = /* @__PURE__ */ Uint32Array.from([
120
119
  1116352408,
121
120
  1899447441,
122
121
  3049323471,
@@ -181,183 +180,246 @@ const yt = /* @__PURE__ */ Uint32Array.from([
181
180
  2756734187,
182
181
  3204031479,
183
182
  3329325298
184
- ]), pt = /* @__PURE__ */ new Uint32Array(64);
185
- class B0 extends w0 {
183
+ ]), ut = /* @__PURE__ */ new Uint32Array(64);
184
+ class f0 extends a0 {
186
185
  constructor(e = 32) {
187
- super(64, e, 8, !1), this.A = yt[0] | 0, this.B = yt[1] | 0, this.C = yt[2] | 0, this.D = yt[3] | 0, this.E = yt[4] | 0, this.F = yt[5] | 0, this.G = yt[6] | 0, this.H = yt[7] | 0;
186
+ super(64, e, 8, !1), this.A = dt[0] | 0, this.B = dt[1] | 0, this.C = dt[2] | 0, this.D = dt[3] | 0, this.E = dt[4] | 0, this.F = dt[5] | 0, this.G = dt[6] | 0, this.H = dt[7] | 0;
188
187
  }
189
188
  get() {
190
- const { A: e, B: n, C: h, D: c, E: i, F: r, G: a, H: b } = this;
191
- return [e, n, h, c, i, r, a, b];
189
+ const { A: e, B: s, C: o, D: i, E: c, F: r, G: a, H: d } = this;
190
+ return [e, s, o, i, c, r, a, d];
192
191
  }
193
192
  // prettier-ignore
194
- set(e, n, h, c, i, r, a, b) {
195
- this.A = e | 0, this.B = n | 0, this.C = h | 0, this.D = c | 0, this.E = i | 0, this.F = r | 0, this.G = a | 0, this.H = b | 0;
193
+ set(e, s, o, i, c, r, a, d) {
194
+ this.A = e | 0, this.B = s | 0, this.C = o | 0, this.D = i | 0, this.E = c | 0, this.F = r | 0, this.G = a | 0, this.H = d | 0;
196
195
  }
197
- process(e, n) {
198
- for (let u = 0; u < 16; u++, n += 4)
199
- pt[u] = e.getUint32(n, !1);
200
- for (let u = 16; u < 64; u++) {
201
- const S = pt[u - 15], B = pt[u - 2], g = dt(S, 7) ^ dt(S, 18) ^ S >>> 3, I = dt(B, 17) ^ dt(B, 19) ^ B >>> 10;
202
- pt[u] = I + pt[u - 7] + g + pt[u - 16] | 0;
196
+ process(e, s) {
197
+ for (let f = 0; f < 16; f++, s += 4)
198
+ ut[f] = e.getUint32(s, !1);
199
+ for (let f = 16; f < 64; f++) {
200
+ const g = ut[f - 15], w = ut[f - 2], S = rt(g, 7) ^ rt(g, 18) ^ g >>> 3, I = rt(w, 17) ^ rt(w, 19) ^ w >>> 10;
201
+ ut[f] = I + ut[f - 7] + S + ut[f - 16] | 0;
203
202
  }
204
- let { A: h, B: c, C: i, D: r, E: a, F: b, G: x, H } = this;
205
- for (let u = 0; u < 64; u++) {
206
- const S = dt(a, 6) ^ dt(a, 11) ^ dt(a, 25), B = H + S + g0(a, b, x) + I0[u] + pt[u] | 0, I = (dt(h, 2) ^ dt(h, 13) ^ dt(h, 22)) + S0(h, c, i) | 0;
207
- H = x, x = b, b = a, a = r + B | 0, r = i, i = c, c = h, h = B + I | 0;
203
+ let { A: o, B: i, C: c, D: r, E: a, F: d, G: x, H } = this;
204
+ for (let f = 0; f < 64; f++) {
205
+ const g = rt(a, 6) ^ rt(a, 11) ^ rt(a, 25), w = H + g + c0(a, d, x) + h0[f] + ut[f] | 0, I = (rt(o, 2) ^ rt(o, 13) ^ rt(o, 22)) + o0(o, i, c) | 0;
206
+ H = x, x = d, d = a, a = r + w | 0, r = c, c = i, i = o, o = w + I | 0;
208
207
  }
209
- h = h + this.A | 0, c = c + this.B | 0, i = i + this.C | 0, r = r + this.D | 0, a = a + this.E | 0, b = b + this.F | 0, x = x + this.G | 0, H = H + this.H | 0, this.set(h, c, i, r, a, b, x, H);
208
+ o = o + this.A | 0, i = i + this.B | 0, c = c + this.C | 0, r = r + this.D | 0, a = a + this.E | 0, d = d + this.F | 0, x = x + this.G | 0, H = H + this.H | 0, this.set(o, i, c, r, a, d, x, H);
210
209
  }
211
210
  roundClean() {
212
- se(pt);
211
+ Yt(ut);
213
212
  }
214
213
  destroy() {
215
- this.set(0, 0, 0, 0, 0, 0, 0, 0), se(this.buffer);
214
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), Yt(this.buffer);
216
215
  }
217
216
  }
218
- const L0 = /* @__PURE__ */ p0(() => new B0()), Ms = L0;
219
- function m0(t) {
217
+ const d0 = /* @__PURE__ */ r0(() => new f0()), Hs = d0;
218
+ function As(t) {
219
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
220
+ }
221
+ function zt(t) {
222
+ if (Object.prototype.hasOwnProperty.call(t, "__esModule")) return t;
223
+ var e = t.default;
224
+ if (typeof e == "function") {
225
+ var s = function o() {
226
+ var i = !1;
227
+ try {
228
+ i = this instanceof o;
229
+ } catch {
230
+ }
231
+ return i ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
232
+ };
233
+ s.prototype = e.prototype;
234
+ } else s = {};
235
+ return Object.defineProperty(s, "__esModule", { value: !0 }), Object.keys(t).forEach(function(o) {
236
+ var i = Object.getOwnPropertyDescriptor(t, o);
237
+ Object.defineProperty(s, o, i.get ? i : {
238
+ enumerable: !0,
239
+ get: function() {
240
+ return t[o];
241
+ }
242
+ });
243
+ }), s;
244
+ }
245
+ function u0(t) {
220
246
  return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
221
247
  }
222
- function Vt(t, e = "") {
248
+ function Gt(t, e = "") {
223
249
  if (!Number.isSafeInteger(t) || t < 0) {
224
- const n = e && `"${e}" `;
225
- throw new Error(`${n}expected integer >= 0, got ${t}`);
250
+ const s = e && `"${e}" `;
251
+ throw new Error(`${s}expected integer >= 0, got ${t}`);
226
252
  }
227
253
  }
228
- function Ht(t, e, n = "") {
229
- const h = m0(t), c = t?.length, i = e !== void 0;
230
- if (!h || i && c !== e) {
231
- const r = n && `"${n}" `, a = i ? ` of length ${e}` : "", b = h ? `length=${c}` : `type=${typeof t}`;
232
- throw new Error(r + "expected Uint8Array" + a + ", got " + b);
254
+ function _t(t, e, s = "") {
255
+ const o = u0(t), i = t?.length, c = e !== void 0;
256
+ if (!o || c && i !== e) {
257
+ const r = s && `"${s}" `, a = c ? ` of length ${e}` : "", d = o ? `length=${i}` : `type=${typeof t}`;
258
+ throw new Error(r + "expected Uint8Array" + a + ", got " + d);
233
259
  }
234
260
  return t;
235
261
  }
236
- function We(t) {
262
+ function l0(t) {
237
263
  if (typeof t != "function" || typeof t.create != "function")
238
264
  throw new Error("Hash must wrapped by utils.createHasher");
239
- Vt(t.outputLen), Vt(t.blockLen);
265
+ Gt(t.outputLen), Gt(t.blockLen);
240
266
  }
241
- function kt(t, e = !0) {
267
+ function mt(t, e = !0) {
242
268
  if (t.destroyed)
243
269
  throw new Error("Hash instance has been destroyed");
244
270
  if (e && t.finished)
245
271
  throw new Error("Hash#digest() has already been called");
246
272
  }
247
- function Re(t, e) {
248
- Ht(t, void 0, "digestInto() output");
249
- const n = e.outputLen;
250
- if (t.length < n)
251
- throw new Error('"digestInto() output" expected to be of length >=' + n);
273
+ function Le(t, e) {
274
+ _t(t, void 0, "digestInto() output");
275
+ const s = e.outputLen;
276
+ if (t.length < s)
277
+ throw new Error('"digestInto() output" expected to be of length >=' + s);
252
278
  }
253
- function V0(t) {
279
+ function b0(t) {
254
280
  return new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4));
255
281
  }
256
- function rt(...t) {
282
+ function tt(...t) {
257
283
  for (let e = 0; e < t.length; e++)
258
284
  t[e].fill(0);
259
285
  }
260
286
  function Kt(t) {
261
287
  return new DataView(t.buffer, t.byteOffset, t.byteLength);
262
288
  }
263
- function ut(t, e) {
289
+ function it(t, e) {
264
290
  return t << 32 - e | t >>> e;
265
291
  }
266
- function Lt(t, e) {
292
+ function yt(t, e) {
267
293
  return t << e | t >>> 32 - e >>> 0;
268
294
  }
269
- const U0 = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
270
- function E0(t) {
295
+ const x0 = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
296
+ function H0(t) {
271
297
  return t << 24 & 4278190080 | t << 8 & 16711680 | t >>> 8 & 65280 | t >>> 24 & 255;
272
298
  }
273
- function C0(t) {
299
+ function A0(t) {
274
300
  for (let e = 0; e < t.length; e++)
275
- t[e] = E0(t[e]);
301
+ t[e] = H0(t[e]);
276
302
  return t;
277
303
  }
278
- const fe = U0 ? (t) => t : C0, qe = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", k0 = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
279
- function Gs(t) {
280
- if (Ht(t), qe)
304
+ const se = x0 ? (t) => t : A0, me = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", p0 = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
305
+ function ps(t) {
306
+ if (_t(t), me)
281
307
  return t.toHex();
282
308
  let e = "";
283
- for (let n = 0; n < t.length; n++)
284
- e += k0[t[n]];
309
+ for (let s = 0; s < t.length; s++)
310
+ e += p0[t[s]];
285
311
  return e;
286
312
  }
287
- const bt = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
288
- function de(t) {
289
- if (t >= bt._0 && t <= bt._9)
290
- return t - bt._0;
291
- if (t >= bt.A && t <= bt.F)
292
- return t - (bt.A - 10);
293
- if (t >= bt.a && t <= bt.f)
294
- return t - (bt.a - 10);
313
+ const ht = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
314
+ function ne(t) {
315
+ if (t >= ht._0 && t <= ht._9)
316
+ return t - ht._0;
317
+ if (t >= ht.A && t <= ht.F)
318
+ return t - (ht.A - 10);
319
+ if (t >= ht.a && t <= ht.f)
320
+ return t - (ht.a - 10);
295
321
  }
296
- function js(t) {
322
+ function ys(t) {
297
323
  if (typeof t != "string")
298
324
  throw new Error("hex string expected, got " + typeof t);
299
- if (qe)
325
+ if (me)
300
326
  return Uint8Array.fromHex(t);
301
- const e = t.length, n = e / 2;
327
+ const e = t.length, s = e / 2;
302
328
  if (e % 2)
303
329
  throw new Error("hex string expected, got unpadded hex of length " + e);
304
- const h = new Uint8Array(n);
305
- for (let c = 0, i = 0; c < n; c++, i += 2) {
306
- const r = de(t.charCodeAt(i)), a = de(t.charCodeAt(i + 1));
330
+ const o = new Uint8Array(s);
331
+ for (let i = 0, c = 0; i < s; i++, c += 2) {
332
+ const r = ne(t.charCodeAt(c)), a = ne(t.charCodeAt(c + 1));
307
333
  if (r === void 0 || a === void 0) {
308
- const b = t[i] + t[i + 1];
309
- throw new Error('hex string expected, got non-hex character "' + b + '" at index ' + i);
334
+ const d = t[c] + t[c + 1];
335
+ throw new Error('hex string expected, got non-hex character "' + d + '" at index ' + c);
310
336
  }
311
- h[c] = r * 16 + a;
337
+ o[i] = r * 16 + a;
312
338
  }
313
- return h;
314
- }
315
- function D0(t) {
316
- if (typeof t != "string")
317
- throw new Error("string expected");
318
- return new Uint8Array(new TextEncoder().encode(t));
319
- }
320
- function ue(t, e = "") {
321
- return typeof t == "string" ? D0(t) : Ht(t, void 0, e);
339
+ return o;
322
340
  }
323
- function Ws(...t) {
341
+ function _s(...t) {
324
342
  let e = 0;
325
- for (let h = 0; h < t.length; h++) {
326
- const c = t[h];
327
- Ht(c), e += c.length;
343
+ for (let o = 0; o < t.length; o++) {
344
+ const i = t[o];
345
+ _t(i), e += i.length;
328
346
  }
329
- const n = new Uint8Array(e);
330
- for (let h = 0, c = 0; h < t.length; h++) {
331
- const i = t[h];
332
- n.set(i, c), c += i.length;
347
+ const s = new Uint8Array(e);
348
+ for (let o = 0, i = 0; o < t.length; o++) {
349
+ const c = t[o];
350
+ s.set(c, i), i += c.length;
333
351
  }
334
- return n;
352
+ return s;
335
353
  }
336
- function F0(t, e) {
337
- if (e !== void 0 && {}.toString.call(e) !== "[object Object]")
338
- throw new Error("options must be object or undefined");
339
- return Object.assign(t, e);
354
+ function ct(t, e = {}) {
355
+ const s = (i, c) => t(c).update(i).digest(), o = t(void 0);
356
+ return s.outputLen = o.outputLen, s.blockLen = o.blockLen, s.create = (i) => t(i), Object.assign(s, e), Object.freeze(s);
340
357
  }
341
- function lt(t, e = {}) {
342
- const n = (c, i) => t(i).update(c).digest(), h = t(void 0);
343
- return n.outputLen = h.outputLen, n.blockLen = h.blockLen, n.create = (c) => t(c), Object.assign(n, e), Object.freeze(n);
344
- }
345
- function Rs(t = 32) {
358
+ function gs(t = 32) {
346
359
  const e = typeof globalThis == "object" ? globalThis.crypto : null;
347
360
  if (typeof e?.getRandomValues != "function")
348
361
  throw new Error("crypto.getRandomValues must be defined");
349
362
  return e.getRandomValues(new Uint8Array(t));
350
363
  }
351
- const mt = (t) => ({
364
+ const gt = (t) => ({
352
365
  oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, t])
353
366
  });
354
- function Nt(t, e, n) {
355
- return t & e ^ ~t & n;
367
+ class $t {
368
+ oHash;
369
+ iHash;
370
+ blockLen;
371
+ outputLen;
372
+ finished = !1;
373
+ destroyed = !1;
374
+ constructor(e, s) {
375
+ if (l0(e), _t(s, void 0, "key"), this.iHash = e.create(), typeof this.iHash.update != "function")
376
+ throw new Error("Expected instance of class which extends utils.Hash");
377
+ this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
378
+ const o = this.blockLen, i = new Uint8Array(o);
379
+ i.set(s.length > o ? e.create().update(s).digest() : s);
380
+ for (let c = 0; c < i.length; c++)
381
+ i[c] ^= 54;
382
+ this.iHash.update(i), this.oHash = e.create();
383
+ for (let c = 0; c < i.length; c++)
384
+ i[c] ^= 106;
385
+ this.oHash.update(i), tt(i);
386
+ }
387
+ update(e) {
388
+ return mt(this), this.iHash.update(e), this;
389
+ }
390
+ digestInto(e) {
391
+ mt(this), _t(e, this.outputLen, "output"), this.finished = !0, this.iHash.digestInto(e), this.oHash.update(e), this.oHash.digestInto(e), this.destroy();
392
+ }
393
+ digest() {
394
+ const e = new Uint8Array(this.oHash.outputLen);
395
+ return this.digestInto(e), e;
396
+ }
397
+ _cloneInto(e) {
398
+ e ||= Object.create(Object.getPrototypeOf(this), {});
399
+ const { oHash: s, iHash: o, finished: i, destroyed: c, blockLen: r, outputLen: a } = this;
400
+ return e = e, e.finished = i, e.destroyed = c, e.blockLen = r, e.outputLen = a, e.oHash = s._cloneInto(e.oHash), e.iHash = o._cloneInto(e.iHash), e;
401
+ }
402
+ clone() {
403
+ return this._cloneInto();
404
+ }
405
+ destroy() {
406
+ this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
407
+ }
408
+ }
409
+ const Ue = (t, e, s) => new $t(t, e).update(s).digest();
410
+ Ue.create = (t, e) => new $t(t, e);
411
+ const y0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
412
+ __proto__: null,
413
+ _HMAC: $t,
414
+ hmac: Ue
415
+ }, Symbol.toStringTag, { value: "Module" })), Ss = /* @__PURE__ */ zt(y0);
416
+ function jt(t, e, s) {
417
+ return t & e ^ ~t & s;
356
418
  }
357
- function Pe(t, e, n) {
358
- return t & e ^ t & n ^ e & n;
419
+ function Ee(t, e, s) {
420
+ return t & e ^ t & s ^ e & s;
359
421
  }
360
- class Gt {
422
+ class kt {
361
423
  blockLen;
362
424
  outputLen;
363
425
  padOffset;
@@ -369,57 +431,57 @@ class Gt {
369
431
  length = 0;
370
432
  pos = 0;
371
433
  destroyed = !1;
372
- constructor(e, n, h, c) {
373
- this.blockLen = e, this.outputLen = n, this.padOffset = h, this.isLE = c, this.buffer = new Uint8Array(e), this.view = Kt(this.buffer);
434
+ constructor(e, s, o, i) {
435
+ this.blockLen = e, this.outputLen = s, this.padOffset = o, this.isLE = i, this.buffer = new Uint8Array(e), this.view = Kt(this.buffer);
374
436
  }
375
437
  update(e) {
376
- kt(this), Ht(e);
377
- const { view: n, buffer: h, blockLen: c } = this, i = e.length;
378
- for (let r = 0; r < i; ) {
379
- const a = Math.min(c - this.pos, i - r);
380
- if (a === c) {
381
- const b = Kt(e);
382
- for (; c <= i - r; r += c)
383
- this.process(b, r);
438
+ mt(this), _t(e);
439
+ const { view: s, buffer: o, blockLen: i } = this, c = e.length;
440
+ for (let r = 0; r < c; ) {
441
+ const a = Math.min(i - this.pos, c - r);
442
+ if (a === i) {
443
+ const d = Kt(e);
444
+ for (; i <= c - r; r += i)
445
+ this.process(d, r);
384
446
  continue;
385
447
  }
386
- h.set(e.subarray(r, r + a), this.pos), this.pos += a, r += a, this.pos === c && (this.process(n, 0), this.pos = 0);
448
+ o.set(e.subarray(r, r + a), this.pos), this.pos += a, r += a, this.pos === i && (this.process(s, 0), this.pos = 0);
387
449
  }
388
450
  return this.length += e.length, this.roundClean(), this;
389
451
  }
390
452
  digestInto(e) {
391
- kt(this), Re(e, this), this.finished = !0;
392
- const { buffer: n, view: h, blockLen: c, isLE: i } = this;
453
+ mt(this), Le(e, this), this.finished = !0;
454
+ const { buffer: s, view: o, blockLen: i, isLE: c } = this;
393
455
  let { pos: r } = this;
394
- n[r++] = 128, rt(this.buffer.subarray(r)), this.padOffset > c - r && (this.process(h, 0), r = 0);
395
- for (let u = r; u < c; u++)
396
- n[u] = 0;
397
- h.setBigUint64(c - 8, BigInt(this.length * 8), i), this.process(h, 0);
398
- const a = Kt(e), b = this.outputLen;
399
- if (b % 4)
456
+ s[r++] = 128, tt(this.buffer.subarray(r)), this.padOffset > i - r && (this.process(o, 0), r = 0);
457
+ for (let f = r; f < i; f++)
458
+ s[f] = 0;
459
+ o.setBigUint64(i - 8, BigInt(this.length * 8), c), this.process(o, 0);
460
+ const a = Kt(e), d = this.outputLen;
461
+ if (d % 4)
400
462
  throw new Error("_sha2: outputLen must be aligned to 32bit");
401
- const x = b / 4, H = this.get();
463
+ const x = d / 4, H = this.get();
402
464
  if (x > H.length)
403
465
  throw new Error("_sha2: outputLen bigger than state");
404
- for (let u = 0; u < x; u++)
405
- a.setUint32(4 * u, H[u], i);
466
+ for (let f = 0; f < x; f++)
467
+ a.setUint32(4 * f, H[f], c);
406
468
  }
407
469
  digest() {
408
- const { buffer: e, outputLen: n } = this;
470
+ const { buffer: e, outputLen: s } = this;
409
471
  this.digestInto(e);
410
- const h = e.slice(0, n);
411
- return this.destroy(), h;
472
+ const o = e.slice(0, s);
473
+ return this.destroy(), o;
412
474
  }
413
475
  _cloneInto(e) {
414
476
  e ||= new this.constructor(), e.set(...this.get());
415
- const { blockLen: n, buffer: h, length: c, finished: i, destroyed: r, pos: a } = this;
416
- return e.destroyed = r, e.finished = i, e.length = c, e.pos = a, c % n && e.buffer.set(h), e;
477
+ const { blockLen: s, buffer: o, length: i, finished: c, destroyed: r, pos: a } = this;
478
+ return e.destroyed = r, e.finished = c, e.length = i, e.pos = a, i % s && e.buffer.set(o), e;
417
479
  }
418
480
  clone() {
419
481
  return this._cloneInto();
420
482
  }
421
483
  }
422
- const _t = /* @__PURE__ */ Uint32Array.from([
484
+ const lt = /* @__PURE__ */ Uint32Array.from([
423
485
  1779033703,
424
486
  3144134277,
425
487
  1013904242,
@@ -428,7 +490,7 @@ const _t = /* @__PURE__ */ Uint32Array.from([
428
490
  2600822924,
429
491
  528734635,
430
492
  1541459225
431
- ]), gt = /* @__PURE__ */ Uint32Array.from([
493
+ ]), bt = /* @__PURE__ */ Uint32Array.from([
432
494
  3238371032,
433
495
  914150663,
434
496
  812702999,
@@ -437,7 +499,7 @@ const _t = /* @__PURE__ */ Uint32Array.from([
437
499
  1750603025,
438
500
  1694076839,
439
501
  3204075428
440
- ]), Y = /* @__PURE__ */ Uint32Array.from([
502
+ ]), J = /* @__PURE__ */ Uint32Array.from([
441
503
  3418070365,
442
504
  3238371032,
443
505
  1654270250,
@@ -454,7 +516,7 @@ const _t = /* @__PURE__ */ Uint32Array.from([
454
516
  1694076839,
455
517
  1203062813,
456
518
  3204075428
457
- ]), Z = /* @__PURE__ */ Uint32Array.from([
519
+ ]), Q = /* @__PURE__ */ Uint32Array.from([
458
520
  1779033703,
459
521
  4089235720,
460
522
  3144134277,
@@ -471,84 +533,84 @@ const _t = /* @__PURE__ */ Uint32Array.from([
471
533
  4215389547,
472
534
  1541459225,
473
535
  327033209
474
- ]), Ct = /* @__PURE__ */ Uint32Array.from([
536
+ ]), Lt = /* @__PURE__ */ Uint32Array.from([
475
537
  1732584193,
476
538
  4023233417,
477
539
  2562383102,
478
540
  271733878,
479
541
  3285377520
480
- ]), St = /* @__PURE__ */ new Uint32Array(80);
481
- class Ke extends Gt {
482
- A = Ct[0] | 0;
483
- B = Ct[1] | 0;
484
- C = Ct[2] | 0;
485
- D = Ct[3] | 0;
486
- E = Ct[4] | 0;
542
+ ]), xt = /* @__PURE__ */ new Uint32Array(80);
543
+ class Ve extends kt {
544
+ A = Lt[0] | 0;
545
+ B = Lt[1] | 0;
546
+ C = Lt[2] | 0;
547
+ D = Lt[3] | 0;
548
+ E = Lt[4] | 0;
487
549
  constructor() {
488
550
  super(64, 20, 8, !1);
489
551
  }
490
552
  get() {
491
- const { A: e, B: n, C: h, D: c, E: i } = this;
492
- return [e, n, h, c, i];
493
- }
494
- set(e, n, h, c, i) {
495
- this.A = e | 0, this.B = n | 0, this.C = h | 0, this.D = c | 0, this.E = i | 0;
496
- }
497
- process(e, n) {
498
- for (let b = 0; b < 16; b++, n += 4)
499
- St[b] = e.getUint32(n, !1);
500
- for (let b = 16; b < 80; b++)
501
- St[b] = Lt(St[b - 3] ^ St[b - 8] ^ St[b - 14] ^ St[b - 16], 1);
502
- let { A: h, B: c, C: i, D: r, E: a } = this;
503
- for (let b = 0; b < 80; b++) {
553
+ const { A: e, B: s, C: o, D: i, E: c } = this;
554
+ return [e, s, o, i, c];
555
+ }
556
+ set(e, s, o, i, c) {
557
+ this.A = e | 0, this.B = s | 0, this.C = o | 0, this.D = i | 0, this.E = c | 0;
558
+ }
559
+ process(e, s) {
560
+ for (let d = 0; d < 16; d++, s += 4)
561
+ xt[d] = e.getUint32(s, !1);
562
+ for (let d = 16; d < 80; d++)
563
+ xt[d] = yt(xt[d - 3] ^ xt[d - 8] ^ xt[d - 14] ^ xt[d - 16], 1);
564
+ let { A: o, B: i, C: c, D: r, E: a } = this;
565
+ for (let d = 0; d < 80; d++) {
504
566
  let x, H;
505
- b < 20 ? (x = Nt(c, i, r), H = 1518500249) : b < 40 ? (x = c ^ i ^ r, H = 1859775393) : b < 60 ? (x = Pe(c, i, r), H = 2400959708) : (x = c ^ i ^ r, H = 3395469782);
506
- const u = Lt(h, 5) + x + a + H + St[b] | 0;
507
- a = r, r = i, i = Lt(c, 30), c = h, h = u;
567
+ d < 20 ? (x = jt(i, c, r), H = 1518500249) : d < 40 ? (x = i ^ c ^ r, H = 1859775393) : d < 60 ? (x = Ee(i, c, r), H = 2400959708) : (x = i ^ c ^ r, H = 3395469782);
568
+ const f = yt(o, 5) + x + a + H + xt[d] | 0;
569
+ a = r, r = c, c = yt(i, 30), i = o, o = f;
508
570
  }
509
- h = h + this.A | 0, c = c + this.B | 0, i = i + this.C | 0, r = r + this.D | 0, a = a + this.E | 0, this.set(h, c, i, r, a);
571
+ o = o + this.A | 0, i = i + this.B | 0, c = c + this.C | 0, r = r + this.D | 0, a = a + this.E | 0, this.set(o, i, c, r, a);
510
572
  }
511
573
  roundClean() {
512
- rt(St);
574
+ tt(xt);
513
575
  }
514
576
  destroy() {
515
- this.set(0, 0, 0, 0, 0), rt(this.buffer);
577
+ this.set(0, 0, 0, 0, 0), tt(this.buffer);
516
578
  }
517
579
  }
518
- const T0 = /* @__PURE__ */ lt(() => new Ke()), O0 = /* @__PURE__ */ Math.pow(2, 32), v0 = /* @__PURE__ */ Array.from({ length: 64 }, (t, e) => Math.floor(O0 * Math.abs(Math.sin(e + 1)))), jt = /* @__PURE__ */ Ct.slice(0, 4), Qt = /* @__PURE__ */ new Uint32Array(16);
519
- class Ne extends Gt {
520
- A = jt[0] | 0;
521
- B = jt[1] | 0;
522
- C = jt[2] | 0;
523
- D = jt[3] | 0;
580
+ const _0 = /* @__PURE__ */ ct(() => new Ve()), g0 = /* @__PURE__ */ Math.pow(2, 32), S0 = /* @__PURE__ */ Array.from({ length: 64 }, (t, e) => Math.floor(g0 * Math.abs(Math.sin(e + 1)))), Ft = /* @__PURE__ */ Lt.slice(0, 4), Nt = /* @__PURE__ */ new Uint32Array(16);
581
+ class Ce extends kt {
582
+ A = Ft[0] | 0;
583
+ B = Ft[1] | 0;
584
+ C = Ft[2] | 0;
585
+ D = Ft[3] | 0;
524
586
  constructor() {
525
587
  super(64, 16, 8, !0);
526
588
  }
527
589
  get() {
528
- const { A: e, B: n, C: h, D: c } = this;
529
- return [e, n, h, c];
590
+ const { A: e, B: s, C: o, D: i } = this;
591
+ return [e, s, o, i];
530
592
  }
531
- set(e, n, h, c) {
532
- this.A = e | 0, this.B = n | 0, this.C = h | 0, this.D = c | 0;
593
+ set(e, s, o, i) {
594
+ this.A = e | 0, this.B = s | 0, this.C = o | 0, this.D = i | 0;
533
595
  }
534
- process(e, n) {
535
- for (let a = 0; a < 16; a++, n += 4)
536
- Qt[a] = e.getUint32(n, !0);
537
- let { A: h, B: c, C: i, D: r } = this;
596
+ process(e, s) {
597
+ for (let a = 0; a < 16; a++, s += 4)
598
+ Nt[a] = e.getUint32(s, !0);
599
+ let { A: o, B: i, C: c, D: r } = this;
538
600
  for (let a = 0; a < 64; a++) {
539
- let b, x, H;
540
- a < 16 ? (b = Nt(c, i, r), x = a, H = [7, 12, 17, 22]) : a < 32 ? (b = Nt(r, c, i), x = (5 * a + 1) % 16, H = [5, 9, 14, 20]) : a < 48 ? (b = c ^ i ^ r, x = (3 * a + 5) % 16, H = [4, 11, 16, 23]) : (b = i ^ (c | ~r), x = 7 * a % 16, H = [6, 10, 15, 21]), b = b + h + v0[a] + Qt[x], h = r, r = i, i = c, c = c + Lt(b, H[a % 4]);
601
+ let d, x, H;
602
+ a < 16 ? (d = jt(i, c, r), x = a, H = [7, 12, 17, 22]) : a < 32 ? (d = jt(r, i, c), x = (5 * a + 1) % 16, H = [5, 9, 14, 20]) : a < 48 ? (d = i ^ c ^ r, x = (3 * a + 5) % 16, H = [4, 11, 16, 23]) : (d = c ^ (i | ~r), x = 7 * a % 16, H = [6, 10, 15, 21]), d = d + o + S0[a] + Nt[x], o = r, r = c, c = i, i = i + yt(d, H[a % 4]);
541
603
  }
542
- h = h + this.A | 0, c = c + this.B | 0, i = i + this.C | 0, r = r + this.D | 0, this.set(h, c, i, r);
604
+ o = o + this.A | 0, i = i + this.B | 0, c = c + this.C | 0, r = r + this.D | 0, this.set(o, i, c, r);
543
605
  }
544
606
  roundClean() {
545
- rt(Qt);
607
+ tt(Nt);
546
608
  }
547
609
  destroy() {
548
- this.set(0, 0, 0, 0), rt(this.buffer);
610
+ this.set(0, 0, 0, 0), tt(this.buffer);
549
611
  }
550
612
  }
551
- const M0 = /* @__PURE__ */ lt(() => new Ne()), G0 = /* @__PURE__ */ Uint8Array.from([
613
+ const w0 = /* @__PURE__ */ ct(() => new Ce()), B0 = /* @__PURE__ */ Uint8Array.from([
552
614
  7,
553
615
  4,
554
616
  13,
@@ -565,36 +627,36 @@ const M0 = /* @__PURE__ */ lt(() => new Ne()), G0 = /* @__PURE__ */ Uint8Array.f
565
627
  14,
566
628
  11,
567
629
  8
568
- ]), Xe = Uint8Array.from(new Array(16).fill(0).map((t, e) => e)), j0 = Xe.map((t) => (9 * t + 5) % 16), Je = /* @__PURE__ */ (() => {
569
- const n = [[Xe], [j0]];
570
- for (let h = 0; h < 4; h++)
571
- for (let c of n)
572
- c.push(c[h].map((i) => G0[i]));
573
- return n;
574
- })(), ze = Je[0], Qe = Je[1], Ye = /* @__PURE__ */ [
630
+ ]), De = Uint8Array.from(new Array(16).fill(0).map((t, e) => e)), I0 = De.map((t) => (9 * t + 5) % 16), ke = /* @__PURE__ */ (() => {
631
+ const s = [[De], [I0]];
632
+ for (let o = 0; o < 4; o++)
633
+ for (let i of s)
634
+ i.push(i[o].map((c) => B0[c]));
635
+ return s;
636
+ })(), Fe = ke[0], Oe = ke[1], Te = /* @__PURE__ */ [
575
637
  [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
576
638
  [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],
577
639
  [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
578
640
  [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
579
641
  [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
580
- ].map((t) => Uint8Array.from(t)), W0 = /* @__PURE__ */ ze.map((t, e) => t.map((n) => Ye[e][n])), R0 = /* @__PURE__ */ Qe.map((t, e) => t.map((n) => Ye[e][n])), q0 = /* @__PURE__ */ Uint32Array.from([
642
+ ].map((t) => Uint8Array.from(t)), L0 = /* @__PURE__ */ Fe.map((t, e) => t.map((s) => Te[e][s])), m0 = /* @__PURE__ */ Oe.map((t, e) => t.map((s) => Te[e][s])), U0 = /* @__PURE__ */ Uint32Array.from([
581
643
  0,
582
644
  1518500249,
583
645
  1859775393,
584
646
  2400959708,
585
647
  2840853838
586
- ]), P0 = /* @__PURE__ */ Uint32Array.from([
648
+ ]), E0 = /* @__PURE__ */ Uint32Array.from([
587
649
  1352829926,
588
650
  1548603684,
589
651
  1836072691,
590
652
  2053994217,
591
653
  0
592
654
  ]);
593
- function le(t, e, n, h) {
594
- return t === 0 ? e ^ n ^ h : t === 1 ? e & n | ~e & h : t === 2 ? (e | ~n) ^ h : t === 3 ? e & h | n & ~h : e ^ (n | ~h);
655
+ function re(t, e, s, o) {
656
+ return t === 0 ? e ^ s ^ o : t === 1 ? e & s | ~e & o : t === 2 ? (e | ~s) ^ o : t === 3 ? e & o | s & ~o : e ^ (s | ~o);
595
657
  }
596
- const Wt = /* @__PURE__ */ new Uint32Array(16);
597
- class Ze extends Gt {
658
+ const Ot = /* @__PURE__ */ new Uint32Array(16);
659
+ class ve extends kt {
598
660
  h0 = 1732584193;
599
661
  h1 = -271733879;
600
662
  h2 = -1732584194;
@@ -604,63 +666,63 @@ class Ze extends Gt {
604
666
  super(64, 20, 8, !0);
605
667
  }
606
668
  get() {
607
- const { h0: e, h1: n, h2: h, h3: c, h4: i } = this;
608
- return [e, n, h, c, i];
609
- }
610
- set(e, n, h, c, i) {
611
- this.h0 = e | 0, this.h1 = n | 0, this.h2 = h | 0, this.h3 = c | 0, this.h4 = i | 0;
612
- }
613
- process(e, n) {
614
- for (let B = 0; B < 16; B++, n += 4)
615
- Wt[B] = e.getUint32(n, !0);
616
- let h = this.h0 | 0, c = h, i = this.h1 | 0, r = i, a = this.h2 | 0, b = a, x = this.h3 | 0, H = x, u = this.h4 | 0, S = u;
617
- for (let B = 0; B < 5; B++) {
618
- const g = 4 - B, I = q0[B], D = P0[B], R = ze[B], T = Qe[B], _ = W0[B], C = R0[B];
619
- for (let p = 0; p < 16; p++) {
620
- const w = Lt(h + le(B, i, a, x) + Wt[R[p]] + I, _[p]) + u | 0;
621
- h = u, u = x, x = Lt(a, 10) | 0, a = i, i = w;
669
+ const { h0: e, h1: s, h2: o, h3: i, h4: c } = this;
670
+ return [e, s, o, i, c];
671
+ }
672
+ set(e, s, o, i, c) {
673
+ this.h0 = e | 0, this.h1 = s | 0, this.h2 = o | 0, this.h3 = i | 0, this.h4 = c | 0;
674
+ }
675
+ process(e, s) {
676
+ for (let w = 0; w < 16; w++, s += 4)
677
+ Ot[w] = e.getUint32(s, !0);
678
+ let o = this.h0 | 0, i = o, c = this.h1 | 0, r = c, a = this.h2 | 0, d = a, x = this.h3 | 0, H = x, f = this.h4 | 0, g = f;
679
+ for (let w = 0; w < 5; w++) {
680
+ const S = 4 - w, I = U0[w], D = E0[w], W = Fe[w], v = Oe[w], _ = L0[w], C = m0[w];
681
+ for (let A = 0; A < 16; A++) {
682
+ const B = yt(o + re(w, c, a, x) + Ot[W[A]] + I, _[A]) + f | 0;
683
+ o = f, f = x, x = yt(a, 10) | 0, a = c, c = B;
622
684
  }
623
- for (let p = 0; p < 16; p++) {
624
- const w = Lt(c + le(g, r, b, H) + Wt[T[p]] + D, C[p]) + S | 0;
625
- c = S, S = H, H = Lt(b, 10) | 0, b = r, r = w;
685
+ for (let A = 0; A < 16; A++) {
686
+ const B = yt(i + re(S, r, d, H) + Ot[v[A]] + D, C[A]) + g | 0;
687
+ i = g, g = H, H = yt(d, 10) | 0, d = r, r = B;
626
688
  }
627
689
  }
628
- this.set(this.h1 + a + H | 0, this.h2 + x + S | 0, this.h3 + u + c | 0, this.h4 + h + r | 0, this.h0 + i + b | 0);
690
+ this.set(this.h1 + a + H | 0, this.h2 + x + g | 0, this.h3 + f + i | 0, this.h4 + o + r | 0, this.h0 + c + d | 0);
629
691
  }
630
692
  roundClean() {
631
- rt(Wt);
693
+ tt(Ot);
632
694
  }
633
695
  destroy() {
634
- this.destroyed = !0, rt(this.buffer), this.set(0, 0, 0, 0, 0);
696
+ this.destroyed = !0, tt(this.buffer), this.set(0, 0, 0, 0, 0);
635
697
  }
636
698
  }
637
- const K0 = /* @__PURE__ */ lt(() => new Ze()), N0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
699
+ const V0 = /* @__PURE__ */ ct(() => new ve()), C0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
638
700
  __proto__: null,
639
- _MD5: Ne,
640
- _RIPEMD160: Ze,
641
- _SHA1: Ke,
642
- md5: M0,
643
- ripemd160: K0,
644
- sha1: T0
645
- }, Symbol.toStringTag, { value: "Module" })), Rt = /* @__PURE__ */ BigInt(2 ** 32 - 1), be = /* @__PURE__ */ BigInt(32);
646
- function X0(t, e = !1) {
647
- return e ? { h: Number(t & Rt), l: Number(t >> be & Rt) } : { h: Number(t >> be & Rt) | 0, l: Number(t & Rt) | 0 };
648
- }
649
- function $e(t, e = !1) {
650
- const n = t.length;
651
- let h = new Uint32Array(n), c = new Uint32Array(n);
652
- for (let i = 0; i < n; i++) {
653
- const { h: r, l: a } = X0(t[i], e);
654
- [h[i], c[i]] = [r, a];
655
- }
656
- return [h, c];
657
- }
658
- const xe = (t, e, n) => t >>> n, He = (t, e, n) => t << 32 - n | e >>> n, Ut = (t, e, n) => t >>> n | e << 32 - n, Et = (t, e, n) => t << 32 - n | e >>> n, qt = (t, e, n) => t << 64 - n | e >>> n - 32, Pt = (t, e, n) => t >>> n - 32 | e << 64 - n, J0 = (t, e, n) => t << n | e >>> 32 - n, z0 = (t, e, n) => e << n | t >>> 32 - n, Q0 = (t, e, n) => e << n - 32 | t >>> 64 - n, Y0 = (t, e, n) => t << n - 32 | e >>> 64 - n;
659
- function xt(t, e, n, h) {
660
- const c = (e >>> 0) + (h >>> 0);
661
- return { h: t + n + (c / 2 ** 32 | 0) | 0, l: c | 0 };
662
- }
663
- const Z0 = (t, e, n) => (t >>> 0) + (e >>> 0) + (n >>> 0), $0 = (t, e, n, h) => e + n + h + (t / 2 ** 32 | 0) | 0, ts = (t, e, n, h) => (t >>> 0) + (e >>> 0) + (n >>> 0) + (h >>> 0), es = (t, e, n, h, c) => e + n + h + c + (t / 2 ** 32 | 0) | 0, ss = (t, e, n, h, c) => (t >>> 0) + (e >>> 0) + (n >>> 0) + (h >>> 0) + (c >>> 0), ns = (t, e, n, h, c, i) => e + n + h + c + i + (t / 2 ** 32 | 0) | 0, rs = /* @__PURE__ */ Uint32Array.from([
701
+ _MD5: Ce,
702
+ _RIPEMD160: ve,
703
+ _SHA1: Ve,
704
+ md5: w0,
705
+ ripemd160: V0,
706
+ sha1: _0
707
+ }, Symbol.toStringTag, { value: "Module" })), ws = /* @__PURE__ */ zt(C0), Tt = /* @__PURE__ */ BigInt(2 ** 32 - 1), ie = /* @__PURE__ */ BigInt(32);
708
+ function D0(t, e = !1) {
709
+ return e ? { h: Number(t & Tt), l: Number(t >> ie & Tt) } : { h: Number(t >> ie & Tt) | 0, l: Number(t & Tt) | 0 };
710
+ }
711
+ function Me(t, e = !1) {
712
+ const s = t.length;
713
+ let o = new Uint32Array(s), i = new Uint32Array(s);
714
+ for (let c = 0; c < s; c++) {
715
+ const { h: r, l: a } = D0(t[c], e);
716
+ [o[c], i[c]] = [r, a];
717
+ }
718
+ return [o, i];
719
+ }
720
+ const ce = (t, e, s) => t >>> s, oe = (t, e, s) => t << 32 - s | e >>> s, Bt = (t, e, s) => t >>> s | e << 32 - s, It = (t, e, s) => t << 32 - s | e >>> s, vt = (t, e, s) => t << 64 - s | e >>> s - 32, Mt = (t, e, s) => t >>> s - 32 | e << 64 - s, k0 = (t, e, s) => t << s | e >>> 32 - s, F0 = (t, e, s) => e << s | t >>> 32 - s, O0 = (t, e, s) => e << s - 32 | t >>> 64 - s, T0 = (t, e, s) => t << s - 32 | e >>> 64 - s;
721
+ function ft(t, e, s, o) {
722
+ const i = (e >>> 0) + (o >>> 0);
723
+ return { h: t + s + (i / 2 ** 32 | 0) | 0, l: i | 0 };
724
+ }
725
+ const v0 = (t, e, s) => (t >>> 0) + (e >>> 0) + (s >>> 0), M0 = (t, e, s, o) => e + s + o + (t / 2 ** 32 | 0) | 0, G0 = (t, e, s, o) => (t >>> 0) + (e >>> 0) + (s >>> 0) + (o >>> 0), j0 = (t, e, s, o, i) => e + s + o + i + (t / 2 ** 32 | 0) | 0, W0 = (t, e, s, o, i) => (t >>> 0) + (e >>> 0) + (s >>> 0) + (o >>> 0) + (i >>> 0), R0 = (t, e, s, o, i, c) => e + s + o + i + c + (t / 2 ** 32 | 0) | 0, P0 = /* @__PURE__ */ Uint32Array.from([
664
726
  1116352408,
665
727
  1899447441,
666
728
  3049323471,
@@ -725,69 +787,69 @@ const Z0 = (t, e, n) => (t >>> 0) + (e >>> 0) + (n >>> 0), $0 = (t, e, n, h) =>
725
787
  2756734187,
726
788
  3204031479,
727
789
  3329325298
728
- ]), wt = /* @__PURE__ */ new Uint32Array(64);
729
- class t0 extends Gt {
790
+ ]), Ht = /* @__PURE__ */ new Uint32Array(64);
791
+ class Ge extends kt {
730
792
  constructor(e) {
731
793
  super(64, e, 8, !1);
732
794
  }
733
795
  get() {
734
- const { A: e, B: n, C: h, D: c, E: i, F: r, G: a, H: b } = this;
735
- return [e, n, h, c, i, r, a, b];
796
+ const { A: e, B: s, C: o, D: i, E: c, F: r, G: a, H: d } = this;
797
+ return [e, s, o, i, c, r, a, d];
736
798
  }
737
799
  // prettier-ignore
738
- set(e, n, h, c, i, r, a, b) {
739
- this.A = e | 0, this.B = n | 0, this.C = h | 0, this.D = c | 0, this.E = i | 0, this.F = r | 0, this.G = a | 0, this.H = b | 0;
800
+ set(e, s, o, i, c, r, a, d) {
801
+ this.A = e | 0, this.B = s | 0, this.C = o | 0, this.D = i | 0, this.E = c | 0, this.F = r | 0, this.G = a | 0, this.H = d | 0;
740
802
  }
741
- process(e, n) {
742
- for (let u = 0; u < 16; u++, n += 4)
743
- wt[u] = e.getUint32(n, !1);
744
- for (let u = 16; u < 64; u++) {
745
- const S = wt[u - 15], B = wt[u - 2], g = ut(S, 7) ^ ut(S, 18) ^ S >>> 3, I = ut(B, 17) ^ ut(B, 19) ^ B >>> 10;
746
- wt[u] = I + wt[u - 7] + g + wt[u - 16] | 0;
803
+ process(e, s) {
804
+ for (let f = 0; f < 16; f++, s += 4)
805
+ Ht[f] = e.getUint32(s, !1);
806
+ for (let f = 16; f < 64; f++) {
807
+ const g = Ht[f - 15], w = Ht[f - 2], S = it(g, 7) ^ it(g, 18) ^ g >>> 3, I = it(w, 17) ^ it(w, 19) ^ w >>> 10;
808
+ Ht[f] = I + Ht[f - 7] + S + Ht[f - 16] | 0;
747
809
  }
748
- let { A: h, B: c, C: i, D: r, E: a, F: b, G: x, H } = this;
749
- for (let u = 0; u < 64; u++) {
750
- const S = ut(a, 6) ^ ut(a, 11) ^ ut(a, 25), B = H + S + Nt(a, b, x) + rs[u] + wt[u] | 0, I = (ut(h, 2) ^ ut(h, 13) ^ ut(h, 22)) + Pe(h, c, i) | 0;
751
- H = x, x = b, b = a, a = r + B | 0, r = i, i = c, c = h, h = B + I | 0;
810
+ let { A: o, B: i, C: c, D: r, E: a, F: d, G: x, H } = this;
811
+ for (let f = 0; f < 64; f++) {
812
+ const g = it(a, 6) ^ it(a, 11) ^ it(a, 25), w = H + g + jt(a, d, x) + P0[f] + Ht[f] | 0, I = (it(o, 2) ^ it(o, 13) ^ it(o, 22)) + Ee(o, i, c) | 0;
813
+ H = x, x = d, d = a, a = r + w | 0, r = c, c = i, i = o, o = w + I | 0;
752
814
  }
753
- h = h + this.A | 0, c = c + this.B | 0, i = i + this.C | 0, r = r + this.D | 0, a = a + this.E | 0, b = b + this.F | 0, x = x + this.G | 0, H = H + this.H | 0, this.set(h, c, i, r, a, b, x, H);
815
+ o = o + this.A | 0, i = i + this.B | 0, c = c + this.C | 0, r = r + this.D | 0, a = a + this.E | 0, d = d + this.F | 0, x = x + this.G | 0, H = H + this.H | 0, this.set(o, i, c, r, a, d, x, H);
754
816
  }
755
817
  roundClean() {
756
- rt(wt);
818
+ tt(Ht);
757
819
  }
758
820
  destroy() {
759
- this.set(0, 0, 0, 0, 0, 0, 0, 0), rt(this.buffer);
821
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), tt(this.buffer);
760
822
  }
761
823
  }
762
- class e0 extends t0 {
824
+ class je extends Ge {
763
825
  // We cannot use array here since array allows indexing by variable
764
826
  // which means optimizer/compiler cannot use registers.
765
- A = _t[0] | 0;
766
- B = _t[1] | 0;
767
- C = _t[2] | 0;
768
- D = _t[3] | 0;
769
- E = _t[4] | 0;
770
- F = _t[5] | 0;
771
- G = _t[6] | 0;
772
- H = _t[7] | 0;
827
+ A = lt[0] | 0;
828
+ B = lt[1] | 0;
829
+ C = lt[2] | 0;
830
+ D = lt[3] | 0;
831
+ E = lt[4] | 0;
832
+ F = lt[5] | 0;
833
+ G = lt[6] | 0;
834
+ H = lt[7] | 0;
773
835
  constructor() {
774
836
  super(32);
775
837
  }
776
838
  }
777
- class s0 extends t0 {
778
- A = gt[0] | 0;
779
- B = gt[1] | 0;
780
- C = gt[2] | 0;
781
- D = gt[3] | 0;
782
- E = gt[4] | 0;
783
- F = gt[5] | 0;
784
- G = gt[6] | 0;
785
- H = gt[7] | 0;
839
+ class We extends Ge {
840
+ A = bt[0] | 0;
841
+ B = bt[1] | 0;
842
+ C = bt[2] | 0;
843
+ D = bt[3] | 0;
844
+ E = bt[4] | 0;
845
+ F = bt[5] | 0;
846
+ G = bt[6] | 0;
847
+ H = bt[7] | 0;
786
848
  constructor() {
787
849
  super(28);
788
850
  }
789
851
  }
790
- const n0 = $e([
852
+ const Re = Me([
791
853
  "0x428a2f98d728ae22",
792
854
  "0x7137449123ef65cd",
793
855
  "0xb5c0fbcfec4d3b2f",
@@ -868,86 +930,86 @@ const n0 = $e([
868
930
  "0x597f299cfc657e2a",
869
931
  "0x5fcb6fab3ad6faec",
870
932
  "0x6c44198c4a475817"
871
- ].map((t) => BigInt(t))), is = n0[0], cs = n0[1], It = /* @__PURE__ */ new Uint32Array(80), Bt = /* @__PURE__ */ new Uint32Array(80);
872
- class Xt extends Gt {
933
+ ].map((t) => BigInt(t))), q0 = Re[0], K0 = Re[1], At = /* @__PURE__ */ new Uint32Array(80), pt = /* @__PURE__ */ new Uint32Array(80);
934
+ class Wt extends kt {
873
935
  constructor(e) {
874
936
  super(128, e, 16, !1);
875
937
  }
876
938
  // prettier-ignore
877
939
  get() {
878
- const { Ah: e, Al: n, Bh: h, Bl: c, Ch: i, Cl: r, Dh: a, Dl: b, Eh: x, El: H, Fh: u, Fl: S, Gh: B, Gl: g, Hh: I, Hl: D } = this;
879
- return [e, n, h, c, i, r, a, b, x, H, u, S, B, g, I, D];
940
+ const { Ah: e, Al: s, Bh: o, Bl: i, Ch: c, Cl: r, Dh: a, Dl: d, Eh: x, El: H, Fh: f, Fl: g, Gh: w, Gl: S, Hh: I, Hl: D } = this;
941
+ return [e, s, o, i, c, r, a, d, x, H, f, g, w, S, I, D];
880
942
  }
881
943
  // prettier-ignore
882
- set(e, n, h, c, i, r, a, b, x, H, u, S, B, g, I, D) {
883
- this.Ah = e | 0, this.Al = n | 0, this.Bh = h | 0, this.Bl = c | 0, this.Ch = i | 0, this.Cl = r | 0, this.Dh = a | 0, this.Dl = b | 0, this.Eh = x | 0, this.El = H | 0, this.Fh = u | 0, this.Fl = S | 0, this.Gh = B | 0, this.Gl = g | 0, this.Hh = I | 0, this.Hl = D | 0;
944
+ set(e, s, o, i, c, r, a, d, x, H, f, g, w, S, I, D) {
945
+ this.Ah = e | 0, this.Al = s | 0, this.Bh = o | 0, this.Bl = i | 0, this.Ch = c | 0, this.Cl = r | 0, this.Dh = a | 0, this.Dl = d | 0, this.Eh = x | 0, this.El = H | 0, this.Fh = f | 0, this.Fl = g | 0, this.Gh = w | 0, this.Gl = S | 0, this.Hh = I | 0, this.Hl = D | 0;
884
946
  }
885
- process(e, n) {
886
- for (let _ = 0; _ < 16; _++, n += 4)
887
- It[_] = e.getUint32(n), Bt[_] = e.getUint32(n += 4);
947
+ process(e, s) {
948
+ for (let _ = 0; _ < 16; _++, s += 4)
949
+ At[_] = e.getUint32(s), pt[_] = e.getUint32(s += 4);
888
950
  for (let _ = 16; _ < 80; _++) {
889
- const C = It[_ - 15] | 0, p = Bt[_ - 15] | 0, w = Ut(C, p, 1) ^ Ut(C, p, 8) ^ xe(C, p, 7), U = Et(C, p, 1) ^ Et(C, p, 8) ^ He(C, p, 7), E = It[_ - 2] | 0, o = Bt[_ - 2] | 0, f = Ut(E, o, 19) ^ qt(E, o, 61) ^ xe(E, o, 6), d = Et(E, o, 19) ^ Pt(E, o, 61) ^ He(E, o, 6), L = ts(U, d, Bt[_ - 7], Bt[_ - 16]), A = es(L, w, f, It[_ - 7], It[_ - 16]);
890
- It[_] = A | 0, Bt[_] = L | 0;
951
+ const C = At[_ - 15] | 0, A = pt[_ - 15] | 0, B = Bt(C, A, 1) ^ Bt(C, A, 8) ^ ce(C, A, 7), m = It(C, A, 1) ^ It(C, A, 8) ^ oe(C, A, 7), E = At[_ - 2] | 0, h = pt[_ - 2] | 0, u = Bt(E, h, 19) ^ vt(E, h, 61) ^ ce(E, h, 6), l = It(E, h, 19) ^ Mt(E, h, 61) ^ oe(E, h, 6), L = G0(m, l, pt[_ - 7], pt[_ - 16]), p = j0(L, B, u, At[_ - 7], At[_ - 16]);
952
+ At[_] = p | 0, pt[_] = L | 0;
891
953
  }
892
- let { Ah: h, Al: c, Bh: i, Bl: r, Ch: a, Cl: b, Dh: x, Dl: H, Eh: u, El: S, Fh: B, Fl: g, Gh: I, Gl: D, Hh: R, Hl: T } = this;
954
+ let { Ah: o, Al: i, Bh: c, Bl: r, Ch: a, Cl: d, Dh: x, Dl: H, Eh: f, El: g, Fh: w, Fl: S, Gh: I, Gl: D, Hh: W, Hl: v } = this;
893
955
  for (let _ = 0; _ < 80; _++) {
894
- const C = Ut(u, S, 14) ^ Ut(u, S, 18) ^ qt(u, S, 41), p = Et(u, S, 14) ^ Et(u, S, 18) ^ Pt(u, S, 41), w = u & B ^ ~u & I, U = S & g ^ ~S & D, E = ss(T, p, U, cs[_], Bt[_]), o = ns(E, R, C, w, is[_], It[_]), f = E | 0, d = Ut(h, c, 28) ^ qt(h, c, 34) ^ qt(h, c, 39), L = Et(h, c, 28) ^ Pt(h, c, 34) ^ Pt(h, c, 39), A = h & i ^ h & a ^ i & a, m = c & r ^ c & b ^ r & b;
895
- R = I | 0, T = D | 0, I = B | 0, D = g | 0, B = u | 0, g = S | 0, { h: u, l: S } = xt(x | 0, H | 0, o | 0, f | 0), x = a | 0, H = b | 0, a = i | 0, b = r | 0, i = h | 0, r = c | 0;
896
- const F = Z0(f, L, m);
897
- h = $0(F, o, d, A), c = F | 0;
956
+ const C = Bt(f, g, 14) ^ Bt(f, g, 18) ^ vt(f, g, 41), A = It(f, g, 14) ^ It(f, g, 18) ^ Mt(f, g, 41), B = f & w ^ ~f & I, m = g & S ^ ~g & D, E = W0(v, A, m, K0[_], pt[_]), h = R0(E, W, C, B, q0[_], At[_]), u = E | 0, l = Bt(o, i, 28) ^ vt(o, i, 34) ^ vt(o, i, 39), L = It(o, i, 28) ^ Mt(o, i, 34) ^ Mt(o, i, 39), p = o & c ^ o & a ^ c & a, U = i & r ^ i & d ^ r & d;
957
+ W = I | 0, v = D | 0, I = w | 0, D = S | 0, w = f | 0, S = g | 0, { h: f, l: g } = ft(x | 0, H | 0, h | 0, u | 0), x = a | 0, H = d | 0, a = c | 0, d = r | 0, c = o | 0, r = i | 0;
958
+ const F = v0(u, L, U);
959
+ o = M0(F, h, l, p), i = F | 0;
898
960
  }
899
- ({ h, l: c } = xt(this.Ah | 0, this.Al | 0, h | 0, c | 0)), { h: i, l: r } = xt(this.Bh | 0, this.Bl | 0, i | 0, r | 0), { h: a, l: b } = xt(this.Ch | 0, this.Cl | 0, a | 0, b | 0), { h: x, l: H } = xt(this.Dh | 0, this.Dl | 0, x | 0, H | 0), { h: u, l: S } = xt(this.Eh | 0, this.El | 0, u | 0, S | 0), { h: B, l: g } = xt(this.Fh | 0, this.Fl | 0, B | 0, g | 0), { h: I, l: D } = xt(this.Gh | 0, this.Gl | 0, I | 0, D | 0), { h: R, l: T } = xt(this.Hh | 0, this.Hl | 0, R | 0, T | 0), this.set(h, c, i, r, a, b, x, H, u, S, B, g, I, D, R, T);
961
+ ({ h: o, l: i } = ft(this.Ah | 0, this.Al | 0, o | 0, i | 0)), { h: c, l: r } = ft(this.Bh | 0, this.Bl | 0, c | 0, r | 0), { h: a, l: d } = ft(this.Ch | 0, this.Cl | 0, a | 0, d | 0), { h: x, l: H } = ft(this.Dh | 0, this.Dl | 0, x | 0, H | 0), { h: f, l: g } = ft(this.Eh | 0, this.El | 0, f | 0, g | 0), { h: w, l: S } = ft(this.Fh | 0, this.Fl | 0, w | 0, S | 0), { h: I, l: D } = ft(this.Gh | 0, this.Gl | 0, I | 0, D | 0), { h: W, l: v } = ft(this.Hh | 0, this.Hl | 0, W | 0, v | 0), this.set(o, i, c, r, a, d, x, H, f, g, w, S, I, D, W, v);
900
962
  }
901
963
  roundClean() {
902
- rt(It, Bt);
964
+ tt(At, pt);
903
965
  }
904
966
  destroy() {
905
- rt(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
906
- }
907
- }
908
- class r0 extends Xt {
909
- Ah = Z[0] | 0;
910
- Al = Z[1] | 0;
911
- Bh = Z[2] | 0;
912
- Bl = Z[3] | 0;
913
- Ch = Z[4] | 0;
914
- Cl = Z[5] | 0;
915
- Dh = Z[6] | 0;
916
- Dl = Z[7] | 0;
917
- Eh = Z[8] | 0;
918
- El = Z[9] | 0;
919
- Fh = Z[10] | 0;
920
- Fl = Z[11] | 0;
921
- Gh = Z[12] | 0;
922
- Gl = Z[13] | 0;
923
- Hh = Z[14] | 0;
924
- Hl = Z[15] | 0;
967
+ tt(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
968
+ }
969
+ }
970
+ class Pe extends Wt {
971
+ Ah = Q[0] | 0;
972
+ Al = Q[1] | 0;
973
+ Bh = Q[2] | 0;
974
+ Bl = Q[3] | 0;
975
+ Ch = Q[4] | 0;
976
+ Cl = Q[5] | 0;
977
+ Dh = Q[6] | 0;
978
+ Dl = Q[7] | 0;
979
+ Eh = Q[8] | 0;
980
+ El = Q[9] | 0;
981
+ Fh = Q[10] | 0;
982
+ Fl = Q[11] | 0;
983
+ Gh = Q[12] | 0;
984
+ Gl = Q[13] | 0;
985
+ Hh = Q[14] | 0;
986
+ Hl = Q[15] | 0;
925
987
  constructor() {
926
988
  super(64);
927
989
  }
928
990
  }
929
- class i0 extends Xt {
930
- Ah = Y[0] | 0;
931
- Al = Y[1] | 0;
932
- Bh = Y[2] | 0;
933
- Bl = Y[3] | 0;
934
- Ch = Y[4] | 0;
935
- Cl = Y[5] | 0;
936
- Dh = Y[6] | 0;
937
- Dl = Y[7] | 0;
938
- Eh = Y[8] | 0;
939
- El = Y[9] | 0;
940
- Fh = Y[10] | 0;
941
- Fl = Y[11] | 0;
942
- Gh = Y[12] | 0;
943
- Gl = Y[13] | 0;
944
- Hh = Y[14] | 0;
945
- Hl = Y[15] | 0;
991
+ class qe extends Wt {
992
+ Ah = J[0] | 0;
993
+ Al = J[1] | 0;
994
+ Bh = J[2] | 0;
995
+ Bl = J[3] | 0;
996
+ Ch = J[4] | 0;
997
+ Cl = J[5] | 0;
998
+ Dh = J[6] | 0;
999
+ Dl = J[7] | 0;
1000
+ Eh = J[8] | 0;
1001
+ El = J[9] | 0;
1002
+ Fh = J[10] | 0;
1003
+ Fl = J[11] | 0;
1004
+ Gh = J[12] | 0;
1005
+ Gl = J[13] | 0;
1006
+ Hh = J[14] | 0;
1007
+ Hl = J[15] | 0;
946
1008
  constructor() {
947
1009
  super(48);
948
1010
  }
949
1011
  }
950
- const $ = /* @__PURE__ */ Uint32Array.from([
1012
+ const Y = /* @__PURE__ */ Uint32Array.from([
951
1013
  2352822216,
952
1014
  424955298,
953
1015
  1944164710,
@@ -964,7 +1026,7 @@ const $ = /* @__PURE__ */ Uint32Array.from([
964
1026
  1780299464,
965
1027
  286451373,
966
1028
  2446758561
967
- ]), tt = /* @__PURE__ */ Uint32Array.from([
1029
+ ]), Z = /* @__PURE__ */ Uint32Array.from([
968
1030
  573645204,
969
1031
  4230739756,
970
1032
  2673172387,
@@ -982,324 +1044,324 @@ const $ = /* @__PURE__ */ Uint32Array.from([
982
1044
  246885852,
983
1045
  2177182882
984
1046
  ]);
985
- class c0 extends Xt {
986
- Ah = $[0] | 0;
987
- Al = $[1] | 0;
988
- Bh = $[2] | 0;
989
- Bl = $[3] | 0;
990
- Ch = $[4] | 0;
991
- Cl = $[5] | 0;
992
- Dh = $[6] | 0;
993
- Dl = $[7] | 0;
994
- Eh = $[8] | 0;
995
- El = $[9] | 0;
996
- Fh = $[10] | 0;
997
- Fl = $[11] | 0;
998
- Gh = $[12] | 0;
999
- Gl = $[13] | 0;
1000
- Hh = $[14] | 0;
1001
- Hl = $[15] | 0;
1047
+ class Ke extends Wt {
1048
+ Ah = Y[0] | 0;
1049
+ Al = Y[1] | 0;
1050
+ Bh = Y[2] | 0;
1051
+ Bl = Y[3] | 0;
1052
+ Ch = Y[4] | 0;
1053
+ Cl = Y[5] | 0;
1054
+ Dh = Y[6] | 0;
1055
+ Dl = Y[7] | 0;
1056
+ Eh = Y[8] | 0;
1057
+ El = Y[9] | 0;
1058
+ Fh = Y[10] | 0;
1059
+ Fl = Y[11] | 0;
1060
+ Gh = Y[12] | 0;
1061
+ Gl = Y[13] | 0;
1062
+ Hh = Y[14] | 0;
1063
+ Hl = Y[15] | 0;
1002
1064
  constructor() {
1003
1065
  super(28);
1004
1066
  }
1005
1067
  }
1006
- class o0 extends Xt {
1007
- Ah = tt[0] | 0;
1008
- Al = tt[1] | 0;
1009
- Bh = tt[2] | 0;
1010
- Bl = tt[3] | 0;
1011
- Ch = tt[4] | 0;
1012
- Cl = tt[5] | 0;
1013
- Dh = tt[6] | 0;
1014
- Dl = tt[7] | 0;
1015
- Eh = tt[8] | 0;
1016
- El = tt[9] | 0;
1017
- Fh = tt[10] | 0;
1018
- Fl = tt[11] | 0;
1019
- Gh = tt[12] | 0;
1020
- Gl = tt[13] | 0;
1021
- Hh = tt[14] | 0;
1022
- Hl = tt[15] | 0;
1068
+ class Ne extends Wt {
1069
+ Ah = Z[0] | 0;
1070
+ Al = Z[1] | 0;
1071
+ Bh = Z[2] | 0;
1072
+ Bl = Z[3] | 0;
1073
+ Ch = Z[4] | 0;
1074
+ Cl = Z[5] | 0;
1075
+ Dh = Z[6] | 0;
1076
+ Dl = Z[7] | 0;
1077
+ Eh = Z[8] | 0;
1078
+ El = Z[9] | 0;
1079
+ Fh = Z[10] | 0;
1080
+ Fl = Z[11] | 0;
1081
+ Gh = Z[12] | 0;
1082
+ Gl = Z[13] | 0;
1083
+ Hh = Z[14] | 0;
1084
+ Hl = Z[15] | 0;
1023
1085
  constructor() {
1024
1086
  super(32);
1025
1087
  }
1026
1088
  }
1027
- const os = /* @__PURE__ */ lt(
1028
- () => new e0(),
1029
- /* @__PURE__ */ mt(1)
1030
- ), as = /* @__PURE__ */ lt(
1031
- () => new s0(),
1032
- /* @__PURE__ */ mt(4)
1033
- ), hs = /* @__PURE__ */ lt(
1034
- () => new r0(),
1035
- /* @__PURE__ */ mt(3)
1036
- ), fs = /* @__PURE__ */ lt(
1037
- () => new i0(),
1038
- /* @__PURE__ */ mt(2)
1039
- ), ds = /* @__PURE__ */ lt(
1040
- () => new o0(),
1041
- /* @__PURE__ */ mt(6)
1042
- ), us = /* @__PURE__ */ lt(
1043
- () => new c0(),
1044
- /* @__PURE__ */ mt(5)
1045
- ), ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1089
+ const N0 = /* @__PURE__ */ ct(
1090
+ () => new je(),
1091
+ /* @__PURE__ */ gt(1)
1092
+ ), X0 = /* @__PURE__ */ ct(
1093
+ () => new We(),
1094
+ /* @__PURE__ */ gt(4)
1095
+ ), J0 = /* @__PURE__ */ ct(
1096
+ () => new Pe(),
1097
+ /* @__PURE__ */ gt(3)
1098
+ ), Q0 = /* @__PURE__ */ ct(
1099
+ () => new qe(),
1100
+ /* @__PURE__ */ gt(2)
1101
+ ), Y0 = /* @__PURE__ */ ct(
1102
+ () => new Ne(),
1103
+ /* @__PURE__ */ gt(6)
1104
+ ), Z0 = /* @__PURE__ */ ct(
1105
+ () => new Ke(),
1106
+ /* @__PURE__ */ gt(5)
1107
+ ), z0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1046
1108
  __proto__: null,
1047
- _SHA224: s0,
1048
- _SHA256: e0,
1049
- _SHA384: i0,
1050
- _SHA512: r0,
1051
- _SHA512_224: c0,
1052
- _SHA512_256: o0,
1053
- sha224: as,
1054
- sha256: os,
1055
- sha384: fs,
1056
- sha512: hs,
1057
- sha512_224: us,
1058
- sha512_256: ds
1059
- }, Symbol.toStringTag, { value: "Module" }));
1060
- var N = {}, et = {}, Yt = {}, Ft = {}, Ae;
1061
- function bs() {
1062
- return Ae || (Ae = 1, Object.defineProperty(Ft, "__esModule", { value: !0 }), Ft.crypto = void 0, Ft.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), Ft;
1063
- }
1064
- var ye;
1065
- function ie() {
1066
- return ye || (ye = 1, (function(t) {
1067
- Object.defineProperty(t, "__esModule", { value: !0 }), t.wrapXOFConstructorWithOpts = t.wrapConstructorWithOpts = t.wrapConstructor = t.Hash = t.nextTick = t.swap32IfBE = t.byteSwapIfBE = t.swap8IfBE = t.isLE = void 0, t.isBytes = n, t.anumber = h, t.abytes = c, t.ahash = i, t.aexists = r, t.aoutput = a, t.u8 = b, t.u32 = x, t.clean = H, t.createView = u, t.rotr = S, t.rotl = B, t.byteSwap = g, t.byteSwap32 = I, t.bytesToHex = T, t.hexToBytes = p, t.asyncLoop = U, t.utf8ToBytes = E, t.bytesToUtf8 = o, t.toBytes = f, t.kdfInputToBytes = d, t.concatBytes = L, t.checkOpts = A, t.createHasher = F, t.createOptHasher = O, t.createXOFer = v, t.randomBytes = q;
1068
- const e = /* @__PURE__ */ bs();
1069
- function n(s) {
1070
- return s instanceof Uint8Array || ArrayBuffer.isView(s) && s.constructor.name === "Uint8Array";
1071
- }
1072
- function h(s) {
1073
- if (!Number.isSafeInteger(s) || s < 0)
1074
- throw new Error("positive integer expected, got " + s);
1075
- }
1076
- function c(s, ...l) {
1077
- if (!n(s))
1109
+ _SHA224: We,
1110
+ _SHA256: je,
1111
+ _SHA384: qe,
1112
+ _SHA512: Pe,
1113
+ _SHA512_224: Ke,
1114
+ _SHA512_256: Ne,
1115
+ sha224: X0,
1116
+ sha256: N0,
1117
+ sha384: Q0,
1118
+ sha512: J0,
1119
+ sha512_224: Z0,
1120
+ sha512_256: Y0
1121
+ }, Symbol.toStringTag, { value: "Module" })), Bs = /* @__PURE__ */ zt(z0);
1122
+ var st = {}, R = {}, z = {}, Xt = {}, Et = {}, ae;
1123
+ function $0() {
1124
+ return ae || (ae = 1, Object.defineProperty(Et, "__esModule", { value: !0 }), Et.crypto = void 0, Et.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), Et;
1125
+ }
1126
+ var he;
1127
+ function Xe() {
1128
+ return he || (he = 1, (function(t) {
1129
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.wrapXOFConstructorWithOpts = t.wrapConstructorWithOpts = t.wrapConstructor = t.Hash = t.nextTick = t.swap32IfBE = t.byteSwapIfBE = t.swap8IfBE = t.isLE = void 0, t.isBytes = s, t.anumber = o, t.abytes = i, t.ahash = c, t.aexists = r, t.aoutput = a, t.u8 = d, t.u32 = x, t.clean = H, t.createView = f, t.rotr = g, t.rotl = w, t.byteSwap = S, t.byteSwap32 = I, t.bytesToHex = v, t.hexToBytes = A, t.asyncLoop = m, t.utf8ToBytes = E, t.bytesToUtf8 = h, t.toBytes = u, t.kdfInputToBytes = l, t.concatBytes = L, t.checkOpts = p, t.createHasher = F, t.createOptHasher = M, t.createXOFer = G, t.randomBytes = q;
1130
+ const e = /* @__PURE__ */ $0();
1131
+ function s(n) {
1132
+ return n instanceof Uint8Array || ArrayBuffer.isView(n) && n.constructor.name === "Uint8Array";
1133
+ }
1134
+ function o(n) {
1135
+ if (!Number.isSafeInteger(n) || n < 0)
1136
+ throw new Error("positive integer expected, got " + n);
1137
+ }
1138
+ function i(n, ...b) {
1139
+ if (!s(n))
1078
1140
  throw new Error("Uint8Array expected");
1079
- if (l.length > 0 && !l.includes(s.length))
1080
- throw new Error("Uint8Array expected of length " + l + ", got length=" + s.length);
1141
+ if (b.length > 0 && !b.includes(n.length))
1142
+ throw new Error("Uint8Array expected of length " + b + ", got length=" + n.length);
1081
1143
  }
1082
- function i(s) {
1083
- if (typeof s != "function" || typeof s.create != "function")
1144
+ function c(n) {
1145
+ if (typeof n != "function" || typeof n.create != "function")
1084
1146
  throw new Error("Hash should be wrapped by utils.createHasher");
1085
- h(s.outputLen), h(s.blockLen);
1147
+ o(n.outputLen), o(n.blockLen);
1086
1148
  }
1087
- function r(s, l = !0) {
1088
- if (s.destroyed)
1149
+ function r(n, b = !0) {
1150
+ if (n.destroyed)
1089
1151
  throw new Error("Hash instance has been destroyed");
1090
- if (l && s.finished)
1152
+ if (b && n.finished)
1091
1153
  throw new Error("Hash#digest() has already been called");
1092
1154
  }
1093
- function a(s, l) {
1094
- c(s);
1095
- const y = l.outputLen;
1096
- if (s.length < y)
1155
+ function a(n, b) {
1156
+ i(n);
1157
+ const y = b.outputLen;
1158
+ if (n.length < y)
1097
1159
  throw new Error("digestInto() expects output buffer of length at least " + y);
1098
1160
  }
1099
- function b(s) {
1100
- return new Uint8Array(s.buffer, s.byteOffset, s.byteLength);
1161
+ function d(n) {
1162
+ return new Uint8Array(n.buffer, n.byteOffset, n.byteLength);
1101
1163
  }
1102
- function x(s) {
1103
- return new Uint32Array(s.buffer, s.byteOffset, Math.floor(s.byteLength / 4));
1164
+ function x(n) {
1165
+ return new Uint32Array(n.buffer, n.byteOffset, Math.floor(n.byteLength / 4));
1104
1166
  }
1105
- function H(...s) {
1106
- for (let l = 0; l < s.length; l++)
1107
- s[l].fill(0);
1167
+ function H(...n) {
1168
+ for (let b = 0; b < n.length; b++)
1169
+ n[b].fill(0);
1108
1170
  }
1109
- function u(s) {
1110
- return new DataView(s.buffer, s.byteOffset, s.byteLength);
1171
+ function f(n) {
1172
+ return new DataView(n.buffer, n.byteOffset, n.byteLength);
1111
1173
  }
1112
- function S(s, l) {
1113
- return s << 32 - l | s >>> l;
1174
+ function g(n, b) {
1175
+ return n << 32 - b | n >>> b;
1114
1176
  }
1115
- function B(s, l) {
1116
- return s << l | s >>> 32 - l >>> 0;
1177
+ function w(n, b) {
1178
+ return n << b | n >>> 32 - b >>> 0;
1117
1179
  }
1118
1180
  t.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1119
- function g(s) {
1120
- return s << 24 & 4278190080 | s << 8 & 16711680 | s >>> 8 & 65280 | s >>> 24 & 255;
1121
- }
1122
- t.swap8IfBE = t.isLE ? (s) => s : (s) => g(s), t.byteSwapIfBE = t.swap8IfBE;
1123
- function I(s) {
1124
- for (let l = 0; l < s.length; l++)
1125
- s[l] = g(s[l]);
1126
- return s;
1127
- }
1128
- t.swap32IfBE = t.isLE ? (s) => s : I;
1129
- const D = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", R = /* @__PURE__ */ Array.from({ length: 256 }, (s, l) => l.toString(16).padStart(2, "0"));
1130
- function T(s) {
1131
- if (c(s), D)
1132
- return s.toHex();
1133
- let l = "";
1134
- for (let y = 0; y < s.length; y++)
1135
- l += R[s[y]];
1136
- return l;
1181
+ function S(n) {
1182
+ return n << 24 & 4278190080 | n << 8 & 16711680 | n >>> 8 & 65280 | n >>> 24 & 255;
1183
+ }
1184
+ t.swap8IfBE = t.isLE ? (n) => n : (n) => S(n), t.byteSwapIfBE = t.swap8IfBE;
1185
+ function I(n) {
1186
+ for (let b = 0; b < n.length; b++)
1187
+ n[b] = S(n[b]);
1188
+ return n;
1189
+ }
1190
+ t.swap32IfBE = t.isLE ? (n) => n : I;
1191
+ const D = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", W = /* @__PURE__ */ Array.from({ length: 256 }, (n, b) => b.toString(16).padStart(2, "0"));
1192
+ function v(n) {
1193
+ if (i(n), D)
1194
+ return n.toHex();
1195
+ let b = "";
1196
+ for (let y = 0; y < n.length; y++)
1197
+ b += W[n[y]];
1198
+ return b;
1137
1199
  }
1138
1200
  const _ = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
1139
- function C(s) {
1140
- if (s >= _._0 && s <= _._9)
1141
- return s - _._0;
1142
- if (s >= _.A && s <= _.F)
1143
- return s - (_.A - 10);
1144
- if (s >= _.a && s <= _.f)
1145
- return s - (_.a - 10);
1146
- }
1147
- function p(s) {
1148
- if (typeof s != "string")
1149
- throw new Error("hex string expected, got " + typeof s);
1201
+ function C(n) {
1202
+ if (n >= _._0 && n <= _._9)
1203
+ return n - _._0;
1204
+ if (n >= _.A && n <= _.F)
1205
+ return n - (_.A - 10);
1206
+ if (n >= _.a && n <= _.f)
1207
+ return n - (_.a - 10);
1208
+ }
1209
+ function A(n) {
1210
+ if (typeof n != "string")
1211
+ throw new Error("hex string expected, got " + typeof n);
1150
1212
  if (D)
1151
- return Uint8Array.fromHex(s);
1152
- const l = s.length, y = l / 2;
1153
- if (l % 2)
1154
- throw new Error("hex string expected, got unpadded hex of length " + l);
1213
+ return Uint8Array.fromHex(n);
1214
+ const b = n.length, y = b / 2;
1215
+ if (b % 2)
1216
+ throw new Error("hex string expected, got unpadded hex of length " + b);
1155
1217
  const V = new Uint8Array(y);
1156
- for (let k = 0, M = 0; k < y; k++, M += 2) {
1157
- const z = C(s.charCodeAt(M)), P = C(s.charCodeAt(M + 1));
1158
- if (z === void 0 || P === void 0) {
1159
- const K = s[M] + s[M + 1];
1160
- throw new Error('hex string expected, got non-hex character "' + K + '" at index ' + M);
1218
+ for (let k = 0, j = 0; k < y; k++, j += 2) {
1219
+ const et = C(n.charCodeAt(j)), K = C(n.charCodeAt(j + 1));
1220
+ if (et === void 0 || K === void 0) {
1221
+ const N = n[j] + n[j + 1];
1222
+ throw new Error('hex string expected, got non-hex character "' + N + '" at index ' + j);
1161
1223
  }
1162
- V[k] = z * 16 + P;
1224
+ V[k] = et * 16 + K;
1163
1225
  }
1164
1226
  return V;
1165
1227
  }
1166
- const w = async () => {
1228
+ const B = async () => {
1167
1229
  };
1168
- t.nextTick = w;
1169
- async function U(s, l, y) {
1230
+ t.nextTick = B;
1231
+ async function m(n, b, y) {
1170
1232
  let V = Date.now();
1171
- for (let k = 0; k < s; k++) {
1233
+ for (let k = 0; k < n; k++) {
1172
1234
  y(k);
1173
- const M = Date.now() - V;
1174
- M >= 0 && M < l || (await (0, t.nextTick)(), V += M);
1235
+ const j = Date.now() - V;
1236
+ j >= 0 && j < b || (await (0, t.nextTick)(), V += j);
1175
1237
  }
1176
1238
  }
1177
- function E(s) {
1178
- if (typeof s != "string")
1239
+ function E(n) {
1240
+ if (typeof n != "string")
1179
1241
  throw new Error("string expected");
1180
- return new Uint8Array(new TextEncoder().encode(s));
1242
+ return new Uint8Array(new TextEncoder().encode(n));
1181
1243
  }
1182
- function o(s) {
1183
- return new TextDecoder().decode(s);
1244
+ function h(n) {
1245
+ return new TextDecoder().decode(n);
1184
1246
  }
1185
- function f(s) {
1186
- return typeof s == "string" && (s = E(s)), c(s), s;
1247
+ function u(n) {
1248
+ return typeof n == "string" && (n = E(n)), i(n), n;
1187
1249
  }
1188
- function d(s) {
1189
- return typeof s == "string" && (s = E(s)), c(s), s;
1250
+ function l(n) {
1251
+ return typeof n == "string" && (n = E(n)), i(n), n;
1190
1252
  }
1191
- function L(...s) {
1192
- let l = 0;
1193
- for (let V = 0; V < s.length; V++) {
1194
- const k = s[V];
1195
- c(k), l += k.length;
1253
+ function L(...n) {
1254
+ let b = 0;
1255
+ for (let V = 0; V < n.length; V++) {
1256
+ const k = n[V];
1257
+ i(k), b += k.length;
1196
1258
  }
1197
- const y = new Uint8Array(l);
1198
- for (let V = 0, k = 0; V < s.length; V++) {
1199
- const M = s[V];
1200
- y.set(M, k), k += M.length;
1259
+ const y = new Uint8Array(b);
1260
+ for (let V = 0, k = 0; V < n.length; V++) {
1261
+ const j = n[V];
1262
+ y.set(j, k), k += j.length;
1201
1263
  }
1202
1264
  return y;
1203
1265
  }
1204
- function A(s, l) {
1205
- if (l !== void 0 && {}.toString.call(l) !== "[object Object]")
1266
+ function p(n, b) {
1267
+ if (b !== void 0 && {}.toString.call(b) !== "[object Object]")
1206
1268
  throw new Error("options should be object or undefined");
1207
- return Object.assign(s, l);
1269
+ return Object.assign(n, b);
1208
1270
  }
1209
- class m {
1271
+ class U {
1210
1272
  }
1211
- t.Hash = m;
1212
- function F(s) {
1213
- const l = (V) => s().update(f(V)).digest(), y = s();
1214
- return l.outputLen = y.outputLen, l.blockLen = y.blockLen, l.create = () => s(), l;
1273
+ t.Hash = U;
1274
+ function F(n) {
1275
+ const b = (V) => n().update(u(V)).digest(), y = n();
1276
+ return b.outputLen = y.outputLen, b.blockLen = y.blockLen, b.create = () => n(), b;
1215
1277
  }
1216
- function O(s) {
1217
- const l = (V, k) => s(k).update(f(V)).digest(), y = s({});
1218
- return l.outputLen = y.outputLen, l.blockLen = y.blockLen, l.create = (V) => s(V), l;
1278
+ function M(n) {
1279
+ const b = (V, k) => n(k).update(u(V)).digest(), y = n({});
1280
+ return b.outputLen = y.outputLen, b.blockLen = y.blockLen, b.create = (V) => n(V), b;
1219
1281
  }
1220
- function v(s) {
1221
- const l = (V, k) => s(k).update(f(V)).digest(), y = s({});
1222
- return l.outputLen = y.outputLen, l.blockLen = y.blockLen, l.create = (V) => s(V), l;
1282
+ function G(n) {
1283
+ const b = (V, k) => n(k).update(u(V)).digest(), y = n({});
1284
+ return b.outputLen = y.outputLen, b.blockLen = y.blockLen, b.create = (V) => n(V), b;
1223
1285
  }
1224
- t.wrapConstructor = F, t.wrapConstructorWithOpts = O, t.wrapXOFConstructorWithOpts = v;
1225
- function q(s = 32) {
1286
+ t.wrapConstructor = F, t.wrapConstructorWithOpts = M, t.wrapXOFConstructorWithOpts = G;
1287
+ function q(n = 32) {
1226
1288
  if (e.crypto && typeof e.crypto.getRandomValues == "function")
1227
- return e.crypto.getRandomValues(new Uint8Array(s));
1289
+ return e.crypto.getRandomValues(new Uint8Array(n));
1228
1290
  if (e.crypto && typeof e.crypto.randomBytes == "function")
1229
- return Uint8Array.from(e.crypto.randomBytes(s));
1291
+ return Uint8Array.from(e.crypto.randomBytes(n));
1230
1292
  throw new Error("crypto.getRandomValues must be defined");
1231
1293
  }
1232
- })(Yt)), Yt;
1294
+ })(Xt)), Xt;
1233
1295
  }
1234
- var pe;
1235
- function xs() {
1236
- if (pe) return et;
1237
- pe = 1, Object.defineProperty(et, "__esModule", { value: !0 }), et.SHA512_IV = et.SHA384_IV = et.SHA224_IV = et.SHA256_IV = et.HashMD = void 0, et.setBigUint64 = e, et.Chi = n, et.Maj = h;
1238
- const t = /* @__PURE__ */ ie();
1239
- function e(i, r, a, b) {
1240
- if (typeof i.setBigUint64 == "function")
1241
- return i.setBigUint64(r, a, b);
1242
- const x = BigInt(32), H = BigInt(4294967295), u = Number(a >> x & H), S = Number(a & H), B = b ? 4 : 0, g = b ? 0 : 4;
1243
- i.setUint32(r + B, u, b), i.setUint32(r + g, S, b);
1244
- }
1245
- function n(i, r, a) {
1246
- return i & r ^ ~i & a;
1247
- }
1248
- function h(i, r, a) {
1249
- return i & r ^ i & a ^ r & a;
1250
- }
1251
- class c extends t.Hash {
1252
- constructor(r, a, b, x) {
1253
- super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = r, this.outputLen = a, this.padOffset = b, this.isLE = x, this.buffer = new Uint8Array(r), this.view = (0, t.createView)(this.buffer);
1296
+ var fe;
1297
+ function ts() {
1298
+ if (fe) return z;
1299
+ fe = 1, Object.defineProperty(z, "__esModule", { value: !0 }), z.SHA512_IV = z.SHA384_IV = z.SHA224_IV = z.SHA256_IV = z.HashMD = void 0, z.setBigUint64 = e, z.Chi = s, z.Maj = o;
1300
+ const t = /* @__PURE__ */ Xe();
1301
+ function e(c, r, a, d) {
1302
+ if (typeof c.setBigUint64 == "function")
1303
+ return c.setBigUint64(r, a, d);
1304
+ const x = BigInt(32), H = BigInt(4294967295), f = Number(a >> x & H), g = Number(a & H), w = d ? 4 : 0, S = d ? 0 : 4;
1305
+ c.setUint32(r + w, f, d), c.setUint32(r + S, g, d);
1306
+ }
1307
+ function s(c, r, a) {
1308
+ return c & r ^ ~c & a;
1309
+ }
1310
+ function o(c, r, a) {
1311
+ return c & r ^ c & a ^ r & a;
1312
+ }
1313
+ class i extends t.Hash {
1314
+ constructor(r, a, d, x) {
1315
+ super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = r, this.outputLen = a, this.padOffset = d, this.isLE = x, this.buffer = new Uint8Array(r), this.view = (0, t.createView)(this.buffer);
1254
1316
  }
1255
1317
  update(r) {
1256
1318
  (0, t.aexists)(this), r = (0, t.toBytes)(r), (0, t.abytes)(r);
1257
- const { view: a, buffer: b, blockLen: x } = this, H = r.length;
1258
- for (let u = 0; u < H; ) {
1259
- const S = Math.min(x - this.pos, H - u);
1260
- if (S === x) {
1261
- const B = (0, t.createView)(r);
1262
- for (; x <= H - u; u += x)
1263
- this.process(B, u);
1319
+ const { view: a, buffer: d, blockLen: x } = this, H = r.length;
1320
+ for (let f = 0; f < H; ) {
1321
+ const g = Math.min(x - this.pos, H - f);
1322
+ if (g === x) {
1323
+ const w = (0, t.createView)(r);
1324
+ for (; x <= H - f; f += x)
1325
+ this.process(w, f);
1264
1326
  continue;
1265
1327
  }
1266
- b.set(r.subarray(u, u + S), this.pos), this.pos += S, u += S, this.pos === x && (this.process(a, 0), this.pos = 0);
1328
+ d.set(r.subarray(f, f + g), this.pos), this.pos += g, f += g, this.pos === x && (this.process(a, 0), this.pos = 0);
1267
1329
  }
1268
1330
  return this.length += r.length, this.roundClean(), this;
1269
1331
  }
1270
1332
  digestInto(r) {
1271
1333
  (0, t.aexists)(this), (0, t.aoutput)(r, this), this.finished = !0;
1272
- const { buffer: a, view: b, blockLen: x, isLE: H } = this;
1273
- let { pos: u } = this;
1274
- a[u++] = 128, (0, t.clean)(this.buffer.subarray(u)), this.padOffset > x - u && (this.process(b, 0), u = 0);
1275
- for (let D = u; D < x; D++)
1334
+ const { buffer: a, view: d, blockLen: x, isLE: H } = this;
1335
+ let { pos: f } = this;
1336
+ a[f++] = 128, (0, t.clean)(this.buffer.subarray(f)), this.padOffset > x - f && (this.process(d, 0), f = 0);
1337
+ for (let D = f; D < x; D++)
1276
1338
  a[D] = 0;
1277
- e(b, x - 8, BigInt(this.length * 8), H), this.process(b, 0);
1278
- const S = (0, t.createView)(r), B = this.outputLen;
1279
- if (B % 4)
1339
+ e(d, x - 8, BigInt(this.length * 8), H), this.process(d, 0);
1340
+ const g = (0, t.createView)(r), w = this.outputLen;
1341
+ if (w % 4)
1280
1342
  throw new Error("_sha2: outputLen should be aligned to 32bit");
1281
- const g = B / 4, I = this.get();
1282
- if (g > I.length)
1343
+ const S = w / 4, I = this.get();
1344
+ if (S > I.length)
1283
1345
  throw new Error("_sha2: outputLen bigger than state");
1284
- for (let D = 0; D < g; D++)
1285
- S.setUint32(4 * D, I[D], H);
1346
+ for (let D = 0; D < S; D++)
1347
+ g.setUint32(4 * D, I[D], H);
1286
1348
  }
1287
1349
  digest() {
1288
1350
  const { buffer: r, outputLen: a } = this;
1289
1351
  this.digestInto(r);
1290
- const b = r.slice(0, a);
1291
- return this.destroy(), b;
1352
+ const d = r.slice(0, a);
1353
+ return this.destroy(), d;
1292
1354
  }
1293
1355
  _cloneInto(r) {
1294
1356
  r || (r = new this.constructor()), r.set(...this.get());
1295
- const { blockLen: a, buffer: b, length: x, finished: H, destroyed: u, pos: S } = this;
1296
- return r.destroyed = u, r.finished = H, r.length = x, r.pos = S, x % a && r.buffer.set(b), r;
1357
+ const { blockLen: a, buffer: d, length: x, finished: H, destroyed: f, pos: g } = this;
1358
+ return r.destroyed = f, r.finished = H, r.length = x, r.pos = g, x % a && r.buffer.set(d), r;
1297
1359
  }
1298
1360
  clone() {
1299
1361
  return this._cloneInto();
1300
1362
  }
1301
1363
  }
1302
- return et.HashMD = c, et.SHA256_IV = Uint32Array.from([
1364
+ return z.HashMD = i, z.SHA256_IV = Uint32Array.from([
1303
1365
  1779033703,
1304
1366
  3144134277,
1305
1367
  1013904242,
@@ -1308,7 +1370,7 @@ function xs() {
1308
1370
  2600822924,
1309
1371
  528734635,
1310
1372
  1541459225
1311
- ]), et.SHA224_IV = Uint32Array.from([
1373
+ ]), z.SHA224_IV = Uint32Array.from([
1312
1374
  3238371032,
1313
1375
  914150663,
1314
1376
  812702999,
@@ -1317,7 +1379,7 @@ function xs() {
1317
1379
  1750603025,
1318
1380
  1694076839,
1319
1381
  3204075428
1320
- ]), et.SHA384_IV = Uint32Array.from([
1382
+ ]), z.SHA384_IV = Uint32Array.from([
1321
1383
  3418070365,
1322
1384
  3238371032,
1323
1385
  1654270250,
@@ -1334,7 +1396,7 @@ function xs() {
1334
1396
  1694076839,
1335
1397
  1203062813,
1336
1398
  3204075428
1337
- ]), et.SHA512_IV = Uint32Array.from([
1399
+ ]), z.SHA512_IV = Uint32Array.from([
1338
1400
  1779033703,
1339
1401
  4089235720,
1340
1402
  3144134277,
@@ -1351,98 +1413,98 @@ function xs() {
1351
1413
  4215389547,
1352
1414
  1541459225,
1353
1415
  327033209
1354
- ]), et;
1416
+ ]), z;
1355
1417
  }
1356
- var G = {}, _e;
1357
- function Hs() {
1358
- if (_e) return G;
1359
- _e = 1, Object.defineProperty(G, "__esModule", { value: !0 }), G.toBig = G.shrSL = G.shrSH = G.rotrSL = G.rotrSH = G.rotrBL = G.rotrBH = G.rotr32L = G.rotr32H = G.rotlSL = G.rotlSH = G.rotlBL = G.rotlBH = G.add5L = G.add5H = G.add4L = G.add4H = G.add3L = G.add3H = void 0, G.add = R, G.fromBig = n, G.split = h;
1418
+ var O = {}, de;
1419
+ function es() {
1420
+ if (de) return O;
1421
+ de = 1, Object.defineProperty(O, "__esModule", { value: !0 }), O.toBig = O.shrSL = O.shrSH = O.rotrSL = O.rotrSH = O.rotrBL = O.rotrBH = O.rotr32L = O.rotr32H = O.rotlSL = O.rotlSH = O.rotlBL = O.rotlBH = O.add5L = O.add5H = O.add4L = O.add4H = O.add3L = O.add3H = void 0, O.add = W, O.fromBig = s, O.split = o;
1360
1422
  const t = /* @__PURE__ */ BigInt(2 ** 32 - 1), e = /* @__PURE__ */ BigInt(32);
1361
- function n(o, f = !1) {
1362
- return f ? { h: Number(o & t), l: Number(o >> e & t) } : { h: Number(o >> e & t) | 0, l: Number(o & t) | 0 };
1363
- }
1364
- function h(o, f = !1) {
1365
- const d = o.length;
1366
- let L = new Uint32Array(d), A = new Uint32Array(d);
1367
- for (let m = 0; m < d; m++) {
1368
- const { h: F, l: O } = n(o[m], f);
1369
- [L[m], A[m]] = [F, O];
1370
- }
1371
- return [L, A];
1372
- }
1373
- const c = (o, f) => BigInt(o >>> 0) << e | BigInt(f >>> 0);
1374
- G.toBig = c;
1375
- const i = (o, f, d) => o >>> d;
1376
- G.shrSH = i;
1377
- const r = (o, f, d) => o << 32 - d | f >>> d;
1378
- G.shrSL = r;
1379
- const a = (o, f, d) => o >>> d | f << 32 - d;
1380
- G.rotrSH = a;
1381
- const b = (o, f, d) => o << 32 - d | f >>> d;
1382
- G.rotrSL = b;
1383
- const x = (o, f, d) => o << 64 - d | f >>> d - 32;
1384
- G.rotrBH = x;
1385
- const H = (o, f, d) => o >>> d - 32 | f << 64 - d;
1386
- G.rotrBL = H;
1387
- const u = (o, f) => f;
1388
- G.rotr32H = u;
1389
- const S = (o, f) => o;
1390
- G.rotr32L = S;
1391
- const B = (o, f, d) => o << d | f >>> 32 - d;
1392
- G.rotlSH = B;
1393
- const g = (o, f, d) => f << d | o >>> 32 - d;
1394
- G.rotlSL = g;
1395
- const I = (o, f, d) => f << d - 32 | o >>> 64 - d;
1396
- G.rotlBH = I;
1397
- const D = (o, f, d) => o << d - 32 | f >>> 64 - d;
1398
- G.rotlBL = D;
1399
- function R(o, f, d, L) {
1400
- const A = (f >>> 0) + (L >>> 0);
1401
- return { h: o + d + (A / 2 ** 32 | 0) | 0, l: A | 0 };
1402
- }
1403
- const T = (o, f, d) => (o >>> 0) + (f >>> 0) + (d >>> 0);
1404
- G.add3L = T;
1405
- const _ = (o, f, d, L) => f + d + L + (o / 2 ** 32 | 0) | 0;
1406
- G.add3H = _;
1407
- const C = (o, f, d, L) => (o >>> 0) + (f >>> 0) + (d >>> 0) + (L >>> 0);
1408
- G.add4L = C;
1409
- const p = (o, f, d, L, A) => f + d + L + A + (o / 2 ** 32 | 0) | 0;
1410
- G.add4H = p;
1411
- const w = (o, f, d, L, A) => (o >>> 0) + (f >>> 0) + (d >>> 0) + (L >>> 0) + (A >>> 0);
1412
- G.add5L = w;
1413
- const U = (o, f, d, L, A, m) => f + d + L + A + m + (o / 2 ** 32 | 0) | 0;
1414
- G.add5H = U;
1423
+ function s(h, u = !1) {
1424
+ return u ? { h: Number(h & t), l: Number(h >> e & t) } : { h: Number(h >> e & t) | 0, l: Number(h & t) | 0 };
1425
+ }
1426
+ function o(h, u = !1) {
1427
+ const l = h.length;
1428
+ let L = new Uint32Array(l), p = new Uint32Array(l);
1429
+ for (let U = 0; U < l; U++) {
1430
+ const { h: F, l: M } = s(h[U], u);
1431
+ [L[U], p[U]] = [F, M];
1432
+ }
1433
+ return [L, p];
1434
+ }
1435
+ const i = (h, u) => BigInt(h >>> 0) << e | BigInt(u >>> 0);
1436
+ O.toBig = i;
1437
+ const c = (h, u, l) => h >>> l;
1438
+ O.shrSH = c;
1439
+ const r = (h, u, l) => h << 32 - l | u >>> l;
1440
+ O.shrSL = r;
1441
+ const a = (h, u, l) => h >>> l | u << 32 - l;
1442
+ O.rotrSH = a;
1443
+ const d = (h, u, l) => h << 32 - l | u >>> l;
1444
+ O.rotrSL = d;
1445
+ const x = (h, u, l) => h << 64 - l | u >>> l - 32;
1446
+ O.rotrBH = x;
1447
+ const H = (h, u, l) => h >>> l - 32 | u << 64 - l;
1448
+ O.rotrBL = H;
1449
+ const f = (h, u) => u;
1450
+ O.rotr32H = f;
1451
+ const g = (h, u) => h;
1452
+ O.rotr32L = g;
1453
+ const w = (h, u, l) => h << l | u >>> 32 - l;
1454
+ O.rotlSH = w;
1455
+ const S = (h, u, l) => u << l | h >>> 32 - l;
1456
+ O.rotlSL = S;
1457
+ const I = (h, u, l) => u << l - 32 | h >>> 64 - l;
1458
+ O.rotlBH = I;
1459
+ const D = (h, u, l) => h << l - 32 | u >>> 64 - l;
1460
+ O.rotlBL = D;
1461
+ function W(h, u, l, L) {
1462
+ const p = (u >>> 0) + (L >>> 0);
1463
+ return { h: h + l + (p / 2 ** 32 | 0) | 0, l: p | 0 };
1464
+ }
1465
+ const v = (h, u, l) => (h >>> 0) + (u >>> 0) + (l >>> 0);
1466
+ O.add3L = v;
1467
+ const _ = (h, u, l, L) => u + l + L + (h / 2 ** 32 | 0) | 0;
1468
+ O.add3H = _;
1469
+ const C = (h, u, l, L) => (h >>> 0) + (u >>> 0) + (l >>> 0) + (L >>> 0);
1470
+ O.add4L = C;
1471
+ const A = (h, u, l, L, p) => u + l + L + p + (h / 2 ** 32 | 0) | 0;
1472
+ O.add4H = A;
1473
+ const B = (h, u, l, L, p) => (h >>> 0) + (u >>> 0) + (l >>> 0) + (L >>> 0) + (p >>> 0);
1474
+ O.add5L = B;
1475
+ const m = (h, u, l, L, p, U) => u + l + L + p + U + (h / 2 ** 32 | 0) | 0;
1476
+ O.add5H = m;
1415
1477
  const E = {
1416
- fromBig: n,
1417
- split: h,
1418
- toBig: c,
1419
- shrSH: i,
1478
+ fromBig: s,
1479
+ split: o,
1480
+ toBig: i,
1481
+ shrSH: c,
1420
1482
  shrSL: r,
1421
1483
  rotrSH: a,
1422
- rotrSL: b,
1484
+ rotrSL: d,
1423
1485
  rotrBH: x,
1424
1486
  rotrBL: H,
1425
- rotr32H: u,
1426
- rotr32L: S,
1427
- rotlSH: B,
1428
- rotlSL: g,
1487
+ rotr32H: f,
1488
+ rotr32L: g,
1489
+ rotlSH: w,
1490
+ rotlSL: S,
1429
1491
  rotlBH: I,
1430
1492
  rotlBL: D,
1431
- add: R,
1432
- add3L: T,
1493
+ add: W,
1494
+ add3L: v,
1433
1495
  add3H: _,
1434
1496
  add4L: C,
1435
- add4H: p,
1436
- add5H: U,
1437
- add5L: w
1497
+ add4H: A,
1498
+ add5H: m,
1499
+ add5L: B
1438
1500
  };
1439
- return G.default = E, G;
1501
+ return O.default = E, O;
1440
1502
  }
1441
- var ge;
1442
- function qs() {
1443
- if (ge) return N;
1444
- ge = 1, Object.defineProperty(N, "__esModule", { value: !0 }), N.sha512_224 = N.sha512_256 = N.sha384 = N.sha512 = N.sha224 = N.sha256 = N.SHA512_256 = N.SHA512_224 = N.SHA384 = N.SHA512 = N.SHA224 = N.SHA256 = void 0;
1445
- const t = /* @__PURE__ */ xs(), e = /* @__PURE__ */ Hs(), n = /* @__PURE__ */ ie(), h = /* @__PURE__ */ Uint32Array.from([
1503
+ var ue;
1504
+ function ss() {
1505
+ if (ue) return R;
1506
+ ue = 1, Object.defineProperty(R, "__esModule", { value: !0 }), R.sha512_224 = R.sha512_256 = R.sha384 = R.sha512 = R.sha224 = R.sha256 = R.SHA512_256 = R.SHA512_224 = R.SHA384 = R.SHA512 = R.SHA224 = R.SHA256 = void 0;
1507
+ const t = /* @__PURE__ */ ts(), e = /* @__PURE__ */ es(), s = /* @__PURE__ */ Xe(), o = /* @__PURE__ */ Uint32Array.from([
1446
1508
  1116352408,
1447
1509
  1899447441,
1448
1510
  3049323471,
@@ -1507,47 +1569,47 @@ function qs() {
1507
1569
  2756734187,
1508
1570
  3204031479,
1509
1571
  3329325298
1510
- ]), c = /* @__PURE__ */ new Uint32Array(64);
1511
- class i extends t.HashMD {
1572
+ ]), i = /* @__PURE__ */ new Uint32Array(64);
1573
+ class c extends t.HashMD {
1512
1574
  constructor(_ = 32) {
1513
1575
  super(64, _, 8, !1), this.A = t.SHA256_IV[0] | 0, this.B = t.SHA256_IV[1] | 0, this.C = t.SHA256_IV[2] | 0, this.D = t.SHA256_IV[3] | 0, this.E = t.SHA256_IV[4] | 0, this.F = t.SHA256_IV[5] | 0, this.G = t.SHA256_IV[6] | 0, this.H = t.SHA256_IV[7] | 0;
1514
1576
  }
1515
1577
  get() {
1516
- const { A: _, B: C, C: p, D: w, E: U, F: E, G: o, H: f } = this;
1517
- return [_, C, p, w, U, E, o, f];
1578
+ const { A: _, B: C, C: A, D: B, E: m, F: E, G: h, H: u } = this;
1579
+ return [_, C, A, B, m, E, h, u];
1518
1580
  }
1519
1581
  // prettier-ignore
1520
- set(_, C, p, w, U, E, o, f) {
1521
- this.A = _ | 0, this.B = C | 0, this.C = p | 0, this.D = w | 0, this.E = U | 0, this.F = E | 0, this.G = o | 0, this.H = f | 0;
1582
+ set(_, C, A, B, m, E, h, u) {
1583
+ this.A = _ | 0, this.B = C | 0, this.C = A | 0, this.D = B | 0, this.E = m | 0, this.F = E | 0, this.G = h | 0, this.H = u | 0;
1522
1584
  }
1523
1585
  process(_, C) {
1524
- for (let A = 0; A < 16; A++, C += 4)
1525
- c[A] = _.getUint32(C, !1);
1526
- for (let A = 16; A < 64; A++) {
1527
- const m = c[A - 15], F = c[A - 2], O = (0, n.rotr)(m, 7) ^ (0, n.rotr)(m, 18) ^ m >>> 3, v = (0, n.rotr)(F, 17) ^ (0, n.rotr)(F, 19) ^ F >>> 10;
1528
- c[A] = v + c[A - 7] + O + c[A - 16] | 0;
1586
+ for (let p = 0; p < 16; p++, C += 4)
1587
+ i[p] = _.getUint32(C, !1);
1588
+ for (let p = 16; p < 64; p++) {
1589
+ const U = i[p - 15], F = i[p - 2], M = (0, s.rotr)(U, 7) ^ (0, s.rotr)(U, 18) ^ U >>> 3, G = (0, s.rotr)(F, 17) ^ (0, s.rotr)(F, 19) ^ F >>> 10;
1590
+ i[p] = G + i[p - 7] + M + i[p - 16] | 0;
1529
1591
  }
1530
- let { A: p, B: w, C: U, D: E, E: o, F: f, G: d, H: L } = this;
1531
- for (let A = 0; A < 64; A++) {
1532
- const m = (0, n.rotr)(o, 6) ^ (0, n.rotr)(o, 11) ^ (0, n.rotr)(o, 25), F = L + m + (0, t.Chi)(o, f, d) + h[A] + c[A] | 0, v = ((0, n.rotr)(p, 2) ^ (0, n.rotr)(p, 13) ^ (0, n.rotr)(p, 22)) + (0, t.Maj)(p, w, U) | 0;
1533
- L = d, d = f, f = o, o = E + F | 0, E = U, U = w, w = p, p = F + v | 0;
1592
+ let { A, B, C: m, D: E, E: h, F: u, G: l, H: L } = this;
1593
+ for (let p = 0; p < 64; p++) {
1594
+ const U = (0, s.rotr)(h, 6) ^ (0, s.rotr)(h, 11) ^ (0, s.rotr)(h, 25), F = L + U + (0, t.Chi)(h, u, l) + o[p] + i[p] | 0, G = ((0, s.rotr)(A, 2) ^ (0, s.rotr)(A, 13) ^ (0, s.rotr)(A, 22)) + (0, t.Maj)(A, B, m) | 0;
1595
+ L = l, l = u, u = h, h = E + F | 0, E = m, m = B, B = A, A = F + G | 0;
1534
1596
  }
1535
- p = p + this.A | 0, w = w + this.B | 0, U = U + this.C | 0, E = E + this.D | 0, o = o + this.E | 0, f = f + this.F | 0, d = d + this.G | 0, L = L + this.H | 0, this.set(p, w, U, E, o, f, d, L);
1597
+ A = A + this.A | 0, B = B + this.B | 0, m = m + this.C | 0, E = E + this.D | 0, h = h + this.E | 0, u = u + this.F | 0, l = l + this.G | 0, L = L + this.H | 0, this.set(A, B, m, E, h, u, l, L);
1536
1598
  }
1537
1599
  roundClean() {
1538
- (0, n.clean)(c);
1600
+ (0, s.clean)(i);
1539
1601
  }
1540
1602
  destroy() {
1541
- this.set(0, 0, 0, 0, 0, 0, 0, 0), (0, n.clean)(this.buffer);
1603
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), (0, s.clean)(this.buffer);
1542
1604
  }
1543
1605
  }
1544
- N.SHA256 = i;
1545
- class r extends i {
1606
+ R.SHA256 = c;
1607
+ class r extends c {
1546
1608
  constructor() {
1547
1609
  super(28), this.A = t.SHA224_IV[0] | 0, this.B = t.SHA224_IV[1] | 0, this.C = t.SHA224_IV[2] | 0, this.D = t.SHA224_IV[3] | 0, this.E = t.SHA224_IV[4] | 0, this.F = t.SHA224_IV[5] | 0, this.G = t.SHA224_IV[6] | 0, this.H = t.SHA224_IV[7] | 0;
1548
1610
  }
1549
1611
  }
1550
- N.SHA224 = r;
1612
+ R.SHA224 = r;
1551
1613
  const a = e.split([
1552
1614
  "0x428a2f98d728ae22",
1553
1615
  "0x7137449123ef65cd",
@@ -1629,51 +1691,51 @@ function qs() {
1629
1691
  "0x597f299cfc657e2a",
1630
1692
  "0x5fcb6fab3ad6faec",
1631
1693
  "0x6c44198c4a475817"
1632
- ].map((T) => BigInt(T))), b = a[0], x = a[1], H = /* @__PURE__ */ new Uint32Array(80), u = /* @__PURE__ */ new Uint32Array(80);
1633
- class S extends t.HashMD {
1694
+ ].map((v) => BigInt(v))), d = a[0], x = a[1], H = /* @__PURE__ */ new Uint32Array(80), f = /* @__PURE__ */ new Uint32Array(80);
1695
+ class g extends t.HashMD {
1634
1696
  constructor(_ = 64) {
1635
1697
  super(128, _, 16, !1), this.Ah = t.SHA512_IV[0] | 0, this.Al = t.SHA512_IV[1] | 0, this.Bh = t.SHA512_IV[2] | 0, this.Bl = t.SHA512_IV[3] | 0, this.Ch = t.SHA512_IV[4] | 0, this.Cl = t.SHA512_IV[5] | 0, this.Dh = t.SHA512_IV[6] | 0, this.Dl = t.SHA512_IV[7] | 0, this.Eh = t.SHA512_IV[8] | 0, this.El = t.SHA512_IV[9] | 0, this.Fh = t.SHA512_IV[10] | 0, this.Fl = t.SHA512_IV[11] | 0, this.Gh = t.SHA512_IV[12] | 0, this.Gl = t.SHA512_IV[13] | 0, this.Hh = t.SHA512_IV[14] | 0, this.Hl = t.SHA512_IV[15] | 0;
1636
1698
  }
1637
1699
  // prettier-ignore
1638
1700
  get() {
1639
- const { Ah: _, Al: C, Bh: p, Bl: w, Ch: U, Cl: E, Dh: o, Dl: f, Eh: d, El: L, Fh: A, Fl: m, Gh: F, Gl: O, Hh: v, Hl: q } = this;
1640
- return [_, C, p, w, U, E, o, f, d, L, A, m, F, O, v, q];
1701
+ const { Ah: _, Al: C, Bh: A, Bl: B, Ch: m, Cl: E, Dh: h, Dl: u, Eh: l, El: L, Fh: p, Fl: U, Gh: F, Gl: M, Hh: G, Hl: q } = this;
1702
+ return [_, C, A, B, m, E, h, u, l, L, p, U, F, M, G, q];
1641
1703
  }
1642
1704
  // prettier-ignore
1643
- set(_, C, p, w, U, E, o, f, d, L, A, m, F, O, v, q) {
1644
- this.Ah = _ | 0, this.Al = C | 0, this.Bh = p | 0, this.Bl = w | 0, this.Ch = U | 0, this.Cl = E | 0, this.Dh = o | 0, this.Dl = f | 0, this.Eh = d | 0, this.El = L | 0, this.Fh = A | 0, this.Fl = m | 0, this.Gh = F | 0, this.Gl = O | 0, this.Hh = v | 0, this.Hl = q | 0;
1705
+ set(_, C, A, B, m, E, h, u, l, L, p, U, F, M, G, q) {
1706
+ this.Ah = _ | 0, this.Al = C | 0, this.Bh = A | 0, this.Bl = B | 0, this.Ch = m | 0, this.Cl = E | 0, this.Dh = h | 0, this.Dl = u | 0, this.Eh = l | 0, this.El = L | 0, this.Fh = p | 0, this.Fl = U | 0, this.Gh = F | 0, this.Gl = M | 0, this.Hh = G | 0, this.Hl = q | 0;
1645
1707
  }
1646
1708
  process(_, C) {
1647
1709
  for (let y = 0; y < 16; y++, C += 4)
1648
- H[y] = _.getUint32(C), u[y] = _.getUint32(C += 4);
1710
+ H[y] = _.getUint32(C), f[y] = _.getUint32(C += 4);
1649
1711
  for (let y = 16; y < 80; y++) {
1650
- const V = H[y - 15] | 0, k = u[y - 15] | 0, M = e.rotrSH(V, k, 1) ^ e.rotrSH(V, k, 8) ^ e.shrSH(V, k, 7), z = e.rotrSL(V, k, 1) ^ e.rotrSL(V, k, 8) ^ e.shrSL(V, k, 7), P = H[y - 2] | 0, K = u[y - 2] | 0, it = e.rotrSH(P, K, 19) ^ e.rotrBH(P, K, 61) ^ e.shrSH(P, K, 6), ot = e.rotrSL(P, K, 19) ^ e.rotrBL(P, K, 61) ^ e.shrSL(P, K, 6), ct = e.add4L(z, ot, u[y - 7], u[y - 16]), at = e.add4H(ct, M, it, H[y - 7], H[y - 16]);
1651
- H[y] = at | 0, u[y] = ct | 0;
1712
+ const V = H[y - 15] | 0, k = f[y - 15] | 0, j = e.rotrSH(V, k, 1) ^ e.rotrSH(V, k, 8) ^ e.shrSH(V, k, 7), et = e.rotrSL(V, k, 1) ^ e.rotrSL(V, k, 8) ^ e.shrSL(V, k, 7), K = H[y - 2] | 0, N = f[y - 2] | 0, ot = e.rotrSH(K, N, 19) ^ e.rotrBH(K, N, 61) ^ e.shrSH(K, N, 6), St = e.rotrSL(K, N, 19) ^ e.rotrBL(K, N, 61) ^ e.shrSL(K, N, 6), at = e.add4L(et, St, f[y - 7], f[y - 16]), wt = e.add4H(at, j, ot, H[y - 7], H[y - 16]);
1713
+ H[y] = wt | 0, f[y] = at | 0;
1652
1714
  }
1653
- let { Ah: p, Al: w, Bh: U, Bl: E, Ch: o, Cl: f, Dh: d, Dl: L, Eh: A, El: m, Fh: F, Fl: O, Gh: v, Gl: q, Hh: s, Hl: l } = this;
1715
+ let { Ah: A, Al: B, Bh: m, Bl: E, Ch: h, Cl: u, Dh: l, Dl: L, Eh: p, El: U, Fh: F, Fl: M, Gh: G, Gl: q, Hh: n, Hl: b } = this;
1654
1716
  for (let y = 0; y < 80; y++) {
1655
- const V = e.rotrSH(A, m, 14) ^ e.rotrSH(A, m, 18) ^ e.rotrBH(A, m, 41), k = e.rotrSL(A, m, 14) ^ e.rotrSL(A, m, 18) ^ e.rotrBL(A, m, 41), M = A & F ^ ~A & v, z = m & O ^ ~m & q, P = e.add5L(l, k, z, x[y], u[y]), K = e.add5H(P, s, V, M, b[y], H[y]), it = P | 0, ot = e.rotrSH(p, w, 28) ^ e.rotrBH(p, w, 34) ^ e.rotrBH(p, w, 39), ct = e.rotrSL(p, w, 28) ^ e.rotrBL(p, w, 34) ^ e.rotrBL(p, w, 39), at = p & U ^ p & o ^ U & o, Dt = w & E ^ w & f ^ E & f;
1656
- s = v | 0, l = q | 0, v = F | 0, q = O | 0, F = A | 0, O = m | 0, { h: A, l: m } = e.add(d | 0, L | 0, K | 0, it | 0), d = o | 0, L = f | 0, o = U | 0, f = E | 0, U = p | 0, E = w | 0;
1657
- const At = e.add3L(it, ct, Dt);
1658
- p = e.add3H(At, K, ot, at), w = At | 0;
1717
+ const V = e.rotrSH(p, U, 14) ^ e.rotrSH(p, U, 18) ^ e.rotrBH(p, U, 41), k = e.rotrSL(p, U, 14) ^ e.rotrSL(p, U, 18) ^ e.rotrBL(p, U, 41), j = p & F ^ ~p & G, et = U & M ^ ~U & q, K = e.add5L(b, k, et, x[y], f[y]), N = e.add5H(K, n, V, j, d[y], H[y]), ot = K | 0, St = e.rotrSH(A, B, 28) ^ e.rotrBH(A, B, 34) ^ e.rotrBH(A, B, 39), at = e.rotrSL(A, B, 28) ^ e.rotrBL(A, B, 34) ^ e.rotrBL(A, B, 39), wt = A & m ^ A & h ^ m & h, Pt = B & E ^ B & u ^ E & u;
1718
+ n = G | 0, b = q | 0, G = F | 0, q = M | 0, F = p | 0, M = U | 0, { h: p, l: U } = e.add(l | 0, L | 0, N | 0, ot | 0), l = h | 0, L = u | 0, h = m | 0, u = E | 0, m = A | 0, E = B | 0;
1719
+ const Ut = e.add3L(ot, at, Pt);
1720
+ A = e.add3H(Ut, N, St, wt), B = Ut | 0;
1659
1721
  }
1660
- ({ h: p, l: w } = e.add(this.Ah | 0, this.Al | 0, p | 0, w | 0)), { h: U, l: E } = e.add(this.Bh | 0, this.Bl | 0, U | 0, E | 0), { h: o, l: f } = e.add(this.Ch | 0, this.Cl | 0, o | 0, f | 0), { h: d, l: L } = e.add(this.Dh | 0, this.Dl | 0, d | 0, L | 0), { h: A, l: m } = e.add(this.Eh | 0, this.El | 0, A | 0, m | 0), { h: F, l: O } = e.add(this.Fh | 0, this.Fl | 0, F | 0, O | 0), { h: v, l: q } = e.add(this.Gh | 0, this.Gl | 0, v | 0, q | 0), { h: s, l } = e.add(this.Hh | 0, this.Hl | 0, s | 0, l | 0), this.set(p, w, U, E, o, f, d, L, A, m, F, O, v, q, s, l);
1722
+ ({ h: A, l: B } = e.add(this.Ah | 0, this.Al | 0, A | 0, B | 0)), { h: m, l: E } = e.add(this.Bh | 0, this.Bl | 0, m | 0, E | 0), { h, l: u } = e.add(this.Ch | 0, this.Cl | 0, h | 0, u | 0), { h: l, l: L } = e.add(this.Dh | 0, this.Dl | 0, l | 0, L | 0), { h: p, l: U } = e.add(this.Eh | 0, this.El | 0, p | 0, U | 0), { h: F, l: M } = e.add(this.Fh | 0, this.Fl | 0, F | 0, M | 0), { h: G, l: q } = e.add(this.Gh | 0, this.Gl | 0, G | 0, q | 0), { h: n, l: b } = e.add(this.Hh | 0, this.Hl | 0, n | 0, b | 0), this.set(A, B, m, E, h, u, l, L, p, U, F, M, G, q, n, b);
1661
1723
  }
1662
1724
  roundClean() {
1663
- (0, n.clean)(H, u);
1725
+ (0, s.clean)(H, f);
1664
1726
  }
1665
1727
  destroy() {
1666
- (0, n.clean)(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
1728
+ (0, s.clean)(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
1667
1729
  }
1668
1730
  }
1669
- N.SHA512 = S;
1670
- class B extends S {
1731
+ R.SHA512 = g;
1732
+ class w extends g {
1671
1733
  constructor() {
1672
1734
  super(48), this.Ah = t.SHA384_IV[0] | 0, this.Al = t.SHA384_IV[1] | 0, this.Bh = t.SHA384_IV[2] | 0, this.Bl = t.SHA384_IV[3] | 0, this.Ch = t.SHA384_IV[4] | 0, this.Cl = t.SHA384_IV[5] | 0, this.Dh = t.SHA384_IV[6] | 0, this.Dl = t.SHA384_IV[7] | 0, this.Eh = t.SHA384_IV[8] | 0, this.El = t.SHA384_IV[9] | 0, this.Fh = t.SHA384_IV[10] | 0, this.Fl = t.SHA384_IV[11] | 0, this.Gh = t.SHA384_IV[12] | 0, this.Gl = t.SHA384_IV[13] | 0, this.Hh = t.SHA384_IV[14] | 0, this.Hl = t.SHA384_IV[15] | 0;
1673
1735
  }
1674
1736
  }
1675
- N.SHA384 = B;
1676
- const g = /* @__PURE__ */ Uint32Array.from([
1737
+ R.SHA384 = w;
1738
+ const S = /* @__PURE__ */ Uint32Array.from([
1677
1739
  2352822216,
1678
1740
  424955298,
1679
1741
  1944164710,
@@ -1708,359 +1770,380 @@ function qs() {
1708
1770
  246885852,
1709
1771
  2177182882
1710
1772
  ]);
1711
- class D extends S {
1773
+ class D extends g {
1712
1774
  constructor() {
1713
- super(28), this.Ah = g[0] | 0, this.Al = g[1] | 0, this.Bh = g[2] | 0, this.Bl = g[3] | 0, this.Ch = g[4] | 0, this.Cl = g[5] | 0, this.Dh = g[6] | 0, this.Dl = g[7] | 0, this.Eh = g[8] | 0, this.El = g[9] | 0, this.Fh = g[10] | 0, this.Fl = g[11] | 0, this.Gh = g[12] | 0, this.Gl = g[13] | 0, this.Hh = g[14] | 0, this.Hl = g[15] | 0;
1775
+ super(28), this.Ah = S[0] | 0, this.Al = S[1] | 0, this.Bh = S[2] | 0, this.Bl = S[3] | 0, this.Ch = S[4] | 0, this.Cl = S[5] | 0, this.Dh = S[6] | 0, this.Dl = S[7] | 0, this.Eh = S[8] | 0, this.El = S[9] | 0, this.Fh = S[10] | 0, this.Fl = S[11] | 0, this.Gh = S[12] | 0, this.Gl = S[13] | 0, this.Hh = S[14] | 0, this.Hl = S[15] | 0;
1714
1776
  }
1715
1777
  }
1716
- N.SHA512_224 = D;
1717
- class R extends S {
1778
+ R.SHA512_224 = D;
1779
+ class W extends g {
1718
1780
  constructor() {
1719
1781
  super(32), this.Ah = I[0] | 0, this.Al = I[1] | 0, this.Bh = I[2] | 0, this.Bl = I[3] | 0, this.Ch = I[4] | 0, this.Cl = I[5] | 0, this.Dh = I[6] | 0, this.Dl = I[7] | 0, this.Eh = I[8] | 0, this.El = I[9] | 0, this.Fh = I[10] | 0, this.Fl = I[11] | 0, this.Gh = I[12] | 0, this.Gl = I[13] | 0, this.Hh = I[14] | 0, this.Hl = I[15] | 0;
1720
1782
  }
1721
1783
  }
1722
- return N.SHA512_256 = R, N.sha256 = (0, n.createHasher)(() => new i()), N.sha224 = (0, n.createHasher)(() => new r()), N.sha512 = (0, n.createHasher)(() => new S()), N.sha384 = (0, n.createHasher)(() => new B()), N.sha512_256 = (0, n.createHasher)(() => new R()), N.sha512_224 = (0, n.createHasher)(() => new D()), N;
1784
+ return R.SHA512_256 = W, R.sha256 = (0, s.createHasher)(() => new c()), R.sha224 = (0, s.createHasher)(() => new r()), R.sha512 = (0, s.createHasher)(() => new g()), R.sha384 = (0, s.createHasher)(() => new w()), R.sha512_256 = (0, s.createHasher)(() => new W()), R.sha512_224 = (0, s.createHasher)(() => new D()), R;
1723
1785
  }
1724
- var Zt = {}, Se;
1725
- function Ps() {
1726
- return Se || (Se = 1, (function(t) {
1727
- Object.defineProperty(t, "__esModule", { value: !0 }), t.hmac = t.HMAC = void 0;
1728
- const e = /* @__PURE__ */ ie();
1729
- class n extends e.Hash {
1730
- constructor(i, r) {
1731
- super(), this.finished = !1, this.destroyed = !1, (0, e.ahash)(i);
1732
- const a = (0, e.toBytes)(r);
1733
- if (this.iHash = i.create(), typeof this.iHash.update != "function")
1734
- throw new Error("Expected instance of class which extends utils.Hash");
1735
- this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
1736
- const b = this.blockLen, x = new Uint8Array(b);
1737
- x.set(a.length > b ? i.create().update(a).digest() : a);
1738
- for (let H = 0; H < x.length; H++)
1739
- x[H] ^= 54;
1740
- this.iHash.update(x), this.oHash = i.create();
1741
- for (let H = 0; H < x.length; H++)
1742
- x[H] ^= 106;
1743
- this.oHash.update(x), (0, e.clean)(x);
1744
- }
1745
- update(i) {
1746
- return (0, e.aexists)(this), this.iHash.update(i), this;
1747
- }
1748
- digestInto(i) {
1749
- (0, e.aexists)(this), (0, e.abytes)(i, this.outputLen), this.finished = !0, this.iHash.digestInto(i), this.oHash.update(i), this.oHash.digestInto(i), this.destroy();
1750
- }
1751
- digest() {
1752
- const i = new Uint8Array(this.oHash.outputLen);
1753
- return this.digestInto(i), i;
1754
- }
1755
- _cloneInto(i) {
1756
- i || (i = Object.create(Object.getPrototypeOf(this), {}));
1757
- const { oHash: r, iHash: a, finished: b, destroyed: x, blockLen: H, outputLen: u } = this;
1758
- return i = i, i.finished = b, i.destroyed = x, i.blockLen = H, i.outputLen = u, i.oHash = r._cloneInto(i.oHash), i.iHash = a._cloneInto(i.iHash), i;
1759
- }
1760
- clone() {
1761
- return this._cloneInto();
1762
- }
1763
- destroy() {
1764
- this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
1765
- }
1786
+ var le;
1787
+ function Is() {
1788
+ if (le) return st;
1789
+ le = 1, Object.defineProperty(st, "__esModule", { value: !0 }), st.sha224 = st.SHA224 = st.sha256 = st.SHA256 = void 0;
1790
+ const t = /* @__PURE__ */ ss();
1791
+ return st.SHA256 = t.SHA256, st.sha256 = t.sha256, st.SHA224 = t.SHA224, st.sha224 = t.sha224, st;
1792
+ }
1793
+ const ns = BigInt(0), Vt = BigInt(1), rs = BigInt(2), is = BigInt(7), cs = BigInt(256), os = BigInt(113), Je = [], Qe = [], Ye = [];
1794
+ for (let t = 0, e = Vt, s = 1, o = 0; t < 24; t++) {
1795
+ [s, o] = [o, (2 * s + 3 * o) % 5], Je.push(2 * (5 * o + s)), Qe.push((t + 1) * (t + 2) / 2 % 64);
1796
+ let i = ns;
1797
+ for (let c = 0; c < 7; c++)
1798
+ e = (e << Vt ^ (e >> is) * os) % cs, e & rs && (i ^= Vt << (Vt << BigInt(c)) - Vt);
1799
+ Ye.push(i);
1800
+ }
1801
+ const Ze = Me(Ye, !0), as = Ze[0], hs = Ze[1], be = (t, e, s) => s > 32 ? O0(t, e, s) : k0(t, e, s), xe = (t, e, s) => s > 32 ? T0(t, e, s) : F0(t, e, s);
1802
+ function fs(t, e = 24) {
1803
+ const s = new Uint32Array(10);
1804
+ for (let o = 24 - e; o < 24; o++) {
1805
+ for (let r = 0; r < 10; r++)
1806
+ s[r] = t[r] ^ t[r + 10] ^ t[r + 20] ^ t[r + 30] ^ t[r + 40];
1807
+ for (let r = 0; r < 10; r += 2) {
1808
+ const a = (r + 8) % 10, d = (r + 2) % 10, x = s[d], H = s[d + 1], f = be(x, H, 1) ^ s[a], g = xe(x, H, 1) ^ s[a + 1];
1809
+ for (let w = 0; w < 50; w += 10)
1810
+ t[r + w] ^= f, t[r + w + 1] ^= g;
1811
+ }
1812
+ let i = t[2], c = t[3];
1813
+ for (let r = 0; r < 24; r++) {
1814
+ const a = Qe[r], d = be(i, c, a), x = xe(i, c, a), H = Je[r];
1815
+ i = t[H], c = t[H + 1], t[H] = d, t[H + 1] = x;
1766
1816
  }
1767
- t.HMAC = n;
1768
- const h = (c, i, r) => new n(c, i).update(r).digest();
1769
- t.hmac = h, t.hmac.create = (c, i) => new n(c, i);
1770
- })(Zt)), Zt;
1817
+ for (let r = 0; r < 50; r += 10) {
1818
+ for (let a = 0; a < 10; a++)
1819
+ s[a] = t[r + a];
1820
+ for (let a = 0; a < 10; a++)
1821
+ t[r + a] ^= ~s[(a + 2) % 10] & s[(a + 4) % 10];
1822
+ }
1823
+ t[0] ^= as[o], t[1] ^= hs[o];
1824
+ }
1825
+ tt(s);
1771
1826
  }
1772
- class ce {
1773
- oHash;
1774
- iHash;
1775
- blockLen;
1776
- outputLen;
1827
+ class te {
1828
+ state;
1829
+ pos = 0;
1830
+ posOut = 0;
1777
1831
  finished = !1;
1832
+ state32;
1778
1833
  destroyed = !1;
1779
- constructor(e, n) {
1780
- if (We(e), Ht(n, void 0, "key"), this.iHash = e.create(), typeof this.iHash.update != "function")
1781
- throw new Error("Expected instance of class which extends utils.Hash");
1782
- this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
1783
- const h = this.blockLen, c = new Uint8Array(h);
1784
- c.set(n.length > h ? e.create().update(n).digest() : n);
1785
- for (let i = 0; i < c.length; i++)
1786
- c[i] ^= 54;
1787
- this.iHash.update(c), this.oHash = e.create();
1788
- for (let i = 0; i < c.length; i++)
1789
- c[i] ^= 106;
1790
- this.oHash.update(c), rt(c);
1834
+ blockLen;
1835
+ suffix;
1836
+ outputLen;
1837
+ enableXOF = !1;
1838
+ rounds;
1839
+ // NOTE: we accept arguments in bytes instead of bits here.
1840
+ constructor(e, s, o, i = !1, c = 24) {
1841
+ if (this.blockLen = e, this.suffix = s, this.outputLen = o, this.enableXOF = i, this.rounds = c, Gt(o, "outputLen"), !(0 < e && e < 200))
1842
+ throw new Error("only keccak-f1600 function is supported");
1843
+ this.state = new Uint8Array(200), this.state32 = b0(this.state);
1844
+ }
1845
+ clone() {
1846
+ return this._cloneInto();
1847
+ }
1848
+ keccak() {
1849
+ se(this.state32), fs(this.state32, this.rounds), se(this.state32), this.posOut = 0, this.pos = 0;
1791
1850
  }
1792
1851
  update(e) {
1793
- return kt(this), this.iHash.update(e), this;
1852
+ mt(this), _t(e);
1853
+ const { blockLen: s, state: o } = this, i = e.length;
1854
+ for (let c = 0; c < i; ) {
1855
+ const r = Math.min(s - this.pos, i - c);
1856
+ for (let a = 0; a < r; a++)
1857
+ o[this.pos++] ^= e[c++];
1858
+ this.pos === s && this.keccak();
1859
+ }
1860
+ return this;
1794
1861
  }
1795
- digestInto(e) {
1796
- kt(this), Ht(e, this.outputLen, "output"), this.finished = !0, this.iHash.digestInto(e), this.oHash.update(e), this.oHash.digestInto(e), this.destroy();
1862
+ finish() {
1863
+ if (this.finished)
1864
+ return;
1865
+ this.finished = !0;
1866
+ const { state: e, suffix: s, pos: o, blockLen: i } = this;
1867
+ e[o] ^= s, (s & 128) !== 0 && o === i - 1 && this.keccak(), e[i - 1] ^= 128, this.keccak();
1797
1868
  }
1798
- digest() {
1799
- const e = new Uint8Array(this.oHash.outputLen);
1800
- return this.digestInto(e), e;
1869
+ writeInto(e) {
1870
+ mt(this, !1), _t(e), this.finish();
1871
+ const s = this.state, { blockLen: o } = this;
1872
+ for (let i = 0, c = e.length; i < c; ) {
1873
+ this.posOut >= o && this.keccak();
1874
+ const r = Math.min(o - this.posOut, c - i);
1875
+ e.set(s.subarray(this.posOut, this.posOut + r), i), this.posOut += r, i += r;
1876
+ }
1877
+ return e;
1801
1878
  }
1802
- _cloneInto(e) {
1803
- e ||= Object.create(Object.getPrototypeOf(this), {});
1804
- const { oHash: n, iHash: h, finished: c, destroyed: i, blockLen: r, outputLen: a } = this;
1805
- return e = e, e.finished = c, e.destroyed = i, e.blockLen = r, e.outputLen = a, e.oHash = n._cloneInto(e.oHash), e.iHash = h._cloneInto(e.iHash), e;
1879
+ xofInto(e) {
1880
+ if (!this.enableXOF)
1881
+ throw new Error("XOF is not possible for this instance");
1882
+ return this.writeInto(e);
1806
1883
  }
1807
- clone() {
1808
- return this._cloneInto();
1884
+ xof(e) {
1885
+ return Gt(e), this.xofInto(new Uint8Array(e));
1886
+ }
1887
+ digestInto(e) {
1888
+ if (Le(e, this), this.finished)
1889
+ throw new Error("digest() was already called");
1890
+ return this.writeInto(e), this.destroy(), e;
1891
+ }
1892
+ digest() {
1893
+ return this.digestInto(new Uint8Array(this.outputLen));
1809
1894
  }
1810
1895
  destroy() {
1811
- this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
1896
+ this.destroyed = !0, tt(this.state);
1897
+ }
1898
+ _cloneInto(e) {
1899
+ const { blockLen: s, suffix: o, outputLen: i, rounds: c, enableXOF: r } = this;
1900
+ return e ||= new te(s, o, i, r, c), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = c, e.suffix = o, e.outputLen = i, e.enableXOF = r, e.destroyed = this.destroyed, e;
1812
1901
  }
1813
1902
  }
1814
- const oe = (t, e, n) => new ce(t, e).update(n).digest();
1815
- oe.create = (t, e) => new ce(t, e);
1816
- const As = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1817
- __proto__: null,
1818
- _HMAC: ce,
1819
- hmac: oe
1820
- }, Symbol.toStringTag, { value: "Module" })), Ks = /* @__PURE__ */ ne(As), Ns = /* @__PURE__ */ ne(N0), Xs = /* @__PURE__ */ ne(ls);
1821
- var ht = {}, X = {}, st = {}, $t = {}, Tt = {}, we;
1822
- function ys() {
1823
- return we || (we = 1, Object.defineProperty(Tt, "__esModule", { value: !0 }), Tt.crypto = void 0, Tt.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), Tt;
1824
- }
1825
- var Ie;
1826
- function a0() {
1827
- return Ie || (Ie = 1, (function(t) {
1828
- Object.defineProperty(t, "__esModule", { value: !0 }), t.wrapXOFConstructorWithOpts = t.wrapConstructorWithOpts = t.wrapConstructor = t.Hash = t.nextTick = t.swap32IfBE = t.byteSwapIfBE = t.swap8IfBE = t.isLE = void 0, t.isBytes = n, t.anumber = h, t.abytes = c, t.ahash = i, t.aexists = r, t.aoutput = a, t.u8 = b, t.u32 = x, t.clean = H, t.createView = u, t.rotr = S, t.rotl = B, t.byteSwap = g, t.byteSwap32 = I, t.bytesToHex = T, t.hexToBytes = p, t.asyncLoop = U, t.utf8ToBytes = E, t.bytesToUtf8 = o, t.toBytes = f, t.kdfInputToBytes = d, t.concatBytes = L, t.checkOpts = A, t.createHasher = F, t.createOptHasher = O, t.createXOFer = v, t.randomBytes = q;
1829
- const e = /* @__PURE__ */ ys();
1830
- function n(s) {
1831
- return s instanceof Uint8Array || ArrayBuffer.isView(s) && s.constructor.name === "Uint8Array";
1832
- }
1833
- function h(s) {
1834
- if (!Number.isSafeInteger(s) || s < 0)
1835
- throw new Error("positive integer expected, got " + s);
1836
- }
1837
- function c(s, ...l) {
1838
- if (!n(s))
1903
+ const ze = (t, e, s, o = {}) => ct((i = {}) => new te(e, t, i.dkLen === void 0 ? s : i.dkLen, !0), o), Ls = /* @__PURE__ */ ze(31, 168, 16, /* @__PURE__ */ gt(11)), ms = /* @__PURE__ */ ze(31, 136, 32, /* @__PURE__ */ gt(12));
1904
+ var nt = {}, P = {}, $ = {}, Jt = {}, Ct = {}, He;
1905
+ function ds() {
1906
+ return He || (He = 1, Object.defineProperty(Ct, "__esModule", { value: !0 }), Ct.crypto = void 0, Ct.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), Ct;
1907
+ }
1908
+ var Ae;
1909
+ function Rt() {
1910
+ return Ae || (Ae = 1, (function(t) {
1911
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.wrapXOFConstructorWithOpts = t.wrapConstructorWithOpts = t.wrapConstructor = t.Hash = t.nextTick = t.swap32IfBE = t.byteSwapIfBE = t.swap8IfBE = t.isLE = void 0, t.isBytes = s, t.anumber = o, t.abytes = i, t.ahash = c, t.aexists = r, t.aoutput = a, t.u8 = d, t.u32 = x, t.clean = H, t.createView = f, t.rotr = g, t.rotl = w, t.byteSwap = S, t.byteSwap32 = I, t.bytesToHex = v, t.hexToBytes = A, t.asyncLoop = m, t.utf8ToBytes = E, t.bytesToUtf8 = h, t.toBytes = u, t.kdfInputToBytes = l, t.concatBytes = L, t.checkOpts = p, t.createHasher = F, t.createOptHasher = M, t.createXOFer = G, t.randomBytes = q;
1912
+ const e = /* @__PURE__ */ ds();
1913
+ function s(n) {
1914
+ return n instanceof Uint8Array || ArrayBuffer.isView(n) && n.constructor.name === "Uint8Array";
1915
+ }
1916
+ function o(n) {
1917
+ if (!Number.isSafeInteger(n) || n < 0)
1918
+ throw new Error("positive integer expected, got " + n);
1919
+ }
1920
+ function i(n, ...b) {
1921
+ if (!s(n))
1839
1922
  throw new Error("Uint8Array expected");
1840
- if (l.length > 0 && !l.includes(s.length))
1841
- throw new Error("Uint8Array expected of length " + l + ", got length=" + s.length);
1923
+ if (b.length > 0 && !b.includes(n.length))
1924
+ throw new Error("Uint8Array expected of length " + b + ", got length=" + n.length);
1842
1925
  }
1843
- function i(s) {
1844
- if (typeof s != "function" || typeof s.create != "function")
1926
+ function c(n) {
1927
+ if (typeof n != "function" || typeof n.create != "function")
1845
1928
  throw new Error("Hash should be wrapped by utils.createHasher");
1846
- h(s.outputLen), h(s.blockLen);
1929
+ o(n.outputLen), o(n.blockLen);
1847
1930
  }
1848
- function r(s, l = !0) {
1849
- if (s.destroyed)
1931
+ function r(n, b = !0) {
1932
+ if (n.destroyed)
1850
1933
  throw new Error("Hash instance has been destroyed");
1851
- if (l && s.finished)
1934
+ if (b && n.finished)
1852
1935
  throw new Error("Hash#digest() has already been called");
1853
1936
  }
1854
- function a(s, l) {
1855
- c(s);
1856
- const y = l.outputLen;
1857
- if (s.length < y)
1937
+ function a(n, b) {
1938
+ i(n);
1939
+ const y = b.outputLen;
1940
+ if (n.length < y)
1858
1941
  throw new Error("digestInto() expects output buffer of length at least " + y);
1859
1942
  }
1860
- function b(s) {
1861
- return new Uint8Array(s.buffer, s.byteOffset, s.byteLength);
1943
+ function d(n) {
1944
+ return new Uint8Array(n.buffer, n.byteOffset, n.byteLength);
1862
1945
  }
1863
- function x(s) {
1864
- return new Uint32Array(s.buffer, s.byteOffset, Math.floor(s.byteLength / 4));
1946
+ function x(n) {
1947
+ return new Uint32Array(n.buffer, n.byteOffset, Math.floor(n.byteLength / 4));
1865
1948
  }
1866
- function H(...s) {
1867
- for (let l = 0; l < s.length; l++)
1868
- s[l].fill(0);
1949
+ function H(...n) {
1950
+ for (let b = 0; b < n.length; b++)
1951
+ n[b].fill(0);
1869
1952
  }
1870
- function u(s) {
1871
- return new DataView(s.buffer, s.byteOffset, s.byteLength);
1953
+ function f(n) {
1954
+ return new DataView(n.buffer, n.byteOffset, n.byteLength);
1872
1955
  }
1873
- function S(s, l) {
1874
- return s << 32 - l | s >>> l;
1956
+ function g(n, b) {
1957
+ return n << 32 - b | n >>> b;
1875
1958
  }
1876
- function B(s, l) {
1877
- return s << l | s >>> 32 - l >>> 0;
1959
+ function w(n, b) {
1960
+ return n << b | n >>> 32 - b >>> 0;
1878
1961
  }
1879
1962
  t.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1880
- function g(s) {
1881
- return s << 24 & 4278190080 | s << 8 & 16711680 | s >>> 8 & 65280 | s >>> 24 & 255;
1882
- }
1883
- t.swap8IfBE = t.isLE ? (s) => s : (s) => g(s), t.byteSwapIfBE = t.swap8IfBE;
1884
- function I(s) {
1885
- for (let l = 0; l < s.length; l++)
1886
- s[l] = g(s[l]);
1887
- return s;
1888
- }
1889
- t.swap32IfBE = t.isLE ? (s) => s : I;
1890
- const D = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", R = /* @__PURE__ */ Array.from({ length: 256 }, (s, l) => l.toString(16).padStart(2, "0"));
1891
- function T(s) {
1892
- if (c(s), D)
1893
- return s.toHex();
1894
- let l = "";
1895
- for (let y = 0; y < s.length; y++)
1896
- l += R[s[y]];
1897
- return l;
1963
+ function S(n) {
1964
+ return n << 24 & 4278190080 | n << 8 & 16711680 | n >>> 8 & 65280 | n >>> 24 & 255;
1965
+ }
1966
+ t.swap8IfBE = t.isLE ? (n) => n : (n) => S(n), t.byteSwapIfBE = t.swap8IfBE;
1967
+ function I(n) {
1968
+ for (let b = 0; b < n.length; b++)
1969
+ n[b] = S(n[b]);
1970
+ return n;
1971
+ }
1972
+ t.swap32IfBE = t.isLE ? (n) => n : I;
1973
+ const D = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", W = /* @__PURE__ */ Array.from({ length: 256 }, (n, b) => b.toString(16).padStart(2, "0"));
1974
+ function v(n) {
1975
+ if (i(n), D)
1976
+ return n.toHex();
1977
+ let b = "";
1978
+ for (let y = 0; y < n.length; y++)
1979
+ b += W[n[y]];
1980
+ return b;
1898
1981
  }
1899
1982
  const _ = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
1900
- function C(s) {
1901
- if (s >= _._0 && s <= _._9)
1902
- return s - _._0;
1903
- if (s >= _.A && s <= _.F)
1904
- return s - (_.A - 10);
1905
- if (s >= _.a && s <= _.f)
1906
- return s - (_.a - 10);
1907
- }
1908
- function p(s) {
1909
- if (typeof s != "string")
1910
- throw new Error("hex string expected, got " + typeof s);
1983
+ function C(n) {
1984
+ if (n >= _._0 && n <= _._9)
1985
+ return n - _._0;
1986
+ if (n >= _.A && n <= _.F)
1987
+ return n - (_.A - 10);
1988
+ if (n >= _.a && n <= _.f)
1989
+ return n - (_.a - 10);
1990
+ }
1991
+ function A(n) {
1992
+ if (typeof n != "string")
1993
+ throw new Error("hex string expected, got " + typeof n);
1911
1994
  if (D)
1912
- return Uint8Array.fromHex(s);
1913
- const l = s.length, y = l / 2;
1914
- if (l % 2)
1915
- throw new Error("hex string expected, got unpadded hex of length " + l);
1995
+ return Uint8Array.fromHex(n);
1996
+ const b = n.length, y = b / 2;
1997
+ if (b % 2)
1998
+ throw new Error("hex string expected, got unpadded hex of length " + b);
1916
1999
  const V = new Uint8Array(y);
1917
- for (let k = 0, M = 0; k < y; k++, M += 2) {
1918
- const z = C(s.charCodeAt(M)), P = C(s.charCodeAt(M + 1));
1919
- if (z === void 0 || P === void 0) {
1920
- const K = s[M] + s[M + 1];
1921
- throw new Error('hex string expected, got non-hex character "' + K + '" at index ' + M);
2000
+ for (let k = 0, j = 0; k < y; k++, j += 2) {
2001
+ const et = C(n.charCodeAt(j)), K = C(n.charCodeAt(j + 1));
2002
+ if (et === void 0 || K === void 0) {
2003
+ const N = n[j] + n[j + 1];
2004
+ throw new Error('hex string expected, got non-hex character "' + N + '" at index ' + j);
1922
2005
  }
1923
- V[k] = z * 16 + P;
2006
+ V[k] = et * 16 + K;
1924
2007
  }
1925
2008
  return V;
1926
2009
  }
1927
- const w = async () => {
2010
+ const B = async () => {
1928
2011
  };
1929
- t.nextTick = w;
1930
- async function U(s, l, y) {
2012
+ t.nextTick = B;
2013
+ async function m(n, b, y) {
1931
2014
  let V = Date.now();
1932
- for (let k = 0; k < s; k++) {
2015
+ for (let k = 0; k < n; k++) {
1933
2016
  y(k);
1934
- const M = Date.now() - V;
1935
- M >= 0 && M < l || (await (0, t.nextTick)(), V += M);
2017
+ const j = Date.now() - V;
2018
+ j >= 0 && j < b || (await (0, t.nextTick)(), V += j);
1936
2019
  }
1937
2020
  }
1938
- function E(s) {
1939
- if (typeof s != "string")
2021
+ function E(n) {
2022
+ if (typeof n != "string")
1940
2023
  throw new Error("string expected");
1941
- return new Uint8Array(new TextEncoder().encode(s));
2024
+ return new Uint8Array(new TextEncoder().encode(n));
1942
2025
  }
1943
- function o(s) {
1944
- return new TextDecoder().decode(s);
2026
+ function h(n) {
2027
+ return new TextDecoder().decode(n);
1945
2028
  }
1946
- function f(s) {
1947
- return typeof s == "string" && (s = E(s)), c(s), s;
2029
+ function u(n) {
2030
+ return typeof n == "string" && (n = E(n)), i(n), n;
1948
2031
  }
1949
- function d(s) {
1950
- return typeof s == "string" && (s = E(s)), c(s), s;
2032
+ function l(n) {
2033
+ return typeof n == "string" && (n = E(n)), i(n), n;
1951
2034
  }
1952
- function L(...s) {
1953
- let l = 0;
1954
- for (let V = 0; V < s.length; V++) {
1955
- const k = s[V];
1956
- c(k), l += k.length;
2035
+ function L(...n) {
2036
+ let b = 0;
2037
+ for (let V = 0; V < n.length; V++) {
2038
+ const k = n[V];
2039
+ i(k), b += k.length;
1957
2040
  }
1958
- const y = new Uint8Array(l);
1959
- for (let V = 0, k = 0; V < s.length; V++) {
1960
- const M = s[V];
1961
- y.set(M, k), k += M.length;
2041
+ const y = new Uint8Array(b);
2042
+ for (let V = 0, k = 0; V < n.length; V++) {
2043
+ const j = n[V];
2044
+ y.set(j, k), k += j.length;
1962
2045
  }
1963
2046
  return y;
1964
2047
  }
1965
- function A(s, l) {
1966
- if (l !== void 0 && {}.toString.call(l) !== "[object Object]")
2048
+ function p(n, b) {
2049
+ if (b !== void 0 && {}.toString.call(b) !== "[object Object]")
1967
2050
  throw new Error("options should be object or undefined");
1968
- return Object.assign(s, l);
2051
+ return Object.assign(n, b);
1969
2052
  }
1970
- class m {
2053
+ class U {
1971
2054
  }
1972
- t.Hash = m;
1973
- function F(s) {
1974
- const l = (V) => s().update(f(V)).digest(), y = s();
1975
- return l.outputLen = y.outputLen, l.blockLen = y.blockLen, l.create = () => s(), l;
2055
+ t.Hash = U;
2056
+ function F(n) {
2057
+ const b = (V) => n().update(u(V)).digest(), y = n();
2058
+ return b.outputLen = y.outputLen, b.blockLen = y.blockLen, b.create = () => n(), b;
1976
2059
  }
1977
- function O(s) {
1978
- const l = (V, k) => s(k).update(f(V)).digest(), y = s({});
1979
- return l.outputLen = y.outputLen, l.blockLen = y.blockLen, l.create = (V) => s(V), l;
2060
+ function M(n) {
2061
+ const b = (V, k) => n(k).update(u(V)).digest(), y = n({});
2062
+ return b.outputLen = y.outputLen, b.blockLen = y.blockLen, b.create = (V) => n(V), b;
1980
2063
  }
1981
- function v(s) {
1982
- const l = (V, k) => s(k).update(f(V)).digest(), y = s({});
1983
- return l.outputLen = y.outputLen, l.blockLen = y.blockLen, l.create = (V) => s(V), l;
2064
+ function G(n) {
2065
+ const b = (V, k) => n(k).update(u(V)).digest(), y = n({});
2066
+ return b.outputLen = y.outputLen, b.blockLen = y.blockLen, b.create = (V) => n(V), b;
1984
2067
  }
1985
- t.wrapConstructor = F, t.wrapConstructorWithOpts = O, t.wrapXOFConstructorWithOpts = v;
1986
- function q(s = 32) {
2068
+ t.wrapConstructor = F, t.wrapConstructorWithOpts = M, t.wrapXOFConstructorWithOpts = G;
2069
+ function q(n = 32) {
1987
2070
  if (e.crypto && typeof e.crypto.getRandomValues == "function")
1988
- return e.crypto.getRandomValues(new Uint8Array(s));
2071
+ return e.crypto.getRandomValues(new Uint8Array(n));
1989
2072
  if (e.crypto && typeof e.crypto.randomBytes == "function")
1990
- return Uint8Array.from(e.crypto.randomBytes(s));
2073
+ return Uint8Array.from(e.crypto.randomBytes(n));
1991
2074
  throw new Error("crypto.getRandomValues must be defined");
1992
2075
  }
1993
- })($t)), $t;
2076
+ })(Jt)), Jt;
1994
2077
  }
1995
- var Be;
1996
- function ps() {
1997
- if (Be) return st;
1998
- Be = 1, Object.defineProperty(st, "__esModule", { value: !0 }), st.SHA512_IV = st.SHA384_IV = st.SHA224_IV = st.SHA256_IV = st.HashMD = void 0, st.setBigUint64 = e, st.Chi = n, st.Maj = h;
1999
- const t = /* @__PURE__ */ a0();
2000
- function e(i, r, a, b) {
2001
- if (typeof i.setBigUint64 == "function")
2002
- return i.setBigUint64(r, a, b);
2003
- const x = BigInt(32), H = BigInt(4294967295), u = Number(a >> x & H), S = Number(a & H), B = b ? 4 : 0, g = b ? 0 : 4;
2004
- i.setUint32(r + B, u, b), i.setUint32(r + g, S, b);
2005
- }
2006
- function n(i, r, a) {
2007
- return i & r ^ ~i & a;
2008
- }
2009
- function h(i, r, a) {
2010
- return i & r ^ i & a ^ r & a;
2011
- }
2012
- class c extends t.Hash {
2013
- constructor(r, a, b, x) {
2014
- super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = r, this.outputLen = a, this.padOffset = b, this.isLE = x, this.buffer = new Uint8Array(r), this.view = (0, t.createView)(this.buffer);
2078
+ var pe;
2079
+ function us() {
2080
+ if (pe) return $;
2081
+ pe = 1, Object.defineProperty($, "__esModule", { value: !0 }), $.SHA512_IV = $.SHA384_IV = $.SHA224_IV = $.SHA256_IV = $.HashMD = void 0, $.setBigUint64 = e, $.Chi = s, $.Maj = o;
2082
+ const t = /* @__PURE__ */ Rt();
2083
+ function e(c, r, a, d) {
2084
+ if (typeof c.setBigUint64 == "function")
2085
+ return c.setBigUint64(r, a, d);
2086
+ const x = BigInt(32), H = BigInt(4294967295), f = Number(a >> x & H), g = Number(a & H), w = d ? 4 : 0, S = d ? 0 : 4;
2087
+ c.setUint32(r + w, f, d), c.setUint32(r + S, g, d);
2088
+ }
2089
+ function s(c, r, a) {
2090
+ return c & r ^ ~c & a;
2091
+ }
2092
+ function o(c, r, a) {
2093
+ return c & r ^ c & a ^ r & a;
2094
+ }
2095
+ class i extends t.Hash {
2096
+ constructor(r, a, d, x) {
2097
+ super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = r, this.outputLen = a, this.padOffset = d, this.isLE = x, this.buffer = new Uint8Array(r), this.view = (0, t.createView)(this.buffer);
2015
2098
  }
2016
2099
  update(r) {
2017
2100
  (0, t.aexists)(this), r = (0, t.toBytes)(r), (0, t.abytes)(r);
2018
- const { view: a, buffer: b, blockLen: x } = this, H = r.length;
2019
- for (let u = 0; u < H; ) {
2020
- const S = Math.min(x - this.pos, H - u);
2021
- if (S === x) {
2022
- const B = (0, t.createView)(r);
2023
- for (; x <= H - u; u += x)
2024
- this.process(B, u);
2101
+ const { view: a, buffer: d, blockLen: x } = this, H = r.length;
2102
+ for (let f = 0; f < H; ) {
2103
+ const g = Math.min(x - this.pos, H - f);
2104
+ if (g === x) {
2105
+ const w = (0, t.createView)(r);
2106
+ for (; x <= H - f; f += x)
2107
+ this.process(w, f);
2025
2108
  continue;
2026
2109
  }
2027
- b.set(r.subarray(u, u + S), this.pos), this.pos += S, u += S, this.pos === x && (this.process(a, 0), this.pos = 0);
2110
+ d.set(r.subarray(f, f + g), this.pos), this.pos += g, f += g, this.pos === x && (this.process(a, 0), this.pos = 0);
2028
2111
  }
2029
2112
  return this.length += r.length, this.roundClean(), this;
2030
2113
  }
2031
2114
  digestInto(r) {
2032
2115
  (0, t.aexists)(this), (0, t.aoutput)(r, this), this.finished = !0;
2033
- const { buffer: a, view: b, blockLen: x, isLE: H } = this;
2034
- let { pos: u } = this;
2035
- a[u++] = 128, (0, t.clean)(this.buffer.subarray(u)), this.padOffset > x - u && (this.process(b, 0), u = 0);
2036
- for (let D = u; D < x; D++)
2116
+ const { buffer: a, view: d, blockLen: x, isLE: H } = this;
2117
+ let { pos: f } = this;
2118
+ a[f++] = 128, (0, t.clean)(this.buffer.subarray(f)), this.padOffset > x - f && (this.process(d, 0), f = 0);
2119
+ for (let D = f; D < x; D++)
2037
2120
  a[D] = 0;
2038
- e(b, x - 8, BigInt(this.length * 8), H), this.process(b, 0);
2039
- const S = (0, t.createView)(r), B = this.outputLen;
2040
- if (B % 4)
2121
+ e(d, x - 8, BigInt(this.length * 8), H), this.process(d, 0);
2122
+ const g = (0, t.createView)(r), w = this.outputLen;
2123
+ if (w % 4)
2041
2124
  throw new Error("_sha2: outputLen should be aligned to 32bit");
2042
- const g = B / 4, I = this.get();
2043
- if (g > I.length)
2125
+ const S = w / 4, I = this.get();
2126
+ if (S > I.length)
2044
2127
  throw new Error("_sha2: outputLen bigger than state");
2045
- for (let D = 0; D < g; D++)
2046
- S.setUint32(4 * D, I[D], H);
2128
+ for (let D = 0; D < S; D++)
2129
+ g.setUint32(4 * D, I[D], H);
2047
2130
  }
2048
2131
  digest() {
2049
2132
  const { buffer: r, outputLen: a } = this;
2050
2133
  this.digestInto(r);
2051
- const b = r.slice(0, a);
2052
- return this.destroy(), b;
2134
+ const d = r.slice(0, a);
2135
+ return this.destroy(), d;
2053
2136
  }
2054
2137
  _cloneInto(r) {
2055
2138
  r || (r = new this.constructor()), r.set(...this.get());
2056
- const { blockLen: a, buffer: b, length: x, finished: H, destroyed: u, pos: S } = this;
2057
- return r.destroyed = u, r.finished = H, r.length = x, r.pos = S, x % a && r.buffer.set(b), r;
2139
+ const { blockLen: a, buffer: d, length: x, finished: H, destroyed: f, pos: g } = this;
2140
+ return r.destroyed = f, r.finished = H, r.length = x, r.pos = g, x % a && r.buffer.set(d), r;
2058
2141
  }
2059
2142
  clone() {
2060
2143
  return this._cloneInto();
2061
2144
  }
2062
2145
  }
2063
- return st.HashMD = c, st.SHA256_IV = Uint32Array.from([
2146
+ return $.HashMD = i, $.SHA256_IV = Uint32Array.from([
2064
2147
  1779033703,
2065
2148
  3144134277,
2066
2149
  1013904242,
@@ -2069,7 +2152,7 @@ function ps() {
2069
2152
  2600822924,
2070
2153
  528734635,
2071
2154
  1541459225
2072
- ]), st.SHA224_IV = Uint32Array.from([
2155
+ ]), $.SHA224_IV = Uint32Array.from([
2073
2156
  3238371032,
2074
2157
  914150663,
2075
2158
  812702999,
@@ -2078,7 +2161,7 @@ function ps() {
2078
2161
  1750603025,
2079
2162
  1694076839,
2080
2163
  3204075428
2081
- ]), st.SHA384_IV = Uint32Array.from([
2164
+ ]), $.SHA384_IV = Uint32Array.from([
2082
2165
  3418070365,
2083
2166
  3238371032,
2084
2167
  1654270250,
@@ -2095,7 +2178,7 @@ function ps() {
2095
2178
  1694076839,
2096
2179
  1203062813,
2097
2180
  3204075428
2098
- ]), st.SHA512_IV = Uint32Array.from([
2181
+ ]), $.SHA512_IV = Uint32Array.from([
2099
2182
  1779033703,
2100
2183
  4089235720,
2101
2184
  3144134277,
@@ -2112,98 +2195,98 @@ function ps() {
2112
2195
  4215389547,
2113
2196
  1541459225,
2114
2197
  327033209
2115
- ]), st;
2198
+ ]), $;
2116
2199
  }
2117
- var j = {}, Le;
2118
- function _s() {
2119
- if (Le) return j;
2120
- Le = 1, Object.defineProperty(j, "__esModule", { value: !0 }), j.toBig = j.shrSL = j.shrSH = j.rotrSL = j.rotrSH = j.rotrBL = j.rotrBH = j.rotr32L = j.rotr32H = j.rotlSL = j.rotlSH = j.rotlBL = j.rotlBH = j.add5L = j.add5H = j.add4L = j.add4H = j.add3L = j.add3H = void 0, j.add = R, j.fromBig = n, j.split = h;
2200
+ var T = {}, ye;
2201
+ function ls() {
2202
+ if (ye) return T;
2203
+ ye = 1, Object.defineProperty(T, "__esModule", { value: !0 }), T.toBig = T.shrSL = T.shrSH = T.rotrSL = T.rotrSH = T.rotrBL = T.rotrBH = T.rotr32L = T.rotr32H = T.rotlSL = T.rotlSH = T.rotlBL = T.rotlBH = T.add5L = T.add5H = T.add4L = T.add4H = T.add3L = T.add3H = void 0, T.add = W, T.fromBig = s, T.split = o;
2121
2204
  const t = /* @__PURE__ */ BigInt(2 ** 32 - 1), e = /* @__PURE__ */ BigInt(32);
2122
- function n(o, f = !1) {
2123
- return f ? { h: Number(o & t), l: Number(o >> e & t) } : { h: Number(o >> e & t) | 0, l: Number(o & t) | 0 };
2124
- }
2125
- function h(o, f = !1) {
2126
- const d = o.length;
2127
- let L = new Uint32Array(d), A = new Uint32Array(d);
2128
- for (let m = 0; m < d; m++) {
2129
- const { h: F, l: O } = n(o[m], f);
2130
- [L[m], A[m]] = [F, O];
2131
- }
2132
- return [L, A];
2133
- }
2134
- const c = (o, f) => BigInt(o >>> 0) << e | BigInt(f >>> 0);
2135
- j.toBig = c;
2136
- const i = (o, f, d) => o >>> d;
2137
- j.shrSH = i;
2138
- const r = (o, f, d) => o << 32 - d | f >>> d;
2139
- j.shrSL = r;
2140
- const a = (o, f, d) => o >>> d | f << 32 - d;
2141
- j.rotrSH = a;
2142
- const b = (o, f, d) => o << 32 - d | f >>> d;
2143
- j.rotrSL = b;
2144
- const x = (o, f, d) => o << 64 - d | f >>> d - 32;
2145
- j.rotrBH = x;
2146
- const H = (o, f, d) => o >>> d - 32 | f << 64 - d;
2147
- j.rotrBL = H;
2148
- const u = (o, f) => f;
2149
- j.rotr32H = u;
2150
- const S = (o, f) => o;
2151
- j.rotr32L = S;
2152
- const B = (o, f, d) => o << d | f >>> 32 - d;
2153
- j.rotlSH = B;
2154
- const g = (o, f, d) => f << d | o >>> 32 - d;
2155
- j.rotlSL = g;
2156
- const I = (o, f, d) => f << d - 32 | o >>> 64 - d;
2157
- j.rotlBH = I;
2158
- const D = (o, f, d) => o << d - 32 | f >>> 64 - d;
2159
- j.rotlBL = D;
2160
- function R(o, f, d, L) {
2161
- const A = (f >>> 0) + (L >>> 0);
2162
- return { h: o + d + (A / 2 ** 32 | 0) | 0, l: A | 0 };
2163
- }
2164
- const T = (o, f, d) => (o >>> 0) + (f >>> 0) + (d >>> 0);
2165
- j.add3L = T;
2166
- const _ = (o, f, d, L) => f + d + L + (o / 2 ** 32 | 0) | 0;
2167
- j.add3H = _;
2168
- const C = (o, f, d, L) => (o >>> 0) + (f >>> 0) + (d >>> 0) + (L >>> 0);
2169
- j.add4L = C;
2170
- const p = (o, f, d, L, A) => f + d + L + A + (o / 2 ** 32 | 0) | 0;
2171
- j.add4H = p;
2172
- const w = (o, f, d, L, A) => (o >>> 0) + (f >>> 0) + (d >>> 0) + (L >>> 0) + (A >>> 0);
2173
- j.add5L = w;
2174
- const U = (o, f, d, L, A, m) => f + d + L + A + m + (o / 2 ** 32 | 0) | 0;
2175
- j.add5H = U;
2205
+ function s(h, u = !1) {
2206
+ return u ? { h: Number(h & t), l: Number(h >> e & t) } : { h: Number(h >> e & t) | 0, l: Number(h & t) | 0 };
2207
+ }
2208
+ function o(h, u = !1) {
2209
+ const l = h.length;
2210
+ let L = new Uint32Array(l), p = new Uint32Array(l);
2211
+ for (let U = 0; U < l; U++) {
2212
+ const { h: F, l: M } = s(h[U], u);
2213
+ [L[U], p[U]] = [F, M];
2214
+ }
2215
+ return [L, p];
2216
+ }
2217
+ const i = (h, u) => BigInt(h >>> 0) << e | BigInt(u >>> 0);
2218
+ T.toBig = i;
2219
+ const c = (h, u, l) => h >>> l;
2220
+ T.shrSH = c;
2221
+ const r = (h, u, l) => h << 32 - l | u >>> l;
2222
+ T.shrSL = r;
2223
+ const a = (h, u, l) => h >>> l | u << 32 - l;
2224
+ T.rotrSH = a;
2225
+ const d = (h, u, l) => h << 32 - l | u >>> l;
2226
+ T.rotrSL = d;
2227
+ const x = (h, u, l) => h << 64 - l | u >>> l - 32;
2228
+ T.rotrBH = x;
2229
+ const H = (h, u, l) => h >>> l - 32 | u << 64 - l;
2230
+ T.rotrBL = H;
2231
+ const f = (h, u) => u;
2232
+ T.rotr32H = f;
2233
+ const g = (h, u) => h;
2234
+ T.rotr32L = g;
2235
+ const w = (h, u, l) => h << l | u >>> 32 - l;
2236
+ T.rotlSH = w;
2237
+ const S = (h, u, l) => u << l | h >>> 32 - l;
2238
+ T.rotlSL = S;
2239
+ const I = (h, u, l) => u << l - 32 | h >>> 64 - l;
2240
+ T.rotlBH = I;
2241
+ const D = (h, u, l) => h << l - 32 | u >>> 64 - l;
2242
+ T.rotlBL = D;
2243
+ function W(h, u, l, L) {
2244
+ const p = (u >>> 0) + (L >>> 0);
2245
+ return { h: h + l + (p / 2 ** 32 | 0) | 0, l: p | 0 };
2246
+ }
2247
+ const v = (h, u, l) => (h >>> 0) + (u >>> 0) + (l >>> 0);
2248
+ T.add3L = v;
2249
+ const _ = (h, u, l, L) => u + l + L + (h / 2 ** 32 | 0) | 0;
2250
+ T.add3H = _;
2251
+ const C = (h, u, l, L) => (h >>> 0) + (u >>> 0) + (l >>> 0) + (L >>> 0);
2252
+ T.add4L = C;
2253
+ const A = (h, u, l, L, p) => u + l + L + p + (h / 2 ** 32 | 0) | 0;
2254
+ T.add4H = A;
2255
+ const B = (h, u, l, L, p) => (h >>> 0) + (u >>> 0) + (l >>> 0) + (L >>> 0) + (p >>> 0);
2256
+ T.add5L = B;
2257
+ const m = (h, u, l, L, p, U) => u + l + L + p + U + (h / 2 ** 32 | 0) | 0;
2258
+ T.add5H = m;
2176
2259
  const E = {
2177
- fromBig: n,
2178
- split: h,
2179
- toBig: c,
2180
- shrSH: i,
2260
+ fromBig: s,
2261
+ split: o,
2262
+ toBig: i,
2263
+ shrSH: c,
2181
2264
  shrSL: r,
2182
2265
  rotrSH: a,
2183
- rotrSL: b,
2266
+ rotrSL: d,
2184
2267
  rotrBH: x,
2185
2268
  rotrBL: H,
2186
- rotr32H: u,
2187
- rotr32L: S,
2188
- rotlSH: B,
2189
- rotlSL: g,
2269
+ rotr32H: f,
2270
+ rotr32L: g,
2271
+ rotlSH: w,
2272
+ rotlSL: S,
2190
2273
  rotlBH: I,
2191
2274
  rotlBL: D,
2192
- add: R,
2193
- add3L: T,
2275
+ add: W,
2276
+ add3L: v,
2194
2277
  add3H: _,
2195
2278
  add4L: C,
2196
- add4H: p,
2197
- add5H: U,
2198
- add5L: w
2279
+ add4H: A,
2280
+ add5H: m,
2281
+ add5L: B
2199
2282
  };
2200
- return j.default = E, j;
2283
+ return T.default = E, T;
2201
2284
  }
2202
- var me;
2203
- function gs() {
2204
- if (me) return X;
2205
- me = 1, Object.defineProperty(X, "__esModule", { value: !0 }), X.sha512_224 = X.sha512_256 = X.sha384 = X.sha512 = X.sha224 = X.sha256 = X.SHA512_256 = X.SHA512_224 = X.SHA384 = X.SHA512 = X.SHA224 = X.SHA256 = void 0;
2206
- const t = /* @__PURE__ */ ps(), e = /* @__PURE__ */ _s(), n = /* @__PURE__ */ a0(), h = /* @__PURE__ */ Uint32Array.from([
2285
+ var _e;
2286
+ function $e() {
2287
+ if (_e) return P;
2288
+ _e = 1, Object.defineProperty(P, "__esModule", { value: !0 }), P.sha512_224 = P.sha512_256 = P.sha384 = P.sha512 = P.sha224 = P.sha256 = P.SHA512_256 = P.SHA512_224 = P.SHA384 = P.SHA512 = P.SHA224 = P.SHA256 = void 0;
2289
+ const t = /* @__PURE__ */ us(), e = /* @__PURE__ */ ls(), s = /* @__PURE__ */ Rt(), o = /* @__PURE__ */ Uint32Array.from([
2207
2290
  1116352408,
2208
2291
  1899447441,
2209
2292
  3049323471,
@@ -2268,47 +2351,47 @@ function gs() {
2268
2351
  2756734187,
2269
2352
  3204031479,
2270
2353
  3329325298
2271
- ]), c = /* @__PURE__ */ new Uint32Array(64);
2272
- class i extends t.HashMD {
2354
+ ]), i = /* @__PURE__ */ new Uint32Array(64);
2355
+ class c extends t.HashMD {
2273
2356
  constructor(_ = 32) {
2274
2357
  super(64, _, 8, !1), this.A = t.SHA256_IV[0] | 0, this.B = t.SHA256_IV[1] | 0, this.C = t.SHA256_IV[2] | 0, this.D = t.SHA256_IV[3] | 0, this.E = t.SHA256_IV[4] | 0, this.F = t.SHA256_IV[5] | 0, this.G = t.SHA256_IV[6] | 0, this.H = t.SHA256_IV[7] | 0;
2275
2358
  }
2276
2359
  get() {
2277
- const { A: _, B: C, C: p, D: w, E: U, F: E, G: o, H: f } = this;
2278
- return [_, C, p, w, U, E, o, f];
2360
+ const { A: _, B: C, C: A, D: B, E: m, F: E, G: h, H: u } = this;
2361
+ return [_, C, A, B, m, E, h, u];
2279
2362
  }
2280
2363
  // prettier-ignore
2281
- set(_, C, p, w, U, E, o, f) {
2282
- this.A = _ | 0, this.B = C | 0, this.C = p | 0, this.D = w | 0, this.E = U | 0, this.F = E | 0, this.G = o | 0, this.H = f | 0;
2364
+ set(_, C, A, B, m, E, h, u) {
2365
+ this.A = _ | 0, this.B = C | 0, this.C = A | 0, this.D = B | 0, this.E = m | 0, this.F = E | 0, this.G = h | 0, this.H = u | 0;
2283
2366
  }
2284
2367
  process(_, C) {
2285
- for (let A = 0; A < 16; A++, C += 4)
2286
- c[A] = _.getUint32(C, !1);
2287
- for (let A = 16; A < 64; A++) {
2288
- const m = c[A - 15], F = c[A - 2], O = (0, n.rotr)(m, 7) ^ (0, n.rotr)(m, 18) ^ m >>> 3, v = (0, n.rotr)(F, 17) ^ (0, n.rotr)(F, 19) ^ F >>> 10;
2289
- c[A] = v + c[A - 7] + O + c[A - 16] | 0;
2368
+ for (let p = 0; p < 16; p++, C += 4)
2369
+ i[p] = _.getUint32(C, !1);
2370
+ for (let p = 16; p < 64; p++) {
2371
+ const U = i[p - 15], F = i[p - 2], M = (0, s.rotr)(U, 7) ^ (0, s.rotr)(U, 18) ^ U >>> 3, G = (0, s.rotr)(F, 17) ^ (0, s.rotr)(F, 19) ^ F >>> 10;
2372
+ i[p] = G + i[p - 7] + M + i[p - 16] | 0;
2290
2373
  }
2291
- let { A: p, B: w, C: U, D: E, E: o, F: f, G: d, H: L } = this;
2292
- for (let A = 0; A < 64; A++) {
2293
- const m = (0, n.rotr)(o, 6) ^ (0, n.rotr)(o, 11) ^ (0, n.rotr)(o, 25), F = L + m + (0, t.Chi)(o, f, d) + h[A] + c[A] | 0, v = ((0, n.rotr)(p, 2) ^ (0, n.rotr)(p, 13) ^ (0, n.rotr)(p, 22)) + (0, t.Maj)(p, w, U) | 0;
2294
- L = d, d = f, f = o, o = E + F | 0, E = U, U = w, w = p, p = F + v | 0;
2374
+ let { A, B, C: m, D: E, E: h, F: u, G: l, H: L } = this;
2375
+ for (let p = 0; p < 64; p++) {
2376
+ const U = (0, s.rotr)(h, 6) ^ (0, s.rotr)(h, 11) ^ (0, s.rotr)(h, 25), F = L + U + (0, t.Chi)(h, u, l) + o[p] + i[p] | 0, G = ((0, s.rotr)(A, 2) ^ (0, s.rotr)(A, 13) ^ (0, s.rotr)(A, 22)) + (0, t.Maj)(A, B, m) | 0;
2377
+ L = l, l = u, u = h, h = E + F | 0, E = m, m = B, B = A, A = F + G | 0;
2295
2378
  }
2296
- p = p + this.A | 0, w = w + this.B | 0, U = U + this.C | 0, E = E + this.D | 0, o = o + this.E | 0, f = f + this.F | 0, d = d + this.G | 0, L = L + this.H | 0, this.set(p, w, U, E, o, f, d, L);
2379
+ A = A + this.A | 0, B = B + this.B | 0, m = m + this.C | 0, E = E + this.D | 0, h = h + this.E | 0, u = u + this.F | 0, l = l + this.G | 0, L = L + this.H | 0, this.set(A, B, m, E, h, u, l, L);
2297
2380
  }
2298
2381
  roundClean() {
2299
- (0, n.clean)(c);
2382
+ (0, s.clean)(i);
2300
2383
  }
2301
2384
  destroy() {
2302
- this.set(0, 0, 0, 0, 0, 0, 0, 0), (0, n.clean)(this.buffer);
2385
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), (0, s.clean)(this.buffer);
2303
2386
  }
2304
2387
  }
2305
- X.SHA256 = i;
2306
- class r extends i {
2388
+ P.SHA256 = c;
2389
+ class r extends c {
2307
2390
  constructor() {
2308
2391
  super(28), this.A = t.SHA224_IV[0] | 0, this.B = t.SHA224_IV[1] | 0, this.C = t.SHA224_IV[2] | 0, this.D = t.SHA224_IV[3] | 0, this.E = t.SHA224_IV[4] | 0, this.F = t.SHA224_IV[5] | 0, this.G = t.SHA224_IV[6] | 0, this.H = t.SHA224_IV[7] | 0;
2309
2392
  }
2310
2393
  }
2311
- X.SHA224 = r;
2394
+ P.SHA224 = r;
2312
2395
  const a = e.split([
2313
2396
  "0x428a2f98d728ae22",
2314
2397
  "0x7137449123ef65cd",
@@ -2390,51 +2473,51 @@ function gs() {
2390
2473
  "0x597f299cfc657e2a",
2391
2474
  "0x5fcb6fab3ad6faec",
2392
2475
  "0x6c44198c4a475817"
2393
- ].map((T) => BigInt(T))), b = a[0], x = a[1], H = /* @__PURE__ */ new Uint32Array(80), u = /* @__PURE__ */ new Uint32Array(80);
2394
- class S extends t.HashMD {
2476
+ ].map((v) => BigInt(v))), d = a[0], x = a[1], H = /* @__PURE__ */ new Uint32Array(80), f = /* @__PURE__ */ new Uint32Array(80);
2477
+ class g extends t.HashMD {
2395
2478
  constructor(_ = 64) {
2396
2479
  super(128, _, 16, !1), this.Ah = t.SHA512_IV[0] | 0, this.Al = t.SHA512_IV[1] | 0, this.Bh = t.SHA512_IV[2] | 0, this.Bl = t.SHA512_IV[3] | 0, this.Ch = t.SHA512_IV[4] | 0, this.Cl = t.SHA512_IV[5] | 0, this.Dh = t.SHA512_IV[6] | 0, this.Dl = t.SHA512_IV[7] | 0, this.Eh = t.SHA512_IV[8] | 0, this.El = t.SHA512_IV[9] | 0, this.Fh = t.SHA512_IV[10] | 0, this.Fl = t.SHA512_IV[11] | 0, this.Gh = t.SHA512_IV[12] | 0, this.Gl = t.SHA512_IV[13] | 0, this.Hh = t.SHA512_IV[14] | 0, this.Hl = t.SHA512_IV[15] | 0;
2397
2480
  }
2398
2481
  // prettier-ignore
2399
2482
  get() {
2400
- const { Ah: _, Al: C, Bh: p, Bl: w, Ch: U, Cl: E, Dh: o, Dl: f, Eh: d, El: L, Fh: A, Fl: m, Gh: F, Gl: O, Hh: v, Hl: q } = this;
2401
- return [_, C, p, w, U, E, o, f, d, L, A, m, F, O, v, q];
2483
+ const { Ah: _, Al: C, Bh: A, Bl: B, Ch: m, Cl: E, Dh: h, Dl: u, Eh: l, El: L, Fh: p, Fl: U, Gh: F, Gl: M, Hh: G, Hl: q } = this;
2484
+ return [_, C, A, B, m, E, h, u, l, L, p, U, F, M, G, q];
2402
2485
  }
2403
2486
  // prettier-ignore
2404
- set(_, C, p, w, U, E, o, f, d, L, A, m, F, O, v, q) {
2405
- this.Ah = _ | 0, this.Al = C | 0, this.Bh = p | 0, this.Bl = w | 0, this.Ch = U | 0, this.Cl = E | 0, this.Dh = o | 0, this.Dl = f | 0, this.Eh = d | 0, this.El = L | 0, this.Fh = A | 0, this.Fl = m | 0, this.Gh = F | 0, this.Gl = O | 0, this.Hh = v | 0, this.Hl = q | 0;
2487
+ set(_, C, A, B, m, E, h, u, l, L, p, U, F, M, G, q) {
2488
+ this.Ah = _ | 0, this.Al = C | 0, this.Bh = A | 0, this.Bl = B | 0, this.Ch = m | 0, this.Cl = E | 0, this.Dh = h | 0, this.Dl = u | 0, this.Eh = l | 0, this.El = L | 0, this.Fh = p | 0, this.Fl = U | 0, this.Gh = F | 0, this.Gl = M | 0, this.Hh = G | 0, this.Hl = q | 0;
2406
2489
  }
2407
2490
  process(_, C) {
2408
2491
  for (let y = 0; y < 16; y++, C += 4)
2409
- H[y] = _.getUint32(C), u[y] = _.getUint32(C += 4);
2492
+ H[y] = _.getUint32(C), f[y] = _.getUint32(C += 4);
2410
2493
  for (let y = 16; y < 80; y++) {
2411
- const V = H[y - 15] | 0, k = u[y - 15] | 0, M = e.rotrSH(V, k, 1) ^ e.rotrSH(V, k, 8) ^ e.shrSH(V, k, 7), z = e.rotrSL(V, k, 1) ^ e.rotrSL(V, k, 8) ^ e.shrSL(V, k, 7), P = H[y - 2] | 0, K = u[y - 2] | 0, it = e.rotrSH(P, K, 19) ^ e.rotrBH(P, K, 61) ^ e.shrSH(P, K, 6), ot = e.rotrSL(P, K, 19) ^ e.rotrBL(P, K, 61) ^ e.shrSL(P, K, 6), ct = e.add4L(z, ot, u[y - 7], u[y - 16]), at = e.add4H(ct, M, it, H[y - 7], H[y - 16]);
2412
- H[y] = at | 0, u[y] = ct | 0;
2494
+ const V = H[y - 15] | 0, k = f[y - 15] | 0, j = e.rotrSH(V, k, 1) ^ e.rotrSH(V, k, 8) ^ e.shrSH(V, k, 7), et = e.rotrSL(V, k, 1) ^ e.rotrSL(V, k, 8) ^ e.shrSL(V, k, 7), K = H[y - 2] | 0, N = f[y - 2] | 0, ot = e.rotrSH(K, N, 19) ^ e.rotrBH(K, N, 61) ^ e.shrSH(K, N, 6), St = e.rotrSL(K, N, 19) ^ e.rotrBL(K, N, 61) ^ e.shrSL(K, N, 6), at = e.add4L(et, St, f[y - 7], f[y - 16]), wt = e.add4H(at, j, ot, H[y - 7], H[y - 16]);
2495
+ H[y] = wt | 0, f[y] = at | 0;
2413
2496
  }
2414
- let { Ah: p, Al: w, Bh: U, Bl: E, Ch: o, Cl: f, Dh: d, Dl: L, Eh: A, El: m, Fh: F, Fl: O, Gh: v, Gl: q, Hh: s, Hl: l } = this;
2497
+ let { Ah: A, Al: B, Bh: m, Bl: E, Ch: h, Cl: u, Dh: l, Dl: L, Eh: p, El: U, Fh: F, Fl: M, Gh: G, Gl: q, Hh: n, Hl: b } = this;
2415
2498
  for (let y = 0; y < 80; y++) {
2416
- const V = e.rotrSH(A, m, 14) ^ e.rotrSH(A, m, 18) ^ e.rotrBH(A, m, 41), k = e.rotrSL(A, m, 14) ^ e.rotrSL(A, m, 18) ^ e.rotrBL(A, m, 41), M = A & F ^ ~A & v, z = m & O ^ ~m & q, P = e.add5L(l, k, z, x[y], u[y]), K = e.add5H(P, s, V, M, b[y], H[y]), it = P | 0, ot = e.rotrSH(p, w, 28) ^ e.rotrBH(p, w, 34) ^ e.rotrBH(p, w, 39), ct = e.rotrSL(p, w, 28) ^ e.rotrBL(p, w, 34) ^ e.rotrBL(p, w, 39), at = p & U ^ p & o ^ U & o, Dt = w & E ^ w & f ^ E & f;
2417
- s = v | 0, l = q | 0, v = F | 0, q = O | 0, F = A | 0, O = m | 0, { h: A, l: m } = e.add(d | 0, L | 0, K | 0, it | 0), d = o | 0, L = f | 0, o = U | 0, f = E | 0, U = p | 0, E = w | 0;
2418
- const At = e.add3L(it, ct, Dt);
2419
- p = e.add3H(At, K, ot, at), w = At | 0;
2499
+ const V = e.rotrSH(p, U, 14) ^ e.rotrSH(p, U, 18) ^ e.rotrBH(p, U, 41), k = e.rotrSL(p, U, 14) ^ e.rotrSL(p, U, 18) ^ e.rotrBL(p, U, 41), j = p & F ^ ~p & G, et = U & M ^ ~U & q, K = e.add5L(b, k, et, x[y], f[y]), N = e.add5H(K, n, V, j, d[y], H[y]), ot = K | 0, St = e.rotrSH(A, B, 28) ^ e.rotrBH(A, B, 34) ^ e.rotrBH(A, B, 39), at = e.rotrSL(A, B, 28) ^ e.rotrBL(A, B, 34) ^ e.rotrBL(A, B, 39), wt = A & m ^ A & h ^ m & h, Pt = B & E ^ B & u ^ E & u;
2500
+ n = G | 0, b = q | 0, G = F | 0, q = M | 0, F = p | 0, M = U | 0, { h: p, l: U } = e.add(l | 0, L | 0, N | 0, ot | 0), l = h | 0, L = u | 0, h = m | 0, u = E | 0, m = A | 0, E = B | 0;
2501
+ const Ut = e.add3L(ot, at, Pt);
2502
+ A = e.add3H(Ut, N, St, wt), B = Ut | 0;
2420
2503
  }
2421
- ({ h: p, l: w } = e.add(this.Ah | 0, this.Al | 0, p | 0, w | 0)), { h: U, l: E } = e.add(this.Bh | 0, this.Bl | 0, U | 0, E | 0), { h: o, l: f } = e.add(this.Ch | 0, this.Cl | 0, o | 0, f | 0), { h: d, l: L } = e.add(this.Dh | 0, this.Dl | 0, d | 0, L | 0), { h: A, l: m } = e.add(this.Eh | 0, this.El | 0, A | 0, m | 0), { h: F, l: O } = e.add(this.Fh | 0, this.Fl | 0, F | 0, O | 0), { h: v, l: q } = e.add(this.Gh | 0, this.Gl | 0, v | 0, q | 0), { h: s, l } = e.add(this.Hh | 0, this.Hl | 0, s | 0, l | 0), this.set(p, w, U, E, o, f, d, L, A, m, F, O, v, q, s, l);
2504
+ ({ h: A, l: B } = e.add(this.Ah | 0, this.Al | 0, A | 0, B | 0)), { h: m, l: E } = e.add(this.Bh | 0, this.Bl | 0, m | 0, E | 0), { h, l: u } = e.add(this.Ch | 0, this.Cl | 0, h | 0, u | 0), { h: l, l: L } = e.add(this.Dh | 0, this.Dl | 0, l | 0, L | 0), { h: p, l: U } = e.add(this.Eh | 0, this.El | 0, p | 0, U | 0), { h: F, l: M } = e.add(this.Fh | 0, this.Fl | 0, F | 0, M | 0), { h: G, l: q } = e.add(this.Gh | 0, this.Gl | 0, G | 0, q | 0), { h: n, l: b } = e.add(this.Hh | 0, this.Hl | 0, n | 0, b | 0), this.set(A, B, m, E, h, u, l, L, p, U, F, M, G, q, n, b);
2422
2505
  }
2423
2506
  roundClean() {
2424
- (0, n.clean)(H, u);
2507
+ (0, s.clean)(H, f);
2425
2508
  }
2426
2509
  destroy() {
2427
- (0, n.clean)(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
2510
+ (0, s.clean)(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
2428
2511
  }
2429
2512
  }
2430
- X.SHA512 = S;
2431
- class B extends S {
2513
+ P.SHA512 = g;
2514
+ class w extends g {
2432
2515
  constructor() {
2433
2516
  super(48), this.Ah = t.SHA384_IV[0] | 0, this.Al = t.SHA384_IV[1] | 0, this.Bh = t.SHA384_IV[2] | 0, this.Bl = t.SHA384_IV[3] | 0, this.Ch = t.SHA384_IV[4] | 0, this.Cl = t.SHA384_IV[5] | 0, this.Dh = t.SHA384_IV[6] | 0, this.Dl = t.SHA384_IV[7] | 0, this.Eh = t.SHA384_IV[8] | 0, this.El = t.SHA384_IV[9] | 0, this.Fh = t.SHA384_IV[10] | 0, this.Fl = t.SHA384_IV[11] | 0, this.Gh = t.SHA384_IV[12] | 0, this.Gl = t.SHA384_IV[13] | 0, this.Hh = t.SHA384_IV[14] | 0, this.Hl = t.SHA384_IV[15] | 0;
2434
2517
  }
2435
2518
  }
2436
- X.SHA384 = B;
2437
- const g = /* @__PURE__ */ Uint32Array.from([
2519
+ P.SHA384 = w;
2520
+ const S = /* @__PURE__ */ Uint32Array.from([
2438
2521
  2352822216,
2439
2522
  424955298,
2440
2523
  1944164710,
@@ -2469,963 +2552,151 @@ function gs() {
2469
2552
  246885852,
2470
2553
  2177182882
2471
2554
  ]);
2472
- class D extends S {
2555
+ class D extends g {
2473
2556
  constructor() {
2474
- super(28), this.Ah = g[0] | 0, this.Al = g[1] | 0, this.Bh = g[2] | 0, this.Bl = g[3] | 0, this.Ch = g[4] | 0, this.Cl = g[5] | 0, this.Dh = g[6] | 0, this.Dl = g[7] | 0, this.Eh = g[8] | 0, this.El = g[9] | 0, this.Fh = g[10] | 0, this.Fl = g[11] | 0, this.Gh = g[12] | 0, this.Gl = g[13] | 0, this.Hh = g[14] | 0, this.Hl = g[15] | 0;
2557
+ super(28), this.Ah = S[0] | 0, this.Al = S[1] | 0, this.Bh = S[2] | 0, this.Bl = S[3] | 0, this.Ch = S[4] | 0, this.Cl = S[5] | 0, this.Dh = S[6] | 0, this.Dl = S[7] | 0, this.Eh = S[8] | 0, this.El = S[9] | 0, this.Fh = S[10] | 0, this.Fl = S[11] | 0, this.Gh = S[12] | 0, this.Gl = S[13] | 0, this.Hh = S[14] | 0, this.Hl = S[15] | 0;
2475
2558
  }
2476
2559
  }
2477
- X.SHA512_224 = D;
2478
- class R extends S {
2560
+ P.SHA512_224 = D;
2561
+ class W extends g {
2479
2562
  constructor() {
2480
2563
  super(32), this.Ah = I[0] | 0, this.Al = I[1] | 0, this.Bh = I[2] | 0, this.Bl = I[3] | 0, this.Ch = I[4] | 0, this.Cl = I[5] | 0, this.Dh = I[6] | 0, this.Dl = I[7] | 0, this.Eh = I[8] | 0, this.El = I[9] | 0, this.Fh = I[10] | 0, this.Fl = I[11] | 0, this.Gh = I[12] | 0, this.Gl = I[13] | 0, this.Hh = I[14] | 0, this.Hl = I[15] | 0;
2481
2564
  }
2482
2565
  }
2483
- return X.SHA512_256 = R, X.sha256 = (0, n.createHasher)(() => new i()), X.sha224 = (0, n.createHasher)(() => new r()), X.sha512 = (0, n.createHasher)(() => new S()), X.sha384 = (0, n.createHasher)(() => new B()), X.sha512_256 = (0, n.createHasher)(() => new R()), X.sha512_224 = (0, n.createHasher)(() => new D()), X;
2484
- }
2485
- var Ve;
2486
- function Js() {
2487
- if (Ve) return ht;
2488
- Ve = 1, Object.defineProperty(ht, "__esModule", { value: !0 }), ht.sha224 = ht.SHA224 = ht.sha256 = ht.SHA256 = void 0;
2489
- const t = /* @__PURE__ */ gs();
2490
- return ht.SHA256 = t.SHA256, ht.sha256 = t.sha256, ht.SHA224 = t.SHA224, ht.sha224 = t.sha224, ht;
2491
- }
2492
- const Ss = BigInt(0), Ot = BigInt(1), ws = BigInt(2), Is = BigInt(7), Bs = BigInt(256), Ls = BigInt(113), h0 = [], f0 = [], d0 = [];
2493
- for (let t = 0, e = Ot, n = 1, h = 0; t < 24; t++) {
2494
- [n, h] = [h, (2 * n + 3 * h) % 5], h0.push(2 * (5 * h + n)), f0.push((t + 1) * (t + 2) / 2 % 64);
2495
- let c = Ss;
2496
- for (let i = 0; i < 7; i++)
2497
- e = (e << Ot ^ (e >> Is) * Ls) % Bs, e & ws && (c ^= Ot << (Ot << BigInt(i)) - Ot);
2498
- d0.push(c);
2566
+ return P.SHA512_256 = W, P.sha256 = (0, s.createHasher)(() => new c()), P.sha224 = (0, s.createHasher)(() => new r()), P.sha512 = (0, s.createHasher)(() => new g()), P.sha384 = (0, s.createHasher)(() => new w()), P.sha512_256 = (0, s.createHasher)(() => new W()), P.sha512_224 = (0, s.createHasher)(() => new D()), P;
2499
2567
  }
2500
- const u0 = $e(d0, !0), ms = u0[0], Vs = u0[1], Ue = (t, e, n) => n > 32 ? Q0(t, e, n) : J0(t, e, n), Ee = (t, e, n) => n > 32 ? Y0(t, e, n) : z0(t, e, n);
2501
- function Us(t, e = 24) {
2502
- const n = new Uint32Array(10);
2503
- for (let h = 24 - e; h < 24; h++) {
2504
- for (let r = 0; r < 10; r++)
2505
- n[r] = t[r] ^ t[r + 10] ^ t[r + 20] ^ t[r + 30] ^ t[r + 40];
2506
- for (let r = 0; r < 10; r += 2) {
2507
- const a = (r + 8) % 10, b = (r + 2) % 10, x = n[b], H = n[b + 1], u = Ue(x, H, 1) ^ n[a], S = Ee(x, H, 1) ^ n[a + 1];
2508
- for (let B = 0; B < 50; B += 10)
2509
- t[r + B] ^= u, t[r + B + 1] ^= S;
2510
- }
2511
- let c = t[2], i = t[3];
2512
- for (let r = 0; r < 24; r++) {
2513
- const a = f0[r], b = Ue(c, i, a), x = Ee(c, i, a), H = h0[r];
2514
- c = t[H], i = t[H + 1], t[H] = b, t[H + 1] = x;
2515
- }
2516
- for (let r = 0; r < 50; r += 10) {
2517
- for (let a = 0; a < 10; a++)
2518
- n[a] = t[r + a];
2519
- for (let a = 0; a < 10; a++)
2520
- t[r + a] ^= ~n[(a + 2) % 10] & n[(a + 4) % 10];
2568
+ var ge;
2569
+ function Us() {
2570
+ if (ge) return nt;
2571
+ ge = 1, Object.defineProperty(nt, "__esModule", { value: !0 }), nt.sha224 = nt.SHA224 = nt.sha256 = nt.SHA256 = void 0;
2572
+ const t = /* @__PURE__ */ $e();
2573
+ return nt.SHA256 = t.SHA256, nt.sha256 = t.sha256, nt.SHA224 = t.SHA224, nt.sha224 = t.sha224, nt;
2574
+ }
2575
+ var X = {}, Se;
2576
+ function Es() {
2577
+ if (Se) return X;
2578
+ Se = 1, Object.defineProperty(X, "__esModule", { value: !0 }), X.sha512_256 = X.SHA512_256 = X.sha512_224 = X.SHA512_224 = X.sha384 = X.SHA384 = X.sha512 = X.SHA512 = void 0;
2579
+ const t = /* @__PURE__ */ $e();
2580
+ return X.SHA512 = t.SHA512, X.sha512 = t.sha512, X.SHA384 = t.SHA384, X.sha384 = t.sha384, X.SHA512_224 = t.SHA512_224, X.sha512_224 = t.sha512_224, X.SHA512_256 = t.SHA512_256, X.sha512_256 = t.sha512_256, X;
2581
+ }
2582
+ var Dt = {}, Qt = {}, we;
2583
+ function bs() {
2584
+ return we || (we = 1, (function(t) {
2585
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.hmac = t.HMAC = void 0;
2586
+ const e = /* @__PURE__ */ Rt();
2587
+ class s extends e.Hash {
2588
+ constructor(c, r) {
2589
+ super(), this.finished = !1, this.destroyed = !1, (0, e.ahash)(c);
2590
+ const a = (0, e.toBytes)(r);
2591
+ if (this.iHash = c.create(), typeof this.iHash.update != "function")
2592
+ throw new Error("Expected instance of class which extends utils.Hash");
2593
+ this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
2594
+ const d = this.blockLen, x = new Uint8Array(d);
2595
+ x.set(a.length > d ? c.create().update(a).digest() : a);
2596
+ for (let H = 0; H < x.length; H++)
2597
+ x[H] ^= 54;
2598
+ this.iHash.update(x), this.oHash = c.create();
2599
+ for (let H = 0; H < x.length; H++)
2600
+ x[H] ^= 106;
2601
+ this.oHash.update(x), (0, e.clean)(x);
2602
+ }
2603
+ update(c) {
2604
+ return (0, e.aexists)(this), this.iHash.update(c), this;
2605
+ }
2606
+ digestInto(c) {
2607
+ (0, e.aexists)(this), (0, e.abytes)(c, this.outputLen), this.finished = !0, this.iHash.digestInto(c), this.oHash.update(c), this.oHash.digestInto(c), this.destroy();
2608
+ }
2609
+ digest() {
2610
+ const c = new Uint8Array(this.oHash.outputLen);
2611
+ return this.digestInto(c), c;
2612
+ }
2613
+ _cloneInto(c) {
2614
+ c || (c = Object.create(Object.getPrototypeOf(this), {}));
2615
+ const { oHash: r, iHash: a, finished: d, destroyed: x, blockLen: H, outputLen: f } = this;
2616
+ return c = c, c.finished = d, c.destroyed = x, c.blockLen = H, c.outputLen = f, c.oHash = r._cloneInto(c.oHash), c.iHash = a._cloneInto(c.iHash), c;
2617
+ }
2618
+ clone() {
2619
+ return this._cloneInto();
2620
+ }
2621
+ destroy() {
2622
+ this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
2623
+ }
2521
2624
  }
2522
- t[0] ^= ms[h], t[1] ^= Vs[h];
2523
- }
2524
- rt(n);
2625
+ t.HMAC = s;
2626
+ const o = (i, c, r) => new s(i, c).update(r).digest();
2627
+ t.hmac = o, t.hmac.create = (i, c) => new s(i, c);
2628
+ })(Qt)), Qt;
2525
2629
  }
2526
- class ae {
2527
- state;
2528
- pos = 0;
2529
- posOut = 0;
2530
- finished = !1;
2531
- state32;
2532
- destroyed = !1;
2533
- blockLen;
2534
- suffix;
2535
- outputLen;
2536
- enableXOF = !1;
2537
- rounds;
2538
- // NOTE: we accept arguments in bytes instead of bits here.
2539
- constructor(e, n, h, c = !1, i = 24) {
2540
- if (this.blockLen = e, this.suffix = n, this.outputLen = h, this.enableXOF = c, this.rounds = i, Vt(h, "outputLen"), !(0 < e && e < 200))
2541
- throw new Error("only keccak-f1600 function is supported");
2542
- this.state = new Uint8Array(200), this.state32 = V0(this.state);
2543
- }
2544
- clone() {
2545
- return this._cloneInto();
2546
- }
2547
- keccak() {
2548
- fe(this.state32), Us(this.state32, this.rounds), fe(this.state32), this.posOut = 0, this.pos = 0;
2549
- }
2550
- update(e) {
2551
- kt(this), Ht(e);
2552
- const { blockLen: n, state: h } = this, c = e.length;
2553
- for (let i = 0; i < c; ) {
2554
- const r = Math.min(n - this.pos, c - i);
2555
- for (let a = 0; a < r; a++)
2556
- h[this.pos++] ^= e[i++];
2557
- this.pos === n && this.keccak();
2558
- }
2559
- return this;
2560
- }
2561
- finish() {
2562
- if (this.finished)
2563
- return;
2564
- this.finished = !0;
2565
- const { state: e, suffix: n, pos: h, blockLen: c } = this;
2566
- e[h] ^= n, (n & 128) !== 0 && h === c - 1 && this.keccak(), e[c - 1] ^= 128, this.keccak();
2567
- }
2568
- writeInto(e) {
2569
- kt(this, !1), Ht(e), this.finish();
2570
- const n = this.state, { blockLen: h } = this;
2571
- for (let c = 0, i = e.length; c < i; ) {
2572
- this.posOut >= h && this.keccak();
2573
- const r = Math.min(h - this.posOut, i - c);
2574
- e.set(n.subarray(this.posOut, this.posOut + r), c), this.posOut += r, c += r;
2575
- }
2576
- return e;
2577
- }
2578
- xofInto(e) {
2579
- if (!this.enableXOF)
2580
- throw new Error("XOF is not possible for this instance");
2581
- return this.writeInto(e);
2582
- }
2583
- xof(e) {
2584
- return Vt(e), this.xofInto(new Uint8Array(e));
2585
- }
2586
- digestInto(e) {
2587
- if (Re(e, this), this.finished)
2588
- throw new Error("digest() was already called");
2589
- return this.writeInto(e), this.destroy(), e;
2590
- }
2591
- digest() {
2592
- return this.digestInto(new Uint8Array(this.outputLen));
2593
- }
2594
- destroy() {
2595
- this.destroyed = !0, rt(this.state);
2596
- }
2597
- _cloneInto(e) {
2598
- const { blockLen: n, suffix: h, outputLen: c, rounds: i, enableXOF: r } = this;
2599
- return e ||= new ae(n, h, c, r, i), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = i, e.suffix = h, e.outputLen = c, e.enableXOF = r, e.destroyed = this.destroyed, e;
2600
- }
2601
- }
2602
- const l0 = (t, e, n, h = {}) => lt((c = {}) => new ae(e, t, c.dkLen === void 0 ? n : c.dkLen, !0), h), zs = /* @__PURE__ */ l0(31, 168, 16, /* @__PURE__ */ mt(11)), Qs = /* @__PURE__ */ l0(31, 136, 32, /* @__PURE__ */ mt(12));
2603
- function Es(t, e, n, h) {
2604
- We(t);
2605
- const c = F0({ dkLen: 32, asyncTick: 10 }, h), { c: i, dkLen: r, asyncTick: a } = c;
2606
- if (Vt(i, "c"), Vt(r, "dkLen"), Vt(a, "asyncTick"), i < 1)
2607
- throw new Error("iterations (c) must be >= 1");
2608
- const b = ue(e, "password"), x = ue(n, "salt"), H = new Uint8Array(r), u = oe.create(t, b), S = u._cloneInto().update(x);
2609
- return { c: i, dkLen: r, asyncTick: a, DK: H, PRF: u, PRFSalt: S };
2610
- }
2611
- function Cs(t, e, n, h, c) {
2612
- return t.destroy(), e.destroy(), h && h.destroy(), rt(c), n;
2613
- }
2614
- function Ys(t, e, n, h) {
2615
- const { c, dkLen: i, DK: r, PRF: a, PRFSalt: b } = Es(t, e, n, h);
2616
- let x;
2617
- const H = new Uint8Array(4), u = Kt(H), S = new Uint8Array(a.outputLen);
2618
- for (let B = 1, g = 0; g < i; B++, g += a.outputLen) {
2619
- const I = r.subarray(g, g + a.outputLen);
2620
- u.setInt32(0, B, !1), (x = b._cloneInto(x)).update(H).digestInto(S), I.set(S.subarray(0, I.length));
2621
- for (let D = 1; D < c; D++) {
2622
- a._cloneInto(x).update(S).digestInto(S);
2623
- for (let R = 0; R < I.length; R++)
2624
- I[R] ^= S[R];
2625
- }
2626
- }
2627
- return Cs(a, b, r, x, S);
2628
- }
2629
- var ft = {}, J = {}, nt = {}, te = {}, vt = {}, Ce;
2630
- function ks() {
2631
- return Ce || (Ce = 1, Object.defineProperty(vt, "__esModule", { value: !0 }), vt.crypto = void 0, vt.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), vt;
2632
- }
2633
- var ke;
2634
- function Jt() {
2635
- return ke || (ke = 1, (function(t) {
2636
- Object.defineProperty(t, "__esModule", { value: !0 }), t.wrapXOFConstructorWithOpts = t.wrapConstructorWithOpts = t.wrapConstructor = t.Hash = t.nextTick = t.swap32IfBE = t.byteSwapIfBE = t.swap8IfBE = t.isLE = void 0, t.isBytes = n, t.anumber = h, t.abytes = c, t.ahash = i, t.aexists = r, t.aoutput = a, t.u8 = b, t.u32 = x, t.clean = H, t.createView = u, t.rotr = S, t.rotl = B, t.byteSwap = g, t.byteSwap32 = I, t.bytesToHex = T, t.hexToBytes = p, t.asyncLoop = U, t.utf8ToBytes = E, t.bytesToUtf8 = o, t.toBytes = f, t.kdfInputToBytes = d, t.concatBytes = L, t.checkOpts = A, t.createHasher = F, t.createOptHasher = O, t.createXOFer = v, t.randomBytes = q;
2637
- const e = /* @__PURE__ */ ks();
2638
- function n(s) {
2639
- return s instanceof Uint8Array || ArrayBuffer.isView(s) && s.constructor.name === "Uint8Array";
2640
- }
2641
- function h(s) {
2642
- if (!Number.isSafeInteger(s) || s < 0)
2643
- throw new Error("positive integer expected, got " + s);
2644
- }
2645
- function c(s, ...l) {
2646
- if (!n(s))
2647
- throw new Error("Uint8Array expected");
2648
- if (l.length > 0 && !l.includes(s.length))
2649
- throw new Error("Uint8Array expected of length " + l + ", got length=" + s.length);
2650
- }
2651
- function i(s) {
2652
- if (typeof s != "function" || typeof s.create != "function")
2653
- throw new Error("Hash should be wrapped by utils.createHasher");
2654
- h(s.outputLen), h(s.blockLen);
2655
- }
2656
- function r(s, l = !0) {
2657
- if (s.destroyed)
2658
- throw new Error("Hash instance has been destroyed");
2659
- if (l && s.finished)
2660
- throw new Error("Hash#digest() has already been called");
2661
- }
2662
- function a(s, l) {
2663
- c(s);
2664
- const y = l.outputLen;
2665
- if (s.length < y)
2666
- throw new Error("digestInto() expects output buffer of length at least " + y);
2667
- }
2668
- function b(s) {
2669
- return new Uint8Array(s.buffer, s.byteOffset, s.byteLength);
2670
- }
2671
- function x(s) {
2672
- return new Uint32Array(s.buffer, s.byteOffset, Math.floor(s.byteLength / 4));
2673
- }
2674
- function H(...s) {
2675
- for (let l = 0; l < s.length; l++)
2676
- s[l].fill(0);
2677
- }
2678
- function u(s) {
2679
- return new DataView(s.buffer, s.byteOffset, s.byteLength);
2680
- }
2681
- function S(s, l) {
2682
- return s << 32 - l | s >>> l;
2683
- }
2684
- function B(s, l) {
2685
- return s << l | s >>> 32 - l >>> 0;
2686
- }
2687
- t.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
2688
- function g(s) {
2689
- return s << 24 & 4278190080 | s << 8 & 16711680 | s >>> 8 & 65280 | s >>> 24 & 255;
2690
- }
2691
- t.swap8IfBE = t.isLE ? (s) => s : (s) => g(s), t.byteSwapIfBE = t.swap8IfBE;
2692
- function I(s) {
2693
- for (let l = 0; l < s.length; l++)
2694
- s[l] = g(s[l]);
2695
- return s;
2696
- }
2697
- t.swap32IfBE = t.isLE ? (s) => s : I;
2698
- const D = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", R = /* @__PURE__ */ Array.from({ length: 256 }, (s, l) => l.toString(16).padStart(2, "0"));
2699
- function T(s) {
2700
- if (c(s), D)
2701
- return s.toHex();
2702
- let l = "";
2703
- for (let y = 0; y < s.length; y++)
2704
- l += R[s[y]];
2705
- return l;
2706
- }
2707
- const _ = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
2708
- function C(s) {
2709
- if (s >= _._0 && s <= _._9)
2710
- return s - _._0;
2711
- if (s >= _.A && s <= _.F)
2712
- return s - (_.A - 10);
2713
- if (s >= _.a && s <= _.f)
2714
- return s - (_.a - 10);
2715
- }
2716
- function p(s) {
2717
- if (typeof s != "string")
2718
- throw new Error("hex string expected, got " + typeof s);
2719
- if (D)
2720
- return Uint8Array.fromHex(s);
2721
- const l = s.length, y = l / 2;
2722
- if (l % 2)
2723
- throw new Error("hex string expected, got unpadded hex of length " + l);
2724
- const V = new Uint8Array(y);
2725
- for (let k = 0, M = 0; k < y; k++, M += 2) {
2726
- const z = C(s.charCodeAt(M)), P = C(s.charCodeAt(M + 1));
2727
- if (z === void 0 || P === void 0) {
2728
- const K = s[M] + s[M + 1];
2729
- throw new Error('hex string expected, got non-hex character "' + K + '" at index ' + M);
2730
- }
2731
- V[k] = z * 16 + P;
2732
- }
2733
- return V;
2734
- }
2735
- const w = async () => {
2736
- };
2737
- t.nextTick = w;
2738
- async function U(s, l, y) {
2739
- let V = Date.now();
2740
- for (let k = 0; k < s; k++) {
2741
- y(k);
2742
- const M = Date.now() - V;
2743
- M >= 0 && M < l || (await (0, t.nextTick)(), V += M);
2744
- }
2745
- }
2746
- function E(s) {
2747
- if (typeof s != "string")
2748
- throw new Error("string expected");
2749
- return new Uint8Array(new TextEncoder().encode(s));
2750
- }
2751
- function o(s) {
2752
- return new TextDecoder().decode(s);
2753
- }
2754
- function f(s) {
2755
- return typeof s == "string" && (s = E(s)), c(s), s;
2756
- }
2757
- function d(s) {
2758
- return typeof s == "string" && (s = E(s)), c(s), s;
2759
- }
2760
- function L(...s) {
2761
- let l = 0;
2762
- for (let V = 0; V < s.length; V++) {
2763
- const k = s[V];
2764
- c(k), l += k.length;
2765
- }
2766
- const y = new Uint8Array(l);
2767
- for (let V = 0, k = 0; V < s.length; V++) {
2768
- const M = s[V];
2769
- y.set(M, k), k += M.length;
2770
- }
2771
- return y;
2772
- }
2773
- function A(s, l) {
2774
- if (l !== void 0 && {}.toString.call(l) !== "[object Object]")
2775
- throw new Error("options should be object or undefined");
2776
- return Object.assign(s, l);
2777
- }
2778
- class m {
2779
- }
2780
- t.Hash = m;
2781
- function F(s) {
2782
- const l = (V) => s().update(f(V)).digest(), y = s();
2783
- return l.outputLen = y.outputLen, l.blockLen = y.blockLen, l.create = () => s(), l;
2784
- }
2785
- function O(s) {
2786
- const l = (V, k) => s(k).update(f(V)).digest(), y = s({});
2787
- return l.outputLen = y.outputLen, l.blockLen = y.blockLen, l.create = (V) => s(V), l;
2788
- }
2789
- function v(s) {
2790
- const l = (V, k) => s(k).update(f(V)).digest(), y = s({});
2791
- return l.outputLen = y.outputLen, l.blockLen = y.blockLen, l.create = (V) => s(V), l;
2792
- }
2793
- t.wrapConstructor = F, t.wrapConstructorWithOpts = O, t.wrapXOFConstructorWithOpts = v;
2794
- function q(s = 32) {
2795
- if (e.crypto && typeof e.crypto.getRandomValues == "function")
2796
- return e.crypto.getRandomValues(new Uint8Array(s));
2797
- if (e.crypto && typeof e.crypto.randomBytes == "function")
2798
- return Uint8Array.from(e.crypto.randomBytes(s));
2799
- throw new Error("crypto.getRandomValues must be defined");
2800
- }
2801
- })(te)), te;
2802
- }
2803
- var De;
2804
- function Ds() {
2805
- if (De) return nt;
2806
- De = 1, Object.defineProperty(nt, "__esModule", { value: !0 }), nt.SHA512_IV = nt.SHA384_IV = nt.SHA224_IV = nt.SHA256_IV = nt.HashMD = void 0, nt.setBigUint64 = e, nt.Chi = n, nt.Maj = h;
2807
- const t = /* @__PURE__ */ Jt();
2808
- function e(i, r, a, b) {
2809
- if (typeof i.setBigUint64 == "function")
2810
- return i.setBigUint64(r, a, b);
2811
- const x = BigInt(32), H = BigInt(4294967295), u = Number(a >> x & H), S = Number(a & H), B = b ? 4 : 0, g = b ? 0 : 4;
2812
- i.setUint32(r + B, u, b), i.setUint32(r + g, S, b);
2813
- }
2814
- function n(i, r, a) {
2815
- return i & r ^ ~i & a;
2816
- }
2817
- function h(i, r, a) {
2818
- return i & r ^ i & a ^ r & a;
2819
- }
2820
- class c extends t.Hash {
2821
- constructor(r, a, b, x) {
2822
- super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = r, this.outputLen = a, this.padOffset = b, this.isLE = x, this.buffer = new Uint8Array(r), this.view = (0, t.createView)(this.buffer);
2823
- }
2824
- update(r) {
2825
- (0, t.aexists)(this), r = (0, t.toBytes)(r), (0, t.abytes)(r);
2826
- const { view: a, buffer: b, blockLen: x } = this, H = r.length;
2827
- for (let u = 0; u < H; ) {
2828
- const S = Math.min(x - this.pos, H - u);
2829
- if (S === x) {
2830
- const B = (0, t.createView)(r);
2831
- for (; x <= H - u; u += x)
2832
- this.process(B, u);
2833
- continue;
2834
- }
2835
- b.set(r.subarray(u, u + S), this.pos), this.pos += S, u += S, this.pos === x && (this.process(a, 0), this.pos = 0);
2836
- }
2837
- return this.length += r.length, this.roundClean(), this;
2838
- }
2839
- digestInto(r) {
2840
- (0, t.aexists)(this), (0, t.aoutput)(r, this), this.finished = !0;
2841
- const { buffer: a, view: b, blockLen: x, isLE: H } = this;
2842
- let { pos: u } = this;
2843
- a[u++] = 128, (0, t.clean)(this.buffer.subarray(u)), this.padOffset > x - u && (this.process(b, 0), u = 0);
2844
- for (let D = u; D < x; D++)
2845
- a[D] = 0;
2846
- e(b, x - 8, BigInt(this.length * 8), H), this.process(b, 0);
2847
- const S = (0, t.createView)(r), B = this.outputLen;
2848
- if (B % 4)
2849
- throw new Error("_sha2: outputLen should be aligned to 32bit");
2850
- const g = B / 4, I = this.get();
2851
- if (g > I.length)
2852
- throw new Error("_sha2: outputLen bigger than state");
2853
- for (let D = 0; D < g; D++)
2854
- S.setUint32(4 * D, I[D], H);
2855
- }
2856
- digest() {
2857
- const { buffer: r, outputLen: a } = this;
2858
- this.digestInto(r);
2859
- const b = r.slice(0, a);
2860
- return this.destroy(), b;
2861
- }
2862
- _cloneInto(r) {
2863
- r || (r = new this.constructor()), r.set(...this.get());
2864
- const { blockLen: a, buffer: b, length: x, finished: H, destroyed: u, pos: S } = this;
2865
- return r.destroyed = u, r.finished = H, r.length = x, r.pos = S, x % a && r.buffer.set(b), r;
2866
- }
2867
- clone() {
2868
- return this._cloneInto();
2869
- }
2870
- }
2871
- return nt.HashMD = c, nt.SHA256_IV = Uint32Array.from([
2872
- 1779033703,
2873
- 3144134277,
2874
- 1013904242,
2875
- 2773480762,
2876
- 1359893119,
2877
- 2600822924,
2878
- 528734635,
2879
- 1541459225
2880
- ]), nt.SHA224_IV = Uint32Array.from([
2881
- 3238371032,
2882
- 914150663,
2883
- 812702999,
2884
- 4144912697,
2885
- 4290775857,
2886
- 1750603025,
2887
- 1694076839,
2888
- 3204075428
2889
- ]), nt.SHA384_IV = Uint32Array.from([
2890
- 3418070365,
2891
- 3238371032,
2892
- 1654270250,
2893
- 914150663,
2894
- 2438529370,
2895
- 812702999,
2896
- 355462360,
2897
- 4144912697,
2898
- 1731405415,
2899
- 4290775857,
2900
- 2394180231,
2901
- 1750603025,
2902
- 3675008525,
2903
- 1694076839,
2904
- 1203062813,
2905
- 3204075428
2906
- ]), nt.SHA512_IV = Uint32Array.from([
2907
- 1779033703,
2908
- 4089235720,
2909
- 3144134277,
2910
- 2227873595,
2911
- 1013904242,
2912
- 4271175723,
2913
- 2773480762,
2914
- 1595750129,
2915
- 1359893119,
2916
- 2917565137,
2917
- 2600822924,
2918
- 725511199,
2919
- 528734635,
2920
- 4215389547,
2921
- 1541459225,
2922
- 327033209
2923
- ]), nt;
2924
- }
2925
- var W = {}, Fe;
2926
- function Fs() {
2927
- if (Fe) return W;
2928
- Fe = 1, Object.defineProperty(W, "__esModule", { value: !0 }), W.toBig = W.shrSL = W.shrSH = W.rotrSL = W.rotrSH = W.rotrBL = W.rotrBH = W.rotr32L = W.rotr32H = W.rotlSL = W.rotlSH = W.rotlBL = W.rotlBH = W.add5L = W.add5H = W.add4L = W.add4H = W.add3L = W.add3H = void 0, W.add = R, W.fromBig = n, W.split = h;
2929
- const t = /* @__PURE__ */ BigInt(2 ** 32 - 1), e = /* @__PURE__ */ BigInt(32);
2930
- function n(o, f = !1) {
2931
- return f ? { h: Number(o & t), l: Number(o >> e & t) } : { h: Number(o >> e & t) | 0, l: Number(o & t) | 0 };
2932
- }
2933
- function h(o, f = !1) {
2934
- const d = o.length;
2935
- let L = new Uint32Array(d), A = new Uint32Array(d);
2936
- for (let m = 0; m < d; m++) {
2937
- const { h: F, l: O } = n(o[m], f);
2938
- [L[m], A[m]] = [F, O];
2939
- }
2940
- return [L, A];
2941
- }
2942
- const c = (o, f) => BigInt(o >>> 0) << e | BigInt(f >>> 0);
2943
- W.toBig = c;
2944
- const i = (o, f, d) => o >>> d;
2945
- W.shrSH = i;
2946
- const r = (o, f, d) => o << 32 - d | f >>> d;
2947
- W.shrSL = r;
2948
- const a = (o, f, d) => o >>> d | f << 32 - d;
2949
- W.rotrSH = a;
2950
- const b = (o, f, d) => o << 32 - d | f >>> d;
2951
- W.rotrSL = b;
2952
- const x = (o, f, d) => o << 64 - d | f >>> d - 32;
2953
- W.rotrBH = x;
2954
- const H = (o, f, d) => o >>> d - 32 | f << 64 - d;
2955
- W.rotrBL = H;
2956
- const u = (o, f) => f;
2957
- W.rotr32H = u;
2958
- const S = (o, f) => o;
2959
- W.rotr32L = S;
2960
- const B = (o, f, d) => o << d | f >>> 32 - d;
2961
- W.rotlSH = B;
2962
- const g = (o, f, d) => f << d | o >>> 32 - d;
2963
- W.rotlSL = g;
2964
- const I = (o, f, d) => f << d - 32 | o >>> 64 - d;
2965
- W.rotlBH = I;
2966
- const D = (o, f, d) => o << d - 32 | f >>> 64 - d;
2967
- W.rotlBL = D;
2968
- function R(o, f, d, L) {
2969
- const A = (f >>> 0) + (L >>> 0);
2970
- return { h: o + d + (A / 2 ** 32 | 0) | 0, l: A | 0 };
2971
- }
2972
- const T = (o, f, d) => (o >>> 0) + (f >>> 0) + (d >>> 0);
2973
- W.add3L = T;
2974
- const _ = (o, f, d, L) => f + d + L + (o / 2 ** 32 | 0) | 0;
2975
- W.add3H = _;
2976
- const C = (o, f, d, L) => (o >>> 0) + (f >>> 0) + (d >>> 0) + (L >>> 0);
2977
- W.add4L = C;
2978
- const p = (o, f, d, L, A) => f + d + L + A + (o / 2 ** 32 | 0) | 0;
2979
- W.add4H = p;
2980
- const w = (o, f, d, L, A) => (o >>> 0) + (f >>> 0) + (d >>> 0) + (L >>> 0) + (A >>> 0);
2981
- W.add5L = w;
2982
- const U = (o, f, d, L, A, m) => f + d + L + A + m + (o / 2 ** 32 | 0) | 0;
2983
- W.add5H = U;
2984
- const E = {
2985
- fromBig: n,
2986
- split: h,
2987
- toBig: c,
2988
- shrSH: i,
2989
- shrSL: r,
2990
- rotrSH: a,
2991
- rotrSL: b,
2992
- rotrBH: x,
2993
- rotrBL: H,
2994
- rotr32H: u,
2995
- rotr32L: S,
2996
- rotlSH: B,
2997
- rotlSL: g,
2998
- rotlBH: I,
2999
- rotlBL: D,
3000
- add: R,
3001
- add3L: T,
3002
- add3H: _,
3003
- add4L: C,
3004
- add4H: p,
3005
- add5H: U,
3006
- add5L: w
3007
- };
3008
- return W.default = E, W;
3009
- }
3010
- var Te;
3011
- function b0() {
3012
- if (Te) return J;
3013
- Te = 1, Object.defineProperty(J, "__esModule", { value: !0 }), J.sha512_224 = J.sha512_256 = J.sha384 = J.sha512 = J.sha224 = J.sha256 = J.SHA512_256 = J.SHA512_224 = J.SHA384 = J.SHA512 = J.SHA224 = J.SHA256 = void 0;
3014
- const t = /* @__PURE__ */ Ds(), e = /* @__PURE__ */ Fs(), n = /* @__PURE__ */ Jt(), h = /* @__PURE__ */ Uint32Array.from([
3015
- 1116352408,
3016
- 1899447441,
3017
- 3049323471,
3018
- 3921009573,
3019
- 961987163,
3020
- 1508970993,
3021
- 2453635748,
3022
- 2870763221,
3023
- 3624381080,
3024
- 310598401,
3025
- 607225278,
3026
- 1426881987,
3027
- 1925078388,
3028
- 2162078206,
3029
- 2614888103,
3030
- 3248222580,
3031
- 3835390401,
3032
- 4022224774,
3033
- 264347078,
3034
- 604807628,
3035
- 770255983,
3036
- 1249150122,
3037
- 1555081692,
3038
- 1996064986,
3039
- 2554220882,
3040
- 2821834349,
3041
- 2952996808,
3042
- 3210313671,
3043
- 3336571891,
3044
- 3584528711,
3045
- 113926993,
3046
- 338241895,
3047
- 666307205,
3048
- 773529912,
3049
- 1294757372,
3050
- 1396182291,
3051
- 1695183700,
3052
- 1986661051,
3053
- 2177026350,
3054
- 2456956037,
3055
- 2730485921,
3056
- 2820302411,
3057
- 3259730800,
3058
- 3345764771,
3059
- 3516065817,
3060
- 3600352804,
3061
- 4094571909,
3062
- 275423344,
3063
- 430227734,
3064
- 506948616,
3065
- 659060556,
3066
- 883997877,
3067
- 958139571,
3068
- 1322822218,
3069
- 1537002063,
3070
- 1747873779,
3071
- 1955562222,
3072
- 2024104815,
3073
- 2227730452,
3074
- 2361852424,
3075
- 2428436474,
3076
- 2756734187,
3077
- 3204031479,
3078
- 3329325298
3079
- ]), c = /* @__PURE__ */ new Uint32Array(64);
3080
- class i extends t.HashMD {
3081
- constructor(_ = 32) {
3082
- super(64, _, 8, !1), this.A = t.SHA256_IV[0] | 0, this.B = t.SHA256_IV[1] | 0, this.C = t.SHA256_IV[2] | 0, this.D = t.SHA256_IV[3] | 0, this.E = t.SHA256_IV[4] | 0, this.F = t.SHA256_IV[5] | 0, this.G = t.SHA256_IV[6] | 0, this.H = t.SHA256_IV[7] | 0;
3083
- }
3084
- get() {
3085
- const { A: _, B: C, C: p, D: w, E: U, F: E, G: o, H: f } = this;
3086
- return [_, C, p, w, U, E, o, f];
3087
- }
3088
- // prettier-ignore
3089
- set(_, C, p, w, U, E, o, f) {
3090
- this.A = _ | 0, this.B = C | 0, this.C = p | 0, this.D = w | 0, this.E = U | 0, this.F = E | 0, this.G = o | 0, this.H = f | 0;
3091
- }
3092
- process(_, C) {
3093
- for (let A = 0; A < 16; A++, C += 4)
3094
- c[A] = _.getUint32(C, !1);
3095
- for (let A = 16; A < 64; A++) {
3096
- const m = c[A - 15], F = c[A - 2], O = (0, n.rotr)(m, 7) ^ (0, n.rotr)(m, 18) ^ m >>> 3, v = (0, n.rotr)(F, 17) ^ (0, n.rotr)(F, 19) ^ F >>> 10;
3097
- c[A] = v + c[A - 7] + O + c[A - 16] | 0;
3098
- }
3099
- let { A: p, B: w, C: U, D: E, E: o, F: f, G: d, H: L } = this;
3100
- for (let A = 0; A < 64; A++) {
3101
- const m = (0, n.rotr)(o, 6) ^ (0, n.rotr)(o, 11) ^ (0, n.rotr)(o, 25), F = L + m + (0, t.Chi)(o, f, d) + h[A] + c[A] | 0, v = ((0, n.rotr)(p, 2) ^ (0, n.rotr)(p, 13) ^ (0, n.rotr)(p, 22)) + (0, t.Maj)(p, w, U) | 0;
3102
- L = d, d = f, f = o, o = E + F | 0, E = U, U = w, w = p, p = F + v | 0;
3103
- }
3104
- p = p + this.A | 0, w = w + this.B | 0, U = U + this.C | 0, E = E + this.D | 0, o = o + this.E | 0, f = f + this.F | 0, d = d + this.G | 0, L = L + this.H | 0, this.set(p, w, U, E, o, f, d, L);
3105
- }
3106
- roundClean() {
3107
- (0, n.clean)(c);
3108
- }
3109
- destroy() {
3110
- this.set(0, 0, 0, 0, 0, 0, 0, 0), (0, n.clean)(this.buffer);
3111
- }
3112
- }
3113
- J.SHA256 = i;
3114
- class r extends i {
3115
- constructor() {
3116
- super(28), this.A = t.SHA224_IV[0] | 0, this.B = t.SHA224_IV[1] | 0, this.C = t.SHA224_IV[2] | 0, this.D = t.SHA224_IV[3] | 0, this.E = t.SHA224_IV[4] | 0, this.F = t.SHA224_IV[5] | 0, this.G = t.SHA224_IV[6] | 0, this.H = t.SHA224_IV[7] | 0;
3117
- }
3118
- }
3119
- J.SHA224 = r;
3120
- const a = e.split([
3121
- "0x428a2f98d728ae22",
3122
- "0x7137449123ef65cd",
3123
- "0xb5c0fbcfec4d3b2f",
3124
- "0xe9b5dba58189dbbc",
3125
- "0x3956c25bf348b538",
3126
- "0x59f111f1b605d019",
3127
- "0x923f82a4af194f9b",
3128
- "0xab1c5ed5da6d8118",
3129
- "0xd807aa98a3030242",
3130
- "0x12835b0145706fbe",
3131
- "0x243185be4ee4b28c",
3132
- "0x550c7dc3d5ffb4e2",
3133
- "0x72be5d74f27b896f",
3134
- "0x80deb1fe3b1696b1",
3135
- "0x9bdc06a725c71235",
3136
- "0xc19bf174cf692694",
3137
- "0xe49b69c19ef14ad2",
3138
- "0xefbe4786384f25e3",
3139
- "0x0fc19dc68b8cd5b5",
3140
- "0x240ca1cc77ac9c65",
3141
- "0x2de92c6f592b0275",
3142
- "0x4a7484aa6ea6e483",
3143
- "0x5cb0a9dcbd41fbd4",
3144
- "0x76f988da831153b5",
3145
- "0x983e5152ee66dfab",
3146
- "0xa831c66d2db43210",
3147
- "0xb00327c898fb213f",
3148
- "0xbf597fc7beef0ee4",
3149
- "0xc6e00bf33da88fc2",
3150
- "0xd5a79147930aa725",
3151
- "0x06ca6351e003826f",
3152
- "0x142929670a0e6e70",
3153
- "0x27b70a8546d22ffc",
3154
- "0x2e1b21385c26c926",
3155
- "0x4d2c6dfc5ac42aed",
3156
- "0x53380d139d95b3df",
3157
- "0x650a73548baf63de",
3158
- "0x766a0abb3c77b2a8",
3159
- "0x81c2c92e47edaee6",
3160
- "0x92722c851482353b",
3161
- "0xa2bfe8a14cf10364",
3162
- "0xa81a664bbc423001",
3163
- "0xc24b8b70d0f89791",
3164
- "0xc76c51a30654be30",
3165
- "0xd192e819d6ef5218",
3166
- "0xd69906245565a910",
3167
- "0xf40e35855771202a",
3168
- "0x106aa07032bbd1b8",
3169
- "0x19a4c116b8d2d0c8",
3170
- "0x1e376c085141ab53",
3171
- "0x2748774cdf8eeb99",
3172
- "0x34b0bcb5e19b48a8",
3173
- "0x391c0cb3c5c95a63",
3174
- "0x4ed8aa4ae3418acb",
3175
- "0x5b9cca4f7763e373",
3176
- "0x682e6ff3d6b2b8a3",
3177
- "0x748f82ee5defb2fc",
3178
- "0x78a5636f43172f60",
3179
- "0x84c87814a1f0ab72",
3180
- "0x8cc702081a6439ec",
3181
- "0x90befffa23631e28",
3182
- "0xa4506cebde82bde9",
3183
- "0xbef9a3f7b2c67915",
3184
- "0xc67178f2e372532b",
3185
- "0xca273eceea26619c",
3186
- "0xd186b8c721c0c207",
3187
- "0xeada7dd6cde0eb1e",
3188
- "0xf57d4f7fee6ed178",
3189
- "0x06f067aa72176fba",
3190
- "0x0a637dc5a2c898a6",
3191
- "0x113f9804bef90dae",
3192
- "0x1b710b35131c471b",
3193
- "0x28db77f523047d84",
3194
- "0x32caab7b40c72493",
3195
- "0x3c9ebe0a15c9bebc",
3196
- "0x431d67c49c100d4c",
3197
- "0x4cc5d4becb3e42b6",
3198
- "0x597f299cfc657e2a",
3199
- "0x5fcb6fab3ad6faec",
3200
- "0x6c44198c4a475817"
3201
- ].map((T) => BigInt(T))), b = a[0], x = a[1], H = /* @__PURE__ */ new Uint32Array(80), u = /* @__PURE__ */ new Uint32Array(80);
3202
- class S extends t.HashMD {
3203
- constructor(_ = 64) {
3204
- super(128, _, 16, !1), this.Ah = t.SHA512_IV[0] | 0, this.Al = t.SHA512_IV[1] | 0, this.Bh = t.SHA512_IV[2] | 0, this.Bl = t.SHA512_IV[3] | 0, this.Ch = t.SHA512_IV[4] | 0, this.Cl = t.SHA512_IV[5] | 0, this.Dh = t.SHA512_IV[6] | 0, this.Dl = t.SHA512_IV[7] | 0, this.Eh = t.SHA512_IV[8] | 0, this.El = t.SHA512_IV[9] | 0, this.Fh = t.SHA512_IV[10] | 0, this.Fl = t.SHA512_IV[11] | 0, this.Gh = t.SHA512_IV[12] | 0, this.Gl = t.SHA512_IV[13] | 0, this.Hh = t.SHA512_IV[14] | 0, this.Hl = t.SHA512_IV[15] | 0;
3205
- }
3206
- // prettier-ignore
3207
- get() {
3208
- const { Ah: _, Al: C, Bh: p, Bl: w, Ch: U, Cl: E, Dh: o, Dl: f, Eh: d, El: L, Fh: A, Fl: m, Gh: F, Gl: O, Hh: v, Hl: q } = this;
3209
- return [_, C, p, w, U, E, o, f, d, L, A, m, F, O, v, q];
3210
- }
3211
- // prettier-ignore
3212
- set(_, C, p, w, U, E, o, f, d, L, A, m, F, O, v, q) {
3213
- this.Ah = _ | 0, this.Al = C | 0, this.Bh = p | 0, this.Bl = w | 0, this.Ch = U | 0, this.Cl = E | 0, this.Dh = o | 0, this.Dl = f | 0, this.Eh = d | 0, this.El = L | 0, this.Fh = A | 0, this.Fl = m | 0, this.Gh = F | 0, this.Gl = O | 0, this.Hh = v | 0, this.Hl = q | 0;
3214
- }
3215
- process(_, C) {
3216
- for (let y = 0; y < 16; y++, C += 4)
3217
- H[y] = _.getUint32(C), u[y] = _.getUint32(C += 4);
3218
- for (let y = 16; y < 80; y++) {
3219
- const V = H[y - 15] | 0, k = u[y - 15] | 0, M = e.rotrSH(V, k, 1) ^ e.rotrSH(V, k, 8) ^ e.shrSH(V, k, 7), z = e.rotrSL(V, k, 1) ^ e.rotrSL(V, k, 8) ^ e.shrSL(V, k, 7), P = H[y - 2] | 0, K = u[y - 2] | 0, it = e.rotrSH(P, K, 19) ^ e.rotrBH(P, K, 61) ^ e.shrSH(P, K, 6), ot = e.rotrSL(P, K, 19) ^ e.rotrBL(P, K, 61) ^ e.shrSL(P, K, 6), ct = e.add4L(z, ot, u[y - 7], u[y - 16]), at = e.add4H(ct, M, it, H[y - 7], H[y - 16]);
3220
- H[y] = at | 0, u[y] = ct | 0;
3221
- }
3222
- let { Ah: p, Al: w, Bh: U, Bl: E, Ch: o, Cl: f, Dh: d, Dl: L, Eh: A, El: m, Fh: F, Fl: O, Gh: v, Gl: q, Hh: s, Hl: l } = this;
3223
- for (let y = 0; y < 80; y++) {
3224
- const V = e.rotrSH(A, m, 14) ^ e.rotrSH(A, m, 18) ^ e.rotrBH(A, m, 41), k = e.rotrSL(A, m, 14) ^ e.rotrSL(A, m, 18) ^ e.rotrBL(A, m, 41), M = A & F ^ ~A & v, z = m & O ^ ~m & q, P = e.add5L(l, k, z, x[y], u[y]), K = e.add5H(P, s, V, M, b[y], H[y]), it = P | 0, ot = e.rotrSH(p, w, 28) ^ e.rotrBH(p, w, 34) ^ e.rotrBH(p, w, 39), ct = e.rotrSL(p, w, 28) ^ e.rotrBL(p, w, 34) ^ e.rotrBL(p, w, 39), at = p & U ^ p & o ^ U & o, Dt = w & E ^ w & f ^ E & f;
3225
- s = v | 0, l = q | 0, v = F | 0, q = O | 0, F = A | 0, O = m | 0, { h: A, l: m } = e.add(d | 0, L | 0, K | 0, it | 0), d = o | 0, L = f | 0, o = U | 0, f = E | 0, U = p | 0, E = w | 0;
3226
- const At = e.add3L(it, ct, Dt);
3227
- p = e.add3H(At, K, ot, at), w = At | 0;
3228
- }
3229
- ({ h: p, l: w } = e.add(this.Ah | 0, this.Al | 0, p | 0, w | 0)), { h: U, l: E } = e.add(this.Bh | 0, this.Bl | 0, U | 0, E | 0), { h: o, l: f } = e.add(this.Ch | 0, this.Cl | 0, o | 0, f | 0), { h: d, l: L } = e.add(this.Dh | 0, this.Dl | 0, d | 0, L | 0), { h: A, l: m } = e.add(this.Eh | 0, this.El | 0, A | 0, m | 0), { h: F, l: O } = e.add(this.Fh | 0, this.Fl | 0, F | 0, O | 0), { h: v, l: q } = e.add(this.Gh | 0, this.Gl | 0, v | 0, q | 0), { h: s, l } = e.add(this.Hh | 0, this.Hl | 0, s | 0, l | 0), this.set(p, w, U, E, o, f, d, L, A, m, F, O, v, q, s, l);
3230
- }
3231
- roundClean() {
3232
- (0, n.clean)(H, u);
3233
- }
3234
- destroy() {
3235
- (0, n.clean)(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
3236
- }
3237
- }
3238
- J.SHA512 = S;
3239
- class B extends S {
3240
- constructor() {
3241
- super(48), this.Ah = t.SHA384_IV[0] | 0, this.Al = t.SHA384_IV[1] | 0, this.Bh = t.SHA384_IV[2] | 0, this.Bl = t.SHA384_IV[3] | 0, this.Ch = t.SHA384_IV[4] | 0, this.Cl = t.SHA384_IV[5] | 0, this.Dh = t.SHA384_IV[6] | 0, this.Dl = t.SHA384_IV[7] | 0, this.Eh = t.SHA384_IV[8] | 0, this.El = t.SHA384_IV[9] | 0, this.Fh = t.SHA384_IV[10] | 0, this.Fl = t.SHA384_IV[11] | 0, this.Gh = t.SHA384_IV[12] | 0, this.Gl = t.SHA384_IV[13] | 0, this.Hh = t.SHA384_IV[14] | 0, this.Hl = t.SHA384_IV[15] | 0;
3242
- }
3243
- }
3244
- J.SHA384 = B;
3245
- const g = /* @__PURE__ */ Uint32Array.from([
3246
- 2352822216,
3247
- 424955298,
3248
- 1944164710,
3249
- 2312950998,
3250
- 502970286,
3251
- 855612546,
3252
- 1738396948,
3253
- 1479516111,
3254
- 258812777,
3255
- 2077511080,
3256
- 2011393907,
3257
- 79989058,
3258
- 1067287976,
3259
- 1780299464,
3260
- 286451373,
3261
- 2446758561
3262
- ]), I = /* @__PURE__ */ Uint32Array.from([
3263
- 573645204,
3264
- 4230739756,
3265
- 2673172387,
3266
- 3360449730,
3267
- 596883563,
3268
- 1867755857,
3269
- 2520282905,
3270
- 1497426621,
3271
- 2519219938,
3272
- 2827943907,
3273
- 3193839141,
3274
- 1401305490,
3275
- 721525244,
3276
- 746961066,
3277
- 246885852,
3278
- 2177182882
3279
- ]);
3280
- class D extends S {
3281
- constructor() {
3282
- super(28), this.Ah = g[0] | 0, this.Al = g[1] | 0, this.Bh = g[2] | 0, this.Bl = g[3] | 0, this.Ch = g[4] | 0, this.Cl = g[5] | 0, this.Dh = g[6] | 0, this.Dl = g[7] | 0, this.Eh = g[8] | 0, this.El = g[9] | 0, this.Fh = g[10] | 0, this.Fl = g[11] | 0, this.Gh = g[12] | 0, this.Gl = g[13] | 0, this.Hh = g[14] | 0, this.Hl = g[15] | 0;
3283
- }
3284
- }
3285
- J.SHA512_224 = D;
3286
- class R extends S {
3287
- constructor() {
3288
- super(32), this.Ah = I[0] | 0, this.Al = I[1] | 0, this.Bh = I[2] | 0, this.Bl = I[3] | 0, this.Ch = I[4] | 0, this.Cl = I[5] | 0, this.Dh = I[6] | 0, this.Dl = I[7] | 0, this.Eh = I[8] | 0, this.El = I[9] | 0, this.Fh = I[10] | 0, this.Fl = I[11] | 0, this.Gh = I[12] | 0, this.Gl = I[13] | 0, this.Hh = I[14] | 0, this.Hl = I[15] | 0;
3289
- }
3290
- }
3291
- return J.SHA512_256 = R, J.sha256 = (0, n.createHasher)(() => new i()), J.sha224 = (0, n.createHasher)(() => new r()), J.sha512 = (0, n.createHasher)(() => new S()), J.sha384 = (0, n.createHasher)(() => new B()), J.sha512_256 = (0, n.createHasher)(() => new R()), J.sha512_224 = (0, n.createHasher)(() => new D()), J;
3292
- }
3293
- var Oe;
3294
- function Zs() {
3295
- if (Oe) return ft;
3296
- Oe = 1, Object.defineProperty(ft, "__esModule", { value: !0 }), ft.sha224 = ft.SHA224 = ft.sha256 = ft.SHA256 = void 0;
3297
- const t = /* @__PURE__ */ b0();
3298
- return ft.SHA256 = t.SHA256, ft.sha256 = t.sha256, ft.SHA224 = t.SHA224, ft.sha224 = t.sha224, ft;
3299
- }
3300
- var Q = {}, ve;
3301
- function $s() {
3302
- if (ve) return Q;
3303
- ve = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.sha512_256 = Q.SHA512_256 = Q.sha512_224 = Q.SHA512_224 = Q.sha384 = Q.SHA384 = Q.sha512 = Q.SHA512 = void 0;
3304
- const t = /* @__PURE__ */ b0();
3305
- return Q.SHA512 = t.SHA512, Q.sha512 = t.sha512, Q.SHA384 = t.SHA384, Q.sha384 = t.sha384, Q.SHA512_224 = t.SHA512_224, Q.sha512_224 = t.sha512_224, Q.SHA512_256 = t.SHA512_256, Q.sha512_256 = t.sha512_256, Q;
3306
- }
3307
- var Mt = {}, ee = {}, Me;
3308
- function Ts() {
3309
- return Me || (Me = 1, (function(t) {
3310
- Object.defineProperty(t, "__esModule", { value: !0 }), t.hmac = t.HMAC = void 0;
3311
- const e = /* @__PURE__ */ Jt();
3312
- class n extends e.Hash {
3313
- constructor(i, r) {
3314
- super(), this.finished = !1, this.destroyed = !1, (0, e.ahash)(i);
3315
- const a = (0, e.toBytes)(r);
3316
- if (this.iHash = i.create(), typeof this.iHash.update != "function")
3317
- throw new Error("Expected instance of class which extends utils.Hash");
3318
- this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
3319
- const b = this.blockLen, x = new Uint8Array(b);
3320
- x.set(a.length > b ? i.create().update(a).digest() : a);
3321
- for (let H = 0; H < x.length; H++)
3322
- x[H] ^= 54;
3323
- this.iHash.update(x), this.oHash = i.create();
3324
- for (let H = 0; H < x.length; H++)
3325
- x[H] ^= 106;
3326
- this.oHash.update(x), (0, e.clean)(x);
3327
- }
3328
- update(i) {
3329
- return (0, e.aexists)(this), this.iHash.update(i), this;
3330
- }
3331
- digestInto(i) {
3332
- (0, e.aexists)(this), (0, e.abytes)(i, this.outputLen), this.finished = !0, this.iHash.digestInto(i), this.oHash.update(i), this.oHash.digestInto(i), this.destroy();
3333
- }
3334
- digest() {
3335
- const i = new Uint8Array(this.oHash.outputLen);
3336
- return this.digestInto(i), i;
3337
- }
3338
- _cloneInto(i) {
3339
- i || (i = Object.create(Object.getPrototypeOf(this), {}));
3340
- const { oHash: r, iHash: a, finished: b, destroyed: x, blockLen: H, outputLen: u } = this;
3341
- return i = i, i.finished = b, i.destroyed = x, i.blockLen = H, i.outputLen = u, i.oHash = r._cloneInto(i.oHash), i.iHash = a._cloneInto(i.iHash), i;
3342
- }
3343
- clone() {
3344
- return this._cloneInto();
3345
- }
3346
- destroy() {
3347
- this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
3348
- }
3349
- }
3350
- t.HMAC = n;
3351
- const h = (c, i, r) => new n(c, i).update(r).digest();
3352
- t.hmac = h, t.hmac.create = (c, i) => new n(c, i);
3353
- })(ee)), ee;
3354
- }
3355
- var Ge;
3356
- function tn() {
3357
- if (Ge) return Mt;
3358
- Ge = 1, Object.defineProperty(Mt, "__esModule", { value: !0 }), Mt.pbkdf2 = c, Mt.pbkdf2Async = i;
3359
- const t = /* @__PURE__ */ Ts(), e = /* @__PURE__ */ Jt();
3360
- function n(r, a, b, x) {
2630
+ var Be;
2631
+ function Vs() {
2632
+ if (Be) return Dt;
2633
+ Be = 1, Object.defineProperty(Dt, "__esModule", { value: !0 }), Dt.pbkdf2 = i, Dt.pbkdf2Async = c;
2634
+ const t = /* @__PURE__ */ bs(), e = /* @__PURE__ */ Rt();
2635
+ function s(r, a, d, x) {
3361
2636
  (0, e.ahash)(r);
3362
- const H = (0, e.checkOpts)({ dkLen: 32, asyncTick: 10 }, x), { c: u, dkLen: S, asyncTick: B } = H;
3363
- if ((0, e.anumber)(u), (0, e.anumber)(S), (0, e.anumber)(B), u < 1)
2637
+ const H = (0, e.checkOpts)({ dkLen: 32, asyncTick: 10 }, x), { c: f, dkLen: g, asyncTick: w } = H;
2638
+ if ((0, e.anumber)(f), (0, e.anumber)(g), (0, e.anumber)(w), f < 1)
3364
2639
  throw new Error("iterations (c) should be >= 1");
3365
- const g = (0, e.kdfInputToBytes)(a), I = (0, e.kdfInputToBytes)(b), D = new Uint8Array(S), R = t.hmac.create(r, g), T = R._cloneInto().update(I);
3366
- return { c: u, dkLen: S, asyncTick: B, DK: D, PRF: R, PRFSalt: T };
2640
+ const S = (0, e.kdfInputToBytes)(a), I = (0, e.kdfInputToBytes)(d), D = new Uint8Array(g), W = t.hmac.create(r, S), v = W._cloneInto().update(I);
2641
+ return { c: f, dkLen: g, asyncTick: w, DK: D, PRF: W, PRFSalt: v };
3367
2642
  }
3368
- function h(r, a, b, x, H) {
3369
- return r.destroy(), a.destroy(), x && x.destroy(), (0, e.clean)(H), b;
2643
+ function o(r, a, d, x, H) {
2644
+ return r.destroy(), a.destroy(), x && x.destroy(), (0, e.clean)(H), d;
3370
2645
  }
3371
- function c(r, a, b, x) {
3372
- const { c: H, dkLen: u, DK: S, PRF: B, PRFSalt: g } = n(r, a, b, x);
2646
+ function i(r, a, d, x) {
2647
+ const { c: H, dkLen: f, DK: g, PRF: w, PRFSalt: S } = s(r, a, d, x);
3373
2648
  let I;
3374
- const D = new Uint8Array(4), R = (0, e.createView)(D), T = new Uint8Array(B.outputLen);
3375
- for (let _ = 1, C = 0; C < u; _++, C += B.outputLen) {
3376
- const p = S.subarray(C, C + B.outputLen);
3377
- R.setInt32(0, _, !1), (I = g._cloneInto(I)).update(D).digestInto(T), p.set(T.subarray(0, p.length));
3378
- for (let w = 1; w < H; w++) {
3379
- B._cloneInto(I).update(T).digestInto(T);
3380
- for (let U = 0; U < p.length; U++)
3381
- p[U] ^= T[U];
2649
+ const D = new Uint8Array(4), W = (0, e.createView)(D), v = new Uint8Array(w.outputLen);
2650
+ for (let _ = 1, C = 0; C < f; _++, C += w.outputLen) {
2651
+ const A = g.subarray(C, C + w.outputLen);
2652
+ W.setInt32(0, _, !1), (I = S._cloneInto(I)).update(D).digestInto(v), A.set(v.subarray(0, A.length));
2653
+ for (let B = 1; B < H; B++) {
2654
+ w._cloneInto(I).update(v).digestInto(v);
2655
+ for (let m = 0; m < A.length; m++)
2656
+ A[m] ^= v[m];
3382
2657
  }
3383
2658
  }
3384
- return h(B, g, S, I, T);
2659
+ return o(w, S, g, I, v);
3385
2660
  }
3386
- async function i(r, a, b, x) {
3387
- const { c: H, dkLen: u, asyncTick: S, DK: B, PRF: g, PRFSalt: I } = n(r, a, b, x);
2661
+ async function c(r, a, d, x) {
2662
+ const { c: H, dkLen: f, asyncTick: g, DK: w, PRF: S, PRFSalt: I } = s(r, a, d, x);
3388
2663
  let D;
3389
- const R = new Uint8Array(4), T = (0, e.createView)(R), _ = new Uint8Array(g.outputLen);
3390
- for (let C = 1, p = 0; p < u; C++, p += g.outputLen) {
3391
- const w = B.subarray(p, p + g.outputLen);
3392
- T.setInt32(0, C, !1), (D = I._cloneInto(D)).update(R).digestInto(_), w.set(_.subarray(0, w.length)), await (0, e.asyncLoop)(H - 1, S, () => {
3393
- g._cloneInto(D).update(_).digestInto(_);
3394
- for (let U = 0; U < w.length; U++)
3395
- w[U] ^= _[U];
2664
+ const W = new Uint8Array(4), v = (0, e.createView)(W), _ = new Uint8Array(S.outputLen);
2665
+ for (let C = 1, A = 0; A < f; C++, A += S.outputLen) {
2666
+ const B = w.subarray(A, A + S.outputLen);
2667
+ v.setInt32(0, C, !1), (D = I._cloneInto(D)).update(W).digestInto(_), B.set(_.subarray(0, B.length)), await (0, e.asyncLoop)(H - 1, g, () => {
2668
+ S._cloneInto(D).update(_).digestInto(_);
2669
+ for (let m = 0; m < B.length; m++)
2670
+ B[m] ^= _[m];
3396
2671
  });
3397
2672
  }
3398
- return h(g, I, B, D, _);
2673
+ return o(S, I, w, D, _);
3399
2674
  }
3400
- return Mt;
2675
+ return Dt;
3401
2676
  }
3402
2677
  export {
3403
- js as A,
3404
- We as B,
3405
- Xs as a,
3406
- Ks as b,
3407
- Js as c,
3408
- Rs as d,
3409
- Ht as e,
3410
- Ws as f,
3411
- zs as g,
3412
- Qs as h,
3413
- m0 as i,
3414
- hs as j,
3415
- os as k,
3416
- oe as l,
3417
- tn as m,
3418
- $s as n,
3419
- Zs as o,
3420
- Ys as p,
3421
- Jt as q,
3422
- Ns as r,
3423
- Ms as s,
3424
- K0 as t,
3425
- T0 as u,
3426
- ie as v,
3427
- Ps as w,
3428
- qs as x,
3429
- Gs as y,
3430
- Vt as z
2678
+ Bs as a,
2679
+ Ss as b,
2680
+ Is as c,
2681
+ gs as d,
2682
+ _t as e,
2683
+ _s as f,
2684
+ zt as g,
2685
+ Ls as h,
2686
+ u0 as i,
2687
+ ms as j,
2688
+ As as k,
2689
+ Vs as l,
2690
+ Es as m,
2691
+ Us as n,
2692
+ Rt as o,
2693
+ ps as p,
2694
+ Gt as q,
2695
+ ws as r,
2696
+ Hs as s,
2697
+ ys as t,
2698
+ l0 as u,
2699
+ Ue as v,
2700
+ N0 as w,
2701
+ J0 as x
3431
2702
  };