keyring-chatbot-agent-sdk-test 1.0.43 → 1.0.44

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.
@@ -1,5 +1,5 @@
1
1
  !function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".chat-button{cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #00000026;transition:all .3s ease;border-radius:16px}.chat-button:hover{transform:scale(1.1);box-shadow:0 6px 16px #0003}.chat-button:active{transform:scale(.95)}.chat-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:transparent;display:flex;align-items:flex-end;justify-content:flex-end;z-index:9999;pointer-events:all;animation:fadeIn .2s ease}#chat-modal-title{color:#0b3988;font-weight:900;font-style:Regular;font-size:18px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1}.chat-modal-overlay.chat-modal-overlay--left{justify-content:flex-start}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.chat-modal{width:90%;max-width:480px;height:700px;max-height:calc(100dvh - 64px);background:#f5f5f7;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px #0000004d;margin:20px;pointer-events:all;animation:slideUp .3s ease}@keyframes slideUp{0%{transform:translateY(30px);opacity:0}to{transform:translateY(0);opacity:1}}.chat-modal-header{background:#fff;padding:8px 8px 8px 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e5e5e7;flex-flow:column}.chat-modal-header-title{width:100%;display:flex;align-items:center;justify-content:space-between;overflow:hidden}.chat-modal-header-left{display:flex;align-items:center;gap:6px;overflow:hidden}.keyring-logo{width:22px;height:30px;display:flex;align-items:center;justify-content:center}.chat-modal-header h3{margin:0;font-size:18px;font-weight:700;color:#1a1a1d}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;border-radius:8px;color:#666;transition:all .2s}.close-button:hover{background:#f5f5f7;color:#000}.chat-user-info{display:flex;align-items:center;gap:6px;width:100%}.user-wallet,.user-wallet a{font-size:14px;font-weight:500;color:#0b3988}.copy-address-btn{display:flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;padding:3px;color:#999;border-radius:4px;transition:color .15s,background .15s;line-height:0}@media(min-width:640px){.copy-address-btn:hover{color:#1a1a1d;background:#f0f0f0}}.chat-modal-messages-wrapper{position:relative;flex:1;overflow:hidden;display:flex;flex-direction:column}.chat-modal-messages{flex:1;padding:8px 16px;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:8px}.date-separator{text-align:center;font-size:12px;font-weight:600;color:#666;align-self:center;width:fit-content;margin:0 auto 8px}.message{display:flex;animation:messageSlide .3s ease;position:relative}@keyframes messageSlide{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message-bot{justify-content:flex-start}.message-user{justify-content:flex-end}.message-bubble{max-width:85%;padding:8px 16px;border-radius:20px}.message-bot .message-bubble{background:#fff;box-shadow:0 2px 8px #0000000f;border-bottom-left-radius:4px}.message-user .message-bubble{background:#5b7fff;color:#fff;border-bottom-right-radius:4px}.message-user .message-bubble a{color:#fff}.message-text{font-size:14px;line-height:1.5;word-wrap:break-word;white-space:normal}.message-bot .message-text{color:#1a1a1d}.message-user .message-text{color:#fff}.message-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;margin-bottom:8px}.message-button{flex:1 1 calc(50% - 4px);min-width:100px;padding:6px 12px;background:#fffffff2;border:1px solid #e0e0e0;border-radius:12px;font-size:13px;font-weight:500;color:#1a1a1d;cursor:pointer;transition:all .2s ease;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-button:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.message-button.full-width{flex:1 1 100%;text-align:center;white-space:normal;font-size:14px}@media(min-width:640px){.message-button:hover:not(:disabled){background:#fff;border-color:#007aff;color:#007aff;transform:translateY(-1px);box-shadow:0 2px 8px #007aff26}.message-button:active:not(:disabled){transform:translateY(0);box-shadow:0 1px 4px #007aff1a}}.message-user .message-button{background:#fff3;border-color:#ffffff4d;color:#fff}.message-user .message-button:hover:not(:disabled){background:#ffffff4d;border-color:#ffffff80}.message-timestamp{line-height:1;font-size:11px;color:#999;display:flex;align-items:center;gap:4px;justify-content:flex-end}.message-user .message-timestamp{color:#ffffffb3}.check-icon{width:14px;height:14px}.typing-indicator .message-bubble{padding:12px 18px;display:flex;gap:6px;min-width:60px}.typing-dot{width:8px;height:8px;border-radius:50%;background:#999;animation:typingDot 1.4s infinite ease-in-out}.typing-dot:nth-child(1){animation-delay:0s}.typing-dot:nth-child(2){animation-delay:.2s}.typing-dot:nth-child(3){animation-delay:.4s}@keyframes typingDot{0%,60%,to{transform:translateY(0);opacity:.7}30%{transform:translateY(-8px);opacity:1}}.suggestions-container{display:flex;flex-direction:column;gap:10px;margin-top:8px}.suggestion-button{background:#d4d8f0;border:none;padding:6px 12px;border-radius:12px;display:flex;gap:12px;cursor:pointer;transition:all .2s;font-size:14px;font-weight:500;color:#1a1a1d;width:100%;text-align:center;align-items:center;justify-content:center}.suggestion-button:hover{background:#c5caeb;transform:translateY(-1px)}.suggestion-icon{font-size:18px}.chat-modal-input{padding:8px 16px;background:#fff;border-top:1px solid #e5e5e7;display:flex;flex-direction:column;gap:8px;box-shadow:0 -5px 8px 4px #0000000d;border-radius:12px 12px 0 0}.chat-modal-input-row{display:flex;gap:12px;align-items:center}.chat-modal-input input{flex:1;padding:14px 18px;border:1px solid #e5e5e7;border-radius:12px;outline:none;font-size:16px;color:#1a1a1d;transition:all .2s;height:44px}.chat-modal-input input::placeholder{color:#999}.chat-modal-input input:focus{border-color:#5b7fff;box-shadow:0 0 0 3px #5b7fff1a}.chat-modal-input input:disabled{opacity:.6;cursor:not-allowed;background:#f5f5f7}.send-button{width:40px;height:40px;border-radius:50%;background:#5b7fff;border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}.send-button:hover:not(:disabled){background:#4a6fee;transform:scale(1.05)}.send-button:disabled{opacity:.4;cursor:not-allowed}.chat-modal-messages::-webkit-scrollbar{width:6px}.chat-modal-messages::-webkit-scrollbar-thumb{background:#d1d1d6;border-radius:3px}@media(max-width:640px){.chat-modal{width:100%;height:100dvh;max-height:100dvh;border-radius:12px 12px 0 0;margin:0}}.action-status{padding:6px 10px;border-radius:6px;font-size:.8em;font-weight:500}.action-status-submitted{background:#fef3c7;color:#92400e;border:1px solid #fde68a}.action-status-success{background:#d1fae5;color:#065f46;border:1px solid #a7f3d0}.action-status-fail{background:#fee2e2;color:#991b1b;border:1px solid #fca5a5;overflow:hidden;text-overflow:ellipsis}.action-status-link{color:inherit;font-weight:600;text-decoration:underline}.action-status-link:hover{opacity:.8}.message-action-buttons{display:flex;flex-direction:column;gap:6px;margin-top:10px}.message-action-button{width:100%;padding:8px 12px;background:#fffffff2;border:1px solid #e0e0e0;border-radius:12px;font-size:13px;font-weight:500;font-family:inherit;color:#1a1a1d;text-align:center;white-space:normal;cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .15s,box-shadow .15s}.message-action-button:disabled{opacity:.55;cursor:not-allowed}@media(min-width:640px){.message-action-button:not(:disabled):hover{background:#fff;border-color:#007aff;color:#007aff;transform:translateY(-1px);box-shadow:0 2px 8px #007aff26}}.action-form{background:#f8f9fb;border:1px solid #e2e6ea;border-radius:10px;padding:12px;margin-top:8px;margin-bottom:8px;display:flex;flex-direction:column;gap:10px}.action-form-title{font-weight:600;font-size:.9em;color:#1a1a2e;display:flex;align-items:center;gap:6px}.action-form-general-error{background:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:10px 12px;font-size:.8em;color:#dc2626;font-weight:500;display:flex;align-items:center;gap:6px}.action-form-fields{display:flex;flex-direction:column;gap:8px}.action-form-field{display:flex;flex-direction:column;gap:3px}.action-form-field label{font-size:.75em;font-weight:500;color:#6b7280}.action-form-field input,.action-form-field textarea{padding:8px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:16px;background:#fff;color:#1a1a2e;outline:none;transition:border-color .2s;font-family:inherit}.action-form-field textarea{resize:none;word-break:break-all}.action-form-field input:focus,.action-form-field textarea:focus{border-color:#0b3988;box-shadow:0 0 0 2px #6c5ce726}.action-form-field input.error,.action-form-field textarea.error{border-color:#ef4444}.action-form-field input.readonly,.action-form-field textarea.readonly{background:#f3f4f6;color:#6b7280;cursor:not-allowed;border-color:#e5e7eb}.action-form-field .field-error{font-size:.7em;color:#ef4444;margin-top:1px}.action-form-actions{display:flex;gap:8px}.action-form-submit{flex:1;padding:8px 14px;background:#0b3988;color:#fff;border:none;border-radius:6px;font-size:.85em;font-weight:500;cursor:pointer;transition:background .2s}.action-form-submit:hover:not(:disabled){background:#5a4bd1}.action-form-submit:disabled{background:#a5b4fc;cursor:not-allowed}.action-form-cancel{padding:8px 14px;background:transparent;color:#6b7280;border:1px solid #d1d5db;border-radius:6px;font-size:.85em;font-weight:500;cursor:pointer;transition:all .2s}.action-form-cancel:hover{background:#f3f4f6;color:#374151}.action-form-token-info{background:#eef2ff;border:1px solid #c7d2fe;border-radius:8px;padding:8px 10px}.token-info-row{display:flex;align-items:center;gap:8px}.token-info-logo{border-radius:50%;flex-shrink:0}.token-info-details{display:flex;flex-direction:column;gap:2px;min-width:0}.token-info-name{font-size:.8em;font-weight:600;color:#1a1a2e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.token-info-balance{font-size:.75em;color:#4b5563}.token-info-usd{color:#0b3988;font-weight:500}.action-form-field-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.action-form-field-header .action-form-field-label{margin-bottom:0;font-size:12px;font-weight:500;color:#6b7280}.action-form-pct-btns{display:inline-flex;gap:4px}.action-form-pct-btn{padding:1px 6px;font-size:.7em;font-weight:600;color:#0b3988;background:#eef2ff;border:1px solid #c7d2fe;border-radius:4px;cursor:pointer;transition:all .15s}@media(min-width:640px){.action-form-pct-btn:hover:not(:disabled){background:#0b3988;color:#fff}}.action-form-pct-btn:disabled{opacity:.5;cursor:not-allowed}.action-form-max-btn{font-weight:700}.action-form-nft-info{text-align:center;display:flex;align-items:center;justify-content:center}.nft-info-image{width:80px;height:80px;border-radius:8px;object-fit:contain;background:#e5e7eb;padding:4px}.buy-token-confirm{display:flex;flex-direction:column;gap:4px;margin-top:10px;padding:12px;border-radius:12px;background:#f8f9fb;border:1px solid #e5e5e7;font-size:13px}.buy-token-confirm__row{display:flex;align-items:center;gap:6px;color:#1a1a1d;font-size:14px;font-weight:600;word-break:break-word}.buy-token-confirm__label{color:#6b7280;font-weight:500}.buy-token-confirm__arrow{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;background:#eef0f4;color:#6b7280;font-size:14px;line-height:1}.buy-token-confirm__prompt{margin-top:2px;color:#4b5563;font-size:13px;font-weight:500}.container-buy-token-confirm{display:flex;flex-direction:column;gap:8px}.swap-token-confirm{display:flex;flex-direction:column;gap:4px;margin-top:10px;padding:12px;border-radius:12px;background:#f8f9fb;border:1px solid #e5e5e7;font-size:13px}.swap-token-confirm__row{display:flex;align-items:center;gap:6px;color:#1a1a1d;font-size:14px;font-weight:600;word-break:break-word}.swap-token-confirm__label{color:#6b7280;font-weight:500}.swap-token-confirm__arrow{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;background:#eef0f4;color:#6b7280;font-size:14px;line-height:1}.swap-token-confirm__prompt{margin-top:2px;color:#4b5563;font-size:13px;font-weight:500}.container-swap-token-confirm{display:flex;flex-direction:column;gap:8px}.scroll-to-bottom-btn{position:absolute;bottom:16px;right:20px;background:#1a1a1dd6;color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:50%;width:36px;height:36px;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #00000040;z-index:20;transition:background .15s,transform .15s,box-shadow .15s;animation:fadeInUp .18s ease}@keyframes fadeInUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(min-width:640px){.scroll-to-bottom-btn:hover{background:#2d2d35;box-shadow:0 6px 16px #0000004d;transform:scale(1.08)}}.scroll-to-bottom-btn:active{transform:scale(.96)}.message-content{display:block;word-wrap:break-word;overflow-wrap:break-word;max-width:100%;overflow:hidden;font-size:inherit;line-height:1.5;white-space:normal}.message-content>*:first-child{margin-top:0}.message-content>*:last-child{margin-bottom:0}.message-content p{margin:.4em 0;word-break:break-word}.message-content ul{margin:.15em 0;padding-left:1.4em;list-style:disc outside}.message-content ol{margin:.15em 0;padding-left:1.4em;list-style:decimal outside}.message-content li{margin:0;padding-left:.15em}.message-content li>p{margin:0}.message-content table{border-collapse:collapse;margin:.4em 0;font-size:.92em}.message-content th,.message-content td{border:1px solid #d0d7de;padding:3px 8px;text-align:left}.message-content th{background:#f6f8fa;font-weight:600}.mc-heading{font-weight:600;margin:.3em 0;word-break:break-word}.mc-h1{font-size:1.4em}.mc-h2{font-size:1.2em}.mc-h3{font-size:1.05em}.mc-inline-code{background:#afb8c133;padding:1px 5px;border-radius:3px;font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.88em}.mc-codeblock{display:block;background:#f6f8fa;border:1px solid #d0d7de;border-radius:6px;margin:6px 0;overflow:hidden;max-width:100%}.mc-codeblock-lang{display:block;background:#e8ecf0;padding:3px 10px;font-size:.75em;font-weight:600;color:#57606a;text-transform:uppercase;font-family:Monaco,Menlo,monospace;border-bottom:1px solid #d0d7de}.mc-codeblock pre{margin:0;padding:10px;overflow-x:auto}.mc-codeblock code{font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.85em;line-height:1.5;color:#24292f;white-space:pre}.mc-link{color:#0969da;text-decoration:none;word-break:break-word}.mc-link:hover{text-decoration:underline}.mc-image{max-width:150px;width:150px;height:150px;object-fit:contain;border-radius:8px;margin:8px 0;display:block}.mc-image-inline{width:20px;height:20px;border-radius:50%;margin:0 4px;display:inline-block;vertical-align:middle;object-fit:cover}.mc-blockquote{margin:4px 0;padding:2px 0 2px 12px;color:#57606a;border-left:3px solid #d0d7de}.mc-hr{height:1px;border:0;background:#d0d7de;margin:.4em 0}.message-content strong{font-weight:600}.message-content del{text-decoration:line-through}.mc-link-previews{display:flex;flex-direction:column;gap:6px;margin-top:6px}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
2
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import r,{createContext as i,useState as o,useCallback as a,useContext as s,useMemo as c,memo as u,useEffect as l,useRef as f}from"react";import{AgentCore as d,MoralisService as h}from"keyring-agent-core";const p={chatTitle:"Keyring Agent",closeChat:"Close chat",messagePlaceholder:"Message ....",sendMessage:"Send message",botIsTyping:"Bot is typing",canIHelpYou:"Can I help you with anything?",suggestionAskText:"Ask a question",suggestionAskUserMessage:"I have a question",suggestionAskBotReply:"Ask me anything",suggestionBuyText:"Buy trending token",walletConnectedChainUnsupported:"Your wallet is connected but the chain is not supported for trading. Please switch to a supported chain to see trending tokens.",walletNotConnected:"Please connect your wallet to see trending tokens.",actionProcessing:"⏳ Processing transaction...",actionSuccess:"Transaction completed",actionFail:"❌ Action cancelled or failed",txSubmitted:"⏳ Transaction submitted. Waiting for confirmation...",txConfirmed:"Transaction confirmed!",txReverted:"❌ Transaction reverted on-chain.",txTimeout:"Transaction submitted but confirmation timed out. Please check manually.",txSuccessful:"Transaction successful!",txFailed:"❌ Transaction failed. Please try again.",txNoHandler:"No transaction handler configured.",txInsufficientGas:"**Insufficient {symbol} for gas!** You have {balance} {symbol} but need ~{fee} {symbol} for the transaction fee. Please top up your wallet and try again.",txError:"❌ Error: {message}",txErrRecipientRequired:"Recipient address is required.",txErrAmountRequired:"Amount is required.",txErrTokenContractRequired:"Token contract address is required.",txErrSpenderRequired:"Spender address is required.",txErrNftContractRequired:"NFT contract address is required.",txErrTokenIdRequired:"Token ID is required.",txErrWrapUnsupported:"Wrapped native token is not supported on chain {chainId}.",txErrUnsupportedAction:'Action "{action}" is not a supported transaction action.',swapConfirmButton:"Confirm",swapConfirmValue:"Confirm swap",swapReadyToProceed:"Ready to proceed with the swap?",swapEstimationError:"Unable to get swap estimation. Error: {error}",formCancel:"Cancel",formExecute:"Execute",formProcessing:"⏳ Processing...",formBalance:"Balance:",formTokenNotFound:"Token not found in your wallet.",formNoBalance:"You have no {symbol} balance in your wallet.",formInsufficientBalance:"Insufficient balance. Spendable: {balance} {symbol}",formFieldRequired:"{field} is required",formInvalidAddress:"Invalid address (Must contain 0x and 40 hex chars)",formMustBePositive:"Must be a positive number",formMustBeValidNumber:"Must be a valid number",openChat:"Open chat",openChatTitle:"Open chat support",walletBalanceSpendable:"This is the spendable balance of your wallet on {chain} chain. Please choose the coins you want to use for this trade.",walletNoTokensFound:"Sorry, I couldn't find any tokens in your wallet on {chain} chain. Please make sure you have some tokens to trade.",walletFetchFailed:"Sorry, I could not fetch your wallet balance. Please try again.",walletFetchError:"Sorry, I encountered an error fetching your wallet balance.",insufficientFeeToken:"Insufficient fee. Please ensure you have enough {symbol} to cover the transaction fees, or select a different token.",selectAmountOf:"Select the amount of {symbol} to use:\n\nSpendable: {balance} {symbol}",swapFeeWarning:"\n**Insufficient {symbol} for fees!**\n You have {balance} {symbol} but need ~{needed} {symbol}.\n",swapNeedApprove:"You need to approve {symbol} first before swapping.",swapApproveButton:"Approve {symbol}",swapApproveValue:"Approve {symbol} for swap",swapNoSourceToken:"You don't have the source token in your wallet or balance is 0.",swapSelectAmount:"Swap {from} → {to}\n\nSelect the amount of {from} to swap:\n\nSpendable: {balance} {from}",swapApprovalRequired:"Token approval required before swapping.\n\nStep 1: Approve {symbol}\nStep 2: Confirm Swap",swapEstimationFailed:"Failed to get swap estimation. Please try again.",swapInsufficientNativeBalance:"Insufficient balance! You have {balance} {symbol} but need {amount} {symbol}. Please top up your wallet or reduce the amount.",swapTokenNotInWallet:"You don't have {symbol} in your wallet. Please acquire some first before swapping.",swapInsufficientTokenBalance:"Insufficient balance! You have {balance} {symbol} but need {amount} {symbol}. Please reduce the amount or add more tokens.",selectAmountToSwap:"Select the amount of {symbol} to swap:\n\nSpendable: {balance} {symbol}",couldNotLoadTokenList:"Could not load token list. Please specify the destination token.",trendingTokensForReceive:"📈 Trending tokens on {chain} chain. Pick the token you want to receive or type the token you want to receive:",txProcessing:"⏳ Transaction processing... Please confirm in your wallet.",txConfirmedSwap:"Transaction confirmed! Your swap has been completed.",txRevertedSwap:"❌ Transaction reverted on-chain. Please try again.",txSuccessfulSwap:"Transaction successful! Your swap has been completed.",txSuccessfulSendToken:"Sent successfully **{amount} {symbol}** to {to}",txSuccessfulSendNative:"Sent successfully **{amount} {symbol}** to {to}",txSuccessfulSendNft:"Sent successfully NFT **{name}** (#{tokenId}) to {to}",txSuccessfulWrapNative:"Wrapped successfully **{amount} {from}** → **{to}**",txSuccessfulUnwrapNative:"Unwrapped successfully **{amount} {from}** → **{to}**",txDataNotAvailable:"Transaction data not available.",approvalDataNotAvailable:"Approval data not available.",approving:"Approving {symbol}... Please confirm in your wallet.",approvalSuccess:"{symbol} approved successfully!",approvalConfirmSwap:"Now you can execute the swap.",confirmSwapButton:"Confirm Swap",approvalFailed:"❌ Approval failed. Please try again.",couldNotFetchBalance:"Could not fetch your wallet balance.",couldNotLoadBalance:"Could not load balance. Please try again.",couldNotFetchBalanceRetry:"Could not fetch your balance. Please try again.",nftSendReview:"📤 Send **{name}** ({standard} #{tokenId})\n\nPlease review and fill in the recipient address below:",nftCollectionHeader:"Your NFTs :\n\n{list}",nftMoreItems:"\n\nAnd {count} more NFTs...",nftSelectBelow:"\n\nSelect an NFT below to send",nftNoCollection:"You don't have any NFTs in your wallet on this chain.",nftMultipleMatchesForTokenId:"I found {count} NFTs with Token ID #{tokenId} in your wallet. Please select the one you want to send:",nftNotFoundInWallet:"I couldn't find \"{name}\" in your NFT collection. You don't own this NFT on this chain.",nftFetchError:"Sorry, I encountered an error fetching your NFTs.",trendingTokensHeader:"📈 Here is the list of tokens that are currently trending upwards on {chain} chain",trendingTokensQuestion:"\nIs there any token you want to buy?",trendingTokensError:"Sorry, I encountered an error fetching trending tokens.",errorProcessingRequest:"Sorry, I encountered an error processing your request.Please try again in a few moments.",buttonBuyWith:"Buy with {symbol}",buttonUsePercent:"Use {percent}% of {symbol}",buttonBuyToken:"Buy {name} ({symbol})",buttonSendNft:"Send {name}",buttonSwapTo:"Swap to {name} ({symbol})",buttonBuySymbol:"Buy {symbol}",viewBalancesLoading:"Fetching your wallet balances...",viewBalancesHeader:"Your token balances on {chain}:\n\n{list}",viewBalancesEmpty:"You don't have any tokens in your wallet on this chain.",viewBalancesFetchError:"Sorry, I encountered an error fetching your balances.",buttonSendToken:"Send {symbol}",formMax:"MAX",buttonSwapToken:"Swap {symbol}",buttonBuyMoreToken:"Buy more {symbol}",actionSendNativeLabel:"Send Native Token",actionSendNativeDesc:"Send native token (ETH, BNB, MATIC, etc.) to an address",actionSendTokenLabel:"Send Token (ERC20)",actionSendTokenDesc:"Send an ERC20 token to an address",actionSwapTokenLabel:"Swap Token",actionSwapTokenDesc:"Swap one token for another",actionApproveTokenLabel:"Approve Token",actionApproveTokenDesc:"Approve a spender to use your tokens",actionWrapNativeLabel:"Wrap Native Token",actionWrapNativeDesc:"Wrap native token (ETH → WETH)",actionUnwrapNativeLabel:"Unwrap Native Token",actionUnwrapNativeDesc:"Unwrap native token (WETH → ETH)",actionSendNftLabel:"Send NFT",actionSendNftDesc:"Transfer an ERC721 or ERC1155 NFT to another address",fieldToAddress:"Recipient Address",fieldAmount:"Amount",fieldTokenContract:"Token Contract",fieldTokenSymbol:"Token Symbol",fieldDecimals:"Decimals",fieldTokenIn:"From Token",fieldTokenInSymbol:"From Symbol",fieldTokenOut:"To Token",fieldTokenOutSymbol:"To Symbol",fieldTokenInDecimals:"From Decimals",fieldTokenOutDecimals:"To Decimals",fieldSpenderAddress:"Spender Address",fieldAmountUnlimited:"Amount (empty = unlimited)",fieldNftContract:"NFT Contract",fieldTokenId:"Token ID",fieldTokenStandard:"Token Standard",fieldNftName:"NFT Name",formMustBePositiveInteger:"Must be a positive integer",formAmountExceedsNft:"Amount cannot exceed available balance {max}",receivedButtonValue:"Received: {value}",actionExecutedFor:'Action "{action}" executed for: {value}',buyTokenHelp:"I'll help you buy {symbol}. Let me show your available tokens to trade with.",tokenNotFoundOnChain:'I couldn\'t find the token "{symbol}" on this chain. Here are the trending tokens you can buy',swapPreparing:"Preparing your swap...",swapConfirmYes:"Yes",swapChooseFrom:"Please choose which token you want to swap from:",swapChooseTo:"You want to swap {symbol}. Please choose which token you want to receive:",swapNeedDetails:'I need more details for your swap. Please specify which tokens you want to swap (e.g. "Swap 1 ETH to USDC").',viewNftsLoading:"Let me show you your NFT collection!",sendTokenNotInWallet:"You don't have {symbol} in your wallet on this chain. Please acquire some first before sending.",sendTokenChoose:"Which token would you like to send?",sendNftChoose:"Which NFT would you like to send?",swapChooseToken:"Which token would you like to swap? Here are your current balances:",spendable:"Spendable",welcomeMessage:"**Welcome! 🚀**\nYou’re now connected and ready to explore the world of Blockchain. I can assist you anytime with NFT insights, trading, price tracking, and portfolio analysis.",sendOtherNfts:"\nIf the NFT you want to send is not in the list above, please visit our website to send it.",sendNftViaWebsite:"Please select the NFT you would like to send from the list and proceed via this website.",sendNftViaWebsiteWithLink:"Please select the NFT you would like to send from the list and proceed via [this website]({link}).",viewNftViaWebsite:"Please view your NFT collection on this website for more details.",viewNftViaWebsiteWithLink:"Please view your NFT collection on [this website]({link}) for more details.",buyingOnChain:"Buying {symbol} on {chain}",viewOnExplorer:"View on Explorer",copyWalletAddress:"Copy wallet address",copied:"Copied!",copyAddress:"Copy address",poolGeneralInfoIntro:"💧 **Liquidity Pools** are smart contracts where users deposit token pairs to provide liquidity for DEX trading (like Uniswap). Liquidity providers (LPs) earn trading fees from each swap.",poolGeneralInfoMetricsTitle:"**Key Metrics:**",poolGeneralInfoMetricTVL:"**TVL** - Total Value Locked in the pool",poolGeneralInfoMetricAPR:"**APR** - Estimated annual return from fees",poolGeneralInfoMetricVol24h:"**Volume 24h** - Trading volume in last 24 hours",poolGeneralInfoMetricFeeTier:"**Fee Tier** - Trading fee (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'Try asking something specific, like: *"ETH/USDC pools on Base"* or *"Highest APR pools"*.',poolNoMatch:"❌ No matching pools found.",poolNoMatchForTokenOnChain:"❌ No matching pools found for **{token}** on **{chain}**.",poolSuggestionsTitle:"💡 **Suggestions:**",poolSuggestionTryChain:"Try a different chain (Ethereum, Base, Arbitrum...)",poolSuggestionTryPair:"Try a more popular pair (ETH/USDC, ETH/USDT)",poolSuggestionRelaxFilters:"Remove filters if too narrow",poolHeaderBest:"🏆 Best Pool",poolHeaderSafe:"🛡️ Safest Pools",poolHeaderTrending:"🔥 Trending Pools",poolHeaderHighApr:"📈 Highest APR Pools",poolHeaderLowFee:"💰 Lowest Fee Pools",poolHeaderCompare:"⚖️ Pool Comparison",poolHeaderDetail:"🔎 Pool Details",poolHeaderGeneral:"💧 Pool Info",poolHeaderSearch:"🔍 Search Results",poolTableMetric:"Metric",poolTableValue:"Value",poolTableLink:"Link",poolLinkView:"View on Uniswap",poolRecommendationHighApr:"👉 **Recommended:** [{pair}]({link}) - Highest APR at **{apr}%**. _Note: Higher APR may come with higher risk._",poolRecommendationLowFee:"👉 **Recommended:** [{pair}]({link}) - Lowest fee at **{fee}%**, ideal for frequent trading.",poolRecommendationSafe:"👉 **Recommended:** [{pair}]({link}) - Highest TVL at **{tvl}**, deep liquidity and stable.",poolRecommendationTrending:"👉 **Most Active:** [{pair}]({link}) - 24h Volume **{volume}**, highest trading activity.",poolRecommendationTopPick:"👉 **Top pick:** [{pair}]({link}) - TVL **{tvl}**, best match for your criteria.",sendPositionNoId:'Please provide your LP position ID to send it. For example: "send position 12345 to 0x...".',sendPositionNotFound:"Position #{id} was not found in your wallet on {chain}. Please make sure you own this position.",sendPositionReview:"📤 Send LP Position **#{positionId}** ({pair})\n\nPlease enter the recipient address below:",sendPositionFetchError:"Error fetching your positions. Please try again.",poolUnsupportedChain:"This chain is not supported for data queries. Sorry for the inconvenience.",poolUniswapV3Only:"I can only get information of pools that is on Subgraph Uniswap V3.",today:"Today",yesterday:"Yesterday"},m={chatTitle:"Keyring Agent",closeChat:"チャットを閉じる",messagePlaceholder:"メッセージを入力...",sendMessage:"メッセージを送信",botIsTyping:"ボットが入力中...",canIHelpYou:"何かお手伝いできることはございますか?",suggestionAskText:"質問・調査のお願い",suggestionAskUserMessage:"質問があります",suggestionAskBotReply:"何でも聞いてください",suggestionBuyText:"トレンドトークンを購入",walletConnectedChainUnsupported:"ウォレットは接続されていますが、このチェーンは取引に対応していません。トレンドのトークンを表示するには、対応しているチェーンに切り替えてください。",walletNotConnected:"トレンドのトークンを表示するには、ウォレットを接続してください。",actionProcessing:"⏳ トランザクションを処理中...",actionSuccess:"トランザクションが完了しました",actionFail:"❌ アクションがキャンセルされたか、失敗しました",txSubmitted:"⏳ トランザクションを送信しました。確認を待機中...",txConfirmed:"トランザクションが確認されました!",txReverted:"❌ オンチェーンでトランザクションがリバートされました。",txTimeout:"トランザクションは送信されましたが、タイムアウトしました。手動で確認してください。",txSuccessful:"トランザクションに成功しました!",txFailed:"❌ トランザクションに失敗しました。もう一度お試しください。",txNoHandler:"トランザクションハンドラーが設定されていません。",txInsufficientGas:"**ガス代({symbol})が不足しています!** 保有量は {balance} {symbol} ですが、手数料に約 {fee} {symbol} 必要です。ウォレットにチャージして再試行してください。",txError:"❌ エラー: {message}",txErrRecipientRequired:"送金先アドレスを入力してください。",txErrAmountRequired:"数量を入力してください。",txErrTokenContractRequired:"トークンのコントラクトアドレスを入力してください。",txErrSpenderRequired:"スペンダーアドレスを入力してください。",txErrNftContractRequired:"NFTのコントラクトアドレスを入力してください。",txErrTokenIdRequired:"トークンIDを入力してください。",txErrWrapUnsupported:"チェーン {chainId} ではラップネイティブトークンに対応していません。",txErrUnsupportedAction:"アクション「{action}」はサポートされていない取引アクションです。",swapConfirmButton:"確定",swapConfirmValue:"スワップを確定する",swapReadyToProceed:"スワップを実行しますか?",swapEstimationError:"スワップの見積もりを取得できません。エラー: {error}",formCancel:"キャンセル",formExecute:"実行",formProcessing:"⏳ 処理中...",formBalance:"残高:",formTokenNotFound:"ウォレット内にトークンが見つかりません。",formNoBalance:"ウォレットに {symbol} の残高がありません。",formInsufficientBalance:"残高不足です。利用可能: {balance} {symbol}",formFieldRequired:"{field} は必須項目です",formInvalidAddress:"無効なアドレスです(0x + 40文字である必要があります)",formMustBePositive:"正の数値を入力してください",formMustBeValidNumber:"有効な数値を入力してください",openChat:"チャットを開く",openChatTitle:"チャットサポートを開く",walletBalanceSpendable:"これは {chain} チェーン上のウォレットの利用可能な残高です。この取引に使用するコインを選択してください。",walletNoTokensFound:"申し訳ありませんが、{chain} チェーン上のウォレットにトークンが見つかりませんでした。取引するためのトークンを保有しているかご確認ください。",walletFetchFailed:"ウォレット残高を取得できませんでした。もう一度お試しください。",walletFetchError:"ウォレット残高の取得中にエラーが発生しました。",insufficientFeeToken:"手数料が不足しています。取引手数料をカバーするのに十分な {symbol} を保有しているか、別のトークンを選択してください。",selectAmountOf:"使用する {symbol} の数量を選択してください:\n\n利用可能: {balance} {symbol}",swapFeeWarning:"\n**手数料の {symbol} が不足しています!**\n 保有量は {balance} {symbol} ですが、~{needed} {symbol} 必要です。\n",swapNeedApprove:"スワップを行う前に、まず {symbol} の承認が必要です。",swapApproveButton:"{symbol} を承認する",swapApproveValue:"スワップのために {symbol} を承認",swapNoSourceToken:"ウォレットにソーストークンがないか、残高が 0 です。",swapSelectAmount:"スワップ {from} → {to}\n\nスワップする {from} の数量を選択してください:\n\n利用可能: {balance} {from}",swapApprovalRequired:"スワップの前にトークンの承認が必要です。\n\nステップ 1: {symbol} を承認\nステップ 2: スワップを確定",swapEstimationFailed:"スワップの見積もり取得に失敗しました。もう一度お試しください。",swapInsufficientNativeBalance:"残高不足です! 保有量は {balance} {symbol} ですが、{amount} {symbol} 必要です。ウォレットにチャージするか、数量を減らしてください。",swapTokenNotInWallet:"ウォレットに {symbol} がありません。スワップする前にまず入手してください。",swapInsufficientTokenBalance:"残高不足です! 保有量は {balance} {symbol} ですが、{amount} {symbol} 必要です。数量を減らすか、トークンを追加してください。",selectAmountToSwap:"スwaップする {symbol} の数量を選択してください:\n\n利用可能: {balance} {symbol}",couldNotLoadTokenList:"トークンリストを読み込めませんでした。受け取り希望のトークンを指定してください。",trendingTokensForReceive:"📈 {chain} チェーンのトレンドトークン。受け取りたいトークンを選択するか、入力してください:",txProcessing:"⏳ トランザクション処理中... ウォレットで承認してください。",txConfirmedSwap:"トランザクションが確認されました!スワップが完了しました。",txRevertedSwap:"❌ オンチェーンでトランザクションがリバートされました。もう一度お試しください。",txSuccessfulSwap:"トランザクションに成功しました!スワップが完了しました。",txSuccessfulSendToken:"**{amount} {symbol}** を {to} に送信しました",txSuccessfulSendNative:"**{amount} {symbol}** を {to} に送信しました",txSuccessfulWrapNative:"**{amount} {from}** を **{to}** にラップしました",txSuccessfulUnwrapNative:"**{amount} {from}** を **{to}** にアンラップしました",txSuccessfulSendNft:"NFT **{name}** (#{tokenId}) を {to} に送信しました",txDataNotAvailable:"トランザクションデータが利用できません。",approvalDataNotAvailable:"承認データが利用できません。",approving:"{symbol} を承認中... ウォレットで確認してください。",approvalSuccess:"{symbol} の承認に成功しました!",approvalConfirmSwap:"これでスワップを実行できます。",confirmSwapButton:"スワップを確定する",approvalFailed:"❌ 承認に失敗しました。もう一度お試しください。",couldNotFetchBalance:"ウォレット残高を取得できませんでした。",couldNotLoadBalance:"残高を読み込めませんでした。もう一度お試しください。",couldNotFetchBalanceRetry:"残高を取得できませんでした。もう一度お試しください。",nftSendReview:"📤 **{name}** ({standard} #{tokenId}) を送信\n\n内容を確認し、以下に受信者のアドレスを入力してください:",nftCollectionHeader:"您的 NFT 资产:\n\n{list}",nftMoreItems:"\n\n以及其他 {count} 件 NFT...",nftSelectBelow:"\n\n请在下方选择要发送的 NFT",nftNoCollection:"このチェーン上のウォレットにNFTは見つかりませんでした。",nftMultipleMatchesForTokenId:"ウォレット内にToken ID #{tokenId} のNFTが{count}件見つかりました。送信したいNFTを選択してください:",nftNotFoundInWallet:'あなたのNFTコレクションに "{name}" が見つかりませんでした。このチェーンでこのNFTを所有していません。',nftFetchError:"申し訳ありませんが、NFTの取得中にエラーが発生しました。",trendingTokensHeader:"📈 {chain} チェーンで現在価格が上昇中のトレンドトークン一覧です:",trendingTokensQuestion:"\n購入したいトークンはありますか?",trendingTokensError:"トレンドトークンの取得中にエラーが発生しました。",errorProcessingRequest:"リクエストの処理中にエラーが発生しました。しばらく時間を置いてからもう一度お試しください。",buttonBuyWith:"{symbol} で購入",buttonUsePercent:"{symbol}の{percent}%を使用",buttonBuyToken:"{name} ({symbol}) を購入",buttonSendNft:"{name} を送信",buttonSwapTo:"{name} ({symbol}) にスワップ",buttonBuySymbol:"{symbol} を購入",viewBalancesLoading:"ウォレットの残高を取得中...",viewBalancesHeader:"{chain} 上のトークン残高:\n\n{list}",viewBalancesEmpty:"このチェーン上のウォレットにトークンは見つかりませんでした。",viewBalancesFetchError:"残高の取得中にエラーが発生しました。",buttonSendToken:"{symbol} を送信",formMax:"最大",buttonSwapToken:"{symbol} をスワップ",buttonBuyMoreToken:"{symbol} をさらに入手",actionSendNativeLabel:"ネイティブトークンを送信",actionSendNativeDesc:"ネイティブトークン (ETH, BNB, MATIC など) をアドレスに送信します",actionSendTokenLabel:"トークンを送信 (ERC20)",actionSendTokenDesc:"ERC20トークンをアドレスに送信します",actionSwapTokenLabel:"トークンをスワップ",actionSwapTokenDesc:"トークンを別のトークンに交換します",actionApproveTokenLabel:"トークンを承認",actionApproveTokenDesc:"支出元(Spender)によるトークンの使用を許可します",actionWrapNativeLabel:"ネイティブトークンをラップ",actionWrapNativeDesc:"ネイティブトークンをラップします (ETH → WETH)",actionUnwrapNativeLabel:"ネイティブトークンをアンラップ",actionUnwrapNativeDesc:"ネイティブトークンをアンラップします (WETH → ETH)",actionSendNftLabel:"NFTを送信",actionSendNftDesc:"ERC721またはERC1155 NFTを別のアドレスに転送します",fieldToAddress:"受信者アドレス",fieldAmount:"数量",fieldTokenContract:"トークンコントラクト",fieldTokenSymbol:"トークンシンボル",fieldDecimals:"デシマル (小数桁数)",fieldTokenIn:"元のトークン",fieldTokenInSymbol:"元のシンボル",fieldTokenOut:"先のトークン",fieldTokenOutSymbol:"先のシンボル",fieldTokenInDecimals:"元のデシマル",fieldTokenOutDecimals:"先のデシマル",fieldSpenderAddress:"支出元 (Spender) アドレス",fieldAmountUnlimited:"数量 (空欄 = 無制限)",fieldNftContract:"NFTコントラクト",fieldTokenId:"トークンID",fieldTokenStandard:"トークン規格",fieldNftName:"NFT名",formMustBePositiveInteger:"正の整数を入力してください",formAmountExceedsNft:"数量は利用可能な残高 {max} を超えることはできません",receivedButtonValue:"受取額: {value}",actionExecutedFor:"アクション「{action}」が {value} に対して実行されました",buyTokenHelp:"{symbol} の購入をお手伝いします。まず、交換に使用可能なトークンを表示します。",tokenNotFoundOnChain:"このチェーン上でトークン「{symbol}」が見つかりませんでした。購入可能なトレンドトークンはこちらです",swapPreparing:"スワップの準備中...",swapConfirmYes:"はい",swapChooseFrom:"交換元(支払う)トークンを選択してください:",swapChooseTo:"{symbol} をスワップします。受け取りたいトークンを選択してください:",swapNeedDetails:"スワップの詳細が必要です。交換したいトークンを指定してください(例:「1 ETH を USDC にスワップ」)。",viewNftsLoading:"あなたのNFTコレクションを表示します!",sendTokenNotInWallet:"このチェーンのウォレットに {symbol} がありません。送信する前にまず入手してください。",sendTokenChoose:"どのトークンを送信しますか?",sendNftChoose:"どのNFTを送信しますか?",swapChooseToken:"どのトークンをスワップしますか?現在の残高はこちらです:",spendable:"利用可能",welcomeMessage:"**ようこそ! 🚀**\n次世代のブロックチェーンへ。NFT情報、トレード、価格チェック、ポートフォリオ分析など、いつでもお手伝いします。",sendOtherNfts:"\n送信したいNFTが上記のリストにない場合は、当ウェブサイトにアクセスして送信してください。",sendNftViaWebsite:"送信したいNFTをリストから選択し、当ウェブサイトで手続きを進めてください。",sendNftViaWebsiteWithLink:"送信したいNFTをリストから選択し、[当ウェブサイト]({link})で手続きを進めてください。",viewNftViaWebsite:"NFTコレクションの詳細は、当ウェブサイトでご確認ください。",viewNftViaWebsiteWithLink:"NFTコレクションの詳細は、[当ウェブサイト]({link})でご確認ください。",buyingOnChain:"{chain} チェーンで {symbol} を購入中",viewOnExplorer:"エクスプローラーで見る",copyWalletAddress:"ウォレットアドレスをコピー",copied:"コピーしました!",copyAddress:"アドレスをコピー",poolGeneralInfoIntro:"💧 **流動性プール** は、ユーザーがトークンペアを預けてDEX取引(Uniswap など)の流動性を提供するスマートコントラクトです。LP は各スワップの手数料を獲得します。",poolGeneralInfoMetricsTitle:"**主要メトリクス:**",poolGeneralInfoMetricTVL:"**TVL** - プールにロックされている総価値",poolGeneralInfoMetricAPR:"**APR** - 手数料に基づく年間想定利回り",poolGeneralInfoMetricVol24h:"**24時間出来高** - 直近24時間の取引量",poolGeneralInfoMetricFeeTier:"**手数料ティア** - 取引手数料 (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'例: *"Base の ETH/USDC プール"* や *"APR が高いプール"* のように聞いてみてください。',poolNoMatch:"❌ 条件に一致するプールが見つかりませんでした。",poolNoMatchForTokenOnChain:"❌ **{chain}** 上で **{token}** に一致するプールが見つかりませんでした。",poolSuggestionsTitle:"💡 **提案:**",poolSuggestionTryChain:"別のチェーンを試す (Ethereum, Base, Arbitrum...)",poolSuggestionTryPair:"より一般的なペアを試す (ETH/USDC, ETH/USDT)",poolSuggestionRelaxFilters:"フィルター条件を緩める",poolHeaderBest:"🏆 最適なプール",poolHeaderSafe:"🛡️ 安全性の高いプール",poolHeaderTrending:"🔥 トレンドプール",poolHeaderHighApr:"📈 APRの高いプール",poolHeaderLowFee:"💰 手数料の低いプール",poolHeaderCompare:"⚖️ プール比較",poolHeaderDetail:"🔎 プール詳細",poolHeaderGeneral:"💧 プール情報",poolHeaderSearch:"🔍 検索結果",poolTableMetric:"指標",poolTableValue:"値",poolTableLink:"リンク",poolLinkView:"Uniswapで表示",poolRecommendationHighApr:"👉 **おすすめ:** [{pair}]({link}) - APR は **{apr}%** で最も高いです。_注意: APR が高いほどリスクも高い可能性があります。_",poolRecommendationLowFee:"👉 **おすすめ:** [{pair}]({link}) - 手数料 **{fee}%** で、頻繁な取引に適しています。",poolRecommendationSafe:"👉 **おすすめ:** [{pair}]({link}) - TVL **{tvl}** で流動性が厚く安定しています。",poolRecommendationTrending:"👉 **最も活発:** [{pair}]({link}) - 24時間出来高 **{volume}** で取引が最も活発です。",poolRecommendationTopPick:"👉 **トップ候補:** [{pair}]({link}) - TVL **{tvl}**、条件に最も適合しています。",sendPositionNoId:'LP ポジション ID を提供してください。例:"ポジション 12345 を 0x... に送信"。',sendPositionNotFound:"{chain} 上のウォレットにポジション #{id} が見つかりませんでした。このポジションを所有していることを確認してください。",sendPositionReview:"📤 LP ポジション **#{positionId}** ({pair}) を送信\n\n受取人アドレスを以下に入力してください:",sendPositionFetchError:"ポジションの取得中にエラーが発生しました。もう一度お試しください。",poolUnsupportedChain:"このチェーンはデータクエリに対応していません。ご不便をおかけして申し訳ございません。",poolUniswapV3Only:"Subgraph Uniswap V3 上のプールの情報のみ取得できます。",today:"今日",yesterday:"昨日"},g={en:p,ja:m,cn:{chatTitle:"Keyring Agent",closeChat:"关闭聊天",messagePlaceholder:"请输入消息....",sendMessage:"发送消息",botIsTyping:"机器人正在输入",canIHelpYou:"有什么我可以帮您的吗?",suggestionAskText:"提问",suggestionAskUserMessage:"我有一个问题",suggestionAskBotReply:"随便问我任何事情",suggestionBuyText:"购买热门代币",walletConnectedChainUnsupported:"您的钱包已连接,但当前链不支持交易。请切换到支持的链以查看热门代币。",walletNotConnected:"请连接您的钱包以查看热门代币。",actionProcessing:"⏳ 正在处理交易...",actionSuccess:"交易已完成",actionFail:"❌ 操作取消或失败",txSubmitted:"⏳ 交易已提交。正在等待确认...",txConfirmed:"交易已确认!",txReverted:"❌ 交易在链上被退回(Reverted)。",txTimeout:"交易已提交但确认超时。请手动检查。",txSuccessful:"交易成功!",txFailed:"❌ 交易失败。请重试。",txNoHandler:"未配置交易处理器。",txInsufficientGas:"**{symbol} 余额不足以支付 Gas 费!** 您当前有 {balance} {symbol},但交易费预计需要 ~{fee} {symbol}。请充值钱包后重试。",txError:"❌ 错误: {message}",txErrRecipientRequired:"请填写收款地址。",txErrAmountRequired:"请填写数量。",txErrTokenContractRequired:"请填写代币合约地址。",txErrSpenderRequired:"请填写授权方地址。",txErrNftContractRequired:"请填写 NFT 合约地址。",txErrTokenIdRequired:"请填写 Token ID。",txErrWrapUnsupported:"链 {chainId} 不支持包装原生代币。",txErrUnsupportedAction:"操作“{action}”不是受支持的交易操作。",swapConfirmButton:"确认",swapConfirmValue:"确认兑换",swapReadyToProceed:"准备好进行兑换了吗?",swapEstimationError:"无法获取兑换估算。错误: {error}",formCancel:"取消",formExecute:"执行",formProcessing:"⏳ 正在处理...",formBalance:"余额:",formTokenNotFound:"您的钱包中未找到该代币。",formNoBalance:"您的钱包中没有 {symbol} 余额。",formInsufficientBalance:"余额不足。可用余额: {balance} {symbol}",formFieldRequired:"{field} 是必填项",formInvalidAddress:"无效地址(必须是 0x + 40 个字符)",formMustBePositive:"必须为正数",formMustBeValidNumber:"必须为有效数字",openChat:"打开聊天",openChatTitle:"打开聊天支持",walletBalanceSpendable:"这是您在 {chain} 链上钱包的可选余额。请选择您想用于此次交易的代币。",walletNoTokensFound:"抱歉,我在 {chain} 链上的钱包中没找到任何代币。请确保您有代币可以进行交易。",walletFetchFailed:"抱歉,无法获取您的钱包余额。请重试。",walletFetchError:"抱歉,获取钱包余额时出错。",insufficientFeeToken:"手续费不足。请确保您有足够的 {symbol} 来支付交易费用,或选择其他代币。",selectAmountOf:"选择要使用的 {symbol} 数量:\n\n可用余额: {balance} {symbol}",swapFeeWarning:"\n**手续费所需的 {symbol} 不足!**\n 您当前有 {balance} {symbol},但需要 ~{needed} {symbol}。\n",swapNeedApprove:"在兑换之前,您需要先授权 {symbol}。",swapApproveButton:"授权 {symbol}",swapApproveValue:"授权 {symbol} 以进行兑换",swapNoSourceToken:"您的钱包中没有源代币或余额为 0。",swapSelectAmount:"兑换 {from} → {to}\n\n选择要兑换的 {from} 数量:\n\n可用余额: {balance} {from}",swapApprovalRequired:"兑换前需要代币授权。\n\n第 1 步:授权 {symbol}\n第 2 步:确认兑换",swapEstimationFailed:"获取兑换估算失败。请重试。",swapInsufficientNativeBalance:"余额不足!您有 {balance} {symbol} 但需要 {amount} {symbol}。请充值钱包或减少金额。",swapTokenNotInWallet:"您的钱包中没有 {symbol}。请在兑换前先获取一些代币。",swapInsufficientTokenBalance:"余额不足!您有 {balance} {symbol} 但需要 {amount} {symbol}。请减少金额或添加更多代币。",selectAmountToSwap:"选择要兑换的 {symbol} 数量:\n\n可用余额: {balance} {symbol}",couldNotLoadTokenList:"无法加载代币列表。请指定目标代币。",trendingTokensForReceive:"📈 {chain} 链上的热门代币。请选择您想收到的代币或输入代币名称:",txProcessing:"⏳ 交易处理中... 请在钱包中确认。",txConfirmedSwap:"交易已确认!您的兑换已完成。",txRevertedSwap:"❌ 交易在链上被退回。请重试。",txSuccessfulSwap:"交易成功!您的兑换已完成。",txSuccessfulSendToken:"已成功发送 **{amount} {symbol}** 至 {to}",txSuccessfulSendNative:"已成功发送 **{amount} {symbol}** 至 {to}",txSuccessfulWrapNative:"成功封装 **{amount} {from}** → **{to}**",txSuccessfulUnwrapNative:"成功解封装 **{amount} {from}** → **{to}**",txSuccessfulSendNft:"已成功发送 NFT **{name}** (#{tokenId}) 至 {to}",txDataNotAvailable:"交易数据不可用。",approvalDataNotAvailable:"授权数据不可用。",approving:"正在授权 {symbol}... 请在钱包中确认。",approvalSuccess:"{symbol} 授权成功!",approvalConfirmSwap:"现在您可以执行兑换了。",confirmSwapButton:"确认兑换",approvalFailed:"❌ 授权失败。请重试。",couldNotFetchBalance:"无法获取您的钱包余额。",couldNotLoadBalance:"无法加载余额。请重试。",couldNotFetchBalanceRetry:"无法获取您的余额。请重试。",nftSendReview:"📤 发送 **{name}** ({standard} #{tokenId})\n\n请核对并在下方填写接收者地址:",nftCollectionHeader:"保有中のNFT一覧 :\n\n{list}",nftMoreItems:"\n\n他 {count} 件のNFT...",nftSelectBelow:"\n\n送信するNFTを以下から選択してください",nftNoCollection:"您在该链的钱包中没有任何 NFT。",nftMultipleMatchesForTokenId:"在您的钱包中找到了 {count} 个 Token ID #{tokenId} 的 NFT。请选择您要发送的 NFT:",nftNotFoundInWallet:'我在您的 NFT 收藏中没找到 "{name}"。您在此链上不拥有此 NFT。',nftFetchError:"抱歉,获取您的 NFT 时出错。",trendingTokensHeader:"📈 以下是 {chain} 链上目前呈上升趋势的热门代币列表",trendingTokensQuestion:"\n有您想购买的代币吗?",trendingTokensError:"抱歉,获取热门代币时出错。",errorProcessingRequest:"抱歉,处理您的请求时出错。请稍后再试。",buttonBuyWith:"使用 {symbol} 购买",buttonUsePercent:"使用{percent}%的{symbol}",buttonBuyToken:"购买 {name} ({symbol})",buttonSendNft:"发送 {name}",buttonSwapTo:"兑换为 {name} ({symbol})",buttonBuySymbol:"购买 {symbol}",viewBalancesLoading:"正在获取您的钱包余额...",viewBalancesHeader:"您在 {chain} 上的代币余额:\n\n{list}",viewBalancesEmpty:"您在该链的钱包中没有任何代币。",viewBalancesFetchError:"抱歉,获取您的余额时出错。",buttonSendToken:"发送 {symbol}",formMax:"最多",buttonSwapToken:"兑换 {symbol}",buttonBuyMoreToken:"购买更多 {symbol}",actionSendNativeLabel:"发送原生代币",actionSendNativeDesc:"将原生代币 (ETH, BNB, MATIC 等) 发送到指定地址",actionSendTokenLabel:"发送代币 (ERC20)",actionSendTokenDesc:"将 ERC20 代币发送到指定地址",actionSwapTokenLabel:"兑换代币",actionSwapTokenDesc:"将一种代币兑换为另一种",actionApproveTokenLabel:"授权代币",actionApproveTokenDesc:"授权支出方使用您的代币",actionWrapNativeLabel:"包装 (Wrap) 原生代币",actionWrapNativeDesc:"包装原生代币 (例如 ETH → WETH)",actionUnwrapNativeLabel:"解包 (Unwrap) 原生代币",actionUnwrapNativeDesc:"解包原生代币 (例如 WETH → ETH)",actionSendNftLabel:"发送 NFT",actionSendNftDesc:"将 ERC721 或 ERC1155 NFT 转移到另一个地址",fieldToAddress:"接收者地址",fieldAmount:"金额",fieldTokenContract:"代币合约",fieldTokenSymbol:"代币符号",fieldDecimals:"精度 (Decimals)",fieldTokenIn:"源代币 (From)",fieldTokenInSymbol:"源代币符号",fieldTokenOut:"目标代币 (To)",fieldTokenOutSymbol:"目标代币符号",fieldTokenInDecimals:"源代币精度",fieldTokenOutDecimals:"目标代币精度",fieldSpenderAddress:"支出方 (Spender) 地址",fieldAmountUnlimited:"金额 (留空 = 无限制)",fieldNftContract:"NFT 合约",fieldTokenId:"代币 ID",fieldTokenStandard:"代币标准",fieldNftName:"NFT 名称",formMustBePositiveInteger:"必须为正整数",formAmountExceedsNft:"金额不能超过可用余额 {max}",receivedButtonValue:"收到: {value}",actionExecutedFor:'操作 "{action}" 已执行,对象为: {value}',buyTokenHelp:"我会帮您购买 {symbol}。让我为您显示可用于交易的代币。",tokenNotFoundOnChain:'我在该链上没找到代币 "{symbol}"。以下是您可以购买的热门代币',swapPreparing:"正在准备兑换...",swapConfirmYes:"是",swapChooseFrom:"请选择您想从哪个代币进行兑换:",swapChooseTo:"您想兑换 {symbol}。请选择您想收到的代币:",swapNeedDetails:"我需要更多关于兑换的细节。请指定您想兑换的代币(例如 “将 1 ETH 兑换为 USDC”)。",viewNftsLoading:"正在为您展示 NFT 收藏!",sendTokenNotInWallet:"您的钱包中在此链上没有 {symbol}。请在发送前先获取一些代币。",sendTokenChoose:"您想发送哪个代币?",sendNftChoose:"您想发送哪个 NFT?",swapChooseToken:"您想兑换哪个代币?以下是您的当前余额:",spendable:"可用余额",welcomeMessage:"**欢迎您!🚀**\n带你一起探索新一代区块链世界。我可以随时为您提供NFT资讯、交易支持、价格查询以及投资组合分析等服务。",sendOtherNfts:"\n如果您想发送的NFT不在上述列表中,请访问我们的网站进行发送。",sendNftViaWebsite:"请从列表中选择您想发送的NFT,并通过这个网站继续操作。",sendNftViaWebsiteWithLink:"请从列表中选择您想发送的NFT,并通过[这个网站]({link})继续操作。",viewNftViaWebsite:"如需查看更多详情,请在这个网站查看您的NFT收藏。",viewNftViaWebsiteWithLink:"如需查看更多详情,请在[这个网站]({link})查看您的NFT收藏。",buyingOnChain:"正在 {chain} 链上购买 {symbol}",viewOnExplorer:"在区块浏览器查看",copyWalletAddress:"复制钱包地址",copied:"已复制!",copyAddress:"复制地址",poolGeneralInfoIntro:"💧 **流动性池** 是用户存入代币对、为 DEX(如 Uniswap)提供流动性的智能合约。流动性提供者(LP)可从每笔兑换中获得手续费收益。",poolGeneralInfoMetricsTitle:"**关键指标:**",poolGeneralInfoMetricTVL:"**TVL** - 池中锁仓总价值",poolGeneralInfoMetricAPR:"**APR** - 基于手续费估算的年化收益",poolGeneralInfoMetricVol24h:"**24小时成交量** - 最近24小时交易量",poolGeneralInfoMetricFeeTier:"**费率档位** - 交易费率 (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'你可以更具体地提问,例如:*"Base 上的 ETH/USDC 池"* 或 *"APR 最高的池"*。',poolNoMatch:"❌ 未找到匹配的流动性池。",poolNoMatchForTokenOnChain:"❌ 在 **{chain}** 上未找到 **{token}** 的匹配池。",poolSuggestionsTitle:"💡 **建议:**",poolSuggestionTryChain:"尝试其他链(Ethereum、Base、Arbitrum...)",poolSuggestionTryPair:"尝试更热门的交易对(ETH/USDC、ETH/USDT)",poolSuggestionRelaxFilters:"放宽筛选条件",poolHeaderBest:"🏆 最佳流动性池",poolHeaderSafe:"🛡️ 更稳健的流动性池",poolHeaderTrending:"🔥 热门流动性池",poolHeaderHighApr:"📈 高 APR 流动性池",poolHeaderLowFee:"💰 低费率流动性池",poolHeaderCompare:"⚖️ 流动性池对比",poolHeaderDetail:"🔎 流动性池详情",poolHeaderGeneral:"💧 流动性池信息",poolHeaderSearch:"🔍 搜索结果",poolTableMetric:"指标",poolTableValue:"数值",poolTableLink:"链接",poolLinkView:"在 Uniswap 查看",poolRecommendationHighApr:"👉 **推荐:**[{pair}]({link}) - APR 最高,为 **{apr}%**。_注意:APR 越高通常风险也越高。_",poolRecommendationLowFee:"👉 **推荐:**[{pair}]({link}) - 费率仅 **{fee}%**,适合高频交易。",poolRecommendationSafe:"👉 **推荐:**[{pair}]({link}) - TVL 达 **{tvl}**,流动性更充足且相对稳定。",poolRecommendationTrending:"👉 **最活跃:**[{pair}]({link}) - 24 小时成交量 **{volume}**,交易最活跃。",poolRecommendationTopPick:"👉 **首选:**[{pair}]({link}) - TVL **{tvl}**,最符合你的筛选条件。",sendPositionNoId:'请提供您的 LP 仓位 ID 以便转出。例如:"发送仓位 12345 至 0x..."。',sendPositionNotFound:"在 {chain} 上的钱包中未找到仓位 #{id}。请确认您拥有该仓位。",sendPositionReview:"📤 发送 LP 仓位 **#{positionId}** ({pair})\n\n请在下方填写接收者地址:",sendPositionFetchError:"获取您的仓位时出错。请重试。",poolUnsupportedChain:"该链不支持数据查询,给您带来不便,深表歉意。",poolUniswapV3Only:"我只能获取 Subgraph Uniswap V3 上的流动性池信息。",today:"今天",yesterday:"昨天"}},b=["en","ja","cn"];function w(e){if(!e)return"en";const t=e.toLowerCase().split(/[-_]/)[0];return"zh"===t?"cn":b.includes(t)?t:"en"}function y(e,t){return g[t]?.[e]??g.en[e]??e}function v(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>t[n]??`{${n}}`)}const A=i(void 0),k=({children:t,initialLanguage:n="en"})=>{const[r,i]=o(n),s=a(e=>y(e,r),[r]),c=a((e,t)=>v(y(e,r),t),[r]);/* @__PURE__ */
2
+ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import r,{createContext as i,useState as o,useCallback as a,useContext as s,useMemo as c,memo as u,useEffect as l,useRef as f}from"react";import{AgentCore as d,MoralisService as h}from"keyring-agent-core";const p={chatTitle:"Keyring Agent",closeChat:"Close chat",messagePlaceholder:"Message ....",sendMessage:"Send message",botIsTyping:"Bot is typing",canIHelpYou:"Can I help you with anything?",suggestionAskText:"Ask a question",suggestionAskUserMessage:"I have a question",suggestionAskBotReply:"Ask me anything",suggestionBuyText:"Buy trending token",walletConnectedChainUnsupported:"Your wallet is connected but the chain is not supported for trading. Please switch to a supported chain to see trending tokens.",walletNotConnected:"Please connect your wallet to see trending tokens.",actionProcessing:"⏳ Processing transaction...",actionSuccess:"Transaction completed",actionFail:"❌ Action cancelled or failed",txSubmitted:"⏳ Transaction submitted. Waiting for confirmation...",txConfirmed:"Transaction confirmed!",txReverted:"❌ Transaction reverted on-chain.",txTimeout:"Transaction submitted but confirmation timed out. Please check manually.",txSuccessful:"Transaction successful!",txFailed:"❌ Transaction failed. Please try again.",txNoHandler:"No transaction handler configured.",txInsufficientGas:"⚠️Insufficient {symbol} for gas! You have {balance} {symbol} but need ~{fee} {symbol} for the transaction fee. Please top up your wallet and try again.",txError:"❌ Error: {message}",txErrRecipientRequired:"Recipient address is required.",txErrAmountRequired:"Amount is required.",txErrTokenContractRequired:"Token contract address is required.",txErrSpenderRequired:"Spender address is required.",txErrNftContractRequired:"NFT contract address is required.",txErrTokenIdRequired:"Token ID is required.",txErrWrapUnsupported:"Wrapped native token is not supported on chain {chainId}.",txErrUnsupportedAction:'Action "{action}" is not a supported transaction action.',swapConfirmButton:"Confirm",swapConfirmValue:"Confirm swap",swapReadyToProceed:"Ready to proceed with the swap?",swapEstimationError:"Unable to get swap estimation. Error: {error}",formCancel:"Cancel",formExecute:"Execute",formProcessing:"⏳ Processing...",formBalance:"Balance:",formTokenNotFound:"Token not found in your wallet.",formNoBalance:"You have no {symbol} balance in your wallet.",formInsufficientBalance:"Insufficient balance. Spendable: {balance} {symbol}",formFieldRequired:"{field} is required",formInvalidAddress:"Invalid address (Must contain 0x and 40 hex chars)",formMustBePositive:"Must be a positive number",formMustBeValidNumber:"Must be a valid number",openChat:"Open chat",openChatTitle:"Open chat support",walletBalanceSpendable:"This is the spendable balance of your wallet on {chain} chain. Please choose the coins you want to use for this trade.",walletNoTokensFound:"Sorry, I couldn't find any tokens in your wallet on {chain} chain. Please make sure you have some tokens to trade.",walletFetchFailed:"Sorry, I could not fetch your wallet balance. Please try again.",walletFetchError:"Sorry, I encountered an error fetching your wallet balance.",insufficientFeeToken:"Insufficient fee. Please ensure you have enough {symbol} to cover the transaction fees, or select a different token.",selectAmountOf:"Select the amount of {symbol} to use:\n\nSpendable: {balance} {symbol}",swapFeeWarning:"\n**Insufficient {symbol} for fees!**\n You have {balance} {symbol} but need ~{needed} {symbol}.\n",swapNeedApprove:"You need to approve {symbol} first before swapping.",swapApproveButton:"Approve {symbol}",swapApproveValue:"Approve {symbol} for swap",swapNoSourceToken:"You don't have the source token in your wallet or balance is 0.",swapSelectAmount:"Swap {from} → {to}\n\nSelect the amount of {from} to swap:\n\nSpendable: {balance} {from}",swapApprovalRequired:"Token approval required before swapping.\n\nStep 1: Approve {symbol}\nStep 2: Confirm Swap",swapEstimationFailed:"Failed to get swap estimation. Please try again.",swapInsufficientNativeBalance:"Insufficient balance! You have {balance} {symbol} but need {amount} {symbol}. Please top up your wallet or reduce the amount.",swapTokenNotInWallet:"You don't have {symbol} in your wallet. Please acquire some first before swapping.",swapInsufficientTokenBalance:"Insufficient balance! You have {balance} {symbol} but need {amount} {symbol}. Please reduce the amount or add more tokens.",selectAmountToSwap:"Select the amount of {symbol} to swap:\n\nSpendable: {balance} {symbol}",couldNotLoadTokenList:"Could not load token list. Please specify the destination token.",trendingTokensForReceive:"📈 Trending tokens on {chain} chain. Pick the token you want to receive or type the token you want to receive:",txProcessing:"⏳ Transaction processing... Please confirm in your wallet.",txConfirmedSwap:"Transaction confirmed! Your swap has been completed.",txRevertedSwap:"❌ Transaction reverted on-chain. Please try again.",txSuccessfulSwap:"Transaction successful! Your swap has been completed.",txSuccessfulSendToken:"Sent successfully **{amount} {symbol}** to {to}",txSuccessfulSendNative:"Sent successfully **{amount} {symbol}** to {to}",txSuccessfulSendNft:"Sent successfully NFT **{name}** (#{tokenId}) to {to}",txSuccessfulWrapNative:"Wrapped successfully **{amount} {from}** → **{to}**",txSuccessfulUnwrapNative:"Unwrapped successfully **{amount} {from}** → **{to}**",txDataNotAvailable:"Transaction data not available.",approvalDataNotAvailable:"Approval data not available.",approving:"Approving {symbol}... Please confirm in your wallet.",approvalSuccess:"{symbol} approved successfully!",approvalConfirmSwap:"Now you can execute the swap.",confirmSwapButton:"Confirm Swap",approvalFailed:"❌ Approval failed. Please try again.",couldNotFetchBalance:"Could not fetch your wallet balance.",couldNotLoadBalance:"Could not load balance. Please try again.",couldNotFetchBalanceRetry:"Could not fetch your balance. Please try again.",nftSendReview:"📤 Send **{name}** ({standard} #{tokenId})\n\nPlease review and fill in the recipient address below:",nftCollectionHeader:"Your NFTs :\n\n{list}",nftMoreItems:"\n\nAnd {count} more NFTs...",nftSelectBelow:"\n\nSelect an NFT below to send",nftNoCollection:"You don't have any NFTs in your wallet on this chain.",nftMultipleMatchesForTokenId:"I found {count} NFTs with Token ID #{tokenId} in your wallet. Please select the one you want to send:",nftNotFoundInWallet:"I couldn't find \"{name}\" in your NFT collection. You don't own this NFT on this chain.",nftFetchError:"Sorry, I encountered an error fetching your NFTs.",trendingTokensHeader:"📈 Here is the list of tokens that are currently trending upwards on {chain} chain",trendingTokensQuestion:"\nIs there any token you want to buy?",trendingTokensError:"Sorry, I encountered an error fetching trending tokens.",errorProcessingRequest:"Sorry, I encountered an error processing your request.Please try again in a few moments.",buttonBuyWith:"Buy with {symbol}",buttonUsePercent:"Use {percent}% of {symbol}",buttonBuyToken:"Buy {name} ({symbol})",buttonSendNft:"Send {name}",buttonSwapTo:"Swap to {name} ({symbol})",buttonBuySymbol:"Buy {symbol}",viewBalancesLoading:"Fetching your wallet balances...",viewBalancesHeader:"Your token balances on {chain}:\n\n{list}",viewBalancesEmpty:"You don't have any tokens in your wallet on this chain.",viewBalancesFetchError:"Sorry, I encountered an error fetching your balances.",buttonSendToken:"Send {symbol}",formMax:"MAX",buttonSwapToken:"Swap {symbol}",buttonBuyMoreToken:"Buy more {symbol}",actionSendNativeLabel:"Send Native Token",actionSendNativeDesc:"Send native token (ETH, BNB, MATIC, etc.) to an address",actionSendTokenLabel:"Send Token (ERC20)",actionSendTokenDesc:"Send an ERC20 token to an address",actionSwapTokenLabel:"Swap Token",actionSwapTokenDesc:"Swap one token for another",actionApproveTokenLabel:"Approve Token",actionApproveTokenDesc:"Approve a spender to use your tokens",actionWrapNativeLabel:"Wrap Native Token",actionWrapNativeDesc:"Wrap native token (ETH → WETH)",actionUnwrapNativeLabel:"Unwrap Native Token",actionUnwrapNativeDesc:"Unwrap native token (WETH → ETH)",actionSendNftLabel:"Send NFT",actionSendNftDesc:"Transfer an ERC721 or ERC1155 NFT to another address",fieldToAddress:"Recipient Address",fieldAmount:"Amount",fieldTokenContract:"Token Contract",fieldTokenSymbol:"Token Symbol",fieldDecimals:"Decimals",fieldTokenIn:"From Token",fieldTokenInSymbol:"From Symbol",fieldTokenOut:"To Token",fieldTokenOutSymbol:"To Symbol",fieldTokenInDecimals:"From Decimals",fieldTokenOutDecimals:"To Decimals",fieldSpenderAddress:"Spender Address",fieldAmountUnlimited:"Amount (empty = unlimited)",fieldNftContract:"NFT Contract",fieldTokenId:"Token ID",fieldTokenStandard:"Token Standard",fieldNftName:"NFT Name",formMustBePositiveInteger:"Must be a positive integer",formAmountExceedsNft:"Amount cannot exceed available balance {max}",receivedButtonValue:"Received: {value}",actionExecutedFor:'Action "{action}" executed for: {value}',buyTokenHelp:"I'll help you buy {symbol}. Let me show your available tokens to trade with.",tokenNotFoundOnChain:'I couldn\'t find the token "{symbol}" on this chain. Here are the trending tokens you can buy',swapPreparing:"Preparing your swap...",swapConfirmYes:"Yes",swapChooseFrom:"Please choose which token you want to swap from:",swapChooseTo:"You want to swap {symbol}. Please choose which token you want to receive:",swapNeedDetails:'I need more details for your swap. Please specify which tokens you want to swap (e.g. "Swap 1 ETH to USDC").',viewNftsLoading:"Let me show you your NFT collection!",sendTokenNotInWallet:"You don't have {symbol} in your wallet on this chain. Please acquire some first before sending.",sendTokenChoose:"Which token would you like to send?",sendNftChoose:"Which NFT would you like to send?",swapChooseToken:"Which token would you like to swap? Here are your current balances:",spendable:"Spendable",welcomeMessage:"**Welcome! 🚀**\nYou’re now connected and ready to explore the world of Blockchain. I can assist you anytime with NFT insights, trading, price tracking, and portfolio analysis.",sendOtherNfts:"\nIf the NFT you want to send is not in the list above, please visit our website to send it.",sendNftViaWebsite:"Please select the NFT you would like to send from the list and proceed via this website.",sendNftViaWebsiteWithLink:"Please select the NFT you would like to send from the list and proceed via [this website]({link}).",viewNftViaWebsite:"Please view your NFT collection on this website for more details.",viewNftViaWebsiteWithLink:"Please view your NFT collection on [this website]({link}) for more details.",buyingOnChain:"Buying {symbol} on {chain}",viewOnExplorer:"View on Explorer",copyWalletAddress:"Copy wallet address",copied:"Copied!",copyAddress:"Copy address",poolGeneralInfoIntro:"💧 **Liquidity Pools** are smart contracts where users deposit token pairs to provide liquidity for DEX trading (like Uniswap). Liquidity providers (LPs) earn trading fees from each swap.",poolGeneralInfoMetricsTitle:"**Key Metrics:**",poolGeneralInfoMetricTVL:"**TVL** - Total Value Locked in the pool",poolGeneralInfoMetricAPR:"**APR** - Estimated annual return from fees",poolGeneralInfoMetricVol24h:"**Volume 24h** - Trading volume in last 24 hours",poolGeneralInfoMetricFeeTier:"**Fee Tier** - Trading fee (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'Try asking something specific, like: *"ETH/USDC pools on Base"* or *"Highest APR pools"*.',poolNoMatch:"❌ No matching pools found.",poolNoMatchForTokenOnChain:"❌ No matching pools found for **{token}** on **{chain}**.",poolSuggestionsTitle:"💡 **Suggestions:**",poolSuggestionTryChain:"Try a different chain (Ethereum, Base, Arbitrum...)",poolSuggestionTryPair:"Try a more popular pair (ETH/USDC, ETH/USDT)",poolSuggestionRelaxFilters:"Remove filters if too narrow",poolHeaderBest:"🏆 Best Pool",poolHeaderSafe:"🛡️ Safest Pools",poolHeaderTrending:"🔥 Trending Pools",poolHeaderHighApr:"📈 Highest APR Pools",poolHeaderLowFee:"💰 Lowest Fee Pools",poolHeaderCompare:"⚖️ Pool Comparison",poolHeaderDetail:"🔎 Pool Details",poolHeaderGeneral:"💧 Pool Info",poolHeaderSearch:"🔍 Search Results",poolTableMetric:"Metric",poolTableValue:"Value",poolTableLink:"Link",poolLinkView:"View on Uniswap",poolRecommendationHighApr:"👉 **Recommended:** [{pair}]({link}) - Highest APR at **{apr}%**. _Note: Higher APR may come with higher risk._",poolRecommendationLowFee:"👉 **Recommended:** [{pair}]({link}) - Lowest fee at **{fee}%**, ideal for frequent trading.",poolRecommendationSafe:"👉 **Recommended:** [{pair}]({link}) - Highest TVL at **{tvl}**, deep liquidity and stable.",poolRecommendationTrending:"👉 **Most Active:** [{pair}]({link}) - 24h Volume **{volume}**, highest trading activity.",poolRecommendationTopPick:"👉 **Top pick:** [{pair}]({link}) - TVL **{tvl}**, best match for your criteria.",sendPositionNoId:'Please provide your LP position ID to send it. For example: "send position 12345 to 0x...".',sendPositionNotFound:"Position #{id} was not found in your wallet on {chain}. Please make sure you own this position.",sendPositionReview:"📤 Send LP Position **#{positionId}** ({pair})\n\nPlease enter the recipient address below:",sendPositionFetchError:"Error fetching your positions. Please try again.",poolUnsupportedChain:"This chain is not supported for data queries. Sorry for the inconvenience.",poolUniswapV3Only:"I can only get information of pools that is on Subgraph Uniswap V3.",today:"Today",yesterday:"Yesterday"},m={chatTitle:"Keyring Agent",closeChat:"チャットを閉じる",messagePlaceholder:"メッセージを入力...",sendMessage:"メッセージを送信",botIsTyping:"ボットが入力中...",canIHelpYou:"何かお手伝いできることはございますか?",suggestionAskText:"質問・調査のお願い",suggestionAskUserMessage:"質問があります",suggestionAskBotReply:"何でも聞いてください",suggestionBuyText:"トレンドトークンを購入",walletConnectedChainUnsupported:"ウォレットは接続されていますが、このチェーンは取引に対応していません。トレンドのトークンを表示するには、対応しているチェーンに切り替えてください。",walletNotConnected:"トレンドのトークンを表示するには、ウォレットを接続してください。",actionProcessing:"⏳ トランザクションを処理中...",actionSuccess:"トランザクションが完了しました",actionFail:"❌ アクションがキャンセルされたか、失敗しました",txSubmitted:"⏳ トランザクションを送信しました。確認を待機中...",txConfirmed:"トランザクションが確認されました!",txReverted:"❌ オンチェーンでトランザクションがリバートされました。",txTimeout:"トランザクションは送信されましたが、タイムアウトしました。手動で確認してください。",txSuccessful:"トランザクションに成功しました!",txFailed:"❌ トランザクションに失敗しました。もう一度お試しください。",txNoHandler:"トランザクションハンドラーが設定されていません。",txInsufficientGas:"⚠️ガス代({symbol})が不足しています! 保有量は {balance} {symbol} ですが、手数料に約 {fee} {symbol} 必要です。ウォレットにチャージして再試行してください。",txError:"❌ エラー: {message}",txErrRecipientRequired:"送金先アドレスを入力してください。",txErrAmountRequired:"数量を入力してください。",txErrTokenContractRequired:"トークンのコントラクトアドレスを入力してください。",txErrSpenderRequired:"スペンダーアドレスを入力してください。",txErrNftContractRequired:"NFTのコントラクトアドレスを入力してください。",txErrTokenIdRequired:"トークンIDを入力してください。",txErrWrapUnsupported:"チェーン {chainId} ではラップネイティブトークンに対応していません。",txErrUnsupportedAction:"アクション「{action}」はサポートされていない取引アクションです。",swapConfirmButton:"確定",swapConfirmValue:"スワップを確定する",swapReadyToProceed:"スワップを実行しますか?",swapEstimationError:"スワップの見積もりを取得できません。エラー: {error}",formCancel:"キャンセル",formExecute:"実行",formProcessing:"⏳ 処理中...",formBalance:"残高:",formTokenNotFound:"ウォレット内にトークンが見つかりません。",formNoBalance:"ウォレットに {symbol} の残高がありません。",formInsufficientBalance:"残高不足です。利用可能: {balance} {symbol}",formFieldRequired:"{field} は必須項目です",formInvalidAddress:"無効なアドレスです(0x + 40文字である必要があります)",formMustBePositive:"正の数値を入力してください",formMustBeValidNumber:"有効な数値を入力してください",openChat:"チャットを開く",openChatTitle:"チャットサポートを開く",walletBalanceSpendable:"これは {chain} チェーン上のウォレットの利用可能な残高です。この取引に使用するコインを選択してください。",walletNoTokensFound:"申し訳ありませんが、{chain} チェーン上のウォレットにトークンが見つかりませんでした。取引するためのトークンを保有しているかご確認ください。",walletFetchFailed:"ウォレット残高を取得できませんでした。もう一度お試しください。",walletFetchError:"ウォレット残高の取得中にエラーが発生しました。",insufficientFeeToken:"手数料が不足しています。取引手数料をカバーするのに十分な {symbol} を保有しているか、別のトークンを選択してください。",selectAmountOf:"使用する {symbol} の数量を選択してください:\n\n利用可能: {balance} {symbol}",swapFeeWarning:"\n**手数料の {symbol} が不足しています!**\n 保有量は {balance} {symbol} ですが、~{needed} {symbol} 必要です。\n",swapNeedApprove:"スワップを行う前に、まず {symbol} の承認が必要です。",swapApproveButton:"{symbol} を承認する",swapApproveValue:"スワップのために {symbol} を承認",swapNoSourceToken:"ウォレットにソーストークンがないか、残高が 0 です。",swapSelectAmount:"スワップ {from} → {to}\n\nスワップする {from} の数量を選択してください:\n\n利用可能: {balance} {from}",swapApprovalRequired:"スワップの前にトークンの承認が必要です。\n\nステップ 1: {symbol} を承認\nステップ 2: スワップを確定",swapEstimationFailed:"スワップの見積もり取得に失敗しました。もう一度お試しください。",swapInsufficientNativeBalance:"残高不足です! 保有量は {balance} {symbol} ですが、{amount} {symbol} 必要です。ウォレットにチャージするか、数量を減らしてください。",swapTokenNotInWallet:"ウォレットに {symbol} がありません。スワップする前にまず入手してください。",swapInsufficientTokenBalance:"残高不足です! 保有量は {balance} {symbol} ですが、{amount} {symbol} 必要です。数量を減らすか、トークンを追加してください。",selectAmountToSwap:"スwaップする {symbol} の数量を選択してください:\n\n利用可能: {balance} {symbol}",couldNotLoadTokenList:"トークンリストを読み込めませんでした。受け取り希望のトークンを指定してください。",trendingTokensForReceive:"📈 {chain} チェーンのトレンドトークン。受け取りたいトークンを選択するか、入力してください:",txProcessing:"⏳ トランザクション処理中... ウォレットで承認してください。",txConfirmedSwap:"トランザクションが確認されました!スワップが完了しました。",txRevertedSwap:"❌ オンチェーンでトランザクションがリバートされました。もう一度お試しください。",txSuccessfulSwap:"トランザクションに成功しました!スワップが完了しました。",txSuccessfulSendToken:"**{amount} {symbol}** を {to} に送信しました",txSuccessfulSendNative:"**{amount} {symbol}** を {to} に送信しました",txSuccessfulWrapNative:"**{amount} {from}** を **{to}** にラップしました",txSuccessfulUnwrapNative:"**{amount} {from}** を **{to}** にアンラップしました",txSuccessfulSendNft:"NFT **{name}** (#{tokenId}) を {to} に送信しました",txDataNotAvailable:"トランザクションデータが利用できません。",approvalDataNotAvailable:"承認データが利用できません。",approving:"{symbol} を承認中... ウォレットで確認してください。",approvalSuccess:"{symbol} の承認に成功しました!",approvalConfirmSwap:"これでスワップを実行できます。",confirmSwapButton:"スワップを確定する",approvalFailed:"❌ 承認に失敗しました。もう一度お試しください。",couldNotFetchBalance:"ウォレット残高を取得できませんでした。",couldNotLoadBalance:"残高を読み込めませんでした。もう一度お試しください。",couldNotFetchBalanceRetry:"残高を取得できませんでした。もう一度お試しください。",nftSendReview:"📤 **{name}** ({standard} #{tokenId}) を送信\n\n内容を確認し、以下に受信者のアドレスを入力してください:",nftCollectionHeader:"您的 NFT 资产:\n\n{list}",nftMoreItems:"\n\n以及其他 {count} 件 NFT...",nftSelectBelow:"\n\n请在下方选择要发送的 NFT",nftNoCollection:"このチェーン上のウォレットにNFTは見つかりませんでした。",nftMultipleMatchesForTokenId:"ウォレット内にToken ID #{tokenId} のNFTが{count}件見つかりました。送信したいNFTを選択してください:",nftNotFoundInWallet:'あなたのNFTコレクションに "{name}" が見つかりませんでした。このチェーンでこのNFTを所有していません。',nftFetchError:"申し訳ありませんが、NFTの取得中にエラーが発生しました。",trendingTokensHeader:"📈 {chain} チェーンで現在価格が上昇中のトレンドトークン一覧です:",trendingTokensQuestion:"\n購入したいトークンはありますか?",trendingTokensError:"トレンドトークンの取得中にエラーが発生しました。",errorProcessingRequest:"リクエストの処理中にエラーが発生しました。しばらく時間を置いてからもう一度お試しください。",buttonBuyWith:"{symbol} で購入",buttonUsePercent:"{symbol}の{percent}%を使用",buttonBuyToken:"{name} ({symbol}) を購入",buttonSendNft:"{name} を送信",buttonSwapTo:"{name} ({symbol}) にスワップ",buttonBuySymbol:"{symbol} を購入",viewBalancesLoading:"ウォレットの残高を取得中...",viewBalancesHeader:"{chain} 上のトークン残高:\n\n{list}",viewBalancesEmpty:"このチェーン上のウォレットにトークンは見つかりませんでした。",viewBalancesFetchError:"残高の取得中にエラーが発生しました。",buttonSendToken:"{symbol} を送信",formMax:"最大",buttonSwapToken:"{symbol} をスワップ",buttonBuyMoreToken:"{symbol} をさらに入手",actionSendNativeLabel:"ネイティブトークンを送信",actionSendNativeDesc:"ネイティブトークン (ETH, BNB, MATIC など) をアドレスに送信します",actionSendTokenLabel:"トークンを送信 (ERC20)",actionSendTokenDesc:"ERC20トークンをアドレスに送信します",actionSwapTokenLabel:"トークンをスワップ",actionSwapTokenDesc:"トークンを別のトークンに交換します",actionApproveTokenLabel:"トークンを承認",actionApproveTokenDesc:"支出元(Spender)によるトークンの使用を許可します",actionWrapNativeLabel:"ネイティブトークンをラップ",actionWrapNativeDesc:"ネイティブトークンをラップします (ETH → WETH)",actionUnwrapNativeLabel:"ネイティブトークンをアンラップ",actionUnwrapNativeDesc:"ネイティブトークンをアンラップします (WETH → ETH)",actionSendNftLabel:"NFTを送信",actionSendNftDesc:"ERC721またはERC1155 NFTを別のアドレスに転送します",fieldToAddress:"受信者アドレス",fieldAmount:"数量",fieldTokenContract:"トークンコントラクト",fieldTokenSymbol:"トークンシンボル",fieldDecimals:"デシマル (小数桁数)",fieldTokenIn:"元のトークン",fieldTokenInSymbol:"元のシンボル",fieldTokenOut:"先のトークン",fieldTokenOutSymbol:"先のシンボル",fieldTokenInDecimals:"元のデシマル",fieldTokenOutDecimals:"先のデシマル",fieldSpenderAddress:"支出元 (Spender) アドレス",fieldAmountUnlimited:"数量 (空欄 = 無制限)",fieldNftContract:"NFTコントラクト",fieldTokenId:"トークンID",fieldTokenStandard:"トークン規格",fieldNftName:"NFT名",formMustBePositiveInteger:"正の整数を入力してください",formAmountExceedsNft:"数量は利用可能な残高 {max} を超えることはできません",receivedButtonValue:"受取額: {value}",actionExecutedFor:"アクション「{action}」が {value} に対して実行されました",buyTokenHelp:"{symbol} の購入をお手伝いします。まず、交換に使用可能なトークンを表示します。",tokenNotFoundOnChain:"このチェーン上でトークン「{symbol}」が見つかりませんでした。購入可能なトレンドトークンはこちらです",swapPreparing:"スワップの準備中...",swapConfirmYes:"はい",swapChooseFrom:"交換元(支払う)トークンを選択してください:",swapChooseTo:"{symbol} をスワップします。受け取りたいトークンを選択してください:",swapNeedDetails:"スワップの詳細が必要です。交換したいトークンを指定してください(例:「1 ETH を USDC にスワップ」)。",viewNftsLoading:"あなたのNFTコレクションを表示します!",sendTokenNotInWallet:"このチェーンのウォレットに {symbol} がありません。送信する前にまず入手してください。",sendTokenChoose:"どのトークンを送信しますか?",sendNftChoose:"どのNFTを送信しますか?",swapChooseToken:"どのトークンをスワップしますか?現在の残高はこちらです:",spendable:"利用可能",welcomeMessage:"**ようこそ! 🚀**\n次世代のブロックチェーンへ。NFT情報、トレード、価格チェック、ポートフォリオ分析など、いつでもお手伝いします。",sendOtherNfts:"\n送信したいNFTが上記のリストにない場合は、当ウェブサイトにアクセスして送信してください。",sendNftViaWebsite:"送信したいNFTをリストから選択し、当ウェブサイトで手続きを進めてください。",sendNftViaWebsiteWithLink:"送信したいNFTをリストから選択し、[当ウェブサイト]({link})で手続きを進めてください。",viewNftViaWebsite:"NFTコレクションの詳細は、当ウェブサイトでご確認ください。",viewNftViaWebsiteWithLink:"NFTコレクションの詳細は、[当ウェブサイト]({link})でご確認ください。",buyingOnChain:"{chain} チェーンで {symbol} を購入中",viewOnExplorer:"エクスプローラーで見る",copyWalletAddress:"ウォレットアドレスをコピー",copied:"コピーしました!",copyAddress:"アドレスをコピー",poolGeneralInfoIntro:"💧 **流動性プール** は、ユーザーがトークンペアを預けてDEX取引(Uniswap など)の流動性を提供するスマートコントラクトです。LP は各スワップの手数料を獲得します。",poolGeneralInfoMetricsTitle:"**主要メトリクス:**",poolGeneralInfoMetricTVL:"**TVL** - プールにロックされている総価値",poolGeneralInfoMetricAPR:"**APR** - 手数料に基づく年間想定利回り",poolGeneralInfoMetricVol24h:"**24時間出来高** - 直近24時間の取引量",poolGeneralInfoMetricFeeTier:"**手数料ティア** - 取引手数料 (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'例: *"Base の ETH/USDC プール"* や *"APR が高いプール"* のように聞いてみてください。',poolNoMatch:"❌ 条件に一致するプールが見つかりませんでした。",poolNoMatchForTokenOnChain:"❌ **{chain}** 上で **{token}** に一致するプールが見つかりませんでした。",poolSuggestionsTitle:"💡 **提案:**",poolSuggestionTryChain:"別のチェーンを試す (Ethereum, Base, Arbitrum...)",poolSuggestionTryPair:"より一般的なペアを試す (ETH/USDC, ETH/USDT)",poolSuggestionRelaxFilters:"フィルター条件を緩める",poolHeaderBest:"🏆 最適なプール",poolHeaderSafe:"🛡️ 安全性の高いプール",poolHeaderTrending:"🔥 トレンドプール",poolHeaderHighApr:"📈 APRの高いプール",poolHeaderLowFee:"💰 手数料の低いプール",poolHeaderCompare:"⚖️ プール比較",poolHeaderDetail:"🔎 プール詳細",poolHeaderGeneral:"💧 プール情報",poolHeaderSearch:"🔍 検索結果",poolTableMetric:"指標",poolTableValue:"値",poolTableLink:"リンク",poolLinkView:"Uniswapで表示",poolRecommendationHighApr:"👉 **おすすめ:** [{pair}]({link}) - APR は **{apr}%** で最も高いです。_注意: APR が高いほどリスクも高い可能性があります。_",poolRecommendationLowFee:"👉 **おすすめ:** [{pair}]({link}) - 手数料 **{fee}%** で、頻繁な取引に適しています。",poolRecommendationSafe:"👉 **おすすめ:** [{pair}]({link}) - TVL **{tvl}** で流動性が厚く安定しています。",poolRecommendationTrending:"👉 **最も活発:** [{pair}]({link}) - 24時間出来高 **{volume}** で取引が最も活発です。",poolRecommendationTopPick:"👉 **トップ候補:** [{pair}]({link}) - TVL **{tvl}**、条件に最も適合しています。",sendPositionNoId:'LP ポジション ID を提供してください。例:"ポジション 12345 を 0x... に送信"。',sendPositionNotFound:"{chain} 上のウォレットにポジション #{id} が見つかりませんでした。このポジションを所有していることを確認してください。",sendPositionReview:"📤 LP ポジション **#{positionId}** ({pair}) を送信\n\n受取人アドレスを以下に入力してください:",sendPositionFetchError:"ポジションの取得中にエラーが発生しました。もう一度お試しください。",poolUnsupportedChain:"このチェーンはデータクエリに対応していません。ご不便をおかけして申し訳ございません。",poolUniswapV3Only:"Subgraph Uniswap V3 上のプールの情報のみ取得できます。",today:"今日",yesterday:"昨日"},g={en:p,ja:m,cn:{chatTitle:"Keyring Agent",closeChat:"关闭聊天",messagePlaceholder:"请输入消息....",sendMessage:"发送消息",botIsTyping:"机器人正在输入",canIHelpYou:"有什么我可以帮您的吗?",suggestionAskText:"提问",suggestionAskUserMessage:"我有一个问题",suggestionAskBotReply:"随便问我任何事情",suggestionBuyText:"购买热门代币",walletConnectedChainUnsupported:"您的钱包已连接,但当前链不支持交易。请切换到支持的链以查看热门代币。",walletNotConnected:"请连接您的钱包以查看热门代币。",actionProcessing:"⏳ 正在处理交易...",actionSuccess:"交易已完成",actionFail:"❌ 操作取消或失败",txSubmitted:"⏳ 交易已提交。正在等待确认...",txConfirmed:"交易已确认!",txReverted:"❌ 交易在链上被退回(Reverted)。",txTimeout:"交易已提交但确认超时。请手动检查。",txSuccessful:"交易成功!",txFailed:"❌ 交易失败。请重试。",txNoHandler:"未配置交易处理器。",txInsufficientGas:"⚠️{symbol} 余额不足以支付 Gas 费! 您当前有 {balance} {symbol},但交易费预计需要 ~{fee} {symbol}。请充值钱包后重试。",txError:"❌ 错误: {message}",txErrRecipientRequired:"请填写收款地址。",txErrAmountRequired:"请填写数量。",txErrTokenContractRequired:"请填写代币合约地址。",txErrSpenderRequired:"请填写授权方地址。",txErrNftContractRequired:"请填写 NFT 合约地址。",txErrTokenIdRequired:"请填写 Token ID。",txErrWrapUnsupported:"链 {chainId} 不支持包装原生代币。",txErrUnsupportedAction:"操作“{action}”不是受支持的交易操作。",swapConfirmButton:"确认",swapConfirmValue:"确认兑换",swapReadyToProceed:"准备好进行兑换了吗?",swapEstimationError:"无法获取兑换估算。错误: {error}",formCancel:"取消",formExecute:"执行",formProcessing:"⏳ 正在处理...",formBalance:"余额:",formTokenNotFound:"您的钱包中未找到该代币。",formNoBalance:"您的钱包中没有 {symbol} 余额。",formInsufficientBalance:"余额不足。可用余额: {balance} {symbol}",formFieldRequired:"{field} 是必填项",formInvalidAddress:"无效地址(必须是 0x + 40 个字符)",formMustBePositive:"必须为正数",formMustBeValidNumber:"必须为有效数字",openChat:"打开聊天",openChatTitle:"打开聊天支持",walletBalanceSpendable:"这是您在 {chain} 链上钱包的可选余额。请选择您想用于此次交易的代币。",walletNoTokensFound:"抱歉,我在 {chain} 链上的钱包中没找到任何代币。请确保您有代币可以进行交易。",walletFetchFailed:"抱歉,无法获取您的钱包余额。请重试。",walletFetchError:"抱歉,获取钱包余额时出错。",insufficientFeeToken:"手续费不足。请确保您有足够的 {symbol} 来支付交易费用,或选择其他代币。",selectAmountOf:"选择要使用的 {symbol} 数量:\n\n可用余额: {balance} {symbol}",swapFeeWarning:"\n**手续费所需的 {symbol} 不足!**\n 您当前有 {balance} {symbol},但需要 ~{needed} {symbol}。\n",swapNeedApprove:"在兑换之前,您需要先授权 {symbol}。",swapApproveButton:"授权 {symbol}",swapApproveValue:"授权 {symbol} 以进行兑换",swapNoSourceToken:"您的钱包中没有源代币或余额为 0。",swapSelectAmount:"兑换 {from} → {to}\n\n选择要兑换的 {from} 数量:\n\n可用余额: {balance} {from}",swapApprovalRequired:"兑换前需要代币授权。\n\n第 1 步:授权 {symbol}\n第 2 步:确认兑换",swapEstimationFailed:"获取兑换估算失败。请重试。",swapInsufficientNativeBalance:"余额不足!您有 {balance} {symbol} 但需要 {amount} {symbol}。请充值钱包或减少金额。",swapTokenNotInWallet:"您的钱包中没有 {symbol}。请在兑换前先获取一些代币。",swapInsufficientTokenBalance:"余额不足!您有 {balance} {symbol} 但需要 {amount} {symbol}。请减少金额或添加更多代币。",selectAmountToSwap:"选择要兑换的 {symbol} 数量:\n\n可用余额: {balance} {symbol}",couldNotLoadTokenList:"无法加载代币列表。请指定目标代币。",trendingTokensForReceive:"📈 {chain} 链上的热门代币。请选择您想收到的代币或输入代币名称:",txProcessing:"⏳ 交易处理中... 请在钱包中确认。",txConfirmedSwap:"交易已确认!您的兑换已完成。",txRevertedSwap:"❌ 交易在链上被退回。请重试。",txSuccessfulSwap:"交易成功!您的兑换已完成。",txSuccessfulSendToken:"已成功发送 **{amount} {symbol}** 至 {to}",txSuccessfulSendNative:"已成功发送 **{amount} {symbol}** 至 {to}",txSuccessfulWrapNative:"成功封装 **{amount} {from}** → **{to}**",txSuccessfulUnwrapNative:"成功解封装 **{amount} {from}** → **{to}**",txSuccessfulSendNft:"已成功发送 NFT **{name}** (#{tokenId}) 至 {to}",txDataNotAvailable:"交易数据不可用。",approvalDataNotAvailable:"授权数据不可用。",approving:"正在授权 {symbol}... 请在钱包中确认。",approvalSuccess:"{symbol} 授权成功!",approvalConfirmSwap:"现在您可以执行兑换了。",confirmSwapButton:"确认兑换",approvalFailed:"❌ 授权失败。请重试。",couldNotFetchBalance:"无法获取您的钱包余额。",couldNotLoadBalance:"无法加载余额。请重试。",couldNotFetchBalanceRetry:"无法获取您的余额。请重试。",nftSendReview:"📤 发送 **{name}** ({standard} #{tokenId})\n\n请核对并在下方填写接收者地址:",nftCollectionHeader:"保有中のNFT一覧 :\n\n{list}",nftMoreItems:"\n\n他 {count} 件のNFT...",nftSelectBelow:"\n\n送信するNFTを以下から選択してください",nftNoCollection:"您在该链的钱包中没有任何 NFT。",nftMultipleMatchesForTokenId:"在您的钱包中找到了 {count} 个 Token ID #{tokenId} 的 NFT。请选择您要发送的 NFT:",nftNotFoundInWallet:'我在您的 NFT 收藏中没找到 "{name}"。您在此链上不拥有此 NFT。',nftFetchError:"抱歉,获取您的 NFT 时出错。",trendingTokensHeader:"📈 以下是 {chain} 链上目前呈上升趋势的热门代币列表",trendingTokensQuestion:"\n有您想购买的代币吗?",trendingTokensError:"抱歉,获取热门代币时出错。",errorProcessingRequest:"抱歉,处理您的请求时出错。请稍后再试。",buttonBuyWith:"使用 {symbol} 购买",buttonUsePercent:"使用{percent}%的{symbol}",buttonBuyToken:"购买 {name} ({symbol})",buttonSendNft:"发送 {name}",buttonSwapTo:"兑换为 {name} ({symbol})",buttonBuySymbol:"购买 {symbol}",viewBalancesLoading:"正在获取您的钱包余额...",viewBalancesHeader:"您在 {chain} 上的代币余额:\n\n{list}",viewBalancesEmpty:"您在该链的钱包中没有任何代币。",viewBalancesFetchError:"抱歉,获取您的余额时出错。",buttonSendToken:"发送 {symbol}",formMax:"最多",buttonSwapToken:"兑换 {symbol}",buttonBuyMoreToken:"购买更多 {symbol}",actionSendNativeLabel:"发送原生代币",actionSendNativeDesc:"将原生代币 (ETH, BNB, MATIC 等) 发送到指定地址",actionSendTokenLabel:"发送代币 (ERC20)",actionSendTokenDesc:"将 ERC20 代币发送到指定地址",actionSwapTokenLabel:"兑换代币",actionSwapTokenDesc:"将一种代币兑换为另一种",actionApproveTokenLabel:"授权代币",actionApproveTokenDesc:"授权支出方使用您的代币",actionWrapNativeLabel:"包装 (Wrap) 原生代币",actionWrapNativeDesc:"包装原生代币 (例如 ETH → WETH)",actionUnwrapNativeLabel:"解包 (Unwrap) 原生代币",actionUnwrapNativeDesc:"解包原生代币 (例如 WETH → ETH)",actionSendNftLabel:"发送 NFT",actionSendNftDesc:"将 ERC721 或 ERC1155 NFT 转移到另一个地址",fieldToAddress:"接收者地址",fieldAmount:"金额",fieldTokenContract:"代币合约",fieldTokenSymbol:"代币符号",fieldDecimals:"精度 (Decimals)",fieldTokenIn:"源代币 (From)",fieldTokenInSymbol:"源代币符号",fieldTokenOut:"目标代币 (To)",fieldTokenOutSymbol:"目标代币符号",fieldTokenInDecimals:"源代币精度",fieldTokenOutDecimals:"目标代币精度",fieldSpenderAddress:"支出方 (Spender) 地址",fieldAmountUnlimited:"金额 (留空 = 无限制)",fieldNftContract:"NFT 合约",fieldTokenId:"代币 ID",fieldTokenStandard:"代币标准",fieldNftName:"NFT 名称",formMustBePositiveInteger:"必须为正整数",formAmountExceedsNft:"金额不能超过可用余额 {max}",receivedButtonValue:"收到: {value}",actionExecutedFor:'操作 "{action}" 已执行,对象为: {value}',buyTokenHelp:"我会帮您购买 {symbol}。让我为您显示可用于交易的代币。",tokenNotFoundOnChain:'我在该链上没找到代币 "{symbol}"。以下是您可以购买的热门代币',swapPreparing:"正在准备兑换...",swapConfirmYes:"是",swapChooseFrom:"请选择您想从哪个代币进行兑换:",swapChooseTo:"您想兑换 {symbol}。请选择您想收到的代币:",swapNeedDetails:"我需要更多关于兑换的细节。请指定您想兑换的代币(例如 “将 1 ETH 兑换为 USDC”)。",viewNftsLoading:"正在为您展示 NFT 收藏!",sendTokenNotInWallet:"您的钱包中在此链上没有 {symbol}。请在发送前先获取一些代币。",sendTokenChoose:"您想发送哪个代币?",sendNftChoose:"您想发送哪个 NFT?",swapChooseToken:"您想兑换哪个代币?以下是您的当前余额:",spendable:"可用余额",welcomeMessage:"**欢迎您!🚀**\n带你一起探索新一代区块链世界。我可以随时为您提供NFT资讯、交易支持、价格查询以及投资组合分析等服务。",sendOtherNfts:"\n如果您想发送的NFT不在上述列表中,请访问我们的网站进行发送。",sendNftViaWebsite:"请从列表中选择您想发送的NFT,并通过这个网站继续操作。",sendNftViaWebsiteWithLink:"请从列表中选择您想发送的NFT,并通过[这个网站]({link})继续操作。",viewNftViaWebsite:"如需查看更多详情,请在这个网站查看您的NFT收藏。",viewNftViaWebsiteWithLink:"如需查看更多详情,请在[这个网站]({link})查看您的NFT收藏。",buyingOnChain:"正在 {chain} 链上购买 {symbol}",viewOnExplorer:"在区块浏览器查看",copyWalletAddress:"复制钱包地址",copied:"已复制!",copyAddress:"复制地址",poolGeneralInfoIntro:"💧 **流动性池** 是用户存入代币对、为 DEX(如 Uniswap)提供流动性的智能合约。流动性提供者(LP)可从每笔兑换中获得手续费收益。",poolGeneralInfoMetricsTitle:"**关键指标:**",poolGeneralInfoMetricTVL:"**TVL** - 池中锁仓总价值",poolGeneralInfoMetricAPR:"**APR** - 基于手续费估算的年化收益",poolGeneralInfoMetricVol24h:"**24小时成交量** - 最近24小时交易量",poolGeneralInfoMetricFeeTier:"**费率档位** - 交易费率 (0.01%, 0.05%, 0.3%, 1%)",poolGeneralInfoTryAsk:'你可以更具体地提问,例如:*"Base 上的 ETH/USDC 池"* 或 *"APR 最高的池"*。',poolNoMatch:"❌ 未找到匹配的流动性池。",poolNoMatchForTokenOnChain:"❌ 在 **{chain}** 上未找到 **{token}** 的匹配池。",poolSuggestionsTitle:"💡 **建议:**",poolSuggestionTryChain:"尝试其他链(Ethereum、Base、Arbitrum...)",poolSuggestionTryPair:"尝试更热门的交易对(ETH/USDC、ETH/USDT)",poolSuggestionRelaxFilters:"放宽筛选条件",poolHeaderBest:"🏆 最佳流动性池",poolHeaderSafe:"🛡️ 更稳健的流动性池",poolHeaderTrending:"🔥 热门流动性池",poolHeaderHighApr:"📈 高 APR 流动性池",poolHeaderLowFee:"💰 低费率流动性池",poolHeaderCompare:"⚖️ 流动性池对比",poolHeaderDetail:"🔎 流动性池详情",poolHeaderGeneral:"💧 流动性池信息",poolHeaderSearch:"🔍 搜索结果",poolTableMetric:"指标",poolTableValue:"数值",poolTableLink:"链接",poolLinkView:"在 Uniswap 查看",poolRecommendationHighApr:"👉 **推荐:**[{pair}]({link}) - APR 最高,为 **{apr}%**。_注意:APR 越高通常风险也越高。_",poolRecommendationLowFee:"👉 **推荐:**[{pair}]({link}) - 费率仅 **{fee}%**,适合高频交易。",poolRecommendationSafe:"👉 **推荐:**[{pair}]({link}) - TVL 达 **{tvl}**,流动性更充足且相对稳定。",poolRecommendationTrending:"👉 **最活跃:**[{pair}]({link}) - 24 小时成交量 **{volume}**,交易最活跃。",poolRecommendationTopPick:"👉 **首选:**[{pair}]({link}) - TVL **{tvl}**,最符合你的筛选条件。",sendPositionNoId:'请提供您的 LP 仓位 ID 以便转出。例如:"发送仓位 12345 至 0x..."。',sendPositionNotFound:"在 {chain} 上的钱包中未找到仓位 #{id}。请确认您拥有该仓位。",sendPositionReview:"📤 发送 LP 仓位 **#{positionId}** ({pair})\n\n请在下方填写接收者地址:",sendPositionFetchError:"获取您的仓位时出错。请重试。",poolUnsupportedChain:"该链不支持数据查询,给您带来不便,深表歉意。",poolUniswapV3Only:"我只能获取 Subgraph Uniswap V3 上的流动性池信息。",today:"今天",yesterday:"昨天"}},b=["en","ja","cn"];function w(e){if(!e)return"en";const t=e.toLowerCase().split(/[-_]/)[0];return"zh"===t?"cn":b.includes(t)?t:"en"}function y(e,t){return g[t]?.[e]??g.en[e]??e}function v(e,t){return e.replace(/\{(\w+)\}/g,(e,n)=>t[n]??`{${n}}`)}const A=i(void 0),k=({children:t,initialLanguage:n="en"})=>{const[r,i]=o(n),s=a(e=>y(e,r),[r]),c=a((e,t)=>v(y(e,r),t),[r]);/* @__PURE__ */
3
3
  return e(A.Provider,{value:{language:r,setLanguage:i,t:s,ti:c},children:t})},x=()=>{const e=s(A);if(!e)throw new Error("useLanguage must be used within LanguageProvider");return e},E=e=>{const{language:t,setLanguage:n}=x(),r=e?w(e):t,i=a(e=>y(e,r),[r]),o=a((e,t)=>v(y(e,r),t),[r]);return c(()=>({language:r,setLanguage:n,t:i,ti:o}),[r,n,i,o])},C=u(function({onClick:t,buttonSize:n=56,customIcon:r,customChatButton:i}){const{t:o}=x(),a=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())};return i?/* @__PURE__ */e("div",{onClick:t,onKeyDown:a,role:"button",tabIndex:0,children:i}):/* @__PURE__ */e("button",{className:"chat-button",onClick:t,onKeyDown:a,"aria-label":o("openChat"),title:o("openChatTitle"),type:"button",style:{width:n,height:n,aspectRatio:1},children:/* @__PURE__ */e("img",{draggable:!1,style:{width:n,height:n,objectFit:"cont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XKC5VonVp5kuSF+V+7I0A1gRrqG/oFcwfLCkenHiPjGV5kWbcS38WsbpMoLFq46zArJ4teGkgCxe7TgnIIsXDacEZPGi44yALF59OLEeiNaVbwupruCEBbJ49cPLSZ7DAnoOC+g5LKDnsICeI/VSxBwx3iIFC+gzM9qFqklifGVG5hTdIcZPlJqSQrEFektKTsicTF0mxkuyORqXY+k2JDFjxHiFrh4mtXYzQR0ocmqcGK8QUgzjORBwWcphrgf9Au4Tz4GAcKM6HT1DjCeIEbhPvCq20tgK/SFLNGReFwVkK/QDRWrIWB9YcXuHg5nHE3pjJzHOoT3kzGj61d32thWrETkS77ErdQ9oorU5EN6+QsC8eebSxDiFoNxHtus0lFwPHE1vGxHa1xLjBIh719PbSnbMKt7i6FDm0aAicZKYxIB4o+nXBst9XvUeVT2Zh/2K5M96x1ZiYiOfh+TS8IaV9qvpJmPdmdl2SeqG3rmdmFUHfU4kk6ViXphIf8ubXerqAqvThnLmWgWXGSbaH2OnvDWmVG6QhDhOTFMwwi2THC6sDtVMZAENebea7daJ7AAX/nUzprP98XqEM9QtoI0RUyjRqS2zg/Kxsp2YAFhYfnhMTeo3d5RQOsalLtcrms1//TyUbJOo0HUAAAAASUVORK5CYII=",alt:"Ask AI"})})}),S={getItem(e){if("undefined"==typeof window)return null;try{return window.localStorage.getItem(e)}catch{return null}},setItem(e,t){if("undefined"!=typeof window)try{window.localStorage.setItem(e,t)}catch{}},removeItem(e){if("undefined"!=typeof window)try{window.localStorage.removeItem(e)}catch{}},get length(){if("undefined"==typeof window)return 0;try{return window.localStorage.length}catch{return 0}},key(e){if("undefined"==typeof window)return null;try{return window.localStorage.key(e)}catch{return null}}};const T=/^tuple(?<array>(\[(\d*)\])*)$/;function M(e){let t=e.type;if(T.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let i=0;i<n;i++){t+=M(e.components[i]),i<n-1&&(t+=", ")}const r=function(e,t){const n=e.exec(t);return n?.groups}(T,e.type);return t+=`)${r?.array||""}`,M({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function I(e){let t="";const n=e.length;for(let r=0;r<n;r++){t+=M(e[r]),r!==n-1&&(t+=", ")}return t}function B(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new W(e.type);return`${e.name}(${N(e.inputs,{includeName:t})})`}function N(e,{includeName:t=!1}={}){return e?e.map(e=>function(e,{includeName:t}){if(e.type.startsWith("tuple"))return`(${N(e.components,{includeName:t})})${e.type.slice(5)}`;return e.type+(t&&e.name?` ${e.name}`:"")}(e,{includeName:t})).join(t?", ":","):""}function R(e,{strict:t=!0}={}){return!!e&&("string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")))}function L(e){return R(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const D="2.49.3";let F=({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,O=`viem@${D}`;class P extends Error{constructor(e,t={}){const n=t.cause instanceof P?t.cause.details:t.cause?.message?t.cause.message:t.details,r=t.cause instanceof P&&t.cause.docsPath||t.docsPath,i=F?.({...t,docsPath:r});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...n?[`Details: ${n}`]:[],...O?[`Version: ${O}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=r,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=D}walk(e){return U(this,e)}}function U(e,t){return t?.(e)?e:e&&"object"==typeof e&&"cause"in e&&void 0!==e.cause?U(e.cause,t):t?null:e}class q extends P{constructor({expectedLength:e,givenLength:t,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${t}`].join("\n"),{name:"AbiEncodingArrayLengthMismatchError"})}}class H extends P{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${L(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class z extends P{constructor({expectedLength:e,givenLength:t}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${t}`].join("\n"),{name:"AbiEncodingLengthMismatchError"})}}class V extends P{constructor(e,{docsPath:t}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t,name:"AbiFunctionNotFoundError"})}}class j extends P{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${B(e.abiItem)}\`, and`,`\`${t.type}\` in \`${B(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class G extends P{constructor(e,{docsPath:t}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join("\n"),{docsPath:t,name:"InvalidAbiEncodingType"})}}class J extends P{constructor(e){super([`Value "${e}" is not a valid array.`].join("\n"),{name:"InvalidArrayError"})}}class W extends P{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join("\n"),{name:"InvalidDefinitionTypeError"})}}class K extends P{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class Y extends P{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function X(e,{dir:t,size:n=32}={}){return"string"==typeof e?Q(e,{dir:t,size:n}):function(e,{dir:t,size:n=32}={}){if(null===n)return e;if(e.length>n)throw new Y({size:e.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;i<n;i++){const o="right"===t;r[o?i:n-i-1]=e[o?i:e.length-i-1]}return r}(e,{dir:t,size:n})}function Q(e,{dir:t,size:n=32}={}){if(null===n)return e;const r=e.replace("0x","");if(r.length>2*n)throw new Y({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r["right"===t?"padEnd":"padStart"](2*n,"0")}`}class Z extends P{constructor({max:e,min:t,signed:n,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class $ extends P{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function _(e,{dir:t="left"}={}){let n="string"==typeof e?e.replace("0x",""):e,r=0;for(let i=0;i<n.length-1&&"0"===n["left"===t?i:n.length-i-1].toString();i++)r++;return n="left"===t?n.slice(r):n.slice(0,n.length-r),"string"==typeof e?(1===n.length&&"right"===t&&(n=`${n}0`),`0x${n.length%2==1?`0${n}`:n}`):n}function ee(e,{size:t}){if(L(e)>t)throw new $({givenSize:L(e),maxSize:t})}function te(e,t={}){const{signed:n}=t;t.size&&ee(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2;return r<=(1n<<8n*BigInt(i)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function ne(e,t={}){const n=te(e,t),r=Number(n);if(!Number.isSafeInteger(r))throw new Z({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return r}const re=/* @__PURE__ */Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ie(e,t={}){return"number"==typeof e||"bigint"==typeof e?se(e,t):"string"==typeof e?ue(e,t):"boolean"==typeof e?oe(e,t):ae(e,t)}function oe(e,t={}){const n=`0x${Number(e)}`;return"number"==typeof t.size?(ee(n,{size:t.size}),X(n,{size:t.size})):n}function ae(e,t={}){let n="";for(let i=0;i<e.length;i++)n+=re[e[i]];const r=`0x${n}`;return"number"==typeof t.size?(ee(r,{size:t.size}),X(r,{dir:"right",size:t.size})):r}function se(e,t={}){const{signed:n,size:r}=t,i=BigInt(e);let o;r?o=n?(1n<<8n*BigInt(r)-1n)-1n:2n**(8n*BigInt(r))-1n:"number"==typeof e&&(o=BigInt(Number.MAX_SAFE_INTEGER));const a="bigint"==typeof o&&n?-o-1n:0;if(o&&i>o||i<a){const t="bigint"==typeof e?"n":"";throw new Z({max:o?`${o}${t}`:void 0,min:`${a}${t}`,signed:n,size:r,value:`${e}${t}`})}const s=`0x${(n&&i<0?(1n<<BigInt(8*r))+BigInt(i):i).toString(16)}`;return r?X(s,{size:r}):s}const ce=/* @__PURE__ */new TextEncoder;function ue(e,t={}){return ae(ce.encode(e),t)}const le=/* @__PURE__ */new TextEncoder;function fe(e,t={}){return"number"==typeof e||"bigint"==typeof e?function(e,t){const n=se(e,t);return pe(n)}(e,t):"boolean"==typeof e?function(e,t={}){const n=new Uint8Array(1);if(n[0]=Number(e),"number"==typeof t.size)return ee(n,{size:t.size}),X(n,{size:t.size});return n}(e,t):R(e)?pe(e,t):me(e,t)}const de={zero:48,nine:57,A:65,F:70,a:97,f:102};function he(e){return e>=de.zero&&e<=de.nine?e-de.zero:e>=de.A&&e<=de.F?e-(de.A-10):e>=de.a&&e<=de.f?e-(de.a-10):void 0}function pe(e,t={}){let n=e;t.size&&(ee(n,{size:t.size}),n=X(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,o=new Uint8Array(i);for(let a=0,s=0;a<i;a++){const e=he(r.charCodeAt(s++)),t=he(r.charCodeAt(s++));if(void 0===e||void 0===t)throw new P(`Invalid byte sequence ("${r[s-2]}${r[s-1]}" in "${r}").`);o[a]=16*e+t}return o}function me(e,t={}){const n=le.encode(e);return"number"==typeof t.size?(ee(n,{size:t.size}),X(n,{dir:"right",size:t.size})):n}const ge=/* @__PURE__ */BigInt(2**32-1),be=/* @__PURE__ */BigInt(32);function we(e,t=!1){return t?{h:Number(e&ge),l:Number(e>>be&ge)}:{h:0|Number(e>>be&ge),l:0|Number(e&ge)}}function ye(e,t=!1){const n=e.length;let r=new Uint32Array(n),i=new Uint32Array(n);for(let o=0;o<n;o++){const{h:n,l:a}=we(e[o],t);[r[o],i[o]]=[n,a]}return[r,i]}const ve=(e,t,n)=>e>>>n,Ae=(e,t,n)=>e<<32-n|t>>>n,ke=(e,t,n)=>e>>>n|t<<32-n,xe=(e,t,n)=>e<<32-n|t>>>n,Ee=(e,t,n)=>e<<64-n|t>>>n-32,Ce=(e,t,n)=>e>>>n-32|t<<64-n;function Se(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}const Te=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Me=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,Ie=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Be=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,Ne=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),Re=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0,Le="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function De(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function Fe(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Oe(e,...t){if(!De(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Pe(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");Fe(e.outputLen),Fe(e.blockLen)}function Ue(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function qe(e,t){Oe(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function He(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function ze(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ve(e,t){return e<<32-t|e>>>t}function je(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const Ge=/* @__PURE__ */(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])()?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=je(e[t]);return e},Je=/* @__PURE__ */(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),We=/* @__PURE__ */Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ke(e){if(Oe(e),Je)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=We[e[n]];return t}const Ye=48,Xe=57,Qe=65,Ze=70,$e=97,_e=102;function et(e){return e>=Ye&&e<=Xe?e-Ye:e>=Qe&&e<=Ze?e-(Qe-10):e>=$e&&e<=_e?e-($e-10):void 0}function tt(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(Je)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;i<n;i++,o+=2){const t=et(e.charCodeAt(o)),n=et(e.charCodeAt(o+1));if(void 0===t||void 0===n){const t=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+o)}r[i]=16*t+n}return r}function nt(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}(e)),Oe(e),e}function rt(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];Oe(n),t+=n.length}const n=new Uint8Array(t);for(let r=0,i=0;r<e.length;r++){const t=e[r];n.set(t,i),i+=t.length}return n}class it{}function ot(e){const t=t=>e().update(nt(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function at(e=32){if(Le&&"function"==typeof Le.getRandomValues)return Le.getRandomValues(new Uint8Array(e));if(Le&&"function"==typeof Le.randomBytes)return Uint8Array.from(Le.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const st=BigInt(0),ct=BigInt(1),ut=BigInt(2),lt=BigInt(7),ft=BigInt(256),dt=BigInt(113),ht=[],pt=[],mt=[];for(let BA=0,NA=ct,RA=1,LA=0;BA<24;BA++){[RA,LA]=[LA,(2*RA+3*LA)%5],ht.push(2*(5*LA+RA)),pt.push((BA+1)*(BA+2)/2%64);let e=st;for(let t=0;t<7;t++)NA=(NA<<ct^(NA>>lt)*dt)%ft,NA&ut&&(e^=ct<<(ct<</* @__PURE__ */BigInt(t))-ct);mt.push(e)}const gt=ye(mt,!0),bt=gt[0],wt=gt[1],yt=(e,t,n)=>n>32?((e,t,n)=>t<<n-32|e>>>64-n)(e,t,n):((e,t,n)=>e<<n|t>>>32-n)(e,t,n),vt=(e,t,n)=>n>32?((e,t,n)=>e<<n-32|t>>>64-n)(e,t,n):((e,t,n)=>t<<n|e>>>32-n)(e,t,n);class At extends it{constructor(e,t,n,r=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,Fe(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");var o;this.state=new Uint8Array(200),this.state32=(o=this.state,new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4)))}clone(){return this.i()}keccak(){Ge(this.state32),function(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,i=(r+2)%10,o=n[i],a=n[i+1],s=yt(o,a,1)^n[t],c=vt(o,a,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=s,e[r+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){const r=pt[n],o=yt(t,i,r),a=vt(t,i,r),s=ht[n];t=e[s],i=e[s+1],e[s]=o,e[s+1]=a}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=bt[r],e[1]^=wt[r]}He(n)}(this.state32,this.rounds),Ge(this.state32),this.posOut=0,this.pos=0}update(e){Ue(this),Oe(e=nt(e));const{blockLen:t,state:n}=this,r=e.length;for(let i=0;i<r;){const o=Math.min(t-this.pos,r-i);for(let t=0;t<o;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,128&t&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){Ue(this,!1),Oe(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Fe(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(qe(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,He(this.state)}i(e){const{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:o}=this;return e||(e=new At(t,n,r,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=o,e.destroyed=this.destroyed,e}}const kt=/* @__PURE__ */(()=>{return e=1,t=136,n=32,ot(()=>new At(t,e,n));var e,t,n})();function xt(e,t){const n=t||"hex",r=kt(R(e,{strict:!1})?fe(e):e);return"bytes"===n?r:ie(r)}function Et(e){return xt(fe(e))}const Ct=e=>{var t;return function(e){let t=!0,n="",r=0,i="",o=!1;for(let a=0;a<e.length;a++){const s=e[a];if(["(",")",","].includes(s)&&(t=!0),"("===s&&r++,")"===s&&r--,t)if(0!==r)" "!==s?(i+=s,n+=s):","!==e[a-1]&&","!==n&&",("!==n&&(n="",t=!1);else if(" "===s&&["event","function",""].includes(i))i="";else if(i+=s,")"===s){o=!0;break}}if(!o)throw new P("Unable to normalize signature.");return i}("string"==typeof e?e:"function"===(t=e).type?`function ${t.name}(${I(t.inputs)})${t.stateMutability&&"nonpayable"!==t.stateMutability?` ${t.stateMutability}`:""}${t.outputs?.length?` returns (${I(t.outputs)})`:""}`:"event"===t.type?`event ${t.name}(${I(t.inputs)})`:"error"===t.type?`error ${t.name}(${I(t.inputs)})`:"constructor"===t.type?`constructor(${I(t.inputs)})${"payable"===t.stateMutability?" payable":""}`:"fallback"===t.type?"fallback() external"+("payable"===t.stateMutability?" payable":""):"receive() external payable")};function St(e){return Et(Ct(e))}const Tt=St;class Mt extends P{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class It extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const t=super.get(e);return super.has(e)&&(super.delete(e),super.set(e,t)),t}set(e,t){if(super.has(e)&&super.delete(e),super.set(e,t),this.maxSize&&this.size>this.maxSize){const e=super.keys().next().value;void 0!==e&&super.delete(e)}return this}}const Bt=/* @__PURE__ */new It(8192);const Nt=/^0x[a-fA-F0-9]{40}$/,Rt=/* @__PURE__ */new It(8192);function Lt(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(Rt.has(r))return Rt.get(r);const i=!(!Nt.test(e)||e.toLowerCase()!==e&&n&&function(e,t){if(Bt.has(`${e}.${t}`))return Bt.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),r=xt(me(n),"bytes"),i=n.split("");for(let a=0;a<40;a+=2)r[a>>1]>>4>=8&&i[a]&&(i[a]=i[a].toUpperCase()),(15&r[a>>1])>=8&&i[a+1]&&(i[a+1]=i[a+1].toUpperCase());const o=`0x${i.join("")}`;return Bt.set(`${e}.${t}`,o),o}(e)!==e);return Rt.set(r,i),i}function Dt(e){return"string"==typeof e[0]?Ft(e):function(e){let t=0;for(const i of e)t+=i.length;const n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}(e)}function Ft(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}function Ot(e,t,n,{strict:r}={}){return R(e,{strict:!1})?function(e,t,n,{strict:r}={}){Pt(e,t);const i=`0x${e.replace("0x","").slice(2*(t??0),2*(n??e.length))}`;r&&Ut(i,t,n);return i}(e,t,n,{strict:r}):function(e,t,n,{strict:r}={}){Pt(e,t);const i=e.slice(t,n);r&&Ut(i,t,n);return i}(e,t,n,{strict:r})}function Pt(e,t){if("number"==typeof t&&t>0&&t>L(e)-1)throw new K({offset:t,position:"start",size:L(e)})}function Ut(e,t,n){if("number"==typeof t&&"number"==typeof n&&L(e)!==n-t)throw new K({offset:n,position:"end",size:L(e)})}const qt=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function Ht(e,t){if(e.length!==t.length)throw new z({expectedLength:e.length,givenLength:t.length});const n=function({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(zt({param:e[r],value:t[r]}));return n}({params:e,values:t}),r=Vt(n);return 0===r.length?"0x":r}function zt({param:e,value:t}){const n=function(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}(e.type);if(n){const[r,i]=n;return function(e,{length:t,param:n}){const r=null===t;if(!Array.isArray(e))throw new J(e);if(!r&&e.length!==t)throw new q({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let i=!1;const o=[];for(let a=0;a<e.length;a++){const t=zt({param:n,value:e[a]});t.dynamic&&(i=!0),o.push(t)}if(r||i){const e=Vt(o);if(r){const t=se(o.length,{size:32});return{dynamic:!0,encoded:o.length>0?Dt([t,e]):t}}if(i)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:Dt(o.map(({encoded:e})=>e))}}(t,{length:r,param:{...e,type:i}})}if("tuple"===e.type)return function(e,{param:t}){let n=!1;const r=[];for(let i=0;i<t.components.length;i++){const o=t.components[i],a=zt({param:o,value:e[Array.isArray(e)?i:o.name]});r.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?Vt(r):Dt(r.map(({encoded:e})=>e))}}(t,{param:e});if("address"===e.type)return function(e){if(!Lt(e))throw new Mt({address:e});return{dynamic:!1,encoded:Q(e.toLowerCase())}}(t);if("bool"===e.type)return function(e){if("boolean"!=typeof e)throw new P(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Q(oe(e))}}(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const n=e.type.startsWith("int"),[,,r="256"]=qt.exec(e.type)??[];return function(e,{signed:t,size:n=256}){if("number"==typeof n){const r=2n**(BigInt(n)-(t?1n:0n))-1n,i=t?-r-1n:0n;if(e>r||e<i)throw new Z({max:r.toString(),min:i.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:se(e,{size:32,signed:t})}}(t,{signed:n,size:Number(r)})}if(e.type.startsWith("bytes"))return function(e,{param:t}){const[,n]=t.type.split("bytes"),r=L(e);if(!n){let t=e;return r%32!=0&&(t=Q(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:Dt([Q(se(r,{size:32})),t])}}if(r!==Number.parseInt(n,10))throw new H({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:Q(e,{dir:"right"})}}(t,{param:e});if("string"===e.type)return function(e){const t=ue(e),n=Math.ceil(L(t)/32),r=[];for(let i=0;i<n;i++)r.push(Q(Ot(t,32*i,32*(i+1)),{dir:"right"}));return{dynamic:!0,encoded:Dt([Q(se(L(t),{size:32})),...r])}}(t);throw new G(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function Vt(e){let t=0;for(let o=0;o<e.length;o++){const{dynamic:n,encoded:r}=e[o];t+=n?32:L(r)}const n=[],r=[];let i=0;for(let o=0;o<e.length;o++){const{dynamic:a,encoded:s}=e[o];a?(n.push(se(t+i,{size:32})),r.push(s),i+=L(s)):n.push(s)}return Dt([...n,...r])}const jt=e=>Ot(St(e),0,4);function Gt(e,t){const n=typeof e,r=t.type;switch(r){case"address":return Lt(e,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:return"tuple"===r&&"components"in t?Object.values(t.components).every((t,r)=>"object"===n&&Gt(Object.values(e)[r],t)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?"number"===n||"bigint"===n:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?"string"===n||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)&&(Array.isArray(e)&&e.every(e=>Gt(e,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})))}}function Jt(e,t,n){for(const r in e){const i=e[r],o=t[r];if("tuple"===i.type&&"tuple"===o.type&&"components"in i&&"components"in o)return Jt(i.components,o.components,n[r]);const a=[i.type,o.type];if((()=>!(!a.includes("address")||!a.includes("bytes20"))||(a.includes("address")&&a.includes("string")||!(!a.includes("address")||!a.includes("bytes")))&&Lt(n[r],{strict:!1}))())return a}}function Wt(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}const Kt="/docs/contract/encodeFunctionData";function Yt(e){const{abi:t,args:n,functionName:r}=e;let i=t[0];if(r){const e=function(e){const{abi:t,args:n=[],name:r}=e,i=R(r,{strict:!1}),o=t.filter(e=>i?"function"===e.type?jt(e)===r:"event"===e.type&&Tt(e)===r:"name"in e&&e.name===r);if(0===o.length)return;if(1===o.length)return o[0];let a;for(const s of o)if("inputs"in s)if(n&&0!==n.length){if(s.inputs&&0!==s.inputs.length&&s.inputs.length===n.length&&n.every((e,t)=>{const n="inputs"in s&&s.inputs[t];return!!n&&Gt(e,n)})){if(a&&"inputs"in a&&a.inputs){const e=Jt(s.inputs,a.inputs,n);if(e)throw new j({abiItem:s,type:e[0]},{abiItem:a,type:e[1]})}a=s}}else if(!s.inputs||0===s.inputs.length)return s;return a||o[0]}({abi:t,args:n,name:r});if(!e)throw new V(r,{docsPath:Kt});i=e}if("function"!==i.type)throw new V(void 0,{docsPath:Kt});return{abi:[i],functionName:jt(B(i))}}function Xt(e){const{args:t}=e,{abi:n,functionName:r}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:Yt(e),i=n[0];return Ft([r,("inputs"in i&&i.inputs?Ht(i.inputs,t??[]):void 0)??"0x"])}class Qt extends P{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class Zt extends P{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class $t extends P{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}const _t={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:/* @__PURE__ */new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new $t({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Zt({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Qt({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Qt({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this.o();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this.o();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this.o();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this.o();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this.o();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this.o();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},o(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function en(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(_t);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=/* @__PURE__ */new Map,n.recursiveReadLimit=t,n}const tn={gwei:9,wei:18},nn={ether:-9,wei:9};function rn(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[i,o]=[n.slice(0,n.length-t),n.slice(n.length-t)];return o=o.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${o?`.${o}`:""}`}function on(e,t="wei"){return rn(e,tn[t])}function an(e,t="wei"){return rn(e,nn[t])}function sn(e){return e.reduce((e,{slot:t,value:n})=>`${e} ${t}: ${n}\n`,"")}function cn(e){const t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),n=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`).join("\n")}class un extends P{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class ln extends P{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",cn(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class fn extends P{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class dn extends P{constructor(e,{account:t,docsPath:n,chain:r,data:i,gas:o,gasPrice:a,maxFeePerGas:s,maxPriorityFeePerGas:c,nonce:u,to:l,value:f,stateOverride:d}){const h=t?Wt(t):void 0;let p=cn({from:h?.address,to:l,value:void 0!==f&&`${on(f)} ${r?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:o,gasPrice:void 0!==a&&`${an(a)} gwei`,maxFeePerGas:void 0!==s&&`${an(s)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${an(c)} gwei`,nonce:u});d&&(p+=`\n${function(e){return e.reduce((e,{address:t,...n})=>{let r=`${e} ${t}:\n`;return n.nonce&&(r+=` nonce: ${n.nonce}\n`),n.balance&&(r+=` balance: ${n.balance}\n`),n.code&&(r+=` code: ${n.code}\n`),n.state&&(r+=" state:\n",r+=sn(n.state)),n.stateDiff&&(r+=" stateDiff:\n",r+=sn(n.stateDiff)),r}," State Override:\n").slice(0,-1)}(d)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",p].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}function hn(e,t="hex"){const n=pn(e),r=en(new Uint8Array(n.length));return n.encode(r),"hex"===t?ae(r.bytes):r.bytes}function pn(e){return Array.isArray(e)?function(e){const t=e.reduce((e,t)=>e+t.length,0),n=mn(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),1===n?r.pushUint8(t):2===n?r.pushUint16(t):3===n?r.pushUint24(t):r.pushUint32(t));for(const{encode:t}of e)t(r)}}}(e.map(e=>pn(e))):function(e){const t="string"==typeof e?pe(e):e,n=mn(t.length),r=1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length;return{length:r,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function mn(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new P("Length is too large.")}class gn extends P{constructor({cause:e,message:t}={}){const n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(gn,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(gn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class bn extends P{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${an(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(bn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class wn extends P{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${an(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(wn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class yn extends P{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(yn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class vn extends P{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(vn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class An extends P{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(An,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class kn extends P{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(kn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class xn extends P{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(xn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class En extends P{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(En,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Cn extends P{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Cn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Sn extends P{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${an(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${an(n)} gwei`:""}).`].join("\n"),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(Sn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class Tn extends P{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}function Mn(e,{format:t}){if(!t)return{};const n={};return function t(r){const i=Object.keys(r);for(const o of i)o in e&&(n[o]=e[o]),r[o]&&"object"==typeof r[o]&&!Array.isArray(r[o])&&t(r[o])}(t(e||{})),n}function In(e,t){return({exclude:n,format:r})=>({exclude:n,format:(e,i)=>{const o=t(e,i);if(n)for(const t of n)delete o[t];return{...o,...r(e,i)}},type:e})}const Bn={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Nn(e,t){const n={};return void 0!==e.authorizationList&&(n.authorizationList=e.authorizationList.map(e=>({address:e.address,r:e.r?se(BigInt(e.r)):e.r,s:e.s?se(BigInt(e.s)):e.s,chainId:se(e.chainId),nonce:se(e.nonce),...void 0!==e.yParity?{yParity:se(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:se(e.v)}:{}}))),void 0!==e.accessList&&(n.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(n.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?n.blobs=e.blobs.map(e=>ae(e)):n.blobs=e.blobs),void 0!==e.data&&(n.data=e.data),e.account&&(n.from=e.account.address),void 0!==e.from&&(n.from=e.from),void 0!==e.gas&&(n.gas=se(e.gas)),void 0!==e.gasPrice&&(n.gasPrice=se(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(n.maxFeePerBlobGas=se(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(n.maxFeePerGas=se(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=se(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(n.nonce=se(e.nonce)),void 0!==e.to&&(n.to=e.to),void 0!==e.type&&(n.type=Bn[e.type]),void 0!==e.value&&(n.value=se(e.value)),n}const Rn=2n**256n-1n;const Ln={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Dn(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...null!=e.blockTimestamp&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?ne(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?ne(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Ln[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof n.v){if(0n===n.v||27n===n.v)return 0;if(1n===n.v||28n===n.v)return 1;if(n.v>=35n)return n.v%2n==0n?1:0}})(),"legacy"===n.type&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),"eip2930"===n.type&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),"eip1559"===n.type&&delete n.maxFeePerBlobGas,n}const Fn=/* @__PURE__ */In("transaction",Dn);function On(e,t){const n=(e.transactions??[]).map(e=>"string"==typeof e?e:Dn(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Pn=/* @__PURE__ */In("block",On);function Un(e){const{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>pe(e)):e.blobs,i=[];for(const o of r)i.push(Uint8Array.from(t.blobToKzgCommitment(o)));return"bytes"===n?i:i.map(e=>ae(e))}function qn(e){const{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>pe(e)):e.blobs,i="string"==typeof e.commitments[0]?e.commitments.map(e=>pe(e)):e.commitments,o=[];for(let a=0;a<r.length;a++){const e=r[a],n=i[a];o.push(Uint8Array.from(t.computeBlobKzgProof(e,n)))}return"bytes"===n?o:o.map(e=>ae(e))}function Hn(e,t,n){return e&t^~e&n}function zn(e,t,n){return e&t^e&n^t&n}class Vn extends it{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=ze(this.buffer)}update(e){Ue(this),Oe(e=nt(e));const{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let o=0;o<i;){const a=Math.min(r-this.pos,i-o);if(a===r){const t=ze(e);for(;r<=i-o;o+=r)this.process(t,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ue(this),qe(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:i}=this;let{pos:o}=this;t[o++]=128,He(this.buffer.subarray(o)),this.padOffset>r-o&&(this.process(n,0),o=0);for(let l=o;l<r;l++)t[l]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),a=Number(n>>i&o),s=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,a,r),e.setUint32(t+u,s,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);const a=ze(e),s=this.outputLen;if(s%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=s/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<c;l++)a.setUint32(4*l,u[l],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}i(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:o,pos:a}=this;return e.destroyed=o,e.finished=i,e.length=r,e.pos=a,r%t&&e.buffer.set(n),e}clone(){return this.i()}}const jn=/* @__PURE__ */Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Gn=/* @__PURE__ */Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Jn=/* @__PURE__ */Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Wn=/* @__PURE__ */new Uint32Array(64);class Kn extends Vn{constructor(e=32){super(64,e,8,!1),this.A=0|jn[0],this.B=0|jn[1],this.C=0|jn[2],this.D=0|jn[3],this.E=0|jn[4],this.F=0|jn[5],this.G=0|jn[6],this.H=0|jn[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:o,G:a,H:s}=this;return[e,t,n,r,i,o,a,s]}set(e,t,n,r,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let l=0;l<16;l++,t+=4)Wn[l]=e.getUint32(t,!1);for(let l=16;l<64;l++){const e=Wn[l-15],t=Wn[l-2],n=Ve(e,7)^Ve(e,18)^e>>>3,r=Ve(t,17)^Ve(t,19)^t>>>10;Wn[l]=r+Wn[l-7]+n+Wn[l-16]|0}let{A:n,B:r,C:i,D:o,E:a,F:s,G:c,H:u}=this;for(let l=0;l<64;l++){const e=u+(Ve(a,6)^Ve(a,11)^Ve(a,25))+Hn(a,s,c)+Jn[l]+Wn[l]|0,t=(Ve(n,2)^Ve(n,13)^Ve(n,22))+zn(n,r,i)|0;u=c,c=s,s=a,a=o+e|0,o=i,i=r,r=n,n=e+t|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,s=s+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,i,o,a,s,c,u)}roundClean(){He(Wn)}destroy(){this.set(0,0,0,0,0,0,0,0),He(this.buffer)}}const Yn=/* @__PURE__ */(()=>ye(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),Xn=/* @__PURE__ */(()=>Yn[0])(),Qn=/* @__PURE__ */(()=>Yn[1])(),Zn=/* @__PURE__ */new Uint32Array(80),$n=/* @__PURE__ */new Uint32Array(80);class _n extends Vn{constructor(e=64){super(128,e,16,!1),this.Ah=0|Gn[0],this.Al=0|Gn[1],this.Bh=0|Gn[2],this.Bl=0|Gn[3],this.Ch=0|Gn[4],this.Cl=0|Gn[5],this.Dh=0|Gn[6],this.Dl=0|Gn[7],this.Eh=0|Gn[8],this.El=0|Gn[9],this.Fh=0|Gn[10],this.Fl=0|Gn[11],this.Gh=0|Gn[12],this.Gl=0|Gn[13],this.Hh=0|Gn[14],this.Hl=0|Gn[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:o,Dh:a,Dl:s,Eh:c,El:u,Fh:l,Fl:f,Gh:d,Gl:h,Hh:p,Hl:m}=this;return[e,t,n,r,i,o,a,s,c,u,l,f,d,h,p,m]}set(e,t,n,r,i,o,a,s,c,u,l,f,d,h,p,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|f,this.Gh=0|d,this.Gl=0|h,this.Hh=0|p,this.Hl=0|m}process(e,t){for(let w=0;w<16;w++,t+=4)Zn[w]=e.getUint32(t),$n[w]=e.getUint32(t+=4);for(let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this.Hl,0|g,0|b)),this.set(n,r,i,o,a,s,c,u,l,f,d,h,p,m,g,b)}roundClean(){He(Zn,$n)}destroy(){He(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const er=/* @__PURE__ */ot(()=>new Kn),tr=/* @__PURE__ */ot(()=>new _n),nr=er;function rr(e){const{commitment:t,version:n=1}=e,r=e.to??("string"==typeof t?"hex":"bytes"),i=nr(R(o=t,{strict:!1})?fe(o):o);var o;return i.set([n],0),"bytes"===r?i:ae(i)}const ir=4096,or=131072,ar=761855;class sr extends P{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class cr extends P{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class ur extends P{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class lr extends P{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:["Expected: 1",`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}function fr(e){const{data:t,kzg:n,to:r}=e,i=e.blobs??function(e){const t=e.to??("string"==typeof e.data?"hex":"bytes"),n="string"==typeof e.data?pe(e.data):e.data,r=L(n);if(!r)throw new cr;if(r>ar)throw new sr({maxSize:ar,size:r});const i=[];let o=!0,a=0;for(;o;){const e=en(new Uint8Array(or));let t=0;for(;t<ir;){const r=n.slice(a,a+31);if(e.pushByte(0),e.pushBytes(r),r.length<31){e.pushByte(128),o=!1;break}t++,a+=31}i.push(e)}return"bytes"===t?i.map(e=>e.bytes):i.map(e=>ae(e.bytes))}({data:t,to:r}),o=e.commitments??Un({blobs:i,kzg:n,to:r}),a=e.proofs??qn({blobs:i,commitments:o,kzg:n,to:r}),s=[];for(let c=0;c<i.length;c++)s.push({blob:i[c],commitment:o[c],proof:a[c]});return s}class dr extends P{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}function hr(e,{docsPath:t,...n}){const r=(()=>{const t=function(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof P?e.walk(e=>e?.code===gn.code):e;return r instanceof P?new gn({cause:e,message:r.details}):gn.nodeMessage.test(n)?new gn({cause:e,message:e.details}):bn.nodeMessage.test(n)?new bn({cause:e,maxFeePerGas:t?.maxFeePerGas}):wn.nodeMessage.test(n)?new wn({cause:e,maxFeePerGas:t?.maxFeePerGas}):yn.nodeMessage.test(n)?new yn({cause:e,nonce:t?.nonce}):vn.nodeMessage.test(n)?new vn({cause:e,nonce:t?.nonce}):An.nodeMessage.test(n)?new An({cause:e,nonce:t?.nonce}):kn.nodeMessage.test(n)?new kn({cause:e}):xn.nodeMessage.test(n)?new xn({cause:e,gas:t?.gas}):En.nodeMessage.test(n)?new En({cause:e,gas:t?.gas}):Cn.nodeMessage.test(n)?new Cn({cause:e}):Sn.nodeMessage.test(n)?new Sn({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new Tn({cause:e})}(e,n);return t instanceof Tn?e:t})();return new dn(r,{docsPath:t,...n})}class pr extends P{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join("\n"),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}const mr={"0x0":"reverted","0x1":"success"};function gr(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>function(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):null===e.blockTimestamp?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?ne(e.transactionIndex):null,status:e.status?mr[e.status]:null,type:e.type?Ln[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const br=/* @__PURE__ */In("transactionReceipt",gr);function wr(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new dr({chainId:t});if(i&&!Lt(i))throw new Mt({address:i});if(r&&r>Rn)throw new bn({maxFeePerGas:r});if(n&&r&&n>r)throw new Sn({maxFeePerGas:r,maxPriorityFeePerGas:n})}function yr(e){if(!e||0===e.length)return[];const t=[];for(let n=0;n<e.length;n++){const{address:r,storageKeys:i}=e[n];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new fn({storageKey:i[e]});if(!Lt(r,{strict:!1}))throw new Mt({address:r});t.push([r,i])}return t}function vr(e,t){const n=function(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new ln({transaction:e})}(e);return"eip1559"===n?function(e,t){const{chainId:n,gas:r,nonce:i,to:o,value:a,maxFeePerGas:s,maxPriorityFeePerGas:c,accessList:u,data:l}=e;wr(e);const f=yr(u),d=[se(n),i?se(i):"0x",c?se(c):"0x",s?se(s):"0x",r?se(r):"0x",o??"0x",a?se(a):"0x",l??"0x",f,...Ar(e,t)];return Ft(["0x02",hn(d)])}(e,t):"eip2930"===n?function(e,t){const{chainId:n,gas:r,data:i,nonce:o,to:a,value:s,accessList:c,gasPrice:u}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(t<=0)throw new dr({chainId:t});if(o&&!Lt(o))throw new Mt({address:o});if(n||i)throw new P("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>Rn)throw new bn({maxFeePerGas:r})}(e);const l=yr(c),f=[se(n),o?se(o):"0x",u?se(u):"0x",r?se(r):"0x",a??"0x",s?se(s):"0x",i??"0x",l,...Ar(e,t)];return Ft(["0x01",hn(f)])}(e,t):"eip4844"===n?function(e,t){const{chainId:n,gas:r,nonce:i,to:o,value:a,maxFeePerBlobGas:s,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:f}=e;!function(e){const{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new cr;for(const e of t){const t=L(e),n=ne(Ot(e,0,1));if(32!==t)throw new ur({hash:e,size:t});if(1!==n)throw new lr({hash:e,version:n})}}wr(e)}(e);let d=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(void 0===d||void 0===h)){const t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>ae(e)),n=e.kzg,r=Un({blobs:t,kzg:n});if(void 0===d&&(d=function(e){const{commitments:t,version:n}=e,r=e.to??("string"==typeof t[0]?"hex":"bytes"),i=[];for(const o of t)i.push(rr({commitment:o,to:r,version:n}));return i}({commitments:r})),void 0===h){h=fr({blobs:t,commitments:r,proofs:qn({blobs:t,commitments:r,kzg:n})})}}const p=yr(l),m=[se(n),i?se(i):"0x",u?se(u):"0x",c?se(c):"0x",r?se(r):"0x",o??"0x",a?se(a):"0x",f??"0x",p,s?se(s):"0x",d??[],...Ar(e,t)],g=[],b=[],w=[];if(h)for(let y=0;y<h.length;y++){const{blob:e,commitment:t,proof:n}=h[y];g.push(e),b.push(t),w.push(n)}return Ft(["0x03",hn(h?[m,g,b,w]:m)])}(e,t):"eip7702"===n?function(e,t){const{authorizationList:n,chainId:r,gas:i,nonce:o,to:a,value:s,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:f}=e;!function(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:e}=n,t=n.address;if(!Lt(t))throw new Mt({address:t});if(e<0)throw new dr({chainId:e})}wr(e)}(e);const d=yr(l),h=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e){const{chainId:e,nonce:r,...i}=n,o=n.address;t.push([e?ie(e):"0x",o,r?ie(r):"0x",...Ar({},i)])}return t}(n);return Ft(["0x04",hn([se(r),o?se(o):"0x",u?se(u):"0x",c?se(c):"0x",i?se(i):"0x",a??"0x",s?se(s):"0x",f??"0x",d,h,...Ar(e,t)])])}(e,t):function(e,t){const{chainId:n=0,gas:r,data:i,nonce:o,to:a,value:s,gasPrice:c}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(o&&!Lt(o))throw new Mt({address:o});if(void 0!==t&&t<=0)throw new dr({chainId:t});if(n||i)throw new P("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>Rn)throw new bn({maxFeePerGas:r})}(e);let u=[o?se(o):"0x",c?se(c):"0x",r?se(r):"0x",a??"0x",s?se(s):"0x",i??"0x"];if(t){const e=(()=>{if(t.v>=35n){return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n)}if(n>0)return BigInt(2*n)+BigInt(35n+t.v-27n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new un({v:t.v});return e})(),r=_(t.r),i=_(t.s);u=[...u,se(e),"0x00"===r?"0x":r,"0x00"===i?"0x":i]}else n>0&&(u=[...u,se(n),"0x","0x"]);return hn(u)}(e,t)}function Ar(e,t){const n=t??e,{v:r,yParity:i}=n;if(void 0===n.r)return[];if(void 0===n.s)return[];if(void 0===r&&void 0===i)return[];const o=_(n.r),a=_(n.s);return["number"==typeof i?i?se(1):"0x":0n===r?"0x":1n===r?se(1):27n===r?"0x":se(1),"0x00"===o?"0x":o,"0x00"===a?"0x":a]}function kr(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};return Object.assign(t,{extend:function e(t){return n=>{const r="function"==typeof n?n(t):n,i={...t,...r};return Object.assign(i,{extend:e(i)})}}(t)})}class xr extends it{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Pe(e);const n=nt(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let o=0;o<i.length;o++)i[o]^=54;this.iHash.update(i),this.oHash=e.create();for(let o=0;o<i.length;o++)i[o]^=106;this.oHash.update(i),He(i)}update(e){return Ue(this),this.iHash.update(e),this}digestInto(e){Ue(this),Oe(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}i(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:o,outputLen:a}=this;return e.finished=r,e.destroyed=i,e.blockLen=o,e.outputLen=a,e.oHash=t.i(e.oHash),e.iHash=n.i(e.iHash),e}clone(){return this.i()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Er=(e,t,n)=>new xr(e,t).update(n).digest();Er.create=(e,t)=>new xr(e,t);class Cr extends P{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Sr(e){return e&&e.u&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Tr(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"u",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Mr,Ir={},Br={};var Nr,Rr,Lr={};function Dr(){return Rr||(Rr=1,function(e){const t=function(){if(Mr)return Br;Mr=1,Br.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},Br.toByteArray=function(e){var r,i,a=o(e),s=a[0],c=a[1],u=new n(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),l=0,f=c>0?s-4:s;for(i=0;i<f;i+=4)r=t[e.charCodeAt(i)]<<18|t[e.charCodeAt(i+1)]<<12|t[e.charCodeAt(i+2)]<<6|t[e.charCodeAt(i+3)],u[l++]=r>>16&255,u[l++]=r>>8&255,u[l++]=255&r;return 2===c&&(r=t[e.charCodeAt(i)]<<2|t[e.charCodeAt(i+1)]>>4,u[l++]=255&r),1===c&&(r=t[e.charCodeAt(i)]<<10|t[e.charCodeAt(i+1)]<<4|t[e.charCodeAt(i+2)]>>2,u[l++]=r>>8&255,u[l++]=255&r),u},Br.fromByteArray=function(t){for(var n,r=t.length,i=r%3,o=[],a=16383,c=0,u=r-i;c<u;c+=a)o.push(s(t,c,c+a>u?u:c+a));return 1===i?(n=t[r-1],o.push(e[n>>2]+e[n<<4&63]+"==")):2===i&&(n=(t[r-2]<<8)+t[r-1],o.push(e[n>>10]+e[n>>4&63]+e[n<<2&63]+"=")),o.join("")};for(var e=[],t=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0;i<64;++i)e[i]=r[i],t[r.charCodeAt(i)]=i;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function a(t){return e[t>>18&63]+e[t>>12&63]+e[t>>6&63]+e[63&t]}function s(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(a(r));return i.join("")}return t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63,Br}(),n=(Nr||(Nr=1,Lr.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,c=(1<<s)-1,u=c>>1,l=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=d,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},Lr.write=function(e,t,n,r,i,o){var a,s,c,u=8*o-i-1,l=(1<<u)-1,f=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?d/c:d*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+h]=255&a,h+=p,a/=256,u-=8);e[n+h-p]|=128*m}),Lr),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=function(e){+e!=e&&(e=0);return a.alloc(+e)},e.INSPECT_MAX_BYTES=50;const i=2147483647;function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return s(e,t,n)}function s(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!a.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|h(e,t);let r=o(n);const i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return a.from(r,t,n);const i=function(e){if(a.isBuffer(e)){const t=0|d(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?o(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),o(e<0?0:0|d(e))}function l(e){const t=e.length<0?0:0|d(e.length),n=o(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,a.prototype),r}function d(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function h(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(i)return r?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return S(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){let o,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;o<s;o++)if(u(e,o)===u(t,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===c)return r*a}else-1!==r&&(o-=o-r),r=-1}else for(n+c>s&&(n=s-c),o=n;o>=0;o--){let n=!0;for(let r=0;r<c;r++)if(u(e,o+r)!==u(t,r)){n=!1;break}if(n)return o}return-1}function w(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=t.length;let a;for(r>o/2&&(r=o/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(Y(r))return a;e[n+a]=r}return a}function y(e,t,n,r){return W(G(t,e.length-n),e,n,r)}function v(e,t,n,r){return W(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function A(e,t,n,r){return W(J(t),e,n,r)}function k(e,t,n,r){return W(function(e,t){let n,r,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function x(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function E(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(o=c));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=C));return n}(r)}e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,n){return s(e,t,n)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,n){return function(e,t,n){return c(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e.S&&e!==a.prototype},a.compare=function(e,t){if(K(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=a.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(K(t,Uint8Array))i+t.length>r.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!a.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},a.byteLength=h,a.prototype.S=!0,a.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?E(this,0,e):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){let t="";const n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(e,t,n,r,i){if(K(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const c=Math.min(o,s),u=this.slice(r,i),l=e.slice(t,n);for(let a=0;a<c;++a)if(u[a]!==l[a]){o=u[a],s=l[a];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":case"latin1":case"binary":return v(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this.M||this,0)}};const C=4096;function S(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function M(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let o=t;o<n;++o)i+=X[e[o]];return i}function I(e,t,n){const r=e.slice(t,n);let i="";for(let o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function B(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,i){H(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function L(e,t,n,r,i){H(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,r,i,o){return t=+t,r>>>=0,o||D(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function O(e,t,r,i,o){return t=+t,r>>>=0,o||D(e,0,r,8),n.write(e,t,r,i,52,8),r+8}a.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,a.prototype),r},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return r},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=Q(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),a.prototype.readBigUInt64BE=Q(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),a.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=Q(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),a.prototype.readBigInt64BE=Q(function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),n.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),n.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),n.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),n.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){N(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){N(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=Q(function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Q(function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);N(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);N(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=Q(function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Q(function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return O(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return O(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const o=a.isBuffer(e)?e:a.from(e,r),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%s]}return this};const P={};function U(e,t,n){P[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function H(e,t,n,r,i,o){if(e>n||e<t){const n="bigint"==typeof t?"n":"";let r;throw r=0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`,new P.ERR_OUT_OF_RANGE("value",r,e)}!function(e,t,n){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||V(t,e.length-(n+1))}(r,i,o)}function z(e,t){if("number"!=typeof e)throw new P.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,n){if(Math.floor(e)!==e)throw z(e,n),new P.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new P.ERR_BUFFER_OUT_OF_BOUNDS;throw new P.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),U("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=q(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r},RangeError);const j=/[^+/0-9A-Za-z-_]/g;function G(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function J(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}}(Ir)),Ir}var Fr=Dr();const Or=/* @__PURE__ */BigInt(0),Pr=/* @__PURE__ */BigInt(1);function Ur(e,t=""){if("boolean"!=typeof e){throw new Error((t&&`"${t}"`)+"expected boolean, got type="+typeof e)}return e}function qr(e,t,n=""){const r=De(e),i=e?.length,o=void 0!==t;if(!r||o&&i!==t){throw new Error((n&&`"${n}" `)+"expected Uint8Array"+(o?` of length ${t}`:"")+", got "+(r?`length=${i}`:"type="+typeof e))}return e}function Hr(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function zr(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?Or:BigInt("0x"+e)}function Vr(e){return zr(Ke(e))}function jr(e){return Oe(e),zr(Ke(Uint8Array.from(e).reverse()))}function Gr(e,t){return tt(e.toString(16).padStart(2*t,"0"))}function Jr(e,t){return Gr(e,t).reverse()}function Wr(e,t,n){let r;if("string"==typeof t)try{r=tt(t)}catch(o){throw new Error(e+" must be hex string or Uint8Array, cause: "+o)}else{if(!De(t))throw new Error(e+" must be hex string or Uint8Array");r=Uint8Array.from(t)}const i=r.length;if("number"==typeof n&&i!==n)throw new Error(e+" of length "+n+" expected, got "+i);return r}function Kr(e){return Uint8Array.from(e)}const Yr=e=>"bigint"==typeof e&&Or<=e;function Xr(e,t,n,r){if(!function(e,t,n){return Yr(e)&&Yr(t)&&Yr(n)&&t<=e&&e<n}(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function Qr(e){let t;for(t=0;e>Or;e>>=Pr,t+=1);return t}const Zr=e=>(Pr<<BigInt(e))-Pr;function $r(e,t,n={}){if(!e||"object"!=typeof e)throw new Error("expected valid options object");function r(t,n,r){const i=e[t];if(r&&void 0===i)return;const o=typeof i;if(o!==n||null===i)throw new Error(`param "${t}" is invalid: expected ${n}, got ${o}`)}Object.entries(t).forEach(([e,t])=>r(e,t,!1)),Object.entries(n).forEach(([e,t])=>r(e,t,!0))}function _r(e){const t=/* @__PURE__ */new WeakMap;return(n,...r)=>{const i=t.get(n);if(void 0!==i)return i;const o=e(n,...r);return t.set(n,o),o}}const ei=BigInt(0),ti=BigInt(1),ni=/* @__PURE__ */BigInt(2),ri=/* @__PURE__ */BigInt(3),ii=/* @__PURE__ */BigInt(4),oi=/* @__PURE__ */BigInt(5),ai=/* @__PURE__ */BigInt(7),si=/* @__PURE__ */BigInt(8),ci=/* @__PURE__ */BigInt(9),ui=/* @__PURE__ */BigInt(16);function li(e,t){const n=e%t;return n>=ei?n:t+n}function fi(e,t,n){let r=e;for(;t-- >ei;)r*=r,r%=n;return r}function di(e,t){if(e===ei)throw new Error("invert: expected non-zero number");if(t<=ei)throw new Error("invert: expected positive modulus, got "+t);let n=li(e,t),r=t,i=ei,o=ti;for(;n!==ei;){const e=r%n,t=i-o*(r/n);r=n,n=e,i=o,o=t}if(r!==ti)throw new Error("invert: does not exist");return li(i,t)}function hi(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function pi(e,t){const n=(e.ORDER+ti)/ii,r=e.pow(t,n);return hi(e,r,t),r}function mi(e,t){const n=(e.ORDER-oi)/si,r=e.mul(t,ni),i=e.pow(r,n),o=e.mul(t,i),a=e.mul(e.mul(o,ni),i),s=e.mul(o,e.sub(a,e.ONE));return hi(e,s,t),s}function gi(e){if(e<ri)throw new Error("sqrt is not defined for small field");let t=e-ti,n=0;for(;t%ni===ei;)t/=ni,n++;let r=ni;const i=ki(e);for(;1===vi(i,r);)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===n)return pi;let o=i.pow(r,t);const a=(t+ti)/ni;return function(e,r){if(e.is0(r))return r;if(1!==vi(e,r))throw new Error("Cannot find square root");let i=n,s=e.mul(e.ONE,o),c=e.pow(r,t),u=e.pow(r,a);for(;!e.eql(c,e.ONE);){if(e.is0(c))return e.ZERO;let t=1,n=e.sqr(c);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===i)throw new Error("Cannot find square root");const r=ti<<BigInt(i-t-1),o=e.pow(s,r);i=t,s=e.sqr(o),c=e.mul(c,s),u=e.mul(u,o)}return u}}function bi(e){return e%ii===ri?pi:e%si===oi?mi:e%ui===ci?function(e){const t=ki(e),n=gi(e),r=n(t,t.neg(t.ONE)),i=n(t,r),o=n(t,t.neg(r)),a=(e+ai)/ui;return(e,t)=>{let n=e.pow(t,a),s=e.mul(n,r);const c=e.mul(n,i),u=e.mul(n,o),l=e.eql(e.sqr(s),t),f=e.eql(e.sqr(c),t);n=e.cmov(n,s,l),s=e.cmov(u,c,f);const d=e.eql(e.sqr(s),t),h=e.cmov(n,s,d);return hi(e,h,t),h}}(e):gi(e)}const wi=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function yi(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),o=e.inv(i);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),o),r}function vi(e,t){const n=(e.ORDER-ti)/ni,r=e.pow(t,n),i=e.eql(r,e.ONE),o=e.eql(r,e.ZERO),a=e.eql(r,e.neg(e.ONE));if(!i&&!o&&!a)throw new Error("invalid Legendre symbol result");return i?1:o?0:-1}function Ai(e,t){void 0!==t&&Fe(t);const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function ki(e,t,n=!1,r={}){if(e<=ei)throw new Error("invalid field: expected ORDER > 0, got "+e);let i,o,a,s=!1;if("object"==typeof t&&null!=t){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const e=t;e.BITS&&(i=e.BITS),e.sqrt&&(o=e.sqrt),"boolean"==typeof e.isLE&&(n=e.isLE),"boolean"==typeof e.modFromBytes&&(s=e.modFromBytes),a=e.allowedLengths}else"number"==typeof t&&(i=t),r.sqrt&&(o=r.sqrt);const{nBitLength:c,nByteLength:u}=Ai(e,i);if(u>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const f=Object.freeze({ORDER:e,isLE:n,BITS:c,BYTES:u,MASK:Zr(c),ZERO:ei,ONE:ti,allowedLengths:a,create:t=>li(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return ei<=t&&t<e},is0:e=>e===ei,isValidNot0:e=>!f.is0(e)&&f.isValid(e),isOdd:e=>(e&ti)===ti,neg:t=>li(-t,e),eql:(e,t)=>e===t,sqr:t=>li(t*t,e),add:(t,n)=>li(t+n,e),sub:(t,n)=>li(t-n,e),mul:(t,n)=>li(t*n,e),pow:(e,t)=>function(e,t,n){if(n<ei)throw new Error("invalid exponent, negatives unsupported");if(n===ei)return e.ONE;if(n===ti)return t;let r=e.ONE,i=t;for(;n>ei;)n&ti&&(r=e.mul(r,i)),i=e.sqr(i),n>>=ti;return r}(f,e,t),div:(t,n)=>li(t*di(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>di(t,e),sqrt:o||(t=>(l||(l=bi(e)),l(f,t))),toBytes:e=>n?Jr(e,u):Gr(e,u),fromBytes:(t,r=!0)=>{if(a){if(!a.includes(t.length)||t.length>u)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+t.length);const e=new Uint8Array(u);e.set(t,n?0:e.length-t.length),t=e}if(t.length!==u)throw new Error("Field.fromBytes: expected "+u+" bytes, got "+t.length);let i=n?jr(t):Vr(t);if(s&&(i=li(i,e)),!r&&!f.isValid(i))throw new Error("invalid field element: outside of range 0..ORDER");return i},invertBatch:e=>yi(f,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(f)}function xi(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Ei(e){const t=xi(e);return t+Math.ceil(t/2)}const Ci=BigInt(0),Si=BigInt(1);function Ti(e,t){const n=t.negate();return e?n:t}function Mi(e,t){const n=yi(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function Ii(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Bi(e,t){Ii(e,t);const n=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:Zr(e),maxNumber:n,shiftBy:BigInt(e)}}function Ni(e,t,n){const{windowSize:r,mask:i,maxNumber:o,shiftBy:a}=n;let s=Number(e&i),c=e>>a;s>r&&(s-=o,c+=Si);const u=t*r;return{nextN:c,offset:u+Math.abs(s)-1,isZero:0===s,isNeg:s<0,isNegF:t%2!=0,offsetF:u}}const Ri=/* @__PURE__ */new WeakMap,Li=/* @__PURE__ */new WeakMap;function Di(e){return Li.get(e)||1}function Fi(e){if(e!==Ci)throw new Error("invalid wNAF")}class Oi{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}I(e,t,n=this.ZERO){let r=e;for(;t>Ci;)t&Si&&(n=n.add(r)),r=r.double(),t>>=Si;return n}precomputeWindow(e,t){const{windows:n,windowSize:r}=Bi(t,this.bits),i=[];let o=e,a=o;for(let s=0;s<n;s++){a=o,i.push(a);for(let e=1;e<r;e++)a=a.add(o),i.push(a);o=a.double()}return i}wNAF(e,t,n){if(!this.Fn.isValid(n))throw new Error("invalid scalar");let r=this.ZERO,i=this.BASE;const o=Bi(e,this.bits);for(let a=0;a<o.windows;a++){const{nextN:e,offset:s,isZero:c,isNeg:u,isNegF:l,offsetF:f}=Ni(n,a,o);n=e,c?i=i.add(Ti(l,t[f])):r=r.add(Ti(u,t[s]))}return Fi(n),{p:r,f:i}}wNAFUnsafe(e,t,n,r=this.ZERO){const i=Bi(e,this.bits);for(let o=0;o<i.windows&&n!==Ci;o++){const{nextN:e,offset:a,isZero:s,isNeg:c}=Ni(n,o,i);if(n=e,!s){const e=t[a];r=r.add(c?e.negate():e)}}return Fi(n),r}getPrecomputes(e,t,n){let r=Ri.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&("function"==typeof n&&(r=n(r)),Ri.set(t,r))),r}cached(e,t,n){const r=Di(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)}unsafe(e,t,n,r){const i=Di(e);return 1===i?this.I(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)}createCache(e,t){Ii(t,this.bits),Li.set(e,t),Ri.delete(e)}hasCache(e){return 1!==Di(e)}}function Pi(e,t,n,r){!function(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)})}(n,e),function(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)})}(r,t);const i=n.length,o=r.length;if(i!==o)throw new Error("arrays of points and scalars must have equal length");const a=e.ZERO,s=Qr(BigInt(i));let c=1;s>12?c=s-3:s>4?c=s-2:s>0&&(c=2);const u=Zr(c),l=new Array(Number(u)+1).fill(a);let f=a;for(let d=Math.floor((t.BITS-1)/c)*c;d>=0;d-=c){l.fill(a);for(let t=0;t<o;t++){const e=r[t],i=Number(e>>BigInt(d)&u);l[i]=l[i].add(n[t])}let e=a;for(let t=l.length-1,n=a;t>0;t--)n=n.add(l[t]),e=e.add(n);if(f=f.add(e),0!==d)for(let t=0;t<c;t++)f=f.double()}return f}function Ui(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return function(e){$r(e,wi.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"}))}(t),t}return ki(e,{isLE:n})}function qi(e,t,n={},r){if(void 0===r&&(r="edwards"===e),!t||"object"!=typeof t)throw new Error(`expected valid ${e} CURVE object`);for(const s of["p","n","h"]){const e=t[s];if(!("bigint"==typeof e&&e>Ci))throw new Error(`CURVE.${s} must be positive bigint`)}const i=Ui(t.p,n.Fp,r),o=Ui(t.n,n.Fn,r),a=["Gx","Gy","a","weierstrass"===e?"b":"d"];for(const s of a)if(!i.isValid(t[s]))throw new Error(`CURVE.${s} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:i,Fn:o}}const Hi=BigInt(0),zi=BigInt(1),Vi=BigInt(2),ji=BigInt(8);function Gi(e,t,n={}){if("function"!=typeof t)throw new Error('"hash" function param is required');$r(n,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:r}=n,{BASE:i,Fp:o,Fn:a}=e,s=n.randomBytes||at,c=n.adjustScalarBytes||(e=>e),u=n.domain||((e,t,n)=>{if(Ur(n,"phflag"),t.length||n)throw new Error("Contexts/pre-hash are not supported");return e});function l(e){return a.create(jr(e))}function f(e){const{head:n,prefix:r,scalar:o}=function(e){const n=g.secretKey;e=Wr("private key",e,n);const r=Wr("hashed private key",t(e),2*n),i=c(r.slice(0,n));return{head:i,prefix:r.slice(n,2*n),scalar:l(i)}}(e),a=i.multiply(o),s=a.toBytes();return{head:n,prefix:r,scalar:o,point:a,pointBytes:s}}function d(e){return f(e).pointBytes}function h(e=Uint8Array.of(),...n){const i=rt(...n);return l(t(u(i,Wr("context",e),!!r)))}const p={zip215:!0};const m=o.BYTES,g={secretKey:m,publicKey:m,signature:2*m,seed:m};function b(e=s(g.seed)){return qr(e,g.seed,"seed")}const w={getExtendedPublicKey:f,randomSecretKey:b,isValidSecretKey:function(e){return De(e)&&e.length===a.BYTES},isValidPublicKey:function(t,n){try{return!!e.fromBytes(t,n)}catch(r){return!1}},toMontgomery(t){const{y:n}=e.fromBytes(t),r=g.publicKey,i=32===r;if(!i&&57!==r)throw new Error("only defined for 25519 and 448");const a=i?o.div(zi+n,zi-n):o.div(n-zi,n+zi);return o.toBytes(a)},toMontgomerySecret(e){const n=g.secretKey;qr(e,n);const r=t(e.subarray(0,n));return c(r).subarray(0,n)},randomPrivateKey:b,precompute:(t=8,n=e.BASE)=>n.precompute(t,!1)};return Object.freeze({keygen:function(e){const t=w.randomSecretKey(e);return{secretKey:t,publicKey:d(t)}},getPublicKey:d,sign:function(e,t,n={}){e=Wr("message",e),r&&(e=r(e));const{prefix:o,scalar:s,pointBytes:c}=f(t),u=h(n.context,o,e),l=i.multiply(u).toBytes(),d=h(n.context,l,c,e),p=a.create(u+d*s);if(!a.isValid(p))throw new Error("sign failed: invalid s");return qr(rt(l,a.toBytes(p)),g.signature,"result")},verify:function(t,n,o,a=p){const{context:s,zip215:c}=a,u=g.signature;t=Wr("signature",t,u),n=Wr("message",n),o=Wr("publicKey",o,g.publicKey),void 0!==c&&Ur(c,"zip215"),r&&(n=r(n));const l=u/2,f=t.subarray(0,l),d=jr(t.subarray(l,u));let m,b,w;try{m=e.fromBytes(o,c),b=e.fromBytes(f,c),w=i.multiplyUnsafe(d)}catch(v){return!1}if(!c&&m.isSmallOrder())return!1;const y=h(s,b.toBytes(),m.toBytes(),n);return b.add(m.multiplyUnsafe(y)).subtract(w).clearCofactor().is0()},utils:w,Point:e,lengths:g})}function Ji(e){const{CURVE:t,curveOpts:n,hash:r,eddsaOpts:i}=function(e){const t={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n={Fp:e.Fp,Fn:ki(t.n,e.nBitLength,!0),uvRatio:e.uvRatio},r={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve};return{CURVE:t,curveOpts:n,hash:e.hash,eddsaOpts:r}}(e),o=function(e,t={}){const n=qi("edwards",e,t,t.FpFnLE),{Fp:r,Fn:i}=n;let o=n.CURVE;const{h:a}=o;$r(t,{},{uvRatio:"function"});const s=Vi<<BigInt(8*i.BYTES)-zi,c=e=>r.create(e),u=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:r.sqrt(r.div(e,t))}}catch(n){return{isValid:!1,value:Hi}}});if(!function(e,t,n,r){const i=e.sqr(n),o=e.sqr(r),a=e.add(e.mul(t.a,i),o),s=e.add(e.ONE,e.mul(t.d,e.mul(i,o)));return e.eql(a,s)}(r,o,o.Gx,o.Gy))throw new Error("bad curve params: generator point");function l(e,t,n=!1){return Xr("coordinate "+e,t,n?zi:Hi,s),t}function f(e){if(!(e instanceof p))throw new Error("ExtendedPoint expected")}const d=_r((e,t)=>{const{X:n,Y:i,Z:o}=e,a=e.is0();null==t&&(t=a?ji:r.inv(o));const s=c(n*t),u=c(i*t),l=r.mul(o,t);if(a)return{x:Hi,y:zi};if(l!==zi)throw new Error("invZ was invalid");return{x:s,y:u}}),h=_r(e=>{const{a:t,d:n}=o;if(e.is0())throw new Error("bad point: ZERO");const{X:r,Y:i,Z:a,T:s}=e,u=c(r*r),l=c(i*i),f=c(a*a),d=c(f*f),h=c(u*t);if(c(f*c(h+l))!==c(d+c(n*c(u*l))))throw new Error("bad point: equation left != right (1)");if(c(r*i)!==c(a*s))throw new Error("bad point: equation left != right (2)");return!0});class p{constructor(e,t,n,r){this.X=l("x",e),this.Y=l("y",t),this.Z=l("z",n,!0),this.T=l("t",r),Object.freeze(this)}static CURVE(){return o}static fromAffine(e){if(e instanceof p)throw new Error("extended point not allowed");const{x:t,y:n}=e||{};return l("x",t),l("y",n),new p(t,n,zi,c(t*n))}static fromBytes(e,t=!1){const n=r.BYTES,{a:i,d:a}=o;e=Kr(qr(e,n,"point")),Ur(t,"zip215");const l=Kr(e),f=e[n-1];l[n-1]=-129&f;const d=jr(l),h=t?s:r.ORDER;Xr("point.y",d,Hi,h);const m=c(d*d),g=c(m-zi),b=c(a*m-i);let{isValid:w,value:y}=u(g,b);if(!w)throw new Error("bad point: invalid y coordinate");const v=(y&zi)===zi,A=!!(128&f);if(!t&&y===Hi&&A)throw new Error("bad point: x=0 and x_0=1");return A!==v&&(y=c(-y)),p.fromAffine({x:y,y:d})}static fromHex(e,t=!1){return p.fromBytes(Wr("point",e),t)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return m.createCache(this,e),t||this.multiply(Vi),this}assertValidity(){h(this)}equals(e){f(e);const{X:t,Y:n,Z:r}=this,{X:i,Y:o,Z:a}=e,s=c(t*a),u=c(i*r),l=c(n*a),d=c(o*r);return s===u&&l===d}is0(){return this.equals(p.ZERO)}negate(){return new p(c(-this.X),this.Y,this.Z,c(-this.T))}double(){const{a:e}=o,{X:t,Y:n,Z:r}=this,i=c(t*t),a=c(n*n),s=c(Vi*c(r*r)),u=c(e*i),l=t+n,f=c(c(l*l)-i-a),d=u+a,h=d-s,m=u-a,g=c(f*h),b=c(d*m),w=c(f*m),y=c(h*d);return new p(g,b,y,w)}add(e){f(e);const{a:t,d:n}=o,{X:r,Y:i,Z:a,T:s}=this,{X:u,Y:l,Z:d,T:h}=e,m=c(r*u),g=c(i*l),b=c(s*n*h),w=c(a*d),y=c((r+i)*(u+l)-m-g),v=w-b,A=w+b,k=c(g-t*m),x=c(y*v),E=c(A*k),C=c(y*k),S=c(v*A);return new p(x,E,S,C)}subtract(e){return this.add(e.negate())}multiply(e){if(!i.isValidNot0(e))throw new Error("invalid scalar: expected 1 <= sc < curve.n");const{p:t,f:n}=m.cached(this,e,e=>Mi(p,e));return Mi(p,[t,n])[0]}multiplyUnsafe(e,t=p.ZERO){if(!i.isValid(e))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return e===Hi?p.ZERO:this.is0()||e===zi?this:m.unsafe(this,e,e=>Mi(p,e),t)}isSmallOrder(){return this.multiplyUnsafe(a).is0()}isTorsionFree(){return m.unsafe(this,o.n).is0()}toAffine(e){return d(this,e)}clearCofactor(){return a===zi?this:this.multiplyUnsafe(a)}toBytes(){const{x:e,y:t}=this.toAffine(),n=r.toBytes(t);return n[n.length-1]|=e&zi?128:0,n}toHex(){return Ke(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(e){return Mi(p,e)}static msm(e,t){return Pi(p,i,e,t)}N(e){this.precompute(e)}toRawBytes(){return this.toBytes()}}p.BASE=new p(o.Gx,o.Gy,zi,c(o.Gx*o.Gy)),p.ZERO=new p(Hi,zi,zi,Hi),p.Fp=r,p.Fn=i;const m=new Oi(p,i.BITS);return p.BASE.precompute(8),p}(t,n);return function(e,t){const n=t.Point;return Object.assign({},t,{ExtendedPoint:n,CURVE:e,nBitLength:n.Fn.BITS,nByteLength:n.Fn.BYTES})}(e,Gi(o,r,i))}const Wi=BigInt(1),Ki=BigInt(2);BigInt(3);const Yi=BigInt(5),Xi=BigInt(8),Qi=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),Zi=/* @__PURE__ */(()=>({p:Qi,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:Xi,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")}))();function $i(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const _i=/* @__PURE__ */BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function eo(e,t){const n=Qi,r=li(t*t*t,n),i=function(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),o=Qi,a=e*e%o*e%o,s=fi(a,Ki,o)*a%o,c=fi(s,Wi,o)*e%o,u=fi(c,Yi,o)*c%o,l=fi(u,t,o)*u%o,f=fi(l,n,o)*l%o,d=fi(f,r,o)*f%o,h=fi(d,i,o)*d%o,p=fi(h,i,o)*d%o,m=fi(p,t,o)*u%o;return{pow_p_5_8:fi(m,Ki,o)*e%o,b2:a}}(e*li(r*r*t,n)).pow_p_5_8;let o=li(e*r*i,n);const a=li(t*o*o,n),s=o,c=li(o*_i,n),u=a===e,l=a===li(-e,n),f=a===li(-e*_i,n);return u&&(o=s),(l||f)&&(o=c),(li(o,n)&ti)===ti&&(o=li(-o,n)),{isValid:u||l,value:o}}const to=/* @__PURE__ */(()=>ki(Zi.p,{isLE:!0}))(),no=/* @__PURE__ */(()=>({...Zi,Fp:to,hash:tr,adjustScalarBytes:$i,uvRatio:eo}))(),ro=/* @__PURE__ */(()=>Ji(no))();var io={exports:{}};const oo=/* @__PURE__ */Tr(/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ao,so=io.exports;function co(){return ao||(ao=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this.R(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:oo.Buffer}catch(S){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function s(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function c(e,t,r,i){for(var o=0,a=0,s=Math.min(e.length,r),c=t;c<s;c++){var u=e.charCodeAt(c)-48;o*=i,a=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&a<i,"Invalid character"),o+=a}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype.R=function(e,t,r){if("number"==typeof e)return this.L(e,t,r);if("object"==typeof e)return this.O(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this.P(e,i,r):(this.U(e,t,i),"le"===r&&this.O(this.toArray(),t,r)))},i.prototype.L=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this.O(this.toArray(),t,r)},i.prototype.O=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.q()},i.prototype.P=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=s(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=s(e,t,r)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.q()},i.prototype.U=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,l=n;l<s;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this.V(u);if(0!==a){var f=1;for(u=c(e,l,e.length,t),l=0;l<a;l++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this.V(u)}this.q()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.j=function(e){u(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype.J=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.q=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this.W()},i.prototype.W=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[/* @__PURE__ */Symbol.for("nodejs.util.inspect.custom")]=l}catch(S){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var u=1;u<r;u++){for(var l=c>>>26,f=67108863&c,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}n.words[u]=0|f,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.q()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],c=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?f[6-c.length]+c+r:c+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=d[e],l=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(l).toString(e);r=(p=p.idivn(l)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){this.q();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},i.prototype.K=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===o?(n<e.length&&(e[n++]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype.$=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===o?(n>=0&&(e[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._=function(e){return 32-Math.clz32(e)}:i.prototype._=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype.te=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this.te(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.q()},i.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.q()},i.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.q()},i.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this.J(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.q()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this.J(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.q()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this.W();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t.W();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t.W()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this.W();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a<r.length;a++)o=(t=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<n.length;a++)o=(t=(0|n.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.q()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,i,o,a=e.words,s=t.words,c=n.words,u=0,l=0|a[0],f=8191&l,d=l>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],b=8191&g,w=g>>>13,y=0|a[3],v=8191&y,A=y>>>13,k=0|a[4],x=8191&k,E=k>>>13,C=0|a[5],S=8191&C,T=C>>>13,M=0|a[6],I=8191&M,B=M>>>13,N=0|a[7],R=8191&N,L=N>>>13,D=0|a[8],F=8191&D,O=D>>>13,P=0|a[9],U=8191&P,q=P>>>13,H=0|s[0],z=8191&H,V=H>>>13,j=0|s[1],G=8191&j,J=j>>>13,W=0|s[2],K=8191&W,Y=W>>>13,X=0|s[3],Q=8191&X,Z=X>>>13,$=0|s[4],_=8191&$,ee=$>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,V))+Math.imul(d,z)|0))<<13)|0;u=((o=Math.imul(d,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,z),i=(i=Math.imul(p,V))+Math.imul(m,z)|0,o=Math.imul(m,V);var be=(u+(r=r+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(d,G)|0))<<13)|0;u=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,z),i=(i=Math.imul(b,V))+Math.imul(w,z)|0,o=Math.imul(w,V),r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,J)|0;var we=(u+(r=r+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(v,z),i=(i=Math.imul(v,V))+Math.imul(A,z)|0,o=Math.imul(A,V),r=r+Math.imul(b,G)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,J)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,Y)|0;var ye=(u+(r=r+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,Q)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(x,z),i=(i=Math.imul(x,V))+Math.imul(E,z)|0,o=Math.imul(E,V),r=r+Math.imul(v,G)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,J)|0,r=r+Math.imul(b,K)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(w,K)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var ve=(u+(r=r+Math.imul(f,_)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,_)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(S,z),i=(i=Math.imul(S,V))+Math.imul(T,z)|0,o=Math.imul(T,V),r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,J)|0,r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(p,_)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,_)|0,o=o+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(I,z),i=(i=Math.imul(I,V))+Math.imul(B,z)|0,o=Math.imul(B,V),r=r+Math.imul(S,G)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Z)|0,r=r+Math.imul(b,_)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(w,_)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var ke=(u+(r=r+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(R,z),i=(i=Math.imul(R,V))+Math.imul(L,z)|0,o=Math.imul(L,V),r=r+Math.imul(I,G)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,J)|0,r=r+Math.imul(S,K)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(T,K)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(v,_)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(A,_)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(w,ne)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var xe=(u+(r=r+Math.imul(f,ce)|0)|0)+((8191&(i=(i=i+Math.imul(f,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(F,z),i=(i=Math.imul(F,V))+Math.imul(O,z)|0,o=Math.imul(O,V),r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(L,G)|0,o=o+Math.imul(L,J)|0,r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(x,_)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(E,_)|0,o=o+Math.imul(E,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,r=r+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(U,z),i=(i=Math.imul(U,V))+Math.imul(q,z)|0,o=Math.imul(q,V),r=r+Math.imul(F,G)|0,i=(i=i+Math.imul(F,J)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,J)|0,r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,Y)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,Z)|0,r=r+Math.imul(S,_)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(T,_)|0,o=o+Math.imul(T,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(E,ne)|0,o=o+Math.imul(E,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(b,ce)|0,i=(i=i+Math.imul(b,ue)|0)+Math.imul(w,ce)|0,o=o+Math.imul(w,ue)|0,r=r+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Ce=(u+(r=r+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(U,G),i=(i=Math.imul(U,J))+Math.imul(q,G)|0,o=Math.imul(q,J),r=r+Math.imul(F,K)|0,i=(i=i+Math.imul(F,Y)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Z)|0,r=r+Math.imul(I,_)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,_)|0,o=o+Math.imul(B,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(T,ne)|0,o=o+Math.imul(T,re)|0,r=r+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,r=r+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(b,fe)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,de)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,Y))+Math.imul(q,K)|0,o=Math.imul(q,Y),r=r+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,Z)|0,r=r+Math.imul(R,_)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(L,_)|0,o=o+Math.imul(L,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(B,ne)|0,o=o+Math.imul(B,re)|0,r=r+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,r=r+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(E,ce)|0,o=o+Math.imul(E,ue)|0,r=r+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Te=(u+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(w,pe)|0))<<13)|0;u=((o=o+Math.imul(w,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(U,Q),i=(i=Math.imul(U,Z))+Math.imul(q,Q)|0,o=Math.imul(q,Z),r=r+Math.imul(F,_)|0,i=(i=i+Math.imul(F,ee)|0)+Math.imul(O,_)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(L,ne)|0,o=o+Math.imul(L,re)|0,r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,r=r+Math.imul(S,ce)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,ue)|0,r=r+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(E,fe)|0,o=o+Math.imul(E,de)|0;var Me=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(U,_),i=(i=Math.imul(U,ee))+Math.imul(q,_)|0,o=Math.imul(q,ee),r=r+Math.imul(F,ne)|0,i=(i=i+Math.imul(F,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,ae)|0,r=r+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,ce)|0,o=o+Math.imul(B,ue)|0,r=r+Math.imul(S,fe)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(T,fe)|0,o=o+Math.imul(T,de)|0;var Ie=(u+(r=r+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(E,pe)|0))<<13)|0;u=((o=o+Math.imul(E,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(U,ne),i=(i=Math.imul(U,re))+Math.imul(q,ne)|0,o=Math.imul(q,re),r=r+Math.imul(F,oe)|0,i=(i=i+Math.imul(F,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(L,ce)|0,o=o+Math.imul(L,ue)|0,r=r+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,de)|0;var Be=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(T,pe)|0))<<13)|0;u=((o=o+Math.imul(T,me)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(U,oe),i=(i=Math.imul(U,ae))+Math.imul(q,oe)|0,o=Math.imul(q,ae),r=r+Math.imul(F,ce)|0,i=(i=i+Math.imul(F,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,r=r+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(L,fe)|0,o=o+Math.imul(L,de)|0;var Ne=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(U,ce),i=(i=Math.imul(U,ue))+Math.imul(q,ce)|0,o=Math.imul(q,ue),r=r+Math.imul(F,fe)|0,i=(i=i+Math.imul(F,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Re=(u+(r=r+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(L,pe)|0))<<13)|0;u=((o=o+Math.imul(L,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(U,fe),i=(i=Math.imul(U,de))+Math.imul(q,fe)|0,o=Math.imul(q,de);var Le=(u+(r=r+Math.imul(F,pe)|0)|0)+((8191&(i=(i=i+Math.imul(F,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863;var De=(u+(r=Math.imul(U,pe))|0)+((8191&(i=(i=Math.imul(U,me))+Math.imul(q,pe)|0))<<13)|0;return u=((o=Math.imul(q,me))+(i>>>13)|0)+(De>>>26)|0,De&=67108863,c[0]=ge,c[1]=be,c[2]=we,c[3]=ye,c[4]=ve,c[5]=Ae,c[6]=ke,c[7]=xe,c[8]=Ee,c[9]=Ce,c[10]=Se,c[11]=Te,c[12]=Me,c[13]=Ie,c[14]=Be,c[15]=Ne,c[16]=Re,c[17]=Le,c[18]=De,0!==u&&(c[19]=u,n.length++),n};function g(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var s=67108863&r,c=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=c;u++){var l=o-u,f=(0|e.words[l])*(0|t.words[u]),d=67108863&f;s=67108863&(d=d+s|0),i+=(a=(a=a+(f/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.q()}function b(e,t,n){return g(e,t,n)}Math.imul||(m=p),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?p(this,e,t):n<1024?g(this,e,t):b(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),b(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,a=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,c=(0|this.words[t])-s<<r;this.words[t]=c|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.q()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,c=r;if(i-=a,i=Math.max(0,i),c){for(var u=0;u<a;u++)c.words[u]=this.words[u];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var f=0|this.words[u];this.words[u]=l<<26-o|f>>>o,l=f&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.q()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return 0===this.length&&(this.words[0]=0,this.length=1),this.q()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this.V(e)},i.prototype.V=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.q()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype.re=function(e,t,r){var i,o,a=e.length+r;this.J(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var c=(0|e.words[i])*t;s=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.q();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.q()},i.prototype.ie=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,a=0|o.words[o.length-1];0!=(n=26-this._(a))&&(o=o.ushln(n),r.iushln(n),a=0|o.words[o.length-1]);var s,c=r.length-o.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=r.clone().re(o,1,c);0===l.negative&&(r=l,s&&(s.words[c]=1));for(var f=c-1;f>=0;f--){var d=67108864*(0|r.words[o.length+f])+(0|r.words[o.length+f-1]);for(d=Math.min(d/a|0,67108863),r.re(o,d,f);0!==r.negative;)d--,r.negative=0,r.re(o,1,f),r.isZero()||(r.negative^=1);s&&(s.words[f]=d)}return s&&s.q(),r.q(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this.ie(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this.q(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0===(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(l),a.isub(f)),o.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(f)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s),a.isub(c)):(r.isub(t),s.isub(o),c.isub(a))}return{a:s,b:c,gcd:r.iushln(u)}},i.prototype.oe=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;0===(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var f=0,d=1;0===(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this.J(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.q(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new E(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this).ae(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype.ae=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this.ae(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red.se(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red.se(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red.ce(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red.ce(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red.ce(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red.ce(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red.ce(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red.ce(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this.ue()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=i.fe(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r.oe(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype.ue=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n.q(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},r(v,y),v.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&n)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(A,y),r(k,y),r(x,y),x.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i.fe=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new A;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return w[e]=t,t},E.prototype.ce=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype.se=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e).ae(this):(u(e,e.umod(this.m).ae(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e).ae(this)},E.prototype.add=function(e,t){this.se(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n.ae(this)},E.prototype.iadd=function(e,t){this.se(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this.se(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n.ae(this)},E.prototype.isub=function(e,t){this.se(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this.ce(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this.se(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this.se(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);n(!o.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var f=this.pow(l,o),d=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var b=this.pow(f,new i(1).iushln(p-g-1));d=d.redMul(b),f=b.redSqr(),h=h.redMul(f),p=g}return d},E.prototype.invm=function(e){var t=e.oe(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],a=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var f=u>>l&1;o!==n[0]&&(o=this.sqr(o)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===r&&0===l)&&(o=this.mul(o,n[a]),s=0,a=0)):s=0}c=26}return o},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new C(e)},r(C,E),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o.ae(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0).ae(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a.ae(this)},C.prototype.invm=function(e){return this.imod(e.oe(this.m).mul(this.r2)).ae(this)}}(io,so)),io.exports}const uo=/* @__PURE__ */Sr(co());var lo,fo,ho,po,mo,go={exports:{}};function bo(){if(ho)return fo;ho=1;var e=(lo||(lo=1,function(e,t){var n=Dr(),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o),o.prototype=Object.create(r.prototype),i(r,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(go,go.exports)),go.exports).Buffer;return fo=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),a=o.charCodeAt(0);if(255!==n[a])throw new TypeError(o+" is ambiguous");n[a]=i}var s=t.length,c=t.charAt(0),u=Math.log(s)/Math.log(256),l=Math.log(256)/Math.log(s);function f(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return e.alloc(0);for(var r=0,i=0,o=0;t[r]===c;)i++,r++;for(var a=(t.length-r)*u+1>>>0,l=new Uint8Array(a);r<t.length;){var f=t.charCodeAt(r);if(f>255)return;var d=n[f];if(255===d)return;for(var h=0,p=a-1;(0!==d||h<o)&&-1!==p;p--,h++)d+=s*l[p]>>>0,l[p]=d%256>>>0,d=d/256>>>0;if(0!==d)throw new Error("Non-zero carry");o=h,r++}for(var m=a-o;m!==a&&0===l[m];)m++;var g=e.allocUnsafe(i+(a-m));g.fill(0,0,i);for(var b=i;m!==a;)g[b++]=l[m++];return g}return{encode:function(n){if((Array.isArray(n)||n instanceof Uint8Array)&&(n=e.from(n)),!e.isBuffer(n))throw new TypeError("Expected Buffer");if(0===n.length)return"";for(var r=0,i=0,o=0,a=n.length;o!==a&&0===n[o];)o++,r++;for(var u=(a-o)*l+1>>>0,f=new Uint8Array(u);o!==a;){for(var d=n[o],h=0,p=u-1;(0!==d||h<i)&&-1!==p;p--,h++)d+=256*f[p]>>>0,f[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");i=h,o++}for(var m=u-i;m!==u&&0===f[m];)m++;for(var g=c.repeat(r);m<u;++m)g+=t.charAt(f[m]);return g},decodeUnsafe:f,decode:function(e){var t=f(e);if(t)return t;throw new Error("Non-base"+s+" character")}}},fo}function wo(){if(mo)return po;mo=1;var e=bo();return po=e("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")}const yo=/* @__PURE__ */Sr(wo());var vo={};function Ao(e,t,n){return t<=e&&e<=n}function ko(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function xo(e){this.tokens=[].slice.call(e)}xo.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var Eo=-1;function Co(e,t){if(e)throw TypeError("Decoder error");return t||65533}var So="utf-8";function To(e,t){if(!(this instanceof To))return new To(e,t);if((e=void 0!==e?String(e).toLowerCase():So)!==So)throw new Error("Encoding not supported. Only utf-8 is supported");t=ko(t),this.de=!1,this.he=!1,this.pe=null,this.me=Boolean(t.fatal),this.be=Boolean(t.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this.me}),Object.defineProperty(this,"ignoreBOM",{value:this.be})}function Mo(e,t){if(!(this instanceof Mo))return new Mo(e,t);if((e=void 0!==e?String(e).toLowerCase():So)!==So)throw new Error("Encoding not supported. Only utf-8 is supported");t=ko(t),this.de=!1,this.we=null,this.ye={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function Io(e){var t=e.fatal,n=0,r=0,i=0,o=128,a=191;this.handler=function(e,s){if(-1===s&&0!==i)return i=0,Co(t);if(-1===s)return Eo;if(0===i){if(Ao(s,0,127))return s;if(Ao(s,194,223))i=1,n=s-192;else if(Ao(s,224,239))224===s&&(o=160),237===s&&(a=159),i=2,n=s-224;else{if(!Ao(s,240,244))return Co(t);240===s&&(o=144),244===s&&(a=143),i=3,n=s-240}return n<<=6*i,null}if(!Ao(s,o,a))return n=i=r=0,o=128,a=191,e.prepend(s),Co(t);if(o=128,a=191,n+=s-128<<6*(i-(r+=1)),r!==i)return null;var c=n;return n=i=r=0,c}}function Bo(e){e.fatal,this.handler=function(e,t){if(-1===t)return Eo;if(Ao(t,0,127))return t;var n,r;Ao(t,128,2047)?(n=1,r=192):Ao(t,2048,65535)?(n=2,r=224):Ao(t,65536,1114111)&&(n=3,r=240);for(var i=[(t>>6*n)+r];n>0;){var o=t>>6*(n-1);i.push(128|63&o),n-=1}return i}}To.prototype={decode:function(e,t){var n;n="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=ko(t),this.de||(this.pe=new Io({fatal:this.me}),this.he=!1),this.de=Boolean(t.stream);for(var r,i=new xo(n),o=[];!i.endOfStream()&&(r=this.pe.handler(i,i.read()))!==Eo;)null!==r&&(Array.isArray(r)?o.push.apply(o,r):o.push(r));if(!this.de){do{if((r=this.pe.handler(i,i.read()))===Eo)break;null!==r&&(Array.isArray(r)?o.push.apply(o,r):o.push(r))}while(!i.endOfStream());this.pe=null}return o.length&&(-1===["utf-8"].indexOf(this.encoding)||this.be||this.he||(65279===o[0]?(this.he=!0,o.shift()):this.he=!0)),function(e){for(var t="",n=0;n<e.length;++n){var r=e[n];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode(55296+(r>>10),56320+(1023&r)))}return t}(o)}},Mo.prototype={encode:function(e,t){e=e?String(e):"",t=ko(t),this.de||(this.we=new Bo(this.ye)),this.de=Boolean(t.stream);for(var n,r=[],i=new xo(function(e){for(var t=String(e),n=t.length,r=0,i=[];r<n;){var o=t.charCodeAt(r);if(o<55296||o>57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319)if(r===n-1)i.push(65533);else{var a=e.charCodeAt(r+1);if(56320<=a&&a<=57343){var s=1023&o,c=1023&a;i.push(65536+(s<<10)+c),r+=1}else i.push(65533)}r+=1}return i}(e));!i.endOfStream()&&(n=this.we.handler(i,i.read()))!==Eo;)Array.isArray(n)?r.push.apply(r,n):r.push(n);if(!this.de){for(;(n=this.we.handler(i,i.read()))!==Eo;)Array.isArray(n)?r.push.apply(r,n):r.push(n);this.we=null}return new Uint8Array(r)}};const No=/* @__PURE__ */Tr(/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,TextDecoder:To,TextEncoder:Mo},Symbol.toStringTag,{value:"Module"})));var Ro;var Lo,Do=function(){if(Ro)return vo;Ro=1;var e=vo&&vo.ve||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=vo&&vo.Ae||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=vo&&vo.ke||function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=vo&&vo.xe||function(n){if(n&&n.u)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.hasOwnProperty.call(n,i)&&e(r,n,i);return t(r,n),r},i=vo&&vo.Ee||function(e){return e&&e.u?e:{default:e}};Object.defineProperty(vo,"u",{value:!0}),vo.deserializeUnchecked=vo.deserialize=vo.serialize=vo.BinaryReader=vo.BinaryWriter=vo.BorshError=vo.baseDecode=vo.baseEncode=void 0;const o=i(co()),a=i(wo()),s=r(No),c=new("function"!=typeof TextDecoder?s.TextDecoder:TextDecoder)("utf-8",{fatal:!0});vo.baseEncode=function(e){return"string"==typeof e&&(e=Buffer.from(e,"utf8")),a.default.encode(Buffer.from(e))},vo.baseDecode=function(e){return Buffer.from(a.default.decode(e))};const u=1024;class l extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}vo.BorshError=l;class f{constructor(){this.buf=Buffer.alloc(u),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(u)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(Buffer.from(new o.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Buffer.from(new o.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Buffer.from(new o.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Buffer.from(new o.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),e,Buffer.alloc(u)]),this.length+=e.length}writeString(e){this.maybeResize();const t=Buffer.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(Buffer.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(const n of e)this.maybeResize(),t(n)}toArray(){return this.buf.subarray(0,this.length)}}function d(e,t,n){const r=n.value;n.value=function(...e){try{return r.apply(this,e)}catch(t){if(t instanceof RangeError){const e=t.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e)>=0)throw new l("Reached the end of buffer when deserializing")}throw t}}}vo.BinaryWriter=f;class h{constructor(e){this.buf=e,this.offset=0}readU8(){const e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){const e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){const e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){const e=this.readBuffer(8);return new o.default(e,"le")}readU128(){const e=this.readBuffer(16);return new o.default(e,"le")}readU256(){const e=this.readBuffer(32);return new o.default(e,"le")}readU512(){const e=this.readBuffer(64);return new o.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new l(`Expected buffer length ${e} isn't within bounds`);const t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){const e=this.readU32(),t=this.readBuffer(e);try{return c.decode(t)}catch(n){throw new l(`Error decoding UTF-8 string: ${n}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const t=this.readU32(),n=Array();for(let r=0;r<t;++r)n.push(e());return n}}function p(e){return e.charAt(0).toUpperCase()+e.slice(1)}function m(e,t,n,r,i){try{if("string"==typeof r)i[`write${p(r)}`](n);else if(r instanceof Array)if("number"==typeof r[0]){if(n.length!==r[0])throw new l(`Expecting byte array of length ${r[0]}, but got ${n.length} bytes`);i.writeFixedArray(n)}else if(2===r.length&&"number"==typeof r[1]){if(n.length!==r[1])throw new l(`Expecting byte array of length ${r[1]}, but got ${n.length} bytes`);for(let t=0;t<r[1];t++)m(e,null,n[t],r[0],i)}else i.writeArray(n,n=>{m(e,t,n,r[0],i)});else if(void 0!==r.kind)switch(r.kind){case"option":null==n?i.writeU8(0):(i.writeU8(1),m(e,t,n,r.type,i));break;case"map":i.writeU32(n.size),n.forEach((n,o)=>{m(e,t,o,r.key,i),m(e,t,n,r.value,i)});break;default:throw new l(`FieldType ${r} unrecognized`)}else g(e,n,i)}catch(o){throw o instanceof l&&o.addToFieldPath(t),o}}function g(e,t,n){if("function"==typeof t.borshSerialize)return void t.borshSerialize(n);const r=e.get(t.constructor);if(!r)throw new l(`Class ${t.constructor.name} is missing in schema`);if("struct"===r.kind)r.fields.map(([r,i])=>{m(e,r,t[r],i,n)});else{if("enum"!==r.kind)throw new l(`Unexpected schema kind: ${r.kind} for ${t.constructor.name}`);{const i=t[r.field];for(let o=0;o<r.values.length;++o){const[a,s]=r.values[o];if(a===i){n.writeU8(o),m(e,a,t[a],s,n);break}}}}}function b(e,t,n,r){try{if("string"==typeof n)return r[`read${p(n)}`]();if(n instanceof Array){if("number"==typeof n[0])return r.readFixedArray(n[0]);if("number"==typeof n[1]){const t=[];for(let i=0;i<n[1];i++)t.push(b(e,null,n[0],r));return t}return r.readArray(()=>b(e,t,n[0],r))}if("option"===n.kind){return r.readU8()?b(e,t,n.type,r):void 0}if("map"===n.kind){let i=/* @__PURE__ */new Map;const o=r.readU32();for(let a=0;a<o;a++){const o=b(e,t,n.key,r),a=b(e,t,n.value,r);i.set(o,a)}return i}return w(e,n,r)}catch(i){throw i instanceof l&&i.addToFieldPath(t),i}}function w(e,t,n){if("function"==typeof t.borshDeserialize)return t.borshDeserialize(n);const r=e.get(t);if(!r)throw new l(`Class ${t.name} is missing in schema`);if("struct"===r.kind){const r={};for(const[i,o]of e.get(t).fields)r[i]=b(e,i,o,n);return new t(r)}if("enum"===r.kind){const i=n.readU8();if(i>=r.values.length)throw new l(`Enum index: ${i} is out of range`);const[o,a]=r.values[i],s=b(e,o,a,n);return new t({[o]:s})}throw new l(`Unexpected schema kind: ${r.kind} for ${t.constructor.name}`)}return n([d],h.prototype,"readU8",null),n([d],h.prototype,"readU16",null),n([d],h.prototype,"readU32",null),n([d],h.prototype,"readU64",null),n([d],h.prototype,"readU128",null),n([d],h.prototype,"readU256",null),n([d],h.prototype,"readU512",null),n([d],h.prototype,"readString",null),n([d],h.prototype,"readFixedArray",null),n([d],h.prototype,"readArray",null),vo.BinaryReader=h,vo.serialize=function(e,t,n=f){const r=new n;return g(e,t,r),r.toArray()},vo.deserialize=function(e,t,n,r=h){const i=new r(n),o=w(e,t,i);if(i.offset<n.length)throw new l(`Unexpected ${n.length-i.offset} bytes after deserialized data`);return o},vo.deserializeUnchecked=function(e,t,n,r=h){return w(e,t,new r(n))},vo}(),Fo={};var Oo=function(){if(Lo)return Fo;Lo=1,Object.defineProperty(Fo,"u",{value:!0}),Fo.s16=Fo.s8=Fo.nu64be=Fo.u48be=Fo.u40be=Fo.u32be=Fo.u24be=Fo.u16be=Fo.nu64=Fo.u48=Fo.u40=Fo.u32=Fo.u24=Fo.u16=Fo.u8=Fo.offset=Fo.greedy=Fo.Constant=Fo.UTF8=Fo.CString=Fo.Blob=Fo.Boolean=Fo.BitField=Fo.BitStructure=Fo.VariantLayout=Fo.Union=Fo.UnionLayoutDiscriminator=Fo.UnionDiscriminator=Fo.Structure=Fo.Sequence=Fo.DoubleBE=Fo.Double=Fo.FloatBE=Fo.Float=Fo.NearInt64BE=Fo.NearInt64=Fo.NearUInt64BE=Fo.NearUInt64=Fo.IntBE=Fo.Int=Fo.UIntBE=Fo.UInt=Fo.OffsetLayout=Fo.GreedyCount=Fo.ExternalLayout=Fo.bindConstructorLayout=Fo.nameWithProperty=Fo.Layout=Fo.uint8ArrayToBuffer=Fo.checkUint8Array=void 0,Fo.constant=Fo.utf8=Fo.cstr=Fo.blob=Fo.unionLayoutDiscriminator=Fo.union=Fo.seq=Fo.bits=Fo.struct=Fo.f64be=Fo.f64=Fo.f32be=Fo.f32=Fo.ns64be=Fo.s48be=Fo.s40be=Fo.s32be=Fo.s24be=Fo.s16be=Fo.ns64=Fo.s48=Fo.s40=Fo.s32=Fo.s24=void 0;const e=Dr();function t(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}function n(n){return t(n),e.Buffer.from(n.buffer,n.byteOffset,n.length)}Fo.checkUint8Array=t,Fo.uint8ArrayToBuffer=n;let r=class{constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}};function i(e,t){return t.property?e+"["+t.property+"]":e}Fo.Layout=r,Fo.nameWithProperty=i,Fo.bindConstructorLayout=function(e,t){if("function"!=typeof e)throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof r))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=()=>new e,Object.defineProperty(e.prototype,"encode",{value(e,n){return t.encode(this,e,n)},writable:!0}),Object.defineProperty(e,"decode",{value:(e,n)=>t.decode(e,n),writable:!0})};class o extends r{isCount(){throw new Error("ExternalLayout is abstract")}}Fo.ExternalLayout=o;class a extends o{constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,n=0){t(e);const r=e.length-n;return Math.floor(r/this.elementSpan)}encode(e,t,n){return 0}}Fo.GreedyCount=a;class s extends o{constructor(e,t=0,n){if(!(e instanceof r))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,n||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof c||this.layout instanceof u}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,n=0){return this.layout.encode(e,t,n+this.offset)}}Fo.OffsetLayout=s;class c extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readUIntLE(t,this.span)}encode(e,t,r=0){return n(t).writeUIntLE(e,r,this.span),this.span}}Fo.UInt=c;class u extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readUIntBE(t,this.span)}encode(e,t,r=0){return n(t).writeUIntBE(e,r,this.span),this.span}}Fo.UIntBE=u;class l extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readIntLE(t,this.span)}encode(e,t,r=0){return n(t).writeIntLE(e,r,this.span),this.span}}Fo.Int=l;class f extends r{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return n(e).readIntBE(t,this.span)}encode(e,t,r=0){return n(t).writeIntBE(e,r,this.span),this.span}}Fo.IntBE=f;const d=Math.pow(2,32);function h(e){const t=Math.floor(e/d);return{hi32:t,lo32:e-t*d}}function p(e,t){return e*d+t}class m extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e),i=r.readUInt32LE(t);return p(r.readUInt32LE(t+4),i)}encode(e,t,r=0){const i=h(e),o=n(t);return o.writeUInt32LE(i.lo32,r),o.writeUInt32LE(i.hi32,r+4),8}}Fo.NearUInt64=m;class g extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e);return p(r.readUInt32BE(t),r.readUInt32BE(t+4))}encode(e,t,r=0){const i=h(e),o=n(t);return o.writeUInt32BE(i.hi32,r),o.writeUInt32BE(i.lo32,r+4),8}}Fo.NearUInt64BE=g;class b extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e),i=r.readUInt32LE(t);return p(r.readInt32LE(t+4),i)}encode(e,t,r=0){const i=h(e),o=n(t);return o.writeUInt32LE(i.lo32,r),o.writeInt32LE(i.hi32,r+4),8}}Fo.NearInt64=b;class w extends r{constructor(e){super(8,e)}decode(e,t=0){const r=n(e);return p(r.readInt32BE(t),r.readUInt32BE(t+4))}encode(e,t,r=0){const i=h(e),o=n(t);return o.writeInt32BE(i.hi32,r),o.writeUInt32BE(i.lo32,r+4),8}}Fo.NearInt64BE=w;class y extends r{constructor(e){super(4,e)}decode(e,t=0){return n(e).readFloatLE(t)}encode(e,t,r=0){return n(t).writeFloatLE(e,r),4}}Fo.Float=y;class v extends r{constructor(e){super(4,e)}decode(e,t=0){return n(e).readFloatBE(t)}encode(e,t,r=0){return n(t).writeFloatBE(e,r),4}}Fo.FloatBE=v;class A extends r{constructor(e){super(8,e)}decode(e,t=0){return n(e).readDoubleLE(t)}encode(e,t,r=0){return n(t).writeDoubleLE(e,r),8}}Fo.Double=A;class k extends r{constructor(e){super(8,e)}decode(e,t=0){return n(e).readDoubleBE(t)}encode(e,t,r=0){return n(t).writeDoubleBE(e,r),8}}Fo.DoubleBE=k;class x extends r{constructor(e,t,n){if(!(e instanceof r))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof o&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let i=-1;!(t instanceof o)&&0<e.span&&(i=t*e.span),super(i,n),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0,r=this.count;if(r instanceof o&&(r=r.decode(e,t)),0<this.elementLayout.span)n=r*this.elementLayout.span;else{let i=0;for(;i<r;)n+=this.elementLayout.getSpan(e,t+n),++i}return n}decode(e,t=0){const n=[];let r=0,i=this.count;for(i instanceof o&&(i=i.decode(e,t));r<i;)n.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),r+=1;return n}encode(e,t,n=0){const r=this.elementLayout,i=e.reduce((e,i)=>e+r.encode(i,t,n+e),0);return this.count instanceof o&&this.count.encode(e.length,t,n),i}}Fo.Sequence=x;class E extends r{constructor(e,t,n){if(!Array.isArray(e)||!e.reduce((e,t)=>e&&t instanceof r,!0))throw new TypeError("fields must be array of Layout instances");"boolean"==typeof t&&void 0===n&&(n=t,t=void 0);for(const r of e)if(0>r.span&&void 0===r.property)throw new Error("fields cannot contain unnamed variable-length layout");let i=-1;try{i=e.reduce((e,t)=>e+t.getSpan(),0)}catch(o){}super(i,t),this.fields=e,this.decodePrefixes=!!n}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;try{n=this.fields.reduce((n,r)=>{const i=r.getSpan(e,t);return t+=i,n+i},0)}catch(r){throw new RangeError("indeterminate span")}return n}decode(e,n=0){t(e);const r=this.makeDestinationObject();for(const t of this.fields)if(void 0!==t.property&&(r[t.property]=t.decode(e,n)),n+=t.getSpan(e,n),this.decodePrefixes&&e.length===n)break;return r}encode(e,t,n=0){const r=n;let i=0,o=0;for(const a of this.fields){let r=a.span;if(o=0<r?r:0,void 0!==a.property){const i=e[a.property];void 0!==i&&(o=a.encode(i,t,n),0>r&&(r=a.getSpan(t,n)))}i=n,n+=r}return i+o-r}fromArray(e){const t=this.makeDestinationObject();for(const n of this.fields)void 0!==n.property&&0<e.length&&(t[n.property]=e.shift());return t}layoutFor(e){if("string"!=typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!=typeof e)throw new TypeError("property must be string");let t=0;for(const n of this.fields){if(n.property===e)return t;0>n.span?t=-1:0<=t&&(t+=n.span)}}}Fo.Structure=E;class C{constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,n){throw new Error("UnionDiscriminator is abstract")}}Fo.UnionDiscriminator=C;class S extends C{constructor(e,t){if(!(e instanceof o&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,n){return this.layout.encode(e,t,n)}}Fo.UnionLayoutDiscriminator=S;class T extends r{constructor(e,t,n){let i;if(e instanceof c||e instanceof u)i=new S(new s(e));else if(e instanceof o&&e.isCount())i=new S(e);else{if(!(e instanceof C))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");i=e}if(void 0===t&&(t=null),!(null===t||t instanceof r))throw new TypeError("defaultLayout must be null or a Layout");if(null!==t){if(0>t.span)throw new Error("defaultLayout must have constant span");void 0===t.property&&(t=t.replicate("content"))}let a=-1;t&&(a=t.span,0<=a&&(e instanceof c||e instanceof u)&&(a+=i.layout.span)),super(a,n),this.discriminator=i,this.usesPrefixDiscriminator=e instanceof c||e instanceof u,this.defaultLayout=t,this.registry={};let l=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return l(e)},this.configGetSourceVariant=function(e){l=e.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;const n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;const t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(const t in this.registry){const n=this.registry[t];if(n.property&&Object.prototype.hasOwnProperty.call(e,n.property))return n}throw new Error("unable to infer src variant")}decode(e,t=0){let n;const r=this.discriminator,i=r.decode(e,t),o=this.registry[i];if(void 0===o){const o=this.defaultLayout;let a=0;this.usesPrefixDiscriminator&&(a=r.layout.span),n=this.makeDestinationObject(),n[r.property]=i,n[o.property]=o.decode(e,t+a)}else n=o.decode(e,t);return n}encode(e,t,n=0){const r=this.getSourceVariant(e);if(void 0===r){const r=this.discriminator,i=this.defaultLayout;let o=0;return this.usesPrefixDiscriminator&&(o=r.layout.span),r.encode(e[r.property],t,n),o+i.encode(e[i.property],t,n+o)}return r.encode(e,t,n)}addVariant(e,t,n){const r=new M(this,e,t,n);return this.registry[e]=r,r}getVariant(e,t=0){let n;return n=e instanceof Uint8Array?this.discriminator.decode(e,t):e,this.registry[n]}}Fo.Union=T;class M extends r{constructor(e,t,n,i){if(!(e instanceof T))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if("string"==typeof n&&void 0===i&&(i=n,n=null),n){if(!(n instanceof r))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=n.span&&n.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!=typeof i)throw new TypeError("variant must have a String property")}let o=e.span;0>e.span&&(o=n?n.span:0,0<=o&&e.usesPrefixDiscriminator&&(o+=e.discriminator.layout.span)),super(o,i),this.union=e,this.variant=t,this.layout=n||null}getSpan(e,t=0){if(0<=this.span)return this.span;let n=0;this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span);let r=0;return this.layout&&(r=this.layout.getSpan(e,t+n)),n+r}decode(e,t=0){const n=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+r):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(e,t,n=0){let r=0;if(this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);let i=r;if(this.layout&&(this.layout.encode(e[this.property],t,n+r),i+=this.layout.getSpan(t,n+r),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}function I(e){return 0>e&&(e+=4294967296),e}Fo.VariantLayout=M;class B extends r{constructor(e,t,n){if(!(e instanceof c||e instanceof u))throw new TypeError("word must be a UInt or UIntBE layout");if("string"==typeof t&&void 0===n&&(n=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,n),this.word=e,this.msb=!!t,this.fields=[];let r=0;this.Ce=function(e){return r=I(e),this},this.Se=function(){return r}}decode(e,t=0){const n=this.makeDestinationObject(),r=this.word.decode(e,t);this.Ce(r);for(const i of this.fields)void 0!==i.property&&(n[i.property]=i.decode(e));return n}encode(e,t,n=0){const r=this.word.decode(t,n);this.Ce(r);for(const i of this.fields)if(void 0!==i.property){const t=e[i.property];void 0!==t&&i.encode(t)}return this.word.encode(this.Se(),t,n)}addField(e,t){const n=new N(this,e,t);return this.fields.push(n),n}addBoolean(e){const t=new R(this,e);return this.fields.push(t),t}fieldFor(e){if("string"!=typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}}Fo.BitStructure=B;class N{constructor(e,t,n){if(!(e instanceof B))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");const r=8*e.span,i=e.fields.reduce((e,t)=>e+t.bits,0);if(t+i>r)throw new Error("bits too long for span remainder ("+(r-i)+" of "+r+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=r-i-t),this.wordMask=I(this.valueMask<<this.start),this.property=n}decode(e,t){return I(this.container.Se()&this.wordMask)>>>this.start}encode(e){if("number"!=typeof e||!Number.isInteger(e)||e!==I(e&this.valueMask))throw new TypeError(i("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const t=this.container.Se(),n=I(e<<this.start);this.container.Ce(I(t&~this.wordMask)|n)}}Fo.BitField=N;class R extends N{constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){"boolean"==typeof e&&(e=+e),super.encode(e)}}Fo.Boolean=R;class L extends r{constructor(e,t){if(!(e instanceof o&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let n=-1;e instanceof o||(n=e),super(n,t),this.length=e}getSpan(e,t){let n=this.span;return 0>n&&(n=this.length.decode(e,t)),n}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),n(e).slice(t,t+r)}encode(e,t,r){let a=this.length;if(this.length instanceof o&&(a=e.length),!(e instanceof Uint8Array&&a===e.length))throw new TypeError(i("Blob.encode",this)+" requires (length "+a+") Uint8Array as src");if(r+a>t.length)throw new RangeError("encoding overruns Uint8Array");const s=n(e);return n(t).write(s.toString("hex"),r,a,"hex"),this.length instanceof o&&this.length.encode(a,t,r),a}}Fo.Blob=L;class D extends r{constructor(e){super(-1,e)}getSpan(e,n=0){t(e);let r=n;for(;r<e.length&&0!==e[r];)r+=1;return 1+r-n}decode(e,t=0){const r=this.getSpan(e,t);return n(e).slice(t,t+r-1).toString("utf-8")}encode(t,r,i=0){"string"!=typeof t&&(t=String(t));const o=e.Buffer.from(t,"utf8"),a=o.length;if(i+a>r.length)throw new RangeError("encoding overruns Buffer");const s=n(r);return o.copy(s,i),s[i+a]=0,a+1}}Fo.CString=D;class F extends r{constructor(e,t){if("string"==typeof e&&void 0===t&&(t=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,n=0){return t(e),e.length-n}decode(e,t=0){const r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return n(e).slice(t,t+r).toString("utf-8")}encode(t,r,i=0){"string"!=typeof t&&(t=String(t));const o=e.Buffer.from(t,"utf8"),a=o.length;if(0<=this.maxSpan&&this.maxSpan<a)throw new RangeError("text length exceeds maxSpan");if(i+a>r.length)throw new RangeError("encoding overruns Buffer");return o.copy(n(r),i),a}}Fo.UTF8=F;class O extends r{constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,n){return 0}}return Fo.Constant=O,Fo.greedy=(e,t)=>new a(e,t),Fo.offset=(e,t,n)=>new s(e,t,n),Fo.u8=e=>new c(1,e),Fo.u16=e=>new c(2,e),Fo.u24=e=>new c(3,e),Fo.u32=e=>new c(4,e),Fo.u40=e=>new c(5,e),Fo.u48=e=>new c(6,e),Fo.nu64=e=>new m(e),Fo.u16be=e=>new u(2,e),Fo.u24be=e=>new u(3,e),Fo.u32be=e=>new u(4,e),Fo.u40be=e=>new u(5,e),Fo.u48be=e=>new u(6,e),Fo.nu64be=e=>new g(e),Fo.s8=e=>new l(1,e),Fo.s16=e=>new l(2,e),Fo.s24=e=>new l(3,e),Fo.s32=e=>new l(4,e),Fo.s40=e=>new l(5,e),Fo.s48=e=>new l(6,e),Fo.ns64=e=>new b(e),Fo.s16be=e=>new f(2,e),Fo.s24be=e=>new f(3,e),Fo.s32be=e=>new f(4,e),Fo.s40be=e=>new f(5,e),Fo.s48be=e=>new f(6,e),Fo.ns64be=e=>new w(e),Fo.f32=e=>new y(e),Fo.f32be=e=>new v(e),Fo.f64=e=>new A(e),Fo.f64be=e=>new k(e),Fo.struct=(e,t,n)=>new E(e,t,n),Fo.bits=(e,t,n)=>new B(e,t,n),Fo.seq=(e,t,n)=>new x(e,t,n),Fo.union=(e,t,n)=>new T(e,t,n),Fo.unionLayoutDiscriminator=(e,t)=>new S(e,t),Fo.blob=(e,t)=>new L(e,t),Fo.cstr=e=>new D(e),Fo.utf8=(e,t)=>new F(e,t),Fo.constant=(e,t)=>new O(e,t),Fo}(),Po=1,Uo=2,qo=3,Ho=4,zo=5,Vo=6,jo=7,Go=8,Jo=9,Wo=10,Ko=-32700,Yo=-32603,Xo=-32602,Qo=-32601,Zo=-32600,$o=-32016,_o=-32015,ea=-32014,ta=-32013,na=-32012,ra=-32011,ia=-32010,oa=-32009,aa=-32008,sa=-32007,ca=-32006,ua=-32005,la=-32004,fa=-32003,da=-32002,ha=-32001,pa=28e5,ma=2800001,ga=2800002,ba=2800003,wa=2800004,ya=2800005,va=2800006,Aa=2800007,ka=2800008,xa=2800009,Ea=2800010,Ca=2800011,Sa=323e4,Ta=32300001,Ma=3230002,Ia=3230003,Ba=3230004,Na=361e4,Ra=3610001,La=3610002,Da=3610003,Fa=3610004,Oa=3610005,Pa=3610006,Ua=3610007,qa=3611e3,Ha=3704e3,za=3704001,Va=3704002,ja=3704003,Ga=3704004,Ja=4128e3,Wa=4128001,Ka=4128002,Ya=4615e3,Xa=4615001,Qa=4615002,Za=4615003,$a=4615004,_a=4615005,es=4615006,ts=4615007,ns=4615008,rs=4615009,is=4615010,os=4615011,as=4615012,ss=4615013,cs=4615014,us=4615015,ls=4615016,fs=4615017,ds=4615018,hs=4615019,ps=4615020,ms=4615021,gs=4615022,bs=4615023,ws=4615024,ys=4615025,vs=4615026,As=4615027,ks=4615028,xs=4615029,Es=4615030,Cs=4615031,Ss=4615032,Ts=4615033,Ms=4615034,Is=4615035,Bs=4615036,Ns=4615037,Rs=4615038,Ls=4615039,Ds=4615040,Fs=4615041,Os=4615042,Ps=4615043,Us=4615044,qs=4615045,Hs=4615046,zs=4615047,Vs=4615048,js=4615049,Gs=4615050,Js=4615051,Ws=4615052,Ks=4615053,Ys=4615054,Xs=5508e3,Qs=5508001,Zs=5508002,$s=5508003,_s=5508004,ec=5508005,tc=5508006,nc=5508007,rc=5508008,ic=5508009,oc=5508010,ac=5508011,sc=5663e3,cc=5663001,uc=5663002,lc=5663003,fc=5663004,dc=5663005,hc=5663006,pc=5663007,mc=5663008,gc=5663009,bc=5663010,wc=5663011,yc=5663012,vc=5663013,Ac=5663014,kc=5663015,xc=5663016,Ec=5663017,Cc=5663018,Sc=5663019,Tc=5663020,Mc=705e4,Ic=7050001,Bc=7050002,Nc=7050003,Rc=7050004,Lc=7050005,Dc=7050006,Fc=7050007,Oc=7050008,Pc=7050009,Uc=7050010,qc=7050011,Hc=7050012,zc=7050013,Vc=7050014,jc=7050015,Gc=7050016,Jc=7050017,Wc=7050018,Kc=7050019,Yc=7050020,Xc=7050021,Qc=7050022,Zc=7050023,$c=7050024,_c=7050025,eu=7050026,tu=7050027,nu=7050028,ru=7050029,iu=7050030,ou=7050031,au=7050032,su=7050033,cu=7050034,uu=7050035,lu=7050036,fu=8078e3,du=8078001,hu=8078002,pu=8078003,mu=8078004,gu=8078005,bu=8078006,wu=8078007,yu=8078008,vu=8078009,Au=8078010,ku=8078011,xu=8078012,Eu=8078013,Cu=8078014,Su=8078015,Tu=8078016,Mu=8078017,Iu=8078018,Bu=8078019,Nu=8078020,Ru=8078021,Lu=8078022,Du=81e5,Fu=8100001,Ou=8100002,Pu=8100003,Uu=819e4,qu=8190001,Hu=8190002,zu=8190003,Vu=8190004,ju=99e5,Gu=9900001,Ju=9900002,Wu=9900003,Ku=9900004;function Yu(e){if(Array.isArray(e)){return"%5B"+e.map(Yu).join("%2C%20")+"%5D"}return"bigint"==typeof e?`${e}n`:encodeURIComponent(String(null!=e&&null===Object.getPrototypeOf(e)?{...e}:e))}function Xu([e,t]){return`${e}=${Yu(t)}`}var Qu={[Sa]:"Account not found at address: $address",[Ba]:"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",[Ia]:"Expected decoded account at address: $address",[Ma]:"Failed to decode account data at address: $address",[Ta]:"Accounts not found at addresses: $addresses",[xa]:"Unable to find a viable program address bump seed.",[ga]:"$putativeAddress is not a base58-encoded address.",[pa]:"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",[ba]:"The `CryptoKey` must be an `Ed25519` public key.",[Ca]:"$putativeOffCurveAddress is not a base58-encoded off-curve address.",[ka]:"Invalid seeds; point must fall off the Ed25519 curve.",[wa]:"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",[va]:"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",[Aa]:"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",[ya]:"Expected program derived address bump to be in the range [0, 255], got: $bump.",[Ea]:"Program address cannot end with PDA marker.",[ma]:"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",[Ho]:"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",[Po]:"The network has progressed past the last block for which this transaction could have been committed.",[fu]:"Codec [$codecDescription] cannot decode empty byte arrays.",[Lu]:"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",[Nu]:"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",[gu]:"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",[bu]:"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",[mu]:"Encoder and decoder must either both be fixed-size or variable-size.",[yu]:"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",[hu]:"Expected a fixed-size codec, got a variable-size one.",[Eu]:"Codec [$codecDescription] expected a positive byte length, got $bytesLength.",[pu]:"Expected a variable-size codec, got a fixed-size one.",[Bu]:"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",[du]:"Codec [$codecDescription] expected $expected bytes, got $bytesLength.",[Iu]:"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",[vu]:"Invalid discriminated union variant. Expected one of [$variants], got $value.",[Au]:"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",[Su]:"Invalid literal union variant. Expected one of [$variants], got $value.",[wu]:"Expected [$codecDescription] to have $expected items, got $actual.",[xu]:"Invalid value $value for base $base with alphabet $alphabet.",[Tu]:"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",[ku]:"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",[Cu]:"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",[Ru]:"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",[Mu]:"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",[qa]:"No random values implementation could be found.",[rs]:"instruction requires an uninitialized account",[bs]:"instruction tries to borrow reference for an account which is already borrowed",[ws]:"instruction left account with an outstanding borrowed reference",[ms]:"program other than the account's owner changed the size of the account data",[_a]:"account data too small for instruction",[gs]:"instruction expected an executable account",[Hs]:"An account does not have enough lamports to be rent-exempt",[Vs]:"Program arithmetic overflowed",[qs]:"Failed to serialize or deserialize account data: $encodedData",[Ys]:"Builtin programs must consume compute units",[Ss]:"Cross-program invocation call depth too deep",[Rs]:"Computational budget exceeded",[vs]:"custom program error: #$code",[fs]:"instruction contains duplicate accounts",[ys]:"instruction modifications of multiply-passed account differ",[Es]:"executable accounts must be rent exempt",[ks]:"instruction changed executable accounts data",[xs]:"instruction changed the balance of an executable account",[ds]:"instruction changed executable bit of an account",[cs]:"instruction modified data of an account it does not own",[ss]:"instruction spent from the balance of an account it does not own",[Xa]:"generic instruction error",[Gs]:"Provided owner is not allowed",[Ps]:"Account is immutable",[Us]:"Incorrect authority provided",[ts]:"incorrect program id for instruction",[es]:"insufficient funds for instruction",[$a]:"invalid account data for instruction",[zs]:"Invalid account owner",[Qa]:"invalid program argument",[As]:"program returned invalid error code",[Za]:"invalid instruction data",[Ns]:"Failed to reallocate account data",[Bs]:"Provided seeds do not result in a valid address",[Js]:"Accounts data allocations exceeded the maximum allowed per transaction",[Ws]:"Max accounts exceeded",[Ks]:"Max instruction trace length exceeded",[Is]:"Length of the seed is too long for address generation",[Ts]:"An account required by the instruction is missing",[ns]:"missing required signature for instruction",[as]:"instruction illegally modified the program id of an account",[ps]:"insufficient account keys for instruction",[Ls]:"Cross-program invocation with unauthorized signer or writable account",[Ds]:"Failed to create program execution environment",[Os]:"Program failed to compile",[Fs]:"Program failed to complete",[ls]:"instruction modified data of a read-only account",[us]:"instruction changed the balance of a read-only account",[Ms]:"Cross-program invocation reentrancy not allowed for this instruction",[hs]:"instruction modified rent epoch of an account",[os]:"sum of account balances before and after instruction do not match",[is]:"instruction requires an initialized account",[Ya]:"",[Cs]:"Unsupported program id",[js]:"Unsupported sysvar",[Ja]:"The instruction does not have any accounts.",[Wa]:"The instruction does not have any data.",[Ka]:"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",[zo]:"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",[Uo]:"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",[Ju]:"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Ku]:"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",[Gu]:"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[ju]:"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Wu]:"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",[Yo]:"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",[Xo]:"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",[Zo]:"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",[Qo]:"JSON-RPC error: The method does not exist / is not available ($__serverMessage)",[Ko]:"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",[na]:"$__serverMessage",[ha]:"$__serverMessage",[la]:"$__serverMessage",[ea]:"$__serverMessage",[ia]:"$__serverMessage",[oa]:"$__serverMessage",[$o]:"Minimum context slot has not been reached",[ua]:"Node is unhealthy; behind by $numSlotsBehind slots",[aa]:"No snapshot",[da]:"Transaction simulation failed",[sa]:"$__serverMessage",[ra]:"Transaction history is not available from this node",[ca]:"$__serverMessage",[ta]:"Transaction signature length mismatch",[fa]:"Transaction signature verification failure",[_o]:"$__serverMessage",[Ha]:"Key pair bytes must be of length 64, got $byteLength.",[za]:"Expected private key bytes with length 32. Actual length: $actualLength.",[Va]:"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",[Ga]:"The provided private key does not match the provided public key.",[ja]:"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",[Vo]:"Lamports value must be in the range [0, 2e64-1]",[jo]:"`$value` cannot be parsed as a `BigInt`",[Wo]:"$message",[Go]:"`$value` cannot be parsed as a `Number`",[qo]:"No nonce account could be found at address `$nonceAccountAddress`",[Uu]:"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",[Hu]:"WebSocket was closed before payload could be added to the send buffer",[zu]:"WebSocket connection closed",[Vu]:"WebSocket failed to connect",[qu]:"Failed to obtain a subscription id from the server",[Pu]:"Could not find an API plan for RPC method: `$method`",[Du]:"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",[Ou]:"HTTP error ($statusCode): $message",[Fu]:"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",[Xs]:"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",[Qs]:"The provided value does not implement the `KeyPairSigner` interface",[$s]:"The provided value does not implement the `MessageModifyingSigner` interface",[_s]:"The provided value does not implement the `MessagePartialSigner` interface",[Zs]:"The provided value does not implement any of the `MessageSigner` interfaces",[tc]:"The provided value does not implement the `TransactionModifyingSigner` interface",[nc]:"The provided value does not implement the `TransactionPartialSigner` interface",[rc]:"The provided value does not implement the `TransactionSendingSigner` interface",[ec]:"The provided value does not implement any of the `TransactionSigner` interfaces",[ic]:"More than one `TransactionSendingSigner` was identified.",[oc]:"No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",[ac]:"Wallet account signers do not support signing multiple messages/transactions in a single operation",[Ua]:"Cannot export a non-extractable key.",[Ra]:"No digest implementation could be found.",[Na]:"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",[La]:"This runtime does not support the generation of Ed25519 key pairs.\n\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\n\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.",[Da]:"No signature verification implementation could be found.",[Fa]:"No key generation implementation could be found.",[Oa]:"No signing implementation could be found.",[Pa]:"No key export implementation could be found.",[Jo]:"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",[Gc]:"Transaction processing left an account with an outstanding borrowed reference",[Ic]:"Account in use",[Bc]:"Account loaded twice",[Nc]:"Attempt to debit an account but found no record of a prior credit.",[Zc]:"Transaction loads an address table account that doesn't exist",[Fc]:"This transaction has already been processed",[Oc]:"Blockhash not found",[Pc]:"Loader call chain is too deep",[jc]:"Transactions are currently disabled due to cluster maintenance",[iu]:"Transaction contains a duplicate instruction ($index) that is not allowed",[Lc]:"Insufficient funds for fee",[ou]:"Transaction results in an account ($accountIndex) with insufficient funds for rent",[Dc]:"This account may not be used to pay transaction fees",[qc]:"Transaction contains an invalid account reference",[_c]:"Transaction loads an address table account with invalid data",[eu]:"Transaction address table lookup uses an invalid index",[$c]:"Transaction loads an address table account with an invalid owner",[su]:"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",[zc]:"This program may not be used for executing instructions",[tu]:"Transaction leaves an account with a lower balance than rent-exempt minimum",[Kc]:"Transaction loads a writable account that cannot be written",[au]:"Transaction exceeded max loaded accounts data size cap",[Uc]:"Transaction requires a fee but has no signature present",[Rc]:"Attempt to load a program that does not exist",[uu]:"Execution of the program referenced by account at index $accountIndex is temporarily restricted.",[cu]:"ResanitizationNeeded",[Vc]:"Transaction failed to sanitize accounts offsets correctly",[Hc]:"Transaction did not pass signature verification",[Qc]:"Transaction locked too many accounts",[lu]:"Sum of account balances before and after transaction do not match",[Mc]:"The transaction failed with the error `$errorName`",[Wc]:"Transaction version is unsupported",[Xc]:"Transaction would exceed account data limit within the block",[ru]:"Transaction would exceed total account data limit",[Yc]:"Transaction would exceed max account limit within the block",[Jc]:"Transaction would exceed max Block Cost Limit",[nu]:"Transaction would exceed max Vote Cost Limit",[kc]:"Attempted to sign a transaction with an address that is not a signer for it",[bc]:"Transaction is missing an address at index: $index.",[xc]:"Transaction has no expected signers therefore it cannot be encoded",[Tc]:"Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",[uc]:"Transaction does not have a blockhash lifetime",[lc]:"Transaction is not a durable nonce transaction",[dc]:"Contents of these address lookup tables unknown: $lookupTableAddresses",[hc]:"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",[mc]:"No fee payer set in CompiledTransaction",[pc]:"Could not find program address at index $index",[Cc]:"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",[Sc]:"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",[wc]:"Transaction is missing a fee payer.",[yc]:"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",[Ac]:"Transaction first instruction is not advance nonce account instruction.",[vc]:"Transaction with no instructions cannot be durable nonce transaction.",[sc]:"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",[cc]:"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",[Ec]:"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.",[gc]:"Transaction is missing signatures for addresses: $addresses.",[fc]:"Transaction version must be in the range [0, 127]. `$actualVersion` given"},Zu="i",$u="t";function _u(e,t={}){if("production"!==process.env.NODE_ENV)return function(e,t={}){const n=Qu[e];if(0===n.length)return"";let r;function i(e){if(2===r[$u]){const i=n.slice(r[Zu]+1,e);o.push(i in t?`${t[i]}`:`$${i}`)}else 1===r[$u]&&o.push(n.slice(r[Zu],e))}const o=[];return n.split("").forEach((e,t)=>{if(0===t)return void(r={[Zu]:0,[$u]:"\\"===n[0]?0:"$"===n[0]?2:1});let o;switch(r[$u]){case 0:o={[Zu]:t,[$u]:1};break;case 1:"\\"===e?o={[Zu]:t,[$u]:0}:"$"===e&&(o={[Zu]:t,[$u]:2});break;case 2:"\\"===e?o={[Zu]:t,[$u]:0}:"$"===e?o={[Zu]:t,[$u]:2}:e.match(/\w/)||(o={[Zu]:t,[$u]:1})}o&&(r!==o&&i(t),r=o)}),i(),o.join("")}(e,t);{let n=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(n+=` '${function(e){const t=Object.entries(e).map(Xu).join("&");return btoa(t)}(t)}'`),`${n}\``}}var el=class extends Error{cause=this.cause;context;constructor(...[e,t]){let n,r;if(t){const{cause:e,...i}=t;e&&(r={cause:e}),Object.keys(i).length>0&&(n=i)}super(_u(e,n),r),this.context={Te:e,...n},this.name="SolanaError"}};function tl(e){return"fixedSize"in e&&"number"==typeof e.fixedSize}function nl(e){return 1!==e?.endian}function rl(e){return t={fixedSize:e.size,write(t,n,r){e.range&&function(e,t,n,r){if(r<t||r>n)throw new el(ku,{codecDescription:e,max:n,min:t,value:r})}(e.name,e.range[0],e.range[1],t);const i=new ArrayBuffer(e.size);return e.set(new DataView(i),t,nl(e.config)),n.set(new Uint8Array(i),r),r+e.size}},Object.freeze({...t,encode:e=>{const n=new Uint8Array(function(e,t){return"fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}(e,t));return t.write(e,n,0),n}});var t}function il(e){return t={fixedSize:e.size,read(t,n=0){!function(e,t,n=0){if(t.length-n<=0)throw new el(fu,{codecDescription:e})}(e.name,t,n),function(e,t,n,r=0){const i=n.length-r;if(i<t)throw new el(du,{bytesLength:i,codecDescription:e,expected:t})}(e.name,e.size,t,n);const r=new DataView(function(e,t,n){const r=e.byteOffset+(t??0),i=n??e.byteLength;return e.buffer.slice(r,r+i)}(t,n,e.size));return[e.get(r,nl(e.config)),n+e.size]}},Object.freeze({...t,decode:(e,n=0)=>t.read(e,n)[0]});var t}var ol=(e={})=>function(e,t){if(tl(e)!==tl(t))throw new el(mu);if(tl(e)&&tl(t)&&e.fixedSize!==t.fixedSize)throw new el(gu,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!tl(e)&&!tl(t)&&e.maxSize!==t.maxSize)throw new el(bu,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return{...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}(((e={})=>rl({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(e,t,n)=>e.setBigUint64(0,BigInt(t),n),size:8}))(e),((e={})=>il({config:e,get:(e,t)=>e.getBigUint64(0,t),name:"u64",size:8}))(e));class al extends TypeError{constructor(e,t){let n;const{message:r,explanation:i,...o}=e,{path:a}=e,s=0===a.length?r:`At path: ${a.join(".")} -- ${r}`;super(i??s),null!=i&&(this.cause=s),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}function sl(e){return"object"==typeof e&&null!=e}function cl(e){return sl(e)&&!Array.isArray(e)}function ul(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function ll(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:a}=n,{refinement:s,message:c=`Expected a value of type \`${a}\`${s?` with refinement \`${s}\``:""}, but received: \`${ul(r)}\``}=e;return{value:r,type:a,refinement:s,key:i[i.length-1],path:i,branch:o,...e,message:c}}function*fl(e,t,n,r){var i;sl(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const o of e){const e=ll(o,t,n,r);e&&(yield e)}}function*dl(e,t,n={}){const{path:r=[],branch:i=[e],coerce:o=!1,mask:a=!1}=n,s={path:r,branch:i,mask:a};o&&(e=t.coercer(e,s));let c="valid";for(const u of t.validator(e,s))u.explanation=n.message,c="not_valid",yield[u,void 0];for(let[u,l,f]of t.entries(e,s)){const t=dl(l,f,{path:void 0===u?r:[...r,u],branch:void 0===u?i:[...i,l],coerce:o,mask:a,message:n.message});for(const n of t)n[0]?(c=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],void 0]):o&&(l=n[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):sl(e)&&(void 0!==l||u in e)&&(e[u]=l))}if("not_valid"!==c)for(const u of t.refiner(e,s))u.explanation=n.message,c="not_refined",yield[u,void 0];"valid"===c&&(yield[void 0,e])}let hl=class{constructor(e){const{type:t,schema:n,validator:r,refiner:i,coercer:o=e=>e,entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=o,this.validator=r?(e,t)=>fl(r(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>fl(i(e,t),t,this,e):()=>[]}assert(e,t){return function(e,t,n){const r=gl(e,t,{message:n});if(r[0])throw r[0]}(e,this,t)}create(e,t){return pl(e,this,t)}is(e){return ml(e,this)}mask(e,t){return function(e,t,n){const r=gl(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e,t={}){return gl(e,this,t)}};function pl(e,t,n){const r=gl(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function ml(e,t){return!gl(e,t)[0]}function gl(e,t,n={}){const r=dl(e,t,n),i=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(r);if(i[0]){return[new al(i[0],function*(){for(const e of r)e[0]&&(yield e[0])}),void 0]}return[void 0,i[1]]}function bl(e,t){return new hl({type:e,schema:null,validator:t})}function wl(e){return new hl({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${ul(e)}`})}function yl(){return bl("boolean",e=>"boolean"==typeof e)}function vl(e){return bl("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${ul(t)}`)}function Al(e){const t=ul(e),n=typeof e;return new hl({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${ul(n)}`})}function kl(e){return new hl({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})}function xl(){return bl("number",e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${ul(e)}`)}function El(e){return new hl({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})}function Cl(e,t){return new hl({type:"record",schema:null,*entries(n){if(sl(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>cl(e)||`Expected an object, but received: ${ul(e)}`,coercer:e=>cl(e)?{...e}:e})}function Sl(){return bl("string",e=>"string"==typeof e||`Expected a string, but received: ${ul(e)}`)}function Tl(e){const t=bl("never",()=>!1);return new hl({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let i=0;i<r;i++)yield[i,n[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${ul(e)}`,coercer:e=>Array.isArray(e)?e.slice():e})}function Ml(e){const t=Object.keys(e);return new hl({type:"type",schema:e,*entries(n){if(sl(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>cl(e)||`Expected an object, but received: ${ul(e)}`,coercer:e=>cl(e)?{...e}:e})}function Il(e){const t=e.map(e=>e.type).join(" | ");return new hl({type:"union",schema:null,coercer(t,n){for(const r of e){const[e,i]=r.validate(t,{coerce:!0,mask:n.mask});if(!e)return i}return t},validator(n,r){const i=[];for(const t of e){const[...e]=dl(n,t,r),[o]=e;if(!o[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${ul(n)}`,...i]}})}function Bl(){return bl("unknown",()=>!0)}function Nl(e,t,n){return new hl({...e,coercer:(r,i)=>ml(r,t)?e.coercer(n(r,i),i):e.coercer(r,i)})}var Rl,Ll=new Uint8Array(16);function Dl(){if(!Rl&&!(Rl="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rl(Ll)}const Fl=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ol(e){return"string"==typeof e&&Fl.test(e)}for(var Pl,Ul,ql=[],Hl=0;Hl<256;++Hl)ql.push((Hl+256).toString(16).substr(1));function zl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ql[e[t+0]]+ql[e[t+1]]+ql[e[t+2]]+ql[e[t+3]]+"-"+ql[e[t+4]]+ql[e[t+5]]+"-"+ql[e[t+6]]+ql[e[t+7]]+"-"+ql[e[t+8]]+ql[e[t+9]]+"-"+ql[e[t+10]]+ql[e[t+11]]+ql[e[t+12]]+ql[e[t+13]]+ql[e[t+14]]+ql[e[t+15]]).toLowerCase();if(!Ol(n))throw TypeError("Stringified UUID is invalid");return n}var Vl=0,jl=0;function Gl(e){if(!Ol(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function Jl(e,t,n){function r(e,r,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=Gl(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),(a=n(a))[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(var s=0;s<16;++s)i[o+s]=a[s];return i}return zl(a)}try{r.name=e}catch(i){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Wl(e){return 14+(e+64>>>9<<4)+1}function Kl(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function Yl(e,t,n,r,i,o){return Kl((a=Kl(Kl(t,e),Kl(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function Xl(e,t,n,r,i,o,a){return Yl(t&n|~t&r,e,t,i,o,a)}function Ql(e,t,n,r,i,o,a){return Yl(t&r|n&~r,e,t,i,o,a)}function Zl(e,t,n,r,i,o,a){return Yl(t^n^r,e,t,i,o,a)}function $l(e,t,n,r,i,o,a){return Yl(n^(t|~r),e,t,i,o,a)}var _l=Jl("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",i=0;i<n;i+=8){var o=e[i>>5]>>>i%32&255,a=parseInt(r.charAt(o>>>4&15)+r.charAt(15&o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Wl(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,a=0;a<e.length;a+=16){var s=n,c=r,u=i,l=o;n=Xl(n,r,i,o,e[a],7,-680876936),o=Xl(o,n,r,i,e[a+1],12,-389564586),i=Xl(i,o,n,r,e[a+2],17,606105819),r=Xl(r,i,o,n,e[a+3],22,-1044525330),n=Xl(n,r,i,o,e[a+4],7,-176418897),o=Xl(o,n,r,i,e[a+5],12,1200080426),i=Xl(i,o,n,r,e[a+6],17,-1473231341),r=Xl(r,i,o,n,e[a+7],22,-45705983),n=Xl(n,r,i,o,e[a+8],7,1770035416),o=Xl(o,n,r,i,e[a+9],12,-1958414417),i=Xl(i,o,n,r,e[a+10],17,-42063),r=Xl(r,i,o,n,e[a+11],22,-1990404162),n=Xl(n,r,i,o,e[a+12],7,1804603682),o=Xl(o,n,r,i,e[a+13],12,-40341101),i=Xl(i,o,n,r,e[a+14],17,-1502002290),n=Ql(n,r=Xl(r,i,o,n,e[a+15],22,1236535329),i,o,e[a+1],5,-165796510),o=Ql(o,n,r,i,e[a+6],9,-1069501632),i=Ql(i,o,n,r,e[a+11],14,643717713),r=Ql(r,i,o,n,e[a],20,-373897302),n=Ql(n,r,i,o,e[a+5],5,-701558691),o=Ql(o,n,r,i,e[a+10],9,38016083),i=Ql(i,o,n,r,e[a+15],14,-660478335),r=Ql(r,i,o,n,e[a+4],20,-405537848),n=Ql(n,r,i,o,e[a+9],5,568446438),o=Ql(o,n,r,i,e[a+14],9,-1019803690),i=Ql(i,o,n,r,e[a+3],14,-187363961),r=Ql(r,i,o,n,e[a+8],20,1163531501),n=Ql(n,r,i,o,e[a+13],5,-1444681467),o=Ql(o,n,r,i,e[a+2],9,-51403784),i=Ql(i,o,n,r,e[a+7],14,1735328473),n=Zl(n,r=Ql(r,i,o,n,e[a+12],20,-1926607734),i,o,e[a+5],4,-378558),o=Zl(o,n,r,i,e[a+8],11,-2022574463),i=Zl(i,o,n,r,e[a+11],16,1839030562),r=Zl(r,i,o,n,e[a+14],23,-35309556),n=Zl(n,r,i,o,e[a+1],4,-1530992060),o=Zl(o,n,r,i,e[a+4],11,1272893353),i=Zl(i,o,n,r,e[a+7],16,-155497632),r=Zl(r,i,o,n,e[a+10],23,-1094730640),n=Zl(n,r,i,o,e[a+13],4,681279174),o=Zl(o,n,r,i,e[a],11,-358537222),i=Zl(i,o,n,r,e[a+3],16,-722521979),r=Zl(r,i,o,n,e[a+6],23,76029189),n=Zl(n,r,i,o,e[a+9],4,-640364487),o=Zl(o,n,r,i,e[a+12],11,-421815835),i=Zl(i,o,n,r,e[a+15],16,530742520),n=$l(n,r=Zl(r,i,o,n,e[a+2],23,-995338651),i,o,e[a],6,-198630844),o=$l(o,n,r,i,e[a+7],10,1126891415),i=$l(i,o,n,r,e[a+14],15,-1416354905),r=$l(r,i,o,n,e[a+5],21,-57434055),n=$l(n,r,i,o,e[a+12],6,1700485571),o=$l(o,n,r,i,e[a+3],10,-1894986606),i=$l(i,o,n,r,e[a+10],15,-1051523),r=$l(r,i,o,n,e[a+1],21,-2054922799),n=$l(n,r,i,o,e[a+8],6,1873313359),o=$l(o,n,r,i,e[a+15],10,-30611744),i=$l(i,o,n,r,e[a+6],15,-1560198380),r=$l(r,i,o,n,e[a+13],21,1309151649),n=$l(n,r,i,o,e[a+4],6,-145523070),o=$l(o,n,r,i,e[a+11],10,-1120210379),i=$l(i,o,n,r,e[a+2],15,718787259),r=$l(r,i,o,n,e[a+9],21,-343485551),n=Kl(n,s),r=Kl(r,c),i=Kl(i,u),o=Kl(o,l)}return[n,r,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(Wl(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))});function ef(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function tf(e,t){return e<<t|e>>>32-t}var nf=Jl("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,a=Math.ceil(o/16),s=new Array(a),c=0;c<a;++c){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=e[64*c+4*l]<<24|e[64*c+4*l+1]<<16|e[64*c+4*l+2]<<8|e[64*c+4*l+3];s[c]=u}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(var f=0;f<a;++f){for(var d=new Uint32Array(80),h=0;h<16;++h)d[h]=s[f][h];for(var p=16;p<80;++p)d[p]=tf(d[p-3]^d[p-8]^d[p-14]^d[p-16],1);for(var m=n[0],g=n[1],b=n[2],w=n[3],y=n[4],v=0;v<80;++v){var A=Math.floor(v/20),k=tf(m,5)+ef(A,g,b,w)+y+t[A]+d[v]>>>0;y=w,w=b,b=tf(g,30)>>>0,g=m,m=k}n[0]=n[0]+m>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+b>>>0,n[3]=n[3]+w>>>0,n[4]=n[4]+y>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]});const rf=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:Gl,stringify:zl,v1:function(e,t,n){var r=t&&n||0,i=t||new Array(16),o=(e=e||{}).node||Pl,a=void 0!==e.clockseq?e.clockseq:Ul;if(null==o||null==a){var s=e.random||(e.rng||Dl)();null==o&&(o=Pl=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=Ul=16383&(s[6]<<8|s[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:jl+1,l=c-Vl+(u-jl)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),(l<0||c>Vl)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Vl=c,jl=u,Ul=a;var f=(1e4*(268435455&(c+=122192928e5))+u)%4294967296;i[r++]=f>>>24&255,i[r++]=f>>>16&255,i[r++]=f>>>8&255,i[r++]=255&f;var d=c/4294967296*1e4&268435455;i[r++]=d>>>8&255,i[r++]=255&d,i[r++]=d>>>24&15|16,i[r++]=d>>>16&255,i[r++]=a>>>8|128,i[r++]=255&a;for(var h=0;h<6;++h)i[r+h]=o[h];return t||zl(i)},v3:_l,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||Dl)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return zl(r)},v5:nf,validate:Ol,version:function(e){if(!Ol(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),of=/* @__PURE__ */Tr(rf);var af,sf,cf,uf;!function(){if(uf)return cf;uf=1;const e=of.v4,t=function(){if(sf)return af;sf=1;const e=of.v4;return af=function(t,n,r,i){if("string"!=typeof t)throw new TypeError(t+" must be a string");const o="number"==typeof(i=i||{}).version?i.version:2;if(1!==o&&2!==o)throw new TypeError(o+" must be 1 or 2");const a={method:t};if(2===o&&(a.jsonrpc="2.0"),n){if("object"!=typeof n&&!Array.isArray(n))throw new TypeError(n+" must be an object, array or omitted");a.params=n}if(void 0===r){const t="function"==typeof i.generator?i.generator:function(){return e()};a.id=t(a,i)}else 2===o&&null===r?i.notificationIdNull&&(a.id=null):a.id=r;return a}}(),n=function(t,r){if(!(this instanceof n))return new n(t,r);r||(r={}),this.options={reviver:void 0!==r.reviver?r.reviver:null,replacer:void 0!==r.replacer?r.replacer:null,generator:void 0!==r.generator?r.generator:function(){return e()},version:void 0!==r.version?r.version:2,notificationIdNull:"boolean"==typeof r.notificationIdNull&&r.notificationIdNull},this.callServer=t};cf=n,n.prototype.request=function(e,n,r,i){const o=this;let a=null;const s=Array.isArray(e)&&"function"==typeof n;if(1===this.options.version&&s)throw new TypeError("JSON-RPC 1.0 does not support batching");if(s||!s&&e&&"object"==typeof e&&"function"==typeof n)i=n,a=e;else{"function"==typeof r&&(i=r,r=void 0);const o="function"==typeof i;try{a=t(e,n,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(u){if(o)return void i(u);throw u}if(!o)return a}let c;try{c=JSON.stringify(a,this.options.replacer)}catch(u){return void i(u)}return this.callServer(c,function(e,t){o.Me(e,t,i)}),a},n.prototype.Me=function(e,t,n){if(e)return void n(e);if(!t)return void n();let r;try{r=JSON.parse(t,this.options.reviver)}catch(i){return void n(i)}if(3!==n.length)n(null,r);else{if(Array.isArray(r)){const e=function(e){return void 0!==e.error},t=function(t){return!e(t)};return void n(null,r.filter(e),r.filter(t))}n(null,r.error,r.result)}}}();var lf,ff={exports:{}};lf||(lf=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),c=n?n+t:t;return e.Be[c]?e.Be[c].fn?e.Be[c]=[e.Be[c],s]:e.Be[c].push(s):(e.Be[c]=s,e.Ne++),e}function a(e,t){0===--e.Ne?e.Be=new r:delete e.Be[t]}function s(){this.Be=new r,this.Ne=0}Object.create&&(r.prototype=/* @__PURE__ */Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this.Ne)return i;for(r in e=this.Be)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this.Be[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this.Be[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this.Be[s])return!1;var c,u,l=this.Be[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,o),!0;case 6:return l.fn.call(l.context,t,r,i,o,a),!0}for(u=1,c=new Array(f-1);u<f;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,h=l.length;for(u=0;u<h;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,i);break;default:if(!c)for(d=1,c=new Array(f-1);d<f;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this.Be[o])return this;if(!t)return a(this,o),this;var s=this.Be[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var c=0,u=[],l=s.length;c<l;c++)(s[c].fn!==t||i&&!s[c].once||r&&s[c].context!==r)&&u.push(s[c]);u.length?this.Be[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this.Be[t]&&a(this,t)):(this.Be=new r,this.Ne=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(ff));const df=(e,t)=>(e+(e>=0?t:-t)/yf)/t;function hf(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function pf(e,t){const n={};for(let r of Object.keys(t))n[r]=void 0===e[r]?t[r]:e[r];return Ur(n.lowS,"lowS"),Ur(n.prehash,"prehash"),void 0!==n.format&&hf(n.format),n}class mf extends Error{constructor(e=""){super(e)}}const gf={Err:mf,Le:{encode:(e,t)=>{const{Err:n}=gf;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");const r=t.length/2,i=Hr(r);if(i.length/2&128)throw new n("tlv.encode: long form length too big");const o=r>127?Hr(i.length/2|128):"";return Hr(e)+o+i+t},decode(e,t){const{Err:n}=gf;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const i=t[r++];let o=0;if(!!(128&i)){const e=127&i;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");const a=t.subarray(r,r+e);if(a.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===a[0])throw new n("tlv.decode(long): zero leftmost byte");for(const t of a)o=o<<8|t;if(r+=e,o<128)throw new n("tlv.decode(long): not minimal encoding")}else o=i;const a=t.subarray(r,r+o);if(a.length!==o)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+o)}}},De:{encode(e){const{Err:t}=gf;if(e<bf)throw new t("integer: negative integers are not allowed");let n=Hr(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=gf;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return Vr(e)}},toSig(e){const{Err:t,De:n,Le:r}=gf,i=Wr("signature",e),{v:o,l:a}=r.decode(48,i);if(a.length)throw new t("invalid signature: left bytes after parsing");const{v:s,l:c}=r.decode(2,o),{v:u,l:l}=r.decode(2,c);if(l.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(s),s:n.decode(u)}},hexFromSig(e){const{Le:t,De:n}=gf,r=t.encode(2,n.encode(e.r))+t.encode(2,n.encode(e.s));return t.encode(48,r)}},bf=BigInt(0),wf=BigInt(1),yf=BigInt(2),vf=BigInt(3),Af=BigInt(4);function kf(e,t){const{BYTES:n}=e;let r;if("bigint"==typeof t)r=t;else{let o=Wr("private key",t);try{r=e.fromBytes(o)}catch(i){throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw new Error("invalid private key: out of range [1..N-1]");return r}function xf(e,t={}){const n=qi("weierstrass",e,t),{Fp:r,Fn:i}=n;let o=n.CURVE;const{h:a,n:s}=o;$r(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:c}=t;if(c&&(!r.is0(o.a)||"bigint"!=typeof c.beta||!Array.isArray(c.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const u=Cf(r,i);function l(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}const f=t.toBytes||function(e,t,n){const{x:i,y:o}=t.toAffine(),a=r.toBytes(i);if(Ur(n,"isCompressed"),n){l();return rt(Ef(!r.isOdd(o)),a)}return rt(Uint8Array.of(4),a,r.toBytes(o))},d=t.fromBytes||function(e){qr(e,void 0,"Point");const{publicKey:t,publicKeyUncompressed:n}=u,i=e.length,o=e[0],a=e.subarray(1);if(i!==t||2!==o&&3!==o){if(i===n&&4===o){const e=r.BYTES,t=r.fromBytes(a.subarray(0,e)),n=r.fromBytes(a.subarray(e,2*e));if(!p(t,n))throw new Error("bad point: is not on curve");return{x:t,y:n}}throw new Error(`bad point: got length ${i}, expected compressed=${t} or uncompressed=${n}`)}{const e=r.fromBytes(a);if(!r.isValid(e))throw new Error("bad point: is not on curve, wrong x");const t=h(e);let n;try{n=r.sqrt(t)}catch(s){const e=s instanceof Error?": "+s.message:"";throw new Error("bad point: is not on curve, sqrt error"+e)}l();return!(1&~o)!==r.isOdd(n)&&(n=r.neg(n)),{x:e,y:n}}};function h(e){const t=r.sqr(e),n=r.mul(t,e);return r.add(r.add(n,r.mul(e,o.a)),o.b)}function p(e,t){const n=r.sqr(t),i=h(e);return r.eql(n,i)}if(!p(o.Gx,o.Gy))throw new Error("bad curve params: generator point");const m=r.mul(r.pow(o.a,vf),Af),g=r.mul(r.sqr(o.b),BigInt(27));if(r.is0(r.add(m,g)))throw new Error("bad curve params: a or b");function b(e,t,n=!1){if(!r.isValid(t)||n&&r.is0(t))throw new Error(`bad point coordinate ${e}`);return t}function w(e){if(!(e instanceof x))throw new Error("ProjectivePoint expected")}function y(e){if(!c||!c.basises)throw new Error("no endo");return function(e,t,n){const[[r,i],[o,a]]=t,s=df(a*e,n),c=df(-i*e,n);let u=e-s*r-c*o,l=-s*i-c*a;const f=u<bf,d=l<bf;f&&(u=-u),d&&(l=-l);const h=Zr(Math.ceil(Qr(n)/2))+wf;if(u<bf||u>=h||l<bf||l>=h)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:f,k1:u,k2neg:d,k2:l}}(e,c.basises,i.ORDER)}const v=_r((e,t)=>{const{X:n,Y:i,Z:o}=e;if(r.eql(o,r.ONE))return{x:n,y:i};const a=e.is0();null==t&&(t=a?r.ONE:r.inv(o));const s=r.mul(n,t),c=r.mul(i,t),u=r.mul(o,t);if(a)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:s,y:c}}),A=_r(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.Y))return;throw new Error("bad point: ZERO")}const{x:n,y:i}=e.toAffine();if(!r.isValid(n)||!r.isValid(i))throw new Error("bad point: x or y not field elements");if(!p(n,i))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function k(e,t,n,i,o){return n=new x(r.mul(n.X,e),n.Y,n.Z),t=Ti(i,t),n=Ti(o,n),t.add(n)}class x{constructor(e,t,n){this.X=b("x",e),this.Y=b("y",t,!0),this.Z=b("z",n),Object.freeze(this)}static CURVE(){return o}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof x)throw new Error("projective point not allowed");return r.is0(t)&&r.is0(n)?x.ZERO:new x(t,n,r.ONE)}static fromBytes(e){const t=x.fromAffine(d(qr(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return x.fromBytes(Wr("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return C.createCache(this,e),t||this.multiply(vf),this}assertValidity(){A(this)}hasEvenY(){const{y:e}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(e)}equals(e){w(e);const{X:t,Y:n,Z:i}=this,{X:o,Y:a,Z:s}=e,c=r.eql(r.mul(t,s),r.mul(o,i)),u=r.eql(r.mul(n,s),r.mul(a,i));return c&&u}negate(){return new x(this.X,r.neg(this.Y),this.Z)}double(){const{a:e,b:t}=o,n=r.mul(t,vf),{X:i,Y:a,Z:s}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(i,i),d=r.mul(a,a),h=r.mul(s,s),p=r.mul(i,a);return p=r.add(p,p),l=r.mul(i,s),l=r.add(l,l),c=r.mul(e,l),u=r.mul(n,h),u=r.add(c,u),c=r.sub(d,u),u=r.add(d,u),u=r.mul(c,u),c=r.mul(p,c),l=r.mul(n,l),h=r.mul(e,h),p=r.sub(f,h),p=r.mul(e,p),p=r.add(p,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,h),f=r.mul(f,p),u=r.add(u,f),h=r.mul(a,s),h=r.add(h,h),f=r.mul(h,p),c=r.sub(c,f),l=r.mul(h,d),l=r.add(l,l),l=r.add(l,l),new x(c,u,l)}add(e){w(e);const{X:t,Y:n,Z:i}=this,{X:a,Y:s,Z:c}=e;let u=r.ZERO,l=r.ZERO,f=r.ZERO;const d=o.a,h=r.mul(o.b,vf);let p=r.mul(t,a),m=r.mul(n,s),g=r.mul(i,c),b=r.add(t,n),y=r.add(a,s);b=r.mul(b,y),y=r.add(p,m),b=r.sub(b,y),y=r.add(t,i);let v=r.add(a,c);return y=r.mul(y,v),v=r.add(p,g),y=r.sub(y,v),v=r.add(n,i),u=r.add(s,c),v=r.mul(v,u),u=r.add(m,g),v=r.sub(v,u),f=r.mul(d,y),u=r.mul(h,g),f=r.add(u,f),u=r.sub(m,f),f=r.add(m,f),l=r.mul(u,f),m=r.add(p,p),m=r.add(m,p),g=r.mul(d,g),y=r.mul(h,y),m=r.add(m,g),g=r.sub(p,g),g=r.mul(d,g),y=r.add(y,g),p=r.mul(m,y),l=r.add(l,p),p=r.mul(v,y),u=r.mul(b,u),u=r.sub(u,p),p=r.mul(b,m),f=r.mul(v,f),f=r.add(f,p),new x(u,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(x.ZERO)}multiply(e){const{endo:n}=t;if(!i.isValidNot0(e))throw new Error("invalid scalar: out of range");let r,o;const a=e=>C.cached(this,e,e=>Mi(x,e));if(n){const{k1neg:t,k1:i,k2neg:s,k2:c}=y(e),{p:u,f:l}=a(i),{p:f,f:d}=a(c);o=l.add(d),r=k(n.beta,u,f,t,s)}else{const{p:t,f:n}=a(e);r=t,o=n}return Mi(x,[r,o])[0]}multiplyUnsafe(e){const{endo:n}=t,r=this;if(!i.isValid(e))throw new Error("invalid scalar: out of range");if(e===bf||r.is0())return x.ZERO;if(e===wf)return r;if(C.hasCache(this))return this.multiply(e);if(n){const{k1neg:t,k1:i,k2neg:o,k2:a}=y(e),{p1:s,p2:c}=function(e,t,n,r){let i=t,o=e.ZERO,a=e.ZERO;for(;n>Ci||r>Ci;)n&Si&&(o=o.add(i)),r&Si&&(a=a.add(i)),i=i.double(),n>>=Si,r>>=Si;return{p1:o,p2:a}}(x,r,i,a);return k(n.beta,s,c,t,o)}return C.unsafe(r,e)}multiplyAndAddUnsafe(e,t,n){const r=this.multiplyUnsafe(t).add(e.multiplyUnsafe(n));return r.is0()?void 0:r}toAffine(e){return v(this,e)}isTorsionFree(){const{isTorsionFree:e}=t;return a===wf||(e?e(x,this):C.unsafe(this,s).is0())}clearCofactor(){const{clearCofactor:e}=t;return a===wf?this:e?e(x,this):this.multiplyUnsafe(a)}isSmallOrder(){return this.multiplyUnsafe(a).is0()}toBytes(e=!0){return Ur(e,"isCompressed"),this.assertValidity(),f(x,this,e)}toHex(e=!0){return Ke(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}N(e){this.precompute(e)}static normalizeZ(e){return Mi(x,e)}static msm(e,t){return Pi(x,i,e,t)}static fromPrivateKey(e){return x.BASE.multiply(kf(i,e))}}x.BASE=new x(o.Gx,o.Gy,r.ONE),x.ZERO=new x(r.ZERO,r.ONE,r.ZERO),x.Fp=r,x.Fn=i;const E=i.BITS,C=new Oi(x,t.endo?Math.ceil(E/2):E);return x.BASE.precompute(8),x}function Ef(e){return Uint8Array.of(e?2:3)}function Cf(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function Sf(e,t={}){const{Fn:n}=e,r=t.randomBytes||at,i=Object.assign(Cf(e.Fp,n),{seed:Ei(n.ORDER)});function o(e){try{return!!kf(n,e)}catch(t){return!1}}function a(e=r(i.seed)){return function(e,t,n=!1){const r=e.length,i=xi(t),o=Ei(t);if(r<16||r<o||r>1024)throw new Error("expected "+o+"-1024 bytes of input, got "+r);const a=li(n?jr(e):Vr(e),t-ti)+ti;return n?Jr(a,i):Gr(a,i)}(qr(e,i.seed,"seed"),n.ORDER)}function s(t,r=!0){return e.BASE.multiply(kf(n,t)).toBytes(r)}function c(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;const{secretKey:r,publicKey:o,publicKeyUncompressed:a}=i;if(n.allowedLengths||r===o)return;const s=Wr("key",t).length;return s===o||s===a}const u={isValidSecretKey:o,isValidPublicKey:function(t,n){const{publicKey:r,publicKeyUncompressed:o}=i;try{const i=t.length;return(!0!==n||i===r)&&((!1!==n||i===o)&&!!e.fromBytes(t))}catch(a){return!1}},randomSecretKey:a,isValidPrivateKey:o,randomPrivateKey:a,normPrivateKeyToScalar:e=>kf(n,e),precompute:(t=8,n=e.BASE)=>n.precompute(t,!1)};return Object.freeze({getPublicKey:s,getSharedSecret:function(t,r,i=!0){if(!0===c(t))throw new Error("first arg must be private key");if(!1===c(r))throw new Error("second arg must be public key");const o=kf(n,t);return e.fromHex(r).multiply(o).toBytes(i)},keygen:function(e){const t=a(e);return{secretKey:t,publicKey:s(t)}},Point:e,utils:u,lengths:i})}function Tf(e,t,n={}){Pe(t),$r(n,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=n.randomBytes||at,i=n.hmac||((e,...n)=>Er(t,e,rt(...n))),{Fp:o,Fn:a}=e,{ORDER:s,BITS:c}=a,{keygen:u,getPublicKey:l,getSharedSecret:f,utils:d,lengths:h}=Sf(e,n),p={prehash:!1,lowS:"boolean"==typeof n.lowS&&n.lowS,format:void 0,extraEntropy:!1},m="compact";function g(e){return e>s>>wf}function b(e,t){if(!a.isValidNot0(t))throw new Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class w{constructor(e,t,n){this.r=b("r",e),this.s=b("s",t),null!=n&&(this.recovery=n),Object.freeze(this)}static fromBytes(e,t=m){let n;if(function(e,t){hf(t);const n=h.signature;qr(e,"compact"===t?n:"recovered"===t?n+1:void 0,`${t} signature`)}(e,t),"der"===t){const{r:t,s:n}=gf.toSig(qr(e));return new w(t,n)}"recovered"===t&&(n=e[0],t="compact",e=e.subarray(1));const r=a.BYTES,i=e.subarray(0,r),o=e.subarray(r,2*r);return new w(a.fromBytes(i),a.fromBytes(o),n)}static fromHex(e,t){return this.fromBytes(tt(e),t)}addRecoveryBit(e){return new w(this.r,this.s,e)}recoverPublicKey(t){const n=o.ORDER,{r:r,s:i,recovery:c}=this;if(null==c||![0,1,2,3].includes(c))throw new Error("recovery id invalid");if(s*yf<n&&c>1)throw new Error("recovery id is ambiguous for h>1 curve");const u=2===c||3===c?r+s:r;if(!o.isValid(u))throw new Error("recovery id 2 or 3 invalid");const l=o.toBytes(u),f=e.fromBytes(rt(Ef(!(1&c)),l)),d=a.inv(u),h=v(Wr("msgHash",t)),p=a.create(-h*d),m=a.create(i*d),g=e.BASE.multiplyUnsafe(p).add(f.multiplyUnsafe(m));if(g.is0())throw new Error("point at infinify");return g.assertValidity(),g}hasHighS(){return g(this.s)}toBytes(e=m){if(hf(e),"der"===e)return tt(gf.hexFromSig(this));const t=a.toBytes(this.r),n=a.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw new Error("recovery bit must be present");return rt(Uint8Array.of(this.recovery),t,n)}return rt(t,n)}toHex(e){return Ke(this.toBytes(e))}assertValidity(){}static fromCompact(e){return w.fromBytes(Wr("sig",e),"compact")}static fromDER(e){return w.fromBytes(Wr("sig",e),"der")}normalizeS(){return this.hasHighS()?new w(this.r,a.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return Ke(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return Ke(this.toBytes("compact"))}}const y=n.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=Vr(e),n=8*e.length-c;return n>0?t>>BigInt(n):t},v=n.bits2int_modN||function(e){return a.create(y(e))},A=Zr(c);function k(e){return Xr("num < 2^"+c,e,bf,A),a.toBytes(e)}function x(e,n){return qr(e,void 0,"message"),n?qr(t(e),void 0,"prehashed message"):e}return Object.freeze({keygen:u,getPublicKey:l,getSharedSecret:f,utils:d,lengths:h,Point:e,sign:function(n,o,s={}){n=Wr("message",n);const{seed:c,k2sig:u}=function(t,n,i){if(["recovered","canonical"].some(e=>e in i))throw new Error("sign() legacy options not supported");const{lowS:o,prehash:s,extraEntropy:c}=pf(i,p);t=x(t,s);const u=v(t),l=kf(a,n),f=[k(l),k(u)];if(null!=c&&!1!==c){const e=!0===c?r(h.secretKey):c;f.push(Wr("extraEntropy",e))}const d=rt(...f),m=u;return{seed:d,k2sig:function(t){const n=y(t);if(!a.isValidNot0(n))return;const r=a.inv(n),i=e.BASE.multiply(n).toAffine(),s=a.create(i.x);if(s===bf)return;const c=a.create(r*a.create(m+s*l));if(c===bf)return;let u=(i.x===s?0:2)|Number(i.y&wf),f=c;return o&&g(c)&&(f=a.neg(c),u^=1),new w(s,f,u)}}}(n,o,s),l=function(e,t,n){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof n)throw new Error("hmacFn must be a function");const r=e=>new Uint8Array(e),i=e=>Uint8Array.of(e);let o=r(e),a=r(e),s=0;const c=()=>{o.fill(1),a.fill(0),s=0},u=(...e)=>n(a,o,...e),l=(e=r(0))=>{a=u(i(0),e),o=u(),0!==e.length&&(a=u(i(1),e),o=u())},f=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){o=u();const t=o.slice();n.push(t),e+=o.length}return rt(...n)};return(e,t)=>{let n;for(c(),l(e);!(n=t(f()));)l();return c(),n}}(t.outputLen,a.BYTES,i);return l(c,u)},verify:function(t,n,r,i={}){const{lowS:o,prehash:s,format:c}=pf(i,p);if(r=Wr("publicKey",r),n=x(Wr("message",n),s),"strict"in i)throw new Error("options.strict was renamed to lowS");const u=void 0===c?function(e){let t;const n="string"==typeof e||De(e),r=!n&&null!==e&&"object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!n&&!r)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(r)t=new w(e.r,e.s);else if(n){try{t=w.fromBytes(Wr("sig",e),"der")}catch(i){if(!(i instanceof gf.Err))throw i}if(!t)try{t=w.fromBytes(Wr("sig",e),"compact")}catch(o){return!1}}return t||!1}(t):w.fromBytes(Wr("sig",t),c);if(!1===u)return!1;try{const t=e.fromBytes(r);if(o&&u.hasHighS())return!1;const{r:i,s:s}=u,c=v(n),l=a.inv(s),f=a.create(c*l),d=a.create(i*l),h=e.BASE.multiplyUnsafe(f).add(t.multiplyUnsafe(d));if(h.is0())return!1;return a.create(h.x)===i}catch(l){return!1}},recoverPublicKey:function(e,t,n={}){const{prehash:r}=pf(n,p);return t=x(t,r),w.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:w,hash:t})}function Mf(e){const{CURVE:t,curveOpts:n}=function(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp;let r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0;return{CURVE:t,curveOpts:{Fp:n,Fn:ki(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes}}}(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}function If(e){const{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:i}=Mf(e);return function(e,t){const n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,Ai(n.Fn.ORDER,n.Fn.BITS))})}(e,Tf(xf(t,n),r,i))}const Bf={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},Nf={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},Rf=/* @__PURE__ */BigInt(2);const Lf=ki(Bf.p,{sqrt:function(e){const t=Bf.p,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),a=BigInt(23),s=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,f=fi(l,n,t)*l%t,d=fi(f,n,t)*l%t,h=fi(d,Rf,t)*u%t,p=fi(h,i,t)*h%t,m=fi(p,o,t)*p%t,g=fi(m,s,t)*m%t,b=fi(g,c,t)*g%t,w=fi(b,s,t)*m%t,y=fi(w,n,t)*l%t,v=fi(y,a,t)*p%t,A=fi(v,r,t)*u%t,k=fi(A,Rf,t);if(!Lf.eql(Lf.sqr(k),e))throw new Error("Cannot find square root");return k}}),Df=function(e,t){const n=t=>If({...e,hash:t});return{...n(t),create:n}}({...Bf,Fp:Lf,lowS:!0,endo:Nf},er);function Ff(e){try{return ro.ExtendedPoint.fromHex(e),!0}catch{return!1}}ro.utils.randomPrivateKey,ro.getPublicKey,ro.verify;class Of{constructor(e){Object.assign(this,e)}encode(){return Fr.Buffer.from(Do.serialize(Pf,this))}static decode(e){return Do.deserialize(Pf,this,e)}static decodeUnchecked(e){return Do.deserializeUnchecked(Pf,this,e)}}const Pf=/* @__PURE__ */new Map;var Uf;let qf=1;class Hf extends Of{constructor(e){if(super({}),this.Fe=void 0,function(e){return void 0!==e.Fe}(e))this.Fe=e.Fe;else{if("string"==typeof e){const t=yo.decode(e);if(32!=t.length)throw new Error("Invalid public key input");this.Fe=new uo(t)}else this.Fe=new uo(e);if(this.Fe.byteLength()>32)throw new Error("Invalid public key input")}}static unique(){const e=new Hf(qf);return qf+=1,new Hf(e.toBuffer())}equals(e){return this.Fe.eq(e.Fe)}toBase58(){return yo.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}toBuffer(){const e=this.Fe.toArrayLike(Fr.Buffer);if(32===e.length)return e;const t=Fr.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return`PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(e,t,n){const r=Fr.Buffer.concat([e.toBuffer(),Fr.Buffer.from(t),n.toBuffer()]),i=nr(r);return new Hf(i)}static createProgramAddressSync(e,t){let n=Fr.Buffer.alloc(0);e.forEach(function(e){if(e.length>32)throw new TypeError("Max seed length exceeded");var t;n=Fr.Buffer.concat([n,(t=e,Fr.Buffer.isBuffer(t)?t:t instanceof Uint8Array?Fr.Buffer.from(t.buffer,t.byteOffset,t.byteLength):Fr.Buffer.from(t))])}),n=Fr.Buffer.concat([n,t.toBuffer(),Fr.Buffer.from("ProgramDerivedAddress")]);const r=nr(n);if(Ff(r))throw new Error("Invalid seeds, address must fall off the curve");return new Hf(r)}static async createProgramAddress(e,t){return this.createProgramAddressSync(e,t)}static findProgramAddressSync(e,t){let n,r=255;for(;0!=r;){try{const i=e.concat(Fr.Buffer.from([r]));n=this.createProgramAddressSync(i,t)}catch(i){if(i instanceof TypeError)throw i;r--;continue}return[n,r]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,t){return this.findProgramAddressSync(e,t)}static isOnCurve(e){return Ff(new Hf(e).toBytes())}}Uf=Hf,Hf.default=new Uf("11111111111111111111111111111111"),Pf.set(Hf,{kind:"struct",fields:[["_bn","u256"]]}),new Hf("BPFLoader1111111111111111111111111111111111");const zf=(e="publicKey")=>Oo.blob(32,e),Vf=(e="string")=>{const t=Oo.struct([Oo.u32("length"),Oo.u32("lengthPadding"),Oo.blob(Oo.offset(Oo.u32(),-8),"chars")],e),n=t.decode.bind(t),r=t.encode.bind(t),i=t;return i.decode=(e,t)=>n(e,t).chars.toString(),i.encode=(e,t,n)=>{const i={chars:Fr.Buffer.from(e,"utf8")};return r(i,t,n)},i.alloc=e=>Oo.u32().span+Oo.u32().span+Fr.Buffer.from(e,"utf8").length,i};Fr.Buffer.alloc(64).fill(0),new Hf("SysvarC1ock11111111111111111111111111111111"),new Hf("SysvarEpochSchedu1e111111111111111111111111"),new Hf("Sysvar1nstructions1111111111111111111111111"),new Hf("SysvarRecentB1ockHashes11111111111111111111"),new Hf("SysvarRent111111111111111111111111111111111"),new Hf("SysvarRewards111111111111111111111111111111"),new Hf("SysvarS1otHashes111111111111111111111111111"),new Hf("SysvarS1otHistory11111111111111111111111111"),new Hf("SysvarStakeHistory1111111111111111111111111");const jf=Oo.nu64("lamportsPerSignature");function Gf(e){const t=Oo.blob(8,e),n=t.decode.bind(t),r=t.encode.bind(t),i=t,o=ol();return i.decode=(e,t)=>{const r=n(e,t);return o.decode(r)},i.encode=(e,t,n)=>{const i=o.encode(e);return r(i,t,n)},i}Oo.struct([Oo.u32("version"),Oo.u32("state"),zf("authorizedPubkey"),zf("nonce"),Oo.struct([jf],"feeCalculator")]).span,Object.freeze({Create:{index:0,layout:Oo.struct([Oo.u32("instruction"),Oo.ns64("lamports"),Oo.ns64("space"),zf("programId")])},Assign:{index:1,layout:Oo.struct([Oo.u32("instruction"),zf("programId")])},Transfer:{index:2,layout:Oo.struct([Oo.u32("instruction"),Gf("lamports")])},CreateWithSeed:{index:3,layout:Oo.struct([Oo.u32("instruction"),zf("base"),Vf("seed"),Oo.ns64("lamports"),Oo.ns64("space"),zf("programId")])},AdvanceNonceAccount:{index:4,layout:Oo.struct([Oo.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:Oo.struct([Oo.u32("instruction"),Oo.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:Oo.struct([Oo.u32("instruction"),zf("authorized")])},AuthorizeNonceAccount:{index:7,layout:Oo.struct([Oo.u32("instruction"),zf("authorized")])},Allocate:{index:8,layout:Oo.struct([Oo.u32("instruction"),Oo.ns64("space")])},AllocateWithSeed:{index:9,layout:Oo.struct([Oo.u32("instruction"),zf("base"),Vf("seed"),Oo.ns64("space"),zf("programId")])},AssignWithSeed:{index:10,layout:Oo.struct([Oo.u32("instruction"),zf("base"),Vf("seed"),zf("programId")])},TransferWithSeed:{index:11,layout:Oo.struct([Oo.u32("instruction"),Gf("lamports"),Vf("seed"),zf("programId")])},UpgradeNonceAccount:{index:12,layout:Oo.struct([Oo.u32("instruction")])}}),new Hf("11111111111111111111111111111111"),new Hf("BPFLoader2111111111111111111111111111111111"),Oo.struct([Oo.u32("typeIndex"),Gf("deactivationSlot"),Oo.nu64("lastExtendedSlot"),Oo.u8("lastExtendedStartIndex"),Oo.u8(),Oo.seq(zf(),Oo.offset(Oo.u8(),-1),"authority")]);const Jf=Nl(vl(Hf),Sl(),e=>new Hf(e)),Wf=Tl([Sl(),Al("base64")]),Kf=Nl(vl(Fr.Buffer),Wf,e=>Fr.Buffer.from(e[0],"base64"));function Yf(e){return Il([Ml({jsonrpc:Al("2.0"),id:Sl(),result:e}),Ml({jsonrpc:Al("2.0"),id:Sl(),error:Ml({code:Bl(),message:Sl(),data:El(bl("any",()=>!0))})})])}const Xf=Yf(Bl());function Qf(e){return Nl(Yf(e),Xf,t=>"error"in t?t:{...t,result:pl(t.result,e)})}function Zf(e){return Qf(Ml({context:Ml({slot:xl()}),value:e}))}function $f(e){return Ml({context:Ml({slot:xl()}),value:e})}const _f=Ml({foundation:xl(),foundationTerm:xl(),initial:xl(),taper:xl(),terminal:xl()});Qf(wl(kl(Ml({epoch:xl(),effectiveSlot:xl(),amount:xl(),postBalance:xl(),commission:El(kl(xl()))}))));const ed=wl(Ml({slot:xl(),prioritizationFee:xl()})),td=Ml({total:xl(),validator:xl(),foundation:xl(),epoch:xl()}),nd=Ml({epoch:xl(),slotIndex:xl(),slotsInEpoch:xl(),absoluteSlot:xl(),blockHeight:El(xl()),transactionCount:El(xl())}),rd=Ml({slotsPerEpoch:xl(),leaderScheduleSlotOffset:xl(),warmup:yl(),firstNormalEpoch:xl(),firstNormalSlot:xl()}),id=Cl(Sl(),wl(xl())),od=kl(Il([Ml({}),Sl()])),ad=Ml({err:od}),sd=Al("receivedSignature");Ml({"solana-core":Sl(),"feature-set":El(xl())});const cd=Ml({program:Sl(),programId:Jf,parsed:Bl()}),ud=Ml({programId:Jf,accounts:wl(Jf),data:Sl()});Zf(Ml({err:kl(Il([Ml({}),Sl()])),logs:kl(wl(Sl())),accounts:El(kl(wl(kl(Ml({executable:yl(),owner:Sl(),lamports:xl(),data:wl(Sl()),rentEpoch:El(xl())}))))),unitsConsumed:El(xl()),returnData:El(kl(Ml({programId:Sl(),data:Tl([Sl(),Al("base64")])}))),innerInstructions:El(kl(wl(Ml({index:xl(),instructions:wl(Il([cd,ud]))}))))})),Zf(Ml({byIdentity:Cl(Sl(),wl(xl())),range:Ml({firstSlot:xl(),lastSlot:xl()})})),Qf(_f),Qf(td),Qf(ed),Qf(nd),Qf(rd),Qf(id),Qf(xl()),Zf(Ml({total:xl(),circulating:xl(),nonCirculating:xl(),nonCirculatingAccounts:wl(Jf)}));const ld=Ml({amount:Sl(),uiAmount:kl(xl()),decimals:xl(),uiAmountString:El(Sl())});Zf(wl(Ml({address:Jf,amount:Sl(),uiAmount:kl(xl()),decimals:xl(),uiAmountString:El(Sl())}))),Zf(wl(Ml({pubkey:Jf,account:Ml({executable:yl(),owner:Jf,lamports:xl(),data:Kf,rentEpoch:xl()})})));const fd=Ml({program:Sl(),parsed:Bl(),space:xl()});Zf(wl(Ml({pubkey:Jf,account:Ml({executable:yl(),owner:Jf,lamports:xl(),data:fd,rentEpoch:xl()})}))),Zf(wl(Ml({lamports:xl(),address:Jf})));const dd=Ml({executable:yl(),owner:Jf,lamports:xl(),data:Kf,rentEpoch:xl()});Ml({pubkey:Jf,account:dd});const hd=Nl(Il([vl(Fr.Buffer),fd]),Il([Wf,fd]),e=>Array.isArray(e)?pl(e,Kf):e),pd=Ml({executable:yl(),owner:Jf,lamports:xl(),data:hd,rentEpoch:xl()});Ml({pubkey:Jf,account:pd}),Ml({state:Il([Al("active"),Al("inactive"),Al("activating"),Al("deactivating")]),active:xl(),inactive:xl()}),Qf(wl(Ml({signature:Sl(),slot:xl(),err:od,memo:kl(Sl()),blockTime:El(kl(xl()))}))),Qf(wl(Ml({signature:Sl(),slot:xl(),err:od,memo:kl(Sl()),blockTime:El(kl(xl()))}))),Ml({subscription:xl(),result:$f(dd)});const md=Ml({pubkey:Jf,account:dd});Ml({subscription:xl(),result:$f(md)});const gd=Ml({parent:xl(),slot:xl(),root:xl()});Ml({subscription:xl(),result:gd});const bd=Il([Ml({type:Il([Al("firstShredReceived"),Al("completed"),Al("optimisticConfirmation"),Al("root")]),slot:xl(),timestamp:xl()}),Ml({type:Al("createdBank"),parent:xl(),slot:xl(),timestamp:xl()}),Ml({type:Al("frozen"),slot:xl(),timestamp:xl(),stats:Ml({numTransactionEntries:xl(),numSuccessfulTransactions:xl(),numFailedTransactions:xl(),maxTransactionsPerEntry:xl()})}),Ml({type:Al("dead"),slot:xl(),timestamp:xl(),err:Sl()})]);Ml({subscription:xl(),result:bd}),Ml({subscription:xl(),result:$f(Il([ad,sd]))}),Ml({subscription:xl(),result:xl()}),Ml({pubkey:Sl(),gossip:kl(Sl()),tpu:kl(Sl()),rpc:kl(Sl()),version:kl(Sl())});const wd=Ml({votePubkey:Sl(),nodePubkey:Sl(),activatedStake:xl(),epochVoteAccount:yl(),epochCredits:wl(Tl([xl(),xl(),xl()])),commission:xl(),lastVote:xl(),rootSlot:kl(xl())});Qf(Ml({current:wl(wd),delinquent:wl(wd)}));const yd=Il([Al("processed"),Al("confirmed"),Al("finalized")]),vd=Ml({slot:xl(),confirmations:kl(xl()),err:od,confirmationStatus:El(yd)});Zf(wl(kl(vd))),Qf(xl());const Ad=Ml({accountKey:Jf,writableIndexes:wl(xl()),readonlyIndexes:wl(xl())}),kd=Ml({signatures:wl(Sl()),message:Ml({accountKeys:wl(Sl()),header:Ml({numRequiredSignatures:xl(),numReadonlySignedAccounts:xl(),numReadonlyUnsignedAccounts:xl()}),instructions:wl(Ml({accounts:wl(xl()),data:Sl(),programIdIndex:xl()})),recentBlockhash:Sl(),addressTableLookups:El(wl(Ad))})}),xd=Ml({pubkey:Jf,signer:yl(),writable:yl(),source:El(Il([Al("transaction"),Al("lookupTable")]))}),Ed=Ml({accountKeys:wl(xd),signatures:wl(Sl())}),Cd=Ml({parsed:Bl(),program:Sl(),programId:Jf}),Sd=Ml({accounts:wl(Jf),data:Sl(),programId:Jf}),Td=Nl(Il([Sd,Cd]),Il([Ml({parsed:Bl(),program:Sl(),programId:Sl()}),Ml({accounts:wl(Sl()),data:Sl(),programId:Sl()})]),e=>pl(e,"accounts"in e?Sd:Cd)),Md=Ml({signatures:wl(Sl()),message:Ml({accountKeys:wl(xd),instructions:wl(Td),recentBlockhash:Sl(),addressTableLookups:El(kl(wl(Ad)))})}),Id=Ml({accountIndex:xl(),mint:Sl(),owner:El(Sl()),programId:El(Sl()),uiTokenAmount:ld}),Bd=Ml({writable:wl(Jf),readonly:wl(Jf)}),Nd=Ml({err:od,fee:xl(),innerInstructions:El(kl(wl(Ml({index:xl(),instructions:wl(Ml({accounts:wl(xl()),data:Sl(),programIdIndex:xl()}))})))),preBalances:wl(xl()),postBalances:wl(xl()),logMessages:El(kl(wl(Sl()))),preTokenBalances:El(kl(wl(Id))),postTokenBalances:El(kl(wl(Id))),loadedAddresses:El(Bd),computeUnitsConsumed:El(xl()),costUnits:El(xl())}),Rd=Ml({err:od,fee:xl(),innerInstructions:El(kl(wl(Ml({index:xl(),instructions:wl(Td)})))),preBalances:wl(xl()),postBalances:wl(xl()),logMessages:El(kl(wl(Sl()))),preTokenBalances:El(kl(wl(Id))),postTokenBalances:El(kl(wl(Id))),loadedAddresses:El(Bd),computeUnitsConsumed:El(xl()),costUnits:El(xl())}),Ld=Il([Al(0),Al("legacy")]),Dd=Ml({pubkey:Sl(),lamports:xl(),postBalance:kl(xl()),rewardType:kl(Sl()),commission:El(kl(xl()))});Qf(kl(Ml({blockhash:Sl(),previousBlockhash:Sl(),parentSlot:xl(),transactions:wl(Ml({transaction:kd,meta:kl(Nd),version:El(Ld)})),rewards:El(wl(Dd)),blockTime:kl(xl()),blockHeight:kl(xl())}))),Qf(kl(Ml({blockhash:Sl(),previousBlockhash:Sl(),parentSlot:xl(),rewards:El(wl(Dd)),blockTime:kl(xl()),blockHeight:kl(xl())}))),Qf(kl(Ml({blockhash:Sl(),previousBlockhash:Sl(),parentSlot:xl(),transactions:wl(Ml({transaction:Ed,meta:kl(Nd),version:El(Ld)})),rewards:El(wl(Dd)),blockTime:kl(xl()),blockHeight:kl(xl())}))),Qf(kl(Ml({blockhash:Sl(),previousBlockhash:Sl(),parentSlot:xl(),transactions:wl(Ml({transaction:Md,meta:kl(Rd),version:El(Ld)})),rewards:El(wl(Dd)),blockTime:kl(xl()),blockHeight:kl(xl())}))),Qf(kl(Ml({blockhash:Sl(),previousBlockhash:Sl(),parentSlot:xl(),transactions:wl(Ml({transaction:Ed,meta:kl(Rd),version:El(Ld)})),rewards:El(wl(Dd)),blockTime:kl(xl()),blockHeight:kl(xl())}))),Qf(kl(Ml({blockhash:Sl(),previousBlockhash:Sl(),parentSlot:xl(),rewards:El(wl(Dd)),blockTime:kl(xl()),blockHeight:kl(xl())}))),Qf(kl(Ml({blockhash:Sl(),previousBlockhash:Sl(),parentSlot:xl(),transactions:wl(Ml({transaction:kd,meta:kl(Nd)})),rewards:El(wl(Dd)),blockTime:kl(xl())}))),Qf(kl(Ml({blockhash:Sl(),previousBlockhash:Sl(),parentSlot:xl(),signatures:wl(Sl()),blockTime:kl(xl())}))),Qf(kl(Ml({slot:xl(),meta:kl(Nd),blockTime:El(kl(xl())),transaction:kd,version:El(Ld)}))),Qf(kl(Ml({slot:xl(),transaction:Md,meta:kl(Rd),blockTime:El(kl(xl())),version:El(Ld)}))),Zf(Ml({blockhash:Sl(),lastValidBlockHeight:xl()})),Zf(yl());Qf(wl(Ml({slot:xl(),numTransactions:xl(),numSlots:xl(),samplePeriodSecs:xl()}))),Zf(kl(Ml({feeCalculator:Ml({lamportsPerSignature:xl()})}))),Qf(Sl()),Qf(Sl());const Fd=Ml({err:od,logs:wl(Sl()),signature:Sl()});var Od;Ml({result:$f(Fd),subscription:xl()}),Object.freeze({CreateLookupTable:{index:0,layout:Oo.struct([Oo.u32("instruction"),Gf("recentSlot"),Oo.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:Oo.struct([Oo.u32("instruction")])},ExtendLookupTable:{index:2,layout:Oo.struct([Oo.u32("instruction"),Gf(),Oo.seq(zf(),Oo.offset(Oo.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:Oo.struct([Oo.u32("instruction")])},CloseLookupTable:{index:4,layout:Oo.struct([Oo.u32("instruction")])}}),new Hf("AddressLookupTab1e1111111111111111111111111"),Object.freeze({RequestUnits:{index:0,layout:Oo.struct([Oo.u8("instruction"),Oo.u32("units"),Oo.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:Oo.struct([Oo.u8("instruction"),Oo.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:Oo.struct([Oo.u8("instruction"),Oo.u32("units")])},SetComputeUnitPrice:{index:3,layout:Oo.struct([Oo.u8("instruction"),Gf("microLamports")])}}),new Hf("ComputeBudget111111111111111111111111111111"),Oo.struct([Oo.u8("numSignatures"),Oo.u8("padding"),Oo.u16("signatureOffset"),Oo.u16("signatureInstructionIndex"),Oo.u16("publicKeyOffset"),Oo.u16("publicKeyInstructionIndex"),Oo.u16("messageDataOffset"),Oo.u16("messageDataSize"),Oo.u16("messageInstructionIndex")]),new Hf("Ed25519SigVerify111111111111111111111111111"),Df.utils.isValidPrivateKey,Oo.struct([Oo.u8("numSignatures"),Oo.u16("signatureOffset"),Oo.u8("signatureInstructionIndex"),Oo.u16("ethAddressOffset"),Oo.u8("ethAddressInstructionIndex"),Oo.u16("messageDataOffset"),Oo.u16("messageDataSize"),Oo.u8("messageInstructionIndex"),Oo.blob(20,"ethAddress"),Oo.blob(64,"signature"),Oo.u8("recoveryId")]),new Hf("KeccakSecp256k11111111111111111111111111111"),new Hf("StakeConfig11111111111111111111111111111111");class Pd{constructor(e,t,n){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=t,this.custodian=n}}Od=Pd,Pd.default=new Od(0,0,Hf.default),Object.freeze({Initialize:{index:0,layout:Oo.struct([Oo.u32("instruction"),((e="authorized")=>Oo.struct([zf("staker"),zf("withdrawer")],e))(),((e="lockup")=>Oo.struct([Oo.ns64("unixTimestamp"),Oo.ns64("epoch"),zf("custodian")],e))()])},Authorize:{index:1,layout:Oo.struct([Oo.u32("instruction"),zf("newAuthorized"),Oo.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:Oo.struct([Oo.u32("instruction")])},Split:{index:3,layout:Oo.struct([Oo.u32("instruction"),Oo.ns64("lamports")])},Withdraw:{index:4,layout:Oo.struct([Oo.u32("instruction"),Oo.ns64("lamports")])},Deactivate:{index:5,layout:Oo.struct([Oo.u32("instruction")])},Merge:{index:7,layout:Oo.struct([Oo.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:Oo.struct([Oo.u32("instruction"),zf("newAuthorized"),Oo.u32("stakeAuthorizationType"),Vf("authoritySeed"),zf("authorityOwner")])}}),new Hf("Stake11111111111111111111111111111111111111"),Object.freeze({InitializeAccount:{index:0,layout:Oo.struct([Oo.u32("instruction"),((e="voteInit")=>Oo.struct([zf("nodePubkey"),zf("authorizedVoter"),zf("authorizedWithdrawer"),Oo.u8("commission")],e))()])},Authorize:{index:1,layout:Oo.struct([Oo.u32("instruction"),zf("newAuthorized"),Oo.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:Oo.struct([Oo.u32("instruction"),Oo.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:Oo.struct([Oo.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:Oo.struct([Oo.u32("instruction"),((e="voteAuthorizeWithSeedArgs")=>Oo.struct([Oo.u32("voteAuthorizationType"),zf("currentAuthorityDerivedKeyOwnerPubkey"),Vf("currentAuthorityDerivedKeySeed"),zf("newAuthorized")],e))()])}}),new Hf("Vote111111111111111111111111111111111111111"),new Hf("Va1idator1nfo111111111111111111111111111111"),Ml({name:Sl(),website:El(Sl()),details:El(Sl()),iconUrl:El(Sl()),keybaseUsername:El(Sl())}),new Hf("Vote111111111111111111111111111111111111111"),Oo.struct([zf("nodePubkey"),zf("authorizedWithdrawer"),Oo.u8("commission"),Oo.nu64(),Oo.seq(Oo.struct([Oo.nu64("slot"),Oo.u32("confirmationCount")]),Oo.offset(Oo.u32(),-8),"votes"),Oo.u8("rootSlotValid"),Oo.nu64("rootSlot"),Oo.nu64(),Oo.seq(Oo.struct([Oo.nu64("epoch"),zf("authorizedVoter")]),Oo.offset(Oo.u32(),-8),"authorizedVoters"),Oo.struct([Oo.seq(Oo.struct([zf("authorizedPubkey"),Oo.nu64("epochOfLastAuthorizedSwitch"),Oo.nu64("targetEpoch")]),32,"buf"),Oo.nu64("idx"),Oo.u8("isEmpty")],"priorVoters"),Oo.nu64(),Oo.seq(Oo.struct([Oo.nu64("epoch"),Oo.nu64("credits"),Oo.nu64("prevCredits")]),Oo.offset(Oo.u32(),-8),"epochCredits"),Oo.struct([Oo.nu64("slot"),Oo.nu64("timestamp")],"lastTimestamp")]);const Ud={blockTime:2e3,contracts:{gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},formatters:{block:/* @__PURE__ */Pn({format(e){const t=e.transactions?.map(e=>{if("string"==typeof e)return e;const t=Dn(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?te(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t});return{transactions:t,stateRoot:e.stateRoot}}}),transaction:/* @__PURE__ */Fn({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?te(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:/* @__PURE__ */br({format:e=>({l1GasPrice:e.l1GasPrice?te(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?te(e.l1GasUsed):null,l1Fee:e.l1Fee?te(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},serializers:{transaction:function(e,t){return function(e){return"deposit"===e.type||void 0!==e.sourceHash}(e)?function(e){!function(e){const{from:t,to:n}=e;if(t&&!Lt(t))throw new Mt({address:t});if(n&&!Lt(n))throw new Mt({address:n})}(e);const{sourceHash:t,data:n,from:r,gas:i,isSystemTx:o,mint:a,to:s,value:c}=e;return Ft(["0x7e",hn([t,r,s??"0x",a?ie(a):"0x",c?ie(c):"0x",i?ie(i):"0x",o?"0x1":"0x",n??"0x"])])}(e):vr(e,t)}}},qd=/* @__PURE__ */kr({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),Hd=/* @__PURE__ */kr({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),zd=1,Vd=/* @__PURE__ */kr({...Ud,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...Ud.contracts,disputeGameFactory:{[zd]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[zd]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[zd]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[zd]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:1}),jd=/* @__PURE__ */kr({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}});async function Gd(e,t){const{account:n=e.account}=t;if(!n)throw new pr;const r=Wt(n);try{const{accessList:n,blockNumber:i,blockTag:o,data:a,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:f,to:d,value:h,...p}=t,m=("bigint"==typeof i?se(i):void 0)||o;!function(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:r,to:i}=e,o=t?Wt(t):void 0;if(o&&!Lt(o.address))throw new Mt({address:o.address});if(i&&!Lt(i))throw new Mt({address:i});if(n&&n>Rn)throw new bn({maxFeePerGas:n});if(r&&n&&r>n)throw new Sn({maxFeePerGas:n,maxPriorityFeePerGas:r})}(t);const g=e.chain?.formatters?.transactionRequest?.format,b=(g||Nn)({...Mn(p,{format:g}),account:r,accessList:n,data:a,gas:s,gasPrice:c,maxFeePerGas:u,maxPriorityFeePerGas:l,nonce:f,to:d,value:h},"estimateGas"),{baseFeePerGas:w,gasLimit:y,priorityFeePerGas:v}=await e.request({method:"linea_estimateGas",params:m?[b,m]:[b]});return{baseFeePerGas:BigInt(w),gasLimit:BigInt(y),priorityFeePerGas:BigInt(v)}}catch(i){throw hr(i,{...t,account:r,chain:e.chain})}}async function Jd({client:e,multiply:t,request:n,type:r}){try{const i=await Gd(e,{...n,account:n?.account}),{priorityFeePerGas:o}=i,a=t(BigInt(i.baseFeePerGas))+o;return"legacy"===r?{gasPrice:a}:{maxFeePerGas:a,maxPriorityFeePerGas:o}}catch{return null}}const Wd=/* @__PURE__ */kr({...{fees:{estimateFeesPerGas:Jd,async maxPriorityFeePerGas({block:e,client:t,request:n}){const r=await Jd({block:e,client:t,multiply:e=>e,request:n,type:"eip1559"});return r?.maxPriorityFeePerGas?r.maxPriorityFeePerGas:null}}},id:59144,name:"Linea Mainnet",blockTime:2e3,nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build",apiUrl:"https://api.lineascan.build/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42},ensRegistry:{address:"0x50130b669B28C339991d8676FA73CF122a121267",blockCreated:6682888},ensUniversalResolver:{address:"0x4D41762915F83c76EcaF6776d9b08076aA32b492",blockCreated:22222151}},ensTlds:[".linea.eth"],testnet:!1}),Kd=/* @__PURE__ */kr({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Yd=1,Xd=/* @__PURE__ */kr({...Ud,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...Ud.contracts,disputeGameFactory:{[Yd]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[Yd]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[Yd]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[Yd]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:1}),Qd=/* @__PURE__ */kr({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon.drpc.org"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),Zd=1,$d=/* @__PURE__ */kr({...Ud,id:130,name:"Unichain",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:1e3,rpcUrls:{default:{http:["https://mainnet.unichain.org/"]}},blockExplorers:{default:{name:"Uniscan",url:"https://uniscan.xyz",apiUrl:"https://api.uniscan.xyz/api"}},contracts:{...Ud.contracts,multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:0},disputeGameFactory:{[Zd]:{address:"0x2F12d621a16e2d3285929C9996f478508951dFe4"}},portal:{[Zd]:{address:"0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2"}},l1StandardBridge:{[Zd]:{address:"0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA"}}},sourceId:1}),_d={1:{...Kd,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAABoCAYAAAAdHLWhAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAJalJREFUeAHVfQl4HNWZ4F/V96Vu3ZItS7IlMLLNEWTAGAwGAjmGhJ1JyHwQIGQ3B2ENhOwm2Xgg6xwfJGQIuwMTNiwTjswZhhyETABD4jiEK8YH2JIPWdjWZVmybqmvqnrz/+9Vtaqrq7pbp81vl6r61Tv///3H+99REry/QTLdmSXc+M3gfQwSnP5AdZTufrwrFpHClwOTGyUJGpmmNYDGGpnEYvg+yhjemaankEGSpBHG1FFZ8hyRXS7QNPUdSfZ0qqmJd4bV4T1/v6llSM//tCbg6UggXqf/9aPjy72uwHVMhvOYplyuqUqDpqVBVdOIUgaaquavPYOs90gwkF0ekGU3vyTJddTl8e5mavo5Na3tvm9T5S5TytMGThcCcS6559HBjZLbcx1TlOtUTWlQlAQgApFR7HEmyy5MiP9kmSiA/2UdvZpIQ89MJe5xxLrb7cXLD5LbfdTl8mzT0qmnv/ulim08k9MAT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fuvVPIDbxJvQ7GQCLwjE5dYRTCPTNNv2zYO6KigovynUfKl4fhnubLrpvTTi6ck0gtvwqWXK1ICaX8CVf1PtpRdgMFzcIn53MlxXT9klM36uqibdSiaH2gSO/fqljx4NHMFo6EokkfD5fanBwkIhi7BVdNI7JqTecHiDpFycWXSUlJV5VVb04tiAl5Kmov6Z0WcsNq/yR5S0eT3gpWlQt4gO87qWI8QgawJFpPNLKGW1cYto4HbOGYrMXuRE5ZLxbSQ93d7f95M2+w7+hww/SNhcRhU+pwCngGCucLgSyAre5W1tb5d7eXk86nXZhj3Zj73ahV8JNx0jje5ff75dxnsUgroQ9XzKO18Rnhs+GvtDQMNFwzKJiHsr4+LhQRvpQALIJcsqJ8n4DiT6lrH/zmrjLMDAC1dXV5DcKo3iM4EieTqktsdzphIygflEa4ka3npcYeJ3mcNpXMA9IDmFOHPC+5Iz/BElwM6GmmQapAAAAAElFTkSuQmCC",chainId:1,chainType:"ether",chainTypeMoralis:"eth",customName:"Ethereum",isSupported:!0},10:{...Xd,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACW5JREFUeAHtnT1sHEUUx9+eD0QF14PwpoQCGwkJqtiRgAYJg5KGgo8EiVT5IIgyiYNLiIiTCqR8GAqaRMSR0gRQLqEhAil3KZKCImsJKhonFSI+L+8/u+es77w7b3dn9tb2/KSzz3t7vr357/uYN7OzHtWckPwWjdE0PxmnBu3gTeP88PnvFv9ukad+J9+wzD+XeXsQb+nSKt3n93ZphTq8eZlqjEc1I3zK9+k/mmERJrkhp/kIfTJJyEJ51OHflyGS9yjoUI2ohSBh05/mX+9wI80YF0D74cqS2vy5C95K0KYRMzJBlCtq0iGCEMTWUAcicWapRzfYtQU0AioXJHzCn+Qv/hE/Phzy/3UipAssz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7GR5TX6EL5KiGHp0Y3DQkCCuGfLhNDrtsYB3ALc80KvIszxTvaLE4tc1JsQ6QtcRfK7YStwCmSTS3tUidKKcyrtXhoOMozWzWUrH6dXub/nVyK5Oaou2tBLuydtBPJV2hveQ6i+UJ1dpYe3W7aQVR5uVcV3kasptSiiZbe6sBSiou6yrOPI93iK7lEy/IFGddiCf21kXZigxUc3WIL0dQWdcKvWtkZHG7EKe4ed5S7JZH0VJOrn+SBYJ4z/Itj4D6AE+p7jKvNCIxCt3TsPht86Ib1SOmOEtJ8liM6m6bt/bZTpT1lBQDuFuvmsLQrVdLX/SpDgCZxPbOvjqmbk5s5CpcHEica2/HzuN8fFu8gAxgfKXesOEfZpmxQvbWjiuIFyiHCHvgUqwsnRz3VbC8wTRtTdooFJqyiiRW17KObyp2fMsEfEtWkcT64uJxFjbLn/QhbW4QK2alt1AtSmWrvW9iYay5p42oTJA+m0KYUN0PfYEfF4reqL4olQvSJxZmmuoVY9D4i5hSa9s1pTEyQZKo+2dE92OaqlycaCULTDK/zOPdbRoxtRAkiaqPrfIgmEcz3FiTxgWCAA2OCz22hidpEXckoBpRO0EGiUcqIdIEFhqm/rK20eKdraE1I6PVjZbjRXUCfizxe++rJUR61B6VK5LyPxFwTRTwwp+SAAAAAElFTkSuQmCC",chainId:10,chainType:"optimism",chainTypeMoralis:"optimism",customName:"Optimism",isSupported:!0},56:{...jd,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAACcRJREFUeAHlnU2IHMcVgF9V9+iPWTMbSJyIEGmTgwOJtR3QIZegWYgVmUBWOoQEQmIZcsjNziEHX6KNIaccvL75EIh0yCEnaQOJ7ZVhxxfjg8GzBoNtsLW66GBjdrVrS5Zmusr1eqbGPbszPdX1273+YFczy/z09KdXr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!0},137:{...Qd,rpcUrls:{default:{http:["https://polygon-bor-rpc.publicnode.com"]}},logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAC61JREFUeAHtnU9sFNcdx39vdmNMbbATQHZSEOtQieYSO5dYzQHbBzDqAcyhOSUBDimRooSkVLkFL84tbRRHUaqklVpIeuLCn14wqMKOVCoiVVmnJypRrwVN7DYpCzHJ2njn5X3f7phde3bnzcyb2Z1hP9LKa7PGu/N97/f3zXuMGpz03q9SZN7rS7DkdpMKPYwS2znxFCPqJC4eTDzK4ZQTP8txYtniDwrTBiVmCqwwTfnlTHqyJ0cNDKMGAwIkON/PiQaJ88E1F9w/WfGxM4yzswWDptIXHs1SA9EQgqT33hhknEYYGfvFtykKlywn8xw32cn0pa0ZqjN1EyQ9ONNptLQeJWYeovBFqEaWcSNdz5kTuiByNpjsECO2PwBzpJOTJjNOhC1MaIKkd9/sY4bxLiPhF6JFqMIELog0TevWjYrw5zWKNqEIE6ggbw3PHeW8kG5w0+QG6WPevPjoKQqIQARB6Mo4/1MEzZMSIseZ5IwdDmK2GKQZzArDND+PqxgAn83g5udv7fnqIGlG2wyJka9wCRs/PvHY66QJLYIUTZR5RvxnffQAIqoKGc6MAzpMmG9BEM4aBjtDjZPc1YusiMKG/Iriy4dIMRi7TE0xQEr4lcu4JuQDzzNkRYz4hLS6yJkmH/JaF/MkSFMMRzyL4loQOHCEtU0xHMkJn/KUW5/iyodIMYSdbIqhRKf0KWiwuUBZEJlnQIymA3eDTAfc/IKyIMWkrymGW5CbjQ1/+a6L1zsji4RUGKcmnmHMOPTmBeeipKMgYTjx7U+2iMc6+Xz2i0XxWKIYouTkk+RAkE68a8dDNHxk44oYRTbQtSt5mvjoNt2eL1CM6EQFXHwdqvWimjMkKFPV2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zYtp7CBfvpqwGxWYkDGE88FJPMjaQOoxN3PMI6yGhBqJzCEzjAU4XPzHFcFHN/XDHM8XlZpneUkzalZRfFsRjROOsg4wUx90nG/uK0lFUUxsJ73zssF8t5xw2lYifX7V1Tx3DYT6pMBTG5FOQ0w5+DpcPgxky2yamkJsA7cV2E9+Bp/kVeHWbQ5rDd8XaLTprB0mRBjHk5c12E5r/51AwfM+rnkRpaxfw3XjompGpKOdllJaypPf3TD+EYui5uoHFWrNgSxgrGOC85AhyxHgapGhmkF4QFBgIcw1MnNgrDEuQr97ONL16FMER4EaTem5teEJJRRzYWs9lo+stSZ4xIGrkI03Ym4bmhC8mo5RGhpbBcBa2GmzRtLSfpRXXyppslk01SRgYtjxJy6tDGLccUhpvz5+8AH942Gyx7SbYCnL/rJq6d55JdmWFTsIS6h+E4cmibl1CLMkiOjSUT6tarCU5ar8o3ffIAeCCCvK7Sw+QQR82J3ezC5YFwrO1oyb5U8DsrN2IQucsaxLT04e3/qscVsxqeovPaNLgXhJiWF89crhIXCq7acqHQkVX04keQBDYVM9bSQDXwYhW9+BWEGGtpuWgSkysmVrTStlC1xb8gCWUVxqN7GkV2giSUQxiTMKjiZARRvvO0ZC9IgplQNlGkGMP5BPObmVLr2TWNIz9BemH/DLbLMB0aGsiWKN4bw+0YPVnoeVEMQXox62O8CcZ69KKuDWOIwA0y3Fd5oYXIKDakpXiCDGJKoS/iPSzEDbSSsrameOcchiegHZgY0ImLIrB0CBudXcQlRNp5uaK0/A/QqtacrEVArQAAAABJRU5ErkJggg==",chainId:8453,chainType:"base",chainTypeMoralis:"base",isSupported:!0},42161:{...qd,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAEuFJREFUeAHlXQ1sFOeZfmd2ba+NbWwwBv8Qb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XhDqByZ4VIBzsunDqiGpnUs3F6atqGjDrcYMFQDIkYtSAxGCbWGz1qgR0YSd//SZbR45ZNlqGErDvFWbZduqEAjznO47UxRqgo5EyFXjRYWkjZSQG+2wl0pdRDeiSULDV+l0h0D1lnWmxtpEygaEgL6xTc1WhYwENoMDPu2+ZjyPW9X3HKxKLc1g1FvIXKobJ2KdKOqnL5qSDIGo3OsDxb9LkTs0qMI/I+uB1phVWP5mHuqrvUCHXvI9Vdz+NVTXbmunXGk4Y40Gi+oI6cZy6J7We7yxPovWnRLLs+EBeOt/xtq7WV7oJmYq62u16sjOS4Vtcy/r8qkEiZn6Wg/VXwUkjtAo1i0BIRNj1rCqMqi50vF2ud3ycD3SpL3MQvh2X74JN0KMvemCLTkRAK8RVgoFHHlkv8krQcmNqYE/WoVMDZucTmtAp4pGYUQ8FQ+glxn6dkIGSIRKbHgomIdmPzcNuoNjYXyiYds9IAn/3JovYMLFLyjMNEyADMeMfLInAMBl/kvTcQtmBJEYGwoRHr9ov9KkIIwKuhIQXfeIB4IEQi+4PngmgKWq3GWQgzGu0CPYmj6kD8tJI5ther87H4mnB1AfcD16/1EbLLHdphbjWyI0SMwpUL7AcQpO+vUNer2nRg6kWImFqxhGfXeWGLyY8dMbvWTNcVCQsIUTCitqv7KJFye9/YQR/0ir2Xeg40gwWwVSXFYnb1/q75y5c0soRPp+zqQZmHahWZI1t7z/5rgcshKUWIgcLj0XHXkrMMzCzYJl7UoJthEiYEcRggseRAyDCq4kkeUZgOyESkBgeeHeKaQytt3CtI66RZrPC2HiRNELkWFW7zU1Esgs4stlucnChEp3GauU5voWtAEgyUoIQObA+RkONKl7kGwknVplNEBIgAueh39sd5Jyt8Tx83g6kHCGRKHO787InsquoX18rgljOT7W1xeadrF9kZGGT+n/scDTZVIfzipx4lbrGAeoarw5njXiS5Yr04s84I4HsxczfIwAAAABJRU5ErkJggg==",chainId:42161,chainType:"arbitrum",chainTypeMoralis:"arbitrum",customName:"Arbitrum",isSupported:!0},43114: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SuQmCC",chainId:43114,chainType:"avax",chainTypeMoralis:"avalanche",isSupported:!0},59144:{...Wd,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGEAAABkCAYAAACWy14QAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAABydJREFUeAHtnT1MHEcUxx8HEuAGYxdOY+fcpbBl6CJR+NI5FAR3oQJ6irhBiiiAKoEmRkIKXQgN7gwUyB1HgZLOh0SND2iSgs+GS3GQ/3+ZPR3H3bIfsx+3Nz9p2b1jl4/5z7z3Zm7mTZsklIcAp2x7e3vf9fV1H657cPD8sOqo5owH7i3y3NbWdoDzl6urq12cC2dAEkqbJAQWOgo8h0LM4eVruSlwnRR4QJx8uVzehiZFSQixisCCz2Qyoyj4YRROTiIEvzOP372cBEFiEQFln0OhT+OwzUus2IIcHx//KTEQqQiPHz8eg40ejbrWe6CIv20majEiEYGFj9o2jcusNAeRihGqCFVmJyfNSSRihCKCcris+T9JCkArXsPxLiwH3i6aYe2HAH/hMicpAa3hGxxj3d3d/11eXv4tmtEmAmv/gwcPfsEfu4SXXZI++D+9gRDZzs7O3VKppK3zp8UcofyzqP0fRX8HK6kUEeV9p8s8ZSQgEKAPAmxJ6whAWOk+I+obFg0EMkcQYBR/zAdcfiWtB83TjzBPAj+xLQHwLYISYFnSaf+9kAsqhC8RqgQw3BBICM8i0A4iAvoghlp8C+FJBDphCMAoqNVNUCNyCF+LCF93vTzkOkRVYSijoKwYnDhT4WvB7QOuQ1QjgGs4ZPORldbtA65EePTo0W9iBPBCFmb7D7c33+sTOAyN069i8AREyMJRn7sZa3L0CcYPBIb+of++4Q1HcwQBZsQIEISHbsxSQ3OkwtHfxRAIN2apoTmCM/4iphXogmbpeaO5T3XNkXLGWUkhIyMjsrGxIfv7+4KPLa0zX/P9Z8+eSUgwbG34KWPdlpDGVvDy5UtZWVlxLOjDw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Bk3TKrPe9HZXwsur3f9axs/lD6B+OonYEA4143wfO0pw78wz9dXV3/ojWkMj+SBmbhB96LRzzvLgUhCp2dnQdGiDvMnpyczIgPfO2zZoS4g28BiO8dB5UQnEH2BmK08pZfgQQggdO72HuvtVrUxABFbZS9LAHRthVwK4Wvqh/w1steak5oWTjIkAxRwXNcLkjKUVvF9+sSgGjdHv7y8vITHTYu+9KWuITmB//Tz6hs7+APS6IRrSIQOmz0JTiRjONNqcivx3EgHN9DgE8SAqHmXWt2p61sP53vmoRIJMnvIMYYhJhuFjGU6VnAEMT7RjtC6STSDIRJFyPqwreJJQ0kM6arXUsSsWmGsvmzdhb3qIk1F6favSSH2jca9cwOFjx+53bUtb4eiUmIqnJ2s4UMo4BeVSf01kQRh1Xw5XJ5Le6CryaxWWmrEqm/gjDPmURXbjYUzTo9pz7vKOK+A9RyblfG8a1Ckgq9lv8B/ms5OCQW+c4AAAAASUVORK5CYII=",chainId:59144,chainType:"linea",chainTypeMoralis:"linea",customName:"Linea",isSupported:!0},130:{...$d,logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABkCAYAAAB5CTUuAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAAN7ZJREFUeAHNfQe8ZVV577fW3vu0e+/0gkMdZACpCoggPiwYDIoJ8YklFoyJkmjy8uRn1GeIEFNMNNEkahJLxIhR84gxGiERCCIi8PBHCyLSuzMw/bbT9l7rfXXtfYcBhibu+Z255+yzy1pf/X9l7ePg52x7CbykU7Zn1+xZTaz+cP6W/fYrDjiw72b3ilAujw52d+BWQfStGOJi380yiABxGABcmHYQH4rgZnHPZnBwby8svu3q8trb/7D82r2j8Xh9CVM/vRQuLeHnaHPwzG/uXROnrl5cxXVvb5146Mqw+tC5TnlABrBPd5gtbvtOEVz0AMHHGHPwkLmApI6Zcx3naAJhwAyg/yr6hnbh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HM9s1VKgh+bvBXCen4jdzSQs7dfPIbVjIv8MBiKqrIB8cqnIb5/x5XDox7ciurzunNF/XL4hrv/+5cONd1wKl5bwDGzPGAOaG/1s7mGwZPffzk9du4dbfsiWYvjcdsz33aNYsbJXdLtYB+jgSNtorilUoh/UbUXCox0veH4UIqYMKGzGgDqO8PshpubHiN2H24fb5+6vtjyIKOmO5ePeTbfGe274RHn+HSOYWP9MEb25/VwwYMftBbDfosWwdPGHDnvX7geu2H/dtmJuHchvpC5Dek9hjXkVeu4J1BVJZaDdwr9Yna+GWBLdgJ77p3mWbVpdLb77e3dfcfOZt/3dfYshm74UfjwLP2fb/wd5ICT31PZzFAAAAABJRU5ErkJggg==",chainId:130,chainType:"unichain",chainTypeMoralis:"unichain",isSupported:!1},7565164:{id:7565164,name:"Solana",nativeCurrency:{decimals:18,name:"Solana",symbol:"SOL"},rpcUrls:{default:{http:[""]}},logo:"https://ipfs.pantograph.app/ipfs/QmZhKcFZVvw5r3cGLfSLsLcd1GzbQK5Vf7aoVYvgktzUUA?filename=Solana_logo.png",chainId:7565164,isSupported:!1}},eh={"keyring-chatbot-agent-sdk-test":{name:"keyring-chatbot-agent-sdk-test",modal:{title:"Keyring Agent",icon:"https://nft.keyring.app/favicon.ico"},agentConfig:{storageKey:"keyring-chatbot-agent-sdk-test-history",persistHistory:!1,debug:!0,generateSuggestions:!1,subgraph:{theGraphApiKey:"4c67ac7a75b21befbd28dc9120c709f1",coinPoolBaseUrl:"https://api.coinpool.app",keyringPoolBaseUrl:"https://pool-data.keyring.app",linkAddLiquidity:"https://coinpool.app/pair/create"},subagents:{"pool-subgraph":!0,"wallet-action":!0,pool:!1}}},"keyring-chatbot-coinpool-test":{name:"keyring-chatbot-coinpool-test",modal:{title:"Keyring CoinPool Agent",icon:"https://coinpool.app/favicon.ico"},agentConfig:{storageKey:"keyring-chatbot-coinpool-test-history",persistHistory:!1,debug:!0,generateSuggestions:!1,nftLink:"https://nft.keyring.app",subgraph:{theGraphApiKey:"4c67ac7a75b21befbd28dc9120c709f1",coinPoolBaseUrl:"https://api.coinpool.app",keyringPoolBaseUrl:"https://pool-data.keyring.app",linkAddLiquidity:"https://coinpool.app/pair/create"},subagents:{"pool-subgraph":!0,"wallet-action":!0,pool:!1},vectorKB:{enabled:!0,minScore:1,token:"ABYFMGZyZXNoLXNhbG1vbi04NDEzNS11czFhZG1pbk1qTXpaVEV5WVdJdE1UQmpaaTAwWTJabUxUbG1PRFl0TkdabE0yVXlaREkyTVRkag==",url:"https://fresh-salmon-84135-us1-vector.upstash.io"}}},"keyring-chatbot-coinpool":{name:"keyring-chatbot-coinpool",modal:{title:"Keyring CoinPool Agent",icon:"https://coinpool.app/favicon.ico"},agentConfig:{storageKey:"keyring-chatbot-coinpool-history",persistHistory:!1,debug:!0,generateSuggestions:!1,nftLink:"https://nft.keyring.app",subgraph:{theGraphApiKey:"4c67ac7a75b21befbd28dc9120c709f1",coinPoolBaseUrl:"https://api.coinpool.app",keyringPoolBaseUrl:"https://pool-data.keyring.app",linkAddLiquidity:"https://coinpool.app/pair/create"},subagents:{"pool-subgraph":!0,"wallet-action":!0,pool:!1},vectorKB:{enabled:!0,minScore:1,token:"ABYFMGZyZXNoLXNhbG1vbi04NDEzNS11czFhZG1pbk1qTXpaVEV5WVdJdE1UQmpaaTAwWTJabUxUbG1PRFl0TkdabE0yVXlaREkyTVRkag==",url:"https://fresh-salmon-84135-us1-vector.upstash.io"}}},"keyring-chatbot-agent":{name:"keyring-chatbot-agent",modal:{title:"Keyring Agent",icon:"https://nft.keyring.app/favicon.ico"},agentConfig:{storageKey:"keyring-chatbot-agent-history",persistHistory:!1,debug:!0,generateSuggestions:!1,subgraph:{theGraphApiKey:"4c67ac7a75b21befbd28dc9120c709f1",coinPoolBaseUrl:"https://api.coinpool.app",keyringPoolBaseUrl:"https://pool-data.keyring.app",linkAddLiquidity:"https://coinpool.app/pair/create"},subagents:{"pool-subgraph":!0,"wallet-action":!0,pool:!1}}}},th=["https://nft-demo.keyring.app","https://nft.keyring.app","https://coinpool.app","https://coinpool-op.bacoor-test001.xyz","https://dev2-coinpool-op.bacoor-test001.xyz","https://rwa.bacoor-test001.xyz","https://test.coinpool.app","https://test.smart-vault.tech","https://smart-vault.tech"],nh={en:"en-US",ja:"ja-JP",cn:"zh-CN"},rh=(e,t="en")=>{const n=/* @__PURE__ */new Date,r=new Date(n);r.setDate(r.getDate()-1);const i=new Date(e);return i.setHours(0,0,0,0),n.setHours(0,0,0,0),r.setHours(0,0,0,0),i.getTime()===n.getTime()?y("today",t):i.getTime()===r.getTime()?y("yesterday",t):i.toLocaleDateString(nh[t],{month:"short",day:"numeric",year:i.getFullYear()!==n.getFullYear()?"numeric":void 0})},ih=e=>new Promise(t=>setTimeout(t,e||0)),oh=(e,t=5,n=5)=>{const r=e||"";return r.length<=t+n?r:`${r.substring(0,t)}...${r.substring(r.length-n)}`},ah=e=>e?_d[e]?.chainTypeMoralis??"":"",sh=e=>e?_d[e]?.chainType??"":"";function ch(e){if(Lt(e))return!0;try{return new Hf(e),!0}catch{return!1}}function uh(){return eh["keyring-chatbot-agent-sdk-test"]}const lh={send_native:{label:"actionSendNativeLabel",description:"actionSendNativeDesc",fields:[{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_token:{label:"actionSendTokenLabel",description:"actionSendTokenDesc",fields:[{key:"contract_address",label:"fieldTokenContract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"fieldTokenSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"decimals",label:"fieldDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},swap_token:{label:"actionSwapTokenLabel",description:"actionSwapTokenDesc",fields:[{key:"token_in",label:"fieldTokenIn",type:"address",placeholder:"0x... or native",required:!0,editable:!1},{key:"token_in_symbol",label:"fieldTokenInSymbol",type:"text",placeholder:"e.g. ETH",required:!1,editable:!1},{key:"token_out",label:"fieldTokenOut",type:"address",placeholder:"0x...",required:!0,editable:!1},{key:"token_out_symbol",label:"fieldTokenOutSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"token_in_decimals",label:"fieldTokenInDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"token_out_decimals",label:"fieldTokenOutDecimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},approve_token:{label:"actionApproveTokenLabel",description:"actionApproveTokenDesc",fields:[{key:"contract_address",label:"fieldTokenContract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"fieldTokenSymbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"spender_address",label:"fieldSpenderAddress",type:"address",placeholder:"0x... spender contract",required:!0,validation:"address",editable:!1},{key:"amount",label:"fieldAmountUnlimited",type:"amount",placeholder:"0.0 or leave empty for max",required:!1,validation:"amount"},{key:"decimals",label:"fieldDecimals",type:"number",placeholder:"18",required:!1,editable:!1}]},wrap_native:{label:"actionWrapNativeLabel",description:"actionWrapNativeDesc",fields:[{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},unwrap_native:{label:"actionUnwrapNativeLabel",description:"actionUnwrapNativeDesc",fields:[{key:"amount",label:"fieldAmount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_nft:{label:"actionSendNftLabel",description:"actionSendNftDesc",fields:[{key:"contract_address",label:"fieldNftContract",type:"address",placeholder:"0x... NFT contract",required:!0,validation:"address",editable:!1},{key:"token_id",label:"fieldTokenId",type:"text",placeholder:"e.g. 1234",required:!0,editable:!1},{key:"to_address",label:"fieldToAddress",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"token_standard",label:"fieldTokenStandard",type:"text",placeholder:"ERC721 or ERC1155",required:!0,editable:!1},{key:"amount",label:"fieldAmount",type:"text",placeholder:"1",required:!0},{key:"maxAmount",label:"fieldMaxAmount",type:"text",placeholder:"",required:!1,editable:!1,hidden:!0},{key:"nft_name",label:"fieldNftName",type:"text",placeholder:"e.g. Bored Ape #1234",required:!1,editable:!1}]}};function fh(e){return Lt(e)}function dh(e){if(!e||""===e.trim())return!1;const t=parseFloat(e);return!isNaN(t)&&t>0}const hh=i(void 0),ph=()=>{const e=s(hh);if(!e)throw new Error("useConnect must be used within ConnectProvider");const t=e.account?.chainId;return{...e,chainData:void 0!==t?_d[t]:void 0,chainId:t,chainType:sh(t),chainTypeMoralis:ah(t),isChainSupported:!(void 0===t||!_d[t]?.isSupported)}},mh=({children:t,initialAccount:n})=>/* @__PURE__ */e(hh.Provider,{value:{account:n||null},children:t}),gh="chat_widget_messages",bh=200,wh="welcome-message",yh=()=>Math.random().toString(36).substring(2,12);function vh(e){return e.map(e=>({...e,timestamp:new Date(e.timestamp),...e.walletActions?{walletActions:e.walletActions.map(e=>"submitted"===e.status?{...e,status:"pending"}:e)}:{}}))}function Ah(){const e=S.getItem(gh);if(!e)return null;try{const t=JSON.parse(e);if(t&&void 0!==t.owner&&Array.isArray(t.messages))return{owner:t.owner,messages:vh(t.messages)};if(Array.isArray(t))return{owner:"",messages:vh(t)}}catch{}return null}function kh(e,t){S.setItem(gh,JSON.stringify({owner:e,messages:t}))}function xh({customWelcomeMessage:e}={}){const{account:t}=ph(),{t:n}=x(),r=(i=t?.address,s=t?.chainId,i&&s?`${i}_${s}`:"");var i,s;const u=c(()=>{return t=e||n("welcomeMessage"),[{id:wh,text:t,sender:"bot",timestamp:/* @__PURE__ */new Date}];var t},[n,e]),[f,d]=o(()=>r||"pending"),[h,p]=o(()=>function(e,t){const n=Ah();return e?n&&n.owner===e?n.messages:t:n?.messages??t}(r,u));if("pending"===f&&r){const e=Ah();e&&e.owner===r?p(e.messages):kh(r,h),d(r)}else"pending"!==f&&r&&f!==r&&(p(u),kh(r,u),d(r));l(()=>{"pending"!==f&&kh(f,h)},[h,f]),l(()=>{!function(){const e=[];for(let t=0;t<S.length;t++){const n=S.key(t);n&&n.startsWith(gh+"_")&&e.push(n)}e.forEach(e=>S.removeItem(e))}()},[]);const m=c(()=>h.map(t=>t.id===wh?{...t,text:e||n("welcomeMessage")}:t),[h,n,e]),g=a((e,t,n={})=>{const{buttons:r,walletActions:i,actionButtons:o,typeChat:a="web3"}=n,s={id:yh(),text:e,sender:t,timestamp:/* @__PURE__ */new Date,typeChat:a,...r&&{buttons:r},...i&&i.length>0&&{walletActions:i},...o&&o.length>0&&{actionButtons:o}};return p(e=>{const t=[...e,s];return t.length>bh?t.slice(t.length-bh):t}),s},[]),b=a((e,t,n)=>{p(r=>r.map(r=>{if(r.id!==e||!r.walletActions)return r;const i=r.walletActions.map((e,r)=>r===t?{...e,...n,...n.parameters&&{parameters:{...e.parameters,...n.parameters}}}:e);return{...r,walletActions:i}}))},[]);return{messages:m,addMessage:g,updateWalletAction:b,updateMessageText:a((e,t)=>{p(n=>n.map(n=>n.id===e?{...n,text:t}:n))},[]),updateMessageType:a((e,t)=>{p(n=>n.map(n=>n.id===e?{...n,typeChat:t}:n))},[]),clearMessages:a(()=>{p(u),"pending"!==f&&kh(f,u)},[f,u]),clearMessagesById:a(e=>{if(0===e.length)return;const t=new Set(e);p(e=>{const n=e.filter(e=>!t.has(e.id));return n.length>bh?n.slice(n.length-bh):n})},[]),getMessageById:a(e=>h.find(t=>t.id===e),[h])}}let Eh=null;function Ch(){Eh?.()}function Sh(e){Eh=e}const Th=i(void 0),Mh=()=>{const e=s(Th);if(!e)throw new Error("useConfig must be used within ConfigProvider");return e},Ih=({children:t,initialConfig:n})=>/* @__PURE__ */e(Th.Provider,{value:{config:n||null},children:t}),Bh={"0x1":"https://ethereum-rpc.publicnode.com","0xa":"https://mainnet.optimism.io","0x38":"https://bsc-dataseed.binance.org","0x89":'https://polygon-bor-rpc.publicnode.com"',"0x2105":"https://mainnet.base.org","0xa4b1":"https://arb1.arbitrum.io/rpc","0xa86a":"https://avalanche-c-chain-rpc.publicnode.com","0xe708":"https://rpc.linea.build"};function Nh(e){return null==e||""===e?null:"string"==typeof e?e.startsWith("0x")?e.toLowerCase():`0x${parseInt(e,10).toString(16)}`:`0x${e.toString(16)}`}function Rh(){const{account:e}=ph(),{config:t}=Mh(),n=c(()=>{const e=uh().agentConfig,n=function(e){if(!e)return;const t={};for(const[n,r]of Object.entries(e)){const e=Nh(n);e&&(t[e]=r)}return Object.keys(t).length>0?t:void 0}(t?.rpcUrls);return new d({secretKey:"i_love_bacoor",storage:S,rpcUrls:Bh,...e,llm:{model:"gemini-2.5-flash-lite",...e.llm??{}},...n?{rpcUrls:{...Bh,...e.rpcUrls??{},...n}}:{}})},[]);return l(()=>{n.setUserContext({walletAddress:e?.address??null,chain:Nh(e?.chainId)})},[n,e?.address,e?.chainId]),n}let Lh;function Dh(e){return{symbol:e.symbol,name:e.name,balance:e.balance,balanceFormatted:e.balance_formatted,usdValue:e.usd_value,usdPrice:e.usd_price,decimals:e.decimals,logo:e.logo??e.thumbnail??void 0,contractAddress:e.token_address}}async function Fh(e,t,n){try{const r=await function(){if(!Lh){const e=uh().agentConfig?.moralis;Lh=new h(e||void 0)}return Lh}().getWalletTokenBalances({address:e,chain:t,tokenAddresses:n,excludeSpam:!1,excludeUnverifiedContracts:!1});return r.success?r.data?.result??[]:[]}catch{return[]}}async function Oh(e,t){const{action:n,chainId:r,parameters:i}=t,o=t.walletAddress||e.getUserContext().walletAddress||"";try{if("send_native"===n||"wrap_native"===n){const e=await async function(e,t){const n=(await Fh(e,t)).find(e=>!0===e.native_token);return n?Dh(n):void 0}(o,r);if(e){const n=i.spendable;return{...t,tokenInfo:n?{...e,spendableFormatted:n}:e}}}else if("send_token"===n||"approve_token"===n||"unwrap_native"===n){const e=await async function(e,t,n,r){const i=await Fh(e,t,n?[n]:void 0),o=n&&i.find(e=>e.token_address.toLowerCase()===n.toLowerCase());if(o)return Dh(o);const a=r&&i.find(e=>e.symbol?.toUpperCase()===r.toUpperCase());return a?Dh(a):void 0}(o,r,i.contract_address,i.token_symbol);if(e)return{...t,tokenInfo:e}}else if("send_nft"===n&&i.contract_address&&i.token_id){let n;if(n=i.nft_image?{name:i.nft_name||`#${i.token_id}`,image:i.nft_image,tokenId:i.token_id,contractAddress:i.contract_address,tokenStandard:i.token_standard}:await async function(e,t,n,r,i,o){const a=await async function(e,t,n){try{const r=e.getToolRegistry().get(t);if(!r)return null;const i=e.getUserContext(),o=await r.execute(n,i);return o.success?o.data??null:null}catch{return null}}(e,"get-wallet-nfts",{chain:t,limit:100,exclude_spam:!1}),s=(a?.result??[]).find(e=>e.token_address.toLowerCase()===n.toLowerCase()&&e.token_id===r);if(!s){if(!i&&!o)return;return{name:i||`#${r}`,tokenId:r,contractAddress:n,tokenStandard:o}}const c=s.normalized_metadata?.image||s.media?.original_media_url||void 0;return{name:s.normalized_metadata?.name||s.name||i||`#${s.token_id}`,image:c??void 0,tokenId:s.token_id,contractAddress:s.token_address,tokenStandard:s.contract_type||o}}(e,r,i.contract_address,i.token_id,i.nft_name,i.token_standard),n){const e={...i};return e.amount||(e.amount="1"),{...t,parameters:e,nftInfo:n}}}}catch{}return t}function Ph(e){const t=e.props;return!!t&&"string"==typeof t.action&&"string"==typeof t.chainId&&"string"==typeof t.walletAddress&&!!t.parameters&&"object"==typeof t.parameters}function Uh({agent:e,addMessage:t}){const[n,r]=o(!1),[i,s]=o([]);return{send:a(async(n,i)=>{const o=n.trim();if(o){t(o,"user"),r(!0),s([]);try{const n=await e.chat(o,i?{language:i}:void 0),r=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e){if(Ph(n)){const e=n.props,r="object"==typeof e.parameters&&null!==e.parameters?e.parameters:{};t.push({component:n.component,action:String(e.action),chainId:String(e.chainId),walletAddress:String(e.walletAddress),parameters:{...r},...n.language?{language:n.language}:{},status:"pending"});continue}const e=n.props??{};t.push({component:n.component,action:"",chainId:"string"==typeof e.chainId?e.chainId:"string"==typeof e.chain?.hexId?e.chain.hexId:"",walletAddress:"string"==typeof e.walletAddress?e.walletAddress:"",parameters:{},componentProps:e,...n.language?{language:n.language}:{},status:"pending"})}return t}(n.uiActions),a=r.length>0?await function(e,t){return Promise.all(t.map(t=>Oh(e,t)))}(e,r):r,c=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e)n&&"string"==typeof n.label&&n.label.trim()&&"string"==typeof n.prompt&&n.prompt.trim()&&t.push({label:n.label,prompt:n.prompt,..."string"==typeof n.language&&n.language?{language:n.language}:{}});return t}(n.actionButtons),u=n.answer||"";t(u,"bot",{walletActions:a.length>0?a:void 0,actionButtons:c.length>0?c:void 0}),s(n.suggestedPrompts??[])}catch(a){const e=a instanceof Error?a.message:String(a);t(`${e}`,"bot")}finally{r(!1)}}},[e,t]),isTyping:n,suggestedPrompts:i,setSuggestedPrompts:s}}const qh=({address:n,chainId:r})=>{const[i,s]=o(!1),{isChainSupported:c}=ph(),{t:u}=x(),l=a(()=>{if(!n)return;const e=()=>{s(!0),setTimeout(()=>s(!1),2e3)},t=()=>{const t=document.createElement("input");t.value=n,document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove(),e()};try{navigator.clipboard.writeText(n).then(e).catch(t)}catch{t()}},[n]);if(!ch(n||""))return null;const f=void 0!==r?_d[r]:void 0;/* @__PURE__ */
4
4
  return t("div",{className:"chat-user-info",children:[
5
5
  /* @__PURE__ */t("span",{className:"user-wallet",children:[
@@ -42,7 +42,7 @@ return t("div",{className:"container-swap-token-confirm",children:[
42
42
  /* @__PURE__ */e("span",{className:"swap-token-confirm__label",children:"To:"}),
43
43
  /* @__PURE__ */t("span",{children:[k," ",v]})]}),!C&&/* @__PURE__ */e("div",{className:"swap-token-confirm__prompt",children:I}),!C&&!S&&/* @__PURE__ */t("div",{className:"action-form-actions",children:[s&&/* @__PURE__ */e("button",{type:"button",className:"message-button",onClick:s,children:c("formCancel")}),
44
44
  /* @__PURE__ */e("button",{type:"button",className:"message-button",onClick:()=>{T()},disabled:!g,children:M})]})]}),
45
- /* @__PURE__ */e(sp,{status:x,inFlight:S,chainId:n.chainId,transactionHash:n.transactionHash,successKey:"txSuccessfulSwap",language:n.language})]})}const pp={1:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",10:"0x4200000000000000000000000000000000000006",56:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",137:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",8453:"0x4200000000000000000000000000000000000006",42161:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"},mp=[{name:"transfer",type:"function",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"approve",type:"function",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],gp=[{name:"deposit",type:"function",stateMutability:"payable",inputs:[],outputs:[]},{name:"withdraw",type:"function",stateMutability:"nonpayable",inputs:[{name:"wad",type:"uint256"}],outputs:[]}],bp=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],wp=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"amount",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]}];class yp extends Error{key;vars;constructor(e,t={},n){super(n??e),this.name="TxBuildError",this.key=e,this.vars=t}}function vp(e){const{action:t,parameters:n,fromAddress:r,chainId:i}=e;switch(t){case"send_native":return function(e,t,n){const{to_address:r,amount:i}=e;if(!r)throw new yp("txErrRecipientRequired",{},"Recipient address is required");if(!i)throw new yp("txErrAmountRequired",{},"Amount is required");return{from:t,to:r,data:"0x",value:kp(i,18).toString(),chainId:n,description:`Send ${i} native token to ${r}`}}(n,r,i);case"send_token":return function(e,t,n){const{contract_address:r,to_address:i,amount:o,decimals:a,token_symbol:s}=e;if(!r)throw new yp("txErrTokenContractRequired",{},"Token contract address is required");if(!i)throw new yp("txErrRecipientRequired",{},"Recipient address is required");if(!o)throw new yp("txErrAmountRequired",{},"Amount is required");const c=parseInt(a)||18,u=Xt({abi:mp,functionName:"transfer",args:[i,kp(o,c)]});return{from:t,to:r,data:u,value:"0",chainId:n,description:`Send ${o} ${s||"tokens"} to ${i}`}}(n,r,i);case"approve_token":return function(e,t,n){const{contract_address:r,spender_address:i,amount:o,decimals:a,token_symbol:s}=e;if(!r)throw new yp("txErrTokenContractRequired",{},"Token contract address is required");if(!i)throw new yp("txErrSpenderRequired",{},"Spender address is required");const c=parseInt(a)||18,u=o&&""!==o.trim()?kp(o,c):Rn,l=Xt({abi:mp,functionName:"approve",args:[i,u]});return{from:t,to:r,data:l,value:"0",chainId:n,description:`Approve ${o||"unlimited"} ${s||"tokens"} for ${i}`}}(n,r,i);case"wrap_native":return function(e,t,n){const{amount:r}=e;if(!r)throw new yp("txErrAmountRequired",{},"Amount is required");const i=pp[n];if(!i)throw new yp("txErrWrapUnsupported",{chainId:String(n)},`Wrapped native not supported on chain ${n}`);const o=Xt({abi:gp,functionName:"deposit"});return{from:t,to:i,data:o,value:kp(r,18).toString(),chainId:n,description:`Wrap ${r} native token`}}(n,r,i);case"unwrap_native":return function(e,t,n){const{amount:r}=e;if(!r)throw new yp("txErrAmountRequired",{},"Amount is required");const i=pp[n];if(!i)throw new yp("txErrWrapUnsupported",{chainId:String(n)},`Wrapped native not supported on chain ${n}`);const o=Xt({abi:gp,functionName:"withdraw",args:[kp(r,18)]});return{from:t,to:i,data:o,value:"0",chainId:n,description:`Unwrap ${r} wrapped native`}}(n,r,i);case"send_nft":return function(e,t,n){const{contract_address:r,to_address:i,token_id:o,amount:a,token_standard:s}=e;if(!r)throw new yp("txErrNftContractRequired",{},"NFT contract address is required");if(!i)throw new yp("txErrRecipientRequired",{},"Recipient address is required");if(!o)throw new yp("txErrTokenIdRequired",{},"Token id is required");if("ERC1155"===(s||"ERC721").toUpperCase()){const e=BigInt(a||"1");return{from:t,to:r,data:Xt({abi:wp,functionName:"safeTransferFrom",args:[t,i,BigInt(o),e,"0x"]}),value:"0",chainId:n,description:`Send ERC-1155 #${o} ×${e} to ${i}`}}const c=Xt({abi:bp,functionName:"safeTransferFrom",args:[t,i,BigInt(o)]});return{from:t,to:r,data:c,value:"0",chainId:n,description:`Send NFT #${o} to ${i}`}}(n,r,i);default:throw new yp("txErrUnsupportedAction",{action:t},`Action "${t}" is not a supported transaction action`)}}function Ap(e){return["send_native","send_token","approve_token","wrap_native","unwrap_native","send_nft"].includes(e)}function kp(e,t){return function(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new Cr({value:e});let[n,r="0"]=e.split(".");const i=n.startsWith("-");if(i&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${r}`))&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>t){const[e,i,o]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],a=Math.round(Number(`${i}.${o}`));r=a>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${a}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${i?"-":""}${n}${r}`)}(ip(e).decimalPlaces(t,ip.ROUND_DOWN).toFixed(),t)}function xp(e,t){return t||(void 0!==e?_d[e]?.rpcUrls?.default?.http?.[0]:void 0)}const Ep=["value","gas","gasLimit","gasPrice","nonce","maxFeePerGas","maxPriorityFeePerGas"];function Cp(e){if("number"==typeof e||"bigint"==typeof e)return`0x${e.toString(16)}`;if("string"==typeof e){if(""===e||e.startsWith("0x")||e.startsWith("0X"))return e;try{return`0x${BigInt(e).toString(16)}`}catch{return e}}return e}function Sp(e){return e.map(e=>{if(!e||"object"!=typeof e||Array.isArray(e))return e;const t=e;let n=null;for(const r of Ep){if(null==t[r])continue;const e=Cp(t[r]);e!==t[r]&&(n??={...t},n[r]=e)}return n??e})}async function Tp(e,t,n){const r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:Sp(n)})}),i=await r.json();if(i?.error)throw new Error(i.error?.message||`RPC ${t} failed`);return i?.result}async function Mp(e){const t=await async function(e){const{tx:t,chainId:n,rpcUrl:r}=e,i=xp(n,r);if(!i)return{ok:!0};const o=_d[n],a=o?.nativeCurrency?.decimals??18,s=o?.nativeCurrency?.symbol??"";try{const e=await Tp(i,"eth_getBalance",[t.from,"latest"]),n=BigInt(e);let r,o;if(r=t.gasPrice?BigInt(t.gasPrice):BigInt(await Tp(i,"eth_gasPrice",[])),t.gasLimit)o=BigInt(t.gasLimit);else try{const e=await Tp(i,"eth_estimateGas",[{from:t.from,to:t.to,data:t.data,value:t.value}]);o=BigInt(e)}catch{return{ok:!0}}const c=o*r+(t.value?BigInt(t.value):0n);if(n>=c)return{ok:!0};const u=e=>new ip(e.toString()).dividedBy(new ip(10).pow(a)).toFixed();return{ok:!1,balance:u(n),fee:u(c),symbol:s}}catch{return{ok:!0}}}({tx:e.tx,chainId:e.chainId,rpcUrl:e.rpcUrl});if(t.ok)return{ok:!0};const n={symbol:t.symbol??"",balance:t.balance??"0",amount:t.fee??"0"},r=`Insufficient balance! You have ${n.balance} ${n.symbol} but need ${n.amount} ${n.symbol}.`;return{ok:!1,message:e.ti?e.ti("swapInsufficientNativeBalance",n):r}}async function Ip(e){const{transactionHash:t,chainId:n,pollingInterval:r=3e3,timeout:i=12e4,rpcUrl:o}=e,a=xp(n,o);if(!a)throw new Error(`No RPC endpoint for chain ${n}`);const s=Date.now();for(;Date.now()-s<i;){try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getTransactionReceipt",params:[t]})}),n=await e.json();if(n?.result)return{status:"0x1"===n.result.status?"success":"fail"}}catch(c){console.warn("eth_getTransactionReceipt poll error:",c)}await new Promise(e=>setTimeout(e,r))}throw new Error(`Timed out waiting for receipt of ${t}`)}function Bp({walletAction:r,isSubmitting:i,onSubmit:o,onCancel:s}){const c=r.status,{config:u}=Mh(),{ti:l}=E(r.language),f=a(async e=>{const t=r.action;if(!Ap(t))return{ok:!0};try{const i="number"==typeof(n=r.chainId)?n:n.startsWith("0x")?parseInt(n,16):parseInt(n,10),o=vp({action:t,parameters:{...r.parameters,...e},fromAddress:r.walletAddress,chainId:i});return Mp({tx:{from:o.from,to:o.to,data:o.data,value:o.value},chainId:i,rpcUrl:u?.rpcUrls?.[i]??void 0,ti:l})}catch{return{ok:!0}}var n},[r.action,r.chainId,r.parameters,r.walletAddress,u,l]);/* @__PURE__ */
45
+ /* @__PURE__ */e(sp,{status:x,inFlight:S,chainId:n.chainId,transactionHash:n.transactionHash,successKey:"txSuccessfulSwap",language:n.language})]})}const pp={1:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",10:"0x4200000000000000000000000000000000000006",56:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",137:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",8453:"0x4200000000000000000000000000000000000006",42161:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"},mp=[{name:"transfer",type:"function",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"approve",type:"function",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],gp=[{name:"deposit",type:"function",stateMutability:"payable",inputs:[],outputs:[]},{name:"withdraw",type:"function",stateMutability:"nonpayable",inputs:[{name:"wad",type:"uint256"}],outputs:[]}],bp=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],wp=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"amount",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]}];class yp extends Error{key;vars;constructor(e,t={},n){super(n??e),this.name="TxBuildError",this.key=e,this.vars=t}}function vp(e){const{action:t,parameters:n,fromAddress:r,chainId:i}=e;switch(t){case"send_native":return function(e,t,n){const{to_address:r,amount:i}=e;if(!r)throw new yp("txErrRecipientRequired",{},"Recipient address is required");if(!i)throw new yp("txErrAmountRequired",{},"Amount is required");return{from:t,to:r,data:"0x",value:kp(i,18).toString(),chainId:n,description:`Send ${i} native token to ${r}`}}(n,r,i);case"send_token":return function(e,t,n){const{contract_address:r,to_address:i,amount:o,decimals:a,token_symbol:s}=e;if(!r)throw new yp("txErrTokenContractRequired",{},"Token contract address is required");if(!i)throw new yp("txErrRecipientRequired",{},"Recipient address is required");if(!o)throw new yp("txErrAmountRequired",{},"Amount is required");const c=parseInt(a)||18,u=Xt({abi:mp,functionName:"transfer",args:[i,kp(o,c)]});return{from:t,to:r,data:u,value:"0",chainId:n,description:`Send ${o} ${s||"tokens"} to ${i}`}}(n,r,i);case"approve_token":return function(e,t,n){const{contract_address:r,spender_address:i,amount:o,decimals:a,token_symbol:s}=e;if(!r)throw new yp("txErrTokenContractRequired",{},"Token contract address is required");if(!i)throw new yp("txErrSpenderRequired",{},"Spender address is required");const c=parseInt(a)||18,u=o&&""!==o.trim()?kp(o,c):Rn,l=Xt({abi:mp,functionName:"approve",args:[i,u]});return{from:t,to:r,data:l,value:"0",chainId:n,description:`Approve ${o||"unlimited"} ${s||"tokens"} for ${i}`}}(n,r,i);case"wrap_native":return function(e,t,n){const{amount:r}=e;if(!r)throw new yp("txErrAmountRequired",{},"Amount is required");const i=pp[n];if(!i)throw new yp("txErrWrapUnsupported",{chainId:String(n)},`Wrapped native not supported on chain ${n}`);const o=Xt({abi:gp,functionName:"deposit"});return{from:t,to:i,data:o,value:kp(r,18).toString(),chainId:n,description:`Wrap ${r} native token`}}(n,r,i);case"unwrap_native":return function(e,t,n){const{amount:r}=e;if(!r)throw new yp("txErrAmountRequired",{},"Amount is required");const i=pp[n];if(!i)throw new yp("txErrWrapUnsupported",{chainId:String(n)},`Wrapped native not supported on chain ${n}`);const o=Xt({abi:gp,functionName:"withdraw",args:[kp(r,18)]});return{from:t,to:i,data:o,value:"0",chainId:n,description:`Unwrap ${r} wrapped native`}}(n,r,i);case"send_nft":return function(e,t,n){const{contract_address:r,to_address:i,token_id:o,amount:a,token_standard:s}=e;if(!r)throw new yp("txErrNftContractRequired",{},"NFT contract address is required");if(!i)throw new yp("txErrRecipientRequired",{},"Recipient address is required");if(!o)throw new yp("txErrTokenIdRequired",{},"Token id is required");if("ERC1155"===(s||"ERC721").toUpperCase()){const e=BigInt(a||"1");return{from:t,to:r,data:Xt({abi:wp,functionName:"safeTransferFrom",args:[t,i,BigInt(o),e,"0x"]}),value:"0",chainId:n,description:`Send ERC-1155 #${o} ×${e} to ${i}`}}const c=Xt({abi:bp,functionName:"safeTransferFrom",args:[t,i,BigInt(o)]});return{from:t,to:r,data:c,value:"0",chainId:n,description:`Send NFT #${o} to ${i}`}}(n,r,i);default:throw new yp("txErrUnsupportedAction",{action:t},`Action "${t}" is not a supported transaction action`)}}function Ap(e){return["send_native","send_token","approve_token","wrap_native","unwrap_native","send_nft"].includes(e)}function kp(e,t){return function(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new Cr({value:e});let[n,r="0"]=e.split(".");const i=n.startsWith("-");if(i&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${r}`))&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>t){const[e,i,o]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],a=Math.round(Number(`${i}.${o}`));r=a>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${a}`,r.length>t&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt(`${i?"-":""}${n}${r}`)}(ip(e).decimalPlaces(t,ip.ROUND_DOWN).toFixed(),t)}function xp(e,t){return t||(void 0!==e?_d[e]?.rpcUrls?.default?.http?.[0]:void 0)}const Ep=["value","gas","gasLimit","gasPrice","nonce","maxFeePerGas","maxPriorityFeePerGas"];function Cp(e){if("number"==typeof e||"bigint"==typeof e)return`0x${e.toString(16)}`;if("string"==typeof e){if(""===e||e.startsWith("0x")||e.startsWith("0X"))return e;try{return`0x${BigInt(e).toString(16)}`}catch{return e}}return e}function Sp(e){return e.map(e=>{if(!e||"object"!=typeof e||Array.isArray(e))return e;const t=e;let n=null;for(const r of Ep){if(null==t[r])continue;const e=Cp(t[r]);e!==t[r]&&(n??={...t},n[r]=e)}return n??e})}async function Tp(e,t,n){const r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:t,params:Sp(n)})}),i=await r.json();if(i?.error)throw new Error(i.error?.message||`RPC ${t} failed`);return i?.result}async function Mp(e){const t=await async function(e){const{tx:t,chainId:n,rpcUrl:r}=e,i=xp(n,r);if(!i)return{ok:!0};const o=_d[n],a=o?.nativeCurrency?.decimals??18,s=o?.nativeCurrency?.symbol??"";try{const e=await Tp(i,"eth_getBalance",[t.from,"latest"]),n=BigInt(e);let r,o;if(r=t.gasPrice?BigInt(t.gasPrice):BigInt(await Tp(i,"eth_gasPrice",[])),t.gasLimit)o=BigInt(t.gasLimit);else try{const e=await Tp(i,"eth_estimateGas",[{from:t.from,to:t.to,data:t.data,value:t.value}]);o=BigInt(e)}catch{return{ok:!0}}const c=o*r+(t.value?BigInt(t.value):0n);if(n>=c)return{ok:!0};const u=e=>new ip(e.toString()).dividedBy(new ip(10).pow(a)).toFixed();return{ok:!1,balance:u(n),fee:u(c),symbol:s}}catch{return{ok:!0}}}({tx:e.tx,chainId:e.chainId,rpcUrl:e.rpcUrl});if(t.ok)return{ok:!0};const n={symbol:t.symbol??"",balance:t.balance??"0",fee:t.fee??"0"},r=`Insufficient ${n.symbol} for gas! You have ${n.balance} ${n.symbol} but need ~${n.fee} ${n.symbol} for the transaction fee.`;return{ok:!1,message:e.ti?e.ti("txInsufficientGas",n):r}}async function Ip(e){const{transactionHash:t,chainId:n,pollingInterval:r=3e3,timeout:i=12e4,rpcUrl:o}=e,a=xp(n,o);if(!a)throw new Error(`No RPC endpoint for chain ${n}`);const s=Date.now();for(;Date.now()-s<i;){try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getTransactionReceipt",params:[t]})}),n=await e.json();if(n?.result)return{status:"0x1"===n.result.status?"success":"fail"}}catch(c){console.warn("eth_getTransactionReceipt poll error:",c)}await new Promise(e=>setTimeout(e,r))}throw new Error(`Timed out waiting for receipt of ${t}`)}function Bp({walletAction:r,isSubmitting:i,onSubmit:o,onCancel:s}){const c=r.status,{config:u}=Mh(),{ti:l}=E(r.language),f=a(async e=>{const t=r.action;if(!Ap(t))return{ok:!0};try{const i="number"==typeof(n=r.chainId)?n:n.startsWith("0x")?parseInt(n,16):parseInt(n,10),o=vp({action:t,parameters:{...r.parameters,...e},fromAddress:r.walletAddress,chainId:i});return Mp({tx:{from:o.from,to:o.to,data:o.data,value:o.value},chainId:i,rpcUrl:u?.rpcUrls?.[i]??void 0,ti:l})}catch{return{ok:!0}}var n},[r.action,r.chainId,r.parameters,r.walletAddress,u,l]);/* @__PURE__ */
46
46
  return t(n,{children:[("pending"===c||"submitted"===c||"success"===c)&&/* @__PURE__ */e(ap,{disabled:"success"===c||"submitted"===c,action:r.action,initialValues:r.parameters,onSubmit:(e,t)=>o(t),onCancel:s,isSubmitting:i,tokenInfo:r.tokenInfo,nftInfo:r.nftInfo,language:r.language,validateGas:f}),
47
47
  /* @__PURE__ */e(sp,{status:c,inFlight:"submitted"===c,chainId:r.chainId,transactionHash:r.transactionHash,errorMessage:r.errorMessage,language:r.language})]})}function Np({walletAction:t,isSubmitting:n,onSubmit:r,onCancel:i,onConfirm:o,onApprove:a}){switch(t.component){case"BuyTokenConfirmTx":/* @__PURE__ */
48
48
  return e(lp,{walletAction:t,isSubmitting:n,onConfirm:o,onApprove:a,onCancel:i});case"SwapTokenConfirmTx":/* @__PURE__ */