(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[2317],{182317(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.d(__webpack_exports__,{Gg:()=>u,M9:()=>h,W3:()=>c,X0:()=>_,bw:()=>o,cE:()=>a,cX:()=>i,e8:()=>d,wc:()=>l});var e=__webpack_require__(436243);var t=__webpack_require__(550293);var s=__webpack_require__(404283);var n=__webpack_require__(619489);var r=__webpack_require__(269405);let d={srcTokenAddress:"token_source",destTokenAddress:"token_destination",srcChainId:"chain_source",destChainId:"chain_destination",slippage:"slippage"};let a={srcTokenAddress:({srcTokenAddress:e,srcChainId:t})=>t?(0,n.AV)(e??"",t):undefined,destTokenAddress:({destTokenAddress:e,destChainId:t})=>t?(0,n.AV)(e??"",t):undefined,srcChainId:({srcChainId:e})=>e?(0,n.Kr)(e):undefined,destChainId:({destChainId:e})=>e?(0,n.Kr)(e):undefined,slippage:({slippage:e})=>e?Number(e):e};let i=(e,t)=>{return e&&!(0,s.mU)(e,t??e)?r.fP.SINGLE:(0,r.fP.CROSSCHAIN)};let u=e=>{return i(e.srcChainId,e.destChainId)};let o=({bridgeId:e,bridges:t})=>`${e}_${t[0]}`;let c=({srcChainId:e,destChainId:r,srcTokenAddress:d,destTokenAddress:a},i)=>{let u=(0,n.Kr)(e??t.nU.ETH);return{chain_id_source:u,chain_id_destination:r?(0,n.Kr)(r):null,token_address_source:d?(0,n.AV)(d,u)??(0,s.ts)(u)?.assetId??null:(0,s.ts)(u)?.assetId??null,token_address_destination:a?(0,n.AV)(a,r??u)??null:null,token_security_type_destination:i}};let l=e=>{switch(e?.metadata?.keyring.type){case"Ledger Hardware":return"Ledger";case"Trezor Hardware":return"Trezor";case"QR Hardware Wallet Device":return"QR Hardware";case"Lattice Hardware":return"Lattice";default:return null}};let _=t=>{return t!==e.bp.quoteRequest[0]?.slippage};let h=(e,s=[],n=!0,r,d,a)=>{let i=e?o(e.quote):"_";return{can_submit:n,gas_included:Boolean(e?.quote?.gasIncluded),gas_included_7702:Boolean(e?.quote?.gasIncluded7702),quoted_time_minutes:e?.estimatedProcessingTimeInSeconds?e.estimatedProcessingTimeInSeconds/60:0,usd_quoted_gas:Number(e?.gasFee?.effective?.usd??0),usd_quoted_return:Number(e?.toTokenAmount?.usd??0),usd_balance_source:d??0,best_quote_provider:r?o(r.quote):i,provider:i,token_symbol_source:e?.quote.srcAsset.symbol??"",token_symbol_destination:e?.quote.destAsset.symbol??null,warnings:s,price_impact:Number(e?.quote.priceData?.priceImpact??0),...a!==undefined&&{has_sufficient_gas_for_quote:a},feature_id:e?.featureId??t.mQ.UNIFIED_SWAP_BRIDGE}}}}).call(__webpack_require__._LM_("@metamask/bridge-controller",{__webpack_require__,__webpack_exports__}))()}}]);