keyring-chatbot-agent-sdk-test 0.0.17 → 0.0.18

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
- (function(){"use strict";try{if(typeof document<"u"){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-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:14px;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:16px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e5e5e7}.chat-modal-header-left{display:flex;align-items:center;gap:12px}.keyring-logo{width:32px;height:32px}.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{background:#fff;padding:12px 20px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #e5e5e7}.user-avatar{width:20px;height:20px;border-radius:50%}.user-avatar img{border-radius:50%}.user-wallet,.user-wallet a{font-size:14px;font-weight:500;color:#1a1a1d}.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:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.date-separator{text-align:center;font-size:12px;font-weight:600;color:#666;background:#e5e5e7;padding:6px 16px;border-radius:12px;align-self:center;width:fit-content;margin:8px auto}.message{display:flex;animation:messageSlide .3s ease;position:relative}.message:hover .message-reply-button{opacity:1}@keyframes messageSlide{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message-reply-button{position:absolute;top:50%;transform:translateY(-50%);background:#fff;border:1px solid #e5e5e7;border-radius:8px;padding:6px;cursor:pointer;opacity:0;transition:all .2s;box-shadow:0 2px 8px #0000001a;z-index:10}.message-bot .message-reply-button{right:20px}.message-user .message-reply-button{left:20px}.message-reply-button:hover{background:#f5f5f7;transform:translateY(-50%) scale(1.1)}.message-reply-button svg{display:block;width:16px;height:16px;color:#666}.message-bot{justify-content:flex-start}.message-user{justify-content:flex-end}.message-bubble{max-width:85%;padding:14px 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-reply-to{background:#0000000d;padding:8px 12px;border-radius:6px;margin-bottom:8px;border-left:3px solid #5b7fff}.message-bot .message-reply-to{background:#f5f5f7}.message-user .message-reply-to{background:#ffffff26;border-left-color:#ffffff80}.message-reply-to-label{font-size:11px;font-weight:600;margin-bottom:4px}.message-bot .message-reply-to-label{color:#5b7fff}.message-user .message-reply-to-label{color:#ffffffe6}.message-reply-to-text{font-size:12px;opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-text{font-size:14px;line-height:1.5;margin-bottom:6px;word-wrap:break-word;white-space:pre-line}.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:10px 16px;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.full-width{flex:1 1 100%;text-align:center;white-space:normal;padding:12px 16px;font-size:14px}@media(min-width:640px){.message-button:hover{background:#fff;border-color:#007aff;color:#007aff;transform:translateY(-1px);box-shadow:0 2px 8px #007aff26}.message-button:active{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{background:#ffffff4d;border-color:#ffffff80}.message-timestamp{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:12px 16px;border-radius:16px;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:16px 20px;background:#fff;border-top:1px solid #e5e5e7;display:flex;flex-direction:column;gap:12px;box-shadow:0 -5px 8px 4px #0000000d}.reply-preview{background:#f5f5f7;padding:10px 14px;border-radius:6px;border-left:3px solid #5b7fff;display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.reply-preview-content{flex:1;min-width:0}.reply-preview-label{font-size:11px;color:#5b7fff;font-weight:600;margin-bottom:4px}.reply-preview-text{font-size:13px;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-preview-close{background:transparent;border:none;cursor:pointer;padding:2px;color:#999;transition:color .2s;flex-shrink:0}.reply-preview-close:hover{color:#666}.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:24px;outline:none;font-size:16px;color:#1a1a1d;transition:all .2s}.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:44px;height:44px;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:0;margin:0}}.action-status{margin-top:8px;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}.message-content{display:block;word-wrap:break-word;overflow-wrap:break-word;max-width:100%;overflow:hidden;font-size:inherit;line-height:1.5}.mc-line{min-height:1.2em;word-break:break-word}.mc-empty-line{height:.5em}.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{background:#f6f8fa;border:1px solid #d0d7de;border-radius:6px;margin:6px 0;overflow:hidden;max-width:100%}.mc-codeblock-lang{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}.action-form{background:#f8f9fb;border:1px solid #e2e6ea;border-radius:10px;padding:12px;margin-top:8px}.action-form-title{font-weight:600;font-size:.9em;margin-bottom:10px;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;margin-bottom:10px;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:#6c5ce7;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;margin-top:10px}.action-form-submit{flex:1;padding:8px 14px;background:#6c5ce7;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;margin-bottom: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:#6c5ce7;font-weight:500}.action-form-field-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.action-form-field-header label{margin-bottom:0}.action-form-pct-btns{display:inline-flex;gap:4px}.action-form-pct-btn{padding:1px 6px;font-size:.7em;font-weight:600;color:#6c5ce7;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:#6c5ce7;color:#fff}}.action-form-pct-btn:disabled{opacity:.5;cursor:not-allowed}.action-form-max-btn{font-weight:700}.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)}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- (function(pt,B){typeof exports=="object"&&typeof module<"u"?B(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],B):(pt=typeof globalThis<"u"?globalThis:pt||self,B(pt.ChatWidgetSDK={},pt.jsxRuntime,pt.React))})(this,(function(pt,B,se){"use strict";const _s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAYAAADG4PRLAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAfXSURBVHgB7Z1LbFRVGMe/c4YCAmKrEFiQWIIrNm13RE0olLRuTCq4w4C6Mbopo9GltFsVpmxQN1pJ2MkjcSMESrsgYdd2w8rGkrCA8GjFVintzPH878wZjrfzujPTe88p3y+ZzMydOxO4//s9z3dvBTWB7sxsqyTqF2q5k4R8nUh06s2thQeTZyZ4qOwU0bqJFkHjv6fbZqhBBNVJIJqiASFUN94SExl98CeVEsONiBlZQEu4E8QW1kTUSAvJoahCRhLw4OnZkyzc6qItcnD087ahWvevScB3MrPty6QuKaJOYuJgpoXEgVqsUVbboef07PElUhMsXqy045j3ZB72V9uxooCHtMskoUaIXWYS6GMuLyFsVdqprAuFeEqoQWISp1JcLClgz3f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qvThnLmWgWXGSbaH2OnvDWmVG6QhDhOTFMwwi2THC6sDtVMZAENebea7daJ7AAX/nUzprP98XqEM9QtoI0RUyjRqS2zg/Kxsp2YAFhYfnhMTeo3d5RQOsalLtcrms1//TyUbJOo0HUAAAAASUVORK5CYII=",co={en:{chatTitle:"Keyring Agent",closeChat:"Close chat",messagePlaceholder:"Message ....",sendMessage:"Send message",botIsTyping:"Bot is typing",canIHelpYou:"Can I help you with anything?",replyToMessage:"Reply to message",replyingTo:"Replying to",replyingToYou:"You",replyingToAgent:"Keyring Agent",cancelReply:"Cancel reply",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}",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. Available: {balance} {symbol}",formFieldRequired:"{field} is required",formInvalidAddress:"Invalid address (0x + 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:
1
+ (function(){"use strict";try{if(typeof document<"u"){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-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:14px;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:16px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e5e5e7}.chat-modal-header-left{display:flex;align-items:center;gap:12px}.keyring-logo{width:32px;height:32px}.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{background:#fff;padding:12px 20px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #e5e5e7}.user-avatar{width:20px;height:20px;border-radius:50%}.user-avatar img{border-radius:50%}.user-wallet,.user-wallet a{font-size:14px;font-weight:500;color:#1a1a1d}.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:20px;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:12px}.date-separator{text-align:center;font-size:12px;font-weight:600;color:#666;background:#e5e5e7;padding:6px 16px;border-radius:12px;align-self:center;width:fit-content;margin:8px auto}.message{display:flex;animation:messageSlide .3s ease;position:relative}@media(min-width:640px){.message:hover .message-reply-button{opacity:1}}@keyframes messageSlide{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message-reply-button{position:absolute;top:50%;transform:translateY(-50%);background:#fff;border:1px solid #e5e5e7;border-radius:8px;padding:6px;cursor:pointer;opacity:0;transition:all .2s;box-shadow:0 2px 8px #0000001a;z-index:10}.message-bot .message-reply-button{right:20px}.message-user .message-reply-button{left:20px}.message-reply-button:hover{background:#f5f5f7;transform:translateY(-50%) scale(1.1)}.message-reply-button svg{display:block;width:16px;height:16px;color:#666}.message-bot{justify-content:flex-start}.message-user{justify-content:flex-end}.message-bubble{max-width:85%;padding:14px 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-reply-to{background:#0000000d;padding:8px 12px;border-radius:6px;margin-bottom:8px;border-left:3px solid #5b7fff}.message-bot .message-reply-to{background:#f5f5f7}.message-user .message-reply-to{background:#ffffff26;border-left-color:#ffffff80}.message-reply-to-label{font-size:11px;font-weight:600;margin-bottom:4px}.message-bot .message-reply-to-label{color:#5b7fff}.message-user .message-reply-to-label{color:#ffffffe6}.message-reply-to-text{font-size:12px;opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-text{font-size:14px;line-height:1.5;margin-bottom:6px;word-wrap:break-word;white-space:pre-line}.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:10px 16px;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.full-width{flex:1 1 100%;text-align:center;white-space:normal;padding:12px 16px;font-size:14px}@media(min-width:640px){.message-button:hover{background:#fff;border-color:#007aff;color:#007aff;transform:translateY(-1px);box-shadow:0 2px 8px #007aff26}.message-button:active{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{background:#ffffff4d;border-color:#ffffff80}.message-timestamp{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:12px 16px;border-radius:16px;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:16px 20px;background:#fff;border-top:1px solid #e5e5e7;display:flex;flex-direction:column;gap:12px;box-shadow:0 -5px 8px 4px #0000000d}.reply-preview{background:#f5f5f7;padding:10px 14px;border-radius:6px;border-left:3px solid #5b7fff;display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.reply-preview-content{flex:1;min-width:0}.reply-preview-label{font-size:11px;color:#5b7fff;font-weight:600;margin-bottom:4px}.reply-preview-text{font-size:13px;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-preview-close{background:transparent;border:none;cursor:pointer;padding:2px;color:#999;transition:color .2s;flex-shrink:0}.reply-preview-close:hover{color:#666}.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:24px;outline:none;font-size:16px;color:#1a1a1d;transition:all .2s}.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:44px;height:44px;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:0;margin:0}}.action-status{margin-top:8px;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}.message-content{display:block;word-wrap:break-word;overflow-wrap:break-word;max-width:100%;overflow:hidden;font-size:inherit;line-height:1.5}.mc-line{min-height:1.2em;word-break:break-word}.mc-empty-line{height:.5em}.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{background:#f6f8fa;border:1px solid #d0d7de;border-radius:6px;margin:6px 0;overflow:hidden;max-width:100%}.mc-codeblock-lang{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}.action-form{background:#f8f9fb;border:1px solid #e2e6ea;border-radius:10px;padding:12px;margin-top:8px}.action-form-title{font-weight:600;font-size:.9em;margin-bottom:10px;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;margin-bottom:10px;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:#6c5ce7;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;margin-top:10px}.action-form-submit{flex:1;padding:8px 14px;background:#6c5ce7;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;margin-bottom: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:#6c5ce7;font-weight:500}.action-form-field-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.action-form-field-header label{margin-bottom:0}.action-form-pct-btns{display:inline-flex;gap:4px}.action-form-pct-btn{padding:1px 6px;font-size:.7em;font-weight:600;color:#6c5ce7;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:#6c5ce7;color:#fff}}.action-form-pct-btn:disabled{opacity:.5;cursor:not-allowed}.action-form-max-btn{font-weight:700}.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)}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ (function(bt,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],C):(bt=typeof globalThis<"u"?globalThis:bt||self,C(bt.ChatWidgetSDK={},bt.jsxRuntime,bt.React))})(this,(function(bt,C,se){"use strict";const _s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAYAAADG4PRLAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAfXSURBVHgB7Z1LbFRVGMe/c4YCAmKrEFiQWIIrNm13RE0olLRuTCq4w4C6Mbopo9GltFsVpmxQN1pJ2MkjcSMESrsgYdd2w8rGkrCA8GjFVintzPH878wZjrfzujPTe88p3y+ZzMydOxO4//s9z3dvBTW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20tgK/SFLNGReFwVkK/QDRWrIWB9YcXuHg5nHE3pjJzHOoT3kzGj61d32thWrETkS77ErdQ9oorU5EN6+QsC8eebSxDiFoNxHtus0lFwPHE1vGxHa1xLjBIh719PbSnbMKt7i6FDm0aAicZKYxIB4o+nXBst9XvUeVT2Zh/2K5M96x1ZiYiOfh+TS8IaV9qvpJmPdmdl2SeqG3rmdmFUHfU4kk6ViXphIf8ubXerqAqvThnLmWgWXGSbaH2OnvDWmVG6QhDhOTFMwwi2THC6sDtVMZAENebea7daJ7AAX/nUzprP98XqEM9QtoI0RUyjRqS2zg/Kxsp2YAFhYfnhMTeo3d5RQOsalLtcrms1//TyUbJOo0HUAAAAASUVORK5CYII=",uo={en:{chatTitle:"Keyring Agent",closeChat:"Close chat",messagePlaceholder:"Message ....",sendMessage:"Send message",botIsTyping:"Bot is typing",canIHelpYou:"Can I help you with anything?",replyToMessage:"Reply to message",replyingTo:"Replying to",replyingToYou:"You",replyingToAgent:"Keyring Agent",cancelReply:"Cancel reply",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}",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. Available: {balance} {symbol}",formFieldRequired:"{field} is required",formInvalidAddress:"Invalid address (0x + 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:
3
3
 
4
4
  Available: {balance} {symbol}`,swapFeeWarning:`
5
5
  ⚠️ **Insufficient {symbol} for fees!**
@@ -13,14 +13,18 @@ Available: {balance} {from}`,swapApprovalRequired:`⚠️ Token approval require
13
13
  Step 1: Approve {symbol}
14
14
  Step 2: Confirm Swap`,swapEstimationFailed:"⚠️ Failed to get swap estimation. Please try again.",swapInsufficientNativeBalance:"⚠️ Insufficient balance! You have {balance} {symbol} but need {amount}. 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}. Please reduce the amount or add more tokens.",selectAmountToSwap:`📊 Select the amount of {symbol} to swap:
15
15
 
16
- Available: {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:",txProcessing:"⚙️ Transaction processing... Please wait.",txConfirmedSwap:"✅ Transaction confirmed! Your swap has been completed.",txRevertedSwap:"❌ Transaction reverted on-chain. Please try again.",txSuccessfulSwap:"✅ Transaction successful! Your swap has been completed.",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})
16
+ Available: {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:",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.",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})
17
17
 
18
18
  Please review and fill in the recipient address below:`,nftCollectionHeader:`🖼️ Your NFT Collection ({count} items):
19
19
 
20
20
  {list}
21
21
 
22
22
  Select an NFT to send:`,nftNoCollection:"🖼️ You don't have any NFTs in your wallet 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:`
23
- Is 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.",buttonBuyWith:"Buy with {symbol}",buttonUsePercent:"Use {percent}% of {symbol}",buttonBuyToken:"Buy {name} ({symbol})",buttonSendNft:"Send {name}",buttonSwapTo:"Swap to {name} ({symbol})",buttonBuySymbol:"Buy {symbol}"},ja:{chatTitle:"Keyringエージェント",closeChat:"チャットを閉じる",messagePlaceholder:"メッセージ....",sendMessage:"メッセージを送信",botIsTyping:"ボットが入力中",canIHelpYou:"何かお手伝いできますか?",replyToMessage:"メッセージに返信",replyingTo:"返信先:",replyingToYou:"あなた",replyingToAgent:"Keyringエージェント",cancelReply:"返信をキャンセル",suggestionAskText:"質問する",suggestionAskUserMessage:"質問があります",suggestionAskBotReply:"何でも聞いてください",suggestionBuyText:"トレンドトークンを購入",walletConnectedChainUnsupported:"ウォレットは接続されていますが、このチェーンは取引に対応していません。対応チェーンに切り替えてトレンドトークンを確認してください。",walletNotConnected:"トレンドトークンを確認するにはウォレットを接続してください。",actionProcessing:"⏳ トランザクション処理中...",actionSuccess:"✅ トランザクション完了",actionFail:"❌ アクションがキャンセルまたは失敗しました",txSubmitted:"⏳ トランザクションを送信しました。確認をお待ちください...",txConfirmed:"✅ トランザクションが確認されました!",txReverted:"❌ トランザクションはオンチェーンでリバートされました。",txTimeout:"⚠️ トランザクションは送信されましたが、確認がタイムアウトしました。手動で確認してください。",txSuccessful:"✅ トランザクションが成功しました!",txFailed:"トランザクションが失敗しました。もう一度お試しください。",txNoHandler:"⚠️ トランザクションハンドラが設定されていません。",txInsufficientGas:"⚠️ **ガス代の{symbol}が不足しています!** {symbol}の残高は{balance}ですが、取引手数料として約{fee} {symbol}が必要です。ウォレットをチャージして再試行してください。",txError:"❌ エラー:{message}",swapConfirmButton:"確認",swapConfirmValue:"スワップを確認",swapReadyToProceed:"スワップを実行する準備ができていますか?",swapEstimationError:"⚠️ スワップの見積もりを取得できませんでした。エラー:{error}",formCancel:"キャンセル",formExecute:"🚀 実行",formProcessing:"⏳ 処理中...",formBalance:"残高:",formTokenNotFound:"ウォレットにトークンが見つかりませんでした。",formNoBalance:"ウォレットに{symbol}の残高がありません。",formInsufficientBalance:"残高が不足しています。利用可能:{balance} {symbol}",formFieldRequired:"{field}は必須です",formInvalidAddress:"無効なアドレス(0x + 40桁の16進数)",formMustBePositive:"正の数値を入力してください",formMustBeValidNumber:"有効な数値を入力してください",openChat:"チャットを開く",openChatTitle:"チャットサポートを開く",walletBalanceSpendable:"{chain}チェーンのウォレットの利用可能残高です。この取引に使用するコインを選択してください。",walletNoTokensFound:"申し訳ありませんが、{chain}チェーンのウォレットにトークンが見つかりませんでした。取引用のトークンがあることをご確認ください。",walletFetchFailed:"ウォレット残高を取得できませんでした。もう一度お試しください。",walletFetchError:"ウォレット残高の取得中にエラーが発生しました。",insufficientFeeToken:"手数料が不足しています。{symbol}が取引手数料をカバーするのに十分であることを確認するか、別のトークンを選択してください。",selectAmountOf:`📊 使用する{symbol}の量を選択:
23
+ Is 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.",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}:
24
+
25
+ {list}
26
+
27
+ Select a token to interact with:`,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}",buttonSwapToken:"Swap {symbol}",buttonBuyMoreToken:"Buy more {symbol}"},ja:{chatTitle:"Keyringエージェント",closeChat:"チャットを閉じる",messagePlaceholder:"メッセージ....",sendMessage:"メッセージを送信",botIsTyping:"ボットが入力中",canIHelpYou:"何かお手伝いできますか?",replyToMessage:"メッセージに返信",replyingTo:"返信先:",replyingToYou:"あなた",replyingToAgent:"Keyringエージェント",cancelReply:"返信をキャンセル",suggestionAskText:"質問する",suggestionAskUserMessage:"質問があります",suggestionAskBotReply:"何でも聞いてください",suggestionBuyText:"トレンドトークンを購入",walletConnectedChainUnsupported:"ウォレットは接続されていますが、このチェーンは取引に対応していません。対応チェーンに切り替えてトレンドトークンを確認してください。",walletNotConnected:"トレンドトークンを確認するにはウォレットを接続してください。",actionProcessing:"⏳ トランザクション処理中...",actionSuccess:"✅ トランザクション完了",actionFail:"❌ アクションがキャンセルまたは失敗しました",txSubmitted:"⏳ トランザクションを送信しました。確認をお待ちください...",txConfirmed:"✅ トランザクションが確認されました!",txReverted:"❌ トランザクションはオンチェーンでリバートされました。",txTimeout:"⚠️ トランザクションは送信されましたが、確認がタイムアウトしました。手動で確認してください。",txSuccessful:"✅ トランザクションが成功しました!",txFailed:"トランザクションが失敗しました。もう一度お試しください。",txNoHandler:"⚠️ トランザクションハンドラが設定されていません。",txInsufficientGas:"⚠️ **ガス代の{symbol}が不足しています!** {symbol}の残高は{balance}ですが、取引手数料として約{fee} {symbol}が必要です。ウォレットをチャージして再試行してください。",txError:"❌ エラー:{message}",swapConfirmButton:"確認",swapConfirmValue:"スワップを確認",swapReadyToProceed:"スワップを実行する準備ができていますか?",swapEstimationError:"⚠️ スワップの見積もりを取得できませんでした。エラー:{error}",formCancel:"キャンセル",formExecute:"🚀 実行",formProcessing:"⏳ 処理中...",formBalance:"残高:",formTokenNotFound:"ウォレットにトークンが見つかりませんでした。",formNoBalance:"ウォレットに{symbol}の残高がありません。",formInsufficientBalance:"残高が不足しています。利用可能:{balance} {symbol}",formFieldRequired:"{field}は必須です",formInvalidAddress:"無効なアドレス(0x + 40桁の16進数)",formMustBePositive:"正の数値を入力してください",formMustBeValidNumber:"有効な数値を入力してください",openChat:"チャットを開く",openChatTitle:"チャットサポートを開く",walletBalanceSpendable:"{chain}チェーンのウォレットの利用可能残高です。この取引に使用するコインを選択してください。",walletNoTokensFound:"申し訳ありませんが、{chain}チェーンのウォレットにトークンが見つかりませんでした。取引用のトークンがあることをご確認ください。",walletFetchFailed:"ウォレット残高を取得できませんでした。もう一度お試しください。",walletFetchError:"ウォレット残高の取得中にエラーが発生しました。",insufficientFeeToken:"手数料が不足しています。{symbol}が取引手数料をカバーするのに十分であることを確認するか、別のトークンを選択してください。",selectAmountOf:`📊 使用する{symbol}の量を選択:
24
28
 
25
29
  利用可能: {balance} {symbol}`,swapFeeWarning:`
26
30
  ⚠️ **手数料の{symbol}が不足しています!**
@@ -34,14 +38,18 @@ Is there any token you want to buy?`,trendingTokensError:"Sorry, I encountered a
34
38
  ステップ1: {symbol}を承認
35
39
  ステップ2: スワップを確認`,swapEstimationFailed:"⚠️ スワップの見積もりを取得できませんでした。もう一度お試しください。",swapInsufficientNativeBalance:"⚠️ 残高不足!{symbol}の残高は{balance}ですが、{amount}が必要です。ウォレットをチャージするか、金額を減らしてください。",swapTokenNotInWallet:"⚠️ ウォレットに{symbol}がありません。スワップ前に取得してください。",swapInsufficientTokenBalance:"⚠️ 残高不足!{balance} {symbol}しかありませんが、{amount}が必要です。金額を減らすかトークンを追加してください。",selectAmountToSwap:`📊 スワップする{symbol}の量を選択:
36
40
 
37
- 利用可能: {balance} {symbol}`,couldNotLoadTokenList:"⚠️ トークンリストを読み込めませんでした。宛先トークンを指定してください。",trendingTokensForReceive:"📈 {chain}チェーンのトレンドトークン。受け取りたいトークンを選択してください:",txProcessing:"⚙️ トランザクション処理中... お待ちください。",txConfirmedSwap:"✅ トランザクションが確認されました!スワップが完了しました。",txRevertedSwap:"❌ トランザクションはオンチェーンでリバートされました。もう一度お試しください。",txSuccessfulSwap:"✅ トランザクションが成功しました!スワップが完了しました。",txDataNotAvailable:"⚠️ トランザクションデータが利用できません。",approvalDataNotAvailable:"⚠️ 承認データが利用できません。",approving:"{symbol}を承認中... ウォレットで確認してください。",approvalSuccess:"✅ {symbol}が正常に承認されました!",approvalConfirmSwap:"スワップを実行できるようになりました。",confirmSwapButton:"スワップを確認",approvalFailed:"❌ 承認に失敗しました。もう一度お試しください。",couldNotFetchBalance:"⚠️ ウォレット残高を取得できませんでした。",couldNotLoadBalance:"⚠️ 残高を読み込めませんでした。もう一度お試しください。",couldNotFetchBalanceRetry:"⚠️ 残高を取得できませんでした。もう一度お試しください。",nftSendReview:`📤 **{name}**を送信 ({standard} #{tokenId})
41
+ 利用可能: {balance} {symbol}`,couldNotLoadTokenList:"⚠️ トークンリストを読み込めませんでした。宛先トークンを指定してください。",trendingTokensForReceive:"📈 {chain}チェーンのトレンドトークン。受け取りたいトークンを選択してください:",txProcessing:"トランザクション処理中... お待ちください。",txConfirmedSwap:"✅ トランザクションが確認されました!スワップが完了しました。",txRevertedSwap:"❌ トランザクションはオンチェーンでリバートされました。もう一度お試しください。",txSuccessfulSwap:"✅ トランザクションが成功しました!スワップが完了しました。",txDataNotAvailable:"⚠️ トランザクションデータが利用できません。",approvalDataNotAvailable:"⚠️ 承認データが利用できません。",approving:"{symbol}を承認中... ウォレットで確認してください。",approvalSuccess:"✅ {symbol}が正常に承認されました!",approvalConfirmSwap:"スワップを実行できるようになりました。",confirmSwapButton:"スワップを確認",approvalFailed:"❌ 承認に失敗しました。もう一度お試しください。",couldNotFetchBalance:"⚠️ ウォレット残高を取得できませんでした。",couldNotLoadBalance:"⚠️ 残高を読み込めませんでした。もう一度お試しください。",couldNotFetchBalanceRetry:"⚠️ 残高を取得できませんでした。もう一度お試しください。",nftSendReview:`📤 **{name}**を送信 ({standard} #{tokenId})
38
42
 
39
43
  受取人のアドレスを確認・入力してください:`,nftCollectionHeader:`🖼️ あなたのNFTコレクション({count}件):
40
44
 
41
45
  {list}
42
46
 
43
47
  送信するNFTを選択:`,nftNoCollection:"🖼️ このチェーンのウォレットにNFTがありません。",nftFetchError:"NFTの取得中にエラーが発生しました。",trendingTokensHeader:"📈 {chain}チェーンで現在上昇トレンドのトークン一覧です",trendingTokensQuestion:`
44
- 購入したいトークンはありますか?`,trendingTokensError:"トレンドトークンの取得中にエラーが発生しました。",errorProcessingRequest:"リクエストの処理中にエラーが発生しました。",buttonBuyWith:"{symbol}で購入",buttonUsePercent:"{symbol}の{percent}%を使用",buttonBuyToken:"{name}({symbol})を購入",buttonSendNft:"{name}を送信",buttonSwapTo:"{name}({symbol})にスワップ",buttonBuySymbol:"{symbol}を購入"},cn:{chatTitle:"Keyring 助手",closeChat:"关闭聊天",messagePlaceholder:"消息....",sendMessage:"发送消息",botIsTyping:"机器人正在输入",canIHelpYou:"有什么可以帮您的吗?",replyToMessage:"回复消息",replyingTo:"回复",replyingToYou:"你",replyingToAgent:"Keyring 助手",cancelReply:"取消回复",suggestionAskText:"提问",suggestionAskUserMessage:"我有一个问题",suggestionAskBotReply:"请随时提问",suggestionBuyText:"购买热门代币",walletConnectedChainUnsupported:"您的钱包已连接,但该链不支持交易。请切换到受支持的链以查看热门代币。",walletNotConnected:"请连接钱包以查看热门代币。",actionProcessing:"⏳ 交易处理中...",actionSuccess:"✅ 交易完成",actionFail:"❌ 操作已取消或失败",txSubmitted:"⏳ 交易已提交,等待确认...",txConfirmed:"✅ 交易已确认!",txReverted:"❌ 交易在链上已回滚。",txTimeout:"⚠️ 交易已提交,但确认超时,请手动检查。",txSuccessful:"✅ 交易成功!",txFailed:"交易失败,请重试。",txNoHandler:"⚠️ 未配置交易处理程序。",txInsufficientGas:"⚠️ **{symbol}不足以支付Gas费!** 您有 {balance} {symbol},但需要约 {fee} {symbol} 作为交易费用。请充值钱包后重试。",txError:"❌ 错误:{message}",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} 数量:
48
+ 購入したいトークンはありますか?`,trendingTokensError:"トレンドトークンの取得中にエラーが発生しました。",errorProcessingRequest:"リクエストの処理中にエラーが発生しました。",buttonBuyWith:"{symbol}で購入",buttonUsePercent:"{symbol}の{percent}%を使用",buttonBuyToken:"{name}({symbol})を購入",buttonSendNft:"{name}を送信",buttonSwapTo:"{name}({symbol})にスワップ",buttonBuySymbol:"{symbol}を購入",viewBalancesLoading:"💰 ウォレット残高を取得中...",viewBalancesHeader:`💰 {chain}のトークン残高:
49
+
50
+ {list}
51
+
52
+ インタラクトするトークンを選択:`,viewBalancesEmpty:"💰 このチェーンのウォレットにトークンがありません。",viewBalancesFetchError:"残高の取得中にエラーが発生しました。",buttonSendToken:"{symbol}を送る",buttonSwapToken:"{symbol}をスワップ",buttonBuyMoreToken:"{symbol}をもっと買う"},cn:{chatTitle:"Keyring 助手",closeChat:"关闭聊天",messagePlaceholder:"消息....",sendMessage:"发送消息",botIsTyping:"机器人正在输入",canIHelpYou:"有什么可以帮您的吗?",replyToMessage:"回复消息",replyingTo:"回复",replyingToYou:"你",replyingToAgent:"Keyring 助手",cancelReply:"取消回复",suggestionAskText:"提问",suggestionAskUserMessage:"我有一个问题",suggestionAskBotReply:"请随时提问",suggestionBuyText:"购买热门代币",walletConnectedChainUnsupported:"您的钱包已连接,但该链不支持交易。请切换到受支持的链以查看热门代币。",walletNotConnected:"请连接钱包以查看热门代币。",actionProcessing:"⏳ 交易处理中...",actionSuccess:"✅ 交易完成",actionFail:"❌ 操作已取消或失败",txSubmitted:"⏳ 交易已提交,等待确认...",txConfirmed:"✅ 交易已确认!",txReverted:"❌ 交易在链上已回滚。",txTimeout:"⚠️ 交易已提交,但确认超时,请手动检查。",txSuccessful:"✅ 交易成功!",txFailed:"交易失败,请重试。",txNoHandler:"⚠️ 未配置交易处理程序。",txInsufficientGas:"⚠️ **{symbol}不足以支付Gas费!** 您有 {balance} {symbol},但需要约 {fee} {symbol} 作为交易费用。请充值钱包后重试。",txError:"❌ 错误:{message}",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} 数量:
45
53
 
46
54
  可用: {balance} {symbol}`,swapFeeWarning:`
47
55
  ⚠️ **{symbol}不足以支付手续费!**
@@ -55,42 +63,71 @@ Is there any token you want to buy?`,trendingTokensError:"Sorry, I encountered a
55
63
  第1步:授权 {symbol}
56
64
  第2步:确认兑换`,swapEstimationFailed:"⚠️ 获取兑换估算失败,请重试。",swapInsufficientNativeBalance:"⚠️ 余额不足!您有 {balance} {symbol},但需要 {amount}。请充值钱包或减少金额。",swapTokenNotInWallet:"⚠️ 您的钱包中没有 {symbol}。请先获取一些再进行兑换。",swapInsufficientTokenBalance:"⚠️ 余额不足!您有 {balance} {symbol},但需要 {amount}。请减少金额或添加更多代币。",selectAmountToSwap:`📊 选择要兑换的 {symbol} 数量:
57
65
 
58
- 可用: {balance} {symbol}`,couldNotLoadTokenList:"⚠️ 无法加载代币列表。请指定目标代币。",trendingTokensForReceive:"📈 {chain}链上的热门代币。请选择您想接收的代币:",txProcessing:"⚙️ 交易处理中... 请稍候。",txConfirmedSwap:"✅ 交易已确认!您的兑换已完成。",txRevertedSwap:"❌ 交易在链上已回滚,请重试。",txSuccessfulSwap:"✅ 交易成功!您的兑换已完成。",txDataNotAvailable:"⚠️ 交易数据不可用。",approvalDataNotAvailable:"⚠️ 授权数据不可用。",approving:"正在授权 {symbol}... 请在钱包中确认。",approvalSuccess:"✅ {symbol} 授权成功!",approvalConfirmSwap:"现在您可以执行兑换了。",confirmSwapButton:"确认兑换",approvalFailed:"❌ 授权失败,请重试。",couldNotFetchBalance:"⚠️ 无法获取钱包余额。",couldNotLoadBalance:"⚠️ 无法加载余额,请重试。",couldNotFetchBalanceRetry:"⚠️ 无法获取余额,请重试。",nftSendReview:`📤 发送 **{name}** ({standard} #{tokenId})
66
+ 可用: {balance} {symbol}`,couldNotLoadTokenList:"⚠️ 无法加载代币列表。请指定目标代币。",trendingTokensForReceive:"📈 {chain}链上的热门代币。请选择您想接收的代币:",txProcessing:"交易处理中... 请稍候。",txConfirmedSwap:"✅ 交易已确认!您的兑换已完成。",txRevertedSwap:"❌ 交易在链上已回滚,请重试。",txSuccessfulSwap:"✅ 交易成功!您的兑换已完成。",txDataNotAvailable:"⚠️ 交易数据不可用。",approvalDataNotAvailable:"⚠️ 授权数据不可用。",approving:"正在授权 {symbol}... 请在钱包中确认。",approvalSuccess:"✅ {symbol} 授权成功!",approvalConfirmSwap:"现在您可以执行兑换了。",confirmSwapButton:"确认兑换",approvalFailed:"❌ 授权失败,请重试。",couldNotFetchBalance:"⚠️ 无法获取钱包余额。",couldNotLoadBalance:"⚠️ 无法加载余额,请重试。",couldNotFetchBalanceRetry:"⚠️ 无法获取余额,请重试。",nftSendReview:`📤 发送 **{name}** ({standard} #{tokenId})
59
67
 
60
68
  请检查并填写收件人地址:`,nftCollectionHeader:`🖼️ 您的NFT收藏({count}件):
61
69
 
62
70
  {list}
63
71
 
64
72
  选择要发送的NFT:`,nftNoCollection:"🖼️ 您在此链的钱包中没有NFT。",nftFetchError:"获取NFT时遇到错误。",trendingTokensHeader:"📈 以下是{chain}链上目前上涨趋势的代币列表",trendingTokensQuestion:`
65
- 您想购买哪个代币?`,trendingTokensError:"获取热门代币时遇到错误。",errorProcessingRequest:"处理您的请求时遇到错误。",buttonBuyWith:"用{symbol}购买",buttonUsePercent:"使用{symbol}的{percent}%",buttonBuyToken:"购买{name}({symbol})",buttonSendNft:"发送{name}",buttonSwapTo:"兑换至{name}({symbol})",buttonBuySymbol:"购买{symbol}"}};function lo(e,t){return co[t]?.[e]??co.en[e]??e}function Ls(e,t){return e.replace(/\{(\w+)\}/g,(n,o)=>t[o]??`{${o}}`)}const uo=se.createContext(void 0),Rs=({children:e,initialLanguage:t="en"})=>{const[n,o]=se.useState(t);se.useEffect(()=>{t&&o(t)},[t]);const s=se.useCallback(a=>lo(a,n),[n]),r=se.useCallback((a,l)=>Ls(lo(a,n),l),[n]);return B.jsx(uo.Provider,{value:{language:n,setLanguage:o,t:s,ti:r},children:e})},kn=()=>{const e=se.useContext(uo);if(!e)throw new Error("useLanguage must be used within a LanguageProvider");return e},Hs=se.memo(({onClick:e})=>{const{t}=kn(),n=o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),e())};return B.jsx("button",{className:"chat-button",onClick:e,onKeyDown:n,"aria-label":t("openChat"),title:t("openChatTitle"),type:"button",children:B.jsx("img",{src:_s,width:56,height:56,alt:"Ask AI"})})});function rt(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(o){return s=>{const r=typeof s=="function"?s(o):s,a={...o,...r};return Object.assign(a,{extend:n(a)})}}return Object.assign(t,{extend:n(t)})}const fo="2.45.1";let Tn={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${fo}`};class pe extends Error{constructor(t,n={}){const o=n.cause instanceof pe?n.cause.details:n.cause?.message?n.cause.message:n.details,s=n.cause instanceof pe&&n.cause.docsPath||n.docsPath,r=Tn.getDocsUrl?.({...n,docsPath:s}),a=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...r?[`Docs: ${r}`]:[],...o?[`Details: ${o}`]:[],...Tn.version?[`Version: ${Tn.version}`]:[]].join(`
66
- `);super(a,n.cause?{cause:n.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=o,this.docsPath=s,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=fo}walk(t){return po(this,t)}}function po(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?po(e.cause,t):t?null:e}class xn extends pe{constructor({max:t,min:n,signed:o,size:s,value:r}){super(`Number "${r}" is not in safe ${s?`${s*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class Vs extends pe{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function Nt(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function Ve(e){return Nt(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function nn(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,o=0;for(let s=0;s<n.length-1&&n[t==="left"?s:n.length-s-1].toString()==="0";s++)o++;return n=t==="left"?n.slice(o):n.slice(0,n.length-o),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}class mo extends pe{constructor({offset:t,position:n,size:o}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${o}).`,{name:"SliceOffsetOutOfBoundsError"})}}class ho extends pe{constructor({size:t,targetSize:n,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}function Pt(e,{dir:t,size:n=32}={}){return typeof e=="string"?mt(e,{dir:t,size:n}):Ws(e,{dir:t,size:n})}function mt(e,{dir:t,size:n=32}={}){if(n===null)return e;const o=e.replace("0x","");if(o.length>n*2)throw new ho({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function Ws(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new ho({size:e.length,targetSize:n,type:"bytes"});const o=new Uint8Array(n);for(let s=0;s<n;s++){const r=t==="right";o[r?s:n-s-1]=e[r?s:e.length-s-1]}return o}const Gs=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ft(e,t={}){return typeof e=="number"||typeof e=="bigint"?de(e,t):typeof e=="string"?bo(e,t):typeof e=="boolean"?go(e,t):at(e,t)}function go(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Ut(n,{size:t.size}),Pt(n,{size:t.size})):n}function at(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=Gs[e[s]];const o=`0x${n}`;return typeof t.size=="number"?(Ut(o,{size:t.size}),Pt(o,{dir:"right",size:t.size})):o}function de(e,t={}){const{signed:n,size:o}=t,s=BigInt(e);let r;o?n?r=(1n<<BigInt(o)*8n-1n)-1n:r=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(r=BigInt(Number.MAX_SAFE_INTEGER));const a=typeof r=="bigint"&&n?-r-1n:0;if(r&&s>r||s<a){const f=typeof e=="bigint"?"n":"";throw new xn({max:r?`${r}${f}`:void 0,min:`${a}${f}`,signed:n,size:o,value:`${e}${f}`})}const l=`0x${(n&&s<0?(1n<<BigInt(o*8))+BigInt(s):s).toString(16)}`;return o?Pt(l,{size:o}):l}const $s=new TextEncoder;function bo(e,t={}){const n=$s.encode(e);return at(n,t)}const zs=new TextEncoder;function En(e,t={}){return typeof e=="number"||typeof e=="bigint"?Ys(e,t):typeof e=="boolean"?qs(e,t):Nt(e)?vt(e,t):yo(e,t)}function qs(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(Ut(n,{size:t.size}),Pt(n,{size:t.size})):n}const it={zero:48,nine:57,A:65,F:70,a:97,f:102};function wo(e){if(e>=it.zero&&e<=it.nine)return e-it.zero;if(e>=it.A&&e<=it.F)return e-(it.A-10);if(e>=it.a&&e<=it.f)return e-(it.a-10)}function vt(e,t={}){let n=e;t.size&&(Ut(n,{size:t.size}),n=Pt(n,{dir:"right",size:t.size}));let o=n.slice(2);o.length%2&&(o=`0${o}`);const s=o.length/2,r=new Uint8Array(s);for(let a=0,l=0;a<s;a++){const f=wo(o.charCodeAt(l++)),S=wo(o.charCodeAt(l++));if(f===void 0||S===void 0)throw new pe(`Invalid byte sequence ("${o[l-2]}${o[l-1]}" in "${o}").`);r[a]=f*16+S}return r}function Ys(e,t){const n=de(e,t);return vt(n)}function yo(e,t={}){const n=zs.encode(e);return typeof t.size=="number"?(Ut(n,{size:t.size}),Pt(n,{dir:"right",size:t.size})):n}function Ut(e,{size:t}){if(Ve(e)>t)throw new Vs({givenSize:Ve(e),maxSize:t})}function Ot(e,t={}){const{signed:n}=t;t.size&&Ut(e,{size:t.size});const o=BigInt(e);if(!n)return o;const s=(e.length-2)/2,r=(1n<<BigInt(s)*8n-1n)-1n;return o<=r?o:o-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function on(e,t={}){const n=Ot(e,t),o=Number(n);if(!Number.isSafeInteger(o))throw new xn({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return o}function Sn(e,t){return({exclude:n,format:o})=>({exclude:n,format:(s,r)=>{const a=t(s,r);if(n)for(const l of n)delete a[l];return{...a,...o(s,r)}},type:e})}const vo={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Cn(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?on(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?on(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?vo[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=Js(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const js=Sn("transaction",Cn);function Js(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Xs(e,t){const n=(e.transactions??[]).map(o=>typeof o=="string"?o:Cn(o));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 Ks=Sn("block",Xs);function Zs(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):e.blockTimestamp===null?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}:{}}}const Qs={"0x0":"reverted","0x1":"success"};function er(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(o=>Zs(o)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?on(e.transactionIndex):null,status:e.status?Qs[e.status]:null,type:e.type?vo[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const tr=Sn("transactionReceipt",er),nr={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function or(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=sr(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(o=>at(o)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=de(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=de(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=de(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=de(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=de(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=de(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=nr[e.type]),typeof e.value<"u"&&(n.value=de(e.value)),n}function sr(e){return e.map(t=>({address:t.address,r:t.r?de(BigInt(t.r)):t.r,s:t.s?de(BigInt(t.s)):t.s,chainId:de(t.chainId),nonce:de(t.nonce),...typeof t.yParity<"u"?{yParity:de(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:de(t.v)}:{}}))}const Dt=2n**256n-1n;function Mt(e){return typeof e[0]=="string"?At(e):rr(e)}function rr(e){let t=0;for(const s of e)t+=s.length;const n=new Uint8Array(t);let o=0;for(const s of e)n.set(s,o),o+=s.length;return n}function At(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}class Ao extends pe{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class ar extends pe{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class ir extends pe{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const cr={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new ir({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new ar({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Ao({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 Ao({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,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();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},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function ko(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(cr);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function kt(e,t="hex"){const n=To(e),o=ko(new Uint8Array(n.length));return n.encode(o),t==="hex"?at(o.bytes):o.bytes}function To(e){return Array.isArray(e)?lr(e.map(t=>To(t))):dr(e)}function lr(e){const t=e.reduce((s,r)=>s+r.length,0),n=xo(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:r}of e)r(s)}}}function dr(e){const t=typeof e=="string"?vt(e):e,n=xo(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function xo(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new pe("Length is too large.")}const ur={gwei:9,wei:18},fr={ether:-9,wei:9};function Ue(e,t){let n=e.toString();const o=n.startsWith("-");o&&(n=n.slice(1)),n=n.padStart(t,"0");let[s,r]=[n.slice(0,n.length-t),n.slice(n.length-t)];return r=r.replace(/(0+)$/,""),`${o?"-":""}${s||"0"}${r?`.${r}`:""}`}function pr(e,t="wei"){return Ue(e,ur[t])}function Tt(e,t="wei"){return Ue(e,fr[t])}function Eo(e){const t=Object.entries(e).map(([o,s])=>s===void 0||s===!1?null:[o,s]).filter(Boolean),n=t.reduce((o,[s])=>Math.max(o,s.length),0);return t.map(([o,s])=>` ${`${o}:`.padEnd(n+1)} ${s}`).join(`
67
- `)}class mr extends pe{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class hr extends pe{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Eo(t),"}","","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 gr extends pe{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}function br(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{chainId:o,nonce:s,...r}=n,a=n.address;t.push([o?Ft(o):"0x",a,s?Ft(s):"0x",...zt({},r)])}return t}function So(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(r=>vt(r)):e.blobs,s=[];for(const r of o)s.push(Uint8Array.from(t.blobToKzgCommitment(r)));return n==="bytes"?s:s.map(r=>at(r))}function Co(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(a=>vt(a)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(a=>vt(a)):e.commitments,r=[];for(let a=0;a<o.length;a++){const l=o[a],f=s[a];r.push(Uint8Array.from(t.computeBlobKzgProof(l,f)))}return n==="bytes"?r:r.map(a=>at(a))}function wr(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Bo(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Vt(e,...t){if(!wr(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 sn(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 Io(e,t){Vt(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function yr(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Wt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Bn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function tt(e,t){return e<<32-t|e>>>t}const vr=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Ar(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function kr(e){for(let t=0;t<e.length;t++)e[t]=Ar(e[t]);return e}const No=vr?e=>e:kr;function Tr(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function In(e){return typeof e=="string"&&(e=Tr(e)),Vt(e),e}class Po{}function Fo(e){const t=o=>e().update(In(o)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function xr(e,t,n,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,o);const s=BigInt(32),r=BigInt(4294967295),a=Number(n>>s&r),l=Number(n&r),f=o?4:0,S=o?0:4;e.setUint32(t+f,a,o),e.setUint32(t+S,l,o)}function Er(e,t,n){return e&t^~e&n}function Sr(e,t,n){return e&t^e&n^t&n}class Cr extends Po{constructor(t,n,o,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=o,this.isLE=s,this.buffer=new Uint8Array(t),this.view=Bn(this.buffer)}update(t){sn(this),t=In(t),Vt(t);const{view:n,buffer:o,blockLen:s}=this,r=t.length;for(let a=0;a<r;){const l=Math.min(s-this.pos,r-a);if(l===s){const f=Bn(t);for(;s<=r-a;a+=s)this.process(f,a);continue}o.set(t.subarray(a,a+l),this.pos),this.pos+=l,a+=l,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){sn(this),Io(t,this),this.finished=!0;const{buffer:n,view:o,blockLen:s,isLE:r}=this;let{pos:a}=this;n[a++]=128,Wt(this.buffer.subarray(a)),this.padOffset>s-a&&(this.process(o,0),a=0);for(let _=a;_<s;_++)n[_]=0;xr(o,s-8,BigInt(this.length*8),r),this.process(o,0);const l=Bn(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const S=f/4,N=this.get();if(S>N.length)throw new Error("_sha2: outputLen bigger than state");for(let _=0;_<S;_++)l.setUint32(4*_,N[_],r)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const o=t.slice(0,n);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:o,length:s,finished:r,destroyed:a,pos:l}=this;return t.destroyed=a,t.finished=r,t.length=s,t.pos=l,s%n&&t.buffer.set(o),t}clone(){return this._cloneInto()}}const ht=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),rn=BigInt(2**32-1),Uo=BigInt(32);function Br(e,t=!1){return t?{h:Number(e&rn),l:Number(e>>Uo&rn)}:{h:Number(e>>Uo&rn)|0,l:Number(e&rn)|0}}function Ir(e,t=!1){const n=e.length;let o=new Uint32Array(n),s=new Uint32Array(n);for(let r=0;r<n;r++){const{h:a,l}=Br(e[r],t);[o[r],s[r]]=[a,l]}return[o,s]}const Nr=(e,t,n)=>e<<n|t>>>32-n,Pr=(e,t,n)=>t<<n|e>>>32-n,Fr=(e,t,n)=>t<<n-32|e>>>64-n,Ur=(e,t,n)=>e<<n-32|t>>>64-n,Or=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]),gt=new Uint32Array(64);class Dr extends Cr{constructor(t=32){super(64,t,8,!1),this.A=ht[0]|0,this.B=ht[1]|0,this.C=ht[2]|0,this.D=ht[3]|0,this.E=ht[4]|0,this.F=ht[5]|0,this.G=ht[6]|0,this.H=ht[7]|0}get(){const{A:t,B:n,C:o,D:s,E:r,F:a,G:l,H:f}=this;return[t,n,o,s,r,a,l,f]}set(t,n,o,s,r,a,l,f){this.A=t|0,this.B=n|0,this.C=o|0,this.D=s|0,this.E=r|0,this.F=a|0,this.G=l|0,this.H=f|0}process(t,n){for(let _=0;_<16;_++,n+=4)gt[_]=t.getUint32(n,!1);for(let _=16;_<64;_++){const b=gt[_-15],E=gt[_-2],v=tt(b,7)^tt(b,18)^b>>>3,C=tt(E,17)^tt(E,19)^E>>>10;gt[_]=C+gt[_-7]+v+gt[_-16]|0}let{A:o,B:s,C:r,D:a,E:l,F:f,G:S,H:N}=this;for(let _=0;_<64;_++){const b=tt(l,6)^tt(l,11)^tt(l,25),E=N+b+Er(l,f,S)+Or[_]+gt[_]|0,C=(tt(o,2)^tt(o,13)^tt(o,22))+Sr(o,s,r)|0;N=S,S=f,f=l,l=a+E|0,a=r,r=s,s=o,o=E+C|0}o=o+this.A|0,s=s+this.B|0,r=r+this.C|0,a=a+this.D|0,l=l+this.E|0,f=f+this.F|0,S=S+this.G|0,N=N+this.H|0,this.set(o,s,r,a,l,f,S,N)}roundClean(){Wt(gt)}destroy(){this.set(0,0,0,0,0,0,0,0),Wt(this.buffer)}}const Mr=Fo(()=>new Dr);function _r(e,t){return Mr(Nt(e,{strict:!1})?En(e):e)}function Lr(e){const{commitment:t,version:n=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),s=_r(t);return s.set([n],0),o==="bytes"?s:at(s)}function Rr(e){const{commitments:t,version:n}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const r of t)s.push(Lr({commitment:r,to:o,version:n}));return s}const Oo=6,Do=32,Nn=4096,Mo=Do*Nn,_o=Mo*Oo-1-1*Nn*Oo,Lo=1;class Hr extends pe{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class Ro extends pe{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Vr extends pe{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class Wr extends pe{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${Lo}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function Gr(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?vt(e.data):e.data,o=Ve(n);if(!o)throw new Ro;if(o>_o)throw new Hr({maxSize:_o,size:o});const s=[];let r=!0,a=0;for(;r;){const l=ko(new Uint8Array(Mo));let f=0;for(;f<Nn;){const S=n.slice(a,a+(Do-1));if(l.pushByte(0),l.pushBytes(S),S.length<31){l.pushByte(128),r=!1;break}f++,a+=31}s.push(l)}return t==="bytes"?s.map(l=>l.bytes):s.map(l=>at(l.bytes))}function $r(e){const{data:t,kzg:n,to:o}=e,s=e.blobs??Gr({data:t,to:o}),r=e.commitments??So({blobs:s,kzg:n,to:o}),a=e.proofs??Co({blobs:s,commitments:r,kzg:n,to:o}),l=[];for(let f=0;f<s.length;f++)l.push({blob:s[f],commitment:r[f],proof:a[f]});return l}class nt extends pe{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class an extends pe{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class _t extends pe{constructor({cause:t,message:n}={}){const o=n?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${o?`with reason: ${o}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(_t,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(_t,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class xt extends pe{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Tt(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(xt,"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 Pn extends pe{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Tt(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Pn,"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 Fn extends pe{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(Fn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Un extends pe{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
68
- `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(Un,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class On extends pe{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(On,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Dn extends pe{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
69
- `),{cause:t,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(Dn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class Mn extends pe{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(Mn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class _n extends pe{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(_n,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Ln extends pe{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Ln,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Gt extends pe{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:o}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Tt(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${o?` = ${Tt(o)} gwei`:""}).`].join(`
70
- `),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(Gt,"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 Ho extends pe{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}class Vo extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const o=this.keys().next().value;o&&this.delete(o)}return this}}const zr=BigInt(0),$t=BigInt(1),qr=BigInt(2),Yr=BigInt(7),jr=BigInt(256),Jr=BigInt(113),Wo=[],Go=[],$o=[];for(let e=0,t=$t,n=1,o=0;e<24;e++){[n,o]=[o,(2*n+3*o)%5],Wo.push(2*(5*o+n)),Go.push((e+1)*(e+2)/2%64);let s=zr;for(let r=0;r<7;r++)t=(t<<$t^(t>>Yr)*Jr)%jr,t&qr&&(s^=$t<<($t<<BigInt(r))-$t);$o.push(s)}const zo=Ir($o,!0),Xr=zo[0],Kr=zo[1],qo=(e,t,n)=>n>32?Fr(e,t,n):Nr(e,t,n),Yo=(e,t,n)=>n>32?Ur(e,t,n):Pr(e,t,n);function Zr(e,t=24){const n=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let a=0;a<10;a++)n[a]=e[a]^e[a+10]^e[a+20]^e[a+30]^e[a+40];for(let a=0;a<10;a+=2){const l=(a+8)%10,f=(a+2)%10,S=n[f],N=n[f+1],_=qo(S,N,1)^n[l],b=Yo(S,N,1)^n[l+1];for(let E=0;E<50;E+=10)e[a+E]^=_,e[a+E+1]^=b}let s=e[2],r=e[3];for(let a=0;a<24;a++){const l=Go[a],f=qo(s,r,l),S=Yo(s,r,l),N=Wo[a];s=e[N],r=e[N+1],e[N]=f,e[N+1]=S}for(let a=0;a<50;a+=10){for(let l=0;l<10;l++)n[l]=e[a+l];for(let l=0;l<10;l++)e[a+l]^=~n[(l+2)%10]&n[(l+4)%10]}e[0]^=Xr[o],e[1]^=Kr[o]}Wt(n)}class Rn extends Po{constructor(t,n,o,s=!1,r=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=o,this.enableXOF=s,this.rounds=r,Bo(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=yr(this.state)}clone(){return this._cloneInto()}keccak(){No(this.state32),Zr(this.state32,this.rounds),No(this.state32),this.posOut=0,this.pos=0}update(t){sn(this),t=In(t),Vt(t);const{blockLen:n,state:o}=this,s=t.length;for(let r=0;r<s;){const a=Math.min(n-this.pos,s-r);for(let l=0;l<a;l++)o[this.pos++]^=t[r++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:o,blockLen:s}=this;t[o]^=n,(n&128)!==0&&o===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){sn(this,!1),Vt(t),this.finish();const n=this.state,{blockLen:o}=this;for(let s=0,r=t.length;s<r;){this.posOut>=o&&this.keccak();const a=Math.min(o-this.posOut,r-s);t.set(n.subarray(this.posOut,this.posOut+a),s),this.posOut+=a,s+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Bo(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Io(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Wt(this.state)}_cloneInto(t){const{blockLen:n,suffix:o,outputLen:s,rounds:r,enableXOF:a}=this;return t||(t=new Rn(n,o,s,a,r)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=o,t.outputLen=s,t.enableXOF=a,t.destroyed=this.destroyed,t}}const Qr=(e,t,n)=>Fo(()=>new Rn(t,e,n)),ea=Qr(1,136,256/8);function jo(e,t){const n=t||"hex",o=ea(Nt(e,{strict:!1})?En(e):e);return n==="bytes"?o:Ft(o)}const Hn=new Vo(8192);function ta(e,t){if(Hn.has(`${e}.${t}`))return Hn.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),o=jo(yo(n),"bytes"),s=n.split("");for(let a=0;a<40;a+=2)o[a>>1]>>4>=8&&s[a]&&(s[a]=s[a].toUpperCase()),(o[a>>1]&15)>=8&&s[a+1]&&(s[a+1]=s[a+1].toUpperCase());const r=`0x${s.join("")}`;return Hn.set(`${e}.${t}`,r),r}const na=/^0x[a-fA-F0-9]{40}$/,Vn=new Vo(8192);function Le(e,t){const{strict:n=!0}=t??{},o=`${e}.${n}`;if(Vn.has(o))return Vn.get(o);const s=na.test(e)?e.toLowerCase()===e?!0:n?ta(e)===e:!0:!1;return Vn.set(o,s),s}function Wn(e,t,n,{strict:o}={}){return Nt(e,{strict:!1})?sa(e,t,n,{strict:o}):oa(e,t,n,{strict:o})}function Jo(e,t){if(typeof t=="number"&&t>0&&t>Ve(e)-1)throw new mo({offset:t,position:"start",size:Ve(e)})}function Xo(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Ve(e)!==n-t)throw new mo({offset:n,position:"end",size:Ve(e)})}function oa(e,t,n,{strict:o}={}){Jo(e,t);const s=e.slice(t,n);return o&&Xo(s,t,n),s}function sa(e,t,n,{strict:o}={}){Jo(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return o&&Xo(s,t,n),s}function ra(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:o}=n,s=n.address;if(!Le(s))throw new nt({address:s});if(o<0)throw new an({chainId:o})}Gn(e)}function aa(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new Ro;for(const n of t){const o=Ve(n),s=on(Wn(n,0,1));if(o!==32)throw new Vr({hash:n,size:o});if(s!==Lo)throw new Wr({hash:n,version:s})}}Gn(e)}function Gn(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:o,to:s}=e;if(t<=0)throw new an({chainId:t});if(s&&!Le(s))throw new nt({address:s});if(o&&o>Dt)throw new xt({maxFeePerGas:o});if(n&&o&&n>o)throw new Gt({maxFeePerGas:o,maxPriorityFeePerGas:n})}function ia(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:s,to:r}=e;if(t<=0)throw new an({chainId:t});if(r&&!Le(r))throw new nt({address:r});if(n||s)throw new pe("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(o&&o>Dt)throw new xt({maxFeePerGas:o})}function ca(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:s,to:r}=e;if(r&&!Le(r))throw new nt({address:r});if(typeof t<"u"&&t<=0)throw new an({chainId:t});if(n||s)throw new pe("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(o&&o>Dt)throw new xt({maxFeePerGas:o})}function la(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new hr({transaction:e})}function cn(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n<e.length;n++){const{address:o,storageKeys:s}=e[n];for(let r=0;r<s.length;r++)if(s[r].length-2!==64)throw new gr({storageKey:s[r]});if(!Le(o,{strict:!1}))throw new nt({address:o});t.push([o,s])}return t}function da(e,t){const n=la(e);return n==="eip1559"?pa(e,t):n==="eip2930"?ma(e,t):n==="eip4844"?fa(e,t):n==="eip7702"?ua(e,t):ha(e,t)}function ua(e,t){const{authorizationList:n,chainId:o,gas:s,nonce:r,to:a,value:l,maxFeePerGas:f,maxPriorityFeePerGas:S,accessList:N,data:_}=e;ra(e);const b=cn(N),E=br(n);return At(["0x04",kt([de(o),r?de(r):"0x",S?de(S):"0x",f?de(f):"0x",s?de(s):"0x",a??"0x",l?de(l):"0x",_??"0x",b,E,...zt(e,t)])])}function fa(e,t){const{chainId:n,gas:o,nonce:s,to:r,value:a,maxFeePerBlobGas:l,maxFeePerGas:f,maxPriorityFeePerGas:S,accessList:N,data:_}=e;aa(e);let b=e.blobVersionedHashes,E=e.sidecars;if(e.blobs&&(typeof b>"u"||typeof E>"u")){const q=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(ye=>at(ye)),K=e.kzg,he=So({blobs:q,kzg:K});if(typeof b>"u"&&(b=Rr({commitments:he})),typeof E>"u"){const ye=Co({blobs:q,commitments:he,kzg:K});E=$r({blobs:q,commitments:he,proofs:ye})}}const v=cn(N),C=[de(n),s?de(s):"0x",S?de(S):"0x",f?de(f):"0x",o?de(o):"0x",r??"0x",a?de(a):"0x",_??"0x",v,l?de(l):"0x",b??[],...zt(e,t)],D=[],J=[],I=[];if(E)for(let q=0;q<E.length;q++){const{blob:K,commitment:he,proof:ye}=E[q];D.push(K),J.push(he),I.push(ye)}return At(["0x03",kt(E?[C,D,J,I]:C)])}function pa(e,t){const{chainId:n,gas:o,nonce:s,to:r,value:a,maxFeePerGas:l,maxPriorityFeePerGas:f,accessList:S,data:N}=e;Gn(e);const _=cn(S),b=[de(n),s?de(s):"0x",f?de(f):"0x",l?de(l):"0x",o?de(o):"0x",r??"0x",a?de(a):"0x",N??"0x",_,...zt(e,t)];return At(["0x02",kt(b)])}function ma(e,t){const{chainId:n,gas:o,data:s,nonce:r,to:a,value:l,accessList:f,gasPrice:S}=e;ia(e);const N=cn(f),_=[de(n),r?de(r):"0x",S?de(S):"0x",o?de(o):"0x",a??"0x",l?de(l):"0x",s??"0x",N,...zt(e,t)];return At(["0x01",kt(_)])}function ha(e,t){const{chainId:n=0,gas:o,data:s,nonce:r,to:a,value:l,gasPrice:f}=e;ca(e);let S=[r?de(r):"0x",f?de(f):"0x",o?de(o):"0x",a??"0x",l?de(l):"0x",s??"0x"];if(t){const N=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const E=27n+(t.v===27n?0n:1n);if(t.v!==E)throw new mr({v:t.v});return E})(),_=nn(t.r),b=nn(t.s);S=[...S,de(N),_==="0x00"?"0x":_,b==="0x00"?"0x":b]}else n>0&&(S=[...S,de(n),"0x","0x"]);return kt(S)}function zt(e,t){const n=t??e,{v:o,yParity:s}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof o>"u"&&typeof s>"u")return[];const r=nn(n.r),a=nn(n.s);return[typeof s=="number"?s?de(1):"0x":o===0n?"0x":o===1n?de(1):o===27n?"0x":de(1),r==="0x00"?"0x":r,a==="0x00"?"0x":a]}const ga={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},ba={block:Ks({format(e){return{transactions:e.transactions?.map(n=>{if(typeof n=="string")return n;const o=Cn(n);return o.typeHex==="0x7e"&&(o.isSystemTx=n.isSystemTx,o.mint=n.mint?Ot(n.mint):void 0,o.sourceHash=n.sourceHash,o.type="deposit"),o}),stateRoot:e.stateRoot}}}),transaction:js({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?Ot(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:tr({format(e){return{l1GasPrice:e.l1GasPrice?Ot(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?Ot(e.l1GasUsed):null,l1Fee:e.l1Fee?Ot(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function wa(e,t){return Aa(e)?va(e):da(e,t)}const ya={transaction:wa};function va(e){ka(e);const{sourceHash:t,data:n,from:o,gas:s,isSystemTx:r,mint:a,to:l,value:f}=e,S=[t,o,l??"0x",a?Ft(a):"0x",f?Ft(f):"0x",s?Ft(s):"0x",r?"0x1":"0x",n??"0x"];return At(["0x7e",kt(S)])}function Aa(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function ka(e){const{from:t,to:n}=e;if(t&&!Le(t))throw new nt({address:t});if(n&&!Le(n))throw new nt({address:n})}const ln={blockTime:2e3,contracts:ga,formatters:ba,serializers:ya},Ta=rt({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}}}),xa=rt({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}}}),qt=1,Ko=rt({...ln,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:{...ln.contracts,disputeGameFactory:{[qt]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[qt]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[qt]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[qt]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:qt});({...Ko});const Ea=rt({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}}});function $n(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}class Sa extends pe{constructor({docsPath:t}={}){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(`
71
- `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}function zn(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new Oa(e.type);return`${e.name}(${Zo(e.inputs,{includeName:t})})`}function Zo(e,{includeName:t=!1}={}){return e?e.map(n=>Ca(n,{includeName:t})).join(t?", ":","):""}function Ca(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Zo(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class Ba extends pe{constructor({expectedLength:t,givenLength:n,type:o}){super([`ABI encoding array length mismatch for type ${o}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
72
- `),{name:"AbiEncodingArrayLengthMismatchError"})}}class Ia extends pe{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${Ve(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class Na extends pe{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
73
- `),{name:"AbiEncodingLengthMismatchError"})}}class Qo extends pe{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
74
- `),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class Pa extends pe{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${zn(t.abiItem)}\`, and`,`\`${n.type}\` in \`${zn(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class Fa extends pe{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
75
- `),{docsPath:n,name:"InvalidAbiEncodingType"})}}class Ua extends pe{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
76
- `),{name:"InvalidArrayError"})}}class Oa extends pe{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
77
- `),{name:"InvalidDefinitionTypeError"})}}const Da=e=>jo(En(e));function Ma(e){return Da(e)}function _a(e,t){return e.exec(t)?.groups}const es=/^tuple(?<array>(\[(\d*)\])*)$/;function qn(e){let t=e.type;if(es.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s<n;s++){const r=e.components[s];t+=qn(r),s<n-1&&(t+=", ")}const o=_a(es,e.type);return t+=`)${o?.array||""}`,qn({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function Yt(e){let t="";const n=e.length;for(let o=0;o<n;o++){const s=e[o];t+=qn(s),o!==n-1&&(t+=", ")}return t}function La(e){return e.type==="function"?`function ${e.name}(${Yt(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${Yt(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Yt(e.inputs)})`:e.type==="error"?`error ${e.name}(${Yt(e.inputs)})`:e.type==="constructor"?`constructor(${Yt(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}function Ra(e){let t=!0,n="",o=0,s="",r=!1;for(let a=0;a<e.length;a++){const l=e[a];if(["(",")",","].includes(l)&&(t=!0),l==="("&&o++,l===")"&&o--,!!t){if(o===0){if(l===" "&&["event","function",""].includes(s))s="";else if(s+=l,l===")"){r=!0;break}continue}if(l===" "){e[a-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}s+=l,n+=l}}if(!r)throw new pe("Unable to normalize signature.");return s}const Ha=e=>{const t=typeof e=="string"?e:La(e);return Ra(t)};function ts(e){return Ma(Ha(e))}const ns=e=>Wn(ts(e),0,4),Va=/^(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 Wa(e,t){if(e.length!==t.length)throw new Na({expectedLength:e.length,givenLength:t.length});const n=Ga({params:e,values:t}),o=jn(n);return o.length===0?"0x":o}function Ga({params:e,values:t}){const n=[];for(let o=0;o<e.length;o++)n.push(Yn({param:e[o],value:t[o]}));return n}function Yn({param:e,value:t}){const n=Ka(e.type);if(n){const[o,s]=n;return za(t,{length:o,param:{...e,type:s}})}if(e.type==="tuple")return Xa(t,{param:e});if(e.type==="address")return $a(t);if(e.type==="bool")return Ya(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const o=e.type.startsWith("int"),[,,s="256"]=Va.exec(e.type)??[];return ja(t,{signed:o,size:Number(s)})}if(e.type.startsWith("bytes"))return qa(t,{param:e});if(e.type==="string")return Ja(t);throw new Fa(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function jn(e){let t=0;for(let r=0;r<e.length;r++){const{dynamic:a,encoded:l}=e[r];a?t+=32:t+=Ve(l)}const n=[],o=[];let s=0;for(let r=0;r<e.length;r++){const{dynamic:a,encoded:l}=e[r];a?(n.push(de(t+s,{size:32})),o.push(l),s+=Ve(l)):n.push(l)}return Mt([...n,...o])}function $a(e){if(!Le(e))throw new nt({address:e});return{dynamic:!1,encoded:mt(e.toLowerCase())}}function za(e,{length:t,param:n}){const o=t===null;if(!Array.isArray(e))throw new Ua(e);if(!o&&e.length!==t)throw new Ba({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let s=!1;const r=[];for(let a=0;a<e.length;a++){const l=Yn({param:n,value:e[a]});l.dynamic&&(s=!0),r.push(l)}if(o||s){const a=jn(r);if(o){const l=de(r.length,{size:32});return{dynamic:!0,encoded:r.length>0?Mt([l,a]):l}}if(s)return{dynamic:!0,encoded:a}}return{dynamic:!1,encoded:Mt(r.map(({encoded:a})=>a))}}function qa(e,{param:t}){const[,n]=t.type.split("bytes"),o=Ve(e);if(!n){let s=e;return o%32!==0&&(s=mt(s,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:Mt([mt(de(o,{size:32})),s])}}if(o!==Number.parseInt(n,10))throw new Ia({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:mt(e,{dir:"right"})}}function Ya(e){if(typeof e!="boolean")throw new pe(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:mt(go(e))}}function ja(e,{signed:t,size:n=256}){if(typeof n=="number"){const o=2n**(BigInt(n)-(t?1n:0n))-1n,s=t?-o-1n:0n;if(e>o||e<s)throw new xn({max:o.toString(),min:s.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:de(e,{size:32,signed:t})}}function Ja(e){const t=bo(e),n=Math.ceil(Ve(t)/32),o=[];for(let s=0;s<n;s++)o.push(mt(Wn(t,s*32,(s+1)*32),{dir:"right"}));return{dynamic:!0,encoded:Mt([mt(de(Ve(t),{size:32})),...o])}}function Xa(e,{param:t}){let n=!1;const o=[];for(let s=0;s<t.components.length;s++){const r=t.components[s],a=Array.isArray(e)?s:r.name,l=Yn({param:r,value:e[a]});o.push(l),l.dynamic&&(n=!0)}return{dynamic:n,encoded:n?jn(o):Mt(o.map(({encoded:s})=>s))}}function Ka(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const Za=ts;function Qa(e){const{abi:t,args:n=[],name:o}=e,s=Nt(o,{strict:!1}),r=t.filter(l=>s?l.type==="function"?ns(l)===o:l.type==="event"?Za(l)===o:!1:"name"in l&&l.name===o);if(r.length===0)return;if(r.length===1)return r[0];let a;for(const l of r){if(!("inputs"in l))continue;if(!n||n.length===0){if(!l.inputs||l.inputs.length===0)return l;continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==n.length)continue;if(n.every((S,N)=>{const _="inputs"in l&&l.inputs[N];return _?Jn(S,_):!1})){if(a&&"inputs"in a&&a.inputs){const S=os(l.inputs,a.inputs,n);if(S)throw new Pa({abiItem:l,type:S[0]},{abiItem:a,type:S[1]})}a=l}}return a||r[0]}function Jn(e,t){const n=typeof e,o=t.type;switch(o){case"address":return Le(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((s,r)=>n==="object"&&Jn(Object.values(e)[r],s)):/^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(o)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(s=>Jn(s,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function os(e,t,n){for(const o in e){const s=e[o],r=t[o];if(s.type==="tuple"&&r.type==="tuple"&&"components"in s&&"components"in r)return os(s.components,r.components,n[o]);const a=[s.type,r.type];if(a.includes("address")&&a.includes("bytes20")?!0:a.includes("address")&&a.includes("string")?Le(n[o],{strict:!1}):a.includes("address")&&a.includes("bytes")?Le(n[o],{strict:!1}):!1)return a}}function ss(e){return e.reduce((t,{slot:n,value:o})=>`${t} ${n}: ${o}
73
+ 您想购买哪个代币?`,trendingTokensError:"获取热门代币时遇到错误。",errorProcessingRequest:"处理您的请求时遇到错误。",buttonBuyWith:"用{symbol}购买",buttonUsePercent:"使用{symbol}的{percent}%",buttonBuyToken:"购买{name}({symbol})",buttonSendNft:"发送{name}",buttonSwapTo:"兑换至{name}({symbol})",buttonBuySymbol:"购买{symbol}",viewBalancesLoading:"💰 正在获取钱包余额...",viewBalancesHeader:`💰 您在{chain}的代币余额:
74
+
75
+ {list}
76
+
77
+ 选择要操作的代币:`,viewBalancesEmpty:"💰 您的钱包在此链上没有任何代币。",viewBalancesFetchError:"获取余额时遇到错误,请重试。",buttonSendToken:"发送{symbol}",buttonSwapToken:"兑换{symbol}",buttonBuyMoreToken:"购买更多{symbol}"}};function fo(e,t){return uo[t]?.[e]??uo.en[e]??e}function Ls(e,t){return e.replace(/\{(\w+)\}/g,(n,o)=>t[o]??`{${o}}`)}const po=se.createContext(void 0),Rs=({children:e,initialLanguage:t="en"})=>{const[n,o]=se.useState(t);se.useEffect(()=>{t&&o(t)},[t]);const s=se.useCallback(r=>fo(r,n),[n]),a=se.useCallback((r,l)=>Ls(fo(r,n),l),[n]);return C.jsx(po.Provider,{value:{language:n,setLanguage:o,t:s,ti:a},children:e})},xn=()=>{const e=se.useContext(po);if(!e)throw new Error("useLanguage must be used within a LanguageProvider");return e},Hs=se.memo(({onClick:e})=>{const{t}=xn(),n=o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),e())};return C.jsx("button",{className:"chat-button",onClick:e,onKeyDown:n,"aria-label":t("openChat"),title:t("openChatTitle"),type:"button",children:C.jsx("img",{src:_s,width:56,height:56,alt:"Ask AI"})})});function lt(e){const t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(o){return s=>{const a=typeof s=="function"?s(o):s,r={...o,...a};return Object.assign(r,{extend:n(r)})}}return Object.assign(t,{extend:n(t)})}const mo="2.45.1";let En={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${mo}`};class pe extends Error{constructor(t,n={}){const o=n.cause instanceof pe?n.cause.details:n.cause?.message?n.cause.message:n.details,s=n.cause instanceof pe&&n.cause.docsPath||n.docsPath,a=En.getDocsUrl?.({...n,docsPath:s}),r=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...a?[`Docs: ${a}`]:[],...o?[`Details: ${o}`]:[],...En.version?[`Version: ${En.version}`]:[]].join(`
78
+ `);super(r,n.cause?{cause:n.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=o,this.docsPath=s,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=mo}walk(t){return ho(this,t)}}function ho(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?ho(e.cause,t):t?null:e}class Sn extends pe{constructor({max:t,min:n,signed:o,size:s,value:a}){super(`Number "${a}" is not in safe ${s?`${s*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class Vs extends pe{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function Ft(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function We(e){return Ft(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function an(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,o=0;for(let s=0;s<n.length-1&&n[t==="left"?s:n.length-s-1].toString()==="0";s++)o++;return n=t==="left"?n.slice(o):n.slice(0,n.length-o),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}class bo extends pe{constructor({offset:t,position:n,size:o}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${o}).`,{name:"SliceOffsetOutOfBoundsError"})}}class go extends pe{constructor({size:t,targetSize:n,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}function Ut(e,{dir:t,size:n=32}={}){return typeof e=="string"?gt(e,{dir:t,size:n}):Ws(e,{dir:t,size:n})}function gt(e,{dir:t,size:n=32}={}){if(n===null)return e;const o=e.replace("0x","");if(o.length>n*2)throw new go({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function Ws(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new go({size:e.length,targetSize:n,type:"bytes"});const o=new Uint8Array(n);for(let s=0;s<n;s++){const a=t==="right";o[a?s:n-s-1]=e[a?s:e.length-s-1]}return o}const $s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ot(e,t={}){return typeof e=="number"||typeof e=="bigint"?de(e,t):typeof e=="string"?yo(e,t):typeof e=="boolean"?wo(e,t):dt(e,t)}function wo(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Dt(n,{size:t.size}),Ut(n,{size:t.size})):n}function dt(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=$s[e[s]];const o=`0x${n}`;return typeof t.size=="number"?(Dt(o,{size:t.size}),Ut(o,{dir:"right",size:t.size})):o}function de(e,t={}){const{signed:n,size:o}=t,s=BigInt(e);let a;o?n?a=(1n<<BigInt(o)*8n-1n)-1n:a=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(a=BigInt(Number.MAX_SAFE_INTEGER));const r=typeof a=="bigint"&&n?-a-1n:0;if(a&&s>a||s<r){const d=typeof e=="bigint"?"n":"";throw new Sn({max:a?`${a}${d}`:void 0,min:`${r}${d}`,signed:n,size:o,value:`${e}${d}`})}const l=`0x${(n&&s<0?(1n<<BigInt(o*8))+BigInt(s):s).toString(16)}`;return o?Ut(l,{size:o}):l}const Gs=new TextEncoder;function yo(e,t={}){const n=Gs.encode(e);return dt(n,t)}const zs=new TextEncoder;function Bn(e,t={}){return typeof e=="number"||typeof e=="bigint"?Ys(e,t):typeof e=="boolean"?qs(e,t):Ft(e)?Tt(e,t):Ao(e,t)}function qs(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(Dt(n,{size:t.size}),Ut(n,{size:t.size})):n}const ut={zero:48,nine:57,A:65,F:70,a:97,f:102};function vo(e){if(e>=ut.zero&&e<=ut.nine)return e-ut.zero;if(e>=ut.A&&e<=ut.F)return e-(ut.A-10);if(e>=ut.a&&e<=ut.f)return e-(ut.a-10)}function Tt(e,t={}){let n=e;t.size&&(Dt(n,{size:t.size}),n=Ut(n,{dir:"right",size:t.size}));let o=n.slice(2);o.length%2&&(o=`0${o}`);const s=o.length/2,a=new Uint8Array(s);for(let r=0,l=0;r<s;r++){const d=vo(o.charCodeAt(l++)),S=vo(o.charCodeAt(l++));if(d===void 0||S===void 0)throw new pe(`Invalid byte sequence ("${o[l-2]}${o[l-1]}" in "${o}").`);a[r]=d*16+S}return a}function Ys(e,t){const n=de(e,t);return Tt(n)}function Ao(e,t={}){const n=zs.encode(e);return typeof t.size=="number"?(Dt(n,{size:t.size}),Ut(n,{dir:"right",size:t.size})):n}function Dt(e,{size:t}){if(We(e)>t)throw new Vs({givenSize:We(e),maxSize:t})}function Mt(e,t={}){const{signed:n}=t;t.size&&Dt(e,{size:t.size});const o=BigInt(e);if(!n)return o;const s=(e.length-2)/2,a=(1n<<BigInt(s)*8n-1n)-1n;return o<=a?o:o-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function rn(e,t={}){const n=Mt(e,t),o=Number(n);if(!Number.isSafeInteger(o))throw new Sn({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${n}n`});return o}function Cn(e,t){return({exclude:n,format:o})=>({exclude:n,format:(s,a)=>{const r=t(s,a);if(n)for(const l of n)delete r[l];return{...r,...o(s,a)}},type:e})}const ko={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function In(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?rn(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?rn(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?ko[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=Js(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const js=Cn("transaction",In);function Js(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Xs(e,t){const n=(e.transactions??[]).map(o=>typeof o=="string"?o:In(o));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 Ks=Cn("block",Xs);function Zs(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):e.blockTimestamp===null?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}:{}}}const Qs={"0x0":"reverted","0x1":"success"};function ea(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(o=>Zs(o)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?rn(e.transactionIndex):null,status:e.status?Qs[e.status]:null,type:e.type?ko[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const ta=Cn("transactionReceipt",ea),na={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function oa(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=sa(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(o=>dt(o)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=de(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=de(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=de(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=de(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=de(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=de(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=na[e.type]),typeof e.value<"u"&&(n.value=de(e.value)),n}function sa(e){return e.map(t=>({address:t.address,r:t.r?de(BigInt(t.r)):t.r,s:t.s?de(BigInt(t.s)):t.s,chainId:de(t.chainId),nonce:de(t.nonce),...typeof t.yParity<"u"?{yParity:de(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:de(t.v)}:{}}))}const _t=2n**256n-1n;function Lt(e){return typeof e[0]=="string"?xt(e):aa(e)}function aa(e){let t=0;for(const s of e)t+=s.length;const n=new Uint8Array(t);let o=0;for(const s of e)n.set(s,o),o+=s.length;return n}function xt(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}class To extends pe{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class ra extends pe{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class ia extends pe{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const ca={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new ia({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new ra({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new To({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 To({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,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();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},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function xo(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(ca);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function Et(e,t="hex"){const n=Eo(e),o=xo(new Uint8Array(n.length));return n.encode(o),t==="hex"?dt(o.bytes):o.bytes}function Eo(e){return Array.isArray(e)?la(e.map(t=>Eo(t))):da(e)}function la(e){const t=e.reduce((s,a)=>s+a.length,0),n=So(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:a}of e)a(s)}}}function da(e){const t=typeof e=="string"?Tt(e):e,n=So(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function So(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new pe("Length is too large.")}const ua={gwei:9,wei:18},fa={ether:-9,wei:9};function Oe(e,t){let n=e.toString();const o=n.startsWith("-");o&&(n=n.slice(1)),n=n.padStart(t,"0");let[s,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,""),`${o?"-":""}${s||"0"}${a?`.${a}`:""}`}function pa(e,t="wei"){return Oe(e,ua[t])}function St(e,t="wei"){return Oe(e,fa[t])}function Bo(e){const t=Object.entries(e).map(([o,s])=>s===void 0||s===!1?null:[o,s]).filter(Boolean),n=t.reduce((o,[s])=>Math.max(o,s.length),0);return t.map(([o,s])=>` ${`${o}:`.padEnd(n+1)} ${s}`).join(`
79
+ `)}class ma extends pe{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class ha extends pe{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Bo(t),"}","","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 ba extends pe{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}function ga(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{chainId:o,nonce:s,...a}=n,r=n.address;t.push([o?Ot(o):"0x",r,s?Ot(s):"0x",...jt({},a)])}return t}function Co(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(a=>Tt(a)):e.blobs,s=[];for(const a of o)s.push(Uint8Array.from(t.blobToKzgCommitment(a)));return n==="bytes"?s:s.map(a=>dt(a))}function Io(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(r=>Tt(r)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(r=>Tt(r)):e.commitments,a=[];for(let r=0;r<o.length;r++){const l=o[r],d=s[r];a.push(Uint8Array.from(t.computeBlobKzgProof(l,d)))}return n==="bytes"?a:a.map(r=>dt(r))}function wa(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function No(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Gt(e,...t){if(!wa(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 cn(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 Po(e,t){Gt(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function ya(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function zt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Nn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function rt(e,t){return e<<32-t|e>>>t}const va=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Aa(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function ka(e){for(let t=0;t<e.length;t++)e[t]=Aa(e[t]);return e}const Fo=va?e=>e:ka;function Ta(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Pn(e){return typeof e=="string"&&(e=Ta(e)),Gt(e),e}class Uo{}function Oo(e){const t=o=>e().update(Pn(o)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function xa(e,t,n,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,o);const s=BigInt(32),a=BigInt(4294967295),r=Number(n>>s&a),l=Number(n&a),d=o?4:0,S=o?0:4;e.setUint32(t+d,r,o),e.setUint32(t+S,l,o)}function Ea(e,t,n){return e&t^~e&n}function Sa(e,t,n){return e&t^e&n^t&n}class Ba extends Uo{constructor(t,n,o,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=o,this.isLE=s,this.buffer=new Uint8Array(t),this.view=Nn(this.buffer)}update(t){cn(this),t=Pn(t),Gt(t);const{view:n,buffer:o,blockLen:s}=this,a=t.length;for(let r=0;r<a;){const l=Math.min(s-this.pos,a-r);if(l===s){const d=Nn(t);for(;s<=a-r;r+=s)this.process(d,r);continue}o.set(t.subarray(r,r+l),this.pos),this.pos+=l,r+=l,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){cn(this),Po(t,this),this.finished=!0;const{buffer:n,view:o,blockLen:s,isLE:a}=this;let{pos:r}=this;n[r++]=128,zt(this.buffer.subarray(r)),this.padOffset>s-r&&(this.process(o,0),r=0);for(let _=r;_<s;_++)n[_]=0;xa(o,s-8,BigInt(this.length*8),a),this.process(o,0);const l=Nn(t),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const S=d/4,N=this.get();if(S>N.length)throw new Error("_sha2: outputLen bigger than state");for(let _=0;_<S;_++)l.setUint32(4*_,N[_],a)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const o=t.slice(0,n);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:o,length:s,finished:a,destroyed:r,pos:l}=this;return t.destroyed=r,t.finished=a,t.length=s,t.pos=l,s%n&&t.buffer.set(o),t}clone(){return this._cloneInto()}}const wt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ln=BigInt(2**32-1),Do=BigInt(32);function Ca(e,t=!1){return t?{h:Number(e&ln),l:Number(e>>Do&ln)}:{h:Number(e>>Do&ln)|0,l:Number(e&ln)|0}}function Ia(e,t=!1){const n=e.length;let o=new Uint32Array(n),s=new Uint32Array(n);for(let a=0;a<n;a++){const{h:r,l}=Ca(e[a],t);[o[a],s[a]]=[r,l]}return[o,s]}const Na=(e,t,n)=>e<<n|t>>>32-n,Pa=(e,t,n)=>t<<n|e>>>32-n,Fa=(e,t,n)=>t<<n-32|e>>>64-n,Ua=(e,t,n)=>e<<n-32|t>>>64-n,Oa=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]),yt=new Uint32Array(64);class Da extends Ba{constructor(t=32){super(64,t,8,!1),this.A=wt[0]|0,this.B=wt[1]|0,this.C=wt[2]|0,this.D=wt[3]|0,this.E=wt[4]|0,this.F=wt[5]|0,this.G=wt[6]|0,this.H=wt[7]|0}get(){const{A:t,B:n,C:o,D:s,E:a,F:r,G:l,H:d}=this;return[t,n,o,s,a,r,l,d]}set(t,n,o,s,a,r,l,d){this.A=t|0,this.B=n|0,this.C=o|0,this.D=s|0,this.E=a|0,this.F=r|0,this.G=l|0,this.H=d|0}process(t,n){for(let _=0;_<16;_++,n+=4)yt[_]=t.getUint32(n,!1);for(let _=16;_<64;_++){const g=yt[_-15],E=yt[_-2],w=rt(g,7)^rt(g,18)^g>>>3,B=rt(E,17)^rt(E,19)^E>>>10;yt[_]=B+yt[_-7]+w+yt[_-16]|0}let{A:o,B:s,C:a,D:r,E:l,F:d,G:S,H:N}=this;for(let _=0;_<64;_++){const g=rt(l,6)^rt(l,11)^rt(l,25),E=N+g+Ea(l,d,S)+Oa[_]+yt[_]|0,B=(rt(o,2)^rt(o,13)^rt(o,22))+Sa(o,s,a)|0;N=S,S=d,d=l,l=r+E|0,r=a,a=s,s=o,o=E+B|0}o=o+this.A|0,s=s+this.B|0,a=a+this.C|0,r=r+this.D|0,l=l+this.E|0,d=d+this.F|0,S=S+this.G|0,N=N+this.H|0,this.set(o,s,a,r,l,d,S,N)}roundClean(){zt(yt)}destroy(){this.set(0,0,0,0,0,0,0,0),zt(this.buffer)}}const Ma=Oo(()=>new Da);function _a(e,t){return Ma(Ft(e,{strict:!1})?Bn(e):e)}function La(e){const{commitment:t,version:n=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),s=_a(t);return s.set([n],0),o==="bytes"?s:dt(s)}function Ra(e){const{commitments:t,version:n}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const a of t)s.push(La({commitment:a,to:o,version:n}));return s}const Mo=6,_o=32,Fn=4096,Lo=_o*Fn,Ro=Lo*Mo-1-1*Fn*Mo,Ho=1;class Ha extends pe{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class Vo extends pe{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Va extends pe{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class Wa extends pe{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${Ho}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function $a(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Tt(e.data):e.data,o=We(n);if(!o)throw new Vo;if(o>Ro)throw new Ha({maxSize:Ro,size:o});const s=[];let a=!0,r=0;for(;a;){const l=xo(new Uint8Array(Lo));let d=0;for(;d<Fn;){const S=n.slice(r,r+(_o-1));if(l.pushByte(0),l.pushBytes(S),S.length<31){l.pushByte(128),a=!1;break}d++,r+=31}s.push(l)}return t==="bytes"?s.map(l=>l.bytes):s.map(l=>dt(l.bytes))}function Ga(e){const{data:t,kzg:n,to:o}=e,s=e.blobs??$a({data:t,to:o}),a=e.commitments??Co({blobs:s,kzg:n,to:o}),r=e.proofs??Io({blobs:s,commitments:a,kzg:n,to:o}),l=[];for(let d=0;d<s.length;d++)l.push({blob:s[d],commitment:a[d],proof:r[d]});return l}class it extends pe{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class dn extends pe{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class Rt extends pe{constructor({cause:t,message:n}={}){const o=n?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${o?`with reason: ${o}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(Rt,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(Rt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class Bt extends pe{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${St(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(Bt,"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 Un extends pe{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${St(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Un,"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 On extends pe{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(On,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Dn extends pe{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
80
+ `),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(Dn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class Mn extends pe{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(Mn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class _n extends pe{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
81
+ `),{cause:t,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(_n,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class Ln extends pe{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(Ln,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Rn extends pe{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(Rn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Hn extends pe{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Hn,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class qt extends pe{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:o}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${St(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${o?` = ${St(o)} gwei`:""}).`].join(`
82
+ `),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(qt,"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 Wo extends pe{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}class $o extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const o=this.keys().next().value;o&&this.delete(o)}return this}}const za=BigInt(0),Yt=BigInt(1),qa=BigInt(2),Ya=BigInt(7),ja=BigInt(256),Ja=BigInt(113),Go=[],zo=[],qo=[];for(let e=0,t=Yt,n=1,o=0;e<24;e++){[n,o]=[o,(2*n+3*o)%5],Go.push(2*(5*o+n)),zo.push((e+1)*(e+2)/2%64);let s=za;for(let a=0;a<7;a++)t=(t<<Yt^(t>>Ya)*Ja)%ja,t&qa&&(s^=Yt<<(Yt<<BigInt(a))-Yt);qo.push(s)}const Yo=Ia(qo,!0),Xa=Yo[0],Ka=Yo[1],jo=(e,t,n)=>n>32?Fa(e,t,n):Na(e,t,n),Jo=(e,t,n)=>n>32?Ua(e,t,n):Pa(e,t,n);function Za(e,t=24){const n=new Uint32Array(10);for(let o=24-t;o<24;o++){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 l=(r+8)%10,d=(r+2)%10,S=n[d],N=n[d+1],_=jo(S,N,1)^n[l],g=Jo(S,N,1)^n[l+1];for(let E=0;E<50;E+=10)e[r+E]^=_,e[r+E+1]^=g}let s=e[2],a=e[3];for(let r=0;r<24;r++){const l=zo[r],d=jo(s,a,l),S=Jo(s,a,l),N=Go[r];s=e[N],a=e[N+1],e[N]=d,e[N+1]=S}for(let r=0;r<50;r+=10){for(let l=0;l<10;l++)n[l]=e[r+l];for(let l=0;l<10;l++)e[r+l]^=~n[(l+2)%10]&n[(l+4)%10]}e[0]^=Xa[o],e[1]^=Ka[o]}zt(n)}class Vn extends Uo{constructor(t,n,o,s=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=o,this.enableXOF=s,this.rounds=a,No(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=ya(this.state)}clone(){return this._cloneInto()}keccak(){Fo(this.state32),Za(this.state32,this.rounds),Fo(this.state32),this.posOut=0,this.pos=0}update(t){cn(this),t=Pn(t),Gt(t);const{blockLen:n,state:o}=this,s=t.length;for(let a=0;a<s;){const r=Math.min(n-this.pos,s-a);for(let l=0;l<r;l++)o[this.pos++]^=t[a++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:o,blockLen:s}=this;t[o]^=n,(n&128)!==0&&o===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){cn(this,!1),Gt(t),this.finish();const n=this.state,{blockLen:o}=this;for(let s=0,a=t.length;s<a;){this.posOut>=o&&this.keccak();const r=Math.min(o-this.posOut,a-s);t.set(n.subarray(this.posOut,this.posOut+r),s),this.posOut+=r,s+=r}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return No(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Po(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,zt(this.state)}_cloneInto(t){const{blockLen:n,suffix:o,outputLen:s,rounds:a,enableXOF:r}=this;return t||(t=new Vn(n,o,s,r,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=o,t.outputLen=s,t.enableXOF=r,t.destroyed=this.destroyed,t}}const Qa=(e,t,n)=>Oo(()=>new Vn(t,e,n)),er=Qa(1,136,256/8);function Xo(e,t){const n=t||"hex",o=er(Ft(e,{strict:!1})?Bn(e):e);return n==="bytes"?o:Ot(o)}const Wn=new $o(8192);function tr(e,t){if(Wn.has(`${e}.${t}`))return Wn.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),o=Xo(Ao(n),"bytes"),s=n.split("");for(let r=0;r<40;r+=2)o[r>>1]>>4>=8&&s[r]&&(s[r]=s[r].toUpperCase()),(o[r>>1]&15)>=8&&s[r+1]&&(s[r+1]=s[r+1].toUpperCase());const a=`0x${s.join("")}`;return Wn.set(`${e}.${t}`,a),a}const nr=/^0x[a-fA-F0-9]{40}$/,$n=new $o(8192);function Re(e,t){const{strict:n=!0}=t??{},o=`${e}.${n}`;if($n.has(o))return $n.get(o);const s=nr.test(e)?e.toLowerCase()===e?!0:n?tr(e)===e:!0:!1;return $n.set(o,s),s}function Gn(e,t,n,{strict:o}={}){return Ft(e,{strict:!1})?sr(e,t,n,{strict:o}):or(e,t,n,{strict:o})}function Ko(e,t){if(typeof t=="number"&&t>0&&t>We(e)-1)throw new bo({offset:t,position:"start",size:We(e)})}function Zo(e,t,n){if(typeof t=="number"&&typeof n=="number"&&We(e)!==n-t)throw new bo({offset:n,position:"end",size:We(e)})}function or(e,t,n,{strict:o}={}){Ko(e,t);const s=e.slice(t,n);return o&&Zo(s,t,n),s}function sr(e,t,n,{strict:o}={}){Ko(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return o&&Zo(s,t,n),s}function ar(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:o}=n,s=n.address;if(!Re(s))throw new it({address:s});if(o<0)throw new dn({chainId:o})}zn(e)}function rr(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new Vo;for(const n of t){const o=We(n),s=rn(Gn(n,0,1));if(o!==32)throw new Va({hash:n,size:o});if(s!==Ho)throw new Wa({hash:n,version:s})}}zn(e)}function zn(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:o,to:s}=e;if(t<=0)throw new dn({chainId:t});if(s&&!Re(s))throw new it({address:s});if(o&&o>_t)throw new Bt({maxFeePerGas:o});if(n&&o&&n>o)throw new qt({maxFeePerGas:o,maxPriorityFeePerGas:n})}function ir(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:s,to:a}=e;if(t<=0)throw new dn({chainId:t});if(a&&!Re(a))throw new it({address:a});if(n||s)throw new pe("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(o&&o>_t)throw new Bt({maxFeePerGas:o})}function cr(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:s,to:a}=e;if(a&&!Re(a))throw new it({address:a});if(typeof t<"u"&&t<=0)throw new dn({chainId:t});if(n||s)throw new pe("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(o&&o>_t)throw new Bt({maxFeePerGas:o})}function lr(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new ha({transaction:e})}function un(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n<e.length;n++){const{address:o,storageKeys:s}=e[n];for(let a=0;a<s.length;a++)if(s[a].length-2!==64)throw new ba({storageKey:s[a]});if(!Re(o,{strict:!1}))throw new it({address:o});t.push([o,s])}return t}function dr(e,t){const n=lr(e);return n==="eip1559"?pr(e,t):n==="eip2930"?mr(e,t):n==="eip4844"?fr(e,t):n==="eip7702"?ur(e,t):hr(e,t)}function ur(e,t){const{authorizationList:n,chainId:o,gas:s,nonce:a,to:r,value:l,maxFeePerGas:d,maxPriorityFeePerGas:S,accessList:N,data:_}=e;ar(e);const g=un(N),E=ga(n);return xt(["0x04",Et([de(o),a?de(a):"0x",S?de(S):"0x",d?de(d):"0x",s?de(s):"0x",r??"0x",l?de(l):"0x",_??"0x",g,E,...jt(e,t)])])}function fr(e,t){const{chainId:n,gas:o,nonce:s,to:a,value:r,maxFeePerBlobGas:l,maxFeePerGas:d,maxPriorityFeePerGas:S,accessList:N,data:_}=e;rr(e);let g=e.blobVersionedHashes,E=e.sidecars;if(e.blobs&&(typeof g>"u"||typeof E>"u")){const j=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(ye=>dt(ye)),ne=e.kzg,he=Co({blobs:j,kzg:ne});if(typeof g>"u"&&(g=Ra({commitments:he})),typeof E>"u"){const ye=Io({blobs:j,commitments:he,kzg:ne});E=Ga({blobs:j,commitments:he,proofs:ye})}}const w=un(N),B=[de(n),s?de(s):"0x",S?de(S):"0x",d?de(d):"0x",o?de(o):"0x",a??"0x",r?de(r):"0x",_??"0x",w,l?de(l):"0x",g??[],...jt(e,t)],M=[],Q=[],I=[];if(E)for(let j=0;j<E.length;j++){const{blob:ne,commitment:he,proof:ye}=E[j];M.push(ne),Q.push(he),I.push(ye)}return xt(["0x03",Et(E?[B,M,Q,I]:B)])}function pr(e,t){const{chainId:n,gas:o,nonce:s,to:a,value:r,maxFeePerGas:l,maxPriorityFeePerGas:d,accessList:S,data:N}=e;zn(e);const _=un(S),g=[de(n),s?de(s):"0x",d?de(d):"0x",l?de(l):"0x",o?de(o):"0x",a??"0x",r?de(r):"0x",N??"0x",_,...jt(e,t)];return xt(["0x02",Et(g)])}function mr(e,t){const{chainId:n,gas:o,data:s,nonce:a,to:r,value:l,accessList:d,gasPrice:S}=e;ir(e);const N=un(d),_=[de(n),a?de(a):"0x",S?de(S):"0x",o?de(o):"0x",r??"0x",l?de(l):"0x",s??"0x",N,...jt(e,t)];return xt(["0x01",Et(_)])}function hr(e,t){const{chainId:n=0,gas:o,data:s,nonce:a,to:r,value:l,gasPrice:d}=e;cr(e);let S=[a?de(a):"0x",d?de(d):"0x",o?de(o):"0x",r??"0x",l?de(l):"0x",s??"0x"];if(t){const N=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const E=27n+(t.v===27n?0n:1n);if(t.v!==E)throw new ma({v:t.v});return E})(),_=an(t.r),g=an(t.s);S=[...S,de(N),_==="0x00"?"0x":_,g==="0x00"?"0x":g]}else n>0&&(S=[...S,de(n),"0x","0x"]);return Et(S)}function jt(e,t){const n=t??e,{v:o,yParity:s}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof o>"u"&&typeof s>"u")return[];const a=an(n.r),r=an(n.s);return[typeof s=="number"?s?de(1):"0x":o===0n?"0x":o===1n?de(1):o===27n?"0x":de(1),a==="0x00"?"0x":a,r==="0x00"?"0x":r]}const br={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},gr={block:Ks({format(e){return{transactions:e.transactions?.map(n=>{if(typeof n=="string")return n;const o=In(n);return o.typeHex==="0x7e"&&(o.isSystemTx=n.isSystemTx,o.mint=n.mint?Mt(n.mint):void 0,o.sourceHash=n.sourceHash,o.type="deposit"),o}),stateRoot:e.stateRoot}}}),transaction:js({format(e){const t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?Mt(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:ta({format(e){return{l1GasPrice:e.l1GasPrice?Mt(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?Mt(e.l1GasUsed):null,l1Fee:e.l1Fee?Mt(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function wr(e,t){return Ar(e)?vr(e):dr(e,t)}const yr={transaction:wr};function vr(e){kr(e);const{sourceHash:t,data:n,from:o,gas:s,isSystemTx:a,mint:r,to:l,value:d}=e,S=[t,o,l??"0x",r?Ot(r):"0x",d?Ot(d):"0x",s?Ot(s):"0x",a?"0x1":"0x",n??"0x"];return xt(["0x7e",Et(S)])}function Ar(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function kr(e){const{from:t,to:n}=e;if(t&&!Re(t))throw new it({address:t});if(n&&!Re(n))throw new it({address:n})}const fn={blockTime:2e3,contracts:br,formatters:gr,serializers:yr},Tr=lt({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}}}),xr=lt({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}}}),Jt=1,Qo=lt({...fn,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:{...fn.contracts,disputeGameFactory:{[Jt]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[Jt]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[Jt]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[Jt]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:Jt});({...Qo});const Er=lt({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}}});function qn(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}class Sr extends pe{constructor({docsPath:t}={}){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(`
83
+ `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}function Yn(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new Or(e.type);return`${e.name}(${es(e.inputs,{includeName:t})})`}function es(e,{includeName:t=!1}={}){return e?e.map(n=>Br(n,{includeName:t})).join(t?", ":","):""}function Br(e,{includeName:t}){return e.type.startsWith("tuple")?`(${es(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class Cr extends pe{constructor({expectedLength:t,givenLength:n,type:o}){super([`ABI encoding array length mismatch for type ${o}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
84
+ `),{name:"AbiEncodingArrayLengthMismatchError"})}}class Ir extends pe{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${We(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class Nr extends pe{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
85
+ `),{name:"AbiEncodingLengthMismatchError"})}}class ts extends pe{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
86
+ `),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class Pr extends pe{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${Yn(t.abiItem)}\`, and`,`\`${n.type}\` in \`${Yn(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class Fr extends pe{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
87
+ `),{docsPath:n,name:"InvalidAbiEncodingType"})}}class Ur extends pe{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
88
+ `),{name:"InvalidArrayError"})}}class Or extends pe{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
89
+ `),{name:"InvalidDefinitionTypeError"})}}const Dr=e=>Xo(Bn(e));function Mr(e){return Dr(e)}function _r(e,t){return e.exec(t)?.groups}const ns=/^tuple(?<array>(\[(\d*)\])*)$/;function jn(e){let t=e.type;if(ns.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s<n;s++){const a=e.components[s];t+=jn(a),s<n-1&&(t+=", ")}const o=_r(ns,e.type);return t+=`)${o?.array||""}`,jn({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function Xt(e){let t="";const n=e.length;for(let o=0;o<n;o++){const s=e[o];t+=jn(s),o!==n-1&&(t+=", ")}return t}function Lr(e){return e.type==="function"?`function ${e.name}(${Xt(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${Xt(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Xt(e.inputs)})`:e.type==="error"?`error ${e.name}(${Xt(e.inputs)})`:e.type==="constructor"?`constructor(${Xt(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}function Rr(e){let t=!0,n="",o=0,s="",a=!1;for(let r=0;r<e.length;r++){const l=e[r];if(["(",")",","].includes(l)&&(t=!0),l==="("&&o++,l===")"&&o--,!!t){if(o===0){if(l===" "&&["event","function",""].includes(s))s="";else if(s+=l,l===")"){a=!0;break}continue}if(l===" "){e[r-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}s+=l,n+=l}}if(!a)throw new pe("Unable to normalize signature.");return s}const Hr=e=>{const t=typeof e=="string"?e:Lr(e);return Rr(t)};function os(e){return Mr(Hr(e))}const ss=e=>Gn(os(e),0,4),Vr=/^(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 Wr(e,t){if(e.length!==t.length)throw new Nr({expectedLength:e.length,givenLength:t.length});const n=$r({params:e,values:t}),o=Xn(n);return o.length===0?"0x":o}function $r({params:e,values:t}){const n=[];for(let o=0;o<e.length;o++)n.push(Jn({param:e[o],value:t[o]}));return n}function Jn({param:e,value:t}){const n=Kr(e.type);if(n){const[o,s]=n;return zr(t,{length:o,param:{...e,type:s}})}if(e.type==="tuple")return Xr(t,{param:e});if(e.type==="address")return Gr(t);if(e.type==="bool")return Yr(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const o=e.type.startsWith("int"),[,,s="256"]=Vr.exec(e.type)??[];return jr(t,{signed:o,size:Number(s)})}if(e.type.startsWith("bytes"))return qr(t,{param:e});if(e.type==="string")return Jr(t);throw new Fr(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function Xn(e){let t=0;for(let a=0;a<e.length;a++){const{dynamic:r,encoded:l}=e[a];r?t+=32:t+=We(l)}const n=[],o=[];let s=0;for(let a=0;a<e.length;a++){const{dynamic:r,encoded:l}=e[a];r?(n.push(de(t+s,{size:32})),o.push(l),s+=We(l)):n.push(l)}return Lt([...n,...o])}function Gr(e){if(!Re(e))throw new it({address:e});return{dynamic:!1,encoded:gt(e.toLowerCase())}}function zr(e,{length:t,param:n}){const o=t===null;if(!Array.isArray(e))throw new Ur(e);if(!o&&e.length!==t)throw new Cr({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let s=!1;const a=[];for(let r=0;r<e.length;r++){const l=Jn({param:n,value:e[r]});l.dynamic&&(s=!0),a.push(l)}if(o||s){const r=Xn(a);if(o){const l=de(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?Lt([l,r]):l}}if(s)return{dynamic:!0,encoded:r}}return{dynamic:!1,encoded:Lt(a.map(({encoded:r})=>r))}}function qr(e,{param:t}){const[,n]=t.type.split("bytes"),o=We(e);if(!n){let s=e;return o%32!==0&&(s=gt(s,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:Lt([gt(de(o,{size:32})),s])}}if(o!==Number.parseInt(n,10))throw new Ir({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:gt(e,{dir:"right"})}}function Yr(e){if(typeof e!="boolean")throw new pe(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:gt(wo(e))}}function jr(e,{signed:t,size:n=256}){if(typeof n=="number"){const o=2n**(BigInt(n)-(t?1n:0n))-1n,s=t?-o-1n:0n;if(e>o||e<s)throw new Sn({max:o.toString(),min:s.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:de(e,{size:32,signed:t})}}function Jr(e){const t=yo(e),n=Math.ceil(We(t)/32),o=[];for(let s=0;s<n;s++)o.push(gt(Gn(t,s*32,(s+1)*32),{dir:"right"}));return{dynamic:!0,encoded:Lt([gt(de(We(t),{size:32})),...o])}}function Xr(e,{param:t}){let n=!1;const o=[];for(let s=0;s<t.components.length;s++){const a=t.components[s],r=Array.isArray(e)?s:a.name,l=Jn({param:a,value:e[r]});o.push(l),l.dynamic&&(n=!0)}return{dynamic:n,encoded:n?Xn(o):Lt(o.map(({encoded:s})=>s))}}function Kr(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const Zr=os;function Qr(e){const{abi:t,args:n=[],name:o}=e,s=Ft(o,{strict:!1}),a=t.filter(l=>s?l.type==="function"?ss(l)===o:l.type==="event"?Zr(l)===o:!1:"name"in l&&l.name===o);if(a.length===0)return;if(a.length===1)return a[0];let r;for(const l of a){if(!("inputs"in l))continue;if(!n||n.length===0){if(!l.inputs||l.inputs.length===0)return l;continue}if(!l.inputs||l.inputs.length===0||l.inputs.length!==n.length)continue;if(n.every((S,N)=>{const _="inputs"in l&&l.inputs[N];return _?Kn(S,_):!1})){if(r&&"inputs"in r&&r.inputs){const S=as(l.inputs,r.inputs,n);if(S)throw new Pr({abiItem:l,type:S[0]},{abiItem:r,type:S[1]})}r=l}}return r||a[0]}function Kn(e,t){const n=typeof e,o=t.type;switch(o){case"address":return Re(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((s,a)=>n==="object"&&Kn(Object.values(e)[a],s)):/^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(o)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(s=>Kn(s,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function as(e,t,n){for(const o in e){const s=e[o],a=t[o];if(s.type==="tuple"&&a.type==="tuple"&&"components"in s&&"components"in a)return as(s.components,a.components,n[o]);const r=[s.type,a.type];if(r.includes("address")&&r.includes("bytes20")?!0:r.includes("address")&&r.includes("string")?Re(n[o],{strict:!1}):r.includes("address")&&r.includes("bytes")?Re(n[o],{strict:!1}):!1)return r}}function rs(e){return e.reduce((t,{slot:n,value:o})=>`${t} ${n}: ${o}
78
90
  `,"")}function ei(e){return e.reduce((t,{address:n,...o})=>{let s=`${t} ${n}:
79
91
  `;return o.nonce&&(s+=` nonce: ${o.nonce}
80
92
  `),o.balance&&(s+=` balance: ${o.balance}
81
93
  `),o.code&&(s+=` code: ${o.code}
82
94
  `),o.state&&(s+=` state:
83
- `,s+=ss(o.state)),o.stateDiff&&(s+=` stateDiff:
84
- `,s+=ss(o.stateDiff)),s},` State Override:
85
- `).slice(0,-1)}class ti extends pe{constructor(t,{account:n,docsPath:o,chain:s,data:r,gas:a,gasPrice:l,maxFeePerGas:f,maxPriorityFeePerGas:S,nonce:N,to:_,value:b,stateOverride:E}){const v=n?$n(n):void 0;let C=Eo({from:v?.address,to:_,value:typeof b<"u"&&`${pr(b)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:r,gas:a,gasPrice:typeof l<"u"&&`${Tt(l)} gwei`,maxFeePerGas:typeof f<"u"&&`${Tt(f)} gwei`,maxPriorityFeePerGas:typeof S<"u"&&`${Tt(S)} gwei`,nonce:N});E&&(C+=`
86
- ${ei(E)}`),super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",C].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function ni(e,t){const n=(e.details||"").toLowerCase(),o=e instanceof pe?e.walk(s=>s?.code===_t.code):e;return o instanceof pe?new _t({cause:e,message:o.details}):_t.nodeMessage.test(n)?new _t({cause:e,message:e.details}):xt.nodeMessage.test(n)?new xt({cause:e,maxFeePerGas:t?.maxFeePerGas}):Pn.nodeMessage.test(n)?new Pn({cause:e,maxFeePerGas:t?.maxFeePerGas}):Fn.nodeMessage.test(n)?new Fn({cause:e,nonce:t?.nonce}):Un.nodeMessage.test(n)?new Un({cause:e,nonce:t?.nonce}):On.nodeMessage.test(n)?new On({cause:e,nonce:t?.nonce}):Dn.nodeMessage.test(n)?new Dn({cause:e}):Mn.nodeMessage.test(n)?new Mn({cause:e,gas:t?.gas}):_n.nodeMessage.test(n)?new _n({cause:e,gas:t?.gas}):Ln.nodeMessage.test(n)?new Ln({cause:e}):Gt.nodeMessage.test(n)?new Gt({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new Ho({cause:e})}function oi(e,{docsPath:t,...n}){const o=(()=>{const s=ni(e,n);return s instanceof Ho?e:s})();return new ti(o,{docsPath:t,...n})}function si(e,{format:t}){if(!t)return{};const n={};function o(r){const a=Object.keys(r);for(const l of a)l in e&&(n[l]=e[l]),r[l]&&typeof r[l]=="object"&&!Array.isArray(r[l])&&o(r[l])}const s=t(e||{});return o(s),n}function ri(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:o,to:s}=e,r=t?$n(t):void 0;if(r&&!Le(r.address))throw new nt({address:r.address});if(s&&!Le(s))throw new nt({address:s});if(n&&n>Dt)throw new xt({maxFeePerGas:n});if(o&&n&&o>n)throw new Gt({maxFeePerGas:n,maxPriorityFeePerGas:o})}async function ai(e,t){const{account:n=e.account}=t;if(!n)throw new Sa;const o=$n(n);try{const{accessList:s,blockNumber:r,blockTag:a,data:l,gas:f,gasPrice:S,maxFeePerGas:N,maxPriorityFeePerGas:_,nonce:b,to:E,value:v,...C}=t,J=(typeof r=="bigint"?de(r):void 0)||a;ri(t);const I=e.chain?.formatters?.transactionRequest?.format,K=(I||or)({...si(C,{format:I}),account:o,accessList:s,data:l,gas:f,gasPrice:S,maxFeePerGas:N,maxPriorityFeePerGas:_,nonce:b,to:E,value:v},"estimateGas"),{baseFeePerGas:he,gasLimit:ye,priorityFeePerGas:Be}=await e.request({method:"linea_estimateGas",params:J?[K,J]:[K]});return{baseFeePerGas:BigInt(he),gasLimit:BigInt(ye),priorityFeePerGas:BigInt(Be)}}catch(s){throw oi(s,{...t,account:o,chain:e.chain})}}const ii={fees:{estimateFeesPerGas:rs,async maxPriorityFeePerGas({block:e,client:t,request:n}){const o=await rs({block:e,client:t,multiply:s=>s,request:n,type:"eip1559"});return o?.maxPriorityFeePerGas?o.maxPriorityFeePerGas:null}}};async function rs({client:e,multiply:t,request:n,type:o}){try{const s=await ai(e,{...n,account:n?.account}),{priorityFeePerGas:r}=s,l=t(BigInt(s.baseFeePerGas))+r;return o==="legacy"?{gasPrice:l}:{maxFeePerGas:l,maxPriorityFeePerGas:r}}catch{return null}}const ci=rt({...ii,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}),li=rt({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}}}),jt=1,di=rt({...ln,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:{...ln.contracts,disputeGameFactory:{[jt]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[jt]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[jt]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[jt]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:jt}),ui=rt({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),as="/docs/contract/encodeFunctionData";function fi(e){const{abi:t,args:n,functionName:o}=e;let s=t[0];if(o){const r=Qa({abi:t,args:n,name:o});if(!r)throw new Qo(o,{docsPath:as});s=r}if(s.type!=="function")throw new Qo(void 0,{docsPath:as});return{abi:[s],functionName:ns(zn(s))}}function bt(e){const{args:t}=e,{abi:n,functionName:o}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:fi(e),s=n[0],r=o,a="inputs"in s&&s.inputs?Wa(s.inputs,t??[]):void 0;return At([r,a??"0x"])}const ct={1:{...li,logo:"https://cryptologos.cc/logos/ethereum-eth-logo.png?v=024",chainId:1,chainType:"ether",chainTypeMoralis:"eth",tokenTrendingDefault:["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"]},10:{...di,logo:"https://cryptologos.cc/logos/optimism-ethereum-op-logo.png?v=024",chainId:10,chainType:"optimism",chainTypeMoralis:"optimism",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0x68f180fcce6836688e9084f035309e29bf0a2095","0xc47da4cb96ce65a96844a01bfae509f9d5454534"]},56:{...Ea,logo:"https://cryptologos.cc/logos/bnb-bnb-logo.png?v=024",chainId:56,chainType:"bsc",chainTypeMoralis:"bsc",tokenTrendingDefault:["0x2170ed0880ac9a755fd29b2688956bd959f933f8","0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c"]},137:{...ui,logo:"https://cryptologos.cc/logos/polygon-matic-logo.png?v=024",chainId:137,chainType:"matic",chainTypeMoralis:"polygon",tokenTrendingDefault:["0x7ceb23fd6bc0add59e62ac25578270cff1b9f619","0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6"]},8453:{...Ko,logo:"https://icons.llamao.fi/icons/chains/rsz_base.jpg",chainId:8453,chainType:"base",chainTypeMoralis:"base",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf","0xc47da4cb96ce65a96844a01bfae509f9d5454534"]},42161:{...Ta,logo:"https://cryptologos.cc/logos/arbitrum-arb-logo.png?v=024",chainId:42161,chainType:"arbitrum",chainTypeMoralis:"arbitrum",tokenTrendingDefault:["0x82af49447d8a07e3bd95bd0d56f35241523fbab1","0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f"]},43114:{...xa,logo:"https://cryptologos.cc/logos/avalanche-avax-logo.png?v=024",chainId:43114,chainType:"avax",chainTypeMoralis:"avalanche",tokenTrendingDefault:["0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB","0x0555E30da8f98308EdB960aa94C0Db47230d2B9c"]},59144:{...ci,logo:"https://icons.llamao.fi/icons/chains/rsz_linea.jpg",chainId:59144,chainType:"linea",chainTypeMoralis:"linea",tokenTrendingDefault:["0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f","0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4"]}},pi=e=>{const t=new Date,n=new Date(t);n.setDate(n.getDate()-1);const o=new Date(e);return o.setHours(0,0,0,0),t.setHours(0,0,0,0),n.setHours(0,0,0,0),o.getTime()===t.getTime()?"Today":o.getTime()===n.getTime()?"Yesterday":o.toLocaleDateString("en-US",{month:"short",day:"numeric",year:o.getFullYear()!==t.getFullYear()?"numeric":void 0})},lt=e=>new Promise(t=>setTimeout(t,e||0)),mi=(e,t=5,n=5)=>(e=e||"",e?.length<=t+n?e:`${e.substr(0,t)}...${e.substr(e.length-n,n)}`),hi=e=>{if(!e)return"";const t=ct[e];return t?t.chainTypeMoralis:""},gi=e=>{if(!e)return"";const t=ct[e];return t?t.chainType:""},Et={getItem(e){if(typeof window>"u")return null;try{return window.localStorage.getItem(e)}catch{return null}},setItem(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,t)}catch{}},removeItem(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}},get length(){if(typeof window>"u")return 0;try{return window.localStorage.length}catch{return 0}},key(e){if(typeof window>"u")return null;try{return window.localStorage.key(e)}catch{return null}}};class bi extends pe{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function dt(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new bi({value:e});let[n,o="0"]=e.split(".");const s=n.startsWith("-");if(s&&(n=n.slice(1)),o=o.replace(/(0+)$/,""),t===0)Math.round(+`.${o}`)===1&&(n=`${BigInt(n)+1n}`),o="";else if(o.length>t){const[r,a,l]=[o.slice(0,t-1),o.slice(t-1,t),o.slice(t)],f=Math.round(+`${a}.${l}`);f>9?o=`${BigInt(r)+BigInt(1)}0`.padStart(r.length+1,"0"):o=`${r}${f}`,o.length>t&&(o=o.slice(1),n=`${BigInt(n)+1n}`),o=o.slice(0,t)}else o=o.padEnd(t,"0");return BigInt(`${s?"-":""}${n}${o}`)}const wi="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Ye="0x0000000000000000000000000000000000000000",is=se.createContext(void 0),Xn=()=>{const e=se.useContext(is);if(!e)throw new Error("useConnect must be used within ConnectProvider");return{...e,chainData:ct[e.account?.chainId]||void 0,chainId:e.account?.chainId||void 0,chainType:gi(e.account?.chainId||void 0),chainTypeMoralis:hi(e.account?.chainId||void 0),isChainSupported:!!ct[e.account?.chainId]}},yi=({children:e,initialAccount:t})=>B.jsx(is.Provider,{value:{account:t||null},children:e}),vi=({address:e,chainId:t})=>{const[n,o]=se.useState(!1),{isChainSupported:s}=Xn(),r=se.useCallback(()=>{if(!e)return;const a=e,l=()=>{o(!0),setTimeout(()=>o(!1),2e3)};try{navigator.clipboard.writeText(a).then(l).catch(()=>{const f=document.createElement("input");f.value=a,document.body.appendChild(f),f.select(),document.execCommand("copy"),f.remove(),l()})}catch{const f=document.createElement("input");f.value=a,document.body.appendChild(f),f.select(),document.execCommand("copy"),f.remove(),l()}},[e]);return B.jsx(B.Fragment,{children:Le(e||"")&&B.jsxs("div",{className:"chat-user-info",children:[t&&ct[t]?.logo&&B.jsx("div",{className:"user-avatar",children:B.jsx("img",{src:ct[t].logo||"",alt:"Chain",width:20,height:20})}),B.jsx("span",{className:"user-wallet",children:B.jsx("a",{style:{pointerEvents:s?"auto":"none"},href:ct[t]?.blockExplorers?.default?.url+"/address/"+e,target:"_blank",rel:"noopener noreferrer",children:mi(e)||"Not connected"})}),B.jsx("button",{className:"copy-address-btn",onClick:r,"aria-label":"Copy wallet address",type:"button",title:n?"Copied!":"Copy address",children:n?B.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:B.jsx("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):B.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:[B.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),B.jsx("path",{d:"M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})})},Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function Ai(e,t=0){return(Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]).toLowerCase()}let Kn;const ki=new Uint8Array(16);function Ti(){if(!Kn){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Kn=crypto.getRandomValues.bind(crypto)}return Kn(ki)}const cs={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function xi(e,t,n){e=e||{};const o=e.random??e.rng?.()??Ti();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Ai(o)}function ls(e,t,n){return cs.randomUUID&&!e?cs.randomUUID():xi(e)}const Zn="chat_widget_messages",ds=200,Lt=[{id:ls(),text:`**Welcome! 🚀**
87
- You're connected and ready to explore DeFi! I can help you trade, check prices, and analyze your portfolio when you need it.`,sender:"bot",timestamp:new Date}];function Ei(e,t){return e&&t?`${e}_${t}`:""}function us(e){return e.map(t=>({...t,timestamp:new Date(t.timestamp)}))}function fs(){const e=Et.getItem(Zn);if(!e)return null;try{const t=JSON.parse(e);if(t&&t.owner!==void 0&&Array.isArray(t.messages))return{owner:t.owner,messages:us(t.messages)};if(Array.isArray(t))return{owner:"",messages:us(t)}}catch{}return null}function dn(e,t){Et.setItem(Zn,JSON.stringify({owner:e,messages:t}))}function Si(){const{account:e}=Xn(),t=Ei(e?.address,e?.chainId),[n,o]=se.useState(()=>t||"pending"),[s,r]=se.useState(()=>{const N=fs();return t?N&&N.owner===t?N.messages:Lt:N?.messages??Lt});if(n==="pending"&&t){const N=fs();N&&N.owner===t?r(N.messages):dn(t,s),o(t)}else n!=="pending"&&t&&n!==t&&(r(Lt),dn(t,Lt),o(t));se.useEffect(()=>{n!=="pending"&&dn(n,s)},[s,n]),se.useEffect(()=>{const N=[];for(let _=0;_<Et.length;_++){const b=Et.key(_);b&&b.startsWith(Zn+"_")&&N.push(b)}N.forEach(_=>Et.removeItem(_))},[]);const a=(N,_,b,E,v)=>{const C=b?s.find(J=>J.id===b):void 0,D={id:ls(),text:N,sender:_,timestamp:new Date,...C&&{replyTo:{id:C.id,text:C.text,sender:C.sender}},...E&&{buttons:E},...v&&{actionData:v}};return r(J=>{const I=[...J,D];return I.length>ds?I.slice(I.length-ds):I}),D},l=(N,_)=>{r(b=>b.map(E=>E.id===N&&E.actionData?{...E,actionData:{...E.actionData,status:_}}:E))},f=(N,_)=>{r(b=>b.map(E=>E.id===N?{...E,text:_}:E))},S=se.useCallback(()=>{r(Lt),dn(t,Lt)},[t]);return{messages:s,setMessages:r,addMessage:a,updateMessageAction:l,updateMessageText:f,clearMessages:S}}const ps=se.createContext(void 0),Ci=()=>{const e=se.useContext(ps);if(!e)throw new Error("useConfig must be used within ConfigProvider");return e},Bi=({children:e,initialConfig:t})=>B.jsx(ps.Provider,{value:{config:t||null},children:e});var Ii=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Qn=Math.ceil,je=Math.floor,We="[BigNumber Error] ",ms=We+"Number primitive has more than 15 significant digits: ",Qe=1e14,be=14,eo=9007199254740991,to=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],wt=1e7,_e=1e9;function hs(e){var t,n,o,s=I.prototype={constructor:I,toString:null,valueOf:null},r=new I(1),a=20,l=4,f=-7,S=21,N=-1e7,_=1e7,b=!1,E=1,v=0,C={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",J=!0;function I(i,d){var c,g,m,w,y,h,k,A,T=this;if(!(T instanceof I))return new I(i,d);if(d==null){if(i&&i._isBigNumber===!0){T.s=i.s,!i.c||i.e>_?T.c=T.e=null:i.e<N?T.c=[T.e=0]:(T.e=i.e,T.c=i.c.slice());return}if((h=typeof i=="number")&&i*0==0){if(T.s=1/i<0?(i=-i,-1):1,i===~~i){for(w=0,y=i;y>=10;y/=10,w++);w>_?T.c=T.e=null:(T.e=w,T.c=[i]);return}A=String(i)}else{if(!Ii.test(A=String(i)))return o(T,A,h);T.s=A.charCodeAt(0)==45?(A=A.slice(1),-1):1}(w=A.indexOf("."))>-1&&(A=A.replace(".","")),(y=A.search(/e/i))>0?(w<0&&(w=y),w+=+A.slice(y+1),A=A.substring(0,y)):w<0&&(w=A.length)}else{if(Ie(d,2,D.length,"Base"),d==10&&J)return T=new I(i),ye(T,a+T.e+1,l);if(A=String(i),h=typeof i=="number"){if(i*0!=0)return o(T,A,h,d);if(T.s=1/i<0?(A=A.slice(1),-1):1,I.DEBUG&&A.replace(/^0\.0*|\./,"").length>15)throw Error(ms+i)}else T.s=A.charCodeAt(0)===45?(A=A.slice(1),-1):1;for(c=D.slice(0,d),w=y=0,k=A.length;y<k;y++)if(c.indexOf(g=A.charAt(y))<0){if(g=="."){if(y>w){w=k;continue}}else if(!m&&(A==A.toUpperCase()&&(A=A.toLowerCase())||A==A.toLowerCase()&&(A=A.toUpperCase()))){m=!0,y=-1,w=0;continue}return o(T,String(i),h,d)}h=!1,A=n(A,d,10,T.s),(w=A.indexOf("."))>-1?A=A.replace(".",""):w=A.length}for(y=0;A.charCodeAt(y)===48;y++);for(k=A.length;A.charCodeAt(--k)===48;);if(A=A.slice(y,++k)){if(k-=y,h&&I.DEBUG&&k>15&&(i>eo||i!==je(i)))throw Error(ms+T.s*i);if((w=w-y-1)>_)T.c=T.e=null;else if(w<N)T.c=[T.e=0];else{if(T.e=w,T.c=[],y=(w+1)%be,w<0&&(y+=be),y<k){for(y&&T.c.push(+A.slice(0,y)),k-=be;y<k;)T.c.push(+A.slice(y,y+=be));y=be-(A=A.slice(y)).length}else y-=k;for(;y--;A+="0");T.c.push(+A)}}else T.c=[T.e=0]}I.clone=hs,I.ROUND_UP=0,I.ROUND_DOWN=1,I.ROUND_CEIL=2,I.ROUND_FLOOR=3,I.ROUND_HALF_UP=4,I.ROUND_HALF_DOWN=5,I.ROUND_HALF_EVEN=6,I.ROUND_HALF_CEIL=7,I.ROUND_HALF_FLOOR=8,I.EUCLID=9,I.config=I.set=function(i){var d,c;if(i!=null)if(typeof i=="object"){if(i.hasOwnProperty(d="DECIMAL_PLACES")&&(c=i[d],Ie(c,0,_e,d),a=c),i.hasOwnProperty(d="ROUNDING_MODE")&&(c=i[d],Ie(c,0,8,d),l=c),i.hasOwnProperty(d="EXPONENTIAL_AT")&&(c=i[d],c&&c.pop?(Ie(c[0],-_e,0,d),Ie(c[1],0,_e,d),f=c[0],S=c[1]):(Ie(c,-_e,_e,d),f=-(S=c<0?-c:c))),i.hasOwnProperty(d="RANGE"))if(c=i[d],c&&c.pop)Ie(c[0],-_e,-1,d),Ie(c[1],1,_e,d),N=c[0],_=c[1];else if(Ie(c,-_e,_e,d),c)N=-(_=c<0?-c:c);else throw Error(We+d+" cannot be zero: "+c);if(i.hasOwnProperty(d="CRYPTO"))if(c=i[d],c===!!c)if(c)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))b=c;else throw b=!c,Error(We+"crypto unavailable");else b=c;else throw Error(We+d+" not true or false: "+c);if(i.hasOwnProperty(d="MODULO_MODE")&&(c=i[d],Ie(c,0,9,d),E=c),i.hasOwnProperty(d="POW_PRECISION")&&(c=i[d],Ie(c,0,_e,d),v=c),i.hasOwnProperty(d="FORMAT"))if(c=i[d],typeof c=="object")C=c;else throw Error(We+d+" not an object: "+c);if(i.hasOwnProperty(d="ALPHABET"))if(c=i[d],typeof c=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(c))J=c.slice(0,10)=="0123456789",D=c;else throw Error(We+d+" invalid: "+c)}else throw Error(We+"Object expected: "+i);return{DECIMAL_PLACES:a,ROUNDING_MODE:l,EXPONENTIAL_AT:[f,S],RANGE:[N,_],CRYPTO:b,MODULO_MODE:E,POW_PRECISION:v,FORMAT:C,ALPHABET:D}},I.isBigNumber=function(i){if(!i||i._isBigNumber!==!0)return!1;if(!I.DEBUG)return!0;var d,c,g=i.c,m=i.e,w=i.s;e:if({}.toString.call(g)=="[object Array]"){if((w===1||w===-1)&&m>=-_e&&m<=_e&&m===je(m)){if(g[0]===0){if(m===0&&g.length===1)return!0;break e}if(d=(m+1)%be,d<1&&(d+=be),String(g[0]).length==d){for(d=0;d<g.length;d++)if(c=g[d],c<0||c>=Qe||c!==je(c))break e;if(c!==0)return!0}}}else if(g===null&&m===null&&(w===null||w===1||w===-1))return!0;throw Error(We+"Invalid BigNumber: "+i)},I.maximum=I.max=function(){return K(arguments,-1)},I.minimum=I.min=function(){return K(arguments,1)},I.random=(function(){var i=9007199254740992,d=Math.random()*i&2097151?function(){return je(Math.random()*i)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(c){var g,m,w,y,h,k=0,A=[],T=new I(r);if(c==null?c=a:Ie(c,0,_e),y=Qn(c/be),b)if(crypto.getRandomValues){for(g=crypto.getRandomValues(new Uint32Array(y*=2));k<y;)h=g[k]*131072+(g[k+1]>>>11),h>=9e15?(m=crypto.getRandomValues(new Uint32Array(2)),g[k]=m[0],g[k+1]=m[1]):(A.push(h%1e14),k+=2);k=y/2}else if(crypto.randomBytes){for(g=crypto.randomBytes(y*=7);k<y;)h=(g[k]&31)*281474976710656+g[k+1]*1099511627776+g[k+2]*4294967296+g[k+3]*16777216+(g[k+4]<<16)+(g[k+5]<<8)+g[k+6],h>=9e15?crypto.randomBytes(7).copy(g,k):(A.push(h%1e14),k+=7);k=y/7}else throw b=!1,Error(We+"crypto unavailable");if(!b)for(;k<y;)h=d(),h<9e15&&(A[k++]=h%1e14);for(y=A[--k],c%=be,y&&c&&(h=to[be-c],A[k]=je(y/h)*h);A[k]===0;A.pop(),k--);if(k<0)A=[w=0];else{for(w=-1;A[0]===0;A.splice(0,1),w-=be);for(k=1,h=A[0];h>=10;h/=10,k++);k<be&&(w-=be-k)}return T.e=w,T.c=A,T}})(),I.sum=function(){for(var i=1,d=arguments,c=new I(d[0]);i<d.length;)c=c.plus(d[i++]);return c},n=(function(){var i="0123456789";function d(c,g,m,w){for(var y,h=[0],k,A=0,T=c.length;A<T;){for(k=h.length;k--;h[k]*=g);for(h[0]+=w.indexOf(c.charAt(A++)),y=0;y<h.length;y++)h[y]>m-1&&(h[y+1]==null&&(h[y+1]=0),h[y+1]+=h[y]/m|0,h[y]%=m)}return h.reverse()}return function(c,g,m,w,y){var h,k,A,T,F,H,re,ge,ke=c.indexOf("."),xe=a,G=l;for(ke>=0&&(T=v,v=0,c=c.replace(".",""),ge=new I(g),H=ge.pow(c.length-ke),v=T,ge.c=d(ut(Xe(H.c),H.e,"0"),10,m,i),ge.e=ge.c.length),re=d(c,g,m,y?(h=D,i):(h=i,D)),A=T=re.length;re[--T]==0;re.pop());if(!re[0])return h.charAt(0);if(ke<0?--A:(H.c=re,H.e=A,H.s=w,H=t(H,ge,xe,G,m),re=H.c,F=H.r,A=H.e),k=A+xe+1,ke=re[k],T=m/2,F=F||k<0||re[k+1]!=null,F=G<4?(ke!=null||F)&&(G==0||G==(H.s<0?3:2)):ke>T||ke==T&&(G==4||F||G==6&&re[k-1]&1||G==(H.s<0?8:7)),k<1||!re[0])c=F?ut(h.charAt(1),-xe,h.charAt(0)):h.charAt(0);else{if(re.length=k,F)for(--m;++re[--k]>m;)re[k]=0,k||(++A,re=[1].concat(re));for(T=re.length;!re[--T];);for(ke=0,c="";ke<=T;c+=h.charAt(re[ke++]));c=ut(c,A,h.charAt(0))}return c}})(),t=(function(){function i(g,m,w){var y,h,k,A,T=0,F=g.length,H=m%wt,re=m/wt|0;for(g=g.slice();F--;)k=g[F]%wt,A=g[F]/wt|0,y=re*k+A*H,h=H*k+y%wt*wt+T,T=(h/w|0)+(y/wt|0)+re*A,g[F]=h%w;return T&&(g=[T].concat(g)),g}function d(g,m,w,y){var h,k;if(w!=y)k=w>y?1:-1;else for(h=k=0;h<w;h++)if(g[h]!=m[h]){k=g[h]>m[h]?1:-1;break}return k}function c(g,m,w,y){for(var h=0;w--;)g[w]-=h,h=g[w]<m[w]?1:0,g[w]=h*y+g[w]-m[w];for(;!g[0]&&g.length>1;g.splice(0,1));}return function(g,m,w,y,h){var k,A,T,F,H,re,ge,ke,xe,G,we,Se,Ge,et,He,De,ze,Me=g.s==m.s?1:-1,Ne=g.c,Te=m.c;if(!Ne||!Ne[0]||!Te||!Te[0])return new I(!g.s||!m.s||(Ne?Te&&Ne[0]==Te[0]:!Te)?NaN:Ne&&Ne[0]==0||!Te?Me*0:Me/0);for(ke=new I(Me),xe=ke.c=[],A=g.e-m.e,Me=w+A+1,h||(h=Qe,A=Je(g.e/be)-Je(m.e/be),Me=Me/be|0),T=0;Te[T]==(Ne[T]||0);T++);if(Te[T]>(Ne[T]||0)&&A--,Me<0)xe.push(1),F=!0;else{for(et=Ne.length,De=Te.length,T=0,Me+=2,H=je(h/(Te[0]+1)),H>1&&(Te=i(Te,H,h),Ne=i(Ne,H,h),De=Te.length,et=Ne.length),Ge=De,G=Ne.slice(0,De),we=G.length;we<De;G[we++]=0);ze=Te.slice(),ze=[0].concat(ze),He=Te[0],Te[1]>=h/2&&He++;do{if(H=0,k=d(Te,G,De,we),k<0){if(Se=G[0],De!=we&&(Se=Se*h+(G[1]||0)),H=je(Se/He),H>1)for(H>=h&&(H=h-1),re=i(Te,H,h),ge=re.length,we=G.length;d(re,G,ge,we)==1;)H--,c(re,De<ge?ze:Te,ge,h),ge=re.length,k=1;else H==0&&(k=H=1),re=Te.slice(),ge=re.length;if(ge<we&&(re=[0].concat(re)),c(G,re,we,h),we=G.length,k==-1)for(;d(Te,G,De,we)<1;)H++,c(G,De<we?ze:Te,we,h),we=G.length}else k===0&&(H++,G=[0]);xe[T++]=H,G[0]?G[we++]=Ne[Ge]||0:(G=[Ne[Ge]],we=1)}while((Ge++<et||G[0]!=null)&&Me--);F=G[0]!=null,xe[0]||xe.splice(0,1)}if(h==Qe){for(T=1,Me=xe[0];Me>=10;Me/=10,T++);ye(ke,w+(ke.e=T+A*be-1)+1,y,F)}else ke.e=A,ke.r=+F;return ke}})();function q(i,d,c,g){var m,w,y,h,k;if(c==null?c=l:Ie(c,0,8),!i.c)return i.toString();if(m=i.c[0],y=i.e,d==null)k=Xe(i.c),k=g==1||g==2&&(y<=f||y>=S)?fn(k,y):ut(k,y,"0");else if(i=ye(new I(i),d,c),w=i.e,k=Xe(i.c),h=k.length,g==1||g==2&&(d<=w||w<=f)){for(;h<d;k+="0",h++);k=fn(k,w)}else if(d-=y+(g===2&&w>y),k=ut(k,w,"0"),w+1>h){if(--d>0)for(k+=".";d--;k+="0");}else if(d+=w-h,d>0)for(w+1==h&&(k+=".");d--;k+="0");return i.s<0&&m?"-"+k:k}function K(i,d){for(var c,g,m=1,w=new I(i[0]);m<i.length;m++)g=new I(i[m]),(!g.s||(c=St(w,g))===d||c===0&&w.s===d)&&(w=g);return w}function he(i,d,c){for(var g=1,m=d.length;!d[--m];d.pop());for(m=d[0];m>=10;m/=10,g++);return(c=g+c*be-1)>_?i.c=i.e=null:c<N?i.c=[i.e=0]:(i.e=c,i.c=d),i}o=(function(){var i=/^(-?)0([xbo])(?=\w[\w.]*$)/i,d=/^([^.]+)\.$/,c=/^\.([^.]+)$/,g=/^-?(Infinity|NaN)$/,m=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(w,y,h,k){var A,T=h?y:y.replace(m,"");if(g.test(T))w.s=isNaN(T)?null:T<0?-1:1;else{if(!h&&(T=T.replace(i,function(F,H,re){return A=(re=re.toLowerCase())=="x"?16:re=="b"?2:8,!k||k==A?H:F}),k&&(A=k,T=T.replace(d,"$1").replace(c,"0.$1")),y!=T))return new I(T,A);if(I.DEBUG)throw Error(We+"Not a"+(k?" base "+k:"")+" number: "+y);w.s=null}w.c=w.e=null}})();function ye(i,d,c,g){var m,w,y,h,k,A,T,F=i.c,H=to;if(F){e:{for(m=1,h=F[0];h>=10;h/=10,m++);if(w=d-m,w<0)w+=be,y=d,k=F[A=0],T=je(k/H[m-y-1]%10);else if(A=Qn((w+1)/be),A>=F.length)if(g){for(;F.length<=A;F.push(0));k=T=0,m=1,w%=be,y=w-be+1}else break e;else{for(k=h=F[A],m=1;h>=10;h/=10,m++);w%=be,y=w-be+m,T=y<0?0:je(k/H[m-y-1]%10)}if(g=g||d<0||F[A+1]!=null||(y<0?k:k%H[m-y-1]),g=c<4?(T||g)&&(c==0||c==(i.s<0?3:2)):T>5||T==5&&(c==4||g||c==6&&(w>0?y>0?k/H[m-y]:0:F[A-1])%10&1||c==(i.s<0?8:7)),d<1||!F[0])return F.length=0,g?(d-=i.e+1,F[0]=H[(be-d%be)%be],i.e=-d||0):F[0]=i.e=0,i;if(w==0?(F.length=A,h=1,A--):(F.length=A+1,h=H[be-w],F[A]=y>0?je(k/H[m-y]%H[y])*h:0),g)for(;;)if(A==0){for(w=1,y=F[0];y>=10;y/=10,w++);for(y=F[0]+=h,h=1;y>=10;y/=10,h++);w!=h&&(i.e++,F[0]==Qe&&(F[0]=1));break}else{if(F[A]+=h,F[A]!=Qe)break;F[A--]=0,h=1}for(w=F.length;F[--w]===0;F.pop());}i.e>_?i.c=i.e=null:i.e<N&&(i.c=[i.e=0])}return i}function Be(i){var d,c=i.e;return c===null?i.toString():(d=Xe(i.c),d=c<=f||c>=S?fn(d,c):ut(d,c,"0"),i.s<0?"-"+d:d)}return s.absoluteValue=s.abs=function(){var i=new I(this);return i.s<0&&(i.s=1),i},s.comparedTo=function(i,d){return St(this,new I(i,d))},s.decimalPlaces=s.dp=function(i,d){var c,g,m,w=this;if(i!=null)return Ie(i,0,_e),d==null?d=l:Ie(d,0,8),ye(new I(w),i+w.e+1,d);if(!(c=w.c))return null;if(g=((m=c.length-1)-Je(this.e/be))*be,m=c[m])for(;m%10==0;m/=10,g--);return g<0&&(g=0),g},s.dividedBy=s.div=function(i,d){return t(this,new I(i,d),a,l)},s.dividedToIntegerBy=s.idiv=function(i,d){return t(this,new I(i,d),0,1)},s.exponentiatedBy=s.pow=function(i,d){var c,g,m,w,y,h,k,A,T,F=this;if(i=new I(i),i.c&&!i.isInteger())throw Error(We+"Exponent not an integer: "+Be(i));if(d!=null&&(d=new I(d)),h=i.e>14,!F.c||!F.c[0]||F.c[0]==1&&!F.e&&F.c.length==1||!i.c||!i.c[0])return T=new I(Math.pow(+Be(F),h?i.s*(2-un(i)):+Be(i))),d?T.mod(d):T;if(k=i.s<0,d){if(d.c?!d.c[0]:!d.s)return new I(NaN);g=!k&&F.isInteger()&&d.isInteger(),g&&(F=F.mod(d))}else{if(i.e>9&&(F.e>0||F.e<-1||(F.e==0?F.c[0]>1||h&&F.c[1]>=24e7:F.c[0]<8e13||h&&F.c[0]<=9999975e7)))return w=F.s<0&&un(i)?-0:0,F.e>-1&&(w=1/w),new I(k?1/w:w);v&&(w=Qn(v/be+2))}for(h?(c=new I(.5),k&&(i.s=1),A=un(i)):(m=Math.abs(+Be(i)),A=m%2),T=new I(r);;){if(A){if(T=T.times(F),!T.c)break;w?T.c.length>w&&(T.c.length=w):g&&(T=T.mod(d))}if(m){if(m=je(m/2),m===0)break;A=m%2}else if(i=i.times(c),ye(i,i.e+1,1),i.e>14)A=un(i);else{if(m=+Be(i),m===0)break;A=m%2}F=F.times(F),w?F.c&&F.c.length>w&&(F.c.length=w):g&&(F=F.mod(d))}return g?T:(k&&(T=r.div(T)),d?T.mod(d):w?ye(T,v,l,y):T)},s.integerValue=function(i){var d=new I(this);return i==null?i=l:Ie(i,0,8),ye(d,d.e+1,i)},s.isEqualTo=s.eq=function(i,d){return St(this,new I(i,d))===0},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(i,d){return St(this,new I(i,d))>0},s.isGreaterThanOrEqualTo=s.gte=function(i,d){return(d=St(this,new I(i,d)))===1||d===0},s.isInteger=function(){return!!this.c&&Je(this.e/be)>this.c.length-2},s.isLessThan=s.lt=function(i,d){return St(this,new I(i,d))<0},s.isLessThanOrEqualTo=s.lte=function(i,d){return(d=St(this,new I(i,d)))===-1||d===0},s.isNaN=function(){return!this.s},s.isNegative=function(){return this.s<0},s.isPositive=function(){return this.s>0},s.isZero=function(){return!!this.c&&this.c[0]==0},s.minus=function(i,d){var c,g,m,w,y=this,h=y.s;if(i=new I(i,d),d=i.s,!h||!d)return new I(NaN);if(h!=d)return i.s=-d,y.plus(i);var k=y.e/be,A=i.e/be,T=y.c,F=i.c;if(!k||!A){if(!T||!F)return T?(i.s=-d,i):new I(F?y:NaN);if(!T[0]||!F[0])return F[0]?(i.s=-d,i):new I(T[0]?y:l==3?-0:0)}if(k=Je(k),A=Je(A),T=T.slice(),h=k-A){for((w=h<0)?(h=-h,m=T):(A=k,m=F),m.reverse(),d=h;d--;m.push(0));m.reverse()}else for(g=(w=(h=T.length)<(d=F.length))?h:d,h=d=0;d<g;d++)if(T[d]!=F[d]){w=T[d]<F[d];break}if(w&&(m=T,T=F,F=m,i.s=-i.s),d=(g=F.length)-(c=T.length),d>0)for(;d--;T[c++]=0);for(d=Qe-1;g>h;){if(T[--g]<F[g]){for(c=g;c&&!T[--c];T[c]=d);--T[c],T[g]+=Qe}T[g]-=F[g]}for(;T[0]==0;T.splice(0,1),--A);return T[0]?he(i,T,A):(i.s=l==3?-1:1,i.c=[i.e=0],i)},s.modulo=s.mod=function(i,d){var c,g,m=this;return i=new I(i,d),!m.c||!i.s||i.c&&!i.c[0]?new I(NaN):!i.c||m.c&&!m.c[0]?new I(m):(E==9?(g=i.s,i.s=1,c=t(m,i,0,3),i.s=g,c.s*=g):c=t(m,i,0,E),i=m.minus(c.times(i)),!i.c[0]&&E==1&&(i.s=m.s),i)},s.multipliedBy=s.times=function(i,d){var c,g,m,w,y,h,k,A,T,F,H,re,ge,ke,xe,G=this,we=G.c,Se=(i=new I(i,d)).c;if(!we||!Se||!we[0]||!Se[0])return!G.s||!i.s||we&&!we[0]&&!Se||Se&&!Se[0]&&!we?i.c=i.e=i.s=null:(i.s*=G.s,!we||!Se?i.c=i.e=null:(i.c=[0],i.e=0)),i;for(g=Je(G.e/be)+Je(i.e/be),i.s*=G.s,k=we.length,F=Se.length,k<F&&(ge=we,we=Se,Se=ge,m=k,k=F,F=m),m=k+F,ge=[];m--;ge.push(0));for(ke=Qe,xe=wt,m=F;--m>=0;){for(c=0,H=Se[m]%xe,re=Se[m]/xe|0,y=k,w=m+y;w>m;)A=we[--y]%xe,T=we[y]/xe|0,h=re*A+T*H,A=H*A+h%xe*xe+ge[w]+c,c=(A/ke|0)+(h/xe|0)+re*T,ge[w--]=A%ke;ge[w]=c}return c?++g:ge.splice(0,1),he(i,ge,g)},s.negated=function(){var i=new I(this);return i.s=-i.s||null,i},s.plus=function(i,d){var c,g=this,m=g.s;if(i=new I(i,d),d=i.s,!m||!d)return new I(NaN);if(m!=d)return i.s=-d,g.minus(i);var w=g.e/be,y=i.e/be,h=g.c,k=i.c;if(!w||!y){if(!h||!k)return new I(m/0);if(!h[0]||!k[0])return k[0]?i:new I(h[0]?g:m*0)}if(w=Je(w),y=Je(y),h=h.slice(),m=w-y){for(m>0?(y=w,c=k):(m=-m,c=h),c.reverse();m--;c.push(0));c.reverse()}for(m=h.length,d=k.length,m-d<0&&(c=k,k=h,h=c,d=m),m=0;d;)m=(h[--d]=h[d]+k[d]+m)/Qe|0,h[d]=Qe===h[d]?0:h[d]%Qe;return m&&(h=[m].concat(h),++y),he(i,h,y)},s.precision=s.sd=function(i,d){var c,g,m,w=this;if(i!=null&&i!==!!i)return Ie(i,1,_e),d==null?d=l:Ie(d,0,8),ye(new I(w),i,d);if(!(c=w.c))return null;if(m=c.length-1,g=m*be+1,m=c[m]){for(;m%10==0;m/=10,g--);for(m=c[0];m>=10;m/=10,g++);}return i&&w.e+1>g&&(g=w.e+1),g},s.shiftedBy=function(i){return Ie(i,-eo,eo),this.times("1e"+i)},s.squareRoot=s.sqrt=function(){var i,d,c,g,m,w=this,y=w.c,h=w.s,k=w.e,A=a+4,T=new I("0.5");if(h!==1||!y||!y[0])return new I(!h||h<0&&(!y||y[0])?NaN:y?w:1/0);if(h=Math.sqrt(+Be(w)),h==0||h==1/0?(d=Xe(y),(d.length+k)%2==0&&(d+="0"),h=Math.sqrt(+d),k=Je((k+1)/2)-(k<0||k%2),h==1/0?d="5e"+k:(d=h.toExponential(),d=d.slice(0,d.indexOf("e")+1)+k),c=new I(d)):c=new I(h+""),c.c[0]){for(k=c.e,h=k+A,h<3&&(h=0);;)if(m=c,c=T.times(m.plus(t(w,m,A,1))),Xe(m.c).slice(0,h)===(d=Xe(c.c)).slice(0,h))if(c.e<k&&--h,d=d.slice(h-3,h+1),d=="9999"||!g&&d=="4999"){if(!g&&(ye(m,m.e+a+2,0),m.times(m).eq(w))){c=m;break}A+=4,h+=4,g=1}else{(!+d||!+d.slice(1)&&d.charAt(0)=="5")&&(ye(c,c.e+a+2,1),i=!c.times(c).eq(w));break}}return ye(c,c.e+a+1,l,i)},s.toExponential=function(i,d){return i!=null&&(Ie(i,0,_e),i++),q(this,i,d,1)},s.toFixed=function(i,d){return i!=null&&(Ie(i,0,_e),i=i+this.e+1),q(this,i,d)},s.toFormat=function(i,d,c){var g,m=this;if(c==null)i!=null&&d&&typeof d=="object"?(c=d,d=null):i&&typeof i=="object"?(c=i,i=d=null):c=C;else if(typeof c!="object")throw Error(We+"Argument not an object: "+c);if(g=m.toFixed(i,d),m.c){var w,y=g.split("."),h=+c.groupSize,k=+c.secondaryGroupSize,A=c.groupSeparator||"",T=y[0],F=y[1],H=m.s<0,re=H?T.slice(1):T,ge=re.length;if(k&&(w=h,h=k,k=w,ge-=w),h>0&&ge>0){for(w=ge%h||h,T=re.substr(0,w);w<ge;w+=h)T+=A+re.substr(w,h);k>0&&(T+=A+re.slice(w)),H&&(T="-"+T)}g=F?T+(c.decimalSeparator||"")+((k=+c.fractionGroupSize)?F.replace(new RegExp("\\d{"+k+"}\\B","g"),"$&"+(c.fractionGroupSeparator||"")):F):T}return(c.prefix||"")+g+(c.suffix||"")},s.toFraction=function(i){var d,c,g,m,w,y,h,k,A,T,F,H,re=this,ge=re.c;if(i!=null&&(h=new I(i),!h.isInteger()&&(h.c||h.s!==1)||h.lt(r)))throw Error(We+"Argument "+(h.isInteger()?"out of range: ":"not an integer: ")+Be(h));if(!ge)return new I(re);for(d=new I(r),A=c=new I(r),g=k=new I(r),H=Xe(ge),w=d.e=H.length-re.e-1,d.c[0]=to[(y=w%be)<0?be+y:y],i=!i||h.comparedTo(d)>0?w>0?d:A:h,y=_,_=1/0,h=new I(H),k.c[0]=0;T=t(h,d,0,1),m=c.plus(T.times(g)),m.comparedTo(i)!=1;)c=g,g=m,A=k.plus(T.times(m=A)),k=m,d=h.minus(T.times(m=d)),h=m;return m=t(i.minus(c),g,0,1),k=k.plus(m.times(A)),c=c.plus(m.times(g)),k.s=A.s=re.s,w=w*2,F=t(A,g,w,l).minus(re).abs().comparedTo(t(k,c,w,l).minus(re).abs())<1?[A,g]:[k,c],_=y,F},s.toNumber=function(){return+Be(this)},s.toPrecision=function(i,d){return i!=null&&Ie(i,1,_e),q(this,i,d,2)},s.toString=function(i){var d,c=this,g=c.s,m=c.e;return m===null?g?(d="Infinity",g<0&&(d="-"+d)):d="NaN":(i==null?d=m<=f||m>=S?fn(Xe(c.c),m):ut(Xe(c.c),m,"0"):i===10&&J?(c=ye(new I(c),a+m+1,l),d=ut(Xe(c.c),c.e,"0")):(Ie(i,2,D.length,"Base"),d=n(ut(Xe(c.c),m,"0"),10,i,g,!0)),g<0&&c.c[0]&&(d="-"+d)),d},s.valueOf=s.toJSON=function(){return Be(this)},s._isBigNumber=!0,s[Symbol.toStringTag]="BigNumber",s[Symbol.for("nodejs.util.inspect.custom")]=s.valueOf,e!=null&&I.set(e),I}function Je(e){var t=e|0;return e>0||e===t?t:t-1}function Xe(e){for(var t,n,o=1,s=e.length,r=e[0]+"";o<s;){for(t=e[o++]+"",n=be-t.length;n--;t="0"+t);r+=t}for(s=r.length;r.charCodeAt(--s)===48;);return r.slice(0,s+1||1)}function St(e,t){var n,o,s=e.c,r=t.c,a=e.s,l=t.s,f=e.e,S=t.e;if(!a||!l)return null;if(n=s&&!s[0],o=r&&!r[0],n||o)return n?o?0:-l:a;if(a!=l)return a;if(n=a<0,o=f==S,!s||!r)return o?0:!s^n?1:-1;if(!o)return f>S^n?1:-1;for(l=(f=s.length)<(S=r.length)?f:S,a=0;a<l;a++)if(s[a]!=r[a])return s[a]>r[a]^n?1:-1;return f==S?0:f>S^n?1:-1}function Ie(e,t,n,o){if(e<t||e>n||e!==je(e))throw Error(We+(o||"Argument")+(typeof e=="number"?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function un(e){var t=e.c.length-1;return Je(e.e/be)==t&&e.c[t]%2!=0}function fn(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function ut(e,t,n){var o,s;if(t<0){for(s=n+".";++t;s+=n);e=s+e}else if(o=e.length,++t>o){for(s=n,t-=o;--t;s+=n);e+=s}else t<o&&(e=e.slice(0,t)+"."+e.slice(t));return e}var ue=hs();class pn{baseUrl;constructor(t){this.baseUrl=t}buildUrl(t,n){const o=new URL(t,this.baseUrl);return n&&Object.entries(n).forEach(([s,r])=>{r!=null&&o.searchParams.append(s,String(r))}),o.toString()}async get(t,n={}){const o=this.buildUrl(t,n.query),s=await fetch(o,{method:"GET",headers:n.headers||{}});if(!s.ok){let a=null;try{a=await s.json()}catch{try{const f=await s.text();f&&(a={message:f})}catch{}}const l=new Error(a?.message||a?.errorMessage||`HTTP ${s.status}: ${s.statusText}`);throw l.status=s.status,l.statusText=s.statusText,a&&(l.data=a),l}return{data:await s.json(),status:s.status}}async post(t,n,o={}){const s=this.buildUrl(t,o.query),r=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",...o.headers},body:JSON.stringify(n)});if(!r.ok){let l=null;try{l=await r.json()}catch{try{const S=await r.text();S&&(l={message:S})}catch{}}const f=new Error(l?.message||l?.errorMessage||`HTTP ${r.status}: ${r.statusText}`);throw f.status=r.status,f.statusText=r.statusText,l&&(f.data=l),f}return{data:await r.json(),status:r.status}}}const Ni="https://deep-index.moralis.io";function Jt(){return"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJub25jZSI6ImY4NmY0Yzc2LTA3MDQtNGEwZS04YTA0LWUwODllOGQxMGZjZCIsIm9yZ0lkIjoiMzk0MDAyIiwidXNlcklkIjoiNDA0ODUzIiwidHlwZUlkIjoiYjQyODExOTQtOGQ0Yi00NjkxLTlhZjItNjU4ODE2NzExYmRjIiwidHlwZSI6IlBST0pFQ1QiLCJpYXQiOjE3MTY4NjQyNTYsImV4cCI6NDg3MjYyNDI1Nn0.V8crfBIBardAnZkc05FD0hQIJBeZxMqvzRnYExVtnF8"}function Xt(e){return{"X-API-Key":e,Accept:"application/json"}}const Kt=new pn(Ni);async function ot(e){const{address:t,chain:n="base",token_addresses:o,exclude_spam:s,exclude_unverified_contracts:r}=e;if(!t)throw new Error("Address is required");try{const a=Jt(),l={chain:n,exclude_spam:s??!1,exclude_unverified_contracts:r??!1};o&&(l.token_addresses=o);const S=(await Kt.get(`/api/v2.2/wallets/${encodeURIComponent(t)}/tokens`,{query:l,headers:Xt(a)})).data;return S?.result?.length>0&&(S.result=S.result.filter(N=>new ue(N?.balance||0).gt(0)),S.result=S.result.map(N=>({...N,token_address:N.token_address===wi?Ye:N.token_address}))),{success:!0,data:S}}catch(a){const l=a instanceof Error?a.message:"Unknown error";return console.error("❌ Error fetching token balances:",l),{success:!1,error:l}}}async function Pi(e){const{address:t,chain:n="base"}=e;if(!t)throw new Error("Token address is required");try{const o=Jt(),[s,r]=await Promise.allSettled([Kt.get("/api/v2.2/erc20/metadata",{query:{chain:n,addresses:[t]},headers:Xt(o)}),Kt.get(`/api/v2.2/erc20/${encodeURIComponent(t)}/price`,{query:{chain:n,include:"percent_change"},headers:Xt(o)})]),a=s.status==="fulfilled"?s.value.data:[];if(!a||a.length===0)return{success:!1,error:"Token metadata not found"};const l=a[0],f=r.status==="fulfilled"?r.value.data?.usdPrice??void 0:void 0;return{success:!0,data:{token_address:l.token_address,name:l.name,symbol:l.symbol,decimals:l.decimals,logo:l.logo||l.thumbnail,thumbnail:l.thumbnail,usd_price:f}}}catch(o){const s=o instanceof Error?o.message:"Unknown error";return console.error("❌ Error fetching token metadata:",s),{success:!1,error:s}}}async function Fi(e){const{prompt:t,model:n="gpt-4.1-mini",stream:o=!1,systemPrompt:s}=e;if(!t)throw new Error("Prompt is required");try{const r=Jt(),a=new pn("https://cortex-api.moralis.io"),l=s?`${s}
95
+ `,s+=rs(o.state)),o.stateDiff&&(s+=` stateDiff:
96
+ `,s+=rs(o.stateDiff)),s},` State Override:
97
+ `).slice(0,-1)}class ti extends pe{constructor(t,{account:n,docsPath:o,chain:s,data:a,gas:r,gasPrice:l,maxFeePerGas:d,maxPriorityFeePerGas:S,nonce:N,to:_,value:g,stateOverride:E}){const w=n?qn(n):void 0;let B=Bo({from:w?.address,to:_,value:typeof g<"u"&&`${pa(g)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:a,gas:r,gasPrice:typeof l<"u"&&`${St(l)} gwei`,maxFeePerGas:typeof d<"u"&&`${St(d)} gwei`,maxPriorityFeePerGas:typeof S<"u"&&`${St(S)} gwei`,nonce:N});E&&(B+=`
98
+ ${ei(E)}`),super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",B].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function ni(e,t){const n=(e.details||"").toLowerCase(),o=e instanceof pe?e.walk(s=>s?.code===Rt.code):e;return o instanceof pe?new Rt({cause:e,message:o.details}):Rt.nodeMessage.test(n)?new Rt({cause:e,message:e.details}):Bt.nodeMessage.test(n)?new Bt({cause:e,maxFeePerGas:t?.maxFeePerGas}):Un.nodeMessage.test(n)?new Un({cause:e,maxFeePerGas:t?.maxFeePerGas}):On.nodeMessage.test(n)?new On({cause:e,nonce:t?.nonce}):Dn.nodeMessage.test(n)?new Dn({cause:e,nonce:t?.nonce}):Mn.nodeMessage.test(n)?new Mn({cause:e,nonce:t?.nonce}):_n.nodeMessage.test(n)?new _n({cause:e}):Ln.nodeMessage.test(n)?new Ln({cause:e,gas:t?.gas}):Rn.nodeMessage.test(n)?new Rn({cause:e,gas:t?.gas}):Hn.nodeMessage.test(n)?new Hn({cause:e}):qt.nodeMessage.test(n)?new qt({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new Wo({cause:e})}function oi(e,{docsPath:t,...n}){const o=(()=>{const s=ni(e,n);return s instanceof Wo?e:s})();return new ti(o,{docsPath:t,...n})}function si(e,{format:t}){if(!t)return{};const n={};function o(a){const r=Object.keys(a);for(const l of r)l in e&&(n[l]=e[l]),a[l]&&typeof a[l]=="object"&&!Array.isArray(a[l])&&o(a[l])}const s=t(e||{});return o(s),n}function ai(e){const{account:t,maxFeePerGas:n,maxPriorityFeePerGas:o,to:s}=e,a=t?qn(t):void 0;if(a&&!Re(a.address))throw new it({address:a.address});if(s&&!Re(s))throw new it({address:s});if(n&&n>_t)throw new Bt({maxFeePerGas:n});if(o&&n&&o>n)throw new qt({maxFeePerGas:n,maxPriorityFeePerGas:o})}async function ri(e,t){const{account:n=e.account}=t;if(!n)throw new Sr;const o=qn(n);try{const{accessList:s,blockNumber:a,blockTag:r,data:l,gas:d,gasPrice:S,maxFeePerGas:N,maxPriorityFeePerGas:_,nonce:g,to:E,value:w,...B}=t,Q=(typeof a=="bigint"?de(a):void 0)||r;ai(t);const I=e.chain?.formatters?.transactionRequest?.format,ne=(I||oa)({...si(B,{format:I}),account:o,accessList:s,data:l,gas:d,gasPrice:S,maxFeePerGas:N,maxPriorityFeePerGas:_,nonce:g,to:E,value:w},"estimateGas"),{baseFeePerGas:he,gasLimit:ye,priorityFeePerGas:Be}=await e.request({method:"linea_estimateGas",params:Q?[ne,Q]:[ne]});return{baseFeePerGas:BigInt(he),gasLimit:BigInt(ye),priorityFeePerGas:BigInt(Be)}}catch(s){throw oi(s,{...t,account:o,chain:e.chain})}}const ii={fees:{estimateFeesPerGas:is,async maxPriorityFeePerGas({block:e,client:t,request:n}){const o=await is({block:e,client:t,multiply:s=>s,request:n,type:"eip1559"});return o?.maxPriorityFeePerGas?o.maxPriorityFeePerGas:null}}};async function is({client:e,multiply:t,request:n,type:o}){try{const s=await ri(e,{...n,account:n?.account}),{priorityFeePerGas:a}=s,l=t(BigInt(s.baseFeePerGas))+a;return o==="legacy"?{gasPrice:l}:{maxFeePerGas:l,maxPriorityFeePerGas:a}}catch{return null}}const ci=lt({...ii,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}),li=lt({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}}}),Kt=1,di=lt({...fn,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:{...fn.contracts,disputeGameFactory:{[Kt]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[Kt]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[Kt]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[Kt]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:Kt}),ui=lt({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),cs="/docs/contract/encodeFunctionData";function fi(e){const{abi:t,args:n,functionName:o}=e;let s=t[0];if(o){const a=Qr({abi:t,args:n,name:o});if(!a)throw new ts(o,{docsPath:cs});s=a}if(s.type!=="function")throw new ts(void 0,{docsPath:cs});return{abi:[s],functionName:ss(Yn(s))}}function vt(e){const{args:t}=e,{abi:n,functionName:o}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:fi(e),s=n[0],a=o,r="inputs"in s&&s.inputs?Wr(s.inputs,t??[]):void 0;return xt([a,r??"0x"])}const ft={1:{...li,logo:"https://cryptologos.cc/logos/ethereum-eth-logo.png?v=024",chainId:1,chainType:"ether",chainTypeMoralis:"eth",tokenTrendingDefault:["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"]},10:{...di,logo:"https://cryptologos.cc/logos/optimism-ethereum-op-logo.png?v=024",chainId:10,chainType:"optimism",chainTypeMoralis:"optimism",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0x68f180fcce6836688e9084f035309e29bf0a2095","0xc47da4cb96ce65a96844a01bfae509f9d5454534"]},56:{...Er,logo:"https://cryptologos.cc/logos/bnb-bnb-logo.png?v=024",chainId:56,chainType:"bsc",chainTypeMoralis:"bsc",tokenTrendingDefault:["0x2170ed0880ac9a755fd29b2688956bd959f933f8","0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c"]},137:{...ui,rpcUrls:{default:{http:["https://polygon-bor-rpc.publicnode.com"]}},logo:"https://cryptologos.cc/logos/polygon-matic-logo.png?v=024",chainId:137,chainType:"matic",chainTypeMoralis:"polygon",tokenTrendingDefault:["0x7ceb23fd6bc0add59e62ac25578270cff1b9f619","0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6"]},8453:{...Qo,logo:"https://icons.llamao.fi/icons/chains/rsz_base.jpg",chainId:8453,chainType:"base",chainTypeMoralis:"base",tokenTrendingDefault:["0x4200000000000000000000000000000000000006","0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf","0xc47da4cb96ce65a96844a01bfae509f9d5454534"]},42161:{...Tr,logo:"https://cryptologos.cc/logos/arbitrum-arb-logo.png?v=024",chainId:42161,chainType:"arbitrum",chainTypeMoralis:"arbitrum",tokenTrendingDefault:["0x82af49447d8a07e3bd95bd0d56f35241523fbab1","0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f"]},43114:{...xr,logo:"https://cryptologos.cc/logos/avalanche-avax-logo.png?v=024",chainId:43114,chainType:"avax",chainTypeMoralis:"avalanche",tokenTrendingDefault:["0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB","0x0555E30da8f98308EdB960aa94C0Db47230d2B9c"]},59144:{...ci,logo:"https://icons.llamao.fi/icons/chains/rsz_linea.jpg",chainId:59144,chainType:"linea",chainTypeMoralis:"linea",tokenTrendingDefault:["0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f","0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4"]}},pi=e=>{const t=new Date,n=new Date(t);n.setDate(n.getDate()-1);const o=new Date(e);return o.setHours(0,0,0,0),t.setHours(0,0,0,0),n.setHours(0,0,0,0),o.getTime()===t.getTime()?"Today":o.getTime()===n.getTime()?"Yesterday":o.toLocaleDateString("en-US",{month:"short",day:"numeric",year:o.getFullYear()!==t.getFullYear()?"numeric":void 0})},nt=e=>new Promise(t=>setTimeout(t,e||0)),mi=(e,t=5,n=5)=>(e=e||"",e?.length<=t+n?e:`${e.substr(0,t)}...${e.substr(e.length-n,n)}`),hi=e=>{if(!e)return"";const t=ft[e];return t?t.chainTypeMoralis:""},bi=e=>{if(!e)return"";const t=ft[e];return t?t.chainType:""},Ct={getItem(e){if(typeof window>"u")return null;try{return window.localStorage.getItem(e)}catch{return null}},setItem(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,t)}catch{}},removeItem(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}},get length(){if(typeof window>"u")return 0;try{return window.localStorage.length}catch{return 0}},key(e){if(typeof window>"u")return null;try{return window.localStorage.key(e)}catch{return null}}};class gi extends pe{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function pt(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new gi({value:e});let[n,o="0"]=e.split(".");const s=n.startsWith("-");if(s&&(n=n.slice(1)),o=o.replace(/(0+)$/,""),t===0)Math.round(+`.${o}`)===1&&(n=`${BigInt(n)+1n}`),o="";else if(o.length>t){const[a,r,l]=[o.slice(0,t-1),o.slice(t-1,t),o.slice(t)],d=Math.round(+`${r}.${l}`);d>9?o=`${BigInt(a)+BigInt(1)}0`.padStart(a.length+1,"0"):o=`${a}${d}`,o.length>t&&(o=o.slice(1),n=`${BigInt(n)+1n}`),o=o.slice(0,t)}else o=o.padEnd(t,"0");return BigInt(`${s?"-":""}${n}${o}`)}const wi="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",$e="0x0000000000000000000000000000000000000000",ls=se.createContext(void 0),Zn=()=>{const e=se.useContext(ls);if(!e)throw new Error("useConnect must be used within ConnectProvider");return{...e,chainData:ft[e.account?.chainId]||void 0,chainId:e.account?.chainId||void 0,chainType:bi(e.account?.chainId||void 0),chainTypeMoralis:hi(e.account?.chainId||void 0),isChainSupported:!!ft[e.account?.chainId]}},yi=({children:e,initialAccount:t})=>C.jsx(ls.Provider,{value:{account:t||null},children:e}),vi=({address:e,chainId:t})=>{const[n,o]=se.useState(!1),{isChainSupported:s}=Zn(),a=se.useCallback(()=>{if(!e)return;const r=e,l=()=>{o(!0),setTimeout(()=>o(!1),2e3)};try{navigator.clipboard.writeText(r).then(l).catch(()=>{const d=document.createElement("input");d.value=r,document.body.appendChild(d),d.select(),document.execCommand("copy"),d.remove(),l()})}catch{const d=document.createElement("input");d.value=r,document.body.appendChild(d),d.select(),document.execCommand("copy"),d.remove(),l()}},[e]);return C.jsx(C.Fragment,{children:Re(e||"")&&C.jsxs("div",{className:"chat-user-info",children:[t&&ft[t]?.logo&&C.jsx("div",{className:"user-avatar",children:C.jsx("img",{src:ft[t].logo||"",alt:"Chain",width:20,height:20})}),C.jsx("span",{className:"user-wallet",children:C.jsx("a",{style:{pointerEvents:s?"auto":"none"},href:ft[t]?.blockExplorers?.default?.url+"/address/"+e,target:"_blank",rel:"noopener noreferrer",children:mi(e)||"Not connected"})}),C.jsx("button",{className:"copy-address-btn",onClick:a,"aria-label":"Copy wallet address",type:"button",title:n?"Copied!":"Copy address",children:n?C.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:C.jsx("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):C.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:[C.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),C.jsx("path",{d:"M5 15H4C2.89543 15 2 14.1046 2 13V4C2 2.89543 2.89543 2 4 2H13C14.1046 2 15 2.89543 15 4V5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})})},He=[];for(let e=0;e<256;++e)He.push((e+256).toString(16).slice(1));function Ai(e,t=0){return(He[e[t+0]]+He[e[t+1]]+He[e[t+2]]+He[e[t+3]]+"-"+He[e[t+4]]+He[e[t+5]]+"-"+He[e[t+6]]+He[e[t+7]]+"-"+He[e[t+8]]+He[e[t+9]]+"-"+He[e[t+10]]+He[e[t+11]]+He[e[t+12]]+He[e[t+13]]+He[e[t+14]]+He[e[t+15]]).toLowerCase()}let Qn;const ki=new Uint8Array(16);function Ti(){if(!Qn){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Qn=crypto.getRandomValues.bind(crypto)}return Qn(ki)}const ds={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function xi(e,t,n){e=e||{};const o=e.random??e.rng?.()??Ti();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Ai(o)}function us(e,t,n){return ds.randomUUID&&!e?ds.randomUUID():xi(e)}const eo="chat_widget_messages",fs=200,Ht=[{id:us(),text:`**Welcome! 🚀**
99
+ You're connected and ready to explore DeFi! I can help you trade, check prices, and analyze your portfolio when you need it.`,sender:"bot",timestamp:new Date}];function Ei(e,t){return e&&t?`${e}_${t}`:""}function ps(e){return e.map(t=>({...t,timestamp:new Date(t.timestamp)}))}function ms(){const e=Ct.getItem(eo);if(!e)return null;try{const t=JSON.parse(e);if(t&&t.owner!==void 0&&Array.isArray(t.messages))return{owner:t.owner,messages:ps(t.messages)};if(Array.isArray(t))return{owner:"",messages:ps(t)}}catch{}return null}function pn(e,t){Ct.setItem(eo,JSON.stringify({owner:e,messages:t}))}function Si(){const{account:e}=Zn(),t=Ei(e?.address,e?.chainId),[n,o]=se.useState(()=>t||"pending"),[s,a]=se.useState(()=>{const N=ms();return t?N&&N.owner===t?N.messages:Ht:N?.messages??Ht});if(n==="pending"&&t){const N=ms();N&&N.owner===t?a(N.messages):pn(t,s),o(t)}else n!=="pending"&&t&&n!==t&&(a(Ht),pn(t,Ht),o(t));se.useEffect(()=>{n!=="pending"&&pn(n,s)},[s,n]),se.useEffect(()=>{const N=[];for(let _=0;_<Ct.length;_++){const g=Ct.key(_);g&&g.startsWith(eo+"_")&&N.push(g)}N.forEach(_=>Ct.removeItem(_))},[]);const r=(N,_,g,E,w)=>{const B=g?s.find(Q=>Q.id===g):void 0,M={id:us(),text:N,sender:_,timestamp:new Date,...B&&{replyTo:{id:B.id,text:B.text,sender:B.sender}},...E&&{buttons:E},...w&&{actionData:w}};return a(Q=>{const I=[...Q,M];return I.length>fs?I.slice(I.length-fs):I}),M},l=(N,_)=>{a(g=>g.map(E=>E.id===N&&E.actionData?{...E,actionData:{...E.actionData,status:_}}:E))},d=(N,_)=>{a(g=>g.map(E=>E.id===N?{...E,text:_}:E))},S=se.useCallback(()=>{a(Ht),pn(t,Ht)},[t]);return{messages:s,setMessages:a,addMessage:r,updateMessageAction:l,updateMessageText:d,clearMessages:S}}const hs=se.createContext(void 0),Bi=()=>{const e=se.useContext(hs);if(!e)throw new Error("useConfig must be used within ConfigProvider");return e},Ci=({children:e,initialConfig:t})=>C.jsx(hs.Provider,{value:{config:t||null},children:e});var Ii=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,to=Math.ceil,Ke=Math.floor,Ge="[BigNumber Error] ",bs=Ge+"Number primitive has more than 15 significant digits: ",ot=1e14,ge=14,no=9007199254740991,oo=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],At=1e7,Le=1e9;function gs(e){var t,n,o,s=I.prototype={constructor:I,toString:null,valueOf:null},a=new I(1),r=20,l=4,d=-7,S=21,N=-1e7,_=1e7,g=!1,E=1,w=0,B={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},M="0123456789abcdefghijklmnopqrstuvwxyz",Q=!0;function I(c,u){var i,m,h,y,v,b,k,A,T=this;if(!(T instanceof I))return new I(c,u);if(u==null){if(c&&c._isBigNumber===!0){T.s=c.s,!c.c||c.e>_?T.c=T.e=null:c.e<N?T.c=[T.e=0]:(T.e=c.e,T.c=c.c.slice());return}if((b=typeof c=="number")&&c*0==0){if(T.s=1/c<0?(c=-c,-1):1,c===~~c){for(y=0,v=c;v>=10;v/=10,y++);y>_?T.c=T.e=null:(T.e=y,T.c=[c]);return}A=String(c)}else{if(!Ii.test(A=String(c)))return o(T,A,b);T.s=A.charCodeAt(0)==45?(A=A.slice(1),-1):1}(y=A.indexOf("."))>-1&&(A=A.replace(".","")),(v=A.search(/e/i))>0?(y<0&&(y=v),y+=+A.slice(v+1),A=A.substring(0,v)):y<0&&(y=A.length)}else{if(Ie(u,2,M.length,"Base"),u==10&&Q)return T=new I(c),ye(T,r+T.e+1,l);if(A=String(c),b=typeof c=="number"){if(c*0!=0)return o(T,A,b,u);if(T.s=1/c<0?(A=A.slice(1),-1):1,I.DEBUG&&A.replace(/^0\.0*|\./,"").length>15)throw Error(bs+c)}else T.s=A.charCodeAt(0)===45?(A=A.slice(1),-1):1;for(i=M.slice(0,u),y=v=0,k=A.length;v<k;v++)if(i.indexOf(m=A.charAt(v))<0){if(m=="."){if(v>y){y=k;continue}}else if(!h&&(A==A.toUpperCase()&&(A=A.toLowerCase())||A==A.toLowerCase()&&(A=A.toUpperCase()))){h=!0,v=-1,y=0;continue}return o(T,String(c),b,u)}b=!1,A=n(A,u,10,T.s),(y=A.indexOf("."))>-1?A=A.replace(".",""):y=A.length}for(v=0;A.charCodeAt(v)===48;v++);for(k=A.length;A.charCodeAt(--k)===48;);if(A=A.slice(v,++k)){if(k-=v,b&&I.DEBUG&&k>15&&(c>no||c!==Ke(c)))throw Error(bs+T.s*c);if((y=y-v-1)>_)T.c=T.e=null;else if(y<N)T.c=[T.e=0];else{if(T.e=y,T.c=[],v=(y+1)%ge,y<0&&(v+=ge),v<k){for(v&&T.c.push(+A.slice(0,v)),k-=ge;v<k;)T.c.push(+A.slice(v,v+=ge));v=ge-(A=A.slice(v)).length}else v-=k;for(;v--;A+="0");T.c.push(+A)}}else T.c=[T.e=0]}I.clone=gs,I.ROUND_UP=0,I.ROUND_DOWN=1,I.ROUND_CEIL=2,I.ROUND_FLOOR=3,I.ROUND_HALF_UP=4,I.ROUND_HALF_DOWN=5,I.ROUND_HALF_EVEN=6,I.ROUND_HALF_CEIL=7,I.ROUND_HALF_FLOOR=8,I.EUCLID=9,I.config=I.set=function(c){var u,i;if(c!=null)if(typeof c=="object"){if(c.hasOwnProperty(u="DECIMAL_PLACES")&&(i=c[u],Ie(i,0,Le,u),r=i),c.hasOwnProperty(u="ROUNDING_MODE")&&(i=c[u],Ie(i,0,8,u),l=i),c.hasOwnProperty(u="EXPONENTIAL_AT")&&(i=c[u],i&&i.pop?(Ie(i[0],-Le,0,u),Ie(i[1],0,Le,u),d=i[0],S=i[1]):(Ie(i,-Le,Le,u),d=-(S=i<0?-i:i))),c.hasOwnProperty(u="RANGE"))if(i=c[u],i&&i.pop)Ie(i[0],-Le,-1,u),Ie(i[1],1,Le,u),N=i[0],_=i[1];else if(Ie(i,-Le,Le,u),i)N=-(_=i<0?-i:i);else throw Error(Ge+u+" cannot be zero: "+i);if(c.hasOwnProperty(u="CRYPTO"))if(i=c[u],i===!!i)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))g=i;else throw g=!i,Error(Ge+"crypto unavailable");else g=i;else throw Error(Ge+u+" not true or false: "+i);if(c.hasOwnProperty(u="MODULO_MODE")&&(i=c[u],Ie(i,0,9,u),E=i),c.hasOwnProperty(u="POW_PRECISION")&&(i=c[u],Ie(i,0,Le,u),w=i),c.hasOwnProperty(u="FORMAT"))if(i=c[u],typeof i=="object")B=i;else throw Error(Ge+u+" not an object: "+i);if(c.hasOwnProperty(u="ALPHABET"))if(i=c[u],typeof i=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(i))Q=i.slice(0,10)=="0123456789",M=i;else throw Error(Ge+u+" invalid: "+i)}else throw Error(Ge+"Object expected: "+c);return{DECIMAL_PLACES:r,ROUNDING_MODE:l,EXPONENTIAL_AT:[d,S],RANGE:[N,_],CRYPTO:g,MODULO_MODE:E,POW_PRECISION:w,FORMAT:B,ALPHABET:M}},I.isBigNumber=function(c){if(!c||c._isBigNumber!==!0)return!1;if(!I.DEBUG)return!0;var u,i,m=c.c,h=c.e,y=c.s;e:if({}.toString.call(m)=="[object Array]"){if((y===1||y===-1)&&h>=-Le&&h<=Le&&h===Ke(h)){if(m[0]===0){if(h===0&&m.length===1)return!0;break e}if(u=(h+1)%ge,u<1&&(u+=ge),String(m[0]).length==u){for(u=0;u<m.length;u++)if(i=m[u],i<0||i>=ot||i!==Ke(i))break e;if(i!==0)return!0}}}else if(m===null&&h===null&&(y===null||y===1||y===-1))return!0;throw Error(Ge+"Invalid BigNumber: "+c)},I.maximum=I.max=function(){return ne(arguments,-1)},I.minimum=I.min=function(){return ne(arguments,1)},I.random=(function(){var c=9007199254740992,u=Math.random()*c&2097151?function(){return Ke(Math.random()*c)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(i){var m,h,y,v,b,k=0,A=[],T=new I(a);if(i==null?i=r:Ie(i,0,Le),v=to(i/ge),g)if(crypto.getRandomValues){for(m=crypto.getRandomValues(new Uint32Array(v*=2));k<v;)b=m[k]*131072+(m[k+1]>>>11),b>=9e15?(h=crypto.getRandomValues(new Uint32Array(2)),m[k]=h[0],m[k+1]=h[1]):(A.push(b%1e14),k+=2);k=v/2}else if(crypto.randomBytes){for(m=crypto.randomBytes(v*=7);k<v;)b=(m[k]&31)*281474976710656+m[k+1]*1099511627776+m[k+2]*4294967296+m[k+3]*16777216+(m[k+4]<<16)+(m[k+5]<<8)+m[k+6],b>=9e15?crypto.randomBytes(7).copy(m,k):(A.push(b%1e14),k+=7);k=v/7}else throw g=!1,Error(Ge+"crypto unavailable");if(!g)for(;k<v;)b=u(),b<9e15&&(A[k++]=b%1e14);for(v=A[--k],i%=ge,v&&i&&(b=oo[ge-i],A[k]=Ke(v/b)*b);A[k]===0;A.pop(),k--);if(k<0)A=[y=0];else{for(y=-1;A[0]===0;A.splice(0,1),y-=ge);for(k=1,b=A[0];b>=10;b/=10,k++);k<ge&&(y-=ge-k)}return T.e=y,T.c=A,T}})(),I.sum=function(){for(var c=1,u=arguments,i=new I(u[0]);c<u.length;)i=i.plus(u[c++]);return i},n=(function(){var c="0123456789";function u(i,m,h,y){for(var v,b=[0],k,A=0,T=i.length;A<T;){for(k=b.length;k--;b[k]*=m);for(b[0]+=y.indexOf(i.charAt(A++)),v=0;v<b.length;v++)b[v]>h-1&&(b[v+1]==null&&(b[v+1]=0),b[v+1]+=b[v]/h|0,b[v]%=h)}return b.reverse()}return function(i,m,h,y,v){var b,k,A,T,F,$,re,be,Ae=i.indexOf("."),xe=r,G=l;for(Ae>=0&&(T=w,w=0,i=i.replace(".",""),be=new I(m),$=be.pow(i.length-Ae),w=T,be.c=u(mt(Qe($.c),$.e,"0"),10,h,c),be.e=be.c.length),re=u(i,m,h,v?(b=M,c):(b=c,M)),A=T=re.length;re[--T]==0;re.pop());if(!re[0])return b.charAt(0);if(Ae<0?--A:($.c=re,$.e=A,$.s=y,$=t($,be,xe,G,h),re=$.c,F=$.r,A=$.e),k=A+xe+1,Ae=re[k],T=h/2,F=F||k<0||re[k+1]!=null,F=G<4?(Ae!=null||F)&&(G==0||G==($.s<0?3:2)):Ae>T||Ae==T&&(G==4||F||G==6&&re[k-1]&1||G==($.s<0?8:7)),k<1||!re[0])i=F?mt(b.charAt(1),-xe,b.charAt(0)):b.charAt(0);else{if(re.length=k,F)for(--h;++re[--k]>h;)re[k]=0,k||(++A,re=[1].concat(re));for(T=re.length;!re[--T];);for(Ae=0,i="";Ae<=T;i+=b.charAt(re[Ae++]));i=mt(i,A,b.charAt(0))}return i}})(),t=(function(){function c(m,h,y){var v,b,k,A,T=0,F=m.length,$=h%At,re=h/At|0;for(m=m.slice();F--;)k=m[F]%At,A=m[F]/At|0,v=re*k+A*$,b=$*k+v%At*At+T,T=(b/y|0)+(v/At|0)+re*A,m[F]=b%y;return T&&(m=[T].concat(m)),m}function u(m,h,y,v){var b,k;if(y!=v)k=y>v?1:-1;else for(b=k=0;b<y;b++)if(m[b]!=h[b]){k=m[b]>h[b]?1:-1;break}return k}function i(m,h,y,v){for(var b=0;y--;)m[y]-=b,b=m[y]<h[y]?1:0,m[y]=b*v+m[y]-h[y];for(;!m[0]&&m.length>1;m.splice(0,1));}return function(m,h,y,v,b){var k,A,T,F,$,re,be,Ae,xe,G,we,Ee,Ve,st,je,Pe,ze,_e=m.s==h.s?1:-1,Fe=m.c,ke=h.c;if(!Fe||!Fe[0]||!ke||!ke[0])return new I(!m.s||!h.s||(Fe?ke&&Fe[0]==ke[0]:!ke)?NaN:Fe&&Fe[0]==0||!ke?_e*0:_e/0);for(Ae=new I(_e),xe=Ae.c=[],A=m.e-h.e,_e=y+A+1,b||(b=ot,A=Ze(m.e/ge)-Ze(h.e/ge),_e=_e/ge|0),T=0;ke[T]==(Fe[T]||0);T++);if(ke[T]>(Fe[T]||0)&&A--,_e<0)xe.push(1),F=!0;else{for(st=Fe.length,Pe=ke.length,T=0,_e+=2,$=Ke(b/(ke[0]+1)),$>1&&(ke=c(ke,$,b),Fe=c(Fe,$,b),Pe=ke.length,st=Fe.length),Ve=Pe,G=Fe.slice(0,Pe),we=G.length;we<Pe;G[we++]=0);ze=ke.slice(),ze=[0].concat(ze),je=ke[0],ke[1]>=b/2&&je++;do{if($=0,k=u(ke,G,Pe,we),k<0){if(Ee=G[0],Pe!=we&&(Ee=Ee*b+(G[1]||0)),$=Ke(Ee/je),$>1)for($>=b&&($=b-1),re=c(ke,$,b),be=re.length,we=G.length;u(re,G,be,we)==1;)$--,i(re,Pe<be?ze:ke,be,b),be=re.length,k=1;else $==0&&(k=$=1),re=ke.slice(),be=re.length;if(be<we&&(re=[0].concat(re)),i(G,re,we,b),we=G.length,k==-1)for(;u(ke,G,Pe,we)<1;)$++,i(G,Pe<we?ze:ke,we,b),we=G.length}else k===0&&($++,G=[0]);xe[T++]=$,G[0]?G[we++]=Fe[Ve]||0:(G=[Fe[Ve]],we=1)}while((Ve++<st||G[0]!=null)&&_e--);F=G[0]!=null,xe[0]||xe.splice(0,1)}if(b==ot){for(T=1,_e=xe[0];_e>=10;_e/=10,T++);ye(Ae,y+(Ae.e=T+A*ge-1)+1,v,F)}else Ae.e=A,Ae.r=+F;return Ae}})();function j(c,u,i,m){var h,y,v,b,k;if(i==null?i=l:Ie(i,0,8),!c.c)return c.toString();if(h=c.c[0],v=c.e,u==null)k=Qe(c.c),k=m==1||m==2&&(v<=d||v>=S)?hn(k,v):mt(k,v,"0");else if(c=ye(new I(c),u,i),y=c.e,k=Qe(c.c),b=k.length,m==1||m==2&&(u<=y||y<=d)){for(;b<u;k+="0",b++);k=hn(k,y)}else if(u-=v+(m===2&&y>v),k=mt(k,y,"0"),y+1>b){if(--u>0)for(k+=".";u--;k+="0");}else if(u+=y-b,u>0)for(y+1==b&&(k+=".");u--;k+="0");return c.s<0&&h?"-"+k:k}function ne(c,u){for(var i,m,h=1,y=new I(c[0]);h<c.length;h++)m=new I(c[h]),(!m.s||(i=It(y,m))===u||i===0&&y.s===u)&&(y=m);return y}function he(c,u,i){for(var m=1,h=u.length;!u[--h];u.pop());for(h=u[0];h>=10;h/=10,m++);return(i=m+i*ge-1)>_?c.c=c.e=null:i<N?c.c=[c.e=0]:(c.e=i,c.c=u),c}o=(function(){var c=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,i=/^\.([^.]+)$/,m=/^-?(Infinity|NaN)$/,h=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(y,v,b,k){var A,T=b?v:v.replace(h,"");if(m.test(T))y.s=isNaN(T)?null:T<0?-1:1;else{if(!b&&(T=T.replace(c,function(F,$,re){return A=(re=re.toLowerCase())=="x"?16:re=="b"?2:8,!k||k==A?$:F}),k&&(A=k,T=T.replace(u,"$1").replace(i,"0.$1")),v!=T))return new I(T,A);if(I.DEBUG)throw Error(Ge+"Not a"+(k?" base "+k:"")+" number: "+v);y.s=null}y.c=y.e=null}})();function ye(c,u,i,m){var h,y,v,b,k,A,T,F=c.c,$=oo;if(F){e:{for(h=1,b=F[0];b>=10;b/=10,h++);if(y=u-h,y<0)y+=ge,v=u,k=F[A=0],T=Ke(k/$[h-v-1]%10);else if(A=to((y+1)/ge),A>=F.length)if(m){for(;F.length<=A;F.push(0));k=T=0,h=1,y%=ge,v=y-ge+1}else break e;else{for(k=b=F[A],h=1;b>=10;b/=10,h++);y%=ge,v=y-ge+h,T=v<0?0:Ke(k/$[h-v-1]%10)}if(m=m||u<0||F[A+1]!=null||(v<0?k:k%$[h-v-1]),m=i<4?(T||m)&&(i==0||i==(c.s<0?3:2)):T>5||T==5&&(i==4||m||i==6&&(y>0?v>0?k/$[h-v]:0:F[A-1])%10&1||i==(c.s<0?8:7)),u<1||!F[0])return F.length=0,m?(u-=c.e+1,F[0]=$[(ge-u%ge)%ge],c.e=-u||0):F[0]=c.e=0,c;if(y==0?(F.length=A,b=1,A--):(F.length=A+1,b=$[ge-y],F[A]=v>0?Ke(k/$[h-v]%$[v])*b:0),m)for(;;)if(A==0){for(y=1,v=F[0];v>=10;v/=10,y++);for(v=F[0]+=b,b=1;v>=10;v/=10,b++);y!=b&&(c.e++,F[0]==ot&&(F[0]=1));break}else{if(F[A]+=b,F[A]!=ot)break;F[A--]=0,b=1}for(y=F.length;F[--y]===0;F.pop());}c.e>_?c.c=c.e=null:c.e<N&&(c.c=[c.e=0])}return c}function Be(c){var u,i=c.e;return i===null?c.toString():(u=Qe(c.c),u=i<=d||i>=S?hn(u,i):mt(u,i,"0"),c.s<0?"-"+u:u)}return s.absoluteValue=s.abs=function(){var c=new I(this);return c.s<0&&(c.s=1),c},s.comparedTo=function(c,u){return It(this,new I(c,u))},s.decimalPlaces=s.dp=function(c,u){var i,m,h,y=this;if(c!=null)return Ie(c,0,Le),u==null?u=l:Ie(u,0,8),ye(new I(y),c+y.e+1,u);if(!(i=y.c))return null;if(m=((h=i.length-1)-Ze(this.e/ge))*ge,h=i[h])for(;h%10==0;h/=10,m--);return m<0&&(m=0),m},s.dividedBy=s.div=function(c,u){return t(this,new I(c,u),r,l)},s.dividedToIntegerBy=s.idiv=function(c,u){return t(this,new I(c,u),0,1)},s.exponentiatedBy=s.pow=function(c,u){var i,m,h,y,v,b,k,A,T,F=this;if(c=new I(c),c.c&&!c.isInteger())throw Error(Ge+"Exponent not an integer: "+Be(c));if(u!=null&&(u=new I(u)),b=c.e>14,!F.c||!F.c[0]||F.c[0]==1&&!F.e&&F.c.length==1||!c.c||!c.c[0])return T=new I(Math.pow(+Be(F),b?c.s*(2-mn(c)):+Be(c))),u?T.mod(u):T;if(k=c.s<0,u){if(u.c?!u.c[0]:!u.s)return new I(NaN);m=!k&&F.isInteger()&&u.isInteger(),m&&(F=F.mod(u))}else{if(c.e>9&&(F.e>0||F.e<-1||(F.e==0?F.c[0]>1||b&&F.c[1]>=24e7:F.c[0]<8e13||b&&F.c[0]<=9999975e7)))return y=F.s<0&&mn(c)?-0:0,F.e>-1&&(y=1/y),new I(k?1/y:y);w&&(y=to(w/ge+2))}for(b?(i=new I(.5),k&&(c.s=1),A=mn(c)):(h=Math.abs(+Be(c)),A=h%2),T=new I(a);;){if(A){if(T=T.times(F),!T.c)break;y?T.c.length>y&&(T.c.length=y):m&&(T=T.mod(u))}if(h){if(h=Ke(h/2),h===0)break;A=h%2}else if(c=c.times(i),ye(c,c.e+1,1),c.e>14)A=mn(c);else{if(h=+Be(c),h===0)break;A=h%2}F=F.times(F),y?F.c&&F.c.length>y&&(F.c.length=y):m&&(F=F.mod(u))}return m?T:(k&&(T=a.div(T)),u?T.mod(u):y?ye(T,w,l,v):T)},s.integerValue=function(c){var u=new I(this);return c==null?c=l:Ie(c,0,8),ye(u,u.e+1,c)},s.isEqualTo=s.eq=function(c,u){return It(this,new I(c,u))===0},s.isFinite=function(){return!!this.c},s.isGreaterThan=s.gt=function(c,u){return It(this,new I(c,u))>0},s.isGreaterThanOrEqualTo=s.gte=function(c,u){return(u=It(this,new I(c,u)))===1||u===0},s.isInteger=function(){return!!this.c&&Ze(this.e/ge)>this.c.length-2},s.isLessThan=s.lt=function(c,u){return It(this,new I(c,u))<0},s.isLessThanOrEqualTo=s.lte=function(c,u){return(u=It(this,new I(c,u)))===-1||u===0},s.isNaN=function(){return!this.s},s.isNegative=function(){return this.s<0},s.isPositive=function(){return this.s>0},s.isZero=function(){return!!this.c&&this.c[0]==0},s.minus=function(c,u){var i,m,h,y,v=this,b=v.s;if(c=new I(c,u),u=c.s,!b||!u)return new I(NaN);if(b!=u)return c.s=-u,v.plus(c);var k=v.e/ge,A=c.e/ge,T=v.c,F=c.c;if(!k||!A){if(!T||!F)return T?(c.s=-u,c):new I(F?v:NaN);if(!T[0]||!F[0])return F[0]?(c.s=-u,c):new I(T[0]?v:l==3?-0:0)}if(k=Ze(k),A=Ze(A),T=T.slice(),b=k-A){for((y=b<0)?(b=-b,h=T):(A=k,h=F),h.reverse(),u=b;u--;h.push(0));h.reverse()}else for(m=(y=(b=T.length)<(u=F.length))?b:u,b=u=0;u<m;u++)if(T[u]!=F[u]){y=T[u]<F[u];break}if(y&&(h=T,T=F,F=h,c.s=-c.s),u=(m=F.length)-(i=T.length),u>0)for(;u--;T[i++]=0);for(u=ot-1;m>b;){if(T[--m]<F[m]){for(i=m;i&&!T[--i];T[i]=u);--T[i],T[m]+=ot}T[m]-=F[m]}for(;T[0]==0;T.splice(0,1),--A);return T[0]?he(c,T,A):(c.s=l==3?-1:1,c.c=[c.e=0],c)},s.modulo=s.mod=function(c,u){var i,m,h=this;return c=new I(c,u),!h.c||!c.s||c.c&&!c.c[0]?new I(NaN):!c.c||h.c&&!h.c[0]?new I(h):(E==9?(m=c.s,c.s=1,i=t(h,c,0,3),c.s=m,i.s*=m):i=t(h,c,0,E),c=h.minus(i.times(c)),!c.c[0]&&E==1&&(c.s=h.s),c)},s.multipliedBy=s.times=function(c,u){var i,m,h,y,v,b,k,A,T,F,$,re,be,Ae,xe,G=this,we=G.c,Ee=(c=new I(c,u)).c;if(!we||!Ee||!we[0]||!Ee[0])return!G.s||!c.s||we&&!we[0]&&!Ee||Ee&&!Ee[0]&&!we?c.c=c.e=c.s=null:(c.s*=G.s,!we||!Ee?c.c=c.e=null:(c.c=[0],c.e=0)),c;for(m=Ze(G.e/ge)+Ze(c.e/ge),c.s*=G.s,k=we.length,F=Ee.length,k<F&&(be=we,we=Ee,Ee=be,h=k,k=F,F=h),h=k+F,be=[];h--;be.push(0));for(Ae=ot,xe=At,h=F;--h>=0;){for(i=0,$=Ee[h]%xe,re=Ee[h]/xe|0,v=k,y=h+v;y>h;)A=we[--v]%xe,T=we[v]/xe|0,b=re*A+T*$,A=$*A+b%xe*xe+be[y]+i,i=(A/Ae|0)+(b/xe|0)+re*T,be[y--]=A%Ae;be[y]=i}return i?++m:be.splice(0,1),he(c,be,m)},s.negated=function(){var c=new I(this);return c.s=-c.s||null,c},s.plus=function(c,u){var i,m=this,h=m.s;if(c=new I(c,u),u=c.s,!h||!u)return new I(NaN);if(h!=u)return c.s=-u,m.minus(c);var y=m.e/ge,v=c.e/ge,b=m.c,k=c.c;if(!y||!v){if(!b||!k)return new I(h/0);if(!b[0]||!k[0])return k[0]?c:new I(b[0]?m:h*0)}if(y=Ze(y),v=Ze(v),b=b.slice(),h=y-v){for(h>0?(v=y,i=k):(h=-h,i=b),i.reverse();h--;i.push(0));i.reverse()}for(h=b.length,u=k.length,h-u<0&&(i=k,k=b,b=i,u=h),h=0;u;)h=(b[--u]=b[u]+k[u]+h)/ot|0,b[u]=ot===b[u]?0:b[u]%ot;return h&&(b=[h].concat(b),++v),he(c,b,v)},s.precision=s.sd=function(c,u){var i,m,h,y=this;if(c!=null&&c!==!!c)return Ie(c,1,Le),u==null?u=l:Ie(u,0,8),ye(new I(y),c,u);if(!(i=y.c))return null;if(h=i.length-1,m=h*ge+1,h=i[h]){for(;h%10==0;h/=10,m--);for(h=i[0];h>=10;h/=10,m++);}return c&&y.e+1>m&&(m=y.e+1),m},s.shiftedBy=function(c){return Ie(c,-no,no),this.times("1e"+c)},s.squareRoot=s.sqrt=function(){var c,u,i,m,h,y=this,v=y.c,b=y.s,k=y.e,A=r+4,T=new I("0.5");if(b!==1||!v||!v[0])return new I(!b||b<0&&(!v||v[0])?NaN:v?y:1/0);if(b=Math.sqrt(+Be(y)),b==0||b==1/0?(u=Qe(v),(u.length+k)%2==0&&(u+="0"),b=Math.sqrt(+u),k=Ze((k+1)/2)-(k<0||k%2),b==1/0?u="5e"+k:(u=b.toExponential(),u=u.slice(0,u.indexOf("e")+1)+k),i=new I(u)):i=new I(b+""),i.c[0]){for(k=i.e,b=k+A,b<3&&(b=0);;)if(h=i,i=T.times(h.plus(t(y,h,A,1))),Qe(h.c).slice(0,b)===(u=Qe(i.c)).slice(0,b))if(i.e<k&&--b,u=u.slice(b-3,b+1),u=="9999"||!m&&u=="4999"){if(!m&&(ye(h,h.e+r+2,0),h.times(h).eq(y))){i=h;break}A+=4,b+=4,m=1}else{(!+u||!+u.slice(1)&&u.charAt(0)=="5")&&(ye(i,i.e+r+2,1),c=!i.times(i).eq(y));break}}return ye(i,i.e+r+1,l,c)},s.toExponential=function(c,u){return c!=null&&(Ie(c,0,Le),c++),j(this,c,u,1)},s.toFixed=function(c,u){return c!=null&&(Ie(c,0,Le),c=c+this.e+1),j(this,c,u)},s.toFormat=function(c,u,i){var m,h=this;if(i==null)c!=null&&u&&typeof u=="object"?(i=u,u=null):c&&typeof c=="object"?(i=c,c=u=null):i=B;else if(typeof i!="object")throw Error(Ge+"Argument not an object: "+i);if(m=h.toFixed(c,u),h.c){var y,v=m.split("."),b=+i.groupSize,k=+i.secondaryGroupSize,A=i.groupSeparator||"",T=v[0],F=v[1],$=h.s<0,re=$?T.slice(1):T,be=re.length;if(k&&(y=b,b=k,k=y,be-=y),b>0&&be>0){for(y=be%b||b,T=re.substr(0,y);y<be;y+=b)T+=A+re.substr(y,b);k>0&&(T+=A+re.slice(y)),$&&(T="-"+T)}m=F?T+(i.decimalSeparator||"")+((k=+i.fractionGroupSize)?F.replace(new RegExp("\\d{"+k+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):F):T}return(i.prefix||"")+m+(i.suffix||"")},s.toFraction=function(c){var u,i,m,h,y,v,b,k,A,T,F,$,re=this,be=re.c;if(c!=null&&(b=new I(c),!b.isInteger()&&(b.c||b.s!==1)||b.lt(a)))throw Error(Ge+"Argument "+(b.isInteger()?"out of range: ":"not an integer: ")+Be(b));if(!be)return new I(re);for(u=new I(a),A=i=new I(a),m=k=new I(a),$=Qe(be),y=u.e=$.length-re.e-1,u.c[0]=oo[(v=y%ge)<0?ge+v:v],c=!c||b.comparedTo(u)>0?y>0?u:A:b,v=_,_=1/0,b=new I($),k.c[0]=0;T=t(b,u,0,1),h=i.plus(T.times(m)),h.comparedTo(c)!=1;)i=m,m=h,A=k.plus(T.times(h=A)),k=h,u=b.minus(T.times(h=u)),b=h;return h=t(c.minus(i),m,0,1),k=k.plus(h.times(A)),i=i.plus(h.times(m)),k.s=A.s=re.s,y=y*2,F=t(A,m,y,l).minus(re).abs().comparedTo(t(k,i,y,l).minus(re).abs())<1?[A,m]:[k,i],_=v,F},s.toNumber=function(){return+Be(this)},s.toPrecision=function(c,u){return c!=null&&Ie(c,1,Le),j(this,c,u,2)},s.toString=function(c){var u,i=this,m=i.s,h=i.e;return h===null?m?(u="Infinity",m<0&&(u="-"+u)):u="NaN":(c==null?u=h<=d||h>=S?hn(Qe(i.c),h):mt(Qe(i.c),h,"0"):c===10&&Q?(i=ye(new I(i),r+h+1,l),u=mt(Qe(i.c),i.e,"0")):(Ie(c,2,M.length,"Base"),u=n(mt(Qe(i.c),h,"0"),10,c,m,!0)),m<0&&i.c[0]&&(u="-"+u)),u},s.valueOf=s.toJSON=function(){return Be(this)},s._isBigNumber=!0,s[Symbol.toStringTag]="BigNumber",s[Symbol.for("nodejs.util.inspect.custom")]=s.valueOf,e!=null&&I.set(e),I}function Ze(e){var t=e|0;return e>0||e===t?t:t-1}function Qe(e){for(var t,n,o=1,s=e.length,a=e[0]+"";o<s;){for(t=e[o++]+"",n=ge-t.length;n--;t="0"+t);a+=t}for(s=a.length;a.charCodeAt(--s)===48;);return a.slice(0,s+1||1)}function It(e,t){var n,o,s=e.c,a=t.c,r=e.s,l=t.s,d=e.e,S=t.e;if(!r||!l)return null;if(n=s&&!s[0],o=a&&!a[0],n||o)return n?o?0:-l:r;if(r!=l)return r;if(n=r<0,o=d==S,!s||!a)return o?0:!s^n?1:-1;if(!o)return d>S^n?1:-1;for(l=(d=s.length)<(S=a.length)?d:S,r=0;r<l;r++)if(s[r]!=a[r])return s[r]>a[r]^n?1:-1;return d==S?0:d>S^n?1:-1}function Ie(e,t,n,o){if(e<t||e>n||e!==Ke(e))throw Error(Ge+(o||"Argument")+(typeof e=="number"?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function mn(e){var t=e.c.length-1;return Ze(e.e/ge)==t&&e.c[t]%2!=0}function hn(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function mt(e,t,n){var o,s;if(t<0){for(s=n+".";++t;s+=n);e=s+e}else if(o=e.length,++t>o){for(s=n,t-=o;--t;s+=n);e+=s}else t<o&&(e=e.slice(0,t)+"."+e.slice(t));return e}var le=gs();class bn{baseUrl;constructor(t){this.baseUrl=t}buildUrl(t,n){const o=new URL(t,this.baseUrl);return n&&Object.entries(n).forEach(([s,a])=>{a!=null&&o.searchParams.append(s,String(a))}),o.toString()}async get(t,n={}){const o=this.buildUrl(t,n.query),s=await fetch(o,{method:"GET",headers:n.headers||{}});if(!s.ok){let r=null;try{r=await s.json()}catch{try{const d=await s.text();d&&(r={message:d})}catch{}}const l=new Error(r?.message||r?.errorMessage||`HTTP ${s.status}: ${s.statusText}`);throw l.status=s.status,l.statusText=s.statusText,r&&(l.data=r),l}return{data:await s.json(),status:s.status}}async post(t,n,o={}){const s=this.buildUrl(t,o.query),a=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",...o.headers},body:JSON.stringify(n)});if(!a.ok){let l=null;try{l=await a.json()}catch{try{const S=await a.text();S&&(l={message:S})}catch{}}const d=new Error(l?.message||l?.errorMessage||`HTTP ${a.status}: ${a.statusText}`);throw d.status=a.status,d.statusText=a.statusText,l&&(d.data=l),d}return{data:await a.json(),status:a.status}}}const Ni=.01,Pi="https://deep-index.moralis.io";function Zt(){return"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJub25jZSI6ImY4NmY0Yzc2LTA3MDQtNGEwZS04YTA0LWUwODllOGQxMGZjZCIsIm9yZ0lkIjoiMzk0MDAyIiwidXNlcklkIjoiNDA0ODUzIiwidHlwZUlkIjoiYjQyODExOTQtOGQ0Yi00NjkxLTlhZjItNjU4ODE2NzExYmRjIiwidHlwZSI6IlBST0pFQ1QiLCJpYXQiOjE3MTY4NjQyNTYsImV4cCI6NDg3MjYyNDI1Nn0.V8crfBIBardAnZkc05FD0hQIJBeZxMqvzRnYExVtnF8"}function Qt(e){return{"X-API-Key":e,Accept:"application/json"}}const en=new bn(Pi);async function Ye(e){const{address:t,chain:n="base",token_addresses:o,exclude_spam:s,exclude_unverified_contracts:a}=e;if(!t)throw new Error("Address is required");try{const r=Zt(),l={chain:n,exclude_spam:s??!1,exclude_unverified_contracts:a??!1};o&&(l.token_addresses=o);const S=(await en.get(`/api/v2.2/wallets/${encodeURIComponent(t)}/tokens`,{query:l,headers:Qt(r)})).data;return S?.result?.length>0&&(S.result=S.result.filter(N=>{const _=new le(N?.balance||0),g=new le(N?.usd_value||0);return _.gt(0)&&g.gte(Ni)}),S.result=S.result.map(N=>({...N,token_address:N.token_address===wi?$e:N.token_address}))),{success:!0,data:S}}catch(r){const l=r instanceof Error?r.message:"Unknown error";return console.error("❌ Error fetching token balances:",l),{success:!1,error:l}}}async function Fi(e){const{address:t,chain:n="base"}=e;if(!t)throw new Error("Token address is required");try{const o=Zt(),[s,a]=await Promise.allSettled([en.get("/api/v2.2/erc20/metadata",{query:{chain:n,addresses:[t]},headers:Qt(o)}),en.get(`/api/v2.2/erc20/${encodeURIComponent(t)}/price`,{query:{chain:n,include:"percent_change"},headers:Qt(o)})]),r=s.status==="fulfilled"?s.value.data:[];if(!r||r.length===0)return{success:!1,error:"Token metadata not found"};const l=r[0],d=a.status==="fulfilled"?a.value.data?.usdPrice??void 0:void 0;return{success:!0,data:{token_address:l.token_address,name:l.name,symbol:l.symbol,decimals:l.decimals,logo:l.logo||l.thumbnail,thumbnail:l.thumbnail,usd_price:d}}}catch(o){const s=o instanceof Error?o.message:"Unknown error";return console.error("❌ Error fetching token metadata:",s),{success:!1,error:s}}}async function Ui(e){const{prompt:t,model:n="gpt-4.1-mini",stream:o=!1,systemPrompt:s}=e;if(!t)throw new Error("Prompt is required");try{const a=Zt(),r=new bn("https://cortex-api.moralis.io"),l=s?`${s}
88
100
 
89
101
  ---
90
102
 
91
- User: ${t}`:t;return{success:!0,data:(await a.post("/chat",{prompt:l,model:n,stream:o},{headers:{"X-API-Key":r,Accept:"application/json","Content-Type":"application/json"}})).data}}catch(r){const a=r instanceof Error?r.message:"Unknown error";return console.error("❌ Error chatting with Cortex AI:",a),{success:!1,error:a}}}async function Ui(e){const{address:t,chain:n="base"}=e;if(!t)throw new Error("Contract address is required");try{const o=Jt();return{success:!0,data:(await Kt.get(`/api/v2.2/nft/${encodeURIComponent(t)}/metadata`,{query:{chain:n},headers:Xt(o)})).data}}catch(o){const s=o instanceof Error?o.message:"Unknown error";return console.error("❌ Error fetching NFT contract metadata:",s),{success:!1,error:s}}}async function Oi(e){const{address:t,chain:n="base",limit:o=20,exclude_spam:s=!0,cursor:r}=e;if(!t)throw new Error("Address is required");try{const a=Jt(),l={chain:n,format:"decimal",limit:o,exclude_spam:s,media_items:!0,normalizeMetadata:!0};return r&&(l.cursor=r),{success:!0,data:(await Kt.get(`/api/v2.2/${encodeURIComponent(t)}/nft`,{query:l,headers:Xt(a)})).data}}catch(a){const l=a instanceof Error?a.message:"Unknown error";return console.error("❌ Error fetching NFTs:",l),{success:!1,error:l}}}const Di="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAx8SURBVHgB7VprbFzFFT5n9kmoil0JiUqVsuYX/7BRSeL+aOyKivKjxYYEmpbWNlQpUYvsQAtBVPHdoBYFodgWIiAK8ppWysOVbFrRh0qxUyE5BlQ7/VEqVYo3P6qq6iMbpYTEu3dOz7zuY72Jr51NIrU59u597NyZ+ea8zx2A63Sd/qcI4QoQTfW0QC3fDrLWpS4BUxUAeQwfmFyEa0xNB0xHtw9yrx7DbAlH4WGI1FkZBHq47egEXCNqGmCa3NbF3Q0z0K7IXbLD1I+zBCh24/Yjb8JVpssGTIe+WoCUP8TYbufemKvYzkdSghwcTUsKgQfnJfCrRdwxXYarRM0X6XHW3w3Ze1ln+xlTV4MWFMo4mkUBKkK6NoG9Vx74ugHfNjNXyJ/nk/P5ymJvR6VRGzpyfw+AGOFRCoF4o8BA0s0MrBQg6zdccf1eE+CWhYWWDedrg7mqP5StYUtOAuVqgHy+mPFpOi/lxK97O8v1z7Eh6+fDMH8KcdFuOCV+nnqvlEVPDLhlbq6QQpzJ+lhgkMBgQR2zPlBegfYB8vzJkvBguTYxvSMOnA71FECkP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HmSM6vfgESUlMBK1L7sw5/rbNfVPEOdl2nzKSsDkoKQIf6ia18swDubbmlSAhlDVdKb3HQm1j1zh/deAzOVTvWstFlzX5srfTYq3P9WRLDWR826p0/1XCrU66m94lg3uwAIrUXxGyNUruEACO7g8qF1zerCEzt6hvXgFNiCO87cmKN02k+h+vpxZ2dJV8qSy73IdUvMOk6ClC4Syt4z2QbmIPN0o7c38eFugncPtm9HrC6J7iK5I3MFfKcGWVr2J9zXNX7uMDu+TIc15ytBbt+IIOyrXD3/gq/SoP17t5xdFUBO3rhhfmeDTUYYbCFnNmqqEQ5AGu3O2mxzlRp922vbhmFJtE1Aezo9R+qLY1imAEWAo5arud8qqRqtLvjYGcJmkjXFLCjo9677bnl9Nasj60swpSuyWOfgPxix2jHZYnvdbpO/wf0X652D+/dGV80AAAAAElFTkSuQmCC",Mi="data:image/svg+xml,%3csvg%20width='36'%20height='36'%20viewBox='0%200%2036%2036'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='36'%20height='36'%20rx='18'%20fill='%232358B2'/%3e%3cmask%20id='mask0_1924_16177'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='11'%20y='10'%20width='17'%20height='16'%3e%3crect%20x='11.334'%20y='10'%20width='16'%20height='16'%20fill='url(%23pattern0_1924_16177)'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1924_16177)'%3e%3crect%20x='11.334'%20y='10'%20width='16'%20height='16'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cpattern%20id='pattern0_1924_16177'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_1924_16177'%20transform='scale(0.00195312)'/%3e%3c/pattern%3e%3cimage%20id='image0_1924_16177'%20width='512'%20height='512'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQ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FKUG4GjgO8C+2XmFZVySJI0Ep0aAGaKiHsBL6EMAy8HHjjib3ku8EPg+8BPMvPqEX8/SZKq6ewAMFNEBPB0ykCwOvDgGT/uz8KWCW8G/gT8fsaP07yiV5I0TXoxACxPRCymnA7MHAoeAFwPXAFcOeN/LwPOycwb66SVJKkbej8ASJKkhevr5/AlSdIQHAAkSZpCDgCSJE0hBwBJkqaQA4AkSVPo/wH9hnZgmG1pVwAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e";class _i extends pn{constructor(){super("https://wallet-api.pantograph.app")}async getTokensDetails(t,n="base"){try{if(!t||!Array.isArray(t)||t.length===0)throw new Error("Addresses must be a non-empty array");const o=t.join(","),s=await this.get(`/keyrings/tokens/${n}/v2`,{query:{addresses:o}});return Array.isArray(s.data)&&(s.data=s.data.filter((r,a,l)=>a===l.findIndex(f=>f.address.toLowerCase()===r.address.toLowerCase())),Array.isArray(t)&&t.length>0&&(s.data=s.data.filter(r=>t.some(a=>a.toLowerCase()===r.address.toLowerCase())),s.data.sort((r,a)=>t.findIndex(l=>l.toLowerCase()===r.address.toLowerCase())-t.findIndex(l=>l.toLowerCase()===a.address.toLowerCase())))),s}catch(o){throw console.error("❌ Error getting tokens details:",o instanceof Error?o.message:o),o}}async getTokenDetail(t,n="base"){try{if(!t)throw new Error("Address is required");const o=await this.getTokensDetails([t],n);return{data:o.data[0]||null,status:o.status}}catch(o){throw console.error(`❌ Error getting token detail for ${t}:`,o instanceof Error?o.message:o),o}}async getTopGainers(t="base",n="24h",o=3){try{return await this.get(`/token-list/top-gainers/${t}`,{query:{duration:n,limit:o}})}catch(s){throw console.error("❌ Error getting top gainers:",s instanceof Error?s.message:s),s}}}const Ke=new _i,Li="https://dln.debridge.finance",Ri=new pn(Li);async function no(e){const{chainId:t,tokenIn:n,tokenInAmount:o,tokenOut:s,accesstoken:r,slippage:a="auto",tokenOutRecipient:l}=e;if(!t||!n||!o||!s)throw new Error("Missing required parameters: chainId, tokenIn, tokenInAmount, tokenOut");try{const N=(await(await fetch("https://exchange-api.keyring.app/admin/setting?configs=others",{method:"GET"})).json())?.others||{},_=N?.AFFILIATE_FEE_PERENT,b=N?.AFFILIATE_FEE_RECIPIENT,E=await Ri.get("/v1.0/chain/transaction",{query:{chainId:String(t),tokenIn:n,tokenInAmount:o,tokenOut:s,slippage:String(a),tokenOutRecipient:l,accesstoken:r,affiliateFeePercent:_,affiliateFeeRecipient:b}});if(E.data?.error)throw new Error(`DeBridge API Error: ${E.data.error}`);return console.log("✅ Quote retrieved successfully"),{success:!0,data:E.data}}catch(f){let S=f instanceof Error?f.message:"Unknown error";const N=f;N.data?.errorMessage?S=N.data.errorMessage:N.response?.data?.errorMessage?S=N.response.data.errorMessage:N.data?.message?S=N.data.message:N.response?.data?.message&&(S=N.response.data.message);const _=N.status||N.response?.status||N.statusCode||N.data?.status;return console.error("📋 Error details:",{errorMessage:S,errorCode:N.data?.errorCode,errorId:N.data?.errorId,status:_,reqId:N.data?.reqId,fullError:{message:N.message,status:N.status,statusCode:N.statusCode}}),{success:!1,error:f instanceof Error?f.message:"Unknown error",status:_,errorMessage:S,errorCode:N.data?.errorCode,errorId:N.data?.errorId}}}function yt(e){const t=[],n=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]*)\]\(([^)]+)\)|(https?:\/\/[^\s<>]+)|\*\*(.+?)\*\*|__(.+?)__|\*(.+?)\*|_(.+?)_|~~(.+?)~~|`([^`]+)`/g;let o=0,s;for(;(s=n.exec(e))!==null;)s.index>o&&t.push(e.slice(o,s.index)),s[1]!==void 0||s[2]!==void 0?t.push(B.jsx("img",{src:s[2],alt:s[1],className:"mc-image"},s.index)):s[3]!==void 0?t.push(B.jsx("a",{href:s[4],target:"_blank",rel:"noopener noreferrer",className:"mc-link",children:s[3]},s.index)):s[5]!==void 0?t.push(B.jsx("a",{href:s[5],target:"_blank",rel:"noopener noreferrer",className:"mc-link",children:s[5]},s.index)):s[6]!==void 0?t.push(B.jsx("strong",{children:yt(s[6])},s.index)):s[7]!==void 0?t.push(B.jsx("strong",{children:yt(s[7])},s.index)):s[8]!==void 0?t.push(B.jsx("em",{children:yt(s[8])},s.index)):s[9]!==void 0?t.push(B.jsx("em",{children:yt(s[9])},s.index)):s[10]!==void 0?t.push(B.jsx("del",{children:yt(s[10])},s.index)):s[11]!==void 0&&t.push(B.jsx("code",{className:"mc-inline-code",children:s[11]},s.index)),o=s.index+s[0].length;return o<e.length&&t.push(e.slice(o)),t.length>0?t:[e]}const Hi=({content:e})=>{const t=e.split(`
92
- `),n=[];let o=0;for(;o<t.length;){const s=t[o];if(s.trimStart().startsWith("```")){const a=s.trimStart().slice(3)?.trim(),l=[];for(o++;o<t.length&&!t[o].trimStart().startsWith("```");)l.push(t[o]),o++;n.push(B.jsxs("div",{className:"mc-codeblock",children:[a&&B.jsx("div",{className:"mc-codeblock-lang",children:a}),B.jsx("pre",{children:B.jsx("code",{children:l.join(`
93
- `)})})]},`code-${o}`)),o++;continue}if(/^(\s*[-*_]\s*){3,}$/.test(s)){n.push(B.jsx("hr",{className:"mc-hr"},`hr-${o}`)),o++;continue}const r=s.match(/^(#{1,3})\s+(.+)/);if(r){const a=r[1].length,l=r[2];n.push(B.jsx("div",{className:`mc-heading mc-h${a}`,children:yt(l)},`h-${o}`)),o++;continue}if(s.trimStart().startsWith("> ")){const a=[];for(;o<t.length&&t[o].trimStart().startsWith("> ");)a.push(t[o].replace(/^\s*>\s?/,"")),o++;n.push(B.jsx("div",{className:"mc-blockquote",children:a.map((l,f)=>B.jsx("div",{children:yt(l)},f))},`bq-${o}`));continue}if(s?.trim()===""){n.push(B.jsx("div",{className:"mc-empty-line"},`empty-${o}`)),o++;continue}n.push(B.jsx("div",{className:"mc-line",children:yt(s)},`line-${o}`)),o++}return B.jsx("div",{className:"message-content",children:n})},Vi={send_native:{label:"Send Native Token",description:"Send native token (ETH, BNB, MATIC, etc.) to an address",fields:[{key:"to_address",label:"Recipient Address",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"Amount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_token:{label:"Send Token (ERC20)",description:"Send an ERC20 token to an address",fields:[{key:"contract_address",label:"Token Contract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"Token Symbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"to_address",label:"Recipient Address",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"Amount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"},{key:"decimals",label:"Decimals",type:"number",placeholder:"18",required:!1,editable:!1}]},swap_token:{label:"Swap Token",description:"Swap one token for another",fields:[{key:"token_in",label:"From Token",type:"address",placeholder:"0x... or native",required:!0,editable:!1},{key:"token_in_symbol",label:"From Symbol",type:"text",placeholder:"e.g. ETH",required:!1,editable:!1},{key:"token_out",label:"To Token",type:"address",placeholder:"0x...",required:!0,editable:!1},{key:"token_out_symbol",label:"To Symbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"token_in_decimals",label:"From Decimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"token_out_decimals",label:"To Decimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"amount",label:"Amount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},approve_token:{label:"Approve Token",description:"Approve a spender to use your tokens",fields:[{key:"contract_address",label:"Token Contract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"Token Symbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"spender_address",label:"Spender Address",type:"address",placeholder:"0x... spender contract",required:!0,validation:"address",editable:!1},{key:"amount",label:"Amount (empty = unlimited)",type:"amount",placeholder:"0.0 or leave empty for max",required:!1,validation:"amount"},{key:"decimals",label:"Decimals",type:"number",placeholder:"18",required:!1,editable:!1}]},wrap_native:{label:"Wrap Native Token",description:"Wrap native token (ETH → WETH)",fields:[{key:"amount",label:"Amount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},unwrap_native:{label:"Unwrap Native Token",description:"Unwrap native token (WETH → ETH)",fields:[{key:"amount",label:"Amount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_nft:{label:"Send NFT",description:"Transfer an ERC721 or ERC1155 NFT to another address",fields:[{key:"contract_address",label:"NFT Contract",type:"address",placeholder:"0x... NFT contract",required:!0,validation:"address",editable:!1},{key:"token_id",label:"Token ID",type:"text",placeholder:"e.g. 1234",required:!0,editable:!1},{key:"to_address",label:"Recipient Address",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"token_standard",label:"Token Standard",type:"text",placeholder:"ERC721 or ERC1155",required:!0,editable:!1},{key:"amount",label:"Amount",type:"text",placeholder:"1",required:!1},{key:"nft_name",label:"NFT Name",type:"text",placeholder:"e.g. Bored Ape #1234",required:!1,editable:!1}]}};function Wi(e){return Le(e)}function oo(e){if(!e||e?.trim()==="")return!1;const t=parseFloat(e);return!isNaN(t)&&t>0}const Gi={send_native:"💸",send_token:"📤",swap_token:"🔄",approve_token:"✅",wrap_native:"📦",unwrap_native:"📭"},$i=({action:e,initialValues:t,onSubmit:n,onCancel:o,isSubmitting:s=!1,tokenInfo:r})=>{const{t:a,ti:l}=kn(),f=Vi[e],[S,N]=se.useState(()=>{if(!f)return{};const J={};return f.fields.forEach(I=>{J[I.key]=t[I.key]||""}),J}),[_]=se.useState(()=>["send_native","send_token","swap_token"].includes(e)&&!r&&S.contract_address?a("formTokenNotFound"):null),[b,E]=se.useState(()=>{const J={};if(["send_native","send_token","swap_token"].includes(e)&&r){const q=parseFloat(r.balanceFormatted||"0");if(q<=0)J.amount=l("formNoBalance",{symbol:r.symbol??""});else{const K=t.amount?.trim();K&&oo(K)&&parseFloat(K)>q&&(J.amount=l("formInsufficientBalance",{balance:r.balanceFormatted,symbol:r.symbol??""}))}}return J}),v=se.useCallback((J,I)=>{N(q=>({...q,[J]:I})),b[J]&&E(q=>{const K={...q};return delete K[J],K})},[b]),C=se.useCallback(()=>{if(!f)return!1;const J={};return f.fields.forEach(I=>{const q=S[I.key]?.trim()||"";if(I.required&&!q){J[I.key]=l("formFieldRequired",{field:I.label});return}if(q){if(I.validation==="address"&&!Wi(q)&&(J[I.key]=a("formInvalidAddress")),I.validation==="amount"&&!oo(q)&&(J[I.key]=a("formMustBePositive")),I.key==="amount"&&q&&oo(q)&&r?.balanceFormatted){const K=parseFloat(q),he=parseFloat(r.balanceFormatted);K>he&&(J[I.key]=l("formInsufficientBalance",{balance:r.balanceFormatted,symbol:r.symbol??""}))}I.validation==="positive_number"&&(isNaN(Number(q))||Number(q)<0)&&(J[I.key]=a("formMustBeValidNumber"))}}),E(J),Object.keys(J).length===0},[f,S,r,a,l]),D=se.useCallback(()=>{C()&&n(e,S)},[C,n,e,S]);return f?B.jsxs("div",{className:"action-form",children:[B.jsxs("div",{className:"action-form-title",children:[B.jsx("span",{children:Gi[e]||"⚙️"}),B.jsx("span",{children:f.label})]}),_&&B.jsxs("div",{className:"action-form-general-error",children:["⚠️ ",_]}),r&&B.jsx("div",{className:"action-form-token-info",children:B.jsxs("div",{className:"token-info-row",children:[r.logo&&B.jsx("img",{src:r.logo,alt:r.symbol,className:"token-info-logo",width:20,height:20}),B.jsxs("div",{className:"token-info-details",children:[B.jsxs("span",{className:"token-info-name",children:[r.name," (",r.symbol,")"]}),B.jsxs("span",{className:"token-info-balance",children:[a("formBalance")," ",ue(r.balanceFormatted).decimalPlaces(8,ue.ROUND_DOWN).toFormat()," ",r.symbol,r.usdValue!==void 0&&B.jsxs("span",{className:"token-info-usd",children:[" ","≈ $",r.usdValue.toFixed(2)]})]})]})]})}),B.jsx("div",{className:"action-form-fields",children:f.fields.map(J=>J.key==="amount"&&e==="send_nft"&&S.token_standard?.toUpperCase()!=="ERC1155"?null:B.jsxs("div",{className:"action-form-field",children:[B.jsxs("div",{className:"action-form-field-header",children:[B.jsxs("label",{children:[J.label,J.required&&" *"]}),J.key==="amount"&&r&&e!=="send_nft"&&B.jsxs("div",{className:"action-form-pct-btns",children:[[25,50,75].map(I=>B.jsxs("button",{type:"button",className:"action-form-pct-btn",onClick:()=>v("amount",(parseFloat(r.balanceFormatted)*I/100).toString()),disabled:s,children:[I,"%"]},I)),B.jsx("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>v("amount",r.balanceFormatted),disabled:s,children:"MAX"})]})]}),(()=>{const I=J.editable===!1&&!!t[J.key],q=s||I,K=[b[J.key]?"error":"",I?"readonly":""].filter(Boolean).join(" ");return J.type==="address"?B.jsx("textarea",{rows:2,placeholder:J.placeholder,value:S[J.key]||"",onChange:he=>v(J.key,he.target.value),className:K,disabled:q}):B.jsx("input",{type:J.type==="number"?"number":"text",placeholder:J.placeholder,value:S[J.key]||"",onChange:he=>v(J.key,he.target.value),className:K,disabled:q})})(),b[J.key]&&B.jsx("span",{className:"field-error",children:b[J.key]})]},J.key))}),B.jsxs("div",{className:"action-form-actions",children:[B.jsx("button",{className:"action-form-cancel",onClick:o,type:"button",disabled:s,children:a("formCancel")}),B.jsx("button",{className:"action-form-submit",onClick:D,type:"button",disabled:s,children:a(s?"formProcessing":"formExecute")})]})]}):null},zi=({scrollContainerRef:e,threshold:t=200})=>{const[n,o]=se.useState(!1);se.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const{scrollTop:l,scrollHeight:f,clientHeight:S}=r,N=f-l-S;o(N>t)};return r.addEventListener("scroll",a,{passive:!0}),a(),()=>{r.removeEventListener("scroll",a)}},[e,t]);const s=()=>{e.current?.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})};return n?B.jsx("button",{className:"scroll-to-bottom-btn",onClick:s,"aria-label":"Scroll to bottom",type:"button",children:B.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:B.jsx("path",{d:"M9 3V15M9 15L4 10M9 15L14 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}):null};function qi(e){const{walletAddress:t,chainName:n,chainId:o,nativeSymbol:s}=e;return t?t&&!ct[o]?`You are a Web3 wallet assistant for the Keyring crypto EVM wallet app.
103
+ User: ${t}`:t;return{success:!0,data:(await r.post("/chat",{prompt:l,model:n,stream:o},{headers:{"X-API-Key":a,Accept:"application/json","Content-Type":"application/json"}})).data}}catch(a){const r=a instanceof Error?a.message:"Unknown error";return console.error("❌ Error chatting with Cortex AI:",r),{success:!1,error:r}}}async function Oi(e){const{address:t,chain:n="base"}=e;if(!t)throw new Error("Contract address is required");try{const o=Zt();return{success:!0,data:(await en.get(`/api/v2.2/nft/${encodeURIComponent(t)}/metadata`,{query:{chain:n},headers:Qt(o)})).data}}catch(o){const s=o instanceof Error?o.message:"Unknown error";return console.error("❌ Error fetching NFT contract metadata:",s),{success:!1,error:s}}}async function Di(e){const{address:t,chain:n="base",limit:o=20,exclude_spam:s=!0,cursor:a}=e;if(!t)throw new Error("Address is required");try{const r=Zt(),l={chain:n,format:"decimal",limit:o,exclude_spam:s,media_items:!0,normalizeMetadata:!0};return a&&(l.cursor=a),{success:!0,data:(await en.get(`/api/v2.2/${encodeURIComponent(t)}/nft`,{query:l,headers:Qt(r)})).data}}catch(r){const l=r instanceof Error?r.message:"Unknown error";return console.error("❌ Error fetching NFTs:",l),{success:!1,error:l}}}const Mi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAx8SURBVHgB7VprbFzFFT5n9kmoil0JiUqVsuYX/7BRSeL+aOyKivKjxYYEmpbWNlQpUYvsQAtBVPHdoBYFodgWIiAK8ppWysOVbFrRh0qxUyE5BlQ7/VEqVYo3P6qq6iMbpYTEu3dOz7zuY72Jr51NIrU59u597NyZ+ea8zx2A63Sd/qcI4QoQTfW0QC3fDrLWpS4BUxUAeQwfmFyEa0xNB0xHtw9yrx7DbAlH4WGI1FkZBHq47egEXCNqGmCa3NbF3Q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DVWO2t3TmEE/dQMlkP78fntn7UmP9/vQr95RveeWuAUrVbj2b47hdP+NKoLaQGZu1jMTRlrtEiTbBXBZgRccZdKZG3axis6YYhOFkbHJoiyQbhQTvudH5pQMHPmio34s35eFcBlrI1nf0UxGbFJCM5uQ2iANRggR02YAVzfZ2lt/+yiYFumhDZ8PnoKQL0UOBfH/8pf3zUz9+NizQTXkLLYipcfX+OBpoUFgKDQmjmZrWgDI+mGx/V1MAO/pl751F8Pn9Eck3LHtMgmXfJwcv1o3A96BIvfOTfcf/fWT4+JKoLZ9mdFstIFcjiufFjgjbQ1HmSM6vfgESUlMBK1L7sw5/rbNfVPEOdl2nzKSsDkoKQIf6ia18swDubbmlSAhlDVdKb3HQm1j1zh/deAzOVTvWstFlzX5srfTYq3P9WRLDWR826p0/1XCrU66m94lg3uwAIrUXxGyNUruEACO7g8qF1zerCEzt6hvXgFNiCO87cmKN02k+h+vpxZ2dJV8qSy73IdUvMOk6ClC4Syt4z2QbmIPN0o7c38eFugncPtm9HrC6J7iK5I3MFfKcGWVr2J9zXNX7uMDu+TIc15ytBbt+IIOyrXD3/gq/SoP17t5xdFUBO3rhhfmeDTUYYbCFnNmqqEQ5AGu3O2mxzlRp922vbhmFJtE1Aezo9R+qLY1imAEWAo5arud8qqRqtLvjYGcJmkjXFLCjo9677bnl9Nasj60swpSuyWOfgPxix2jHZYnvdbpO/wf0X652D+/dGV80AAAAAElFTkSuQmCC",_i="data:image/svg+xml,%3csvg%20width='36'%20height='36'%20viewBox='0%200%2036%2036'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20width='36'%20height='36'%20rx='18'%20fill='%232358B2'/%3e%3cmask%20id='mask0_1924_16177'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='11'%20y='10'%20width='17'%20height='16'%3e%3crect%20x='11.334'%20y='10'%20width='16'%20height='16'%20fill='url(%23pattern0_1924_16177)'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1924_16177)'%3e%3crect%20x='11.334'%20y='10'%20width='16'%20height='16'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cpattern%20id='pattern0_1924_16177'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_1924_16177'%20transform='scale(0.00195312)'/%3e%3c/pattern%3e%3cimage%20id='image0_1924_16177'%20width='512'%20height='512'%20preserveAspectRatio='none'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOgAAADoABlffMYAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7d13uGRlme7/79M0ijnrKM6ImHAMmHXGgB7zKJhzAAMgZjFg4DfnzO8ISM4gKIKIEgwImAAjiAQRCSoCCgaCgOQcn/PHu5reNHt37121qt61qr6f6+pLbLr3vi/Seuqtp947MhNJkjRdFtUOIEmSxs8BQJKkKeQAIEnSFHIAkCRpCjkASJI0hRbXDjCoiFgMPBB40Iwf9wZimV96E/AP4PzmxwWZeeMYo0qS1DnRl48BRsSqwFrA85ofa3DHh/18JHAxcCrwmyU/MvPslqJKktR5nR0AImJ1lj7s1wJWH/G3vAw4EjgE+EFmXj7i7ydJUjWdGgAi4uXA2ykP/YdWjHITcBRlGDggMy+umEWSpNZVHwAiYmXgrcAngMdXDTO7G4ADgZ0z88TaYSRJakO1ASAi7glsAHwUWLVKiIU7FtgZ+FZm3lQ7jCRJgxr7ABARDwE+AmwI3Gus37w9fwW2AvbKzBtqh5EkaaHGNgBExKOBz1CO++80lm86ehcA2wB7ZOY1tcNIkjRfIx8Ams/rbwL8f8CdR/rN6vknsD2wS2ZeWTuMJEkrMtIBICKeCuwFrDmyb9Itl1N2BHbMzEtqh5EkaS4jGQCaV/3/F/gksFLr36D7rgZ2B7bNzAtrh5EkaVmtDwAR8UDgIMrlP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kS9k5tm1w0iStETrA8BtXzjiPZSSmruO5Bt023XAl4GtMvPc2mEkSVrWyAYAgIhYA9gPeOrIvkm3XA3sDmybmRfWDiNJ0lxGOgAARMQiYH3g88D9R/rN6rkc2BnYITMvrR1GkqQVGfkAcNs3irgP8P8DGzE5Vwj/E9ge2CUzr6wdRpKk+RrbAHDbNyyfFPgf4FUMcRNhZRdQLj/aw0peSVIfjX0AuO0bRzwK2BhYF7hLlRALdwKwG3CAlbySpD6rNgDcFiDiAcAHgXcCq1UNM7trKZ/h3z0zT6odRpKkNlQfAGaKiH8HXtH8eDawuFKUG4GjgO8C+2XmFZVySJI0Ep0aAGaKiHsBL6EMAy8HHjjib3ku8EPg+8BPMvPqEX8/SZKq6ewAMFNEBPB0ykCwOvDgGT/uz8KWCW8G/gT8fsaP07yiV5I0TXoxACxPRCymnA7MHAoeAFwPXAFcOeN/LwPOycwb66SVJKkbej8ASJKkhevr5/AlSdIQHAAkSZpCDgCSJE0hBwBJkqaQA4AkSVPo/wH9hnZgmG1pVwAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e";class Li extends bn{constructor(){super("https://wallet-api.pantograph.app")}async getTokensDetails(t,n="base"){try{if(!t||!Array.isArray(t)||t.length===0)throw new Error("Addresses must be a non-empty array");const o=t.join(","),s=await this.get(`/keyrings/tokens/${n}/v2`,{query:{addresses:o}});return Array.isArray(s.data)&&(s.data=s.data.filter((a,r,l)=>r===l.findIndex(d=>d.address.toLowerCase()===a.address.toLowerCase())),Array.isArray(t)&&t.length>0&&(s.data=s.data.filter(a=>t.some(r=>r.toLowerCase()===a.address.toLowerCase())),s.data.sort((a,r)=>t.findIndex(l=>l.toLowerCase()===a.address.toLowerCase())-t.findIndex(l=>l.toLowerCase()===r.address.toLowerCase())))),s}catch(o){throw console.error("❌ Error getting tokens details:",o instanceof Error?o.message:o),o}}async getTokenDetail(t,n="base"){try{if(!t)throw new Error("Address is required");const o=await this.getTokensDetails([t],n);return{data:o.data[0]||null,status:o.status}}catch(o){throw console.error(`❌ Error getting token detail for ${t}:`,o instanceof Error?o.message:o),o}}async getTopGainers(t="base",n="24h",o=3){try{return await this.get(`/token-list/top-gainers/${t}`,{query:{duration:n,limit:o}})}catch(s){throw console.error("❌ Error getting top gainers:",s instanceof Error?s.message:s),s}}}const et=new Li,Ri="https://dln.debridge.finance",Hi=new bn(Ri);async function so(e){const{chainId:t,tokenIn:n,tokenInAmount:o,tokenOut:s,accesstoken:a,slippage:r="auto",tokenOutRecipient:l}=e;if(!t||!n||!o||!s)throw new Error("Missing required parameters: chainId, tokenIn, tokenInAmount, tokenOut");try{const N=(await(await fetch("https://exchange-api.keyring.app/admin/setting?configs=others",{method:"GET"})).json())?.others||{},_=N?.AFFILIATE_FEE_PERENT,g=N?.AFFILIATE_FEE_RECIPIENT,E=await Hi.get("/v1.0/chain/transaction",{query:{chainId:String(t),tokenIn:n,tokenInAmount:o,tokenOut:s,slippage:String(r),tokenOutRecipient:l,accesstoken:a,affiliateFeePercent:_,affiliateFeeRecipient:g}});if(E.data?.error)throw new Error(`DeBridge API Error: ${E.data.error}`);return console.log("✅ Quote retrieved successfully"),{success:!0,data:E.data}}catch(d){let S=d instanceof Error?d.message:"Unknown error";const N=d;N.data?.errorMessage?S=N.data.errorMessage:N.response?.data?.errorMessage?S=N.response.data.errorMessage:N.data?.message?S=N.data.message:N.response?.data?.message&&(S=N.response.data.message);const _=N.status||N.response?.status||N.statusCode||N.data?.status;return console.error("📋 Error details:",{errorMessage:S,errorCode:N.data?.errorCode,errorId:N.data?.errorId,status:_,reqId:N.data?.reqId,fullError:{message:N.message,status:N.status,statusCode:N.statusCode}}),{success:!1,error:d instanceof Error?d.message:"Unknown error",status:_,errorMessage:S,errorCode:N.data?.errorCode,errorId:N.data?.errorId}}}function kt(e){const t=[],n=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]*)\]\(([^)]+)\)|(https?:\/\/[^\s<>]+)|\*\*(.+?)\*\*|__(.+?)__|\*(.+?)\*|_(.+?)_|~~(.+?)~~|`([^`]+)`/g;let o=0,s;for(;(s=n.exec(e))!==null;)s.index>o&&t.push(e.slice(o,s.index)),s[1]!==void 0||s[2]!==void 0?t.push(C.jsx("img",{src:s[2],alt:s[1],className:"mc-image"},s.index)):s[3]!==void 0?t.push(C.jsx("a",{href:s[4],target:"_blank",rel:"noopener noreferrer",className:"mc-link",children:s[3]},s.index)):s[5]!==void 0?t.push(C.jsx("a",{href:s[5],target:"_blank",rel:"noopener noreferrer",className:"mc-link",children:s[5]},s.index)):s[6]!==void 0?t.push(C.jsx("strong",{children:kt(s[6])},s.index)):s[7]!==void 0?t.push(C.jsx("strong",{children:kt(s[7])},s.index)):s[8]!==void 0?t.push(C.jsx("em",{children:kt(s[8])},s.index)):s[9]!==void 0?t.push(C.jsx("em",{children:kt(s[9])},s.index)):s[10]!==void 0?t.push(C.jsx("del",{children:kt(s[10])},s.index)):s[11]!==void 0&&t.push(C.jsx("code",{className:"mc-inline-code",children:s[11]},s.index)),o=s.index+s[0].length;return o<e.length&&t.push(e.slice(o)),t.length>0?t:[e]}const Vi=({content:e})=>{const t=e.split(`
104
+ `),n=[];let o=0;for(;o<t.length;){const s=t[o];if(s.trimStart().startsWith("```")){const r=s.trimStart().slice(3)?.trim(),l=[];for(o++;o<t.length&&!t[o].trimStart().startsWith("```");)l.push(t[o]),o++;n.push(C.jsxs("div",{className:"mc-codeblock",children:[r&&C.jsx("div",{className:"mc-codeblock-lang",children:r}),C.jsx("pre",{children:C.jsx("code",{children:l.join(`
105
+ `)})})]},`code-${o}`)),o++;continue}if(/^(\s*[-*_]\s*){3,}$/.test(s)){n.push(C.jsx("hr",{className:"mc-hr"},`hr-${o}`)),o++;continue}const a=s.match(/^(#{1,3})\s+(.+)/);if(a){const r=a[1].length,l=a[2];n.push(C.jsx("div",{className:`mc-heading mc-h${r}`,children:kt(l)},`h-${o}`)),o++;continue}if(s.trimStart().startsWith("> ")){const r=[];for(;o<t.length&&t[o].trimStart().startsWith("> ");)r.push(t[o].replace(/^\s*>\s?/,"")),o++;n.push(C.jsx("div",{className:"mc-blockquote",children:r.map((l,d)=>C.jsx("div",{children:kt(l)},d))},`bq-${o}`));continue}if(s?.trim()===""){n.push(C.jsx("div",{className:"mc-empty-line"},`empty-${o}`)),o++;continue}n.push(C.jsx("div",{className:"mc-line",children:kt(s)},`line-${o}`)),o++}return C.jsx("div",{className:"message-content",children:n})},Wi={send_native:{label:"Send Native Token",description:"Send native token (ETH, BNB, MATIC, etc.) to an address",fields:[{key:"to_address",label:"Recipient Address",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"Amount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_token:{label:"Send Token (ERC20)",description:"Send an ERC20 token to an address",fields:[{key:"contract_address",label:"Token Contract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"Token Symbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"to_address",label:"Recipient Address",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"amount",label:"Amount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"},{key:"decimals",label:"Decimals",type:"number",placeholder:"18",required:!1,editable:!1}]},swap_token:{label:"Swap Token",description:"Swap one token for another",fields:[{key:"token_in",label:"From Token",type:"address",placeholder:"0x... or native",required:!0,editable:!1},{key:"token_in_symbol",label:"From Symbol",type:"text",placeholder:"e.g. ETH",required:!1,editable:!1},{key:"token_out",label:"To Token",type:"address",placeholder:"0x...",required:!0,editable:!1},{key:"token_out_symbol",label:"To Symbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"token_in_decimals",label:"From Decimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"token_out_decimals",label:"To Decimals",type:"number",placeholder:"18",required:!1,editable:!1},{key:"amount",label:"Amount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},approve_token:{label:"Approve Token",description:"Approve a spender to use your tokens",fields:[{key:"contract_address",label:"Token Contract",type:"address",placeholder:"0x... token contract",required:!0,validation:"address",editable:!1},{key:"token_symbol",label:"Token Symbol",type:"text",placeholder:"e.g. USDC",required:!1,editable:!1},{key:"spender_address",label:"Spender Address",type:"address",placeholder:"0x... spender contract",required:!0,validation:"address",editable:!1},{key:"amount",label:"Amount (empty = unlimited)",type:"amount",placeholder:"0.0 or leave empty for max",required:!1,validation:"amount"},{key:"decimals",label:"Decimals",type:"number",placeholder:"18",required:!1,editable:!1}]},wrap_native:{label:"Wrap Native Token",description:"Wrap native token (ETH → WETH)",fields:[{key:"amount",label:"Amount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},unwrap_native:{label:"Unwrap Native Token",description:"Unwrap native token (WETH → ETH)",fields:[{key:"amount",label:"Amount",type:"amount",placeholder:"0.0",required:!0,validation:"amount"}]},send_nft:{label:"Send NFT",description:"Transfer an ERC721 or ERC1155 NFT to another address",fields:[{key:"contract_address",label:"NFT Contract",type:"address",placeholder:"0x... NFT contract",required:!0,validation:"address",editable:!1},{key:"token_id",label:"Token ID",type:"text",placeholder:"e.g. 1234",required:!0,editable:!1},{key:"to_address",label:"Recipient Address",type:"address",placeholder:"0x...",required:!0,validation:"address"},{key:"token_standard",label:"Token Standard",type:"text",placeholder:"ERC721 or ERC1155",required:!0,editable:!1},{key:"amount",label:"Amount",type:"text",placeholder:"1",required:!1},{key:"nft_name",label:"NFT Name",type:"text",placeholder:"e.g. Bored Ape #1234",required:!1,editable:!1}]}};function $i(e){return Re(e)}function ao(e){if(!e||e?.trim()==="")return!1;const t=parseFloat(e);return!isNaN(t)&&t>0}const Gi=({action:e,initialValues:t,onSubmit:n,onCancel:o,isSubmitting:s=!1,tokenInfo:a})=>{const{t:r,ti:l}=xn(),d=Wi[e],[S,N]=se.useState(()=>{if(!d)return{};const Q={};return d.fields.forEach(I=>{Q[I.key]=t[I.key]||""}),Q}),[_]=se.useState(()=>["send_native","send_token","swap_token"].includes(e)&&!a&&S.contract_address?r("formTokenNotFound"):null),[g,E]=se.useState(()=>{const Q={};if(["send_native","send_token","swap_token"].includes(e)&&a){const j=parseFloat(a.balanceFormatted||"0");if(j<=0)Q.amount=l("formNoBalance",{symbol:a.symbol??""});else{const ne=t.amount?.trim();ne&&ao(ne)&&parseFloat(ne)>j&&(Q.amount=l("formInsufficientBalance",{balance:a.balanceFormatted,symbol:a.symbol??""}))}}return Q}),w=se.useCallback((Q,I)=>{N(j=>({...j,[Q]:I})),g[Q]&&E(j=>{const ne={...j};return delete ne[Q],ne})},[g]),B=se.useCallback(()=>{if(!d)return!1;const Q={};return d.fields.forEach(I=>{const j=S[I.key]?.trim()||"";if(I.required&&!j){Q[I.key]=l("formFieldRequired",{field:I.label});return}if(j){if(I.validation==="address"&&!$i(j)&&(Q[I.key]=r("formInvalidAddress")),I.validation==="amount"&&!ao(j)&&(Q[I.key]=r("formMustBePositive")),I.key==="amount"&&j&&ao(j)&&a?.balanceFormatted){const ne=parseFloat(j),he=parseFloat(a.balanceFormatted);ne>he&&(Q[I.key]=l("formInsufficientBalance",{balance:a.balanceFormatted,symbol:a.symbol??""}))}I.validation==="positive_number"&&(isNaN(Number(j))||Number(j)<0)&&(Q[I.key]=r("formMustBeValidNumber"))}}),E(Q),Object.keys(Q).length===0},[d,S,a,r,l]),M=se.useCallback(()=>{B()&&n(e,S)},[B,n,e,S]);return d?C.jsxs("div",{className:"action-form",children:[C.jsx("div",{className:"action-form-title",children:C.jsx("span",{children:d.label})}),_&&C.jsxs("div",{className:"action-form-general-error",children:["⚠️ ",_]}),a&&C.jsx("div",{className:"action-form-token-info",children:C.jsxs("div",{className:"token-info-row",children:[a.logo&&C.jsx("img",{src:a.logo,alt:a.symbol,className:"token-info-logo",width:20,height:20}),C.jsxs("div",{className:"token-info-details",children:[C.jsxs("span",{className:"token-info-name",children:[a.name," (",a.symbol,")"]}),C.jsxs("span",{className:"token-info-balance",children:[r("formBalance")," ",le(a.balanceFormatted).decimalPlaces(8,le.ROUND_DOWN).toFormat()," ",a.symbol,a.usdValue!==void 0&&C.jsxs("span",{className:"token-info-usd",children:[" ","≈ $",a.usdValue.toFixed(2)]})]})]})]})}),C.jsx("div",{className:"action-form-fields",children:d.fields.map(Q=>Q.key==="amount"&&e==="send_nft"&&S.token_standard?.toUpperCase()!=="ERC1155"?null:C.jsxs("div",{className:"action-form-field",children:[C.jsxs("div",{className:"action-form-field-header",children:[C.jsxs("label",{children:[Q.label,Q.required&&" *"]}),Q.key==="amount"&&a&&e!=="send_nft"&&C.jsxs("div",{className:"action-form-pct-btns",children:[[25,50,75].map(I=>C.jsxs("button",{type:"button",className:"action-form-pct-btn",onClick:()=>w("amount",(parseFloat(a.balanceFormatted)*I/100).toString()),disabled:s,children:[I,"%"]},I)),C.jsx("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>w("amount",a.balanceFormatted),disabled:s,children:"MAX"})]})]}),(()=>{const I=Q.editable===!1&&!!t[Q.key],j=s||I,ne=[g[Q.key]?"error":"",I?"readonly":""].filter(Boolean).join(" ");return Q.type==="address"?C.jsx("textarea",{rows:2,placeholder:Q.placeholder,value:S[Q.key]||"",onChange:he=>w(Q.key,he.target.value),className:ne,disabled:j}):C.jsx("input",{type:Q.type==="number"?"number":"text",placeholder:Q.placeholder,value:S[Q.key]||"",onChange:he=>w(Q.key,he.target.value),className:ne,disabled:j})})(),g[Q.key]&&C.jsx("span",{className:"field-error",children:g[Q.key]})]},Q.key))}),C.jsxs("div",{className:"action-form-actions",children:[C.jsx("button",{className:"action-form-cancel",onClick:o,type:"button",disabled:s,children:r("formCancel")}),C.jsx("button",{className:"action-form-submit",onClick:M,type:"button",disabled:s,children:r(s?"formProcessing":"formExecute")})]})]}):null},zi=({scrollContainerRef:e,threshold:t=200})=>{const[n,o]=se.useState(!1);se.useEffect(()=>{const a=e.current;if(!a)return;const r=()=>{const{scrollTop:l,scrollHeight:d,clientHeight:S}=a,N=d-l-S;o(N>t)};return a.addEventListener("scroll",r,{passive:!0}),r(),()=>{a.removeEventListener("scroll",r)}},[e,t]);const s=()=>{e.current?.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})};return n?C.jsx("button",{className:"scroll-to-bottom-btn",onClick:s,"aria-label":"Scroll to bottom",type:"button",children:C.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:C.jsx("path",{d:"M9 3V15M9 15L4 10M9 15L14 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}):null};function qi(e){const{walletAddress:t,chainName:n,chainId:o,nativeSymbol:s,walletTokens:a}=e;if(!t)return`You are a Web3 wallet assistant for the Keyring crypto EVM wallet app.
106
+ The user is currently NOT connected to any wallet.
107
+
108
+ ## YOUR ROLE:
109
+ - You are a friendly, knowledgeable assistant that can talk about ANY topic naturally
110
+ - You can freely answer general questions, discuss crypto tokens, prices, market info, provide token details, etc. — these do NOT require a wallet connection
111
+ - ONLY ask the user to connect their wallet when their request explicitly requires their personal wallet/address, such as:
112
+ - Sending tokens or NFTs
113
+ - Swapping tokens
114
+ - Approving token spending
115
+ - Wrapping/unwrapping tokens
116
+ - Checking THEIR OWN balance ("what is MY balance?", "how much ETH do I have?")
117
+ - Viewing THEIR OWN NFT collection
118
+ - Any action that reads or writes to THEIR wallet address
119
+ - For all other requests (token info, prices, general crypto questions, market data, etc.), respond normally and helpfully
120
+ - **CRITICAL - LANGUAGE**: You MUST detect the language the user is writing in and respond ONLY in that exact language. If the user writes in English, respond in English. If in Vietnamese, respond in Vietnamese. NEVER respond in a different language than what the user used. Do NOT default to Chinese or any other language.
121
+
122
+ ## RESPONSE FORMAT:
123
+ Always respond with a valid JSON object:
124
+ {"action":"chat","message":"<your response>", suggested_actions:[{"label":"<short button text>","prompt":"<message sent when clicked>"}]}
125
+
126
+ ## RULES:
127
+ - suggested_actions: include when your message offers the user interactive choices or asks a follow-up question. NEVER include suggested_actions that ask the user to connect their wallet (e.g., "Connect wallet", "Connect now", etc.) — the app handles wallet connection separately
128
+ - For wallet-required actions, politely explain the user needs to connect their wallet first, and put this in the "message" field
129
+ - ALWAYS respond with raw JSON only, never wrap in \`\`\`json code blocks
130
+ - **CRITICAL - LANGUAGE**: Always respond in the SAME language the user writes in. English → English. Vietnamese → Vietnamese. NEVER use Chinese or any other language unless the user wrote in that language.`;if(t&&!ft[o])return`You are a Web3 wallet assistant for the Keyring crypto EVM wallet app.
94
131
  The user's wallet address is: ${t}
95
132
  The user is selected on (chainId: ${o}) an UNSUPPORTED chain.
96
133
 
@@ -119,11 +156,15 @@ User: ${t}`:t;return{success:!0,data:(await a.post("/chat",{prompt:l,model:n,str
119
156
  - suggested_actions: include when your message offers the user interactive choices or asks a follow-up question. NEVER include suggested_actions that ask the user to connect their wallet (e.g., "Connect wallet", "Connect now", etc.) — the app handles wallet connection separately
120
157
  - For wallet-required actions, politely explain the user needs to connect their wallet first, and put this in the "message" field
121
158
  - ALWAYS respond with raw JSON only, never wrap in \`\`\`json code blocks
122
- - **CRITICAL - LANGUAGE**: Always respond in the SAME language the user writes in. English → English. Vietnamese → Vietnamese. NEVER use Chinese or any other language unless the user wrote in that language.`:`You are a Web3 wallet assistant for the Keyring crypto EVM wallet app.
159
+ - **CRITICAL - LANGUAGE**: Always respond in the SAME language the user writes in. English → English. Vietnamese → Vietnamese. NEVER use Chinese or any other language unless the user wrote in that language.`;const r=a&&a.length>0?`
160
+ ## USER'S CURRENT WALLET BALANCE:
161
+ ${a.map(l=>{const d=l.usd_value!==void 0?` (~$${l.usd_value.toFixed(2)})`:"";return`- ${l.name} (${l.symbol}): ${l.balance_formatted}${d}${l.native_token?" [native]":` [${l.token_address}]`}`}).join(`
162
+ `)}
163
+ Use this balance data to accurately answer balance questions and to pre-fill token parameters in actions (contract_address, decimals, symbol). NEVER ask the user to provide token info that is already available above.
164
+ `:"";return`You are a Web3 wallet assistant for the Keyring crypto EVM wallet app.
123
165
  The user's wallet address is: ${t}
124
166
  The user is on chain: ${n} (chainId: ${o})
125
- Native token: ${s}
126
-
167
+ Native token: ${s}${r}
127
168
  ## YOUR ROLE:
128
169
  - You are a friendly, knowledgeable assistant that can talk about ANY topic naturally
129
170
  - You also specialize in crypto wallet operations: send tokens, swap, approve, check balances, get token info
@@ -225,7 +266,12 @@ Parameters: {} (empty)
225
266
  Triggered by: "show my NFTs", "what NFTs do I have?", "view my NFT collection", "xem NFT của tôi", "list my NFTs"
226
267
  Note: Use this when user wants to VIEW or LIST their NFTs. Do NOT use "chat" action for NFT viewing requests.
227
268
 
228
- ### 10. chat - Normal conversation, check balance, token info
269
+ ### 10. view_balances - View/Show user's full token balances
270
+ Parameters: {} (empty)
271
+ Triggered by: "show my balances", "what tokens do I have?", "list my tokens", "view my wallet", "xem balance của tôi", "xem token của tôi", "show all my tokens", "what's in my wallet?"
272
+ Note: Use this when user wants to see ALL their tokens/balances at once. Do NOT use "chat" action for wallet balance viewing requests. For single-token balance queries ("how much ETH do I have?", "check my USDC balance"), use "chat" action instead.
273
+
274
+ ### 11. chat - Normal conversation, token info
229
275
  Parameters: {} (empty)
230
276
  Optional: token_mentions: [{ "symbol": "", "contract_address": "", "decimals": <number> }] — include when your response mentions specific tokens
231
277
  Triggered by: questions, greetings, info requests, balance checks, token details, trending tokens
@@ -298,11 +344,11 @@ Response: {"action":"chat","message":"<inform user DOGE is not available as ERC2
298
344
  User: "buy BNB" (on non-BSC chain)
299
345
  Response: {"action":"chat","message":"<inform user BNB is native to BSC and may not be available on this chain>","parameters":{},"token_mentions":[]}
300
346
 
301
- User: "what is my balance?"
302
- Response: {"action":"chat","message":"<your response>","parameters":{},"token_mentions":[]}
347
+ User:"what is my balance?" or "check my balance", "show my balances" or "what tokens do I have?" or "xem balance của tôi" or "xem token của tôi"
348
+ Response: {"action":"view_balances","message":"<your friendly response>","parameters":{}}
303
349
 
304
350
  User: "hello"
305
- Response: {"action":"chat","message":"<greeting and list of capabilities>","parameters":{},"token_mentions":[],"suggested_actions":[{"label":"Check my balance","prompt":"What is my balance?"},{"label":"Show trending tokens","prompt":"Show me trending tokens"},{"label":"Show my NFTs","prompt":"Show my NFTs"}]}
351
+ Response: {"action":"chat","message":"<greeting and list of capabilities>","parameters":{},"token_mentions":[],"suggested_actions":[{"label":"Check my balance","prompt":"What is my balance?"},{"label":"Show my tokens","prompt":"Show my balances"},{"label":"Show trending tokens","prompt":"Show me trending tokens"},{"label":"Show my NFTs","prompt":"Show my NFTs"}]}
306
352
 
307
353
  User: "what is the capital of France?"
308
354
  Response: {"action":"chat","message":"<your answer>","parameters":{},"token_mentions":[],"suggested_actions":[]}
@@ -333,70 +379,48 @@ Response: {"action":"view_nfts","message":"Let me show you your NFT collection!"
333
379
 
334
380
  [With conversation history where user previously swapped ETH to USDC]
335
381
  User: "do it again but with 2 ETH"
336
- Response: {"action":"swap_token","message":"<friendly explanation>","parameters":{"token_in":"native","token_in_symbol":"${s}","token_in_decimals":"18","token_out":"<actual USDC address on current chain>","token_out_symbol":"USDC","token_out_decimals":"6","amount":"2"}}`:`You are a Web3 wallet assistant for the Keyring crypto EVM wallet app.
337
- The user is currently NOT connected to any wallet.
338
-
339
- ## YOUR ROLE:
340
- - You are a friendly, knowledgeable assistant that can talk about ANY topic naturally
341
- - You can freely answer general questions, discuss crypto tokens, prices, market info, provide token details, etc. — these do NOT require a wallet connection
342
- - ONLY ask the user to connect their wallet when their request explicitly requires their personal wallet/address, such as:
343
- - Sending tokens or NFTs
344
- - Swapping tokens
345
- - Approving token spending
346
- - Wrapping/unwrapping tokens
347
- - Checking THEIR OWN balance ("what is MY balance?", "how much ETH do I have?")
348
- - Viewing THEIR OWN NFT collection
349
- - Any action that reads or writes to THEIR wallet address
350
- - For all other requests (token info, prices, general crypto questions, market data, etc.), respond normally and helpfully
351
- - **CRITICAL - LANGUAGE**: You MUST detect the language the user is writing in and respond ONLY in that exact language. If the user writes in English, respond in English. If in Vietnamese, respond in Vietnamese. NEVER respond in a different language than what the user used. Do NOT default to Chinese or any other language.
352
-
353
- ## RESPONSE FORMAT:
354
- Always respond with a valid JSON object:
355
- {"action":"chat","message":"<your response>", suggested_actions:[{"label":"<short button text>","prompt":"<message sent when clicked>"}]}
356
-
357
- ## RULES:
358
- - suggested_actions: include when your message offers the user interactive choices or asks a follow-up question. NEVER include suggested_actions that ask the user to connect their wallet (e.g., "Connect wallet", "Connect now", etc.) — the app handles wallet connection separately
359
- - For wallet-required actions, politely explain the user needs to connect their wallet first, and put this in the "message" field
360
- - ALWAYS respond with raw JSON only, never wrap in \`\`\`json code blocks
361
- - **CRITICAL - LANGUAGE**: Always respond in the SAME language the user writes in. English → English. Vietnamese → Vietnamese. NEVER use Chinese or any other language unless the user wrote in that language.`}const gs={1:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",10:"0x4200000000000000000000000000000000000006",56:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",137:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",8453:"0x4200000000000000000000000000000000000006",42161:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"},mn=[{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"}]},{name:"allowance",type:"function",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]}],bs=[{name:"deposit",type:"function",stateMutability:"payable",inputs:[],outputs:[]},{name:"withdraw",type:"function",stateMutability:"nonpayable",inputs:[{name:"wad",type:"uint256"}],outputs:[]}],Yi=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],ji=[{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:[]}];function Zt(e,t){return t||ct[e]?.rpcUrls?.default?.http?.[0]}function Ji(e){const{action:t,parameters:n,fromAddress:o,chainId:s}=e;switch(t){case"send_native":return Xi(n,o,s);case"send_token":return Ki(n,o,s);case"approve_token":return Zi(n,o,s);case"wrap_native":return Qi(n,o,s);case"unwrap_native":return ec(n,o,s);case"send_nft":return nc(n,o,s);default:throw new Error(`Action "${t}" does not produce a transaction`)}}function Xi(e,t,n){const{to_address:o,amount:s}=e;if(!o)throw new Error("Recipient address is required");if(!s)throw new Error("Amount is required");const r=dt(s,18).toString();return{from:t,to:o,data:"0x",value:r,chainId:n,description:`Send ${s} native token to ${o}`}}function Ki(e,t,n){const{contract_address:o,to_address:s,amount:r,decimals:a,token_symbol:l}=e;if(!o)throw new Error("Token contract address is required");if(!s)throw new Error("Recipient address is required");if(!r)throw new Error("Amount is required");const f=parseInt(a)||18,S=dt(r,f),N=bt({abi:mn,functionName:"transfer",args:[s,S]});return{from:t,to:o,data:N,value:"0",chainId:n,description:`Send ${r} ${l||"tokens"} to ${s}`}}function Zi(e,t,n){const{contract_address:o,spender_address:s,amount:r,token_symbol:a}=e;if(!o)throw new Error("Token contract address is required");if(!s)throw new Error("Spender address is required");const l=r&&r?.trim()!==""?dt(r,18):Dt,f=bt({abi:mn,functionName:"approve",args:[s,l]});return{from:t,to:o,data:f,value:"0",chainId:n,description:`Approve ${r||"unlimited"} ${a||"tokens"} for ${s}`}}function Qi(e,t,n){const{amount:o}=e;if(!o)throw new Error("Amount is required");const s=gs[n];if(!s)throw new Error(`WETH not supported on chain ${n}`);const r=dt(o,18).toString(),a=bt({abi:bs,functionName:"deposit"});return{from:t,to:s,data:a,value:r,chainId:n,description:`Wrap ${o} native token`}}function ec(e,t,n){const{amount:o}=e;if(!o)throw new Error("Amount is required");const s=gs[n];if(!s)throw new Error(`WETH not supported on chain ${n}`);const r=dt(o,18),a=bt({abi:bs,functionName:"withdraw",args:[r]});return{from:t,to:s,data:a,value:"0",chainId:n,description:`Unwrap ${o} WETH`}}function tc(e){return["send_native","send_token","approve_token","wrap_native","unwrap_native","send_nft"].includes(e)}async function so(e){const{transactionHash:t,chainId:n,pollingInterval:o=3e3,timeout:s=12e4,rpcUrl:r}=e,a=Zt(n,r);if(!a)throw new Error(`No RPC endpoint for chain ${n}`);const l=Date.now();for(;Date.now()-l<s;){try{const S=await(await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getTransactionReceipt",params:[t]})})).json();if(S.result){const N=S.result;return{status:N.status==="0x1"?"success":"fail",blockNumber:N.blockNumber,gasUsed:N.gasUsed,effectiveGasPrice:N.effectiveGasPrice}}}catch(f){console.warn("eth_getTransactionReceipt poll error:",f)}await new Promise(f=>setTimeout(f,o))}throw new Error(`Transaction ${t} was not mined within ${s/1e3}s`)}async function ro(e){const{tokenAddress:t,ownerAddress:n,spenderAddress:o,chainId:s,rpcUrl:r}=e,a=Zt(s,r);if(!a)return console.warn(`No RPC endpoint for chain ${s}, assuming no allowance`),BigInt(0);try{const l=bt({abi:mn,functionName:"allowance",args:[n,o]}),S=await(await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_call",params:[{to:t,data:l},"latest"]})})).json();return S.result&&S.result!=="0x"?BigInt(S.result):BigInt(0)}catch(l){return console.warn("checkAllowance failed:",l),BigInt(0)}}function hn(e){const{tokenAddress:t,spenderAddress:n,fromAddress:o,chainId:s,tokenSymbol:r}=e,a=bt({abi:mn,functionName:"approve",args:[n,Dt]});return{from:o,to:t,data:a,value:"0",chainId:s,description:`Approve ${r||"token"} for swap`}}function nc(e,t,n){const{contract_address:o,token_id:s,to_address:r,token_standard:a,amount:l,nft_name:f}=e;if(!o)throw new Error("NFT contract address is required");if(!s)throw new Error("Token ID is required");if(!r)throw new Error("Recipient address is required");const S=(a||"ERC721").toUpperCase(),N=BigInt(s);let _,b;if(S==="ERC1155"){const E=BigInt(l||"1");_=bt({abi:ji,functionName:"safeTransferFrom",args:[t,r,N,E,"0x"]}),b=`Send ${E>1n?E.toString()+"x ":""}${f||"NFT"} (ERC1155 #${s}) to ${r}`}else _=bt({abi:Yi,functionName:"safeTransferFrom",args:[t,r,N]}),b=`Send ${f||"NFT"} (ERC721 #${s}) to ${r}`;return{from:t,to:o,data:_,value:"0",chainId:n,description:b}}async function gn(e){const{address:t,chainId:n,rpcUrl:o}=e,s=Zt(n,o);if(!s)return console.warn(`No RPC endpoint for chain ${n}`),new ue(0);try{const a=await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getBalance",params:[t,"latest"]})})).json();return a.result&&a.result!=="0x"?new ue(BigInt(a.result).toString()):new ue(0)}catch(r){return console.warn("getNativeBalance failed:",r),new ue(0)}}async function Qt(e){const{from:t,to:n,data:o,value:s,chainId:r,rpcUrl:a}=e,l=Zt(r,a);if(!l)return console.warn(`No RPC endpoint for chain ${r}`),new ue(0);try{const[f,S]=await Promise.all([fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_estimateGas",params:[{from:t,to:n,data:o,...s&&s!=="0"?{value:s}:{}}]})}),fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:2,method:"eth_gasPrice",params:[]})})]),[N,_]=await Promise.all([f.json(),S.json()]),b=N.result?new ue(BigInt(N.result).toString()):new ue(0),E=_.result?new ue(BigInt(_.result).toString()):new ue(0);return b.times(E).times(1.1)}catch(f){return console.warn("estimateTransactionFee failed:",f),new ue(0)}}async function ao(e){const{chainId:t,rpcUrl:n}=e,o=Zt(t,n);if(!o)return console.warn(`No RPC endpoint for chain ${t}`),new ue(0);try{const r=await(await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_gasPrice",params:[]})})).json();return r.result&&r.result!=="0x"?new ue(BigInt(r.result).toString()):new ue(0)}catch(s){return console.warn("getGasPrice failed:",s),new ue(0)}}var ee={},en={exports:{}},oc=en.exports,ws;function sc(){return ws||(ws=1,(function(e,t){(function(n,o){var s="1.0.41",r="",a="?",l="function",f="undefined",S="object",N="string",_="major",b="model",E="name",v="type",C="vendor",D="version",J="architecture",I="console",q="mobile",K="tablet",he="smarttv",ye="wearable",Be="embedded",i=500,d="Amazon",c="Apple",g="ASUS",m="BlackBerry",w="Browser",y="Chrome",h="Edge",k="Firefox",A="Google",T="Honor",F="Huawei",H="Lenovo",re="LG",ge="Microsoft",ke="Motorola",xe="Nvidia",G="OnePlus",we="Opera",Se="OPPO",Ge="Samsung",et="Sharp",He="Sony",De="Xiaomi",ze="Zebra",Me="Facebook",Ne="Chromium OS",Te="Mac OS",Ct=" Browser",Rt=function(ie,le){var O={};for(var z in ie)le[z]&&le[z].length%2===0?O[z]=le[z].concat(ie[z]):O[z]=ie[z];return O},M=function(ie){for(var le={},O=0;O<ie.length;O++)le[ie[O].toUpperCase()]=ie[O];return le},te=function(ie,le){return typeof ie===N?R(le).indexOf(R(ie))!==-1:!1},R=function(ie){return ie.toLowerCase()},ne=function(ie){return typeof ie===N?ie.replace(/[^\d\.]/g,r).split(".")[0]:o},oe=function(ie,le){if(typeof ie===N)return ie=ie.replace(/^\s\s*/,r),typeof le===f?ie:ie.substring(0,i)},$=function(ie,le){for(var O=0,z,Q,ae,j,V,ce;O<le.length&&!V;){var Ae=le[O],Ce=le[O+1];for(z=Q=0;z<Ae.length&&!V&&Ae[z];)if(V=Ae[z++].exec(ie),V)for(ae=0;ae<Ce.length;ae++)ce=V[++Q],j=Ce[ae],typeof j===S&&j.length>0?j.length===2?typeof j[1]==l?this[j[0]]=j[1].call(this,ce):this[j[0]]=j[1]:j.length===3?typeof j[1]===l&&!(j[1].exec&&j[1].test)?this[j[0]]=ce?j[1].call(this,ce,j[2]):o:this[j[0]]=ce?ce.replace(j[1],j[2]):o:j.length===4&&(this[j[0]]=ce?j[3].call(this,ce.replace(j[1],j[2])):o):this[j]=ce||o;O+=2}},W=function(ie,le){for(var O in le)if(typeof le[O]===S&&le[O].length>0){for(var z=0;z<le[O].length;z++)if(te(le[O][z],ie))return O===a?o:O}else if(te(le[O],ie))return O===a?o:O;return le.hasOwnProperty("*")?le["*"]:ie},Z={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},U={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[D,[E,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[D,[E,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[E,D],[/opios[\/ ]+([\w\.]+)/i],[D,[E,we+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[D,[E,we+" GX"]],[/\bopr\/([\w\.]+)/i],[D,[E,we]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[D,[E,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[D,[E,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[E,D],[/quark(?:pc)?\/([-\w\.]+)/i],[D,[E,"Quark"]],[/\bddg\/([\w\.]+)/i],[D,[E,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[D,[E,"UC"+w]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[D,[E,"WeChat"]],[/konqueror\/([\w\.]+)/i],[D,[E,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[D,[E,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[D,[E,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[D,[E,"Smart Lenovo "+w]],[/(avast|avg)\/([\w\.]+)/i],[[E,/(.+)/,"$1 Secure "+w],D],[/\bfocus\/([\w\.]+)/i],[D,[E,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[D,[E,we+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[D,[E,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[D,[E,"Dolphin"]],[/coast\/([\w\.]+)/i],[D,[E,we+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[D,[E,"MIUI"+Ct]],[/fxios\/([\w\.-]+)/i],[D,[E,k]],[/\bqihoobrowser\/?([\w\.]*)/i],[D,[E,"360"]],[/\b(qq)\/([\w\.]+)/i],[[E,/(.+)/,"$1Browser"],D],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[E,/(.+)/,"$1"+Ct],D],[/samsungbrowser\/([\w\.]+)/i],[D,[E,Ge+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[D,[E,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[E,"Sogou Mobile"],D],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[E,D],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[E],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[D,E],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[E,Me],D],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[E,D],[/\bgsa\/([\w\.]+) .*safari\//i],[D,[E,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[D,[E,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[D,[E,y+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[E,y+" WebView"],D],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[D,[E,"Android "+w]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[E,D],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[D,[E,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[D,E],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[E,[D,W,Z]],[/(webkit|khtml)\/([\w\.]+)/i],[E,D],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[E,"Netscape"],D],[/(wolvic|librewolf)\/([\w\.]+)/i],[E,D],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[D,[E,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[E,[D,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[E,[D,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[J,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[J,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[J,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[J,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[J,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[J,/ower/,r,R]],[/ sun4\w[;\)]/i],[[J,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[J,R]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[b,[C,Ge],[v,K]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[b,[C,Ge],[v,q]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[b,[C,c],[v,q]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[b,[C,c],[v,K]],[/(macintosh);/i],[b,[C,c]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[b,[C,et],[v,q]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[b,[C,T],[v,K]],[/honor([-\w ]+)[;\)]/i],[b,[C,T],[v,q]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[b,[C,F],[v,K]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[b,[C,F],[v,q]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[b,/_/g," "],[C,De],[v,K]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[b,/_/g," "],[C,De],[v,q]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[b,[C,Se],[v,q]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[b,[C,W,{OnePlus:["304","403","203"],"*":Se}],[v,K]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[b,[C,"Vivo"],[v,q]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[b,[C,"Realme"],[v,q]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[b,[C,ke],[v,q]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[b,[C,ke],[v,K]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[b,[C,re],[v,K]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[b,[C,re],[v,q]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[b,[C,H],[v,K]],[/(nokia) (t[12][01])/i],[C,b,[v,K]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[b,/_/g," "],[v,q],[C,"Nokia"]],[/(pixel (c|tablet))\b/i],[b,[C,A],[v,K]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[b,[C,A],[v,q]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[b,[C,He],[v,q]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[b,"Xperia Tablet"],[C,He],[v,K]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[b,[C,G],[v,q]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[b,[C,d],[v,K]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[b,/(.+)/g,"Fire Phone $1"],[C,d],[v,q]],[/(playbook);[-\w\),; ]+(rim)/i],[b,C,[v,K]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[b,[C,m],[v,q]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[b,[C,g],[v,K]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[b,[C,g],[v,q]],[/(nexus 9)/i],[b,[C,"HTC"],[v,K]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[C,[b,/_/g," "],[v,q]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[b,[C,"TCL"],[v,K]],[/(itel) ((\w+))/i],[[C,R],b,[v,W,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[b,[C,"Acer"],[v,K]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[b,[C,"Meizu"],[v,q]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[b,[C,"Ulefone"],[v,q]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[b,[C,"Energizer"],[v,q]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[b,[C,"Cat"],[v,q]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[b,[C,"Smartfren"],[v,q]],[/droid.+; (a(?:015|06[35]|142p?))/i],[b,[C,"Nothing"],[v,q]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[b,[C,"Archos"],[v,K]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[b,[C,"Archos"],[v,q]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[C,b,[v,K]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[C,b,[v,q]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[C,b,[v,K]],[/(surface duo)/i],[b,[C,ge],[v,K]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[b,[C,"Fairphone"],[v,q]],[/(u304aa)/i],[b,[C,"AT&T"],[v,q]],[/\bsie-(\w*)/i],[b,[C,"Siemens"],[v,q]],[/\b(rct\w+) b/i],[b,[C,"RCA"],[v,K]],[/\b(venue[\d ]{2,7}) b/i],[b,[C,"Dell"],[v,K]],[/\b(q(?:mv|ta)\w+) b/i],[b,[C,"Verizon"],[v,K]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[b,[C,"Barnes & Noble"],[v,K]],[/\b(tm\d{3}\w+) b/i],[b,[C,"NuVision"],[v,K]],[/\b(k88) b/i],[b,[C,"ZTE"],[v,K]],[/\b(nx\d{3}j) b/i],[b,[C,"ZTE"],[v,q]],[/\b(gen\d{3}) b.+49h/i],[b,[C,"Swiss"],[v,q]],[/\b(zur\d{3}) b/i],[b,[C,"Swiss"],[v,K]],[/\b((zeki)?tb.*\b) b/i],[b,[C,"Zeki"],[v,K]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[C,"Dragon Touch"],b,[v,K]],[/\b(ns-?\w{0,9}) b/i],[b,[C,"Insignia"],[v,K]],[/\b((nxa|next)-?\w{0,9}) b/i],[b,[C,"NextBook"],[v,K]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[C,"Voice"],b,[v,q]],[/\b(lvtel\-)?(v1[12]) b/i],[[C,"LvTel"],b,[v,q]],[/\b(ph-1) /i],[b,[C,"Essential"],[v,q]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[b,[C,"Envizen"],[v,K]],[/\b(trio[-\w\. ]+) b/i],[b,[C,"MachSpeed"],[v,K]],[/\btu_(1491) b/i],[b,[C,"Rotor"],[v,K]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[b,[C,xe],[v,K]],[/(sprint) (\w+)/i],[C,b,[v,q]],[/(kin\.[onetw]{3})/i],[[b,/\./g," "],[C,ge],[v,q]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[b,[C,ze],[v,K]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[b,[C,ze],[v,q]],[/smart-tv.+(samsung)/i],[C,[v,he]],[/hbbtv.+maple;(\d+)/i],[[b,/^/,"SmartTV"],[C,Ge],[v,he]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[C,re],[v,he]],[/(apple) ?tv/i],[C,[b,c+" TV"],[v,he]],[/crkey/i],[[b,y+"cast"],[C,A],[v,he]],[/droid.+aft(\w+)( bui|\))/i],[b,[C,d],[v,he]],[/(shield \w+ tv)/i],[b,[C,xe],[v,he]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[b,[C,et],[v,he]],[/(bravia[\w ]+)( bui|\))/i],[b,[C,He],[v,he]],[/(mi(tv|box)-?\w+) bui/i],[b,[C,De],[v,he]],[/Hbbtv.*(technisat) (.*);/i],[C,b,[v,he]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[C,oe],[b,oe],[v,he]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[b,[v,he]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[v,he]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[C,b,[v,I]],[/droid.+; (shield)( bui|\))/i],[b,[C,xe],[v,I]],[/(playstation \w+)/i],[b,[C,He],[v,I]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[b,[C,ge],[v,I]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[b,[C,Ge],[v,ye]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[C,b,[v,ye]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[b,[C,Se],[v,ye]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[b,[C,c],[v,ye]],[/(opwwe\d{3})/i],[b,[C,G],[v,ye]],[/(moto 360)/i],[b,[C,ke],[v,ye]],[/(smartwatch 3)/i],[b,[C,He],[v,ye]],[/(g watch r)/i],[b,[C,re],[v,ye]],[/droid.+; (wt63?0{2,3})\)/i],[b,[C,ze],[v,ye]],[/droid.+; (glass) \d/i],[b,[C,A],[v,ye]],[/(pico) (4|neo3(?: link|pro)?)/i],[C,b,[v,ye]],[/; (quest( \d| pro)?)/i],[b,[C,Me],[v,ye]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[C,[v,Be]],[/(aeobc)\b/i],[b,[C,d],[v,Be]],[/(homepod).+mac os/i],[b,[C,c],[v,Be]],[/windows iot/i],[[v,Be]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[b,[v,q]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[b,[v,K]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[v,K]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[v,q]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[b,[C,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[D,[E,h+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[E,D],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[D,[E,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[E,D],[/ladybird\//i],[[E,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[D,E]],os:[[/microsoft (windows) (vista|xp)/i],[E,D],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[E,[D,W,X]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[D,W,X],[E,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[D,/_/g,"."],[E,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[E,Te],[D,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[D,E],[/(ubuntu) ([\w\.]+) like android/i],[[E,/(.+)/,"$1 Touch"],D],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[E,D],[/\(bb(10);/i],[D,[E,m]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[D,[E,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[D,[E,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[D,[E,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[D,[E,"watchOS"]],[/crkey\/([\d\.]+)/i],[D,[E,y+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[E,Ne],D],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[E,D],[/(sunos) ?([\w\.\d]*)/i],[[E,"Solaris"],D],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[E,D]]},Y=function(ie,le){if(typeof ie===S&&(le=ie,ie=o),!(this instanceof Y))return new Y(ie,le).getResult();var O=typeof n!==f&&n.navigator?n.navigator:o,z=ie||(O&&O.userAgent?O.userAgent:r),Q=O&&O.userAgentData?O.userAgentData:o,ae=le?Rt(U,le):U,j=O&&O.userAgent==z;return this.getBrowser=function(){var V={};return V[E]=o,V[D]=o,$.call(V,z,ae.browser),V[_]=ne(V[D]),j&&O&&O.brave&&typeof O.brave.isBrave==l&&(V[E]="Brave"),V},this.getCPU=function(){var V={};return V[J]=o,$.call(V,z,ae.cpu),V},this.getDevice=function(){var V={};return V[C]=o,V[b]=o,V[v]=o,$.call(V,z,ae.device),j&&!V[v]&&Q&&Q.mobile&&(V[v]=q),j&&V[b]=="Macintosh"&&O&&typeof O.standalone!==f&&O.maxTouchPoints&&O.maxTouchPoints>2&&(V[b]="iPad",V[v]=K),V},this.getEngine=function(){var V={};return V[E]=o,V[D]=o,$.call(V,z,ae.engine),V},this.getOS=function(){var V={};return V[E]=o,V[D]=o,$.call(V,z,ae.os),j&&!V[E]&&Q&&Q.platform&&Q.platform!="Unknown"&&(V[E]=Q.platform.replace(/chrome os/i,Ne).replace(/macos/i,Te)),V},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return z},this.setUA=function(V){return z=typeof V===N&&V.length>i?oe(V,i):V,this},this.setUA(z),this};Y.VERSION=s,Y.BROWSER=M([E,D,_]),Y.CPU=M([J]),Y.DEVICE=M([b,C,v,I,q,he,K,ye,Be]),Y.ENGINE=Y.OS=M([E,D]),e.exports&&(t=e.exports=Y),t.UAParser=Y;var fe=typeof n!==f&&(n.jQuery||n.Zepto);if(fe&&!fe.ua){var me=new Y;fe.ua=me.getResult(),fe.ua.get=function(){return me.getUA()},fe.ua.set=function(ie){me.setUA(ie);var le=me.getResult();for(var O in le)fe.ua[O]=le[O]}}})(typeof window=="object"?window:oc)})(en,en.exports)),en.exports}var ys;function rc(){if(ys)return ee;ys=1,Object.defineProperty(ee,"__esModule",{value:!0});function e(x){return x&&typeof x=="object"&&"default"in x?x.default:x}var t=se,n=e(t),o=sc(),s=new o,r=s.getBrowser(),a=s.getCPU(),l=s.getDevice(),f=s.getEngine(),S=s.getOS(),N=s.getUA(),_=function(u){return s.setUA(u)},b=function(u){if(!u){console.error("No userAgent string was provided");return}var p=new o(u);return{UA:p,browser:p.getBrowser(),cpu:p.getCPU(),device:p.getDevice(),engine:p.getEngine(),os:p.getOS(),ua:p.getUA(),setUserAgent:function(L){return p.setUA(L)}}},E=Object.freeze({ClientUAInstance:s,browser:r,cpu:a,device:l,engine:f,os:S,ua:N,setUa:_,parseUserAgent:b});function v(x,u){var p=Object.keys(x);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(x);u&&(P=P.filter(function(L){return Object.getOwnPropertyDescriptor(x,L).enumerable})),p.push.apply(p,P)}return p}function C(x){for(var u=1;u<arguments.length;u++){var p=arguments[u]!=null?arguments[u]:{};u%2?v(Object(p),!0).forEach(function(P){K(x,P,p[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(p)):v(Object(p)).forEach(function(P){Object.defineProperty(x,P,Object.getOwnPropertyDescriptor(p,P))})}return x}function D(x){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?D=function(u){return typeof u}:D=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},D(x)}function J(x,u){if(!(x instanceof u))throw new TypeError("Cannot call a class as a function")}function I(x,u){for(var p=0;p<u.length;p++){var P=u[p];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(x,P.key,P)}}function q(x,u,p){return u&&I(x.prototype,u),x}function K(x,u,p){return u in x?Object.defineProperty(x,u,{value:p,enumerable:!0,configurable:!0,writable:!0}):x[u]=p,x}function he(){return he=Object.assign||function(x){for(var u=1;u<arguments.length;u++){var p=arguments[u];for(var P in p)Object.prototype.hasOwnProperty.call(p,P)&&(x[P]=p[P])}return x},he.apply(this,arguments)}function ye(x,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(u&&u.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),u&&i(x,u)}function Be(x){return Be=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},Be(x)}function i(x,u){return i=Object.setPrototypeOf||function(P,L){return P.__proto__=L,P},i(x,u)}function d(x,u){if(x==null)return{};var p={},P=Object.keys(x),L,ve;for(ve=0;ve<P.length;ve++)L=P[ve],!(u.indexOf(L)>=0)&&(p[L]=x[L]);return p}function c(x,u){if(x==null)return{};var p=d(x,u),P,L;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(x);for(L=0;L<ve.length;L++)P=ve[L],!(u.indexOf(P)>=0)&&Object.prototype.propertyIsEnumerable.call(x,P)&&(p[P]=x[P])}return p}function g(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function m(x,u){if(u&&(typeof u=="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g(x)}function w(x,u){return y(x)||h(x,u)||k(x,u)||T()}function y(x){if(Array.isArray(x))return x}function h(x,u){var p=x==null?null:typeof Symbol<"u"&&x[Symbol.iterator]||x["@@iterator"];if(p!=null){var P=[],L=!0,ve=!1,Oe,$e;try{for(p=p.call(x);!(L=(Oe=p.next()).done)&&(P.push(Oe.value),!(u&&P.length===u));L=!0);}catch(An){ve=!0,$e=An}finally{try{!L&&p.return!=null&&p.return()}finally{if(ve)throw $e}}return P}}function k(x,u){if(x){if(typeof x=="string")return A(x,u);var p=Object.prototype.toString.call(x).slice(8,-1);if(p==="Object"&&x.constructor&&(p=x.constructor.name),p==="Map"||p==="Set")return Array.from(x);if(p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))return A(x,u)}}function A(x,u){(u==null||u>x.length)&&(u=x.length);for(var p=0,P=new Array(u);p<u;p++)P[p]=x[p];return P}function T(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
362
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var F={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},H={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},re={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},ge={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},ke=function(u){switch(u){case F.Mobile:return{isMobile:!0};case F.Tablet:return{isTablet:!0};case F.SmartTv:return{isSmartTV:!0};case F.Console:return{isConsole:!0};case F.Wearable:return{isWearable:!0};case F.Browser:return{isBrowser:!0};case F.Embedded:return{isEmbedded:!0};default:return ge}},xe=function(u){return _(u)},G=function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return u||p},we=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},Se=function(u){var p=we();return p&&p.platform&&(p.platform.indexOf(u)!==-1||p.platform==="MacIntel"&&p.maxTouchPoints>1&&!window.MSStream)},Ge=function(u,p,P,L,ve){return{isBrowser:u,browserMajorVersion:G(p.major),browserFullVersion:G(p.version),browserName:G(p.name),engineName:G(P.name),engineVersion:G(P.version),osName:G(L.name),osVersion:G(L.version),userAgent:G(ve)}},et=function(u,p,P,L){return C({},u,{vendor:G(p.vendor),model:G(p.model),os:G(P.name),osVersion:G(P.version),ua:G(L)})},He=function(u,p,P,L){return{isSmartTV:u,engineName:G(p.name),engineVersion:G(p.version),osName:G(P.name),osVersion:G(P.version),userAgent:G(L)}},De=function(u,p,P,L){return{isConsole:u,engineName:G(p.name),engineVersion:G(p.version),osName:G(P.name),osVersion:G(P.version),userAgent:G(L)}},ze=function(u,p,P,L){return{isWearable:u,engineName:G(p.name),engineVersion:G(p.version),osName:G(P.name),osVersion:G(P.version),userAgent:G(L)}},Me=function(u,p,P,L,ve){return{isEmbedded:u,vendor:G(p.vendor),model:G(p.model),engineName:G(P.name),engineVersion:G(P.version),osName:G(L.name),osVersion:G(L.version),userAgent:G(ve)}};function Ne(x){var u=x?b(x):E,p=u.device,P=u.browser,L=u.engine,ve=u.os,Oe=u.ua,$e=ke(p.type),An=$e.isBrowser,ol=$e.isMobile,sl=$e.isTablet,Us=$e.isSmartTV,Os=$e.isConsole,Ds=$e.isWearable,Ms=$e.isEmbedded;if(An)return Ge(An,P,L,ve,Oe);if(Us)return He(Us,L,ve,Oe);if(Os)return De(Os,L,ve,Oe);if(ol||sl)return et($e,p,ve,Oe);if(Ds)return ze(Ds,L,ve,Oe);if(Ms)return Me(Ms,p,L,ve,Oe)}var Te=function(u){var p=u.type;return p===F.Mobile},Ct=function(u){var p=u.type;return p===F.Tablet},Rt=function(u){var p=u.type;return p===F.Mobile||p===F.Tablet},M=function(u){var p=u.type;return p===F.SmartTv},te=function(u){var p=u.type;return p===F.Browser},R=function(u){var p=u.type;return p===F.Wearable},ne=function(u){var p=u.type;return p===F.Console},oe=function(u){var p=u.type;return p===F.Embedded},$=function(u){var p=u.vendor;return G(p)},W=function(u){var p=u.model;return G(p)},Z=function(u){var p=u.type;return G(p,"browser")},X=function(u){var p=u.name;return p===re.Android},U=function(u){var p=u.name;return p===re.Windows},Y=function(u){var p=u.name;return p===re.MAC_OS},fe=function(u){var p=u.name;return p===re.WindowsPhone},me=function(u){var p=u.name;return p===re.IOS},ie=function(u){var p=u.version;return G(p)},le=function(u){var p=u.name;return G(p)},O=function(u){var p=u.name;return p===H.Chrome},z=function(u){var p=u.name;return p===H.Firefox},Q=function(u){var p=u.name;return p===H.Chromium},ae=function(u){var p=u.name;return p===H.Edge},j=function(u){var p=u.name;return p===H.Yandex},V=function(u){var p=u.name;return p===H.Safari||p===H.MobileSafari},ce=function(u){var p=u.name;return p===H.MobileSafari},Ae=function(u){var p=u.name;return p===H.Opera},Ce=function(u){var p=u.name;return p===H.InternetExplorer||p===H.Ie},Pe=function(u){var p=u.name;return p===H.MIUI},Fe=function(u){var p=u.name;return p===H.SamsungBrowser},qe=function(u){var p=u.version;return G(p)},Ze=function(u){var p=u.major;return G(p)},st=function(u){var p=u.name;return G(p)},Bt=function(u){var p=u.name;return G(p)},It=function(u){var p=u.version;return G(p)},tn=function(){var u=we(),p=u&&u.userAgent&&u.userAgent.toLowerCase();return typeof p=="string"?/electron/.test(p):!1},ft=function(u){return typeof u=="string"&&u.indexOf("Edg/")!==-1},Ht=function(){var u=we();return u&&(/iPad|iPhone|iPod/.test(u.platform)||u.platform==="MacIntel"&&u.maxTouchPoints>1)&&!window.MSStream},Ee=function(){return Se("iPad")},wn=function(){return Se("iPhone")},yn=function(){return Se("iPod")},vs=function(u){return G(u)};function As(x){var u=x||E,p=u.device,P=u.browser,L=u.os,ve=u.engine,Oe=u.ua;return{isSmartTV:M(p),isConsole:ne(p),isWearable:R(p),isEmbedded:oe(p),isMobileSafari:ce(P)||Ee(),isChromium:Q(P),isMobile:Rt(p)||Ee(),isMobileOnly:Te(p),isTablet:Ct(p)||Ee(),isBrowser:te(p),isDesktop:te(p),isAndroid:X(L),isWinPhone:fe(L),isIOS:me(L)||Ee(),isChrome:O(P),isFirefox:z(P),isSafari:V(P),isOpera:Ae(P),isIE:Ce(P),osVersion:ie(L),osName:le(L),fullBrowserVersion:qe(P),browserVersion:Ze(P),browserName:st(P),mobileVendor:$(p),mobileModel:W(p),engineName:Bt(ve),engineVersion:It(ve),getUA:vs(Oe),isEdge:ae(P)||ft(Oe),isYandex:j(P),deviceType:Z(p),isIOS13:Ht(),isIPad13:Ee(),isIPhone13:wn(),isIPod13:yn(),isElectron:tn(),isEdgeChromium:ft(Oe),isLegacyEdge:ae(P)&&!ft(Oe),isWindows:U(L),isMacOs:Y(L),isMIUI:Pe(P),isSamsungBrowser:Fe(P)}}var ks=M(l),Ts=ne(l),xs=R(l),lc=oe(l),dc=ce(r)||Ee(),uc=Q(r),vn=Rt(l)||Ee(),Es=Te(l),Ss=Ct(l)||Ee(),Cs=te(l),fc=te(l),Bs=X(S),Is=fe(S),Ns=me(S)||Ee(),pc=O(r),mc=z(r),hc=V(r),gc=Ae(r),Ps=Ce(r),bc=ie(S),wc=le(S),yc=qe(r),vc=Ze(r),Ac=st(r),kc=$(l),Tc=W(l),xc=Bt(f),Ec=It(f),Sc=vs(N),Cc=ae(r)||ft(N),Bc=j(r),Ic=Z(l),Nc=Ht(),Pc=Ee(),Fc=wn(),Uc=yn(),Oc=tn(),Dc=ft(N),Mc=ae(r)&&!ft(N),_c=U(S),Lc=Y(S),Rc=Pe(r),Hc=Fe(r),Vc=function(u){if(!u||typeof u!="string"){console.error("No valid user agent string was provided");return}var p=b(u),P=p.device,L=p.browser,ve=p.os,Oe=p.engine,$e=p.ua;return As({device:P,browser:L,os:ve,engine:Oe,ua:$e})},Wc=function(u){var p=u.renderWithFragment,P=u.children,L=c(u,["renderWithFragment","children"]);return Bs?p?n.createElement(t.Fragment,null,P):n.createElement("div",L,P):null},Gc=function(u){var p=u.renderWithFragment,P=u.children,L=c(u,["renderWithFragment","children"]);return Cs?p?n.createElement(t.Fragment,null,P):n.createElement("div",L,P):null},$c=function(u){var p=u.renderWithFragment,P=u.children,L=c(u,["renderWithFragment","children"]);return Ps?p?n.createElement(t.Fragment,null,P):n.createElement("div",L,P):null},zc=function(u){var p=u.renderWithFragment,P=u.children,L=c(u,["renderWithFragment","children"]);return Ns?p?n.createElement(t.Fragment,null,P):n.createElement("div",L,P):null},qc=function(u){var p=u.renderWithFragment,P=u.children,L=c(u,["renderWithFragment","children"]);return vn?p?n.createElement(t.Fragment,null,P):n.createElement("div",L,P):null},Yc=function(u){var p=u.renderWithFragment,P=u.children,L=c(u,["renderWithFragment","children"]);return Ss?p?n.createElement(t.Fragment,null,P):n.createElement("div",L,P):null},jc=function(u){var p=u.renderWithFragment,P=u.children,L=c(u,["renderWithFragment","children"]);return Is?p?n.createElement(t.Fragment,null,P):n.createElement("div",L,P):null},Jc=function(u){var p=u.renderWithFragment,P=u.children;u.viewClassName,u.style;var L=c(u,["renderWithFragment","children","viewClassName","style"]);return Es?p?n.createElement(t.Fragment,null,P):n.createElement("div",L,P):null},Xc=function(u){var p=u.renderWithFragment,P=u.children,L=c(u,["renderWithFragment","children"]);return ks?p?n.createElement(t.Fragment,null,P):n.createElement("div",L,P):null},Kc=function(u){var p=u.renderWithFragment,P=u.children,L=c(u,["renderWithFragment","children"]);return Ts?p?n.createElement(t.Fragment,null,P):n.createElement("div",L,P):null},Zc=function(u){var p=u.renderWithFragment,P=u.children,L=c(u,["renderWithFragment","children"]);return xs?p?n.createElement(t.Fragment,null,P):n.createElement("div",L,P):null},Qc=function(u){var p=u.renderWithFragment,P=u.children;u.viewClassName,u.style;var L=u.condition,ve=c(u,["renderWithFragment","children","viewClassName","style","condition"]);return L?p?n.createElement(t.Fragment,null,P):n.createElement("div",ve,P):null};function el(x){return(function(u){ye(p,u);function p(P){var L;return J(this,p),L=m(this,Be(p).call(this,P)),L.isEventListenerAdded=!1,L.handleOrientationChange=L.handleOrientationChange.bind(g(L)),L.onOrientationChange=L.onOrientationChange.bind(g(L)),L.onPageLoad=L.onPageLoad.bind(g(L)),L.state={isLandscape:!1,isPortrait:!1},L}return q(p,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var L=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:L===0,isLandscape:L===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":D(window))!==void 0&&vn&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return n.createElement(x,he({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),p})(n.Component)}function tl(){var x=t.useState(function(){var ve=window.innerWidth>window.innerHeight?90:0;return{isPortrait:ve===0,isLandscape:ve===90,orientation:ve===0?"portrait":"landscape"}}),u=w(x,2),p=u[0],P=u[1],L=t.useCallback(function(){var ve=window.innerWidth>window.innerHeight?90:0,Oe={isPortrait:ve===0,isLandscape:ve===90,orientation:ve===0?"portrait":"landscape"};p.orientation!==Oe.orientation&&P(Oe)},[p.orientation]);return t.useEffect(function(){return(typeof window>"u"?"undefined":D(window))!==void 0&&vn&&(L(),window.addEventListener("load",L,!1),window.addEventListener("resize",L,!1)),function(){window.removeEventListener("resize",L,!1),window.removeEventListener("load",L,!1)}},[L]),p}function Fs(x){var u=x||window.navigator.userAgent;return b(u)}function nl(x){var u=x||window.navigator.userAgent,p=Fs(u),P=As(p);return[P,p]}return ee.AndroidView=Wc,ee.BrowserTypes=H,ee.BrowserView=Gc,ee.ConsoleView=Kc,ee.CustomView=Qc,ee.IEView=$c,ee.IOSView=zc,ee.MobileOnlyView=Jc,ee.MobileView=qc,ee.OsTypes=re,ee.SmartTVView=Xc,ee.TabletView=Yc,ee.WearableView=Zc,ee.WinPhoneView=jc,ee.browserName=Ac,ee.browserVersion=vc,ee.deviceDetect=Ne,ee.deviceType=Ic,ee.engineName=xc,ee.engineVersion=Ec,ee.fullBrowserVersion=yc,ee.getSelectorsByUserAgent=Vc,ee.getUA=Sc,ee.isAndroid=Bs,ee.isBrowser=Cs,ee.isChrome=pc,ee.isChromium=uc,ee.isConsole=Ts,ee.isDesktop=fc,ee.isEdge=Cc,ee.isEdgeChromium=Dc,ee.isElectron=Oc,ee.isEmbedded=lc,ee.isFirefox=mc,ee.isIE=Ps,ee.isIOS=Ns,ee.isIOS13=Nc,ee.isIPad13=Pc,ee.isIPhone13=Fc,ee.isIPod13=Uc,ee.isLegacyEdge=Mc,ee.isMIUI=Rc,ee.isMacOs=Lc,ee.isMobile=vn,ee.isMobileOnly=Es,ee.isMobileSafari=dc,ee.isOpera=gc,ee.isSafari=hc,ee.isSamsungBrowser=Hc,ee.isSmartTV=ks,ee.isTablet=Ss,ee.isWearable=xs,ee.isWinPhone=Is,ee.isWindows=_c,ee.isYandex=Bc,ee.mobileModel=Tc,ee.mobileVendor=kc,ee.osName=wc,ee.osVersion=bc,ee.parseUserAgent=b,ee.setUserAgent=xe,ee.useDeviceData=Fs,ee.useDeviceSelectors=nl,ee.useMobileOrientation=tl,ee.withOrientationChange=el,ee}var bn=rc();function io(e,t){if(!e)return e;const n=e.toLowerCase().trim();if(n==="max"||n==="all")return t||e;const o=n.match(/^(\d+(?:\.\d+)?)%$/);if(o){const s=parseFloat(o[1])/100;return((parseFloat(t)||0)*s).toFixed(8).replace(/\.?0+$/,"")||"0"}return e}const ac=({isOpen:e,onClose:t,onTransaction:n,position:o="bottom-right",modalChatStyle:s={}})=>{const{t:r,ti:a}=kn(),{messages:l,addMessage:f,updateMessageAction:S,updateMessageText:N}=Si(),[_,b]=se.useState(""),[E,v]=se.useState(!1),[C,D]=se.useState(!0),[J,I]=se.useState(null),q=se.useRef(null),K=se.useRef(null),he=se.useRef(null),ye=se.useRef(null),Be=se.useRef(null),i=se.useRef(!1),d=se.useRef(C);se.useEffect(()=>{d.current=C},[C]);const{account:c,chainData:g,chainType:m,chainTypeMoralis:w,chainId:y,isChainSupported:h}=Xn(),{config:k}=Ci(),A=y&&k?.rpcUrls?.[y]||void 0,T=se.useCallback(()=>{const M=Et.getItem("dataBuyToken");if(M)try{return JSON.parse(M)}catch{return{srcTokenAddress:"",descTokenAddress:"",amount:"",srcTokenDecimals:18,descTokenDecimals:18}}return{srcTokenAddress:"",descTokenAddress:"",amount:"",srcTokenDecimals:18,descTokenDecimals:18}},[]),F=se.useCallback(M=>{Et.setItem("dataBuyToken",JSON.stringify(M))},[]),H=se.useCallback(M=>{const R={...T(),...M};F(R)},[T,F]),re=se.useCallback(M=>{I(M),bn.isDesktop&&he.current?.focus()},[]),ge=se.useCallback(async(M,te)=>{H({descTokenAddress:M,descTokenDecimals:te||18});try{v(!0);const R=await ot({address:c?.address||"",chain:w});if(R?.success&&R?.data?.result){const ne=R.data.result;if(ne?.length>0){const oe=ne.map($=>({id:$.token_address,text:`${$.name}: ${$.balance_formatted} ${$.symbol} ($${ue($.usd_value||0)?.decimalPlaces(2).toFormat()||"0"})`,value:a("buttonBuyWith",{symbol:$.symbol}),action:"click_balance_item_user_to_buy_button",fullWidth:!0,extraData:{tokenAddress:$.token_address,symbol:$.symbol,balance:$.balance_formatted,usdValue:$.usd_value,decimals:$.decimals}}));f(a("walletBalanceSpendable",{chain:g?.name||"unknown"}),"bot",void 0,oe)}else f(a("walletNoTokensFound",{chain:g?.name||"unknown"}),"bot")}else f(r("walletFetchFailed"),"bot")}catch(R){console.error("Error fetching wallet balance:",R),f(r("walletFetchError"),"bot")}finally{v(!1)}},[H,c?.address,w,f,g?.name,r,a]),ke=se.useCallback(async(M,te,R,ne)=>{const oe=[25,50,75,100];H({srcTokenAddress:M,srcTokenDecimals:ne||18});let $=R||"0";if(M===Ye)try{const Z=await ao({chainId:y,rpcUrl:A});if(Z.isGreaterThan(0)){const X=Z.times(1e6),Y=new ue(dt(R,ne||18).toString()).minus(X);Y.isGreaterThan(0)?$=ue(Ue(BigInt(Y.toFixed(0)),18)).toFixed():$="0"}}catch(Z){console.warn("getGasPrice for swap native fee deduction failed:",Z)}const W=oe.map(Z=>({id:`percent-${Z}`,text:`${Z}%`,value:a("buttonUsePercent",{percent:String(Z),symbol:te}),action:"select_percent",extraData:{percent:Z,tokenAddress:M,tokenSymbol:te,tokenBalance:$}}));if(ue($).isZero()){f(a("insufficientFeeToken",{symbol:te}),"bot");return}f(a("selectAmountOf",{symbol:te,balance:$}),"bot",void 0,W)},[f,y,A,H,a]),xe=se.useCallback(async(M,te)=>{H({amount:(parseFloat(te)*(M/100)).toFixed(6)});const R=T(),ne=dt(R.amount,R.srcTokenDecimals||18).toString(),oe=await no({chainId:y,tokenIn:R.srcTokenAddress,tokenInAmount:ne,tokenOut:R.descTokenAddress,tokenOutRecipient:c?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(oe.success&&oe.data){const $=oe.data,W=$.tokenIn,Z=$.tokenOut,X=ue(Ue(BigInt(W.amount||0),W.decimals)).decimalPlaces(6).toFormat(),U=ue(Ue(BigInt(Z.amount||0),Z.decimals)).decimalPlaces(6).toFormat(),Y=R.srcTokenAddress===Ye||R.srcTokenAddress==="";let fe=!1;if(!Y&&c?.address&&$.tx?.to)try{const j=await ro({tokenAddress:R.srcTokenAddress,ownerAddress:c.address,spenderAddress:$.tx.to,chainId:y,rpcUrl:A});fe=ue(j.toString()).isLessThan(ne)}catch(j){console.warn("Allowance check failed:",j),fe=!0}const me=$.estimatedTransactionFee?.total?ue($.estimatedTransactionFee.total):ue(0);let ie=ue(0);if(fe&&c?.address)try{const j=hn({tokenAddress:R.srcTokenAddress,spenderAddress:$.tx?.to||"",fromAddress:c.address,chainId:y});ie=await Qt({from:c.address,to:j.to,data:j.data,chainId:y,rpcUrl:A})}catch(j){console.warn("Approve fee estimation failed:",j)}const le=me.plus(ie),O=g?.nativeCurrency?.symbol||"native";let z="",Q=!1;if(c?.address&&le.isGreaterThan(0))try{const j=await gn({address:c.address,chainId:y,rpcUrl:A});if(j.isLessThan(le)){Q=!0;const V=ue(Ue(BigInt(j.toFixed(0)),18)).decimalPlaces(6).toFormat(),ce=ue(Ue(BigInt(le.toFixed(0)),18)).decimalPlaces(6).toFormat();z=a("swapFeeWarning",{symbol:O,balance:V,needed:ce})}}catch(j){console.warn("Fee balance check failed:",j)}const ae=`From: ${X} ${W.symbol}
382
+ Response: {"action":"swap_token","message":"<friendly explanation>","parameters":{"token_in":"native","token_in_symbol":"${s}","token_in_decimals":"18","token_out":"<actual USDC address on current chain>","token_out_symbol":"USDC","token_out_decimals":"6","amount":"2"}}`}const ws={1:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",10:"0x4200000000000000000000000000000000000006",56:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",137:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",8453:"0x4200000000000000000000000000000000000006",42161:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"},gn=[{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"}]},{name:"allowance",type:"function",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]}],ys=[{name:"deposit",type:"function",stateMutability:"payable",inputs:[],outputs:[]},{name:"withdraw",type:"function",stateMutability:"nonpayable",inputs:[{name:"wad",type:"uint256"}],outputs:[]}],Yi=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],ji=[{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:[]}];function tn(e,t){return t||ft[e]?.rpcUrls?.default?.http?.[0]}function Ji(e){const{action:t,parameters:n,fromAddress:o,chainId:s}=e;switch(t){case"send_native":return Xi(n,o,s);case"send_token":return Ki(n,o,s);case"approve_token":return Zi(n,o,s);case"wrap_native":return Qi(n,o,s);case"unwrap_native":return ec(n,o,s);case"send_nft":return nc(n,o,s);default:throw new Error(`Action "${t}" does not produce a transaction`)}}function Xi(e,t,n){const{to_address:o,amount:s}=e;if(!o)throw new Error("Recipient address is required");if(!s)throw new Error("Amount is required");const a=pt(s,18).toString();return{from:t,to:o,data:"0x",value:a,chainId:n,description:`Send ${s} native token to ${o}`}}function Ki(e,t,n){const{contract_address:o,to_address:s,amount:a,decimals:r,token_symbol:l}=e;if(!o)throw new Error("Token contract address is required");if(!s)throw new Error("Recipient address is required");if(!a)throw new Error("Amount is required");const d=parseInt(r)||18,S=pt(a,d),N=vt({abi:gn,functionName:"transfer",args:[s,S]});return{from:t,to:o,data:N,value:"0",chainId:n,description:`Send ${a} ${l||"tokens"} to ${s}`}}function Zi(e,t,n){const{contract_address:o,spender_address:s,amount:a,token_symbol:r}=e;if(!o)throw new Error("Token contract address is required");if(!s)throw new Error("Spender address is required");const l=a&&a?.trim()!==""?pt(a,18):_t,d=vt({abi:gn,functionName:"approve",args:[s,l]});return{from:t,to:o,data:d,value:"0",chainId:n,description:`Approve ${a||"unlimited"} ${r||"tokens"} for ${s}`}}function Qi(e,t,n){const{amount:o}=e;if(!o)throw new Error("Amount is required");const s=ws[n];if(!s)throw new Error(`WETH not supported on chain ${n}`);const a=pt(o,18).toString(),r=vt({abi:ys,functionName:"deposit"});return{from:t,to:s,data:r,value:a,chainId:n,description:`Wrap ${o} native token`}}function ec(e,t,n){const{amount:o}=e;if(!o)throw new Error("Amount is required");const s=ws[n];if(!s)throw new Error(`WETH not supported on chain ${n}`);const a=pt(o,18),r=vt({abi:ys,functionName:"withdraw",args:[a]});return{from:t,to:s,data:r,value:"0",chainId:n,description:`Unwrap ${o} WETH`}}function tc(e){return["send_native","send_token","approve_token","wrap_native","unwrap_native","send_nft"].includes(e)}async function ro(e){const{transactionHash:t,chainId:n,pollingInterval:o=3e3,timeout:s=12e4,rpcUrl:a}=e,r=tn(n,a);if(!r)throw new Error(`No RPC endpoint for chain ${n}`);const l=Date.now();for(;Date.now()-l<s;){try{const S=await(await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getTransactionReceipt",params:[t]})})).json();if(S.result){const N=S.result;return{status:N.status==="0x1"?"success":"fail",blockNumber:N.blockNumber,gasUsed:N.gasUsed,effectiveGasPrice:N.effectiveGasPrice}}}catch(d){console.warn("eth_getTransactionReceipt poll error:",d)}await new Promise(d=>setTimeout(d,o))}throw new Error(`Transaction ${t} was not mined within ${s/1e3}s`)}async function io(e){const{tokenAddress:t,ownerAddress:n,spenderAddress:o,chainId:s,rpcUrl:a}=e,r=tn(s,a);if(!r)return console.warn(`No RPC endpoint for chain ${s}, assuming no allowance`),BigInt(0);try{const l=vt({abi:gn,functionName:"allowance",args:[n,o]}),S=await(await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_call",params:[{to:t,data:l},"latest"]})})).json();return S.result&&S.result!=="0x"?BigInt(S.result):BigInt(0)}catch(l){return console.warn("checkAllowance failed:",l),BigInt(0)}}function wn(e){const{tokenAddress:t,spenderAddress:n,fromAddress:o,chainId:s,tokenSymbol:a}=e,r=vt({abi:gn,functionName:"approve",args:[n,_t]});return{from:o,to:t,data:r,value:"0",chainId:s,description:`Approve ${a||"token"} for swap`}}function nc(e,t,n){const{contract_address:o,token_id:s,to_address:a,token_standard:r,amount:l,nft_name:d}=e;if(!o)throw new Error("NFT contract address is required");if(!s)throw new Error("Token ID is required");if(!a)throw new Error("Recipient address is required");const S=(r||"ERC721").toUpperCase(),N=BigInt(s);let _,g;if(S==="ERC1155"){const E=BigInt(l||"1");_=vt({abi:ji,functionName:"safeTransferFrom",args:[t,a,N,E,"0x"]}),g=`Send ${E>1n?E.toString()+"x ":""}${d||"NFT"} (ERC1155 #${s}) to ${a}`}else _=vt({abi:Yi,functionName:"safeTransferFrom",args:[t,a,N]}),g=`Send ${d||"NFT"} (ERC721 #${s}) to ${a}`;return{from:t,to:o,data:_,value:"0",chainId:n,description:g}}async function yn(e){const{address:t,chainId:n,rpcUrl:o}=e,s=tn(n,o);if(!s)return console.warn(`No RPC endpoint for chain ${n}`),new le(0);try{const r=await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getBalance",params:[t,"latest"]})})).json();return r.result&&r.result!=="0x"?new le(BigInt(r.result).toString()):new le(0)}catch(a){return console.warn("getNativeBalance failed:",a),new le(0)}}async function nn(e){const{from:t,to:n,data:o,value:s,chainId:a,rpcUrl:r}=e,l=tn(a,r);if(!l)return console.warn(`No RPC endpoint for chain ${a}`),new le(0);try{const[d,S]=await Promise.all([fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_estimateGas",params:[{from:t,to:n,data:o,...s&&s!=="0"?{value:s}:{}}]})}),fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:2,method:"eth_gasPrice",params:[]})})]),[N,_]=await Promise.all([d.json(),S.json()]),g=N.result?new le(BigInt(N.result).toString()):new le(0),E=_.result?new le(BigInt(_.result).toString()):new le(0);return g.times(E).times(1.1)}catch(d){return console.warn("estimateTransactionFee failed:",d),new le(0)}}async function co(e){const{chainId:t,rpcUrl:n}=e,o=tn(t,n);if(!o)return console.warn(`No RPC endpoint for chain ${t}`),new le(0);try{const a=await(await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_gasPrice",params:[]})})).json();return a.result&&a.result!=="0x"?new le(BigInt(a.result).toString()):new le(0)}catch(s){return console.warn("getGasPrice failed:",s),new le(0)}}var ae={},on={exports:{}},oc=on.exports,vs;function sc(){return vs||(vs=1,(function(e,t){(function(n,o){var s="1.0.41",a="",r="?",l="function",d="undefined",S="object",N="string",_="major",g="model",E="name",w="type",B="vendor",M="version",Q="architecture",I="console",j="mobile",ne="tablet",he="smarttv",ye="wearable",Be="embedded",c=500,u="Amazon",i="Apple",m="ASUS",h="BlackBerry",y="Browser",v="Chrome",b="Edge",k="Firefox",A="Google",T="Honor",F="Huawei",$="Lenovo",re="LG",be="Microsoft",Ae="Motorola",xe="Nvidia",G="OnePlus",we="Opera",Ee="OPPO",Ve="Samsung",st="Sharp",je="Sony",Pe="Xiaomi",ze="Zebra",_e="Facebook",Fe="Chromium OS",ke="Mac OS",Nt=" Browser",Wt=function(Z,J){var ee={};for(var fe in Z)J[fe]&&J[fe].length%2===0?ee[fe]=J[fe].concat(Z[fe]):ee[fe]=Z[fe];return ee},ht=function(Z){for(var J={},ee=0;ee<Z.length;ee++)J[Z[ee].toUpperCase()]=Z[ee];return J},D=function(Z,J){return typeof Z===N?K(J).indexOf(K(Z))!==-1:!1},K=function(Z){return Z.toLowerCase()},H=function(Z){return typeof Z===N?Z.replace(/[^\d\.]/g,a).split(".")[0]:o},te=function(Z,J){if(typeof Z===N)return Z=Z.replace(/^\s\s*/,a),typeof J===d?Z:Z.substring(0,c)},X=function(Z,J){for(var ee=0,fe,Y,oe,V,O,ce;ee<J.length&&!O;){var Se=J[ee],ue=J[ee+1];for(fe=Y=0;fe<Se.length&&!O&&Se[fe];)if(O=Se[fe++].exec(Z),O)for(oe=0;oe<ue.length;oe++)ce=O[++Y],V=ue[oe],typeof V===S&&V.length>0?V.length===2?typeof V[1]==l?this[V[0]]=V[1].call(this,ce):this[V[0]]=V[1]:V.length===3?typeof V[1]===l&&!(V[1].exec&&V[1].test)?this[V[0]]=ce?V[1].call(this,ce,V[2]):o:this[V[0]]=ce?ce.replace(V[1],V[2]):o:V.length===4&&(this[V[0]]=ce?V[3].call(this,ce.replace(V[1],V[2])):o):this[V]=ce||o;ee+=2}},W=function(Z,J){for(var ee in J)if(typeof J[ee]===S&&J[ee].length>0){for(var fe=0;fe<J[ee].length;fe++)if(D(J[ee][fe],Z))return ee===r?o:ee}else if(D(J[ee],Z))return ee===r?o:ee;return J.hasOwnProperty("*")?J["*"]:Z},z={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},ie={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},me={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[M,[E,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[M,[E,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[E,M],[/opios[\/ ]+([\w\.]+)/i],[M,[E,we+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[M,[E,we+" GX"]],[/\bopr\/([\w\.]+)/i],[M,[E,we]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[M,[E,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[M,[E,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[E,M],[/quark(?:pc)?\/([-\w\.]+)/i],[M,[E,"Quark"]],[/\bddg\/([\w\.]+)/i],[M,[E,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[M,[E,"UC"+y]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[M,[E,"WeChat"]],[/konqueror\/([\w\.]+)/i],[M,[E,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[M,[E,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[M,[E,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[M,[E,"Smart Lenovo "+y]],[/(avast|avg)\/([\w\.]+)/i],[[E,/(.+)/,"$1 Secure "+y],M],[/\bfocus\/([\w\.]+)/i],[M,[E,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[M,[E,we+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[M,[E,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[M,[E,"Dolphin"]],[/coast\/([\w\.]+)/i],[M,[E,we+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[M,[E,"MIUI"+Nt]],[/fxios\/([\w\.-]+)/i],[M,[E,k]],[/\bqihoobrowser\/?([\w\.]*)/i],[M,[E,"360"]],[/\b(qq)\/([\w\.]+)/i],[[E,/(.+)/,"$1Browser"],M],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[E,/(.+)/,"$1"+Nt],M],[/samsungbrowser\/([\w\.]+)/i],[M,[E,Ve+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[M,[E,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[E,"Sogou Mobile"],M],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[E,M],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[E],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[M,E],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[E,_e],M],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[E,M],[/\bgsa\/([\w\.]+) .*safari\//i],[M,[E,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[M,[E,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[M,[E,v+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[E,v+" WebView"],M],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[M,[E,"Android "+y]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[E,M],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[M,[E,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[M,E],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[E,[M,W,z]],[/(webkit|khtml)\/([\w\.]+)/i],[E,M],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[E,"Netscape"],M],[/(wolvic|librewolf)\/([\w\.]+)/i],[E,M],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[M,[E,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[E,[M,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[E,[M,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Q,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Q,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Q,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Q,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Q,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Q,/ower/,a,K]],[/ sun4\w[;\)]/i],[[Q,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Q,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[B,Ve],[w,ne]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[g,[B,Ve],[w,j]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[B,i],[w,j]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[B,i],[w,ne]],[/(macintosh);/i],[g,[B,i]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[B,st],[w,j]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[g,[B,T],[w,ne]],[/honor([-\w ]+)[;\)]/i],[g,[B,T],[w,j]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[g,[B,F],[w,ne]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[B,F],[w,j]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[g,/_/g," "],[B,Pe],[w,ne]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[g,/_/g," "],[B,Pe],[w,j]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[B,Ee],[w,j]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[g,[B,W,{OnePlus:["304","403","203"],"*":Ee}],[w,ne]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[B,"Vivo"],[w,j]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[g,[B,"Realme"],[w,j]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[g,[B,Ae],[w,j]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[B,Ae],[w,ne]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[B,re],[w,ne]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[B,re],[w,j]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[g,[B,$],[w,ne]],[/(nokia) (t[12][01])/i],[B,g,[w,ne]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[g,/_/g," "],[w,j],[B,"Nokia"]],[/(pixel (c|tablet))\b/i],[g,[B,A],[w,ne]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[B,A],[w,j]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[B,je],[w,j]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[B,je],[w,ne]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[B,G],[w,j]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[B,u],[w,ne]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[B,u],[w,j]],[/(playbook);[-\w\),; ]+(rim)/i],[g,B,[w,ne]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[B,h],[w,j]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[B,m],[w,ne]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[B,m],[w,j]],[/(nexus 9)/i],[g,[B,"HTC"],[w,ne]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[B,[g,/_/g," "],[w,j]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[g,[B,"TCL"],[w,ne]],[/(itel) ((\w+))/i],[[B,K],g,[w,W,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[B,"Acer"],[w,ne]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[B,"Meizu"],[w,j]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[g,[B,"Ulefone"],[w,j]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[g,[B,"Energizer"],[w,j]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[g,[B,"Cat"],[w,j]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[g,[B,"Smartfren"],[w,j]],[/droid.+; (a(?:015|06[35]|142p?))/i],[g,[B,"Nothing"],[w,j]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[g,[B,"Archos"],[w,ne]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[g,[B,"Archos"],[w,j]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[B,g,[w,ne]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[B,g,[w,j]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[B,g,[w,ne]],[/(surface duo)/i],[g,[B,be],[w,ne]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[B,"Fairphone"],[w,j]],[/(u304aa)/i],[g,[B,"AT&T"],[w,j]],[/\bsie-(\w*)/i],[g,[B,"Siemens"],[w,j]],[/\b(rct\w+) b/i],[g,[B,"RCA"],[w,ne]],[/\b(venue[\d ]{2,7}) b/i],[g,[B,"Dell"],[w,ne]],[/\b(q(?:mv|ta)\w+) b/i],[g,[B,"Verizon"],[w,ne]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[g,[B,"Barnes & Noble"],[w,ne]],[/\b(tm\d{3}\w+) b/i],[g,[B,"NuVision"],[w,ne]],[/\b(k88) b/i],[g,[B,"ZTE"],[w,ne]],[/\b(nx\d{3}j) b/i],[g,[B,"ZTE"],[w,j]],[/\b(gen\d{3}) b.+49h/i],[g,[B,"Swiss"],[w,j]],[/\b(zur\d{3}) b/i],[g,[B,"Swiss"],[w,ne]],[/\b((zeki)?tb.*\b) b/i],[g,[B,"Zeki"],[w,ne]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[B,"Dragon Touch"],g,[w,ne]],[/\b(ns-?\w{0,9}) b/i],[g,[B,"Insignia"],[w,ne]],[/\b((nxa|next)-?\w{0,9}) b/i],[g,[B,"NextBook"],[w,ne]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[B,"Voice"],g,[w,j]],[/\b(lvtel\-)?(v1[12]) b/i],[[B,"LvTel"],g,[w,j]],[/\b(ph-1) /i],[g,[B,"Essential"],[w,j]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[g,[B,"Envizen"],[w,ne]],[/\b(trio[-\w\. ]+) b/i],[g,[B,"MachSpeed"],[w,ne]],[/\btu_(1491) b/i],[g,[B,"Rotor"],[w,ne]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[g,[B,xe],[w,ne]],[/(sprint) (\w+)/i],[B,g,[w,j]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[B,be],[w,j]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[B,ze],[w,ne]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[B,ze],[w,j]],[/smart-tv.+(samsung)/i],[B,[w,he]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[B,Ve],[w,he]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[B,re],[w,he]],[/(apple) ?tv/i],[B,[g,i+" TV"],[w,he]],[/crkey/i],[[g,v+"cast"],[B,A],[w,he]],[/droid.+aft(\w+)( bui|\))/i],[g,[B,u],[w,he]],[/(shield \w+ tv)/i],[g,[B,xe],[w,he]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[B,st],[w,he]],[/(bravia[\w ]+)( bui|\))/i],[g,[B,je],[w,he]],[/(mi(tv|box)-?\w+) bui/i],[g,[B,Pe],[w,he]],[/Hbbtv.*(technisat) (.*);/i],[B,g,[w,he]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[B,te],[g,te],[w,he]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[g,[w,he]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[w,he]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[B,g,[w,I]],[/droid.+; (shield)( bui|\))/i],[g,[B,xe],[w,I]],[/(playstation \w+)/i],[g,[B,je],[w,I]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[B,be],[w,I]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[g,[B,Ve],[w,ye]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[B,g,[w,ye]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[g,[B,Ee],[w,ye]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[B,i],[w,ye]],[/(opwwe\d{3})/i],[g,[B,G],[w,ye]],[/(moto 360)/i],[g,[B,Ae],[w,ye]],[/(smartwatch 3)/i],[g,[B,je],[w,ye]],[/(g watch r)/i],[g,[B,re],[w,ye]],[/droid.+; (wt63?0{2,3})\)/i],[g,[B,ze],[w,ye]],[/droid.+; (glass) \d/i],[g,[B,A],[w,ye]],[/(pico) (4|neo3(?: link|pro)?)/i],[B,g,[w,ye]],[/; (quest( \d| pro)?)/i],[g,[B,_e],[w,ye]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[B,[w,Be]],[/(aeobc)\b/i],[g,[B,u],[w,Be]],[/(homepod).+mac os/i],[g,[B,i],[w,Be]],[/windows iot/i],[[w,Be]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[g,[w,j]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[g,[w,ne]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[w,ne]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[w,j]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[g,[B,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[M,[E,b+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[E,M],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[M,[E,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[E,M],[/ladybird\//i],[[E,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[M,E]],os:[[/microsoft (windows) (vista|xp)/i],[E,M],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[E,[M,W,ie]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[M,W,ie],[E,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[M,/_/g,"."],[E,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[E,ke],[M,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[M,E],[/(ubuntu) ([\w\.]+) like android/i],[[E,/(.+)/,"$1 Touch"],M],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[E,M],[/\(bb(10);/i],[M,[E,h]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[M,[E,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[M,[E,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[M,[E,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[M,[E,"watchOS"]],[/crkey\/([\d\.]+)/i],[M,[E,v+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[E,Fe],M],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[E,M],[/(sunos) ?([\w\.\d]*)/i],[[E,"Solaris"],M],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[E,M]]},L=function(Z,J){if(typeof Z===S&&(J=Z,Z=o),!(this instanceof L))return new L(Z,J).getResult();var ee=typeof n!==d&&n.navigator?n.navigator:o,fe=Z||(ee&&ee.userAgent?ee.userAgent:a),Y=ee&&ee.userAgentData?ee.userAgentData:o,oe=J?Wt(me,J):me,V=ee&&ee.userAgent==fe;return this.getBrowser=function(){var O={};return O[E]=o,O[M]=o,X.call(O,fe,oe.browser),O[_]=H(O[M]),V&&ee&&ee.brave&&typeof ee.brave.isBrave==l&&(O[E]="Brave"),O},this.getCPU=function(){var O={};return O[Q]=o,X.call(O,fe,oe.cpu),O},this.getDevice=function(){var O={};return O[B]=o,O[g]=o,O[w]=o,X.call(O,fe,oe.device),V&&!O[w]&&Y&&Y.mobile&&(O[w]=j),V&&O[g]=="Macintosh"&&ee&&typeof ee.standalone!==d&&ee.maxTouchPoints&&ee.maxTouchPoints>2&&(O[g]="iPad",O[w]=ne),O},this.getEngine=function(){var O={};return O[E]=o,O[M]=o,X.call(O,fe,oe.engine),O},this.getOS=function(){var O={};return O[E]=o,O[M]=o,X.call(O,fe,oe.os),V&&!O[E]&&Y&&Y.platform&&Y.platform!="Unknown"&&(O[E]=Y.platform.replace(/chrome os/i,Fe).replace(/macos/i,ke)),O},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return fe},this.setUA=function(O){return fe=typeof O===N&&O.length>c?te(O,c):O,this},this.setUA(fe),this};L.VERSION=s,L.BROWSER=ht([E,M,_]),L.CPU=ht([Q]),L.DEVICE=ht([g,B,w,I,j,he,ne,ye,Be]),L.ENGINE=L.OS=ht([E,M]),e.exports&&(t=e.exports=L),t.UAParser=L;var U=typeof n!==d&&(n.jQuery||n.Zepto);if(U&&!U.ua){var q=new L;U.ua=q.getResult(),U.ua.get=function(){return q.getUA()},U.ua.set=function(Z){q.setUA(Z);var J=q.getResult();for(var ee in J)U.ua[ee]=J[ee]}}})(typeof window=="object"?window:oc)})(on,on.exports)),on.exports}var As;function ac(){if(As)return ae;As=1,Object.defineProperty(ae,"__esModule",{value:!0});function e(x){return x&&typeof x=="object"&&"default"in x?x.default:x}var t=se,n=e(t),o=sc(),s=new o,a=s.getBrowser(),r=s.getCPU(),l=s.getDevice(),d=s.getEngine(),S=s.getOS(),N=s.getUA(),_=function(f){return s.setUA(f)},g=function(f){if(!f){console.error("No userAgent string was provided");return}var p=new o(f);return{UA:p,browser:p.getBrowser(),cpu:p.getCPU(),device:p.getDevice(),engine:p.getEngine(),os:p.getOS(),ua:p.getUA(),setUserAgent:function(R){return p.setUA(R)}}},E=Object.freeze({ClientUAInstance:s,browser:a,cpu:r,device:l,engine:d,os:S,ua:N,setUa:_,parseUserAgent:g});function w(x,f){var p=Object.keys(x);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(x);f&&(P=P.filter(function(R){return Object.getOwnPropertyDescriptor(x,R).enumerable})),p.push.apply(p,P)}return p}function B(x){for(var f=1;f<arguments.length;f++){var p=arguments[f]!=null?arguments[f]:{};f%2?w(Object(p),!0).forEach(function(P){ne(x,P,p[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(p)):w(Object(p)).forEach(function(P){Object.defineProperty(x,P,Object.getOwnPropertyDescriptor(p,P))})}return x}function M(x){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(f){return typeof f}:M=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},M(x)}function Q(x,f){if(!(x instanceof f))throw new TypeError("Cannot call a class as a function")}function I(x,f){for(var p=0;p<f.length;p++){var P=f[p];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(x,P.key,P)}}function j(x,f,p){return f&&I(x.prototype,f),x}function ne(x,f,p){return f in x?Object.defineProperty(x,f,{value:p,enumerable:!0,configurable:!0,writable:!0}):x[f]=p,x}function he(){return he=Object.assign||function(x){for(var f=1;f<arguments.length;f++){var p=arguments[f];for(var P in p)Object.prototype.hasOwnProperty.call(p,P)&&(x[P]=p[P])}return x},he.apply(this,arguments)}function ye(x,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(f&&f.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),f&&c(x,f)}function Be(x){return Be=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},Be(x)}function c(x,f){return c=Object.setPrototypeOf||function(P,R){return P.__proto__=R,P},c(x,f)}function u(x,f){if(x==null)return{};var p={},P=Object.keys(x),R,ve;for(ve=0;ve<P.length;ve++)R=P[ve],!(f.indexOf(R)>=0)&&(p[R]=x[R]);return p}function i(x,f){if(x==null)return{};var p=u(x,f),P,R;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(x);for(R=0;R<ve.length;R++)P=ve[R],!(f.indexOf(P)>=0)&&Object.prototype.propertyIsEnumerable.call(x,P)&&(p[P]=x[P])}return p}function m(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function h(x,f){if(f&&(typeof f=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m(x)}function y(x,f){return v(x)||b(x,f)||k(x,f)||T()}function v(x){if(Array.isArray(x))return x}function b(x,f){var p=x==null?null:typeof Symbol<"u"&&x[Symbol.iterator]||x["@@iterator"];if(p!=null){var P=[],R=!0,ve=!1,Me,qe;try{for(p=p.call(x);!(R=(Me=p.next()).done)&&(P.push(Me.value),!(f&&P.length===f));R=!0);}catch(Tn){ve=!0,qe=Tn}finally{try{!R&&p.return!=null&&p.return()}finally{if(ve)throw qe}}return P}}function k(x,f){if(x){if(typeof x=="string")return A(x,f);var p=Object.prototype.toString.call(x).slice(8,-1);if(p==="Object"&&x.constructor&&(p=x.constructor.name),p==="Map"||p==="Set")return Array.from(x);if(p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))return A(x,f)}}function A(x,f){(f==null||f>x.length)&&(f=x.length);for(var p=0,P=new Array(f);p<f;p++)P[p]=x[p];return P}function T(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
383
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var F={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},$={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},re={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},be={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},Ae=function(f){switch(f){case F.Mobile:return{isMobile:!0};case F.Tablet:return{isTablet:!0};case F.SmartTv:return{isSmartTV:!0};case F.Console:return{isConsole:!0};case F.Wearable:return{isWearable:!0};case F.Browser:return{isBrowser:!0};case F.Embedded:return{isEmbedded:!0};default:return be}},xe=function(f){return _(f)},G=function(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return f||p},we=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},Ee=function(f){var p=we();return p&&p.platform&&(p.platform.indexOf(f)!==-1||p.platform==="MacIntel"&&p.maxTouchPoints>1&&!window.MSStream)},Ve=function(f,p,P,R,ve){return{isBrowser:f,browserMajorVersion:G(p.major),browserFullVersion:G(p.version),browserName:G(p.name),engineName:G(P.name),engineVersion:G(P.version),osName:G(R.name),osVersion:G(R.version),userAgent:G(ve)}},st=function(f,p,P,R){return B({},f,{vendor:G(p.vendor),model:G(p.model),os:G(P.name),osVersion:G(P.version),ua:G(R)})},je=function(f,p,P,R){return{isSmartTV:f,engineName:G(p.name),engineVersion:G(p.version),osName:G(P.name),osVersion:G(P.version),userAgent:G(R)}},Pe=function(f,p,P,R){return{isConsole:f,engineName:G(p.name),engineVersion:G(p.version),osName:G(P.name),osVersion:G(P.version),userAgent:G(R)}},ze=function(f,p,P,R){return{isWearable:f,engineName:G(p.name),engineVersion:G(p.version),osName:G(P.name),osVersion:G(P.version),userAgent:G(R)}},_e=function(f,p,P,R,ve){return{isEmbedded:f,vendor:G(p.vendor),model:G(p.model),engineName:G(P.name),engineVersion:G(P.version),osName:G(R.name),osVersion:G(R.version),userAgent:G(ve)}};function Fe(x){var f=x?g(x):E,p=f.device,P=f.browser,R=f.engine,ve=f.os,Me=f.ua,qe=Ae(p.type),Tn=qe.isBrowser,ol=qe.isMobile,sl=qe.isTablet,Us=qe.isSmartTV,Os=qe.isConsole,Ds=qe.isWearable,Ms=qe.isEmbedded;if(Tn)return Ve(Tn,P,R,ve,Me);if(Us)return je(Us,R,ve,Me);if(Os)return Pe(Os,R,ve,Me);if(ol||sl)return st(qe,p,ve,Me);if(Ds)return ze(Ds,R,ve,Me);if(Ms)return _e(Ms,p,R,ve,Me)}var ke=function(f){var p=f.type;return p===F.Mobile},Nt=function(f){var p=f.type;return p===F.Tablet},Wt=function(f){var p=f.type;return p===F.Mobile||p===F.Tablet},ht=function(f){var p=f.type;return p===F.SmartTv},D=function(f){var p=f.type;return p===F.Browser},K=function(f){var p=f.type;return p===F.Wearable},H=function(f){var p=f.type;return p===F.Console},te=function(f){var p=f.type;return p===F.Embedded},X=function(f){var p=f.vendor;return G(p)},W=function(f){var p=f.model;return G(p)},z=function(f){var p=f.type;return G(p,"browser")},ie=function(f){var p=f.name;return p===re.Android},me=function(f){var p=f.name;return p===re.Windows},L=function(f){var p=f.name;return p===re.MAC_OS},U=function(f){var p=f.name;return p===re.WindowsPhone},q=function(f){var p=f.name;return p===re.IOS},Z=function(f){var p=f.version;return G(p)},J=function(f){var p=f.name;return G(p)},ee=function(f){var p=f.name;return p===$.Chrome},fe=function(f){var p=f.name;return p===$.Firefox},Y=function(f){var p=f.name;return p===$.Chromium},oe=function(f){var p=f.name;return p===$.Edge},V=function(f){var p=f.name;return p===$.Yandex},O=function(f){var p=f.name;return p===$.Safari||p===$.MobileSafari},ce=function(f){var p=f.name;return p===$.MobileSafari},Se=function(f){var p=f.name;return p===$.Opera},ue=function(f){var p=f.name;return p===$.InternetExplorer||p===$.Ie},Te=function(f){var p=f.name;return p===$.MIUI},Ce=function(f){var p=f.name;return p===$.SamsungBrowser},Ne=function(f){var p=f.version;return G(p)},Ue=function(f){var p=f.major;return G(p)},Je=function(f){var p=f.name;return G(p)},tt=function(f){var p=f.name;return G(p)},ct=function(f){var p=f.version;return G(p)},Pt=function(){var f=we(),p=f&&f.userAgent&&f.userAgent.toLowerCase();return typeof p=="string"?/electron/.test(p):!1},at=function(f){return typeof f=="string"&&f.indexOf("Edg/")!==-1},sn=function(){var f=we();return f&&(/iPad|iPhone|iPod/.test(f.platform)||f.platform==="MacIntel"&&f.maxTouchPoints>1)&&!window.MSStream},Xe=function(){return Ee("iPad")},$t=function(){return Ee("iPhone")},De=function(){return Ee("iPod")},vn=function(f){return G(f)};function An(x){var f=x||E,p=f.device,P=f.browser,R=f.os,ve=f.engine,Me=f.ua;return{isSmartTV:ht(p),isConsole:H(p),isWearable:K(p),isEmbedded:te(p),isMobileSafari:ce(P)||Xe(),isChromium:Y(P),isMobile:Wt(p)||Xe(),isMobileOnly:ke(p),isTablet:Nt(p)||Xe(),isBrowser:D(p),isDesktop:D(p),isAndroid:ie(R),isWinPhone:U(R),isIOS:q(R)||Xe(),isChrome:ee(P),isFirefox:fe(P),isSafari:O(P),isOpera:Se(P),isIE:ue(P),osVersion:Z(R),osName:J(R),fullBrowserVersion:Ne(P),browserVersion:Ue(P),browserName:Je(P),mobileVendor:X(p),mobileModel:W(p),engineName:tt(ve),engineVersion:ct(ve),getUA:vn(Me),isEdge:oe(P)||at(Me),isYandex:V(P),deviceType:z(p),isIOS13:sn(),isIPad13:Xe(),isIPhone13:$t(),isIPod13:De(),isElectron:Pt(),isEdgeChromium:at(Me),isLegacyEdge:oe(P)&&!at(Me),isWindows:me(R),isMacOs:L(R),isMIUI:Te(P),isSamsungBrowser:Ce(P)}}var ks=ht(l),Ts=H(l),xs=K(l),lc=te(l),dc=ce(a)||Xe(),uc=Y(a),kn=Wt(l)||Xe(),Es=ke(l),Ss=Nt(l)||Xe(),Bs=D(l),fc=D(l),Cs=ie(S),Is=U(S),Ns=q(S)||Xe(),pc=ee(a),mc=fe(a),hc=O(a),bc=Se(a),Ps=ue(a),gc=Z(S),wc=J(S),yc=Ne(a),vc=Ue(a),Ac=Je(a),kc=X(l),Tc=W(l),xc=tt(d),Ec=ct(d),Sc=vn(N),Bc=oe(a)||at(N),Cc=V(a),Ic=z(l),Nc=sn(),Pc=Xe(),Fc=$t(),Uc=De(),Oc=Pt(),Dc=at(N),Mc=oe(a)&&!at(N),_c=me(S),Lc=L(S),Rc=Te(a),Hc=Ce(a),Vc=function(f){if(!f||typeof f!="string"){console.error("No valid user agent string was provided");return}var p=g(f),P=p.device,R=p.browser,ve=p.os,Me=p.engine,qe=p.ua;return An({device:P,browser:R,os:ve,engine:Me,ua:qe})},Wc=function(f){var p=f.renderWithFragment,P=f.children,R=i(f,["renderWithFragment","children"]);return Cs?p?n.createElement(t.Fragment,null,P):n.createElement("div",R,P):null},$c=function(f){var p=f.renderWithFragment,P=f.children,R=i(f,["renderWithFragment","children"]);return Bs?p?n.createElement(t.Fragment,null,P):n.createElement("div",R,P):null},Gc=function(f){var p=f.renderWithFragment,P=f.children,R=i(f,["renderWithFragment","children"]);return Ps?p?n.createElement(t.Fragment,null,P):n.createElement("div",R,P):null},zc=function(f){var p=f.renderWithFragment,P=f.children,R=i(f,["renderWithFragment","children"]);return Ns?p?n.createElement(t.Fragment,null,P):n.createElement("div",R,P):null},qc=function(f){var p=f.renderWithFragment,P=f.children,R=i(f,["renderWithFragment","children"]);return kn?p?n.createElement(t.Fragment,null,P):n.createElement("div",R,P):null},Yc=function(f){var p=f.renderWithFragment,P=f.children,R=i(f,["renderWithFragment","children"]);return Ss?p?n.createElement(t.Fragment,null,P):n.createElement("div",R,P):null},jc=function(f){var p=f.renderWithFragment,P=f.children,R=i(f,["renderWithFragment","children"]);return Is?p?n.createElement(t.Fragment,null,P):n.createElement("div",R,P):null},Jc=function(f){var p=f.renderWithFragment,P=f.children;f.viewClassName,f.style;var R=i(f,["renderWithFragment","children","viewClassName","style"]);return Es?p?n.createElement(t.Fragment,null,P):n.createElement("div",R,P):null},Xc=function(f){var p=f.renderWithFragment,P=f.children,R=i(f,["renderWithFragment","children"]);return ks?p?n.createElement(t.Fragment,null,P):n.createElement("div",R,P):null},Kc=function(f){var p=f.renderWithFragment,P=f.children,R=i(f,["renderWithFragment","children"]);return Ts?p?n.createElement(t.Fragment,null,P):n.createElement("div",R,P):null},Zc=function(f){var p=f.renderWithFragment,P=f.children,R=i(f,["renderWithFragment","children"]);return xs?p?n.createElement(t.Fragment,null,P):n.createElement("div",R,P):null},Qc=function(f){var p=f.renderWithFragment,P=f.children;f.viewClassName,f.style;var R=f.condition,ve=i(f,["renderWithFragment","children","viewClassName","style","condition"]);return R?p?n.createElement(t.Fragment,null,P):n.createElement("div",ve,P):null};function el(x){return(function(f){ye(p,f);function p(P){var R;return Q(this,p),R=h(this,Be(p).call(this,P)),R.isEventListenerAdded=!1,R.handleOrientationChange=R.handleOrientationChange.bind(m(R)),R.onOrientationChange=R.onOrientationChange.bind(m(R)),R.onPageLoad=R.onPageLoad.bind(m(R)),R.state={isLandscape:!1,isPortrait:!1},R}return j(p,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var R=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:R===0,isLandscape:R===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":M(window))!==void 0&&kn&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return n.createElement(x,he({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),p})(n.Component)}function tl(){var x=t.useState(function(){var ve=window.innerWidth>window.innerHeight?90:0;return{isPortrait:ve===0,isLandscape:ve===90,orientation:ve===0?"portrait":"landscape"}}),f=y(x,2),p=f[0],P=f[1],R=t.useCallback(function(){var ve=window.innerWidth>window.innerHeight?90:0,Me={isPortrait:ve===0,isLandscape:ve===90,orientation:ve===0?"portrait":"landscape"};p.orientation!==Me.orientation&&P(Me)},[p.orientation]);return t.useEffect(function(){return(typeof window>"u"?"undefined":M(window))!==void 0&&kn&&(R(),window.addEventListener("load",R,!1),window.addEventListener("resize",R,!1)),function(){window.removeEventListener("resize",R,!1),window.removeEventListener("load",R,!1)}},[R]),p}function Fs(x){var f=x||window.navigator.userAgent;return g(f)}function nl(x){var f=x||window.navigator.userAgent,p=Fs(f),P=An(p);return[P,p]}return ae.AndroidView=Wc,ae.BrowserTypes=$,ae.BrowserView=$c,ae.ConsoleView=Kc,ae.CustomView=Qc,ae.IEView=Gc,ae.IOSView=zc,ae.MobileOnlyView=Jc,ae.MobileView=qc,ae.OsTypes=re,ae.SmartTVView=Xc,ae.TabletView=Yc,ae.WearableView=Zc,ae.WinPhoneView=jc,ae.browserName=Ac,ae.browserVersion=vc,ae.deviceDetect=Fe,ae.deviceType=Ic,ae.engineName=xc,ae.engineVersion=Ec,ae.fullBrowserVersion=yc,ae.getSelectorsByUserAgent=Vc,ae.getUA=Sc,ae.isAndroid=Cs,ae.isBrowser=Bs,ae.isChrome=pc,ae.isChromium=uc,ae.isConsole=Ts,ae.isDesktop=fc,ae.isEdge=Bc,ae.isEdgeChromium=Dc,ae.isElectron=Oc,ae.isEmbedded=lc,ae.isFirefox=mc,ae.isIE=Ps,ae.isIOS=Ns,ae.isIOS13=Nc,ae.isIPad13=Pc,ae.isIPhone13=Fc,ae.isIPod13=Uc,ae.isLegacyEdge=Mc,ae.isMIUI=Rc,ae.isMacOs=Lc,ae.isMobile=kn,ae.isMobileOnly=Es,ae.isMobileSafari=dc,ae.isOpera=bc,ae.isSafari=hc,ae.isSamsungBrowser=Hc,ae.isSmartTV=ks,ae.isTablet=Ss,ae.isWearable=xs,ae.isWinPhone=Is,ae.isWindows=_c,ae.isYandex=Cc,ae.mobileModel=Tc,ae.mobileVendor=kc,ae.osName=wc,ae.osVersion=gc,ae.parseUserAgent=g,ae.setUserAgent=xe,ae.useDeviceData=Fs,ae.useDeviceSelectors=nl,ae.useMobileOrientation=tl,ae.withOrientationChange=el,ae}var Vt=ac();function lo(e,t){if(!e)return e;const n=e.toLowerCase().trim();if(n==="max"||n==="all")return t||e;const o=n.match(/^(\d+(?:\.\d+)?)%$/);if(o){const s=parseFloat(o[1])/100;return((parseFloat(t)||0)*s).toFixed(8).replace(/\.?0+$/,"")||"0"}return e}const rc=({isOpen:e,onClose:t,onTransaction:n,position:o="bottom-right",modalChatStyle:s={}})=>{const{t:a,ti:r}=xn(),{messages:l,addMessage:d,updateMessageAction:S,updateMessageText:N}=Si(),[_,g]=se.useState(""),[E,w]=se.useState(!1),[B,M]=se.useState(!0),[Q,I]=se.useState(null),j=se.useRef(null),ne=se.useRef(null),he=se.useRef(null),ye=se.useRef(null),Be=se.useRef(null),c=se.useRef(!1),u=se.useRef(B);se.useEffect(()=>{u.current=B},[B]);const{account:i,chainData:m,chainType:h,chainTypeMoralis:y,chainId:v,isChainSupported:b}=Zn(),{config:k}=Bi(),A=v&&k?.rpcUrls?.[v]||void 0,T=se.useCallback(()=>{const D=Ct.getItem("dataBuyToken");if(D)try{return JSON.parse(D)}catch{return{srcTokenAddress:"",descTokenAddress:"",amount:"",srcTokenDecimals:18,descTokenDecimals:18}}return{srcTokenAddress:"",descTokenAddress:"",amount:"",srcTokenDecimals:18,descTokenDecimals:18}},[]),F=se.useCallback(D=>{Ct.setItem("dataBuyToken",JSON.stringify(D))},[]),$=se.useCallback(D=>{const H={...T(),...D};F(H)},[T,F]),re=se.useCallback(D=>{I(D),Vt.isDesktop&&he.current?.focus()},[]),be=se.useCallback(async(D,K)=>{$({descTokenAddress:D,descTokenDecimals:K||18});try{w(!0);const H=await Ye({address:i?.address||"",chain:y});if(H?.success&&H?.data?.result){const te=H.data.result;if(te?.length>0){const X=te.map(W=>({id:W.token_address,text:`${W.name}: ${W.balance_formatted} ${W.symbol} ($${le(W.usd_value||0)?.decimalPlaces(2).toFormat()||"0"})`,value:r("buttonBuyWith",{symbol:W.symbol}),action:"click_balance_item_user_to_buy_button",fullWidth:!0,extraData:{tokenAddress:W.token_address,symbol:W.symbol,balance:W.balance_formatted,usdValue:W.usd_value,decimals:W.decimals}}));d(r("walletBalanceSpendable",{chain:m?.name||"unknown"}),"bot",void 0,X)}else d(r("walletNoTokensFound",{chain:m?.name||"unknown"}),"bot")}else d(a("walletFetchFailed"),"bot")}catch(H){console.error("Error fetching wallet balance:",H),d(a("walletFetchError"),"bot")}finally{w(!1)}},[$,i?.address,y,d,m?.name,a,r]),Ae=se.useCallback(async(D,K,H,te)=>{const X=[25,50,75,100];$({srcTokenAddress:D,srcTokenDecimals:te||18});let W=H||"0";if(D===$e)try{const ie=await co({chainId:v,rpcUrl:A});if(ie.isGreaterThan(0)){const me=ie.times(1e6),U=new le(pt(H,te||18).toString()).minus(me);U.isGreaterThan(0)?W=le(Oe(BigInt(U.toFixed(0)),18)).toFixed():W="0"}}catch(ie){console.warn("getGasPrice for swap native fee deduction failed:",ie)}const z=X.map(ie=>({id:`percent-${ie}`,text:`${ie}%`,value:r("buttonUsePercent",{percent:String(ie),symbol:K}),action:"select_percent",extraData:{percent:ie,tokenAddress:D,tokenSymbol:K,tokenBalance:W}}));if(le(W).isZero()){d(r("insufficientFeeToken",{symbol:K}),"bot");return}d(r("selectAmountOf",{symbol:K,balance:W}),"bot",void 0,z)},[d,v,A,$,r]),xe=se.useCallback(async(D,K)=>{$({amount:(parseFloat(K)*(D/100)).toFixed(6)});const H=T(),te=pt(H.amount,H.srcTokenDecimals||18).toString(),X=await so({chainId:v,tokenIn:H.srcTokenAddress,tokenInAmount:te,tokenOut:H.descTokenAddress,tokenOutRecipient:i?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(X.success&&X.data){const W=X.data,z=W.tokenIn,ie=W.tokenOut,me=le(Oe(BigInt(z.amount||0),z.decimals)).decimalPlaces(6).toFormat(),L=le(Oe(BigInt(ie.amount||0),ie.decimals)).decimalPlaces(6).toFormat(),U=H.srcTokenAddress===$e||H.srcTokenAddress==="";let q=!1;if(!U&&i?.address&&W.tx?.to)try{const O=await io({tokenAddress:H.srcTokenAddress,ownerAddress:i.address,spenderAddress:W.tx.to,chainId:v,rpcUrl:A});q=le(O.toString()).isLessThan(te)}catch(O){console.warn("Allowance check failed:",O),q=!0}const Z=W.estimatedTransactionFee?.total?le(W.estimatedTransactionFee.total):le(0);let J=le(0);if(q&&i?.address)try{const O=wn({tokenAddress:H.srcTokenAddress,spenderAddress:W.tx?.to||"",fromAddress:i.address,chainId:v});J=await nn({from:i.address,to:O.to,data:O.data,chainId:v,rpcUrl:A})}catch(O){console.warn("Approve fee estimation failed:",O)}const ee=Z.plus(J),fe=m?.nativeCurrency?.symbol||"native";let Y="",oe=!1;if(i?.address&&ee.isGreaterThan(0))try{const O=await yn({address:i.address,chainId:v,rpcUrl:A});if(O.isLessThan(ee)){oe=!0;const ce=le(Oe(BigInt(O.toFixed(0)),18)).decimalPlaces(6).toFormat(),Se=le(Oe(BigInt(ee.toFixed(0)),18)).decimalPlaces(6).toFormat();Y=r("swapFeeWarning",{symbol:fe,balance:ce,needed:Se})}}catch(O){console.warn("Fee balance check failed:",O)}const V=`From: ${me} ${z.symbol}
363
384
  ⬇️
364
- To: ${U} ${Z.symbol}
385
+ To: ${L} ${ie.symbol}
365
386
 
366
- `+z+`
367
- `;if(Q)f(ae,"bot");else if(fe){const j=ae+a("swapNeedApprove",{symbol:W.symbol}),V=[{id:"approve-for-swap",text:a("swapApproveButton",{symbol:W.symbol}),value:a("swapApproveValue",{symbol:W.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:R.srcTokenAddress,spenderAddress:$.tx.to,tokenSymbol:W.symbol,tx:$.tx}}];f(j,"bot",void 0,V)}else{const j=[{id:"confirm-swap",text:r("swapConfirmButton"),value:r("swapConfirmValue"),action:"confirm_swap",extraData:{tx:$.tx}}];f(ae+r("swapReadyToProceed"),"bot",void 0,j)}}else f(a("swapEstimationError",{error:oe.errorMessage||oe.error||"Unknown error"}),"bot")},[T,H,f,y,c?.address,g?.nativeCurrency?.symbol,A,r,a]),G=se.useCallback(async(M,te,R)=>{try{if(te==="suggested_action"){ye.current=M,b(M);return}if(f(M,"user"),D(!1),v(!0),te)switch(await lt(500),te){case"click_buy_item_token_button":await ge(R?.tokenAddress||"",R?.decimals||18);break;case"click_balance_item_user_to_buy_button":await ke(R?.tokenAddress||"",R?.symbol||"",R?.balance||"",R?.decimals||18);break;case"select_percent":await xe(R?.percent||0,R?.tokenBalance||"");break;case"confirm_swap":if(R?.tx&&n){const ne=R.tx,oe={from:c?.address||"",to:ne.to,data:ne.data,value:ne.value,chainId:y},$=f(r("txProcessing"),"bot");try{const W=await n(oe);if(W.status==="success"&&W.transactionHash){const Z=g?.blockExplorers?.default?.url,X=Z?`
368
- [View on Explorer](${Z}/tx/${W.transactionHash})`:`
369
- Tx: ${W.transactionHash}`;N($.id,r("txSubmitted")+X);try{await lt(2e3),(await so({transactionHash:W.transactionHash,chainId:y||1,rpcUrl:A})).status==="success"?N($.id,r("txConfirmedSwap")+X):N($.id,r("txRevertedSwap")+X)}catch(U){console.warn("Transaction tracking timeout:",U),N($.id,r("txTimeout")+X)}}else if(W.status==="success")N($.id,r("txSuccessfulSwap"));else{const Z=W.error?`
370
- Error: ${W.error}`:"";N($.id,r("txFailed")+Z)}}catch(W){console.error("Transaction error:",W),N($.id,r("txFailed"))}}else f(r("txDataNotAvailable"),"bot");break;case"approve_for_swap":{const ne=R?.tokenAddress||"",oe=R?.spenderAddress||"",$=R?.tokenSymbol||"token",W=R?.tx;if(!ne||!oe||!n){f(r("approvalDataNotAvailable"),"bot");break}const Z=hn({tokenAddress:ne,spenderAddress:oe,fromAddress:c?.address||"",chainId:y,tokenSymbol:$}),X={from:Z.from,to:Z.to,data:Z.data,value:Z.value,chainId:Z.chainId};f(a("approving",{symbol:$}),"bot");try{const U=await n(X);let Y=U.status==="success";if(U.status==="success"&&U.transactionHash)try{Y=(await so({transactionHash:U.transactionHash,chainId:y||1,rpcUrl:A})).status==="success"}catch(fe){console.warn("Approval tracking timeout:",fe),Y=!0}if(Y){f(a("approvalSuccess",{symbol:$}),"bot");const fe=[{id:"confirm-swap-after-approve",text:r("confirmSwapButton"),value:r("swapConfirmValue"),action:"confirm_swap",fullWidth:!0,extraData:{tx:W}}];f(r("approvalConfirmSwap"),"bot",void 0,fe)}else{const fe=U.error?`
371
- Error: ${U.error}`:"";f(r("approvalFailed")+fe,"bot")}}catch(U){console.error("Approval error:",U),f(r("approvalFailed"),"bot")}break}case"click_swap_dest_token":{const ne=R?.tokenAddress||"",oe=R?.symbol||"",$=R?.decimals||18;H({descTokenAddress:ne,descTokenDecimals:$});const Z=T().srcTokenAddress||"",X=Z===Ye;try{const U=await ot({address:c?.address||"",chain:w});if(U?.success&&U?.data?.result){const Y=U.data.result;let fe="",me="0";if(X){const ie=Y.find(le=>le.native_token);fe=g?.nativeCurrency?.symbol||"ETH",me=ie?.balance_formatted||"0"}else{const ie=Y.find(le=>le.token_address.toLowerCase()===Z.toLowerCase());ie&&(fe=ie.symbol,me=ie.balance_formatted)}if(fe&&parseFloat(me)>0){const le=[25,50,75,100].map(O=>({id:`percent-${O}`,text:`${O}%`,value:a("buttonUsePercent",{percent:String(O),symbol:fe}),action:"select_percent",extraData:{percent:O,tokenAddress:Z,tokenSymbol:fe,tokenBalance:me}}));f(a("swapSelectAmount",{from:fe,to:oe,balance:me}),"bot",void 0,le)}else f(r("swapNoSourceToken"),"bot")}else f(r("couldNotFetchBalance"),"bot")}catch(U){console.error("Error in click_swap_dest_token:",U),f(r("couldNotLoadBalance"),"bot")}break}case"select_nft_to_send":{const ne=R?.name||"NFT",oe=R?.contractAddress||"",$=R?.tokenId||"",W=R?.tokenStandard||"ERC721",Z=R?.amount||"1",X={contract_address:oe,token_id:$,to_address:"",token_standard:W,amount:W==="ERC1155"?Z:"1",nft_name:ne};f(a("nftSendReview",{name:ne,standard:W,tokenId:$}),"bot",void 0,void 0,{action:"send_nft",parameters:X,status:"pending"});break}default:f(`Action "${te}" executed for: ${M}`,"bot")}else await lt(500),f(`Received: ${M}`,"bot");v(!1),bn.isDesktop&&he.current?.focus()}catch(ne){f(r("errorProcessingRequest"),"bot"),v(!1),console.error("Error handling button click:",ne)}},[c?.address,f,N,g?.blockExplorers?.default?.url,g?.nativeCurrency?.symbol,y,w,T,ge,ke,n,xe,H,A,r,a]),we=se.useCallback(async()=>{try{v(!0);const M=g?.tokenTrendingDefault||[],[te,R]=await Promise.allSettled([Ke.getTopGainers(m,"24h",5),Ke.getTokensDetails(M,m)]);let ne=[];te.status==="fulfilled"&&te.value?.data?ne=[...te.value.data]:console.warn("⚠️ Top gainers failed:"),R.status==="fulfilled"&&R.value?.data?ne=[...R.value.data,...ne]:console.warn("⚠️ Default tokens failed:"),ne=ne.filter((W,Z,X)=>Z===X.findIndex(U=>U.address.toLowerCase()===W.address.toLowerCase()));const oe=ne.map(W=>({id:W?.symbol,text:W?.symbol,value:a("buttonBuyToken",{name:W.name,symbol:W?.symbol||""}),action:"click_buy_item_token_button",extraData:{tokenAddress:W?.address||"",symbol:W?.symbol||"",decimals:W?.decimals||18}}));await lt(1e3),v(!1),f(a("trendingTokensHeader",{chain:g?.name||"Unknown"}),"bot");const $=ne.map((W,Z)=>`${Z+1}. ${W.name} (${W?.auditGoplus?.token_symbol||W.symbol||"Unknown"})
372
- $${ue(W?.price||0).decimalPlaces(4).toFormat()} (${W.price_change_percentage_24h||W.priceChange}%)
387
+ `+Y+`
388
+ `;if(oe)d(V,"bot");else if(q){const O=V+r("swapNeedApprove",{symbol:z.symbol}),ce=[{id:"approve-for-swap",text:r("swapApproveButton",{symbol:z.symbol}),value:r("swapApproveValue",{symbol:z.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:H.srcTokenAddress,spenderAddress:W.tx.to,tokenSymbol:z.symbol,tx:W.tx}}];d(O,"bot",void 0,ce)}else{const O=[{id:"confirm-swap",text:a("swapConfirmButton"),value:a("swapConfirmValue"),action:"confirm_swap",extraData:{tx:W.tx}}];d(V+a("swapReadyToProceed"),"bot",void 0,O)}}else d(r("swapEstimationError",{error:X.errorMessage||X.error||"Unknown error"}),"bot")},[T,$,d,v,i?.address,m?.nativeCurrency?.symbol,A,a,r]),G=se.useCallback(async(D,K,H)=>{try{if(K==="suggested_action"){ye.current=D,g(D);return}if(d(D,"user"),M(!1),w(!0),K)switch(await nt(500),K){case"click_buy_item_token_button":await be(H?.tokenAddress||"",H?.decimals||18);break;case"click_balance_item_user_to_buy_button":await Ae(H?.tokenAddress||"",H?.symbol||"",H?.balance||"",H?.decimals||18);break;case"select_percent":await xe(H?.percent||0,H?.tokenBalance||"");break;case"confirm_swap":if(H?.tx&&n){const te=H.tx,X={from:i?.address||"",to:te.to,data:te.data,value:te.value,chainId:v},W=d(a("txProcessing"),"bot");try{w(!1);const z=await n(X);if(z.status==="success"&&z.transactionHash){const ie=m?.blockExplorers?.default?.url,me=ie?`
389
+ [View on Explorer](${ie}/tx/${z.transactionHash})`:`
390
+ Tx: ${z.transactionHash}`;N(W.id,a("txSubmitted")+me);try{await nt(2e3),(await ro({transactionHash:z.transactionHash,chainId:v||1,rpcUrl:A})).status==="success"?N(W.id,a("txConfirmedSwap")+me):N(W.id,a("txRevertedSwap")+me)}catch(L){console.warn("Transaction tracking timeout:",L),N(W.id,a("txTimeout")+me)}}else if(z.status==="success")N(W.id,a("txSuccessfulSwap"));else{const ie=z.error?`
391
+ Error: ${z.error}`:"";N(W.id,a("txFailed")+ie)}}catch(z){console.error("Transaction error:",z),N(W.id,a("txFailed"))}}else d(a("txDataNotAvailable"),"bot");break;case"approve_for_swap":{const te=H?.tokenAddress||"",X=H?.spenderAddress||"",W=H?.tokenSymbol||"token",z=H?.tx;if(!te||!X||!n){d(a("approvalDataNotAvailable"),"bot");break}const ie=wn({tokenAddress:te,spenderAddress:X,fromAddress:i?.address||"",chainId:v,tokenSymbol:W}),me={from:ie.from,to:ie.to,data:ie.data,value:ie.value,chainId:ie.chainId};d(r("approving",{symbol:W}),"bot");try{w(!1);const L=await n(me);let U=L.status==="success";if(L.status==="success"&&L.transactionHash)try{U=(await ro({transactionHash:L.transactionHash,chainId:v||1,rpcUrl:A})).status==="success"}catch(q){console.warn("Approval tracking timeout:",q),U=!0}if(U){d(r("approvalSuccess",{symbol:W}),"bot");const q=[{id:"confirm-swap-after-approve",text:a("confirmSwapButton"),value:a("swapConfirmValue"),action:"confirm_swap",fullWidth:!0,extraData:{tx:z}}];d(a("approvalConfirmSwap"),"bot",void 0,q)}else{const q=L.error?`
392
+ Error: ${L.error}`:"";d(a("approvalFailed")+q,"bot")}}catch(L){console.error("Approval error:",L),d(a("approvalFailed"),"bot")}break}case"click_swap_dest_token":{const te=H?.tokenAddress||"",X=H?.symbol||"",W=H?.decimals||18;$({descTokenAddress:te,descTokenDecimals:W});const ie=T().srcTokenAddress||"",me=ie===$e;try{const L=await Ye({address:i?.address||"",chain:y});if(L?.success&&L?.data?.result){const U=L.data.result;let q="",Z="0";if(me){const J=U.find(ee=>ee.native_token);q=m?.nativeCurrency?.symbol||"ETH",Z=J?.balance_formatted||"0"}else{const J=U.find(ee=>ee.token_address.toLowerCase()===ie.toLowerCase());J&&(q=J.symbol,Z=J.balance_formatted)}if(q&&parseFloat(Z)>0){const ee=[25,50,75,100].map(fe=>({id:`percent-${fe}`,text:`${fe}%`,value:r("buttonUsePercent",{percent:String(fe),symbol:q}),action:"select_percent",extraData:{percent:fe,tokenAddress:ie,tokenSymbol:q,tokenBalance:Z}}));d(r("swapSelectAmount",{from:q,to:X,balance:Z}),"bot",void 0,ee)}else d(a("swapNoSourceToken"),"bot")}else d(a("couldNotFetchBalance"),"bot")}catch(L){console.error("Error in click_swap_dest_token:",L),d(a("couldNotLoadBalance"),"bot")}break}case"select_nft_to_send":{const te=H?.name||"NFT",X=H?.contractAddress||"",W=H?.tokenId||"",z=H?.tokenStandard||"ERC721",ie=H?.amount||"1",me={contract_address:X,token_id:W,to_address:"",token_standard:z,amount:z==="ERC1155"?ie:"1",nft_name:te};d(r("nftSendReview",{name:te,standard:z,tokenId:W}),"bot",void 0,void 0,{action:"send_nft",parameters:me,status:"pending"});break}default:d(`Action "${K}" executed for: ${D}`,"bot")}else await nt(500),d(`Received: ${D}`,"bot");w(!1),Vt.isDesktop&&he.current?.focus()}catch(te){d(a("errorProcessingRequest"),"bot"),w(!1),console.error("Error handling button click:",te)}},[i?.address,d,N,m?.blockExplorers?.default?.url,m?.nativeCurrency?.symbol,v,y,T,be,Ae,n,xe,$,A,a,r]),we=se.useCallback(async()=>{try{w(!0);const D=m?.tokenTrendingDefault||[],[K,H]=await Promise.allSettled([et.getTopGainers(h,"24h",5),et.getTokensDetails(D,h)]);let te=[];K.status==="fulfilled"&&K.value?.data?te=[...K.value.data]:console.warn("⚠️ Top gainers failed:"),H.status==="fulfilled"&&H.value?.data?te=[...H.value.data,...te]:console.warn("⚠️ Default tokens failed:"),te=te.filter((z,ie,me)=>ie===me.findIndex(L=>L.address.toLowerCase()===z.address.toLowerCase()));const X=te.map(z=>({id:z?.symbol,text:z?.symbol,value:r("buttonBuyToken",{name:z.name,symbol:z?.symbol||""}),action:"click_buy_item_token_button",extraData:{tokenAddress:z?.address||"",symbol:z?.symbol||"",decimals:z?.decimals||18}}));await nt(1e3),w(!1),d(r("trendingTokensHeader",{chain:m?.name||"Unknown"}),"bot");const W=te.map((z,ie)=>`${ie+1}. ${z.name} (${z?.auditGoplus?.token_symbol||z.symbol||"Unknown"})
393
+ $${le(z?.price||0).decimalPlaces(4).toFormat()} (${z.price_change_percentage_24h||z.priceChange}%)
373
394
 
374
395
  ---
375
396
  `).join(`
376
- `);f(`${$}${r("trendingTokensQuestion")}`,"bot",void 0,oe)}catch(M){console.error("Error fetching trending tokens:",M),f(r("trendingTokensError"),"bot")}finally{v(!1)}},[f,g?.name,g?.tokenTrendingDefault,m,r,a]),Se=se.useCallback(async()=>{try{v(!0);const M=await Oi({address:c?.address||"",chain:w,limit:100,exclude_spam:!0});if(M?.success&&M?.data?.result&&M.data.result.length>0){const te=M.data.result,R=te.map(oe=>{const $=oe.normalized_metadata?.name||oe.name||`#${oe.token_id}`,W=oe.normalized_metadata?.image||oe.media?.original_media_url||"";return{id:`${oe.token_address}-${oe.token_id}`,text:`${$} (${oe.symbol||oe.contract_type}) - ${oe.token_id}`,value:a("buttonSendNft",{name:$}),action:"select_nft_to_send",fullWidth:!0,extraData:{contractAddress:oe.token_address,tokenId:oe.token_id,tokenStandard:oe.contract_type,name:$,symbol:oe.symbol,amount:oe.amount,image:W}}}),ne=te.map((oe,$)=>{const W=oe.normalized_metadata?.name||oe.name||`#${oe.token_id}`,Z=oe.contract_type==="ERC1155"?` (x${oe.amount})`:"",X=oe.normalized_metadata?.image||oe.media?.original_media_url||"",U=X?`![${W}](${X})
377
- `:"🖼️ ";return`${$+1}. ${U}**${W}**${Z}
378
- ${oe.symbol||oe.contract_type} | Token ID: ${oe.token_id}`}).join(`
397
+ `);d(`${W}${a("trendingTokensQuestion")}`,"bot",void 0,X)}catch(D){console.error("Error fetching trending tokens:",D),d(a("trendingTokensError"),"bot")}finally{w(!1)}},[d,m?.name,m?.tokenTrendingDefault,h,a,r]),Ee=se.useCallback(async()=>{try{w(!0);const D=await Di({address:i?.address||"",chain:y,limit:100,exclude_spam:!0});if(D?.success&&D?.data?.result&&D.data.result.length>0){const K=D.data.result,H=K.map(X=>{const W=X.normalized_metadata?.name||X.name||`#${X.token_id}`,z=X.normalized_metadata?.image||X.media?.original_media_url||"";return{id:`${X.token_address}-${X.token_id}`,text:`${W} (${X.symbol||X.contract_type}) - ${X.token_id}`,value:r("buttonSendNft",{name:W}),action:"select_nft_to_send",fullWidth:!0,extraData:{contractAddress:X.token_address,tokenId:X.token_id,tokenStandard:X.contract_type,name:W,symbol:X.symbol,amount:X.amount,image:z}}}),te=K.map((X,W)=>{const z=X.normalized_metadata?.name||X.name||`#${X.token_id}`,ie=X.contract_type==="ERC1155"?` (x${X.amount})`:"",me=X.normalized_metadata?.image||X.media?.original_media_url||"",L=me?`![${z}](${me})
398
+ `:"🖼️ ";return`${W+1}. ${L}**${z}**${ie}
399
+ ${X.symbol||X.contract_type} | Token ID: ${X.token_id}`}).join(`
400
+
401
+ `);await nt(500),w(!1),d(r("nftCollectionHeader",{count:String(K.length),list:te}),"bot",void 0,H)}else w(!1),d(a("nftNoCollection"),"bot")}catch(D){console.error("Error fetching NFTs:",D),w(!1),d(a("nftFetchError"),"bot")}},[i?.address,y,d,a,r]),Ve=se.useCallback(async()=>{try{w(!0);const D=await Ye({address:i?.address||"",chain:y});if(D?.success&&D?.data?.result&&D.data.result.length>0){const K=D.data.result,H=K.flatMap(X=>[{id:`send-${X.token_address}`,text:r("buttonSendToken",{symbol:X.symbol}),value:r("buttonSendToken",{symbol:X.symbol}),action:"suggested_action",fullWidth:!!Vt.isMobile},{id:`buy-more-${X.token_address}`,text:r("buttonBuyMoreToken",{symbol:X.symbol}),value:r("buttonBuyMoreToken",{symbol:X.symbol}),action:"suggested_action",fullWidth:!!Vt.isMobile}]),te=K.map((X,W)=>{const z=X.usd_value!==void 0?` ≈ $${le(X.usd_value).decimalPlaces(2).toFormat()}`:"";return`${W+1}. **${X.name}** (${X.symbol})
402
+ Balance: ${X.balance_formatted}${z}`}).join(`
379
403
 
380
- `);await lt(500),v(!1),f(a("nftCollectionHeader",{count:String(te.length),list:ne}),"bot",void 0,R)}else v(!1),f(r("nftNoCollection"),"bot")}catch(M){console.error("Error fetching NFTs:",M),v(!1),f(r("nftFetchError"),"bot")}},[c?.address,w,f,r,a]),Ge=se.useMemo(()=>[{id:"ask",icon:"❓",text:r("suggestionAskText"),action:async()=>{D(!1),v(!0),f(r("suggestionAskUserMessage"),"user"),await lt(1e3),v(!1),f(r("suggestionAskBotReply"),"bot")}},{id:"buy",icon:"💰",text:r("suggestionBuyText"),action:async()=>{D(!1),f(r("suggestionBuyText"),"user"),Le(c?.address||"")&&h?await we():(v(!0),await lt(1e3),Le(c?.address||"")&&!h?f(r("walletConnectedChainUnsupported"),"bot"):f(r("walletNotConnected"),"bot"),v(!1))}}],[f,c?.address,we,r,h]),et=M=>{if(M===0)return!0;const te=l[M],R=l[M-1],ne=new Date(te.timestamp),oe=new Date(R.timestamp);return ne.setHours(0,0,0,0),oe.setHours(0,0,0,0),ne.getTime()!==oe.getTime()};se.useEffect(()=>{q.current?.scrollIntoView({behavior:"smooth"})},[l]),se.useEffect(()=>{e?(he.current&&bn.isDesktop&&he.current.focus(),q.current?.scrollIntoView({behavior:"instant"}),i.current&&Be.current?Date.now()-Be.current>1e4&&D(!0):D(!0),Be.current=null,i.current=!1,setTimeout(()=>{q.current?.scrollIntoView({behavior:"smooth"})},50)):(Be.current=Date.now(),i.current=!d.current)},[e]),se.useEffect(()=>{const M=te=>{te.key==="Escape"&&e&&t()};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[e,t]);const He=se.useCallback(async()=>{if(_?.trim()===""||E)return;const M=J,te=f(_?.trim(),"user",J?.id);b(""),I(null),v(!0),D(!1),v(!0);try{const R=qi({walletAddress:c?.address||void 0,chainName:g?.name||void 0,chainId:y||void 0,nativeSymbol:g?.nativeCurrency?.symbol||void 0}),ne=l.slice(-20);let oe="";if(ne.length>0){oe=`
404
+ `);await nt(500),w(!1),d(r("viewBalancesHeader",{chain:m?.name||"this chain",list:te}),"bot",void 0,H)}else w(!1),d(a("viewBalancesEmpty"),"bot")}catch(D){console.error("Error fetching balances:",D),w(!1),d(a("viewBalancesFetchError"),"bot")}},[i?.address,y,d,m?.name,a,r]),st=se.useMemo(()=>[{id:"ask",icon:"❓",text:a("suggestionAskText"),action:async()=>{M(!1),w(!0),d(a("suggestionAskUserMessage"),"user"),await nt(1e3),w(!1),d(a("suggestionAskBotReply"),"bot")}},{id:"buy",icon:"💰",text:a("suggestionBuyText"),action:async()=>{M(!1),d(a("suggestionBuyText"),"user"),Re(i?.address||"")&&b?await we():(w(!0),await nt(1e3),Re(i?.address||"")&&!b?d(a("walletConnectedChainUnsupported"),"bot"):d(a("walletNotConnected"),"bot"),w(!1))}}],[d,i?.address,we,a,b]),je=D=>{if(D===0)return!0;const K=l[D],H=l[D-1],te=new Date(K.timestamp),X=new Date(H.timestamp);return te.setHours(0,0,0,0),X.setHours(0,0,0,0),te.getTime()!==X.getTime()};se.useEffect(()=>{j.current?.scrollIntoView({behavior:"smooth"})},[l]),se.useEffect(()=>{e?(he.current&&Vt.isDesktop&&he.current.focus(),j.current?.scrollIntoView({behavior:"instant"}),c.current&&Be.current?Date.now()-Be.current>1e4&&M(!0):M(!0),Be.current=null,c.current=!1,setTimeout(()=>{j.current?.scrollIntoView({behavior:"smooth"})},50)):(Be.current=Date.now(),c.current=!u.current)},[e]),se.useEffect(()=>{const D=K=>{K.key==="Escape"&&e&&t()};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[e,t]);const Pe=se.useCallback(async()=>{if(_?.trim()===""||E)return;const D=Q,K=d(_?.trim(),"user",Q?.id);g(""),I(null),w(!0),M(!1),w(!0);try{let H;if(i?.address&&b)try{const me=await Ye({address:i.address,chain:y});me?.success&&me?.data?.result&&(H=me.data.result.map(L=>({symbol:L.symbol,name:L.name,balance_formatted:L.balance_formatted,usd_value:L.usd_value,native_token:L.native_token,token_address:L.token_address})))}catch{}const te=qi({walletAddress:i?.address||void 0,chainName:m?.name||void 0,chainId:v||void 0,nativeSymbol:m?.nativeCurrency?.symbol||void 0,walletTokens:H}),X=l.slice(-20);let W="";if(X.length>0){W=`
381
405
 
382
406
  ## CONVERSATION HISTORY:
383
- `;for(const Z of ne)if(Z.sender==="user")oe+=`User: ${Z.text}
384
- `;else{const X=Z.text.length>400?Z.text.substring(0,400)+"...":Z.text;oe+=`Assistant: ${X}
385
- `}oe+=`
407
+ `;for(const me of X)if(me.sender==="user")W+=`User: ${me.text}
408
+ `;else{const L=me.text.length>400?me.text.substring(0,400)+"...":me.text;W+=`Assistant: ${L}
409
+ `}W+=`
386
410
  ---
387
- `}let $=_?.trim();M&&($=`[Replying to ${M.sender==="user"?"my previous":"your"} message: "${M.text}"]
411
+ `}let z=_?.trim();D&&(z=`[Replying to ${D.sender==="user"?"my previous":"your"} message: "${D.text}"]
388
412
 
389
- ${$}`);const W=await Fi({prompt:$,model:"gpt-4.1-mini",stream:!1,systemPrompt:R+oe});if(W.success&&W.data){const Z=W.data.text||"";let X=null;try{let U=Z?.trim();U.startsWith("```json")?U=U.replace(/^```json\s*/,"").replace(/\s*```$/,""):U.startsWith("```")&&(U=U.replace(/^```\s*/,"").replace(/\s*```$/,"")),X=JSON.parse(U)}catch{X=null}if(X&&X.action&&X.action!=="chat")if(X.action==="buy_token"){const U=X.parameters?.token_symbol||"";let Y=X.parameters?.contract_address||"",fe=18;if(Y)try{const me=await Ke.getTokensDetails([Y],m);me?.data?.[0]&&(fe=me.data[0].decimals||18)}catch(me){console.warn("getTokensDetails for buy_token failed:",me)}if(!Y&&U&&c?.address)try{const me=await ot({address:c.address,chain:w});if(me?.success&&me?.data?.result){const ie=me.data.result,le=ie.find(O=>O.token_address.toLowerCase()===Y.toLowerCase())||ie.find(O=>O.symbol.toUpperCase()===U.toUpperCase());le&&(Y=le.token_address,fe=le.decimals)}if(!Y){const ie=g.tokenTrendingDefault||[],[le,O]=await Promise.allSettled([Ke.getTopGainers(m,"24h",10),Ke.getTokensDetails(ie,m)]),z=[];le.status==="fulfilled"&&le.value?.data&&z.push(...le.value.data),O.status==="fulfilled"&&O.value?.data&&z.push(...O.value.data);const Q=z.find(ae=>ae.address?.toLowerCase()===Y.toLowerCase())||z.find(ae=>ae.symbol?.toUpperCase()===U.toUpperCase());Q&&(Y=Q.address,fe=Q.decimals||18)}}catch(me){console.warn("Token lookup for buy failed:",me)}Y?(f(X.message||`🛒 I'll help you buy ${U}. Let me show your available tokens to trade with.`,"bot",te.id),await ge(Y,fe)):(f(X.message||`I couldn't find the token "${U}" on this chain. Here are the trending tokens you can buy:`,"bot",te.id),await we())}else if(X.action==="swap_token"){const U={...X.parameters||{}},Y=U.token_in==="native"||U.token_in_symbol?.toUpperCase()===g?.nativeCurrency?.symbol?.toUpperCase(),fe=U.token_out==="native"||U.token_out_symbol?.toUpperCase()===g?.nativeCurrency?.symbol?.toUpperCase();if(fe&&(U.token_out=Ye),!Y&&(U.token_in||U.token_in_symbol)&&c?.address)try{const O=await ot({address:c.address,chain:w});if(O?.success&&O?.data?.result){const z=O.data.result,Q=U.token_in?z.find(ae=>ae.token_address.toLowerCase()===U.token_in.toLowerCase()):z.find(ae=>ae.symbol.toUpperCase()===U.token_in_symbol.toUpperCase());Q&&(U.token_in=Q.token_address,U.token_in_decimals=String(Q.decimals))}}catch(O){console.warn("Resolve token_in failed:",O)}if(!fe&&(U.token_out||U.token_out_symbol)&&c?.address)try{const O=await ot({address:c.address,chain:w});if(O?.success&&O?.data?.result){const z=O.data.result,Q=U.token_out?z.find(ae=>ae.token_address.toLowerCase()===U.token_out.toLowerCase()):z.find(ae=>ae.symbol.toUpperCase()===U.token_out_symbol.toUpperCase());Q&&(U.token_out=Q.token_address,U.token_out_decimals=String(Q.decimals))}}catch(O){console.warn("Resolve token_out failed:",O)}const me=!!(U.token_in||Y),ie=!!U.token_out,le=!!U.amount;if(me&&ie&&le){f(X.message||"🔄 Preparing your swap...","bot",te.id);try{const O=[];U.token_out&&O.push(U.token_out),U.token_in&&!Y&&O.push(U.token_in);let z=18,Q=18;if(O.length>0)try{const ce=await Ke.getTokensDetails(O,m);if(ce?.data)for(const Ae of ce.data)!Y&&Ae.address.toLowerCase()===U.token_in?.toLowerCase()&&(z=Ae.decimals||18),Ae.address.toLowerCase()===U.token_out?.toLowerCase()&&(Q=Ae.decimals||18)}catch(ce){console.warn("getTokensDetails failed, using default decimals:",ce)}if(c?.address)try{const ce=await ot({address:c.address,chain:w});if(ce?.success&&ce?.data?.result){const Ae=ce.data.result;if(Y){const Ce=Ae.find(Ze=>Ze.native_token);let Pe=Ce?.balance_formatted||"0";try{const Ze=await ao({chainId:y,rpcUrl:A});if(Ze.isGreaterThan(0)){const st=Ze.times(1e6),It=new ue(Ce?.balance||"0").minus(st);It.isGreaterThan(0)?Pe=ue(Ue(BigInt(It.toFixed(0)),Ce?.decimals||18)).toFixed():Pe="0"}}catch(Ze){console.warn("getGasPrice for swap native fee deduction failed:",Ze)}U.amount=io(U.amount,Pe);const Fe=parseFloat(Pe),qe=parseFloat(U.amount);if(Fe<qe){f(a("swapInsufficientNativeBalance",{balance:Fe.toFixed(6),symbol:g?.nativeCurrency?.symbol||"native",amount:U.amount}),"bot"),v(!1);return}}else{const Ce=Ae.find(qe=>qe.token_address.toLowerCase()===U.token_in?.toLowerCase());if(!Ce){f(a("swapTokenNotInWallet",{symbol:U.token_in_symbol||U.token_in}),"bot"),v(!1);return}U.amount=io(U.amount,Ce.balance_formatted||"0");const Pe=parseFloat(Ce.balance_formatted||"0"),Fe=parseFloat(U.amount);if(Pe<Fe){f(a("swapInsufficientTokenBalance",{balance:Pe.toFixed(6),symbol:Ce.symbol,amount:U.amount}),"bot"),v(!1);return}}}}catch(ce){console.warn("Balance check failed:",ce)}const ae=Y?Ye:U.token_in;H({srcTokenAddress:ae,descTokenAddress:U.token_out,amount:U.amount,srcTokenDecimals:z,descTokenDecimals:Q});const j=dt(U.amount,z).toString(),V=await no({chainId:y,tokenIn:ae,tokenInAmount:j,tokenOut:U.token_out,tokenOutRecipient:c?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(V.success&&V.data){const ce=V.data,Ae=ce.tokenIn,Ce=ce.tokenOut,Pe=ue(Ue(BigInt(Ae.amount||0),Ae.decimals)).decimalPlaces(6).toFormat(),Fe=ue(Ue(BigInt(Ce.amount||0),Ce.decimals)).decimalPlaces(6).toFormat();let qe=!1;if(!Y&&c?.address&&ce.tx?.to)try{const Ee=await ro({tokenAddress:ae,ownerAddress:c.address,spenderAddress:ce.tx.to,chainId:y,rpcUrl:A});qe=ue(Ee.toString()).isLessThan(j)}catch(Ee){console.warn("Allowance check failed (CASE 1):",Ee),qe=!0}const Ze=ce.estimatedTransactionFee?.total?ue(ce.estimatedTransactionFee.total):ue(0);let st=ue(0);if(qe&&c?.address)try{const Ee=hn({tokenAddress:ae,spenderAddress:ce.tx?.to||"",fromAddress:c.address,chainId:y});st=await Qt({from:c.address,to:Ee.to,data:Ee.data,chainId:y,rpcUrl:A})}catch(Ee){console.warn("Approve fee estimation failed:",Ee)}const Bt=Ze.plus(st),It=g?.nativeCurrency?.symbol||"native";let tn="",ft=!1;if(c?.address&&Bt.isGreaterThan(0))try{const Ee=await gn({address:c.address,chainId:y,rpcUrl:A});if(Ee.isLessThan(Bt)){ft=!0;const wn=ue(Ue(BigInt(Ee.toFixed(0)),18)).decimalPlaces(6).toFormat(),yn=ue(Ue(BigInt(Bt.toFixed(0)),18)).decimalPlaces(6).toFormat();tn=a("swapFeeWarning",{symbol:It,balance:wn,needed:yn})}}catch(Ee){console.warn("Fee balance check failed:",Ee)}const Ht=`From: ${Pe} ${Ae.symbol}
413
+ ${z}`);const ie=await Ui({prompt:z,model:"gpt-4.1-mini",stream:!1,systemPrompt:te+W});if(ie.success&&ie.data){const me=ie.data.text||"";let L=null;try{let U=me?.trim();U.startsWith("```json")?U=U.replace(/^```json\s*/,"").replace(/\s*```$/,""):U.startsWith("```")&&(U=U.replace(/^```\s*/,"").replace(/\s*```$/,"")),L=JSON.parse(U)}catch{L=null}if(L&&L.action&&L.action!=="chat")if(L.action==="buy_token"){const U=L.parameters?.token_symbol||"";let q=L.parameters?.contract_address||"",Z=18;if(q.toLowerCase()==="native"&&(q=$e),q&&q!==$e)try{const J=await et.getTokensDetails([q],h);J?.data?.[0]&&(Z=J.data[0].decimals||18)}catch(J){console.warn("getTokensDetails for buy_token failed:",J)}if(!q&&U&&i?.address)try{const J=await Ye({address:i.address,chain:y});if(J?.success&&J?.data?.result){const ee=J.data.result,fe=ee.find(Y=>Y.token_address.toLowerCase()===q.toLowerCase())||ee.find(Y=>Y.symbol.toUpperCase()===U.toUpperCase());fe&&(q=fe.token_address,Z=fe.decimals)}if(!q){const ee=m.tokenTrendingDefault||[],[fe,Y]=await Promise.allSettled([et.getTopGainers(h,"24h",10),et.getTokensDetails(ee,h)]),oe=[];fe.status==="fulfilled"&&fe.value?.data&&oe.push(...fe.value.data),Y.status==="fulfilled"&&Y.value?.data&&oe.push(...Y.value.data);const V=oe.find(O=>O.address?.toLowerCase()===q.toLowerCase())||oe.find(O=>O.symbol?.toUpperCase()===U.toUpperCase());V&&(q=V.address,Z=V.decimals||18)}}catch(J){console.warn("Token lookup for buy failed:",J)}q?(d(L.message||`🛒 I'll help you buy ${U}. Let me show your available tokens to trade with.`,"bot",K.id),await be(q,Z)):(d(L.message||`I couldn't find the token "${U}" on this chain. Here are the trending tokens you can buy:`,"bot",K.id),await we())}else if(L.action==="swap_token"){const U={...L.parameters||{}},q=U.token_in==="native"||U.token_in_symbol?.toUpperCase()===m?.nativeCurrency?.symbol?.toUpperCase(),Z=U.token_out==="native"||U.token_out_symbol?.toUpperCase()===m?.nativeCurrency?.symbol?.toUpperCase();if(Z&&(U.token_out=$e),!q&&(U.token_in||U.token_in_symbol)&&i?.address)try{const Y=await Ye({address:i.address,chain:y});if(Y?.success&&Y?.data?.result){const oe=Y.data.result,V=U.token_in?oe.find(O=>O.token_address.toLowerCase()===U.token_in.toLowerCase()):oe.find(O=>O.symbol.toUpperCase()===U.token_in_symbol.toUpperCase());V&&(U.token_in=V.token_address,U.token_in_decimals=String(V.decimals))}}catch(Y){console.warn("Resolve token_in failed:",Y)}if(!Z&&(U.token_out||U.token_out_symbol)&&i?.address)try{const Y=await Ye({address:i.address,chain:y});if(Y?.success&&Y?.data?.result){const oe=Y.data.result,V=U.token_out?oe.find(O=>O.token_address.toLowerCase()===U.token_out.toLowerCase()):oe.find(O=>O.symbol.toUpperCase()===U.token_out_symbol.toUpperCase());V&&(U.token_out=V.token_address,U.token_out_decimals=String(V.decimals))}}catch(Y){console.warn("Resolve token_out failed:",Y)}const J=!!(U.token_in||q),ee=!!U.token_out,fe=!!U.amount;if(J&&ee&&fe){d(L.message||"🔄 Preparing your swap...","bot",K.id);try{const Y=[];U.token_out&&Y.push(U.token_out),U.token_in&&!q&&Y.push(U.token_in);let oe=18,V=18;if(Y.length>0)try{const ue=await et.getTokensDetails(Y,h);if(ue?.data)for(const Te of ue.data)!q&&Te.address.toLowerCase()===U.token_in?.toLowerCase()&&(oe=Te.decimals||18),Te.address.toLowerCase()===U.token_out?.toLowerCase()&&(V=Te.decimals||18)}catch(ue){console.warn("getTokensDetails failed, using default decimals:",ue)}if(i?.address)try{const ue=await Ye({address:i.address,chain:y});if(ue?.success&&ue?.data?.result){const Te=ue.data.result;if(q){const Ce=Te.find(tt=>tt.native_token);let Ne=Ce?.balance_formatted||"0";try{const tt=await co({chainId:v,rpcUrl:A});if(tt.isGreaterThan(0)){const ct=tt.times(1e6),at=new le(Ce?.balance||"0").minus(ct);at.isGreaterThan(0)?Ne=le(Oe(BigInt(at.toFixed(0)),Ce?.decimals||18)).toFixed():Ne="0"}}catch(tt){console.warn("getGasPrice for swap native fee deduction failed:",tt)}U.amount=lo(U.amount,Ne);const Ue=parseFloat(Ne),Je=parseFloat(U.amount);if(Ue<Je){d(r("swapInsufficientNativeBalance",{balance:Ue.toFixed(6),symbol:m?.nativeCurrency?.symbol||"native",amount:U.amount}),"bot"),w(!1);return}}else{const Ce=Te.find(Je=>Je.token_address.toLowerCase()===U.token_in?.toLowerCase());if(!Ce){d(r("swapTokenNotInWallet",{symbol:U.token_in_symbol||U.token_in}),"bot"),w(!1);return}U.amount=lo(U.amount,Ce.balance_formatted||"0");const Ne=parseFloat(Ce.balance_formatted||"0"),Ue=parseFloat(U.amount);if(Ne<Ue){d(r("swapInsufficientTokenBalance",{balance:Ne.toFixed(6),symbol:Ce.symbol,amount:U.amount}),"bot"),w(!1);return}}}}catch(ue){console.warn("Balance check failed:",ue)}const O=q?$e:U.token_in;$({srcTokenAddress:O,descTokenAddress:U.token_out,amount:U.amount,srcTokenDecimals:oe,descTokenDecimals:V});const ce=pt(U.amount,oe).toString(),Se=await so({chainId:v,tokenIn:O,tokenInAmount:ce,tokenOut:U.token_out,tokenOutRecipient:i?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(Se.success&&Se.data){const ue=Se.data,Te=ue.tokenIn,Ce=ue.tokenOut,Ne=le(Oe(BigInt(Te.amount||0),Te.decimals)).decimalPlaces(6).toFormat(),Ue=le(Oe(BigInt(Ce.amount||0),Ce.decimals)).decimalPlaces(6).toFormat();let Je=!1;if(!q&&i?.address&&ue.tx?.to)try{const De=await io({tokenAddress:O,ownerAddress:i.address,spenderAddress:ue.tx.to,chainId:v,rpcUrl:A});Je=le(De.toString()).isLessThan(ce)}catch(De){console.warn("Allowance check failed (CASE 1):",De),Je=!0}const tt=ue.estimatedTransactionFee?.total?le(ue.estimatedTransactionFee.total):le(0);let ct=le(0);if(Je&&i?.address)try{const De=wn({tokenAddress:O,spenderAddress:ue.tx?.to||"",fromAddress:i.address,chainId:v});ct=await nn({from:i.address,to:De.to,data:De.data,chainId:v,rpcUrl:A})}catch(De){console.warn("Approve fee estimation failed:",De)}const Pt=tt.plus(ct),at=m?.nativeCurrency?.symbol||"native";let sn="",Xe=!1;if(i?.address&&Pt.isGreaterThan(0))try{const De=await yn({address:i.address,chainId:v,rpcUrl:A});if(De.isLessThan(Pt)){Xe=!0;const vn=le(Oe(BigInt(De.toFixed(0)),18)).decimalPlaces(6).toFormat(),An=le(Oe(BigInt(Pt.toFixed(0)),18)).decimalPlaces(6).toFormat();sn=r("swapFeeWarning",{symbol:at,balance:vn,needed:An})}}catch(De){console.warn("Fee balance check failed:",De)}const $t=`From: ${Ne} ${Te.symbol}
390
414
  ⬇️
391
- To: ${Fe} ${Ce.symbol}
415
+ To: ${Ue} ${Ce.symbol}
392
416
 
393
- `+tn+`
394
- `;if(ft)f(Ht,"bot");else if(qe){const Ee=[{id:"approve-for-swap",text:a("swapApproveButton",{symbol:Ae.symbol}),value:a("swapApproveValue",{symbol:Ae.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:ae,spenderAddress:ce.tx.to,tokenSymbol:Ae.symbol,tx:ce.tx}}];f(Ht+a("swapNeedApprove",{symbol:Ae.symbol}),"bot",void 0,Ee)}else{const Ee=[{id:"confirm-swap",text:"Yes",value:r("swapConfirmValue"),action:"confirm_swap",extraData:{tx:ce.tx}}];f(Ht+r("swapReadyToProceed"),"bot",void 0,Ee)}}else f(a("swapEstimationError",{error:V.errorMessage||V.error||"Unknown error"}),"bot")}catch(O){console.error("Swap estimation error:",O),f(r("swapEstimationFailed"),"bot")}}else if(me&&ie&&!le){let O=Y?18:parseInt(U.token_in_decimals||"18",10),z=parseInt(U.token_out_decimals||"18",10);const Q=[];if(U.token_out&&Q.push(U.token_out),U.token_in&&!Y&&Q.push(U.token_in),Q.length>0)try{const ae=await Ke.getTokensDetails(Q,m);if(ae?.data)for(const j of ae.data)!Y&&j.address.toLowerCase()===U.token_in?.toLowerCase()&&(O=j.decimals||O),j.address.toLowerCase()===U.token_out?.toLowerCase()&&(z=j.decimals||z)}catch(ae){console.warn("getTokensDetails failed in CASE 2, using fallback decimals:",ae)}if(H({descTokenAddress:U.token_out,descTokenDecimals:z}),Y)try{const ae=await ot({address:c?.address||"",chain:w});if(ae?.success&&ae?.data?.result){const V=ae.data.result.find(Fe=>Fe.native_token),ce=g?.nativeCurrency?.symbol||"ETH";let Ae=V?.balance_formatted||"0";try{const Fe=await ao({chainId:y,rpcUrl:A});if(Fe.isGreaterThan(0)){const qe=Fe.times(1e6),st=new ue(V?.balance||"0").minus(qe);st.isGreaterThan(0)?Ae=ue(Ue(BigInt(st.toFixed(0)),V?.decimals||18)).toFixed():Ae="0"}}catch(Fe){console.warn("getGasPrice for swap native fee deduction (CASE 2) failed:",Fe)}H({srcTokenAddress:Ye,srcTokenDecimals:O});const Pe=[25,50,75,100].map(Fe=>({id:`percent-${Fe}`,text:`${Fe}%`,value:a("buttonUsePercent",{percent:String(Fe),symbol:ce}),action:"select_percent",extraData:{percent:Fe,tokenAddress:Ye,tokenSymbol:ce,tokenBalance:Ae}}));f(a("selectAmountToSwap",{symbol:ce,balance:Ae}),"bot",te.id,Pe)}else f(r("couldNotFetchBalance"),"bot")}catch(ae){console.warn("Native balance fetch failed:",ae),f(r("couldNotFetchBalanceRetry"),"bot")}else{const ae=U.token_in_symbol||"Token";H({srcTokenAddress:U.token_in,srcTokenDecimals:O});try{const j=await ot({address:c?.address||"",chain:w});if(j?.success&&j?.data?.result){const ce=j.data.result.find(Pe=>Pe.token_address.toLowerCase()===U.token_in?.toLowerCase());if(!ce){f(a("swapTokenNotInWallet",{symbol:ae}),"bot"),v(!1);return}const Ce=[25,50,75,100].map(Pe=>({id:`percent-${Pe}`,text:`${Pe}%`,value:a("buttonUsePercent",{percent:String(Pe),symbol:ce.symbol}),action:"select_percent",extraData:{percent:Pe,tokenAddress:ce.token_address,tokenSymbol:ce.symbol,tokenBalance:ce.balance_formatted}}));f(a("selectAmountToSwap",{symbol:ce.symbol,balance:`${ce.balance_formatted} (~$${ce.usd_value?.toFixed(2)||"0"})`}),"bot",te.id,Ce)}else f(r("couldNotFetchBalance"),"bot")}catch(j){console.warn("Token balance fetch failed:",j),f(r("couldNotFetchBalanceRetry"),"bot")}}}else if(!me&&ie){f(X.message||"🔄 Please choose which token you want to swap from:","bot",te.id);let O=parseInt(U.token_out_decimals||"18",10);if(U.token_out)try{const z=await Ke.getTokensDetails([U.token_out],m);z?.data?.[0]&&(O=z.data[0].decimals||O)}catch(z){console.warn("getTokensDetails failed in CASE 3, using fallback:",z)}await ge(U.token_out,O)}else if(me&&!ie){let O=Y?18:parseInt(U.token_in_decimals||"18",10);if(U.token_in&&!Y)try{const z=await Ke.getTokensDetails([U.token_in],m);z?.data?.[0]&&(O=z.data[0].decimals||O)}catch(z){console.warn("getTokensDetails failed in CASE 4, using fallback:",z)}H(Y?{srcTokenAddress:Ye,srcTokenDecimals:18}:{srcTokenAddress:U.token_in,srcTokenDecimals:O}),f(X.message||`🔄 You want to swap ${U.token_in_symbol||"your token"}. Please choose which token you want to receive:`,"bot",te.id);try{v(!0);const z=g?.tokenTrendingDefault||[],[Q,ae]=await Promise.allSettled([Ke.getTopGainers(m,"24h",5),Ke.getTokensDetails(z,m)]);let j=[];Q.status==="fulfilled"&&Q.value?.data&&(j=[...Q.value.data]),ae.status==="fulfilled"&&ae.value?.data&&(j=[...ae.value.data,...j]),j=j.filter((ce,Ae,Ce)=>Ae===Ce.findIndex(Pe=>Pe.address.toLowerCase()===ce.address.toLowerCase()));const V=j.map(ce=>({id:ce?.symbol,text:ce?.symbol,value:a("buttonSwapTo",{name:ce.name,symbol:ce?.symbol||""}),action:"click_swap_dest_token",extraData:{tokenAddress:ce?.address||"",symbol:ce?.symbol||"",decimals:ce?.decimals||18}}));f(a("trendingTokensForReceive",{chain:g?.name||"Unknown"}),"bot",void 0,V)}catch(z){console.error("Error fetching trending tokens for swap:",z),f(r("couldNotLoadTokenList"),"bot")}finally{v(!1)}}else f(X.message||'🔄 I need more details for your swap. Please specify which tokens you want to swap (e.g. "Swap 1 ETH to USDC").',"bot",te.id)}else if(X.action==="view_nfts")f(X.message||"🖼️ Let me show you your NFT collection!","bot",te.id),await Se();else{const U=tc(X.action);let Y={...X.parameters||{}},fe;const me=["send_token","approve_token"].includes(X.action)&&(Y.contract_address||Y.token_symbol),ie=X.action==="send_native",le=X.action==="send_nft"&&Y.contract_address;if(me&&c?.address)try{const O=await ot({address:c.address,chain:w});if(O?.success&&O?.data?.result){const z=O.data.result,Q=Y.contract_address?z.find(ae=>ae.token_address.toLowerCase()===Y.contract_address.toLowerCase()):z.find(ae=>ae.symbol.toUpperCase()===Y.token_symbol.toUpperCase());Q&&(Y={...Y,contract_address:Q.token_address,decimals:String(Q.decimals)},fe={symbol:Q.symbol,name:Q.name,balance:Q.balance,balanceFormatted:Q.balance_formatted,usdValue:Q.usd_value,usdPrice:Q.usd_price,decimals:Q.decimals,logo:Q.logo||Q.thumbnail,contractAddress:Q.token_address})}}catch(O){console.warn("Token enrichment failed:",O)}if(me&&!fe&&Y.contract_address)try{const O=await Pi({address:Y.contract_address,chain:w});if(O?.success&&O?.data){const z=O.data;fe={symbol:z.symbol,name:z.name,balance:"0",balanceFormatted:"0",usdPrice:z.usd_price,decimals:z.decimals,logo:z.logo,contractAddress:Y.contract_address},Y={...Y,decimals:String(z.decimals)}}}catch(O){console.warn("Token metadata fallback failed:",O)}if(ie&&c?.address)try{const O=await ot({address:c.address,chain:w});if(O?.success&&O?.data?.result){const Q=O.data.result.find(ae=>ae.native_token);if(Q){let ae=Q.balance_formatted,j=Q.balance;try{const V=new ue(Q.balance),ce="0x"+BigInt(V.toFixed(0)).toString(16),Ae=await Qt({from:c.address,to:c.address,data:"0x",value:ce,chainId:y,rpcUrl:A});if(Ae.isGreaterThan(0)){const Ce=V.minus(Ae);Ce.isGreaterThan(0)?(j=Ce.toFixed(0),ae=ue(Ue(BigInt(Ce.toFixed(0)),Q.decimals)).toFixed()):(j="0",ae="0")}}catch(V){console.warn("Estimate send fee for send_native failed:",V)}fe={symbol:Q.symbol,name:Q.name,balance:j,balanceFormatted:ae,usdValue:Q.usd_value,usdPrice:Q.usd_price,decimals:Q.decimals,logo:Q.logo||Q.thumbnail,contractAddress:Ye}}}}catch(O){console.warn("Native token balance fetch failed:",O)}if(le)try{const O=await Ui({address:Y.contract_address,chain:w});if(O?.success&&O?.data){const z=O.data;z.contract_type&&(Y={...Y,token_standard:z.contract_type}),!Y.nft_name&&z.name&&(Y={...Y,nft_name:z.name})}}catch(O){console.warn("NFT contract metadata fetch failed:",O)}if(Y.amount&&fe?.balanceFormatted&&(X.action==="send_token"||X.action==="send_native")&&(Y.amount=io(Y.amount,fe.balanceFormatted)),U){const O=X.message||"Please review and complete the form below.";f(O,"bot",te.id,void 0,{action:X.action,parameters:Y,status:"pending",tokenInfo:fe})}else f(X.message||Z,"bot",te.id)}else if(X&&X.action==="chat"){const U=X.token_mentions||[],Y=X.suggested_actions||[],fe=[];U.length>0&&U.forEach(me=>{fe.push({id:`buy-${me.symbol}`,text:`💰 Buy ${me.symbol}`,value:a("buttonBuySymbol",{symbol:me.symbol}),action:"click_buy_item_token_button",extraData:{tokenAddress:me.contract_address||"",symbol:me.symbol,decimals:me.decimals||18},fullWidth:!0})}),Y.length>0&&Y.forEach((me,ie)=>{fe.push({id:`suggested-${ie}-${me.label}`,text:me.label,value:me.prompt,action:"suggested_action",fullWidth:!0})}),fe.length>0?f(X.message||Z,"bot",te.id,fe):f(X.message||Z,"bot",te.id)}else f(Z,"bot",te.id)}else f(r("errorProcessingRequest"),"bot",te.id)}catch(R){console.error("Error getting AI response:",R),f(r("errorProcessingRequest"),"bot",te.id)}v(!1),await lt(50),bn.isDesktop&&he.current?.focus()},[_,E,l,f,J,c?.address,g?.name,g?.nativeCurrency?.symbol,g?.tokenTrendingDefault,y,m,w,ge,we,Se,H,A,r,a]);se.useEffect(()=>{ye.current&&_===ye.current&&(ye.current=null,He())},[_,He]);const De=se.useCallback(async(M,te,R)=>{try{if(S(R,"submitted"),M==="swap_token"){let ne=18;if(te.token_in&&te.token_in!==Ye)try{const W=await Ke.getTokensDetails([te.token_in],m);W?.data?.[0]&&(ne=W.data[0].decimals||18)}catch(W){console.warn("getTokensDetails failed in ActionForm swap, using default 18:",W)}const oe=dt(te.amount||"0",ne).toString(),$=await no({chainId:y,tokenIn:te.token_in||"",tokenInAmount:oe,tokenOut:te.token_out||"",tokenOutRecipient:c?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if($.success&&$.data){const W=$.data,Z=W.tokenIn,X=W.tokenOut,U=ue(Ue(BigInt(Z.amount||0),Z.decimals)).decimalPlaces(6).toFormat(),Y=ue(Ue(BigInt(X.amount||0),X.decimals)).decimalPlaces(6).toFormat(),fe=!te.token_in||te.token_in===Ye;let me=!1;if(!fe&&c?.address&&W.tx?.to)try{const V=await ro({tokenAddress:te.token_in,ownerAddress:c.address,spenderAddress:W.tx.to,chainId:y,rpcUrl:A});me=ue(V.toString()).isLessThan(oe)}catch(V){console.warn("Allowance check failed in ActionForm swap:",V)}const ie=W.estimatedTransactionFee?.total?ue(W.estimatedTransactionFee.total):ue(0);let le=ue(0);if(me&&c?.address)try{const V=hn({tokenAddress:te.token_in,spenderAddress:W.tx?.to||"",fromAddress:c.address,chainId:y});le=await Qt({from:c.address,to:V.to,data:V.data,chainId:y,rpcUrl:A})}catch(V){console.warn("Approve fee estimation failed:",V)}const O=ie.plus(le),z=g?.nativeCurrency?.symbol||"native";let Q="",ae=!1;if(c?.address&&O.isGreaterThan(0))try{const V=await gn({address:c.address,chainId:y,rpcUrl:A});if(V.isLessThan(O)){ae=!0;const ce=ue(Ue(BigInt(V.toFixed(0)),18)).decimalPlaces(6).toFormat(),Ae=ue(Ue(BigInt(O.toFixed(0)),18)).decimalPlaces(6).toFormat();Q=a("swapFeeWarning",{symbol:z,balance:ce,needed:Ae})}}catch(V){console.warn("Fee balance check failed:",V)}const j=`From: ${U} ${Z.symbol}
417
+ `+sn+`
418
+ `;if(Xe)d($t,"bot");else if(Je){const De=[{id:"approve-for-swap",text:r("swapApproveButton",{symbol:Te.symbol}),value:r("swapApproveValue",{symbol:Te.symbol}),action:"approve_for_swap",fullWidth:!0,extraData:{tokenAddress:O,spenderAddress:ue.tx.to,tokenSymbol:Te.symbol,tx:ue.tx}}];d($t+r("swapNeedApprove",{symbol:Te.symbol}),"bot",void 0,De)}else{const De=[{id:"confirm-swap",text:"Yes",value:a("swapConfirmValue"),action:"confirm_swap",extraData:{tx:ue.tx}}];d($t+a("swapReadyToProceed"),"bot",void 0,De)}}else d(r("swapEstimationError",{error:Se.errorMessage||Se.error||"Unknown error"}),"bot")}catch(Y){console.error("Swap estimation error:",Y),d(a("swapEstimationFailed"),"bot")}}else if(J&&ee&&!fe){let Y=q?18:parseInt(U.token_in_decimals||"18",10),oe=parseInt(U.token_out_decimals||"18",10);const V=[];if(U.token_out&&V.push(U.token_out),U.token_in&&!q&&V.push(U.token_in),V.length>0)try{const O=await et.getTokensDetails(V,h);if(O?.data)for(const ce of O.data)!q&&ce.address.toLowerCase()===U.token_in?.toLowerCase()&&(Y=ce.decimals||Y),ce.address.toLowerCase()===U.token_out?.toLowerCase()&&(oe=ce.decimals||oe)}catch(O){console.warn("getTokensDetails failed in CASE 2, using fallback decimals:",O)}if($({descTokenAddress:U.token_out,descTokenDecimals:oe}),q)try{const O=await Ye({address:i?.address||"",chain:y});if(O?.success&&O?.data?.result){const Se=O.data.result.find(Ue=>Ue.native_token),ue=m?.nativeCurrency?.symbol||"ETH";let Te=Se?.balance_formatted||"0";try{const Ue=await co({chainId:v,rpcUrl:A});if(Ue.isGreaterThan(0)){const Je=Ue.times(1e6),ct=new le(Se?.balance||"0").minus(Je);ct.isGreaterThan(0)?Te=le(Oe(BigInt(ct.toFixed(0)),Se?.decimals||18)).toFixed():Te="0"}}catch(Ue){console.warn("getGasPrice for swap native fee deduction (CASE 2) failed:",Ue)}$({srcTokenAddress:$e,srcTokenDecimals:Y});const Ne=[25,50,75,100].map(Ue=>({id:`percent-${Ue}`,text:`${Ue}%`,value:r("buttonUsePercent",{percent:String(Ue),symbol:ue}),action:"select_percent",extraData:{percent:Ue,tokenAddress:$e,tokenSymbol:ue,tokenBalance:Te}}));d(r("selectAmountToSwap",{symbol:ue,balance:Te}),"bot",K.id,Ne)}else d(a("couldNotFetchBalance"),"bot")}catch(O){console.warn("Native balance fetch failed:",O),d(a("couldNotFetchBalanceRetry"),"bot")}else{const O=U.token_in_symbol||"Token";$({srcTokenAddress:U.token_in,srcTokenDecimals:Y});try{const ce=await Ye({address:i?.address||"",chain:y});if(ce?.success&&ce?.data?.result){const ue=ce.data.result.find(Ne=>Ne.token_address.toLowerCase()===U.token_in?.toLowerCase());if(!ue){d(r("swapTokenNotInWallet",{symbol:O}),"bot"),w(!1);return}const Ce=[25,50,75,100].map(Ne=>({id:`percent-${Ne}`,text:`${Ne}%`,value:r("buttonUsePercent",{percent:String(Ne),symbol:ue.symbol}),action:"select_percent",extraData:{percent:Ne,tokenAddress:ue.token_address,tokenSymbol:ue.symbol,tokenBalance:ue.balance_formatted}}));d(r("selectAmountToSwap",{symbol:ue.symbol,balance:`${ue.balance_formatted} (~$${ue.usd_value?.toFixed(2)||"0"})`}),"bot",K.id,Ce)}else d(a("couldNotFetchBalance"),"bot")}catch(ce){console.warn("Token balance fetch failed:",ce),d(a("couldNotFetchBalanceRetry"),"bot")}}}else if(!J&&ee){d(L.message||"🔄 Please choose which token you want to swap from:","bot",K.id);let Y=parseInt(U.token_out_decimals||"18",10);if(U.token_out)try{const oe=await et.getTokensDetails([U.token_out],h);oe?.data?.[0]&&(Y=oe.data[0].decimals||Y)}catch(oe){console.warn("getTokensDetails failed in CASE 3, using fallback:",oe)}await be(U.token_out,Y)}else if(J&&!ee){let Y=q?18:parseInt(U.token_in_decimals||"18",10);if(U.token_in&&!q)try{const oe=await et.getTokensDetails([U.token_in],h);oe?.data?.[0]&&(Y=oe.data[0].decimals||Y)}catch(oe){console.warn("getTokensDetails failed in CASE 4, using fallback:",oe)}$(q?{srcTokenAddress:$e,srcTokenDecimals:18}:{srcTokenAddress:U.token_in,srcTokenDecimals:Y}),d(L.message||`🔄 You want to swap ${U.token_in_symbol||"your token"}. Please choose which token you want to receive:`,"bot",K.id);try{w(!0);const oe=m?.tokenTrendingDefault||[],[V,O]=await Promise.allSettled([et.getTopGainers(h,"24h",5),et.getTokensDetails(oe,h)]);let ce=[];V.status==="fulfilled"&&V.value?.data&&(ce=[...V.value.data]),O.status==="fulfilled"&&O.value?.data&&(ce=[...O.value.data,...ce]),ce=ce.filter((ue,Te,Ce)=>Te===Ce.findIndex(Ne=>Ne.address.toLowerCase()===ue.address.toLowerCase()));const Se=ce.map(ue=>({id:ue?.symbol,text:ue?.symbol,value:r("buttonSwapTo",{name:ue.name,symbol:ue?.symbol||""}),action:"click_swap_dest_token",extraData:{tokenAddress:ue?.address||"",symbol:ue?.symbol||"",decimals:ue?.decimals||18}}));d(r("trendingTokensForReceive",{chain:m?.name||"Unknown"}),"bot",void 0,Se)}catch(oe){console.error("Error fetching trending tokens for swap:",oe),d(a("couldNotLoadTokenList"),"bot")}finally{w(!1)}}else d(L.message||'🔄 I need more details for your swap. Please specify which tokens you want to swap (e.g. "Swap 1 ETH to USDC").',"bot",K.id)}else if(L.action==="view_balances")d(L.message||a("viewBalancesLoading"),"bot",K.id),await Ve();else if(L.action==="view_nfts")d(L.message||"🖼️ Let me show you your NFT collection!","bot",K.id),await Ee();else if(L.action==="send_token"&&!L.parameters?.contract_address&&!L.parameters?.token_symbol&&i?.address){d("💰 Which token would you like to send?","bot",K.id);try{w(!0);const U=await Ye({address:i.address,chain:y});if(U?.success&&U?.data?.result&&U.data.result.length>0){const Z=U.data.result.map(J=>({id:`send-select-${J.token_address}`,text:`Send ${J.name} (${J.symbol})`,value:`Send ${J.name} (${J.symbol})`,action:"suggested_action",fullWidth:!0}));await nt(500),w(!1),d(r("walletBalanceSpendable",{chain:m?.name||"this chain"}),"bot",void 0,Z)}else w(!1),d(r("walletNoTokensFound",{chain:m?.name||"this chain"}),"bot")}catch(U){console.warn("Failed to fetch balance for send_token picker:",U),w(!1),d(a("walletFetchError"),"bot")}}else if(L.action==="send_nft"&&!L.parameters?.contract_address&&!L.parameters?.token_id&&!L.parameters?.nft_name&&i?.address)d("Which NFT would you like to send?","bot",K.id),await Ee();else{const U=tc(L.action);let q={...L.parameters||{}},Z;const J=["send_token","approve_token"].includes(L.action)&&(q.contract_address||q.token_symbol),ee=L.action==="send_native",fe=L.action==="send_nft"&&q.contract_address;if(J&&i?.address)try{const Y=await Ye({address:i.address,chain:y});if(Y?.success&&Y?.data?.result){const oe=Y.data.result,V=q.contract_address?oe.find(O=>O.token_address.toLowerCase()===q.contract_address.toLowerCase()):oe.find(O=>O.symbol.toUpperCase()===q.token_symbol.toUpperCase());V&&(q={...q,contract_address:V.token_address,decimals:String(V.decimals)},Z={symbol:V.symbol,name:V.name,balance:V.balance,balanceFormatted:V.balance_formatted,usdValue:V.usd_value,usdPrice:V.usd_price,decimals:V.decimals,logo:V.logo||V.thumbnail,contractAddress:V.token_address})}}catch(Y){console.warn("Token enrichment failed:",Y)}if(J&&!Z&&q.contract_address)try{const Y=await Fi({address:q.contract_address,chain:y});if(Y?.success&&Y?.data){const oe=Y.data;Z={symbol:oe.symbol,name:oe.name,balance:"0",balanceFormatted:"0",usdPrice:oe.usd_price,decimals:oe.decimals,logo:oe.logo,contractAddress:q.contract_address},q={...q,decimals:String(oe.decimals)}}}catch(Y){console.warn("Token metadata fallback failed:",Y)}if(ee&&i?.address)try{const Y=await Ye({address:i.address,chain:y});if(Y?.success&&Y?.data?.result){const V=Y.data.result.find(O=>O.native_token);if(V){let O=V.balance_formatted,ce=V.balance;try{const Se=new le(V.balance),ue="0x"+BigInt(Se.toFixed(0)).toString(16),Te=await nn({from:i.address,to:i.address,data:"0x",value:ue,chainId:v,rpcUrl:A});if(Te.isGreaterThan(0)){const Ce=Se.minus(Te);Ce.isGreaterThan(0)?(ce=Ce.toFixed(0),O=le(Oe(BigInt(Ce.toFixed(0)),V.decimals)).toFixed()):(ce="0",O="0")}}catch(Se){console.warn("Estimate send fee for send_native failed:",Se)}Z={symbol:V.symbol,name:V.name,balance:ce,balanceFormatted:O,usdValue:V.usd_value,usdPrice:V.usd_price,decimals:V.decimals,logo:V.logo||V.thumbnail,contractAddress:$e}}}}catch(Y){console.warn("Native token balance fetch failed:",Y)}if(fe)try{const Y=await Oi({address:q.contract_address,chain:y});if(Y?.success&&Y?.data){const oe=Y.data;oe.contract_type&&(q={...q,token_standard:oe.contract_type}),!q.nft_name&&oe.name&&(q={...q,nft_name:oe.name})}}catch(Y){console.warn("NFT contract metadata fetch failed:",Y)}if(q.amount&&Z?.balanceFormatted&&(L.action==="send_token"||L.action==="send_native")&&(q.amount=lo(q.amount,Z.balanceFormatted)),U){const Y=L.message||"Please review and complete the form below.";d(Y,"bot",K.id,void 0,{action:L.action,parameters:q,status:"pending",tokenInfo:Z})}else d(L.message||me,"bot",K.id)}else if(L&&L.action==="chat"){const U=L.token_mentions||[],q=L.suggested_actions||[],Z=[];U.length>0&&U.forEach(J=>{Z.push({id:`buy-${J.symbol}`,text:`💰 Buy ${J.symbol}`,value:r("buttonBuySymbol",{symbol:J.symbol}),action:"click_buy_item_token_button",extraData:{tokenAddress:J.contract_address||"",symbol:J.symbol,decimals:J.decimals||18},fullWidth:!0})}),q.length>0&&q.forEach((J,ee)=>{Z.push({id:`suggested-${ee}-${J.label}`,text:J.label,value:J.prompt,action:"suggested_action",fullWidth:!0})}),Z.length>0?d(L.message||me,"bot",K.id,Z):d(L.message||me,"bot",K.id)}else d(me,"bot",K.id)}else d(a("errorProcessingRequest"),"bot",K.id)}catch(H){console.error("Error getting AI response:",H),d(a("errorProcessingRequest"),"bot",K.id)}w(!1),await nt(50),Vt.isDesktop&&he.current?.focus()},[_,E,l,d,Q,i?.address,m?.name,m?.nativeCurrency?.symbol,m?.tokenTrendingDefault,v,h,y,b,be,we,Ee,Ve,$,A,a,r]);se.useEffect(()=>{ye.current&&_===ye.current&&(ye.current=null,Pe())},[_,Pe]);const ze=se.useCallback(async(D,K,H)=>{try{if(S(H,"submitted"),D==="swap_token"){let te=18;if(K.token_in&&K.token_in!==$e)try{const z=await et.getTokensDetails([K.token_in],h);z?.data?.[0]&&(te=z.data[0].decimals||18)}catch(z){console.warn("getTokensDetails failed in ActionForm swap, using default 18:",z)}const X=pt(K.amount||"0",te).toString(),W=await so({chainId:v,tokenIn:K.token_in||"",tokenInAmount:X,tokenOut:K.token_out||"",tokenOutRecipient:i?.address||"",slippage:"auto",accesstoken:"d6c45897b8f6"});if(W.success&&W.data){const z=W.data,ie=z.tokenIn,me=z.tokenOut,L=le(Oe(BigInt(ie.amount||0),ie.decimals)).decimalPlaces(6).toFormat(),U=le(Oe(BigInt(me.amount||0),me.decimals)).decimalPlaces(6).toFormat(),q=!K.token_in||K.token_in===$e;let Z=!1;if(!q&&i?.address&&z.tx?.to)try{const ce=await io({tokenAddress:K.token_in,ownerAddress:i.address,spenderAddress:z.tx.to,chainId:v,rpcUrl:A});Z=le(ce.toString()).isLessThan(X)}catch(ce){console.warn("Allowance check failed in ActionForm swap:",ce)}const J=z.estimatedTransactionFee?.total?le(z.estimatedTransactionFee.total):le(0);let ee=le(0);if(Z&&i?.address)try{const ce=wn({tokenAddress:K.token_in,spenderAddress:z.tx?.to||"",fromAddress:i.address,chainId:v});ee=await nn({from:i.address,to:ce.to,data:ce.data,chainId:v,rpcUrl:A})}catch(ce){console.warn("Approve fee estimation failed:",ce)}const fe=J.plus(ee),Y=m?.nativeCurrency?.symbol||"native";let oe="",V=!1;if(i?.address&&fe.isGreaterThan(0))try{const ce=await yn({address:i.address,chainId:v,rpcUrl:A});if(ce.isLessThan(fe)){V=!0;const Se=le(Oe(BigInt(ce.toFixed(0)),18)).decimalPlaces(6).toFormat(),ue=le(Oe(BigInt(fe.toFixed(0)),18)).decimalPlaces(6).toFormat();oe=r("swapFeeWarning",{symbol:Y,balance:Se,needed:ue})}}catch(ce){console.warn("Fee balance check failed:",ce)}const O=`From: ${L} ${ie.symbol}
395
419
  ⬇️
396
- To: ${Y} ${X.symbol}
420
+ To: ${U} ${me.symbol}
397
421
 
398
- `+Q+`
399
- `;if(ae)S(R,"fail"),f(j,"bot");else if(me){const V=[{id:"approve-swap-actionform",text:a("swapApproveButton",{symbol:Z.symbol}),value:a("swapApproveValue",{symbol:Z.symbol}),action:"approve_for_swap",extraData:{tokenAddress:te.token_in,spenderAddress:W.tx.to,tokenSymbol:Z.symbol,tx:W.tx},fullWidth:!0}];S(R,"success"),f(j+a("swapApprovalRequired",{symbol:Z.symbol}),"bot",void 0,V)}else{const V=[{id:"confirm-swap-actionform",text:"Yes",value:r("swapConfirmValue"),action:"confirm_swap",extraData:{tx:W.tx}}];S(R,"success"),f(j+r("swapReadyToProceed"),"bot",void 0,V)}}else S(R,"fail"),f(a("swapEstimationError",{error:$.errorMessage||$.error||"Unknown error"}),"bot")}else{const ne=Ji({action:M,parameters:te,fromAddress:c?.address||"",chainId:y||1}),oe={from:ne.from,to:ne.to,data:ne.data,value:ne.value,chainId:ne.chainId};if((M==="send_token"||M==="send_native"||M==="send_nft")&&c?.address)try{const $=g?.nativeCurrency?.symbol||"native",W=await Qt({from:ne.from,to:ne.to,data:ne.data,value:ne.value&&ne.value!=="0"?`0x${BigInt(ne.value).toString(16)}`:void 0,chainId:y,rpcUrl:A});if(W.isGreaterThan(0)){const Z=await gn({address:c.address,chainId:y,rpcUrl:A});if(Z.isLessThan(W)){const X=ue(Ue(BigInt(Z.toFixed(0)),18)).decimalPlaces(6).toFormat(),U=ue(Ue(BigInt(W.toFixed(0)),18)).decimalPlaces(6).toFormat();S(R,"fail"),f(a("txInsufficientGas",{symbol:$,balance:X,fee:U}),"bot");return}}}catch($){console.warn("Pre-execution fee check failed:",$)}if(n){const $=await n(oe);if($.status==="success"&&$.transactionHash){const W=g?.blockExplorers?.default?.url,Z=W?`
400
- [View on Explorer](${W}/tx/${$.transactionHash})`:`
401
- Tx: ${$.transactionHash}`,X=f(r("txSubmitted")+Z,"bot");try{await lt(2e3),(await so({transactionHash:$.transactionHash,chainId:y||1,rpcUrl:A})).status==="success"?(S(R,"success"),N(X.id,r("txConfirmed")+Z)):(S(R,"fail"),N(X.id,r("txReverted")+Z))}catch(U){console.warn("Transaction tracking timeout:",U),S(R,"success"),f(r("txTimeout")+Z,"bot")}}else if($.status==="success")S(R,"success"),f(r("txSuccessful"),"bot");else{S(R,"fail");const W=$.error?`
402
- Error: ${$.error}`:"";f(r("txFailed")+W,"bot")}}else S(R,"fail"),f(r("txNoHandler"),"bot")}}catch(ne){console.error("Action form submit error:",ne),S(R,"fail"),f(a("txError",{message:ne instanceof Error?ne.message:"Unknown error"}),"bot")}},[S,y,c?.address,m,f,n,g?.blockExplorers?.default?.url,g?.nativeCurrency?.symbol,N,A,r,a]),ze=se.useCallback(M=>{S(M,"fail")},[S]),[Me,Ne]=se.useState({}),Te=se.useCallback(async(M,te,R)=>{Ne(ne=>({...ne,[R]:!0}));try{await De(M,te,R)}finally{Ne(ne=>({...ne,[R]:!1}))}},[De]),Ct=se.useCallback(M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),He())},[He]),Rt=se.useCallback(()=>{const M=window.getSelection();M&&M.toString().length>0||t()},[t]);return e?B.jsx("div",{className:`chat-modal-overlay${o==="bottom-left"?" chat-modal-overlay--left":""}`,onClick:Rt,role:"dialog","aria-modal":"true","aria-labelledby":"chat-modal-title",children:B.jsxs("div",{className:"chat-modal",style:s,onClick:M=>M.stopPropagation(),children:[B.jsxs("div",{className:"chat-modal-header",children:[B.jsxs("div",{className:"chat-modal-header-left",children:[B.jsx("div",{className:"keyring-logo",children:B.jsx("img",{src:Di,alt:"Keyring Logo",width:40,height:40})}),B.jsx("h3",{id:"chat-modal-title",children:r("chatTitle")})]}),B.jsx("button",{className:"close-button",onClick:t,"aria-label":r("closeChat"),type:"button",children:B.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:B.jsx("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),B.jsx(vi,{address:c?.address,chainId:g?.chainId}),B.jsxs("div",{className:"chat-modal-messages-wrapper",children:[B.jsxs("div",{className:"chat-modal-messages",ref:K,role:"log","aria-live":"polite",children:[l.map((M,te)=>B.jsxs("div",{children:[et(te)&&B.jsx("div",{className:"date-separator",children:pi(M.timestamp)}),B.jsxs("div",{className:`message ${M.sender==="user"?"message-user":"message-bot"}`,role:"article",children:[B.jsx("button",{className:"message-reply-button",onClick:()=>re(M),"aria-label":r("replyToMessage"),type:"button",children:B.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:B.jsx("path",{d:"M3.5 8.5L1 6L3.5 3.5M1.5 6H10C12.2091 6 14 7.79086 14 10V13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),B.jsxs("div",{className:"message-bubble",children:[M.replyTo&&B.jsxs("div",{className:"message-reply-to",children:[B.jsxs("div",{className:"message-reply-to-label",children:[r("replyingTo")," ",M.replyTo.sender==="user"?r("replyingToYou"):r("replyingToAgent")]}),B.jsx("div",{className:"message-reply-to-text",children:M.replyTo.text})]}),B.jsx("div",{className:"message-text",children:B.jsx(Hi,{content:M.text})}),M.buttons&&M.buttons.length>0&&B.jsx("div",{className:"message-buttons",children:M.buttons.map(R=>B.jsx("button",{className:`message-button ${R.fullWidth?"full-width":""} ${R.action==="suggested_action"?"suggested-action":""}`,onClick:()=>G(R.value,R.action,R?.extraData),type:"button",children:R.text},R.id))}),M.actionData&&M.actionData.status==="pending"&&B.jsx($i,{action:M.actionData.action,initialValues:M.actionData.parameters,onSubmit:(R,ne)=>Te(R,ne,M.id),onCancel:()=>ze(M.id),isSubmitting:Me[M.id]||!1,tokenInfo:M.actionData.tokenInfo}),M.actionData&&M.actionData.status==="submitted"&&B.jsx("div",{className:"action-status action-status-submitted",children:r("actionProcessing")}),M.actionData&&M.actionData.status==="success"&&B.jsx("div",{className:"action-status action-status-success",children:r("actionSuccess")}),M.actionData&&M.actionData.status==="fail"&&B.jsx("div",{className:"action-status action-status-fail",children:r("actionFail")}),B.jsxs("div",{className:"message-timestamp",children:[M.timestamp.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),M.sender==="user"&&B.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"check-icon",children:B.jsx("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})]},M.id)),E&&B.jsx("div",{className:"message message-bot typing-indicator",role:"status","aria-label":r("botIsTyping"),children:B.jsxs("div",{className:"message-bubble",children:[B.jsx("span",{className:"typing-dot"}),B.jsx("span",{className:"typing-dot"}),B.jsx("span",{className:"typing-dot"})]})}),(C||l.length===1)&&B.jsxs(B.Fragment,{children:[B.jsx("div",{className:"message message-bot",role:"article",children:B.jsx("div",{className:"message-bubble",children:B.jsx("div",{className:"message-text",children:r("canIHelpYou")})})}),B.jsx("div",{className:"suggestions-container",children:Ge.map(M=>B.jsxs("button",{className:"suggestion-button",onClick:M.action,type:"button",children:[B.jsx("span",{className:"suggestion-icon",children:M.icon}),B.jsx("span",{className:"suggestion-text",children:M.text})]},M.id))})]}),B.jsx("div",{ref:q})]}),B.jsx(zi,{scrollContainerRef:K})]}),B.jsxs("div",{className:"chat-modal-input",children:[J&&B.jsxs("div",{className:"reply-preview",children:[B.jsxs("div",{className:"reply-preview-content",children:[B.jsxs("div",{className:"reply-preview-label",children:[r("replyingTo")," ",J.sender==="user"?r("replyingToYou"):r("replyingToAgent")]}),B.jsx("div",{className:"reply-preview-text",children:J.text})]}),B.jsx("button",{className:"reply-preview-close",onClick:()=>I(null),"aria-label":r("cancelReply"),type:"button",children:B.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:B.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),B.jsxs("div",{className:"chat-modal-input-row",children:[B.jsx("input",{ref:he,type:"text",placeholder:r("messagePlaceholder"),value:_,onChange:M=>b(M.target.value),onKeyPress:Ct,disabled:E,"aria-label":"Message input"}),B.jsx("button",{className:"send-button",onClick:He,"aria-label":r("sendMessage"),disabled:E||_?.trim()==="",type:"button",children:B.jsx("img",{src:Mi,alt:"Send",width:44,height:44})})]})]})]})}):null},ic=({position:e,theme:t,defaultOpen:n,onOpen:o,onClose:s,onTransaction:r})=>{const[a,l]=se.useState(n);se.useEffect(()=>{n&&o&&o()},[]),se.useEffect(()=>{if(typeof window>"u")return;const b=document.body,E=document.documentElement;return!!a?(b.style.overscrollBehavior="none",E.style.overscrollBehavior="none"):(b.style.overscrollBehavior="auto",E.style.overscrollBehavior="auto"),()=>{b.style.overscrollBehavior="auto",E.style.overscrollBehavior="auto"}},[a]);const f=se.useCallback(()=>{l(!0),o?.()},[o]),S=se.useCallback(()=>{l(!1),s?.()},[s]),N=se.useCallback(()=>{a?S():f()},[a,f,S]),_={position:"fixed",[e==="bottom-right"?"right":"left"]:"20px",bottom:"20px",zIndex:t.zIndex??9999};return B.jsxs("div",{style:_,role:"complementary","aria-label":"Chat widget",children:[B.jsx(Hs,{onClick:N}),B.jsx(ac,{isOpen:a,onClose:S,onTransaction:r,position:e,modalChatStyle:t.modalChatStyle})]})},cc=({position:e="bottom-right",theme:t={},defaultOpen:n=!1,onOpen:o,onClose:s,account:r,onTransaction:a,language:l="en",rpcUrls:f})=>{const S={position:e,theme:t,rpcUrls:f};return typeof window>"u"?null:B.jsx(Bi,{initialConfig:S,children:B.jsx(yi,{initialAccount:r,children:B.jsx(Rs,{initialLanguage:l,children:B.jsx(ic,{position:e,theme:t,defaultOpen:n,onOpen:o,onClose:s,onTransaction:a})})})})};pt.ChatWidget=cc,Object.defineProperty(pt,Symbol.toStringTag,{value:"Module"})}));
422
+ `+oe+`
423
+ `;if(V)S(H,"fail"),d(O,"bot");else if(Z){const ce=[{id:"approve-swap-actionform",text:r("swapApproveButton",{symbol:ie.symbol}),value:r("swapApproveValue",{symbol:ie.symbol}),action:"approve_for_swap",extraData:{tokenAddress:K.token_in,spenderAddress:z.tx.to,tokenSymbol:ie.symbol,tx:z.tx},fullWidth:!0}];S(H,"success"),d(O+r("swapApprovalRequired",{symbol:ie.symbol}),"bot",void 0,ce)}else{const ce=[{id:"confirm-swap-actionform",text:"Yes",value:a("swapConfirmValue"),action:"confirm_swap",extraData:{tx:z.tx}}];S(H,"success"),d(O+a("swapReadyToProceed"),"bot",void 0,ce)}}else S(H,"fail"),d(r("swapEstimationError",{error:W.errorMessage||W.error||"Unknown error"}),"bot")}else{const te=Ji({action:D,parameters:K,fromAddress:i?.address||"",chainId:v||1}),X={from:te.from,to:te.to,data:te.data,value:te.value,chainId:te.chainId};if((D==="send_token"||D==="send_native"||D==="send_nft")&&i?.address)try{const W=m?.nativeCurrency?.symbol||"native",z=await nn({from:te.from,to:te.to,data:te.data,value:te.value&&te.value!=="0"?`0x${BigInt(te.value).toString(16)}`:void 0,chainId:v,rpcUrl:A});if(z.isGreaterThan(0)){const ie=await yn({address:i.address,chainId:v,rpcUrl:A});if(ie.isLessThan(z)){const me=le(Oe(BigInt(ie.toFixed(0)),18)).decimalPlaces(6).toFormat(),L=le(Oe(BigInt(z.toFixed(0)),18)).decimalPlaces(6).toFormat();S(H,"fail"),d(r("txInsufficientGas",{symbol:W,balance:me,fee:L}),"bot");return}}}catch(W){console.warn("Pre-execution fee check failed:",W)}if(n){w(!1);const W=await n(X);if(W.status==="success"&&W.transactionHash){const z=m?.blockExplorers?.default?.url,ie=z?`
424
+ [View on Explorer](${z}/tx/${W.transactionHash})`:`
425
+ Tx: ${W.transactionHash}`,me=d(a("txSubmitted")+ie,"bot");try{await nt(2e3),(await ro({transactionHash:W.transactionHash,chainId:v||1,rpcUrl:A})).status==="success"?(S(H,"success"),N(me.id,a("txConfirmed")+ie)):(S(H,"fail"),N(me.id,a("txReverted")+ie))}catch(L){console.warn("Transaction tracking timeout:",L),S(H,"success"),d(a("txTimeout")+ie,"bot")}}else if(W.status==="success")S(H,"success"),d(a("txSuccessful"),"bot");else{S(H,"fail");const z=W.error?`
426
+ Error: ${W.error}`:"";d(a("txFailed")+z,"bot")}}else S(H,"fail"),d(a("txNoHandler"),"bot")}}catch(te){console.error("Action form submit error:",te),S(H,"fail"),d(r("txError",{message:te instanceof Error?te.message:"Unknown error"}),"bot")}},[S,v,i?.address,h,d,n,m?.blockExplorers?.default?.url,m?.nativeCurrency?.symbol,N,A,a,r]),_e=se.useCallback(D=>{S(D,"fail")},[S]),[Fe,ke]=se.useState({}),Nt=se.useCallback(async(D,K,H)=>{ke(te=>({...te,[H]:!0}));try{await ze(D,K,H)}finally{ke(te=>({...te,[H]:!1}))}},[ze]),Wt=se.useCallback(D=>{D.key==="Enter"&&!D.shiftKey&&(D.preventDefault(),Pe())},[Pe]),ht=se.useCallback(()=>{const D=window.getSelection();D&&D.toString().length>0||t()},[t]);return e?C.jsx("div",{className:`chat-modal-overlay${o==="bottom-left"?" chat-modal-overlay--left":""}`,onClick:ht,role:"dialog","aria-modal":"true","aria-labelledby":"chat-modal-title",children:C.jsxs("div",{className:"chat-modal",style:s,onClick:D=>D.stopPropagation(),children:[C.jsxs("div",{className:"chat-modal-header",children:[C.jsxs("div",{className:"chat-modal-header-left",children:[C.jsx("div",{className:"keyring-logo",children:C.jsx("img",{src:Mi,alt:"Keyring Logo",width:40,height:40})}),C.jsx("h3",{id:"chat-modal-title",children:a("chatTitle")})]}),C.jsx("button",{className:"close-button",onClick:t,"aria-label":a("closeChat"),type:"button",children:C.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:C.jsx("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),C.jsx(vi,{address:i?.address,chainId:m?.chainId}),C.jsxs("div",{className:"chat-modal-messages-wrapper",children:[C.jsxs("div",{className:"chat-modal-messages",ref:ne,role:"log","aria-live":"polite",children:[l.map((D,K)=>C.jsxs("div",{children:[je(K)&&C.jsx("div",{className:"date-separator",children:pi(D.timestamp)}),C.jsxs("div",{className:`message ${D.sender==="user"?"message-user":"message-bot"}`,role:"article",children:[C.jsx("button",{className:"message-reply-button",onClick:()=>re(D),"aria-label":a("replyToMessage"),type:"button",children:C.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:C.jsx("path",{d:"M3.5 8.5L1 6L3.5 3.5M1.5 6H10C12.2091 6 14 7.79086 14 10V13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),C.jsxs("div",{className:"message-bubble",children:[D.replyTo&&C.jsxs("div",{className:"message-reply-to",children:[C.jsxs("div",{className:"message-reply-to-label",children:[a("replyingTo")," ",D.replyTo.sender==="user"?a("replyingToYou"):a("replyingToAgent")]}),C.jsx("div",{className:"message-reply-to-text",children:D.replyTo.text})]}),C.jsx("div",{className:"message-text",children:C.jsx(Vi,{content:D.text})}),D.buttons&&D.buttons.length>0&&C.jsx("div",{className:"message-buttons",children:D.buttons.map(H=>C.jsx("button",{className:`message-button ${H.fullWidth?"full-width":""} ${H.action==="suggested_action"?"suggested-action":""}`,onClick:()=>G(H.value,H.action,H?.extraData),type:"button",children:H.text},H.id))}),D.actionData&&D.actionData.status==="pending"&&C.jsx(Gi,{action:D.actionData.action,initialValues:D.actionData.parameters,onSubmit:(H,te)=>Nt(H,te,D.id),onCancel:()=>_e(D.id),isSubmitting:Fe[D.id]||!1,tokenInfo:D.actionData.tokenInfo}),D.actionData&&D.actionData.status==="submitted"&&C.jsx("div",{className:"action-status action-status-submitted",children:a("actionProcessing")}),D.actionData&&D.actionData.status==="success"&&C.jsx("div",{className:"action-status action-status-success",children:a("actionSuccess")}),D.actionData&&D.actionData.status==="fail"&&C.jsx("div",{className:"action-status action-status-fail",children:a("actionFail")}),C.jsxs("div",{className:"message-timestamp",children:[D.timestamp.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),D.sender==="user"&&C.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"check-icon",children:C.jsx("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})]},D.id)),E&&C.jsx("div",{className:"message message-bot typing-indicator",role:"status","aria-label":a("botIsTyping"),children:C.jsxs("div",{className:"message-bubble",children:[C.jsx("span",{className:"typing-dot"}),C.jsx("span",{className:"typing-dot"}),C.jsx("span",{className:"typing-dot"})]})}),(B||l.length===1)&&C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"message message-bot",role:"article",children:C.jsx("div",{className:"message-bubble",children:C.jsx("div",{className:"message-text",children:a("canIHelpYou")})})}),C.jsx("div",{className:"suggestions-container",children:st.map(D=>C.jsxs("button",{className:"suggestion-button",onClick:D.action,type:"button",children:[C.jsx("span",{className:"suggestion-icon",children:D.icon}),C.jsx("span",{className:"suggestion-text",children:D.text})]},D.id))})]}),C.jsx("div",{ref:j})]}),C.jsx(zi,{scrollContainerRef:ne})]}),C.jsxs("div",{className:"chat-modal-input",children:[Q&&C.jsxs("div",{className:"reply-preview",children:[C.jsxs("div",{className:"reply-preview-content",children:[C.jsxs("div",{className:"reply-preview-label",children:[a("replyingTo")," ",Q.sender==="user"?a("replyingToYou"):a("replyingToAgent")]}),C.jsx("div",{className:"reply-preview-text",children:Q.text})]}),C.jsx("button",{className:"reply-preview-close",onClick:()=>I(null),"aria-label":a("cancelReply"),type:"button",children:C.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:C.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),C.jsxs("div",{className:"chat-modal-input-row",children:[C.jsx("input",{ref:he,type:"text",placeholder:a("messagePlaceholder"),value:_,onChange:D=>g(D.target.value),onKeyPress:Wt,disabled:E,"aria-label":"Message input"}),C.jsx("button",{className:"send-button",onClick:Pe,"aria-label":a("sendMessage"),disabled:E||_?.trim()==="",type:"button",children:C.jsx("img",{src:_i,alt:"Send",width:44,height:44})})]})]})]})}):null},ic=({position:e,theme:t,defaultOpen:n,onOpen:o,onClose:s,onTransaction:a})=>{const[r,l]=se.useState(n);se.useEffect(()=>{n&&o&&o()},[]),se.useEffect(()=>{if(typeof window>"u")return;const g=document.body,E=document.documentElement,w=g.style.overscrollBehavior,B=E.style.overscrollBehavior,M=g.style.overflow;return r&&(g.style.overscrollBehavior="none",E.style.overscrollBehavior="none",g.style.overflow="hidden"),()=>{g.style.overscrollBehavior=w,E.style.overscrollBehavior=B,g.style.overflow=M}},[r]);const d=se.useCallback(()=>{l(!0),o?.()},[o]),S=se.useCallback(()=>{l(!1),s?.()},[s]),N=se.useCallback(()=>{r?S():d()},[r,d,S]),_={position:"fixed",[e==="bottom-right"?"right":"left"]:"20px",bottom:"20px",zIndex:t.zIndex??9999};return C.jsxs("div",{style:_,role:"complementary","aria-label":"Chat widget",children:[C.jsx(Hs,{onClick:N}),C.jsx(rc,{isOpen:r,onClose:S,onTransaction:a,position:e,modalChatStyle:t.modalChatStyle})]})},cc=({position:e="bottom-right",theme:t={},defaultOpen:n=!1,onOpen:o,onClose:s,account:a,onTransaction:r,language:l="en",rpcUrls:d})=>{const S={position:e,theme:t,rpcUrls:d};return typeof window>"u"?null:C.jsx(Ci,{initialConfig:S,children:C.jsx(yi,{initialAccount:a,children:C.jsx(Rs,{initialLanguage:l,children:C.jsx(ic,{position:e,theme:t,defaultOpen:n,onOpen:o,onClose:s,onTransaction:r})})})})};bt.ChatWidget=cc,Object.defineProperty(bt,Symbol.toStringTag,{value:"Module"})}));